ATLAS Offline Software
Loading...
Searching...
No Matches
JpsiExample.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5// JpsiExample.cxx
6// Author: James Catmore (James.Catmore@cern.ch), E. Bouhova-Thacker (e.bouhova@cern.ch)
7// This is an example showing the use of the JpsiFinder tool and alg, getting the actual Jpsis
8// from StoreGate
9
11
13#include "xAODTracking/Vertex.h"
16#include "CLHEP/Vector/LorentzVector.h"
17#include "CLHEP/Matrix/Vector.h"
18#include "CLHEP/Matrix/Matrix.h"
19#include "CLHEP/Matrix/SymMatrix.h"
20#include "TFile.h"
21#include "TTree.h"
22#include "TVector3.h"
23#include "TLorentzVector.h"
26
28
29JpsiExample::JpsiExample(const std::string& name, ISvcLocator* pSvcLocator) :
30 AthAlgorithm(name, pSvcLocator),
31 m_muonMass(ParticleConstants::muonMassInMeV)
32{
33
34 // Declare user-defined properties - cuts and vertexing method
35 declareProperty("muonMass" , m_muonMass);
36 declareProperty("outputNTupleName", m_userFName);
37 declareProperty("JpsiCandidates" ,m_JpsiCandidatesKey = "JpsiCandidates");
38
39 declareProperty("RefTrackPx", m_refPX);
40 declareProperty("RefTrackPy", m_refPY);
41 declareProperty("RefTrackPz", m_refPZ);
42
43 // Global Counters; for truth statistics
44 m_eventCntr = 0;
45 m_jpsiCntr = 0;
46
47 m_jpsiMass = 0;
49 m_jpsiMassRec = 0;
52 m_jpsiChi2 = 0;
53
54 m_trkRefitPx1 = 0;
55 m_trkRefitPy1 = 0;
56 m_trkRefitPz1 = 0;
57 m_trkRefitPx2 = 0;
58 m_trkRefitPy2 = 0;
59 m_trkRefitPz2 = 0;
60
61 m_vx = 0;
62 m_vy = 0;
63 m_vz = 0;
64
66 m_trkOrigPx1 = 0;
67 m_trkOrigPy1 = 0;
68 m_trkOrigPz1 = 0;
70 m_trkOrigPx2 = 0;
71 m_trkOrigPy2 = 0;
72 m_trkOrigPz2 = 0;
73
74 m_outputFile = 0;
75 m_auxTree = 0;
76}
77
78// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
79
81
82
83 ATH_MSG_DEBUG("in initialize()");
84
85 // Open n-tuple file
86 m_outputFile = new TFile(m_userFName.c_str(),"recreate");
87 // Auxiliary n-tuples not covered by the automatic n-tuple makers
88 // Decay angles
90 m_auxTree = new TTree("AUX","AUX");
91 m_auxTree->Branch("jpsiMass", &m_jpsiMass);
92 m_auxTree->Branch("jpsiMassError", &m_jpsiMassError);
93 m_auxTree->Branch("jpsiMassRec", &m_jpsiMassRec);
94 m_auxTree->Branch("jpsiMassPullRec", &m_jpsiMassPullRec);
95 m_auxTree->Branch("jpsiMassPullMC", &m_jpsiMassPullMC);
96 m_auxTree->Branch("jpsiChi2", &m_jpsiChi2);
97
98// m_auxTree->Branch("trkRefitCharge1", &m_trkRefitCharge1);
99 m_auxTree->Branch("trkRefitPx1", &m_trkRefitPx1);
100 m_auxTree->Branch("trkRefitPy1", &m_trkRefitPy1);
101 m_auxTree->Branch("trkRefitPz1", &m_trkRefitPz1);
102// m_auxTree->Branch("trkRefitCharge2", &m_trkRefitCharge2);
103 m_auxTree->Branch("trkRefitPx2", &m_trkRefitPx2);
104 m_auxTree->Branch("trkRefitPy2", &m_trkRefitPy2);
105 m_auxTree->Branch("trkRefitPz2", &m_trkRefitPz2);
106
107 m_auxTree->Branch("vx",m_vx);
108 m_auxTree->Branch("vy",m_vy);
109 m_auxTree->Branch("vz",m_vz);
110
111 m_auxTree->Branch("trkOrigCharge1", &m_trkOrigCharge1);
112 m_auxTree->Branch("trkOrigPx1", &m_trkOrigPx1);
113 m_auxTree->Branch("trkOrigPy1", &m_trkOrigPy1);
114 m_auxTree->Branch("trkOrigPz1", &m_trkOrigPz1);
115 m_auxTree->Branch("trkOrigCharge2", &m_trkOrigCharge2);
116 m_auxTree->Branch("trkOrigPx2", &m_trkOrigPx2);
117 m_auxTree->Branch("trkOrigPy2", &m_trkOrigPy2);
118 m_auxTree->Branch("trkOrigPz2", &m_trkOrigPz2);
119
120// m_auxTree->Branch("rxyError", &m_rxyError);
121 ATH_CHECK(m_JpsiCandidatesKey.initialize());
122 return StatusCode::SUCCESS;
123
124}
125
126// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
127
129
130
131 ATH_MSG_DEBUG("in execute()");
132
133 // Read in the Jpsis from StoreGate
134 const xAOD::VertexContainer* jpsiContainer(0);
136 jpsiContainer = handle.cptr();
137
138 if (!jpsiContainer) {
139 ATH_MSG_ERROR("No Jpsi Container Found, skipping event");
140 return StatusCode::RECOVERABLE;
141 } else {
142 ATH_MSG_DEBUG("Obtained jpsiContainer");
143 }
144 ATH_MSG_DEBUG("number of jpsi candidates " << jpsiContainer->size());
145 m_jpsiCntr += jpsiContainer->size(); // Count the Jpsis
146
147
148 // Set the auxilliary branches of the ntuple to zero
149 // to avoid accumulation
151
152 ++m_eventCntr; // Increment event counter
153
154 // Extract information from the Jpsi candidates
155 for (const xAOD::Vertex* jpsiCandidate : *jpsiContainer) {
156 //ATH_MSG_INFO("Cov. matrix " << jpsiCandidate->covariance().size());
157
158 // refitted track parameters
159 TLorentzVector refTrk1 = track4Momentum(jpsiCandidate, 0, m_muonMass);
160 m_trkRefitPx1->push_back(refTrk1.Px());
161 m_trkRefitPy1->push_back(refTrk1.Py());
162 m_trkRefitPz1->push_back(refTrk1.Pz());
163
164 TLorentzVector refTrk2 = track4Momentum(jpsiCandidate, 1, m_muonMass);
165 m_trkRefitPx2->push_back(refTrk2.Px());
166 m_trkRefitPy2->push_back(refTrk2.Py());
167 m_trkRefitPz2->push_back(refTrk2.Pz());
168
169 //vertex position
170 m_vx->push_back(jpsiCandidate->x());
171 m_vy->push_back(jpsiCandidate->y());
172 m_vz->push_back(jpsiCandidate->z());
173
174 TLorentzVector origTrk1 = origTrack4Momentum(jpsiCandidate, 0, m_muonMass);
175 m_trkOrigCharge1->push_back(trackCharge(jpsiCandidate, 0));
176 m_trkOrigPx1->push_back(origTrk1.Px());
177 m_trkOrigPy1->push_back(origTrk1.Py());
178 m_trkOrigPz1->push_back(origTrk1.Pz());
179
180 TLorentzVector origTrk2 = origTrack4Momentum(jpsiCandidate, 1, m_muonMass);
181 m_trkOrigCharge2->push_back(trackCharge(jpsiCandidate, 1));
182 m_trkOrigPx2->push_back(origTrk2.Px());
183 m_trkOrigPy2->push_back(origTrk2.Py());
184 m_trkOrigPz2->push_back(origTrk2.Pz());
185
186 // Calculate the invariant masses and their errors
187 double orig_mass = (origTrk1+origTrk2).M(); // mass from original tracks
188 double mass = (refTrk1+refTrk2).M(); // mass from refitted tracks
189 double error = invariantMassError(jpsiCandidate, std::vector<double>(2, m_muonMass)); // invariant mass error
190
191 m_jpsiMass->push_back(mass);
192 m_jpsiMassError->push_back(error);
193 m_jpsiChi2->push_back(jpsiCandidate->chiSquared());
194 m_jpsiMassRec->push_back(orig_mass);
195 m_jpsiMassPullRec->push_back((mass-orig_mass)/error);
197
198 }
199
200 // Write all data to the nTuple
201 m_auxTree->Fill();
202
203 // END OF ANALYSIS
204 return StatusCode::SUCCESS;
205}
206
207// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
208
210
211 ATH_MSG_DEBUG("in finalize()");
212
213 std::cout << "===================" << std::endl;
214 std::cout << "SUMMARY OF ANALYSIS" << std::endl;
215 std::cout << "===================" << std::endl;
216 std::cout << " " << std::endl;
217 std::cout << "Total number of events analysed: " << m_eventCntr << std::endl;
218 std::cout << "Total number of jpsi candidates: " << m_jpsiCntr << std::endl;
219 // Save auxiliary n-tuple
220 m_outputFile->cd();
221 m_auxTree->Write();
222 m_auxTree->Print();
223 // Close file
224 m_outputFile->Close();
225 return StatusCode::SUCCESS;
226}
227
228// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
229
231
232 m_jpsiMass->clear();
233 m_jpsiMassError->clear();
234 m_jpsiMassRec->clear();
235 m_jpsiMassPullRec->clear();
236 m_jpsiMassPullMC->clear();
237 m_jpsiChi2->clear();
238
239// m_trkRefitCharge1->clear();
240 m_trkRefitPx1->clear();
241 m_trkRefitPy1->clear();
242 m_trkRefitPz1->clear();
243// m_trkRefitCharge2->clear();
244 m_trkRefitPx2->clear();
245 m_trkRefitPy2->clear();
246 m_trkRefitPz2->clear();
247
248 m_vx->clear();
249 m_vy->clear();
250 m_vz->clear();
251
252 m_trkOrigCharge1->clear();
253 m_trkOrigPx1->clear();
254 m_trkOrigPy1->clear();
255 m_trkOrigPz1->clear();
256 m_trkOrigCharge2->clear();
257 m_trkOrigPx2->clear();
258 m_trkOrigPy2->clear();
259 m_trkOrigPz2->clear();
260
261// m_rxyError->clear();
262
263 return;
264
265}
266
267// ************************************************************************************************
268// -------------------------------------------------------------------------------------------------
269// initializeBranches - initializes branches of auxilliary ntuple
270// -------------------------------------------------------------------------------------------------
271
273
274 m_jpsiMass = new std::vector<double>;
275 m_jpsiMassError = new std::vector<double>;
276 m_jpsiMassRec = new std::vector<double>;
277 m_jpsiMassPullRec = new std::vector<double>;
278 m_jpsiMassPullMC = new std::vector<double>;
279 m_jpsiChi2 = new std::vector<double>;
280
281// m_trkRefitCharge1 = new std::vector<double>;
282 m_trkRefitPx1 = new std::vector<double>;
283 m_trkRefitPy1 = new std::vector<double>;
284 m_trkRefitPz1 = new std::vector<double>;
285// m_trkRefitCharge2 = new std::vector<double>;
286 m_trkRefitPx2 = new std::vector<double>;
287 m_trkRefitPy2 = new std::vector<double>;
288 m_trkRefitPz2 = new std::vector<double>;
289
290 m_vx = new std::vector<double>;
291 m_vy = new std::vector<double>;
292 m_vz = new std::vector<double>;
293
294 m_trkOrigCharge1 = new std::vector<double>;
295 m_trkOrigPx1 = new std::vector<double>;
296 m_trkOrigPy1 = new std::vector<double>;
297 m_trkOrigPz1 = new std::vector<double>;
298 m_trkOrigCharge2 = new std::vector<double>;
299 m_trkOrigPx2 = new std::vector<double>;
300 m_trkOrigPy2 = new std::vector<double>;
301 m_trkOrigPz2 = new std::vector<double>;
302
303// m_rxyError = new std::vector<double>;
304
305 return;
306
307}
308
309// *********************************************************************************
310// ---------------------------------------------------------------------------------
311// trackMomentum: returns refitted track momentum
312// ---------------------------------------------------------------------------------
313
314TVector3 JpsiExample::trackMomentum(const xAOD::Vertex * vxCandidate, uint trkIndex) const
315{
316 float px = 0., py = 0., pz = 0.;
317// assert(vxCandidate!=0);
318// assert(i<vxCandidate->vxTrackAtVertex().size());
319
320// if (0 != vxCandidate) {
321// const Trk::TrackParameters* aPerigee = vxCandidate->vxTrackAtVertex()[trkIndex].perigeeAtVertex();
322// px = aPerigee->momentum()[Trk::px];
323// py = aPerigee->momentum()[Trk::py];
324// pz = aPerigee->momentum()[Trk::pz];
325// }
326
330
331 const std::vector<float>& refTrackPx = hx(*vxCandidate);
332 const std::vector<float>& refTrackPy = hy(*vxCandidate);
333 const std::vector<float>& refTrackPz = hz(*vxCandidate);
334
335 if(trkIndex < refTrackPx.size() && refTrackPx.size() == refTrackPy.size() && refTrackPz.size()) {
336 px = refTrackPx[trkIndex];
337 py = refTrackPy[trkIndex];
338 pz = refTrackPz[trkIndex];
339 }
340
341 TVector3 mom(px,py,pz);
342 return mom;
343}
344
345// ---------------------------------------------------------------------------------
346// track4Momentum: returns refitted track 4-momentum given mass hypothesis
347// ---------------------------------------------------------------------------------
348
349TLorentzVector JpsiExample::track4Momentum(const xAOD::Vertex * vxCandidate, int trkIndex, double mass) const
350{
351 TVector3 mom = trackMomentum(vxCandidate, trkIndex);
352 TLorentzVector lorentz;
353 lorentz.SetVectM(mom, mass);
354 return lorentz;
355}
356
357
358// ---------------------------------------------------------------------------------
359// origTrackMomentum: returns original track momentum
360// ---------------------------------------------------------------------------------
361
362TVector3 JpsiExample::origTrackMomentum(const xAOD::Vertex * vxCandidate, int trkIndex) const
363{
364 TVector3 mom;
365 const xAOD::TrackParticle* origTrack = vxCandidate->trackParticle(trkIndex);
366 if(origTrack==NULL) {
367 return mom;
368 }
369
370 mom.SetPtEtaPhi(origTrack->pt(), origTrack->eta(), origTrack->phi());
371 return mom;
372}
373
374// ---------------------------------------------------------------------------------
375// origTrack4Momentum: returns original track 4-momentum given mass hypothesis
376// ---------------------------------------------------------------------------------
377
378TLorentzVector JpsiExample::origTrack4Momentum(const xAOD::Vertex * vxCandidate, int trkIndex, double mass) const
379{
380 TVector3 mom = origTrackMomentum(vxCandidate, trkIndex);
381 TLorentzVector lorentz;
382 lorentz.SetVectM(mom, mass);
383 return lorentz;
384}
385
386// ---------------------------------------------------------------------------------
387// invariantMassError: returns invariant mass error
388// ---------------------------------------------------------------------------------
389
390double JpsiExample::invariantMassError(const xAOD::Vertex* vxCandidate, const std::vector<double> &masses) const
391{
392 uint NTrk = vxCandidate->vxTrackAtVertex().size();
393 if (masses.size() != NTrk) {
394 ATH_MSG_WARNING("The provided number of masses does not match the number of tracks in the vertex");
395 return -999999.;
396 }
397
398 uint ndim = vxCandidate->covariance().size();
399 uint ndimExp = (3*NTrk+3)*(3*NTrk+3+1)/2;
400 if (ndim == ndimExp) {
401 return massErrorVKalVrt(vxCandidate,masses);
402 } else {
403 ATH_MSG_WARNING("Unknown covariance matrix dimension: " << ndim << ", expected: " << ndimExp);
404 return -999999.;
405 }
406}
407
408// ---------------------------------------------------------------------------------
409// massErrorVKalVrt: returns invariant mass error for vertex created by VKalVrtFitter
410// ---------------------------------------------------------------------------------
411
412double JpsiExample::massErrorVKalVrt(const xAOD::Vertex * vxCandidate, const std::vector<double> &masses) const
413{
414 unsigned int NTrk = vxCandidate->vxTrackAtVertex().size();
415
416 // construct the full covariance matrix
417 Amg::MatrixX* fullCov = convertVKalCovMatrix(NTrk, vxCandidate->covariance());
418
419 std::vector<CLHEP::HepLorentzVector> particleMom(NTrk);
420 std::vector<CLHEP::HepMatrix> particleDeriv(NTrk);
421 CLHEP::HepLorentzVector totalMom;
422 CLHEP::HepMatrix tmpDeriv(3,3);
423
424 double phi=0.,theta=0.,invP=0.;
425 for( unsigned int it=0; it<NTrk; it++){
426 const Trk::TrackParameters* bPer = vxCandidate->vxTrackAtVertex()[it].perigeeAtVertex();
427 phi = bPer->parameters()[Trk::phi];
428 theta = bPer->parameters()[Trk::theta];
429 invP = bPer->parameters()[Trk::qOverP];
430 CLHEP::HepLorentzVector tmp( cos(phi)*sin(theta)/fabs(invP),
431 sin(phi)*sin(theta)/fabs(invP),
432 cos(theta)/fabs(invP) );
433 double esq = tmp.px()*tmp.px() + tmp.py()*tmp.py() + tmp.pz()*tmp.pz() + masses[it]*masses[it];
434 double e = (esq>0.) ? sqrt(esq) : 0.;
435 tmp.setE(e);
436 particleMom[it] = tmp;
437 totalMom += tmp;
438
439// d(Px,Py,Pz)/d(Phi,Theta,InvP)
440 tmpDeriv(1,1) = - tmp.py();
441 tmpDeriv(2,1) = tmp.px();
442 tmpDeriv(3,1) = 0.;
443 tmpDeriv(1,2) = cos(phi) * tmp.pz();
444 tmpDeriv(2,2) = sin(phi) * tmp.pz();
445 tmpDeriv(3,2) = - sin(theta)/fabs(invP);
446 tmpDeriv(1,3) = - tmp.px()/invP;
447 tmpDeriv(2,3) = - tmp.py()/invP;
448 tmpDeriv(3,3) = - tmp.pz()/invP;
449 particleDeriv[it] = tmpDeriv;
450 }
451
452 double dMdPx=0., dMdPy=0., dMdPz=0., dMdPhi=0., dMdTheta=0., dMdInvP=0.;
453 std::vector<double> Deriv(3*NTrk+3, 0.);
454 for(unsigned int it=0; it<NTrk; it++){
455 dMdPx = ( totalMom.e() * particleMom[it].px()/particleMom[it].e() - totalMom.px() ) / totalMom.m();
456 dMdPy = ( totalMom.e() * particleMom[it].py()/particleMom[it].e() - totalMom.py() ) / totalMom.m();
457 dMdPz = ( totalMom.e() * particleMom[it].pz()/particleMom[it].e() - totalMom.pz() ) / totalMom.m();
458
459 dMdPhi = dMdPx*particleDeriv[it](1,1) + dMdPy*particleDeriv[it](2,1) + dMdPz*particleDeriv[it](3,1);
460 dMdTheta = dMdPx*particleDeriv[it](1,2) + dMdPy*particleDeriv[it](2,2) + dMdPz*particleDeriv[it](3,2);
461 dMdInvP = dMdPx*particleDeriv[it](1,3) + dMdPy*particleDeriv[it](2,3) + dMdPz*particleDeriv[it](3,3);
462
463 Deriv[3*it + 3 + 0] = dMdPhi; Deriv[3*it + 3 + 1] = dMdTheta; Deriv[3*it + 3 + 2] = dMdInvP;
464 }
465
466 double err = 0;
467 for(unsigned int i=0; i<3*NTrk+3; i++){
468 for(unsigned int j=0; j<3*NTrk+3; j++){
469 err += Deriv[i]*( (*fullCov)(i,j))*Deriv[j];
470 }
471 }
472
473 // cleanup
474 delete fullCov;
475
476 return (err>0.) ? sqrt(err) : 0.;
477}
478
479// ---------------------------------------------------------------------------------
480// trackCharge: returns charge of the i-th track
481// ---------------------------------------------------------------------------------
482
483double JpsiExample::trackCharge(const xAOD::Vertex * vxCandidate, int i) const
484{
485 if(vxCandidate!=NULL && vxCandidate->trackParticle(i)!=NULL) {
486 return vxCandidate->trackParticle(i)->charge();
487 }
488
489 return -999999;
490}
491
492// ---------------------------------------------------------------------------------
493// convertVKalCovMatrix: converts xAOD covariance matrix (i.e. std::vector<float>)
494// into an actual matrix
495// ---------------------------------------------------------------------------------
496
497Amg::MatrixX * JpsiExample::convertVKalCovMatrix(int NTrk, const std::vector<float> & Matrix) const
498{
499 // stolen from VKalVrtFitter
500 Amg::MatrixX * mtx = new Amg::MatrixX(3+3*NTrk,3+3*NTrk);
501 long int ij=0;
502 for(int i=1; i<=(3+3*NTrk); i++){
503 for(int j=1; j<=i; j++){
504 if(i==j) {
505 (*mtx)(i-1,j-1)=Matrix[ij];
506 }else{
507 (*mtx).fillSymmetric(i-1,j-1,Matrix[ij]);
508 }
509 ij++;
510 }
511 }
512
513 return mtx;
514}
Scalar phi() const
phi method
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
unsigned int uint
A number of constexpr particle constants to avoid hardcoding them directly in various places.
Handle class for reading a decoration on an object.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
size_type size() const noexcept
Returns the number of elements in the collection.
std::vector< double > * m_trkOrigPz1
Definition JpsiExample.h:74
StatusCode finalize() override
StatusCode execute() override
double invariantMassError(const xAOD::Vertex *vxCandidate, const std::vector< double > &masses) const
Amg::MatrixX * convertVKalCovMatrix(int NTrk, const std::vector< float > &Matrix) const
TLorentzVector track4Momentum(const xAOD::Vertex *vxCandidate, int trkIndex, double mass) const
TVector3 trackMomentum(const xAOD::Vertex *vxCandidate, uint trkIndex) const
std::vector< double > * m_trkOrigCharge2
Definition JpsiExample.h:75
std::vector< double > * m_jpsiMassPullMC
Definition JpsiExample.h:55
std::vector< double > * m_trkRefitPx1
Definition JpsiExample.h:59
TLorentzVector origTrack4Momentum(const xAOD::Vertex *vxCandidate, int trkIndex, double mass) const
std::vector< double > * m_vx
Definition JpsiExample.h:67
std::vector< double > * m_jpsiMass
Definition JpsiExample.h:51
TTree * m_auxTree
Definition JpsiExample.h:84
std::string m_userFName
Definition JpsiExample.h:46
std::vector< double > * m_jpsiChi2
Definition JpsiExample.h:56
std::vector< double > * m_vy
Definition JpsiExample.h:68
StatusCode initialize() override
std::vector< double > * m_trkOrigPx1
Definition JpsiExample.h:72
std::vector< double > * m_trkOrigCharge1
Definition JpsiExample.h:71
std::vector< double > * m_jpsiMassPullRec
Definition JpsiExample.h:54
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_refPY
Definition JpsiExample.h:88
SG::ReadHandleKey< xAOD::VertexContainer > m_JpsiCandidatesKey
Name of J/psi container.
Definition JpsiExample.h:86
double trackCharge(const xAOD::Vertex *vxCandidate, int i) const
std::vector< double > * m_trkOrigPy2
Definition JpsiExample.h:77
std::vector< double > * m_trkRefitPz1
Definition JpsiExample.h:61
std::vector< double > * m_trkOrigPy1
Definition JpsiExample.h:73
std::vector< double > * m_trkRefitPx2
Definition JpsiExample.h:63
TVector3 origTrackMomentum(const xAOD::Vertex *vxCandidate, int trkIndex) const
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_refPX
Definition JpsiExample.h:87
std::vector< double > * m_trkOrigPz2
Definition JpsiExample.h:78
void initializeBranches(void)
std::vector< double > * m_trkOrigPx2
Definition JpsiExample.h:76
std::vector< double > * m_trkRefitPy2
Definition JpsiExample.h:64
std::vector< double > * m_vz
Definition JpsiExample.h:69
std::vector< double > * m_trkRefitPz2
Definition JpsiExample.h:65
JpsiExample(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< double > * m_jpsiMassError
Definition JpsiExample.h:52
std::vector< double > * m_trkRefitPy1
Definition JpsiExample.h:60
void clearBranches(void)
double m_muonMass
Definition JpsiExample.h:45
double massErrorVKalVrt(const xAOD::Vertex *vxCandidate, const std::vector< double > &masses) const
std::vector< double > * m_jpsiMassRec
Definition JpsiExample.h:53
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_refPZ
Definition JpsiExample.h:89
TFile * m_outputFile
Definition JpsiExample.h:83
Handle class for reading a decoration on an object.
const_pointer_type cptr()
Dereference the pointer.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
float charge() const
Returns the charge.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
const std::vector< float > & covariance() const
Returns the covariance matrix as a simple vector of values.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
@ theta
Definition ParamDefs.h:66
@ qOverP
perigee
Definition ParamDefs.h:67
@ phi
Definition ParamDefs.h:75
ParametersBase< TrackParametersDim, Charged > TrackParameters
TrackParticle_v1 TrackParticle
Reference the current persistent version:
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.