30 m_ntupleVars->addNewVar<
unsigned int> (
"RunNumber" );
31 m_ntupleVars->addNewVar<
unsigned int> (
"Event" );
32 m_ntupleVars->addNewVar<
unsigned int> (
"Time" );
33 m_ntupleVars->addNewVar<
unsigned int> (
"LumiBlock" );
34 m_ntupleVars->addNewVar<
unsigned int> (
"BCID" );
35 m_ntupleVars->addNewVar<
unsigned int> (
"LVL1ID" );
37 m_ntupleVars->addNewVar<
unsigned int> (
"NumAllTrks" );
38 m_ntupleVars->addNewVar<
unsigned int> (
"NumSelTrks" );
39 m_ntupleVars->addNewVar<
unsigned int> (
"SizeIncomp" );
41 m_ntupleVars->addNewVar<
unsigned int> (
"NumPV" );
42 m_ntupleVars->addNewVar<
unsigned int> (
"NTrksPV" );
43 m_ntupleVars->addNewVar<
unsigned int> (
"PVType" );
44 m_ntupleVars->addNewVar<
double> (
"PVX" );
45 m_ntupleVars->addNewVar<
double> (
"PVY" );
46 m_ntupleVars->addNewVar<
double> (
"PVZ" );
48 m_ntupleVars->addNewVar< vector<int> > (
"NdofTrksPV" );
49 m_ntupleVars->addNewVar< vector<double> > (
"PVZpile" );
51 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_id" );
52 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_pT" );
53 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_2dIPPV" );
54 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_ZIPPV" );
55 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_2dIP" );
56 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_ZIP" );
57 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_phi" );
58 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_eta" );
59 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_chi2" );
60 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_eta" );
61 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_BLayHits" );
62 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_PixHits" );
63 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_SCTHits" );
64 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_TRTHits" );
65 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_PixBar1" );
66 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_PixBar2" );
67 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_barcode" );
68 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_matchPr" );
69 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_2dIPErr" );
70 m_ntupleVars->addNewVar< vector<double> > (
"RecoTrk_ZIPErr" );
71 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_PixShare" );
72 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_SCTShare" );
73 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_TrkAuth" );
74 m_ntupleVars->addNewVar< vector<int> > (
"RecoTrk_TrkLowPt" );
76 m_ntupleVars->addNewVar< vector<int> > (
"SelTrk_barcode" );
78 m_ntupleVars->addNewVar< vector<int> > (
"SVTrk_id" );
79 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_pT" );
80 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_p" );
81 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_phi" );
82 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_eta" );
83 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_2dIP" );
84 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_ZIP" );
85 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_delp" );
86 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_del2dIP" );
87 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_delzIP" );
88 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_eta" );
89 m_ntupleVars->addNewVar< vector<int> > (
"SVTrk_BLayHits" );
90 m_ntupleVars->addNewVar< vector<int> > (
"SVTrk_PixHits" );
91 m_ntupleVars->addNewVar< vector<int> > (
"SVTrk_SCTHits" );
92 m_ntupleVars->addNewVar< vector<int> > (
"SVTrk_TRTHits" );
93 m_ntupleVars->addNewVar< vector<int> > (
"SVTrk_barcode" );
94 m_ntupleVars->addNewVar< vector<double> > (
"SVTrk_matchPr" );
95 m_ntupleVars->addNewVar< vector<int> > (
"SVTrk_TrkAuth" );
96 m_ntupleVars->addNewVar< vector<int> > (
"SVTrk_TrkLowPt" );
98 m_ntupleVars->addNewVar<
unsigned int > (
"All2TrkVrtNum" );
99 m_ntupleVars->addNewVar< vector<double> > (
"All2TrkVrtMass" );
100 m_ntupleVars->addNewVar< vector<double> > (
"All2TrkVrtPt" );
101 m_ntupleVars->addNewVar< vector<int> > (
"All2TrkVrtCharge" );
102 m_ntupleVars->addNewVar< vector<int> > (
"All2TrkSumBLHits" );
103 m_ntupleVars->addNewVar< vector<double> > (
"All2TrkVrtX" );
104 m_ntupleVars->addNewVar< vector<double> > (
"All2TrkVrtY" );
105 m_ntupleVars->addNewVar< vector<double> > (
"All2TrkVrtZ" );
106 m_ntupleVars->addNewVar< vector<double> > (
"All2TrkVrtChiSq" );
108 m_ntupleVars->addNewVar<
unsigned int > (
"AfFakVrtNum" );
109 m_ntupleVars->addNewVar< vector<double> > (
"AfFakVrtMass" );
110 m_ntupleVars->addNewVar< vector<double> > (
"AfFakVrtPt" );
111 m_ntupleVars->addNewVar< vector<int> > (
"AfFakVrtCharge" );
112 m_ntupleVars->addNewVar< vector<double> > (
"AfFakVrtX" );
113 m_ntupleVars->addNewVar< vector<double> > (
"AfFakVrtY" );
114 m_ntupleVars->addNewVar< vector<double> > (
"AfFakVrtZ" );
115 m_ntupleVars->addNewVar< vector<double> > (
"AfFakVrtChiSq" );
117 m_ntupleVars->addNewVar<
unsigned int > (
"NumInitSecVrt" );
118 m_ntupleVars->addNewVar<
unsigned int > (
"NumRearrSecVrt" );
119 m_ntupleVars->addNewVar<
unsigned int > (
"NumSecVrt" );
120 m_ntupleVars->addNewVar< vector<double> > (
"SecVtxX" );
121 m_ntupleVars->addNewVar< vector<double> > (
"SecVtxY" );
122 m_ntupleVars->addNewVar< vector<double> > (
"SecVtxZ" );
123 m_ntupleVars->addNewVar< vector<int> > (
"SecVtx_NumTrks" );
124 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_Mass" );
125 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_Mass_electron" );
126 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_Chi2" );
127 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_pT" );
128 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_pZ" );
129 m_ntupleVars->addNewVar< vector<int> > (
"SecVtx_Charge" );
130 m_ntupleVars->addNewVar< vector<int> > (
"SecVtx_SumBLayHits" );
131 m_ntupleVars->addNewVar< vector<int> > (
"SecVtx_AllTrksBLayHits" );
132 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_MinOpAng" );
134 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkPt" );
135 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkPhi" );
136 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkEta" );
137 m_ntupleVars->addNewVar< vector<int> > (
"SecVtx_TrkBLay" );
138 m_ntupleVars->addNewVar< vector<int> > (
"SecVtx_TrkPixExclBLay" );
139 m_ntupleVars->addNewVar< vector<int> > (
"SecVtx_TrkSCT" );
140 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_Trk2dIP" );
141 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkZIP" );
142 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkdelP" );
143 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_Trkdel2dIP" );
144 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkdelZIP" );
145 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkPtWrtSV" );
146 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkPhiWrtSV" );
147 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkEtaWrtSV" );
148 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_Trk2dIPWrtSV" );
149 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkZIPWrtSV" );
150 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkdelPWrtSV" );
151 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_Trkdel2dIPWrtSV" );
152 m_ntupleVars->addNewVar< vector<double> > (
"SecVtx_TrkdelZIPWrtSV" );
154 m_ntupleVars->addNewVar<
double> (
"Truth_SV1X" );
155 m_ntupleVars->addNewVar<
double> (
"Truth_SV1Y" );
156 m_ntupleVars->addNewVar<
double> (
"Truth_SV1Z" );
157 m_ntupleVars->addNewVar<
double> (
"Truth_PiEta" );
158 m_ntupleVars->addNewVar<
double> (
"Truth_PiPhi" );
159 m_ntupleVars->addNewVar<
double> (
"Truth_PiPt" );
160 m_ntupleVars->addNewVar<
int> (
"Truth_PiInt" );
161 m_ntupleVars->addNewVar<
int> (
"Truth_nSVHiPt" );
162 m_ntupleVars->addNewVar<
int> (
"Truth_nSVLoPt" );
163 m_ntupleVars->addNewVar<
int> (
"Truth_nSVGe1HiPt" );
165 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllVtxType" );
166 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVX" );
167 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVY" );
168 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVZ" );
169 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVTrk1Pt" );
170 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVTrk2Pt" );
171 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVTrk3Pt" );
172 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVTrk4Pt" );
173 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVTrk5Pt" );
174 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllSVNumTrks" );
175 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllSVNumReTrks" );
176 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllSVCharge" );
177 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVSumTrksPt" );
178 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVSumTrksPz" );
179 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllSVHasLifetime" );
180 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllSVStrangeBaryon" );
181 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllSVIncomingPid" );
182 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllSVNumIncident" );
183 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVPtIncident" );
184 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVPzIncident" );
185 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllSVMinOpAng" );
187 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllTrk2dIP" );
188 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllTrkZIP" );
189 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllTrkPt" );
190 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllTrkEta" );
191 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllTrkPhi" );
192 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllTrkR" );
193 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllTrkZ" );
194 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllTrkBC" );
196 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllRefitSt" );
197 m_ntupleVars->addNewVar< vector<int> > (
"Truth_AllRefitNTrk" );
198 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllRefitChi2" );
199 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllRefitSVX" );
200 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllRefitSVY" );
201 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllRefitSVZ" );
202 m_ntupleVars->addNewVar< vector<double> > (
"Truth_AllRefitMass" );
204 return StatusCode::SUCCESS;
211 m_ntupleVars->deleteNtupleVariables();
213 return StatusCode::SUCCESS;
220 m_ntupleVars->branchNtuple( m_tree_Vert );
222 return StatusCode::SUCCESS;
229 m_ntupleVars->clear();
231 return StatusCode::SUCCESS;
250 m_ntupleVars->get<
unsigned int>(
"RunNumber" ) = eventInfo->
runNumber();
251 m_ntupleVars->get<
unsigned int>(
"Event") = eventInfo->
eventNumber();
252 m_ntupleVars->get<
unsigned int>(
"Time" ) = eventInfo->
timeStamp() ;
253 m_ntupleVars->get<
unsigned int>(
"LumiBlock" ) = eventInfo->
lumiBlock() ;
254 m_ntupleVars->get<
unsigned int>(
"BCID" ) = eventInfo->
bcid();
256 ATH_MSG_DEBUG(
" > addEventInfo: event "<< m_ntupleVars->get<
unsigned int>(
"Event" ) );
258 return StatusCode::SUCCESS;
267 if( m_jp.FillNtuple ) {
270 m_ntupleVars->get< vector<int> >(
"SVTrk_PixHits" ).emplace_back( (
int) tmpT);
273 m_ntupleVars->get< vector<int> >(
"SVTrk_SCTHits" ).emplace_back( (
int) tmpT);
276 m_ntupleVars->get< vector<int> >(
"SVTrk_TRTHits" ).emplace_back( (
int) tmpT);
279 m_ntupleVars->get< vector<int> >(
"SVTrk_BLayHits" ).emplace_back( (
int) tmpT);
286 const auto& perigee = trk->perigeeParameters();
288 if( m_jp.FillNtuple ) {
292 double d0 = perigee.parameters()[
Trk::d0];
296 double ptrk = (1./
qOverP);
303 m_ntupleVars->get< vector<int> >(
"SVTrk_id" ) .emplace_back( trk_idAcc(*trk) );
305 m_ntupleVars->get< vector<double> >(
"SVTrk_pT" ) .emplace_back(
pT);
306 m_ntupleVars->get< vector<double> >(
"SVTrk_p" ) .emplace_back(ptrk);
307 m_ntupleVars->get< vector<double> >(
"SVTrk_phi" ) .emplace_back(
phi);
308 m_ntupleVars->get< vector<double> >(
"SVTrk_eta" ) .emplace_back(trketa);
309 m_ntupleVars->get< vector<double> >(
"SVTrk_2dIP" ) .emplace_back(
d0);
310 m_ntupleVars->get< vector<double> >(
"SVTrk_ZIP" ) .emplace_back(perigee.parameters()[
Trk::z0]);
312 double matchProb = -1;
321 matchProb= truthMatchProbabilityAcc( *trk );
325 m_ntupleVars->get< vector<int> >(
"SVTrk_barcode" ) .emplace_back(
barcode );
326 m_ntupleVars->get< vector<double> >(
"SVTrk_matchPr" ) .emplace_back( matchProb );
328 ATH_MSG_DEBUG(
" > fillAANT_SelectedBaseTracks: Sel Trk d0/pT/eta/match bc/pr "
335 double errp = ptrk*ptrk*errqOverP;
337 m_ntupleVars->get< vector<double> >(
"SVTrk_delp" ) .emplace_back( errp );
338 m_ntupleVars->get< vector<double> >(
"SVTrk_del2dIP" ) .emplace_back( errd0 );
339 m_ntupleVars->get< vector<double> >(
"SVTrk_delzIP" ) .emplace_back( (*(perigee.covariance()))(
Trk::z0,
Trk::z0) );
346 return StatusCode::SUCCESS;
357 for(
size_t itrk=0; itrk<
vertex->nTrackParticles(); itrk++) {
366 m_ntupleVars->get< vector<double> >(
"SecVtx_TrkPt" ) .emplace_back( trk->
pt() );
367 m_ntupleVars->get< vector<double> >(
"SecVtx_TrkPhi" ) .emplace_back( trk->
phi() );
368 m_ntupleVars->get< vector<double> >(
"SecVtx_TrkEta" ) .emplace_back( trk->
eta() );
369 m_ntupleVars->get< vector<double> >(
"SecVtx_Trk2dIP" ) .emplace_back( trk->
d0() );
370 m_ntupleVars->get< vector<double> >(
"SecVtx_TrkZIP" ) .emplace_back( trk->
z0() );
375 fillTrackSummary( trk_summary, trk );
377 m_ntupleVars->get< vector<int> >(
"SecVtx_TrkBLay" ) .emplace_back( trk_summary.
numIBLHits );
378 m_ntupleVars->get< vector<int> >(
"SecVtx_TrkPixExclBLay" ) .emplace_back( trk_summary.
numPixelHits - trk_summary.
numIBLHits );
379 m_ntupleVars->get< vector<int> >(
"SecVtx_TrkSCT" ) .emplace_back( trk_summary.
numSctHits );
389 ATH_MSG_VERBOSE(
" >> fillAANT_SecondaryVertices : filling track vars wrt. SV");
399 m_ntupleVars->get< vector<double> >(
"SecVtx_TrkPtWrtSV" ) .emplace_back( pt_wrtSVAcc(*trk) );
400 m_ntupleVars->get< vector<double> >(
"SecVtx_TrkEtaWrtSV" ) .emplace_back( eta_wrtSVAcc(*trk) );
401 m_ntupleVars->get< vector<double> >(
"SecVtx_TrkPhiWrtSV" ) .emplace_back( phi_wrtSVAcc(*trk) );
402 m_ntupleVars->get< vector<double> >(
"SecVtx_Trk2dIPWrtSV" ) .emplace_back( d0_wrtSVAcc(*trk) );
403 m_ntupleVars->get< vector<double> >(
"SecVtx_TrkZIPWrtSV" ) .emplace_back( z0_wrtSVAcc(*trk) );
404 m_ntupleVars->get< vector<double> >(
"SecVtx_TrkdelPWrtSV" ) .emplace_back( errP_wrtSVAcc(*trk) );
405 m_ntupleVars->get< vector<double> >(
"SecVtx_Trkdel2dIPWrtSV" ) .emplace_back( errd0_wrtSVAcc(*trk) );
406 m_ntupleVars->get< vector<double> >(
"SecVtx_TrkdelZIPWrtSV" ) .emplace_back( errz0_wrtSVAcc(*trk) );
410 ATH_MSG_VERBOSE(
" >> fillAANT_SecondaryVertices : filling track vars wrt. SV (invalid values)");
425 ATH_MSG_DEBUG(
" >> fillAANT_SecondaryVertices : Track loop end. ");
427 ATH_MSG_VERBOSE(
" >> fillAANT_SecondaryVertices : filling vertex vars");
438 m_ntupleVars->get< vector<int> >(
"SecVtx_NumTrks" ) .emplace_back(
vertex->nTrackParticles() );
439 m_ntupleVars->get< vector<double> >(
"SecVtx_Chi2" ) .emplace_back(
vertex->chiSquared() );
440 m_ntupleVars->get< vector<double> >(
"SecVtxX" ) .emplace_back(
vertex->x() );
441 m_ntupleVars->get< vector<double> >(
"SecVtxY" ) .emplace_back(
vertex->y() );
442 m_ntupleVars->get< vector<double> >(
"SecVtxZ" ) .emplace_back(
vertex->z() );
455 return StatusCode::SUCCESS;