20 {
21
22
26
27
29
31 std::vector<std::string> recoTypes{"All", "Matched", "Merged", "Fake", "Split", "Other"};
32 std::vector<std::string> truthTypes{"Inclusive", "Reconstructable", "Accepted", "Seeded", "Reconstructed", "ReconstructedSplit"};
33
34 std::vector<std::string> smOriginTypes;
36 smOriginTypes = {"FakeOrigin", "Pileup", "KshortDecay", "StrangeMesonDecay", "LambdaDecay",
37 "StrangeBaryonDecay", "TauDecay", "GammaConversion", "OtherDecay",
38 "HadronicInteraction", "OtherSecondary", "BHadronDecay", "DHadronDecay",
39 "Fragmentation", "OtherOrigin", "Signal"};
40 }
41
42
43
46 float maxZ =
m_doMuSA ? 10000 : 1500;
47 float maxLxy =
m_doMuSA ? 8000 : 500;
51 float maxTrackd0 =
m_doMuSA ? 3000 : 300;
52 float maxTrackz0 =
m_doMuSA ? 5000 : 500;
53 float maxErrd0 =
m_doMuSA ? 300 : 30;
54 float maxErrz0 =
m_doMuSA ? 500 : 50;
55
56 float maxResR =
m_doMuSA ? 2000 : 20;
57 float maxResZ =
m_doMuSA ? 2000 : 20;
58
59 ANA_CHECK (
book(
TH1F(
"RecoVertex/matchType",
"Vertex Match Type", 65, -0.5, 64.5)));
61 ANA_CHECK (
book(
TH1F(
"RecoVertex/smOriginType",
"Vertex SM Origin Type", 65537, -0.5, 65536.5)));
62 }
63
64
65 for(const auto& recoType : recoTypes) {
66 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_x").c_str(),
"Reco vertex x [mm]", 1000, -maxX, maxX)));
67 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_y").c_str(),
"Reco vertex y [mm]", 1000, -maxY, maxY)));
68 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_z").c_str(),
"Reco vertex z [mm]", 1000, -maxZ, maxZ)));
69 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Lxy").c_str(),
"Reco vertex L_{xy} [mm]", 500, 0, maxLxy)));
70 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_pT").c_str(),
"Reco vertex p_{T} [GeV]", 100, 0, 100)));
71 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_eta").c_str(),
"Reco vertex #eta", 100, -5, 5)));
72 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_phi").c_str(),
"Reco vertex #phi", 100, -TMath::Pi(), TMath::Pi())));
73 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_mass").c_str(),
"Reco vertex mass [GeV]", 500, 0, 100)));
74 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_mu").c_str(),
"Reco vertex Red. Mass [GeV]", 500, 0, 100)));
75 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_chi2").c_str(),
"Reco vertex recoChi2", 100, 0, 10)));
76 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_dir").c_str(),
"Reco vertex recoDirection", 100, -1, 1)));
77 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_charge").c_str(),
"Reco vertex recoCharge", 20, -10, 10)));
78 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_H").c_str(),
"Reco vertex H [GeV]", 100, 0, 100)));
79 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_HT").c_str(),
"Reco vertex Mass [GeV]", 100, 0, 100)));
80 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_minOpAng").c_str(),
"Reco vertex minOpAng", 100, -1, 1)));
81 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_maxOpAng").c_str(),
"Reco vertex maxOpAng", 100, -1, 1)));
82 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_maxdR").c_str(),
"Reco vertex maxDR", 100, 0, 10)));
83 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_mind0").c_str(),
"Reco vertex min d0 [mm]", 100, 0, mind0)));
84 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_maxd0").c_str(),
"Reco vertex max d0 [mm]", 100, 0, maxd0)));
85 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_ntrk").c_str(),
"Reco vertex n tracks", 30, 0, 30)));
86
87
88 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_qOverP").c_str(),
"Reco track qOverP ", 100, 0, .01)));
89 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_theta").c_str(),
"Reco track theta ", 64, 0, 3.2)));
90 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_E").c_str(),
"Reco track E ", 100, 0, 100)));
91 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_M").c_str(),
"Reco track M ", 100, 0, 10)));
92 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_Pt").c_str(),
"Reco track Pt ", 100, 0, 100)));
93 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_Px").c_str(),
"Reco track Px ", 100, 0, 100)));
94 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_Py").c_str(),
"Reco track Py ", 100, 0, 100)));
95 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_Pz").c_str(),
"Reco track Pz ", 100, 0, 100)));
96 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_Eta").c_str(),
"Reco track Eta ", 100, -5, 5)));
97 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_Phi").c_str(),
"Reco track Phi ", 63, -3.2, 3.2)));
98 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_D0").c_str(),
"Reco track D0 ", 300, -maxTrackd0, maxTrackd0)));
99 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_Z0").c_str(),
"Reco track Z0 ", 500, -maxTrackz0, maxTrackz0)));
100 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_errD0").c_str(),
"Reco track errD0 ", 300, 0, maxErrd0)));
101 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_errZ0").c_str(),
"Reco track errZ0 ", 500, 0, maxErrz0)));
102 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_Chi2").c_str(),
"Reco track Chi2 ", 100, 0, 10)));
103 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_nDoF").c_str(),
"Reco track nDoF ", 100, 0, 100)));
104 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_Trk_charge").c_str(),
"Reco track charge ", 3, -1.5, 1.5)));
105
106
107 if ( recoType != "All" and recoType != "Fake" ) {
108 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_positionRes_R").c_str(),
"Position resolution for vertices matched to truth decays", 400, -maxResR, maxResR)));
109 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_positionRes_Z").c_str(),
"Position resolution for vertices matched to truth decays", 400, -maxResZ, maxResZ)));
110 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_matchScore_weight").c_str(),
"Vertex Match Score (weight)", 101, 0, 1.01)));
111 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_matchScore_pt").c_str(),
"Vertex Match Score (pT)", 101, 0, 1.01)));
112 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + recoType +
"_matchedTruthID").c_str(),
"Vertex Truth Match ID", 100, 0, 100)));
113 }
114 }
115
116
118 for(const auto& smOriginType : smOriginTypes) {
119 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_x").c_str(),
"Reco vertex x [mm]", 1000, -maxX, maxX)));
120 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_y").c_str(),
"Reco vertex y [mm]", 1000, -maxY, maxY)));
121 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_z").c_str(),
"Reco vertex z [mm]", 1000, -maxZ, maxZ)));
122 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Lxy").c_str(),
"Reco vertex L_{xy} [mm]", 500, 0, maxLxy)));
123 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_pT").c_str(),
"Reco vertex p_{T} [GeV]", 100, 0, 100)));
124 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_eta").c_str(),
"Reco vertex #eta", 100, -5, 5)));
125 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_phi").c_str(),
"Reco vertex #phi", 100, -TMath::Pi(), TMath::Pi())));
126 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_mass").c_str(),
"Reco vertex mass [GeV]", 500, 0, 100)));
127 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_mu").c_str(),
"Reco vertex Red. Mass [GeV]", 500, 0, 100)));
128 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_chi2").c_str(),
"Reco vertex recoChi2", 100, 0, 10)));
129 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_dir").c_str(),
"Reco vertex recoDirection", 100, -1, 1)));
130 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_charge").c_str(),
"Reco vertex recoCharge", 20, -10, 10)));
131 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_H").c_str(),
"Reco vertex H [GeV]", 100, 0, 100)));
132 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_HT").c_str(),
"Reco vertex Mass [GeV]", 100, 0, 100)));
133 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_minOpAng").c_str(),
"Reco vertex minOpAng", 100, -1, 1)));
134 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_maxOpAng").c_str(),
"Reco vertex maxOpAng", 100, -1, 1)));
135 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_maxdR").c_str(),
"Reco vertex maxDR", 100, 0, 10)));
136 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_mind0").c_str(),
"Reco vertex min d0 [mm]", 100, 0, mind0)));
137 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_maxd0").c_str(),
"Reco vertex max d0 [mm]", 100, 0, maxd0)));
138 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_ntrk").c_str(),
"Reco vertex n tracks", 30, 0, 30)));
139
140
141 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_qOverP").c_str(),
"Reco track qOverP ", 100, 0, .01)));
142 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_theta").c_str(),
"Reco track theta ", 64, 0, 3.2)));
143 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_E").c_str(),
"Reco track E ", 100, 0, 100)));
144 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_M").c_str(),
"Reco track M ", 100, 0, 10)));
145 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_Pt").c_str(),
"Reco track Pt ", 100, 0, 100)));
146 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_Px").c_str(),
"Reco track Px ", 100, 0, 100)));
147 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_Py").c_str(),
"Reco track Py ", 100, 0, 100)));
148 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_Pz").c_str(),
"Reco track Pz ", 100, 0, 100)));
149 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_Eta").c_str(),
"Reco track Eta ", 100, -5, 5)));
150 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_Phi").c_str(),
"Reco track Phi ", 63, -3.2, 3.2)));
151 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_D0").c_str(),
"Reco track D0 ", 300, -maxTrackd0, maxTrackd0)));
152 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_Z0").c_str(),
"Reco track Z0 ", 500, -maxTrackz0, maxTrackz0)));
153 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_errD0").c_str(),
"Reco track errD0 ", 300, 0, maxErrd0)));
154 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_errZ0").c_str(),
"Reco track errZ0 ", 500, 0, maxErrz0)));
155 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_Chi2").c_str(),
"Reco track Chi2 ", 100, 0, 10)));
156 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_nDoF").c_str(),
"Reco track nDoF ", 100, 0, 100)));
157 ANA_CHECK (
book(
TH1F((
"RecoVertex/" + smOriginType +
"_Trk_charge").c_str(),
"Reco track charge ", 3, -1.5, 1.5)));
158
159
160 }
161 }
162
163
164 for(const auto& truthType : truthTypes) {
165 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_x").c_str(),
"Truth vertex x [mm]", 1000, -maxX, maxX)));
166 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_y").c_str(),
"Truth vertex y [mm]", 500, -maxY, maxY)));
167 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_z").c_str(),
"Truth vertex z [mm]", 500, -maxZ, maxZ)));
168 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_R").c_str(),
"Truth vertex r [mm]", 6000, 0, maxR)));
169 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_distFromPV").c_str(),
"Truth vertex distFromPV [mm]", 600, 0, maxR)));
170 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_Eta").c_str(),
"Truth vertex Eta", 100, -5, 5)));
171 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_Phi").c_str(),
"Truth vertex Phi", 64, -3.2, 3.2)));
172 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_Ntrk_out").c_str(),
"Truth vertex n outgoing tracks", 100, 0, 100)));
173 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_Parent_E").c_str(),
"Reco track E", 100, 0, 100)));
174 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_Parent_M").c_str(),
"Reco track M", 500, 0, 500)));
175 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_Parent_Pt").c_str(),
"Reco track Pt", 100, 0, 100)));
176 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_Parent_Eta").c_str(),
"Reco track Eta", 100, -5, 5)));
177 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_Parent_Phi").c_str(),
"Reco track Phi", 63, -3.2, 3.2)));
178 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_Parent_charge").c_str(),
"Reco track charge", 3, -1, 1)));
179 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_ParentProdX").c_str(),
"truthParentProd vertex x [mm]", 500, -500, 500)));
180 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_ParentProdY").c_str(),
"truthParentProd vertex y [mm]", 500, -500, 500)));
181 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_ParentProdZ").c_str(),
"truthParentProd vertex z [mm]", 500, -500, 500)));
182 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_ParentProdR").c_str(),
"truthParentProd vertex r [mm]", 6000, 0, 600)));
183 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_ParentProddistFromPV").c_str(),
"truthParentProd vertex distFromPV [mm]", 500, 0, 500)));
184 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_ParentProdEta").c_str(),
"truthParentProd vertex Eta", 100, -5, 5)));
185 ANA_CHECK (
book(
TH1F((
"TruthVertex/" + truthType +
"_ParentProdPhi").c_str(),
"truthParentProd vertex Phi", 64, -3.2, 3.2)));
186 }
187
188
189 Double_t standard_bins[] = {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 50, 60, 70, 80, 90, 100, 125, 150, 200, 300, 500};
190 Double_t muSA_bins[] = {0.0, 1, 5, 10, 20, 50, 100, 200, 300, 500, 750, 1000, 1500, 2000, 2500, 3000, 4000, 5000, 6000, 7000, 8000};
191
192
194 size_t nbins =
m_doMuSA ?
sizeof(muSA_bins)/
sizeof(muSA_bins[0])-1 :
sizeof(standard_bins)/
sizeof(standard_bins[0])-1;
195
200
201 }
202
203
204 return StatusCode::SUCCESS;
205 }
static const std::vector< std::string > bins
Gaudi::Property< bool > m_doMuSA
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)