ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
JpsiExample Class Reference

#include <JpsiExample.h>

Inheritance diagram for JpsiExample:
Collaboration diagram for JpsiExample:

Public Member Functions

 JpsiExample (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize () override
 
StatusCode execute () override
 
StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void initializeBranches (void)
 
void clearBranches (void)
 
TVector3 trackMomentum (const xAOD::Vertex *vxCandidate, uint trkIndex) const
 
TLorentzVector track4Momentum (const xAOD::Vertex *vxCandidate, int trkIndex, double mass) const
 
TVector3 origTrackMomentum (const xAOD::Vertex *vxCandidate, int trkIndex) const
 
TLorentzVector origTrack4Momentum (const xAOD::Vertex *vxCandidate, int trkIndex, double mass) const
 
double invariantMassError (const xAOD::Vertex *vxCandidate, const std::vector< double > &masses) const
 
double massErrorVKalVrt (const xAOD::Vertex *vxCandidate, const std::vector< double > &masses) const
 
double trackCharge (const xAOD::Vertex *vxCandidate, int i) const
 
Amg::MatrixXconvertVKalCovMatrix (int NTrk, const std::vector< float > &Matrix) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

double m_muonMass
 
std::string m_userFName
 
int m_eventCntr
 
int m_jpsiCntr
 
std::vector< double > * m_jpsiMass
 
std::vector< double > * m_jpsiMassError
 
std::vector< double > * m_jpsiMassRec
 
std::vector< double > * m_jpsiMassPullRec
 
std::vector< double > * m_jpsiMassPullMC
 
std::vector< double > * m_jpsiChi2
 
std::vector< double > * m_trkRefitPx1
 
std::vector< double > * m_trkRefitPy1
 
std::vector< double > * m_trkRefitPz1
 
std::vector< double > * m_trkRefitPx2
 
std::vector< double > * m_trkRefitPy2
 
std::vector< double > * m_trkRefitPz2
 
std::vector< double > * m_vx
 
std::vector< double > * m_vy
 
std::vector< double > * m_vz
 
std::vector< double > * m_trkOrigCharge1
 
std::vector< double > * m_trkOrigPx1
 
std::vector< double > * m_trkOrigPy1
 
std::vector< double > * m_trkOrigPz1
 
std::vector< double > * m_trkOrigCharge2
 
std::vector< double > * m_trkOrigPx2
 
std::vector< double > * m_trkOrigPy2
 
std::vector< double > * m_trkOrigPz2
 
TFile * m_outputFile
 
TTree * m_auxTree
 
SG::ReadHandleKey< xAOD::VertexContainerm_JpsiCandidatesKey
 Name of J/psi container. More...
 
SG::ReadDecorHandleKey< xAOD::VertexContainerm_refPX
 
SG::ReadDecorHandleKey< xAOD::VertexContainerm_refPY
 
SG::ReadDecorHandleKey< xAOD::VertexContainerm_refPZ
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 22 of file JpsiExample.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JpsiExample()

JpsiExample::JpsiExample ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 29 of file JpsiExample.cxx.

29  :
30  AthAlgorithm(name, pSvcLocator),
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;
48  m_jpsiMassError = 0;
49  m_jpsiMassRec = 0;
51  m_jpsiMassPullMC = 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 
65  m_trkOrigCharge1 = 0;
66  m_trkOrigPx1 = 0;
67  m_trkOrigPy1 = 0;
68  m_trkOrigPz1 = 0;
69  m_trkOrigCharge2 = 0;
70  m_trkOrigPx2 = 0;
71  m_trkOrigPy2 = 0;
72  m_trkOrigPz2 = 0;
73 
74  m_outputFile = 0;
75  m_auxTree = 0;
76 }

Member Function Documentation

◆ clearBranches()

void JpsiExample::clearBranches ( void  )
private

Definition at line 230 of file JpsiExample.cxx.

230  {
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 }

◆ convertVKalCovMatrix()

