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 > &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 > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &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 28 of file JpsiExample.cxx.

28  :
29  AthAlgorithm(name, pSvcLocator),
30  m_muonMass(105.66)
31 {
32 
33  // Declare user-defined properties - cuts and vertexing method
34  declareProperty("muonMass" , m_muonMass);
35  declareProperty("outputNTupleName", m_userFName);
36  declareProperty("JpsiCandidates" ,m_JpsiCandidatesKey = "JpsiCandidates");
37 
38  declareProperty("RefTrackPx", m_refPX);
39  declareProperty("RefTrackPy", m_refPY);
40  declareProperty("RefTrackPz", m_refPZ);
41 
42  // Global Counters; for truth statistics
43  m_eventCntr = 0;
44  m_jpsiCntr = 0;
45 
46  m_jpsiMass = 0;
47  m_jpsiMassError = 0;
48  m_jpsiMassRec = 0;
50  m_jpsiMassPullMC = 0;
51  m_jpsiChi2 = 0;
52 
53  m_trkRefitPx1 = 0;
54  m_trkRefitPy1 = 0;
55  m_trkRefitPz1 = 0;
56  m_trkRefitPx2 = 0;
57  m_trkRefitPy2 = 0;
58  m_trkRefitPz2 = 0;
59 
60  m_vx = 0;
61  m_vy = 0;
62  m_vz = 0;
63 
64  m_trkOrigCharge1 = 0;
65  m_trkOrigPx1 = 0;
66  m_trkOrigPy1 = 0;
67  m_trkOrigPz1 = 0;
68  m_trkOrigCharge2 = 0;
69  m_trkOrigPx2 = 0;
70  m_trkOrigPy2 = 0;
71  m_trkOrigPz2 = 0;
72 
73  m_outputFile = 0;
74  m_auxTree = 0;
75 }

Member Function Documentation

◆ clearBranches()

void JpsiExample::clearBranches ( void  )
private

Definition at line 229 of file JpsiExample.cxx.

229  {
230 
231  m_jpsiMass->clear();
232  m_jpsiMassError->clear();
233  m_jpsiMassRec->clear();
234  m_jpsiMassPullRec->clear();
235  m_jpsiMassPullMC->clear();
236  m_jpsiChi2->clear();
237 
238 // m_trkRefitCharge1->clear();
239  m_trkRefitPx1->clear();
240  m_trkRefitPy1->clear();
241  m_trkRefitPz1->clear();
242 // m_trkRefitCharge2->clear();
243  m_trkRefitPx2->clear();
244  m_trkRefitPy2->clear();
245  m_trkRefitPz2->clear();
246 
247  m_vx->clear();
248  m_vy->clear();
249  m_vz->clear();
250 
251  m_trkOrigCharge1->clear();
252  m_trkOrigPx1->clear();
253  m_trkOrigPy1->clear();
254  m_trkOrigPz1->clear();
255  m_trkOrigCharge2->clear();
256  m_trkOrigPx2->clear();
257  m_trkOrigPy2->clear();
258  m_trkOrigPz2->clear();
259 
260 // m_rxyError->clear();
261 
262  return;
263 
264 }

◆ convertVKalCovMatrix()

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

Definition at line 496 of file JpsiExample.cxx.

