Notes
MassBiasesMonitor and
MassBiasesFitter are a configurable
GaudiHistoTool and executable, respectively, that are part of the Alignment/MassMonitor package. These tools are not yet stable, and the package is under development and hasn't been submitted to the Tag Collector yet.
MassBiasesMonitor is a fork of Wouter Hulsbergen's
TrackParticleMonitor from Tr/TrackMonitors. Some of the changes in
MassBiasesMonitor may be backported to
TrackParticleMonitor, but changes to the default behavior of
TrackParticleMonitor will be avoided, since this tool is already in use.
This tool is meant to help monitor some the issues discussed in:
Purpose
MassBiasesMonitor saves kinematic information about two-body decays of neutral parents into charged daughters that reveal biases in the reconstructed mass that may be due to issues in alignment, magnetic field, etc. In particular, it stores the mass of the parent of the two-body decay in bins of:
- momentum
- transverse momentum
- pseudorapidity
- opening angle
- difference in scalar momentum between daughter tracks ( (pos. - neg.) x magnet polarity (+/-) )
- asymmetry in scalar momentum between daughter tracks ( (pos. - neg.) / (pos. + neg.) x magnet polarity (+/-) )
- angle between the decay plane normal and the magnetic field ( acos of (pos. direction cross neg. direction) dot magnet direction)
- azimuthal angle of the decay plane normal ( acos of (pos. cross neg. x magnet polarity (+/-) dot x)
- the horizontal slope of the parent's momentum (denoted tx)
- the vertical slope of the parent's momentum (denoted ty)
- interval of validity (IOV), a time range defined by technical stops / polarity changes.
The executable
MassBiasesFitter uses predefined
RooFit models tailored for different types of two-body decays (currently suppoting J/ψ -> μ μ and D0 -> K π and fits the reconstructed mass in each bin of each of the biasing variables. It produces plots of the bias Δm/m(PDG) in the reconstructed mass, as well as the resolution and signal fraction.
MassBiasesFitter was designed so that it could easily be extended to show the bias in other parameters of the fit. For example, all three Ups(#S) states could be fitted simultaneously and the different means and resolutions separately tracked, though this is not being attempted right now.
Variable Binning
For several reasons, it's important to variably bin the biasing variables (momentum, transverse momentum, etc.) so that the statistics are at least roughly equal across the bins:
- To get fine grained information where it is most needed
- So that the statistical error in the bias is comparable in all bins
- So that the fit behaves the same in each bin, reducing systematics from shape distortion in low statistics bins
For an arbitrary two-body decay, where the desired range and number of bins in each biasing varible might need to be adjusted, this could mean a lot of manual definition of bin edges by the user, which is not very convenient. So for variable,
MassBiasesMonitor has not only a configurable number of bins and minimum / maximum (where appropriate), but a distribution model and parameter list:
- FLAT - a completely flat distribution, 1
- THETA - a flat distribution defined only for positive values of the variable, (x > 0)
- EXPO - an exponential distribution exp (-λ |x|), falling by default since this is most pertinant, taking one parameter [ λ ]
- RFEXPO - a distribution with a rising and falling part, (|x| > x0) (1-exp(-λ1 (|x|-x0))) exp(-λ2 x), taking parameters [ x0, λ1, λ2 ]
- GAUS - a gaussian distribution, taking parameters [ μ, σ ]
- GAMMA - a gamma distribution |x|^(k-1) exp(-λ|x|), taking parameters [ k, λ ]
- ASYM - a distribution (|x| < 1) (1-x*x)^k, taking one parameter [ k]
Most of these are generally useful, while ASYM is specifically for the momentum asymmetry variable. Many of the parameters are dimensionful, and
MassBiasesMonitor assumes those are in
MeV or 1/MeV as the case may be.
IOV Definitions
Exactly what counts as a change in IOV is somewhat ambiguous, so this is a configurable property of
MassBiasesMonitor. Although, the configurable is a giant string, and I've seen multiline strings in python be parsed incorrectly the Gaudi code that translates the python options to C++. (A vector<string> of IOV definitions would be better; this could be added in the future). By default, these are the IOV definitions (taken from the Operations Dashboard and from
2011alignment and
2012alignment.
Status |
Start Date |
End Date |
Fill Range |
Start Run |
End Run |
Luminosity (1/nb) |
MagDown |
2011-03-13 |
2011-03-21 |
1617-1640 |
87219 |
87773 |
2639.85 |
MagDown |
2011-03-22 |
2011-04-14 |
1644-1647 |
87849 |
87977 |
4918.50 |
MagUp |
2011-04-15 |
2011-04-25 |
1711-1737 |
89333 |
90207 |
44738.68 |
MagDown |
2011-04-26 |
2011-06-10 |
1739-1862 |
90256 |
93282 |
195775.28 |
MagUp |
2011-06-11 |
2011-06-28 |
1863-1901 |
93398 |
94386 |
140419.58 |
MagUp |
2011-07-07 |
2011-07-27 |
1936-1979 |
95948 |
97028 |
71239.42 |
MagDown |
2011-07-27 |
2011-08-17 |
1982-2029 |
97114 |
98882 |
192363.51 |
MagUp |
2011-08-17 |
2011-08-22 |
2030-2040 |
98900 |
100256 |
36805.67 |
MagUp |
2011-09-07 |
2011-09-16 |
2083-2110 |
101373 |
101862 |
67994.42 |
MagDown |
2011-09-16 |
2011-09-28 |
2117-2160 |
101891 |
102452 |
99523.48 |
MagUp |
2011-09-28 |
2011-10-05 |
2165-2182 |
102499 |
102907 |
83023.29 |
MagDown |
2011-10-05 |
2011-10-21 |
2186-2234 |
103049 |
103863 |
113943.49 |
MagUp |
2011-10-22 |
2011-10-31 |
2239-2267 |
103936 |
104414 |
54280.49 |
MagDown |
2012-04-01 |
2012-04-17 |
2469-2523 |
111181 |
112916 |
48250.48 |
MagDown |
2012-04-17 |
2012-05-01 |
2533-2536 |
113013 |
113146 |
19635.33 |
MagUp |
2012-05-01 |
2012-05-02 |
2574-2580 |
114205 |
114287 |
3366.76 |
MagDown |
2012-05-02 |
2012-05-16 |
2583-2630 |
114316 |
115464 |
107426.52 |
MagUp |
2012-05-16 |
2012-05-31 |
2632-2686 |
115518 |
117103 |
163044.70 |
MagDown |
2012-05-31 |
2012-06-11 |
2691-2720 |
117192 |
118286 |
152351.70 |
MagUp |
2012-06-11 |
2012-07-02 |
2723-2739 |
118326 |
118880 |
121009.77 |
MagUp |
2012-07-02 |
2012-07-20 |
2795-2856 |
119956 |
122520 |
95125.17 |
MagUp |
2012-07-20 |
2012-07-25 |
2858-2875 |
122540 |
123803 |
94469.95 |
MagDown |
2012-07-25 |
2012-08-10 |
2880-2934 |
123910 |
125115 |
205270.63 |
MagUp |
2012-08-10 |
2012-08-28 |
2957-3011 |
125566 |
126676 |
194361.06 |
MagDown |
2012-08-28 |
2012-09-15 |
3015-3047 |
126824 |
128110 |
144160.58 |
MagUp |
2012-09-15 |
2012-09-17 |
3067-3160 |
128411 |
128492 |
156105.81 |
MagDown |
2012-10-12 |
2012-10-24 |
3169-3214 |
130316 |
130861 |
140446.12 |
MagUp |
2012-10-24 |
2012-11-08 |
3220-3272 |
130911 |
131940 |
185258.63 |
MagDown |
2012-11-08 |
2012-12-03 |
3273-3363 |
131973 |
133587 |
233169.75 |
MagUp |
2012-12-03 |
2012-12-08 |
3370-3378 |
133624 |
133785 |
16035.34 |
Usage
Results
There is a lot of output from this tool, and including it all on this page would be unnecessarily lengthy. Instead, I'll show a selection of the output. The complete output can be found in ROOT files in my public directory on AFS, /j/jwimberl/public/DiMuon. This has a number of sub directories:
- Pythia*PARTICLE*: Contains the fits of Pythia mass distributions smeared with gaussians, and the result correction that must be applied to the smeared/shifted mean
- *PARTICLE*FITTYPE*/PREMON: Contains the fits to the mass (using the FITTYPE model) in bins of the biasing variables and graphs of the mass bias across the bins
- *PARTICLE*FITTYPE*/POSTMON: Same as the above, but to the mass after running DaVinciParticleReFitter
J/ψ -> μ μ
The J/ψ data is selected from:
Each muon has required to have
- PT > 700 MeV
- P > 8 GeV
- Track chi^2/ndof < 4
- PIDmu > 0
The J/ψ vertex is required to have a chi^2/ndof less than 20.
After this selection,
DaVinciTrackRefitting was applied to the J/ψ candidates.
Fit Models
For a precision measurement of the J/ψ mass reconstructed from two muon tracks, it is important to carefully consider the effects of the asymmetric tail in the mass distribution due to final state radiation. This has been done in
https://cds.cern.ch/record/1360260?ln=en
(see appendix B) (also see the slides at
https://indico.cern.ch/contributionDisplay.py?contribId=1&confId=120195
). Briefly, the true mass distribution is a Breit-Wigner shape with a peak at the J/psi mass, plus a tail at lower masses due to FSR. Since the total distribution is asymmetric, the smearing caused by the detector's finite resolution shifts the location of the peak. Whatever PDF is fit to this smeared distribution (for instance, a crystal ball with n=1, as described in the above slides) reliably picks up the location of the post-smearing-shift peak, but a correction must be applied to get the true peak before this shift. A method to calculate and perform this correction is presented in the above article. This correction is parametrized by the mass distribution width (i.e. resolution) and is calculated by performing a single crystal ball fit to the Pythia mass shape smeared with a gaussian resolution function. The code
MassShiftFitter.cpp in the
MassMonitor package was used to calculate these corrections (running over a sample of a few hundred thousand J/psi decays generated with a particle gun):
Bias in mean (polynomial fit in width):
Parametrized "a" in CB model (polynomial fit in sqrt(width)):
For more information, you can look at /j/jwimberl/public/DiMuon/PythiaJpsi/Jpsi_smears.root.
The simplest model for the data is a crystal ball (i.e. a single gaussian resolution function), but for this high statistics sample, a double crystal ball (i.e. a double gaussian resolution function) gives a better fit. Since convolution is linear, each gaussian shifts the mean by a different amount, and so each mean should be parametrized as the single true mean plus a correction dependent on the corresponding width. So, the double crystal ball fit model finds the mean very well. Unfortunately, the presence of two separate widths means that it is hard to unambiguously define the resolution of the distribution. The two gaussians can "swap" widths, and the width picked by some fiat (e.g. narrower, wider) sometimes doesn't vary smoothly from bin to bin in some of the biasing variables, possibly because of systematic differences in the shape in different bins. The most sensical thing to do is to define the effective width of the the sum of two gaussians with relative fractions f and 1-f, i.e.
Its behavior at quadratic order around the peak at x = 0 is
So, to zeroth order in the split

between the means of the gaussians, the effective width of the double crystal ball is
Alternatively, a fit is also performed using a Cruijff shape:
This shape provides a good fit for the width, but is less well motivated physically, and the obtained mean should not be trusted. (It is given the naive correction for a single gaussian whose width is the same as the width of the Cruijff).
So, the graphs below show results from the double crystal ball fit, showing the bias in the mean and the effective width using the double crystal ball fit. An exponential PDF is used to model the background. Results using the single crystal ball and Cruijff models for the signal are in the aforementioned public directory.
* NOTE: the fit models do not work as well for 2011. There are a few optimizations that need to be performed (including adjustments to fit range).
2011, Reco12
Bias vs. time
Bias vs. momentum
Bias vs. momentum asymmetry
Bias vs. angle btw/ decay plane and magnetic field (Matt Needham's phi)
Bias vs. tx
Bias vs. ty
2011, Reco14
Bias vs. time
Bias vs. momentum
Bias vs. momentum asymmetry
Bias vs. angle btw/ decay plane and magnetic field (Matt Needham's phi)
Bias vs. tx
Bias vs. ty
2012, Reco14
Bias vs. time
Bias vs. momentum
Bias vs. momentum asymmetry
Bias vs. angle btw/ decay plane and magnetic field (Matt Needham's phi)
Bias vs. tx
Bias vs. ty
ψ(2S) -> μ μ
The ψ(2S) data is selected from:
Each muon has required to have
- PT > 1.2 GeV
- P > 8 GeV
- Track chi^2/ndof < 4
- PIDmu > 0
The ψ(2S) vertex is required to have a probability greater than 0.001.
After this selection,
DaVinciTrackRefitting was applied to the ψ(2S) candidates.
NOTE: The first half of 2011 seems to have had a very different trigger configuration than the 2012 data with with this trigger filter was created.
The effect is that there are no ψ(2S) candidates for these early runs.
Fit Models
The fit models for the ψ(2S) mass and the considerations that go into them are equivalent to those of for the J/ψ mass. The parametrization of the mean shift and crystal ball "a" parameter are:
Bias in mean (polynomial fit in width):
Parametrized "a" in CB model (polynomial fit in sqrt(width)):
NOTE: the fit models do not work well for 2011, even more then for the J/ψ. Some corrections are needed.
2011, Reco12
Bias vs. time
Bias vs. momentum
Bias vs. momentum asymmetry
Bias vs. angle btw/ decay plane and magnetic field (Matt Needham's phi)
Bias vs. tx
Bias vs. ty
2011, Reco14
Bias vs. time
Bias vs. momentum
Bias vs. momentum asymmetry
Bias vs. angle btw/ decay plane and magnetic field (Matt Needham's phi)
Bias vs. tx
Bias vs. ty
Reco12 vs Reco14 disparities
For as yet unknown reasons, the same selection finds psi(2S) candidates throughout the Reco12 dataset, but fails to find candidates for the first several IOVs of the Reco14 dataset:
2012, Reco14
Bias vs. time
Bias vs. momentum
Bias vs. momentum asymmetry
Bias vs. angle btw/ decay plane and magnetic field (Matt Needham's phi)
Bias vs. tx
Bias vs. ty
Y(1S) -> μ μ
The Y(1S) data is selected from:
Each muon has required to have
- PT > 1.5 GeV
- P > 8 GeV
- Track chi^2/ndof < 4
- PIDmu > 0
The Y(1S) vertex is required to have a probability greater than 0.001.
After this selection,
DaVinciTrackRefitting was applied to the Y(1S) candidates.
Fit Models
The fit models for the Y(1S) mass and the considerations that go into them are equivalent to those of for the J/ψ mass. The parametrization of the mean shift and crystal ball "a" parameter are:
Bias in mean (polynomial fit in width):
Parametrized "a" in CB model (polynomial fit in sqrt(width)):
However, the lower statistics in 2011 make the double crystal ball model badly behaved. So, for 2011 the biases shown come from the single crystal ball fit.
2011, Reco12
Bias vs. time
Bias vs. momentum
Bias vs. momentum asymmetry
Bias vs. angle btw/ decay plane and magnetic field (Matt Needham's phi)
Bias vs. tx
Bias vs. ty
2011, Reco14
Bias vs. time
Bias vs. momentum
Bias vs. momentum asymmetry
Bias vs. angle btw/ decay plane and magnetic field (Matt Needham's phi)
Bias vs. tx
Bias vs. ty
2012, Reco14
Bias vs. time
Bias vs. momentum
Bias vs. momentum asymmetry
Bias vs. angle btw/ decay plane and magnetic field (Matt Needham's phi)
Bias vs. tx
Bias vs. ty
D0 -> K π
The D0 data is selected from:
The following selection criteria are applied:
- D* vertex chi^2/ndof < 25
- Δm < 4 MeV
- D0 vertex chi^2/ndof < 10 (perhaps this is too tight)
- PT(D0) > 3.5 GeV
- Kaon PIDK > 0
- Pion PIDK < 0
After this selection,
DaVinciTrackRefitting was applied to the D0 candidates.
Fit Models
A similar study has been done to parametrize the FSR-shift bias in the mean and the CB tail. The shift is smaller than for the dimuon decays, but still present:
Bias in mean (polynomial fit in width):
Parametrized "a" in CB model (polynomial fit in sqrt(width)):
A double crystal ball model with exponential background is used for the following fits.
2011, Reco12
2011, Reco14
2012, Reco14
Bias vs. time
Bias vs. momentum
Bias vs. momentum asymmetry
Bias vs. angle btw/ decay plane and magnetic field (Matt Needham's phi)
Bias vs. tx
Bias vs. ty