Amg::MatrixX * JpsiExample::convertVKalCovMatrix ( int  NTrk,
const std::vector< float > &  Matrix 
) const
private

Definition at line 497 of file JpsiExample.cxx.

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 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode JpsiExample::execute ( )
override

Definition at line 128 of file JpsiExample.cxx.

128  {
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
150  clearBranches();
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 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode JpsiExample::finalize ( )
override

Definition at line 209 of file JpsiExample.cxx.

209  {
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 }

◆ initialize()

StatusCode JpsiExample::initialize ( )
override

Definition at line 80 of file JpsiExample.cxx.

80  {
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
89  initializeBranches(); //
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 }

◆ initializeBranches()

void JpsiExample::initializeBranches ( void  )
private

Definition at line 272 of file JpsiExample.cxx.

272  {
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 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ invariantMassError()

double JpsiExample::invariantMassError ( const xAOD::Vertex vxCandidate,
const std::vector< double > &  masses 
) const
private

Definition at line 390 of file JpsiExample.cxx.

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 }

◆ massErrorVKalVrt()

double JpsiExample::massErrorVKalVrt ( const xAOD::Vertex vxCandidate,
const std::vector< double > &  masses 
) const
private

Definition at line 412 of file JpsiExample.cxx.

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 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ origTrack4Momentum()

TLorentzVector JpsiExample::origTrack4Momentum ( const xAOD::Vertex vxCandidate,
int  trkIndex,
double  mass 
) const
private

Definition at line 378 of file JpsiExample.cxx.

379 {
380  TVector3 mom = origTrackMomentum(vxCandidate, trkIndex);
381  TLorentzVector lorentz;
382  lorentz.SetVectM(mom, mass);
383  return lorentz;
384 }

◆ origTrackMomentum()

TVector3 JpsiExample::origTrackMomentum ( const xAOD::Vertex vxCandidate,
int  trkIndex 
) const
private

Definition at line 362 of file JpsiExample.cxx.

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 }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ track4Momentum()

TLorentzVector JpsiExample::track4Momentum ( const xAOD::Vertex vxCandidate,
int  trkIndex,
double  mass 
) const
private

Definition at line 349 of file JpsiExample.cxx.

350 {
351  TVector3 mom = trackMomentum(vxCandidate, trkIndex);
352  TLorentzVector lorentz;
353  lorentz.SetVectM(mom, mass);
354  return lorentz;
355 }

◆ trackCharge()

double JpsiExample::trackCharge ( const xAOD::Vertex vxCandidate,
int  i 
) const
private

Definition at line 483 of file JpsiExample.cxx.

484 {
485  if(vxCandidate!=NULL && vxCandidate->trackParticle(i)!=NULL) {
486  return vxCandidate->trackParticle(i)->charge();
487  }
488 
489  return -999999;
490 }

◆ trackMomentum()

TVector3 JpsiExample::trackMomentum ( const xAOD::Vertex vxCandidate,
uint  trkIndex 
) const
private

Definition at line 314 of file JpsiExample.cxx.

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 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_auxTree

TTree* JpsiExample::m_auxTree
private

Definition at line 84 of file JpsiExample.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_eventCntr

int JpsiExample::m_eventCntr
private

Definition at line 48 of file JpsiExample.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_JpsiCandidatesKey

SG::ReadHandleKey<xAOD::VertexContainer> JpsiExample::m_JpsiCandidatesKey
private

Name of J/psi container.

Definition at line 86 of file JpsiExample.h.

◆ m_jpsiChi2

std::vector<double>* JpsiExample::m_jpsiChi2
private

Definition at line 56 of file JpsiExample.h.

◆ m_jpsiCntr

int JpsiExample::m_jpsiCntr
private

Definition at line 49 of file JpsiExample.h.

◆ m_jpsiMass

std::vector<double>* JpsiExample::m_jpsiMass
private

Definition at line 51 of file JpsiExample.h.