497 {
498  // stolen from VKalVrtFitter
499  Amg::MatrixX * mtx = new Amg::MatrixX(3+3*NTrk,3+3*NTrk);
500  long int ij=0;
501  for(int i=1; i<=(3+3*NTrk); i++){
502  for(int j=1; j<=i; j++){
503  if(i==j) {
504  (*mtx)(i-1,j-1)=Matrix[ij];
505  }else{
506  (*mtx).fillSymmetric(i-1,j-1,Matrix[ij]);
507  }
508  ij++;
509  }
510  }
511 
512  return mtx;
513 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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 > &  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 > &  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 > &  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 > &  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 127 of file JpsiExample.cxx.

127  {
128 
129 
130  ATH_MSG_DEBUG("in execute()");
131 
132  // Read in the Jpsis from StoreGate
133  const xAOD::VertexContainer* jpsiContainer(0);
135  jpsiContainer = handle.cptr();
136 
137  if (!jpsiContainer) {
138  ATH_MSG_ERROR("No Jpsi Container Found, skipping event");
139  return StatusCode::RECOVERABLE;
140  } else {
141  ATH_MSG_DEBUG("Obtained jpsiContainer");
142  }
143  ATH_MSG_DEBUG("number of jpsi candidates " << jpsiContainer->size());
144  m_jpsiCntr += jpsiContainer->size(); // Count the Jpsis
145 
146 
147  // Set the auxilliary branches of the ntuple to zero
148  // to avoid accumulation
149  clearBranches();
150 
151  ++m_eventCntr; // Increment event counter
152 
153  // Extract information from the Jpsi candidates
154  for (const xAOD::Vertex* jpsiCandidate : *jpsiContainer) {
155  //ATH_MSG_INFO("Cov. matrix " << jpsiCandidate->covariance().size());
156 
157  // refitted track parameters
158  TLorentzVector refTrk1 = track4Momentum(jpsiCandidate, 0, m_muonMass);
159  m_trkRefitPx1->push_back(refTrk1.Px());
160  m_trkRefitPy1->push_back(refTrk1.Py());
161  m_trkRefitPz1->push_back(refTrk1.Pz());
162 
163  TLorentzVector refTrk2 = track4Momentum(jpsiCandidate, 1, m_muonMass);
164  m_trkRefitPx2->push_back(refTrk2.Px());
165  m_trkRefitPy2->push_back(refTrk2.Py());
166  m_trkRefitPz2->push_back(refTrk2.Pz());
167 
168  //vertex position
169  m_vx->push_back(jpsiCandidate->x());
170  m_vy->push_back(jpsiCandidate->y());
171  m_vz->push_back(jpsiCandidate->z());
172 
173  TLorentzVector origTrk1 = origTrack4Momentum(jpsiCandidate, 0, m_muonMass);
174  m_trkOrigCharge1->push_back(trackCharge(jpsiCandidate, 0));
175  m_trkOrigPx1->push_back(origTrk1.Px());
176  m_trkOrigPy1->push_back(origTrk1.Py());
177  m_trkOrigPz1->push_back(origTrk1.Pz());
178 
179  TLorentzVector origTrk2 = origTrack4Momentum(jpsiCandidate, 1, m_muonMass);
180  m_trkOrigCharge2->push_back(trackCharge(jpsiCandidate, 1));
181  m_trkOrigPx2->push_back(origTrk2.Px());
182  m_trkOrigPy2->push_back(origTrk2.Py());
183  m_trkOrigPz2->push_back(origTrk2.Pz());
184 
185  // Calculate the invariant masses and their errors
186  double orig_mass = (origTrk1+origTrk2).M(); // mass from original tracks
187  double mass = (refTrk1+refTrk2).M(); // mass from refitted tracks
188  double error = invariantMassError(jpsiCandidate, std::vector<double>(2, m_muonMass)); // invariant mass error
189 
190  m_jpsiMass->push_back(mass);
191  m_jpsiMassError->push_back(error);
192  m_jpsiChi2->push_back(jpsiCandidate->chiSquared());
193  m_jpsiMassRec->push_back(orig_mass);
194  m_jpsiMassPullRec->push_back((mass-orig_mass)/error);
195  m_jpsiMassPullMC->push_back((mass-3096.88)/error);
196 
197  }
198 
199  // Write all data to the nTuple
200  m_auxTree->Fill();
201 
202  // END OF ANALYSIS
203  return StatusCode::SUCCESS;
204 }

◆ 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 208 of file JpsiExample.cxx.

208  {
209 
210  ATH_MSG_DEBUG("in finalize()");
211 
212  std::cout << "===================" << std::endl;
213  std::cout << "SUMMARY OF ANALYSIS" << std::endl;
214  std::cout << "===================" << std::endl;
215  std::cout << " " << std::endl;
216  std::cout << "Total number of events analysed: " << m_eventCntr << std::endl;
217  std::cout << "Total number of jpsi candidates: " << m_jpsiCntr << std::endl;
218  // Save auxiliary n-tuple
219  m_outputFile->cd();
220  m_auxTree->Write();
221  m_auxTree->Print();
222  // Close file
223  m_outputFile->Close();
224  return StatusCode::SUCCESS;
225 }

◆ initialize()

StatusCode JpsiExample::initialize ( )
override

Definition at line 79 of file JpsiExample.cxx.

79  {
80 
81 
82  ATH_MSG_DEBUG("in initialize()");
83 
84  // Open n-tuple file
85  m_outputFile = new TFile(m_userFName.c_str(),"recreate");
86  // Auxiliary n-tuples not covered by the automatic n-tuple makers
87  // Decay angles
88  initializeBranches(); //
89  m_auxTree = new TTree("AUX","AUX");
90  m_auxTree->Branch("jpsiMass", &m_jpsiMass);
91  m_auxTree->Branch("jpsiMassError", &m_jpsiMassError);
92  m_auxTree->Branch("jpsiMassRec", &m_jpsiMassRec);
93  m_auxTree->Branch("jpsiMassPullRec", &m_jpsiMassPullRec);
94  m_auxTree->Branch("jpsiMassPullMC", &m_jpsiMassPullMC);
95  m_auxTree->Branch("jpsiChi2", &m_jpsiChi2);
96 
97 // m_auxTree->Branch("trkRefitCharge1", &m_trkRefitCharge1);
98  m_auxTree->Branch("trkRefitPx1", &m_trkRefitPx1);
99  m_auxTree->Branch("trkRefitPy1", &m_trkRefitPy1);
100  m_auxTree->Branch("trkRefitPz1", &m_trkRefitPz1);
101 // m_auxTree->Branch("trkRefitCharge2", &m_trkRefitCharge2);
102  m_auxTree->Branch("trkRefitPx2", &m_trkRefitPx2);
103  m_auxTree->Branch("trkRefitPy2", &m_trkRefitPy2);
104  m_auxTree->Branch("trkRefitPz2", &m_trkRefitPz2);
105 
106  m_auxTree->Branch("vx",m_vx);
107  m_auxTree->Branch("vy",m_vy);
108  m_auxTree->Branch("vz",m_vz);
109 
110  m_auxTree->Branch("trkOrigCharge1", &m_trkOrigCharge1);
111  m_auxTree->Branch("trkOrigPx1", &m_trkOrigPx1);
112  m_auxTree->Branch("trkOrigPy1", &m_trkOrigPy1);
113  m_auxTree->Branch("trkOrigPz1", &m_trkOrigPz1);
114  m_auxTree->Branch("trkOrigCharge2", &m_trkOrigCharge2);
115  m_auxTree->Branch("trkOrigPx2", &m_trkOrigPx2);
116  m_auxTree->Branch("trkOrigPy2", &m_trkOrigPy2);
117  m_auxTree->Branch("trkOrigPz2", &m_trkOrigPz2);
118 
119 // m_auxTree->Branch("rxyError", &m_rxyError);
120  ATH_CHECK(m_JpsiCandidatesKey.initialize());
121  return StatusCode::SUCCESS;
122 
123 }

◆ initializeBranches()

void JpsiExample::initializeBranches ( void  )
private

Definition at line 271 of file JpsiExample.cxx.

271  {
272 
273  m_jpsiMass = new std::vector<double>;
274  m_jpsiMassError = new std::vector<double>;
275  m_jpsiMassRec = new std::vector<double>;
276  m_jpsiMassPullRec = new std::vector<double>;
277  m_jpsiMassPullMC = new std::vector<double>;
278  m_jpsiChi2 = new std::vector<double>;
279 
280 // m_trkRefitCharge1 = new std::vector<double>;
281  m_trkRefitPx1 = new std::vector<double>;
282  m_trkRefitPy1 = new std::vector<double>;
283  m_trkRefitPz1 = new std::vector<double>;
284 // m_trkRefitCharge2 = new std::vector<double>;
285  m_trkRefitPx2 = new std::vector<double>;
286  m_trkRefitPy2 = new std::vector<double>;
287  m_trkRefitPz2 = new std::vector<double>;
288 
289  m_vx = new std::vector<double>;
290  m_vy = new std::vector<double>;
291  m_vz = new std::vector<double>;
292 
293  m_trkOrigCharge1 = new std::vector<double>;
294  m_trkOrigPx1 = new std::vector<double>;
295  m_trkOrigPy1 = new std::vector<double>;
296  m_trkOrigPz1 = new std::vector<double>;
297  m_trkOrigCharge2 = new std::vector<double>;
298  m_trkOrigPx2 = new std::vector<double>;
299  m_trkOrigPy2 = new std::vector<double>;
300  m_trkOrigPz2 = new std::vector<double>;
301 
302 // m_rxyError = new std::vector<double>;
303 
304  return;
305 
306 }

◆ 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 389 of file JpsiExample.cxx.

390 {
391  uint NTrk = vxCandidate->vxTrackAtVertex().size();
392  if (masses.size() != NTrk) {
393  ATH_MSG_WARNING("The provided number of masses does not match the number of tracks in the vertex");
394  return -999999.;
395  }
396 
397  uint ndim = vxCandidate->covariance().size();
398  uint ndimExp = (3*NTrk+3)*(3*NTrk+3+1)/2;
399  if (ndim == ndimExp) {
400  return massErrorVKalVrt(vxCandidate,masses);
401  } else {
402  ATH_MSG_WARNING("Unknown covariance matrix dimension: " << ndim << ", expected: " << ndimExp);
403  return -999999.;
404  }
405 }

◆ massErrorVKalVrt()

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

Definition at line 411 of file JpsiExample.cxx.

412 {
413  unsigned int NTrk = vxCandidate->vxTrackAtVertex().size();
414 
415  // construct the full covariance matrix
416  Amg::MatrixX* fullCov = convertVKalCovMatrix(NTrk, vxCandidate->covariance());
417 
418  std::vector<CLHEP::HepLorentzVector> particleMom(NTrk);
419  std::vector<CLHEP::HepMatrix> particleDeriv(NTrk);
420  CLHEP::HepLorentzVector totalMom;
421  CLHEP::HepMatrix tmpDeriv(3,3);
422 
423  double phi=0.,theta=0.,invP=0.;
424  for( unsigned int it=0; it<NTrk; it++){
425  const Trk::TrackParameters* bPer = vxCandidate->vxTrackAtVertex()[it].perigeeAtVertex();
426  phi = bPer->parameters()[Trk::phi];
427  theta = bPer->parameters()[Trk::theta];
428  invP = bPer->parameters()[Trk::qOverP];
429  CLHEP::HepLorentzVector tmp( cos(phi)*sin(theta)/fabs(invP),
430  sin(phi)*sin(theta)/fabs(invP),
431  cos(theta)/fabs(invP) );
432  double esq = tmp.px()*tmp.px() + tmp.py()*tmp.py() + tmp.pz()*tmp.pz() + masses[it]*masses[it];
433  double e = (esq>0.) ? sqrt(esq) : 0.;
434  tmp.setE(e);
435  particleMom[it] = tmp;
436  totalMom += tmp;
437 
438 // d(Px,Py,Pz)/d(Phi,Theta,InvP)
439  tmpDeriv(1,1) = - tmp.py();
440  tmpDeriv(2,1) = tmp.px();
441  tmpDeriv(3,1) = 0.;
442  tmpDeriv(1,2) = cos(phi) * tmp.pz();
443  tmpDeriv(2,2) = sin(phi) * tmp.pz();
444  tmpDeriv(3,2) = - sin(theta)/fabs(invP);
445  tmpDeriv(1,3) = - tmp.px()/invP;
446  tmpDeriv(2,3) = - tmp.py()/invP;
447  tmpDeriv(3,3) = - tmp.pz()/invP;
448  particleDeriv[it] = tmpDeriv;
449  }
450 
451  double dMdPx=0., dMdPy=0., dMdPz=0., dMdPhi=0., dMdTheta=0., dMdInvP=0.;
452  std::vector<double> Deriv(3*NTrk+3, 0.);
453  for(unsigned int it=0; it<NTrk; it++){
454  dMdPx = ( totalMom.e() * particleMom[it].px()/particleMom[it].e() - totalMom.px() ) / totalMom.m();
455  dMdPy = ( totalMom.e() * particleMom[it].py()/particleMom[it].e() - totalMom.py() ) / totalMom.m();
456  dMdPz = ( totalMom.e() * particleMom[it].pz()/particleMom[it].e() - totalMom.pz() ) / totalMom.m();
457 
458  dMdPhi = dMdPx*particleDeriv[it](1,1) + dMdPy*particleDeriv[it](2,1) + dMdPz*particleDeriv[it](3,1);
459  dMdTheta = dMdPx*particleDeriv[it](1,2) + dMdPy*particleDeriv[it](2,2) + dMdPz*particleDeriv[it](3,2);
460  dMdInvP = dMdPx*particleDeriv[it](1,3) + dMdPy*particleDeriv[it](2,3) + dMdPz*particleDeriv[it](3,3);
461 
462  Deriv[3*it + 3 + 0] = dMdPhi; Deriv[3*it + 3 + 1] = dMdTheta; Deriv[3*it + 3 + 2] = dMdInvP;
463  }
464 
465  double err = 0;
466  for(unsigned int i=0; i<3*NTrk+3; i++){
467  for(unsigned int j=0; j<3*NTrk+3; j++){
468  err += Deriv[i]*( (*fullCov)(i,j))*Deriv[j];
469  }
470  }
471 
472  // cleanup
473  delete fullCov;
474 
475  return (err>0.) ? sqrt(err) : 0.;
476 }

◆ 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 377 of file JpsiExample.cxx.

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

◆ origTrackMomentum()

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

Definition at line 361 of file JpsiExample.cxx.

362 {
363  TVector3 mom;
364  const xAOD::TrackParticle* origTrack = vxCandidate->trackParticle(trkIndex);
365  if(origTrack==NULL) {
366  return mom;
367  }
368 
369  mom.SetPtEtaPhi(origTrack->pt(), origTrack->eta(), origTrack->phi());
370  return mom;
371 }

◆ 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 348 of file JpsiExample.cxx.

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

◆ trackCharge()

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

Definition at line 482 of file JpsiExample.cxx.

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

◆ trackMomentum()

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

Definition at line 313 of file JpsiExample.cxx.

314 {
315  float px = 0., py = 0., pz = 0.;
316 // assert(vxCandidate!=0);
317 // assert(i<vxCandidate->vxTrackAtVertex().size());
318 
319 // if (0 != vxCandidate) {
320 // const Trk::TrackParameters* aPerigee = vxCandidate->vxTrackAtVertex()[trkIndex].perigeeAtVertex();
321 // px = aPerigee->momentum()[Trk::px];
322 // py = aPerigee->momentum()[Trk::py];
323 // pz = aPerigee->momentum()[Trk::pz];
324 // }
325 
329 
330  const std::vector<float>& refTrackPx = hx(*vxCandidate);
331  const std::vector<float>& refTrackPy = hy(*vxCandidate);
332  const std::vector<float>& refTrackPz = hz(*vxCandidate);
333 
334  if(trkIndex < refTrackPx.size() && refTrackPx.size() == refTrackPy.size() && refTrackPz.size()) {
335  px = refTrackPx[trkIndex];
336  py = refTrackPy[trkIndex];
337  pz = refTrackPz[trkIndex];
338  }
339 
340  TVector3 mom(px,py,pz);
341  return mom;
342 }

◆ 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:73
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:482
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:377
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:150
JpsiExample::m_trkOrigPy1
std::vector< double > * m_trkOrigPy1
Definition: JpsiExample.h:73
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
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:396
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:389
JpsiExample::origTrackMomentum
TVector3 origTrackMomentum(const xAOD::Vertex *vxCandidate, int trkIndex) const
Definition: JpsiExample.cxx:361
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
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:210
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:182
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
JpsiExample::convertVKalCovMatrix
Amg::MatrixX * convertVKalCovMatrix(int NTrk, const std::vector< float > &Matrix) const
Definition: JpsiExample.cxx:496
JpsiExample::initializeBranches
void initializeBranches(void)
Definition: JpsiExample.cxx:271
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:348
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
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:228
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:229
JpsiExample::massErrorVKalVrt
double massErrorVKalVrt(const xAOD::Vertex *vxCandidate, const std::vector< double > &masses) const
Definition: JpsiExample.cxx:411
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:623
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:798
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
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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:313
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