◆ m_jpsiMassError

std::vector<double>* JpsiExample::m_jpsiMassError
private

Definition at line 52 of file JpsiExample.h.

◆ m_jpsiMassPullMC

std::vector<double>* JpsiExample::m_jpsiMassPullMC
private

Definition at line 55 of file JpsiExample.h.

◆ m_jpsiMassPullRec

std::vector<double>* JpsiExample::m_jpsiMassPullRec
private

Definition at line 54 of file JpsiExample.h.

◆ m_jpsiMassRec

std::vector<double>* JpsiExample::m_jpsiMassRec
private

Definition at line 53 of file JpsiExample.h.

◆ m_muonMass

double JpsiExample::m_muonMass
private

Definition at line 45 of file JpsiExample.h.

◆ m_outputFile

TFile* JpsiExample::m_outputFile
private

Definition at line 83 of file JpsiExample.h.

◆ m_refPX

SG::ReadDecorHandleKey<xAOD::VertexContainer> JpsiExample::m_refPX
private

Definition at line 87 of file JpsiExample.h.

◆ m_refPY

SG::ReadDecorHandleKey<xAOD::VertexContainer> JpsiExample::m_refPY
private

Definition at line 88 of file JpsiExample.h.

◆ m_refPZ

SG::ReadDecorHandleKey<xAOD::VertexContainer> JpsiExample::m_refPZ
private

Definition at line 89 of file JpsiExample.h.

◆ m_trkOrigCharge1

std::vector<double>* JpsiExample::m_trkOrigCharge1
private

Definition at line 71 of file JpsiExample.h.

◆ m_trkOrigCharge2

std::vector<double>* JpsiExample::m_trkOrigCharge2
private

Definition at line 75 of file JpsiExample.h.

◆ m_trkOrigPx1

std::vector<double>* JpsiExample::m_trkOrigPx1
private

Definition at line 72 of file JpsiExample.h.

◆ m_trkOrigPx2

std::vector<double>* JpsiExample::m_trkOrigPx2
private

Definition at line 76 of file JpsiExample.h.

◆ m_trkOrigPy1

std::vector<double>* JpsiExample::m_trkOrigPy1
private

Definition at line 73 of file JpsiExample.h.

◆ m_trkOrigPy2

std::vector<double>* JpsiExample::m_trkOrigPy2
private

Definition at line 77 of file JpsiExample.h.

◆ m_trkOrigPz1

std::vector<double>* JpsiExample::m_trkOrigPz1
private

Definition at line 74 of file JpsiExample.h.

◆ m_trkOrigPz2

std::vector<double>* JpsiExample::m_trkOrigPz2
private

Definition at line 78 of file JpsiExample.h.

◆ m_trkRefitPx1

std::vector<double>* JpsiExample::m_trkRefitPx1
private

Definition at line 59 of file JpsiExample.h.

◆ m_trkRefitPx2

std::vector<double>* JpsiExample::m_trkRefitPx2
private

Definition at line 63 of file JpsiExample.h.

◆ m_trkRefitPy1

std::vector<double>* JpsiExample::m_trkRefitPy1
private

Definition at line 60 of file JpsiExample.h.

◆ m_trkRefitPy2

std::vector<double>* JpsiExample::m_trkRefitPy2
private

Definition at line 64 of file JpsiExample.h.

◆ m_trkRefitPz1

std::vector<double>* JpsiExample::m_trkRefitPz1
private

Definition at line 61 of file JpsiExample.h.

◆ m_trkRefitPz2

std::vector<double>* JpsiExample::m_trkRefitPz2
private

Definition at line 65 of file JpsiExample.h.

◆ m_userFName

std::string JpsiExample::m_userFName
private

Definition at line 46 of file JpsiExample.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vx

std::vector<double>* JpsiExample::m_vx
private

Definition at line 67 of file JpsiExample.h.

◆ m_vy

std::vector<double>* JpsiExample::m_vy
private

Definition at line 68 of file JpsiExample.h.

◆ m_vz

std::vector<double>* JpsiExample::m_vz
private

Definition at line 69 of file JpsiExample.h.


The documentation for this class was generated from the following files:
Matrix
Definition: Trigger/TrigT1/TrigT1RPChardware/TrigT1RPChardware/Matrix.h:15
JpsiExample::m_trkOrigPz2
std::vector< double > * m_trkOrigPz2
Definition: JpsiExample.h:78
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:74
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
JpsiExample::m_trkRefitPy2
std::vector< double > * m_trkRefitPy2
Definition: JpsiExample.h:64
JpsiExample::m_trkOrigPy2
std::vector< double > * m_trkOrigPy2
Definition: JpsiExample.h:77
JpsiExample::m_vz
std::vector< double > * m_vz
Definition: JpsiExample.h:69
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
test_pyathena.px
px
Definition: test_pyathena.py:18
JpsiExample::m_eventCntr
int m_eventCntr
Definition: JpsiExample.h:48
JpsiExample::trackCharge
double trackCharge(const xAOD::Vertex *vxCandidate, int i) const
Definition: JpsiExample.cxx:483
JpsiExample::m_vy
std::vector< double > * m_vy
Definition: JpsiExample.h:68
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
JpsiExample::m_refPX
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_refPX
Definition: JpsiExample.h:87
JpsiExample::origTrack4Momentum
TLorentzVector origTrack4Momentum(const xAOD::Vertex *vxCandidate, int trkIndex, double mass) const
Definition: JpsiExample.cxx:378
JpsiExample::m_trkRefitPz2
std::vector< double > * m_trkRefitPz2
Definition: JpsiExample.h:65
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
JpsiExample::m_jpsiMassError
std::vector< double > * m_jpsiMassError
Definition: JpsiExample.h:52
xAOD::TrackParticle_v1::charge
float charge() const
Returns the charge.
Definition: TrackParticle_v1.cxx:151
JpsiExample::m_trkOrigPy1
std::vector< double > * m_trkOrigPy1
Definition: JpsiExample.h:73
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:78
ParticleConstants::PDG2011::muonMassInMeV
constexpr double muonMassInMeV
the mass of the muon (in MeV)
Definition: ParticleConstants.h:29
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
JpsiExample::m_userFName
std::string m_userFName
Definition: JpsiExample.h:46
JpsiExample::m_refPY
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_refPY
Definition: JpsiExample.h:88
skel.it
it
Definition: skel.GENtoEVGEN.py:407
JpsiExample::m_trkOrigCharge1
std::vector< double > * m_trkOrigCharge1
Definition: JpsiExample.h:71
JpsiExample::m_trkRefitPy1
std::vector< double > * m_trkRefitPy1
Definition: JpsiExample.h:60
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
JpsiExample::m_muonMass
double m_muonMass
Definition: JpsiExample.h:45
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
JpsiExample::m_trkOrigPx2
std::vector< double > * m_trkOrigPx2
Definition: JpsiExample.h:76
JpsiExample::m_jpsiMassRec
std::vector< double > * m_jpsiMassRec
Definition: JpsiExample.h:53
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
JpsiExample::invariantMassError
double invariantMassError(const xAOD::Vertex *vxCandidate, const std::vector< double > &masses) const
Definition: JpsiExample.cxx:390
JpsiExample::origTrackMomentum
TVector3 origTrackMomentum(const xAOD::Vertex *vxCandidate, int trkIndex) const
Definition: JpsiExample.cxx:362
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
fitman.hy
def hy
Definition: fitman.py:515
JpsiExample::m_outputFile
TFile * m_outputFile
Definition: JpsiExample.h:83
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:183
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::theta
@ theta
Definition: ParamDefs.h:66
JpsiExample::m_trkRefitPx1
std::vector< double > * m_trkRefitPx1
Definition: JpsiExample.h:59
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
JpsiExample::convertVKalCovMatrix
Amg::MatrixX * convertVKalCovMatrix(int NTrk, const std::vector< float > &Matrix) const
Definition: JpsiExample.cxx:497
JpsiExample::initializeBranches
void initializeBranches(void)
Definition: JpsiExample.cxx:272
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
JpsiExample::m_trkRefitPz1
std::vector< double > * m_trkRefitPz1
Definition: JpsiExample.h:61
JpsiExample::track4Momentum
TLorentzVector track4Momentum(const xAOD::Vertex *vxCandidate, int trkIndex, double mass) const
Definition: JpsiExample.cxx:349
xAOD::Vertex_v1::trackParticle
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Definition: Vertex_v1.cxx:249
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
JpsiExample::m_jpsiMass
std::vector< double > * m_jpsiMass
Definition: JpsiExample.h:51
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
JpsiExample::m_auxTree
TTree * m_auxTree
Definition: JpsiExample.h:84
ParticleConstants::PDG2011::JpsiMassInMeV
constexpr double JpsiMassInMeV
Definition: ParticleConstants.h:56
Amg::py
@ py
Definition: GeoPrimitives.h:39
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
JpsiExample::m_jpsiCntr
int m_jpsiCntr
Definition: JpsiExample.h:49
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
JpsiExample::m_trkOrigPz1
std::vector< double > * m_trkOrigPz1
Definition: JpsiExample.h:74
JpsiExample::m_jpsiChi2
std::vector< double > * m_jpsiChi2
Definition: JpsiExample.h:56
JpsiExample::m_trkOrigCharge2
std::vector< double > * m_trkOrigCharge2
Definition: JpsiExample.h:75
JpsiExample::m_jpsiMassPullMC
std::vector< double > * m_jpsiMassPullMC
Definition: JpsiExample.h:55
JpsiExample::clearBranches
void clearBranches(void)
Definition: JpsiExample.cxx:230
JpsiExample::massErrorVKalVrt
double massErrorVKalVrt(const xAOD::Vertex *vxCandidate, const std::vector< double > &masses) const
Definition: JpsiExample.cxx:412
xAOD::Vertex_v1::covariance
const std::vector< float > & covariance() const
Returns the covariance matrix as a simple vector of values.
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
JpsiExample::m_vx
std::vector< double > * m_vx
Definition: JpsiExample.h:67
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
JpsiExample::m_trkOrigPx1
std::vector< double > * m_trkOrigPx1
Definition: JpsiExample.h:72
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
fitman.hx
def hx
Definition: fitman.py:514
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
JpsiExample::m_JpsiCandidatesKey
SG::ReadHandleKey< xAOD::VertexContainer > m_JpsiCandidatesKey
Name of J/psi container.
Definition: JpsiExample.h:86
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
Trk::phi
@ phi
Definition: ParamDefs.h:75
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
fitman.hz
def hz
Definition: fitman.py:516
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
xAOD::Vertex_v1::vxTrackAtVertex
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
Definition: Vertex_v1.cxx:181
error
Definition: IImpactPoint3dEstimator.h:70
JpsiExample::m_jpsiMassPullRec
std::vector< double > * m_jpsiMassPullRec
Definition: JpsiExample.h:54
JpsiExample::m_refPZ
SG::ReadDecorHandleKey< xAOD::VertexContainer > m_refPZ
Definition: JpsiExample.h:89
JpsiExample::trackMomentum
TVector3 trackMomentum(const xAOD::Vertex *vxCandidate, uint trkIndex) const
Definition: JpsiExample.cxx:314
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
fitman.k
k
Definition: fitman.py:528
SUSY_SimplifiedModel_PreInclude.masses
dictionary masses
Definition: SUSY_SimplifiedModel_PreInclude.py:7
ServiceHandle< ICondSvc >
JpsiExample::m_trkRefitPx2
std::vector< double > * m_trkRefitPx2
Definition: JpsiExample.h:63