ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Analysis::JpsiPlus1Track Class Reference

#include <JpsiPlus1Track.h>

Inheritance diagram for Analysis::JpsiPlus1Track:
Collaboration diagram for Analysis::JpsiPlus1Track:

Public Member Functions

 JpsiPlus1Track (const std::string &t, const std::string &n, const IInterface *p)
 
 ~JpsiPlus1Track ()
 
virtual StatusCode initialize () override
 
virtual StatusCode performSearch (const EventContext &ctx, xAOD::VertexContainer &) const override
 
xAOD::Vertexfit (const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *, const xAOD::TrackParticleContainer *) const
 
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 sysInitialize () override
 Perform system initialization for an algorithm. 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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 
static double getInvariantMass (const std::vector< const xAOD::TrackParticle * > &trk, double mass1, double mass2, double mass3)
 

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

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

bool m_piMassHyp
 
bool m_kMassHyp
 
double m_trkThresholdPt
 
double m_trkMaxEta
 
double m_BThresholdPt
 
double m_BMassUpper
 
double m_BMassLower
 
SG::ReadHandleKey< xAOD::VertexContainerm_jpsiCollectionKey
 
double m_jpsiMassUpper
 
double m_jpsiMassLower
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_TrkParticleCollection
 
SG::ReadHandleKey< xAOD::MuonContainerm_MuonsUsedInJpsi
 
bool m_excludeJpsiMuonsOnly
 
bool m_excludeCrossJpsiTracks
 
ToolHandle< Trk::IVertexFitterm_iVertexFitter
 
ToolHandle< Trk::ITrackSelectorToolm_trkSelector
 
Trk::TrkVKalVrtFitterm_VKVFitter
 
bool m_useMassConst
 
double m_altMassConst
 
double m_chi2cut
 
double m_trkTrippletMassUpper
 
double m_trkTrippletMassLower
 
double m_trkTrippletPt
 
double m_trkDeltaZ
 
int m_requiredNMuons =0
 
int m_requiredNElectrons =0
 
std::vector< double > m_muonMasses
 
std::vector< int > m_useGSFTrackIndices
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_TrkParticleGSFCollection
 
std::bitset< 3 > m_useGSFTrack
 
SG::ReadHandleKey< xAOD::ElectronContainerm_electronCollectionKey
 
bool m_skipNoElectron = false
 
size_t m_candidateLimit
 
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 40 of file JpsiPlus1Track.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JpsiPlus1Track()

Analysis::JpsiPlus1Track::JpsiPlus1Track ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 72 of file JpsiPlus1Track.cxx.

72  : AthAlgTool(t,n,p),
73  m_piMassHyp(false),
74  m_kMassHyp(true),
75  m_trkThresholdPt(0.0),
76  m_trkMaxEta(102.5),
77  m_BThresholdPt(0.0),
78  m_BMassUpper(0.0),
79  m_BMassLower(0.0),
80  m_jpsiCollectionKey("JpsiCandidates"),
81  m_jpsiMassUpper(0.0),
82  m_jpsiMassLower(0.0),
83  m_TrkParticleCollection("TrackParticleCandidate"),
87  m_iVertexFitter("Trk::TrkVKalVrtFitter"),
88  m_trkSelector("InDet::TrackSelectorTool"),
89  m_useMassConst(true),
90  m_altMassConst(-1.0),
91  m_chi2cut(-1.0),
94  m_trkTrippletPt(-1.0),
95  m_trkDeltaZ(-1.0),
99  {
100  declareInterface<JpsiPlus1Track>(this);
101  declareProperty("pionHypothesis",m_piMassHyp);
102  declareProperty("kaonHypothesis",m_kMassHyp);
103  declareProperty("trkThresholdPt",m_trkThresholdPt);
104  declareProperty("trkMaxEta",m_trkMaxEta);
105  declareProperty("BThresholdPt",m_BThresholdPt);
106  declareProperty("BMassUpper",m_BMassUpper);
107  declareProperty("BMassLower",m_BMassLower);
108  declareProperty("JpsiContainerKey",m_jpsiCollectionKey);
109  declareProperty("JpsiMassUpper",m_jpsiMassUpper);
110  declareProperty("JpsiMassLower",m_jpsiMassLower);
111  declareProperty("TrackParticleCollection",m_TrkParticleCollection);
112  declareProperty("MuonsUsedInJpsi",m_MuonsUsedInJpsi);
113  declareProperty("ExcludeJpsiMuonsOnly",m_excludeJpsiMuonsOnly);
114  declareProperty("ExcludeCrossJpsiTracks",m_excludeCrossJpsiTracks); //Essential when trying to make vertices out of multiple muons (set to false)
115  declareProperty("TrkVertexFitterTool",m_iVertexFitter);
116  declareProperty("TrackSelectorTool", m_trkSelector);
117  declareProperty("UseMassConstraint", m_useMassConst);
118  declareProperty("AlternativeMassConstraint",m_altMassConst);
119 
120  // additional cuts by Daniel Scheirich copied from 2Tracks by Adam Barton
121  declareProperty("Chi2Cut",m_chi2cut);
122  declareProperty("TrkTrippletMassUpper" ,m_trkTrippletMassUpper);
123  declareProperty("TrkTrippletMassLower" ,m_trkTrippletMassLower);
124  declareProperty("TrkQuadrupletPt" ,m_trkTrippletPt );
125  declareProperty("TrkDeltaZ" ,m_trkDeltaZ );
126  declareProperty("RequireNMuonTracks" ,m_requiredNMuons );
127  declareProperty("RequireNElectronTracks", m_requiredNElectrons );
128  declareProperty("AlternativeMassConstraintTrack", m_muonMasses );
129  declareProperty("UseGSFTrackIndices", m_useGSFTrackIndices );
131  declareProperty("ElectronCollection", m_electronCollectionKey);
132  declareProperty("SkipNoElectron", m_skipNoElectron);
133  declareProperty("CandidateLimit", m_candidateLimit);
134  }

◆ ~JpsiPlus1Track()

Analysis::JpsiPlus1Track::~JpsiPlus1Track ( )

Definition at line 136 of file JpsiPlus1Track.cxx.

136 {}

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ fit()

xAOD::Vertex * Analysis::JpsiPlus1Track::fit ( const std::vector< const xAOD::TrackParticle * > &  inputTracks,
const xAOD::TrackParticleContainer importedTrackCollection,
const xAOD::TrackParticleContainer gsfCollection 
) const

Definition at line 428 of file JpsiPlus1Track.cxx.

428  {
429 
430  std::unique_ptr<Trk::IVKalState> state = m_VKVFitter->makeState();
431 
432  // Set the mass constraint if requested by user (default=true)
433  // Can be set by user (m_altMassConstraint) - default is -1.0.
434  // If < 0.0, uses J/psi (default)
435  // If > 0.0, uses the value provided
436  constexpr double jpsiTableMass = 3096.916;
437 
438  if (m_useMassConst) {
440  std::array<int,2> indices = {1, 2};
441  if (m_altMassConst<0.0) m_VKVFitter->setMassForConstraint(jpsiTableMass,indices, *state);
443  }
444 
445  // Do the fit itself.......
446  Amg::Vector3D startingPoint(0,0,0);
447  StatusCode sc=m_VKVFitter->VKalVrtFitFast(inputTracks, startingPoint, *state);
448  if(sc.isFailure()){
449  startingPoint = Amg::Vector3D(0,0,0);
450  }
451  xAOD::Vertex* theResult = m_VKVFitter->fit(inputTracks, startingPoint, *state);
452 
453  // Added by ASC
454  if(theResult != 0){
455  std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > newLinkVector;
456  for(unsigned int i=0; i< theResult->trackParticleLinks().size(); i++)
457  {
458  ElementLink<DataVector<xAOD::TrackParticle> > mylink=theResult->trackParticleLinks()[i]; //makes a copy (non-const)
459  mylink.setStorableObject( m_useGSFTrack[i] ? *gsfCollection : *importedTrackCollection, true);
460  newLinkVector.push_back( mylink );
461  }
462  theResult->clearTracks();
463  theResult->setTrackParticleLinks( newLinkVector );
464  }
465 
466 
467  return theResult;
468 
469  }

◆ getInvariantMass()

double Analysis::JpsiPlus1Track::getInvariantMass ( const std::vector< const xAOD::TrackParticle * > &  trk,
double  mass1,
double  mass2,
double  mass3 
)
static

Definition at line 473 of file JpsiPlus1Track.cxx.

475  {
476  const auto trk1V = trk[0]->p4();
477  double px1 = trk1V.Px();
478  double py1 = trk1V.Py();
479  double pz1 = trk1V.Pz();
480  double e1 = sqrt(px1*px1+py1*py1+pz1*pz1+mass1*mass1);
481 
482  const auto trk2V = trk[1]->p4();
483  double px2 = trk2V.Px();
484  double py2 = trk2V.Py();
485  double pz2 = trk2V.Pz();
486  double e2 = sqrt(px2*px2+py2*py2+pz2*pz2+mass2*mass2);
487 
488  const auto trk3V = trk[2]->p4();
489  double px3 = trk3V.Px();
490  double py3 = trk3V.Py();
491  double pz3 = trk3V.Pz();
492  double e3 = sqrt(px3*px3+py3*py3+pz3*pz3+mass3*mass3);
493 
494 
495  double pxSum=px1+px2+px3;
496  double pySum=py1+py2+py3;
497  double pzSum=pz1+pz2+pz3;
498  double eSum=e1+e2+e3;
499 
500  double M=sqrt((eSum*eSum)-(pxSum*pxSum)-(pySum*pySum)-(pzSum*pzSum));
501 
502  return M;
503 
504  }

◆ initialize()

StatusCode Analysis::JpsiPlus1Track::initialize ( )
overridevirtual

Definition at line 37 of file JpsiPlus1Track.cxx.

37  {
38 
39  // retrieving vertex Fitter
40  ATH_CHECK(m_iVertexFitter.retrieve());
41  m_VKVFitter = dynamic_cast<Trk::TrkVKalVrtFitter*>(&(*m_iVertexFitter));
42 
43  // Get the track selector tool from ToolSvc
44  ATH_CHECK( m_trkSelector.retrieve());
45 
46  // Get the vertex point estimator tool from ToolSvc
47  ATH_CHECK(m_jpsiCollectionKey.initialize());
49  if(m_MuonsUsedInJpsi.key() == "NONE") m_MuonsUsedInJpsi = "";//for backwards compatability
50  ATH_CHECK(m_MuonsUsedInJpsi.initialize(!m_MuonsUsedInJpsi.key().empty()));
53 
55  ATH_MSG_FATAL("Invalid configuration");
56  return StatusCode::FAILURE;
57  }
58 
59  if(m_muonMasses.empty()){
60  m_muonMasses.assign(2, muMass);
61  }
62 
63  m_useGSFTrack.reset();
64  for(int i : m_useGSFTrackIndices) m_useGSFTrack.set(i, true);
65  ATH_MSG_DEBUG("Initialize successful");
66 
67  return StatusCode::SUCCESS;
68 
69  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ interfaceID()

static const InterfaceID& Analysis::JpsiPlus1Track::interfaceID ( )
inlinestatic

Definition at line 47 of file JpsiPlus1Track.h.

47 { return IID_JpsiPlus1Track;};

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::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< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ performSearch()

StatusCode Analysis::JpsiPlus1Track::performSearch ( const EventContext &  ctx,
xAOD::VertexContainer bContainer 
) const
overridevirtual

Implements Analysis::ICandidateSearch.

Definition at line 141 of file JpsiPlus1Track.cxx.

142  {
143  ATH_MSG_DEBUG( "JpsiPlus1Track::performSearch" );
144 
145  // Get the J/psis from StoreGate
146  const xAOD::VertexContainer* importedJpsiCollection(0);
148  if(!jpsiCollectionhandle.isValid()){
149  ATH_MSG_ERROR("No VertexContainer with key " << m_jpsiCollectionKey.key() << " found in StoreGate. BCandidates will be EMPTY!");
150  return StatusCode::FAILURE;
151  }else{
152  importedJpsiCollection = jpsiCollectionhandle.cptr();
153  ATH_MSG_DEBUG("Found VxCandidate container with key "<<m_jpsiCollectionKey.key());
154  }
155  ATH_MSG_DEBUG("VxCandidate container size " << importedJpsiCollection->size());
156 
157  // Get tracks
158  const xAOD::TrackParticleContainer* importedTrackCollection{nullptr};
160  if(!TrkParticleHandle.isValid()){
161  ATH_MSG_ERROR("No track particle collection with name " << m_TrkParticleCollection << " found in StoreGate!");
162  return StatusCode::FAILURE;
163  } else {
164  importedTrackCollection = TrkParticleHandle.cptr();
165  ATH_MSG_DEBUG("Found track particle collection " << m_TrkParticleCollection << " in StoreGate!");
166  }
167  ATH_MSG_DEBUG("Track container size "<< importedTrackCollection->size());
168 
169  const xAOD::TrackParticleContainer* importedGSFTrackCollection(nullptr);
170  if(m_useGSFTrack.any() && !m_TrkParticleGSFCollection.key().empty()){
172  ATH_CHECK(h.isValid());
173  importedGSFTrackCollection = h.cptr();
174  }
175 
176 
177  // Get the muon collection used to build the J/psis
178  const xAOD::MuonContainer* importedMuonCollection(0);
179  if (!m_MuonsUsedInJpsi.key().empty()) {
181  if (!h.isValid()){
182  ATH_MSG_ERROR("No muon collection with name " << m_MuonsUsedInJpsi.key() << " found in StoreGate!");
183  return StatusCode::FAILURE;
184  } else {
185  importedMuonCollection = h.cptr();
186  ATH_MSG_DEBUG("Found muon collection " << m_MuonsUsedInJpsi.key() << " in StoreGate!");
187  }
188  ATH_MSG_DEBUG("Muon container size "<< importedMuonCollection->size());
189  }
190 
191  // Get the electrons from StoreGate
192  const xAOD::ElectronContainer* importedElectronCollection = nullptr;
195  if (!h.isValid()){
196  ATH_MSG_ERROR("No Electron collection with name " << m_electronCollectionKey.key() << " found in StoreGate!");
197  return StatusCode::FAILURE;
198  } else {
199  importedElectronCollection = h.cptr();
200  ATH_MSG_DEBUG("Found Electron collection " << m_electronCollectionKey.key() << " in StoreGate!");
201  }
202  ATH_MSG_DEBUG("Electron container size "<< importedElectronCollection->size());
203  }
204 
205 
206  // Typedef for vectors of tracks and VxCandidates
207  typedef std::vector<const xAOD::TrackParticle*> TrackBag;
208  typedef std::vector<const xAOD::Electron*> ElectronBag;
209 
210  // Select the inner detector tracks
211  const xAOD::Vertex* vx = nullptr;
212  TrackBag theIDTracksAfterSelection;
213  for (auto trkPBItr=importedTrackCollection->cbegin(); trkPBItr!=importedTrackCollection->cend(); ++trkPBItr) {
214  const xAOD::TrackParticle* tp (*trkPBItr);
215  if ( tp->pt()<m_trkThresholdPt ) continue;
216  if ( fabs(tp->eta())>m_trkMaxEta ) continue;
217  if (importedMuonCollection!=NULL && !m_excludeJpsiMuonsOnly) {
218  if (JpsiUpsilonCommon::isContainedIn(tp,importedMuonCollection)) continue;
219  }
220  if ( m_trkSelector->decision(*tp, vx) ) theIDTracksAfterSelection.push_back(tp);
221  }
222 
223  // Add GSF tracks
224  if(m_useGSFTrack.any()){
225  ATH_MSG_DEBUG("importedTrackCollection contains GSF tracks " << importedGSFTrackCollection->size());
226  for (auto trkPBItr=importedGSFTrackCollection->cbegin(); trkPBItr!=importedGSFTrackCollection->cend(); ++trkPBItr) {
227  const xAOD::TrackParticle* tp (*trkPBItr);
228  if ( tp->pt()<m_trkThresholdPt ) continue;
229  if ( fabs(tp->eta())>m_trkMaxEta ) continue;
230  if (!importedMuonCollection->empty() && !m_excludeJpsiMuonsOnly) {
231  if (JpsiUpsilonCommon::isContainedIn(tp,importedMuonCollection)) continue;
232  }
233  if (m_trkSelector->decision(*tp, vx)) theIDTracksAfterSelection.push_back(tp);
234  }
235  }
236  if (theIDTracksAfterSelection.empty()) return StatusCode::SUCCESS;
237  ATH_MSG_DEBUG("Number of tracks after ID trkSelector: " << theIDTracksAfterSelection.size());
238 
239  // Loop over J/psi candidates, select, collect up tracks used to build a J/psi
240  std::vector<const xAOD::Vertex*> selectedJpsiCandidates;
241  std::vector<const xAOD::TrackParticle*> jpsiTracks;
242  for(auto vxcItr=importedJpsiCollection->cbegin(); vxcItr!=importedJpsiCollection->cend(); ++vxcItr) {
243  // Check J/psi candidate invariant mass and skip if need be
244  if (m_jpsiMassUpper>0.0 || m_jpsiMassLower >0.0) {
245  xAOD::BPhysHelper jpsiCandidate(*vxcItr);
246  double jpsiMass = jpsiCandidate.totalP(m_muonMasses).M();
248  if (!pass) continue;
249  }
250  selectedJpsiCandidates.push_back(*vxcItr);
251 
252  // Collect up tracks
254  // Extract tracks from J/psi
255  const xAOD::TrackParticle* jpsiTP1 = (*vxcItr)->trackParticle(0);
256  const xAOD::TrackParticle* jpsiTP2 = (*vxcItr)->trackParticle(1);
257  jpsiTracks.push_back(jpsiTP1);
258  jpsiTracks.push_back(jpsiTP2);
259  }
260  }
261 
262 
263  std::vector<double> massHypotheses;
264  if (m_kMassHyp) massHypotheses.push_back(kMass);
265  if (m_piMassHyp) massHypotheses.push_back(piMass);
266  if (!m_kMassHyp && !m_piMassHyp && m_BMassUpper>0.0) {
267  massHypotheses.push_back(kMass); massHypotheses.push_back(piMass);
268  }
269  std::vector<double> tripletMasses(m_muonMasses);
270  // Attempt to fit each track with the two tracks from the J/psi candidates
271  // Loop over J/psis
272 
273  std::vector<double> massCuts;
274 
275  TrackBag muonTracks;
276  if (importedMuonCollection && m_excludeJpsiMuonsOnly) {
277  for(auto muon : *importedMuonCollection){
278  if(!muon->inDetTrackParticleLink().isValid()) continue;
279  auto track = muon->trackParticle( xAOD::Muon::InnerDetectorTrackParticle );
280  if(track==nullptr) continue;
281  if(!JpsiUpsilonCommon::isContainedIn(track, theIDTracksAfterSelection)) continue;
282  muonTracks.push_back(track);
283  }
284  }
285 
286  TrackBag electronTracks;
287  ElectronBag theElectronsAfterSelection;
288  if (importedElectronCollection && !importedElectronCollection->empty()) {
289  for(auto electron : *importedElectronCollection) {
290  if (!electron->trackParticleLink().isValid()) continue; // No electrons without ID tracks
291  const xAOD::TrackParticle* elTrk(0);
292  elTrk = electron->trackParticleLink().cachedElement();
293  if (!elTrk) continue;
294  theElectronsAfterSelection.push_back(electron);
295  electronTracks.push_back(elTrk);
296  }
297  if (m_skipNoElectron && theElectronsAfterSelection.size() == 0) return StatusCode::SUCCESS;
298  ATH_MSG_DEBUG("Number of electrons after selection: " << theElectronsAfterSelection.size());
299  }
300 
301  std::vector<const xAOD::TrackParticle*> tracks(3, nullptr);
302 
303  for(auto jpsiItr=selectedJpsiCandidates.cbegin(); jpsiItr!=selectedJpsiCandidates.cend(); ++jpsiItr) {
304 
305  // Extract tracks from J/psi
306 
307  const xAOD::TrackParticle* jpsiTP1 = tracks[0] = (*jpsiItr)->trackParticle(0);
308  const xAOD::TrackParticle* jpsiTP2 = tracks[1] = (*jpsiItr)->trackParticle(1);
309 
310  //If requested, only exclude duplicates in the same triplet
312  jpsiTracks.resize(2);
313  jpsiTracks[0] = jpsiTP1;
314  jpsiTracks[1] = jpsiTP2;
315  }
316 
317  // Loop over ID tracks, call vertexing
318  for (auto trkItr=theIDTracksAfterSelection.cbegin(); trkItr!=theIDTracksAfterSelection.cend(); ++trkItr) {
319  if(bContainer.size() >= m_candidateLimit ){
320  ATH_MSG_WARNING("Hard Limit exceeded N=" << bContainer.size());
321  return StatusCode::SUCCESS;
322  }
323  if (!m_excludeJpsiMuonsOnly && JpsiUpsilonCommon::isContainedIn(*trkItr,jpsiTracks)) continue; // remove tracks which were used to build J/psi
324  int linkedMuonTrk = 0;
326  linkedMuonTrk = JpsiUpsilonCommon::isContainedIn(*trkItr, muonTracks);
327  if (linkedMuonTrk) ATH_MSG_DEBUG("This id track is a muon track!");
328  if (JpsiUpsilonCommon::isContainedIn(*trkItr,jpsiTracks)) {
329  if (linkedMuonTrk) ATH_MSG_DEBUG("ID track removed: id track is slected to build Jpsi!");
330  continue;
331 
332  }
333  }
335  int linkedElectronTrk = 0;
336  linkedElectronTrk = JpsiUpsilonCommon::isContainedIn(*trkItr, electronTracks);
337  if (linkedElectronTrk) ATH_MSG_DEBUG("This id track is an electron track!");
338  if (JpsiUpsilonCommon::isContainedIn(*trkItr,jpsiTracks)) {
339  if (linkedElectronTrk) ATH_MSG_DEBUG("ID track removed: id track is selected to build Jpsi!");
340  continue;
341  }
342  if (linkedElectronTrk < m_requiredNElectrons) {
343  ATH_MSG_DEBUG("Skipping Tracks with Electron " << linkedElectronTrk << " Limited to " << m_requiredNElectrons);
344  continue;
345  }
346  }
347 
348  // Convert to TrackParticleBase
349  const xAOD::TrackParticle* theThirdTP = tracks[2] = *trkItr;
350 
351  if (m_trkTrippletPt>0 && JpsiUpsilonCommon::getPt(jpsiTP1, jpsiTP2, theThirdTP) < m_trkTrippletPt ) continue; // track tripplet pT cut (daniel Scheirich)
352  if(m_trkDeltaZ>0 &&
353  fabs(theThirdTP->z0() + theThirdTP->vz() - (*jpsiItr)->z()) > m_trkDeltaZ )
354  continue;
355  if (linkedMuonTrk < m_requiredNMuons) {
356  ATH_MSG_DEBUG("Skipping Tracks with Muons " << linkedMuonTrk << " Limited to " << m_requiredNMuons);
357  continue;
358  }
359 
360  // apply mass cut on track tripplet if requested
361  bool passRoughMassCuts(true);
362 
364  massCuts.clear();
365  if(m_kMassHyp) massCuts.push_back(getInvariantMass(tracks, m_muonMasses[0], m_muonMasses[1], kMass));
366  if(m_piMassHyp) massCuts.push_back(getInvariantMass(tracks, m_muonMasses[0], m_muonMasses[1], piMass));
368  }
369  if (!passRoughMassCuts) continue;
370 
371 
372  //Managed pointer, "release" if you don't want it deleted. Automatically "deleted" otherwise
373  std::unique_ptr<xAOD::Vertex> bVertex( fit(tracks, importedTrackCollection, importedGSFTrackCollection));
374  if (bVertex) {
375 
376  // Chi2/DOF cut
377  double bChi2DOF = bVertex->chiSquared()/bVertex->numberDoF();
378  ATH_MSG_DEBUG("Candidate chi2/DOF is " << bChi2DOF);
379 
380  bool chi2CutPassed = (m_chi2cut <= 0.0 || bChi2DOF < m_chi2cut);
381  if(!chi2CutPassed) { ATH_MSG_DEBUG("Chi Cut failed!"); continue; }
382 
383  // create the helper class
384  xAOD::BPhysHelper bHelper(bVertex.get());
385  // setRefTrks needs to be called after BPhysHelper is created if you want to access refitted track parameters
386  bHelper.setRefTrks();
387  // Decide whether to keep the candidate
388  bool masspTpassed = true;
389  if (m_BMassUpper>0.0 || m_BThresholdPt >0.0 || m_BMassLower > 0.0) {
390  masspTpassed = false;
391  for (double masshypo3rd : massHypotheses) {
392  tripletMasses.push_back(masshypo3rd); //Add third mass
393  TLorentzVector bMomentum = bHelper.totalP(tripletMasses);//Calulcate result
394  tripletMasses.pop_back(); //Remove 3rd mass - now same as beginning
395  double bpt = bMomentum.Pt();
396  bool PtPassed = m_BThresholdPt <= 0.0 || (bpt >= m_BThresholdPt);
397  double bMass = bMomentum.M();
398  ATH_MSG_DEBUG("candidate pt/mass under track mass hypothesis of " << masshypo3rd << " is " << bpt << " / " << bMass);
399  bool masscut = JpsiUpsilonCommon::cutRange(bMass, m_BMassLower, m_BMassUpper); //( bMass >= m_BMassLower && bMass <= m_BMassUpper );
400  if(masscut && PtPassed) { masspTpassed = true; break; }
401  }
402  }
403  if (masspTpassed) {
404  // Set links to J/psi
405  std::vector<const xAOD::Vertex*> theJpsiPreceding;
406  theJpsiPreceding.push_back(*jpsiItr);
407  bHelper.setPrecedingVertices(theJpsiPreceding, importedJpsiCollection);
408  bContainer.push_back(bVertex.release());
409  } else {
410  ATH_MSG_DEBUG("Cuts failed!");
411  }
412  } else {ATH_MSG_DEBUG("Fitter failed!");}
413 
414  } // End of loop over tracks
415 
416  } // End of loop over J/psis
417  ATH_MSG_DEBUG("bContainer size " << bContainer.size());
418  return StatusCode::SUCCESS;
419 
420  }

◆ 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< AlgTool > >::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< AlgTool > >::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()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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_altMassConst

double Analysis::JpsiPlus1Track::m_altMassConst
private

Definition at line 78 of file JpsiPlus1Track.h.

◆ m_BMassLower

double Analysis::JpsiPlus1Track::m_BMassLower
private

Definition at line 66 of file JpsiPlus1Track.h.

◆ m_BMassUpper

double Analysis::JpsiPlus1Track::m_BMassUpper
private

Definition at line 65 of file JpsiPlus1Track.h.

◆ m_BThresholdPt

double Analysis::JpsiPlus1Track::m_BThresholdPt
private

Definition at line 64 of file JpsiPlus1Track.h.

◆ m_candidateLimit

size_t Analysis::JpsiPlus1Track::m_candidateLimit
private

Definition at line 92 of file JpsiPlus1Track.h.

◆ m_chi2cut

double Analysis::JpsiPlus1Track::m_chi2cut
private

Definition at line 79 of file JpsiPlus1Track.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_electronCollectionKey

SG::ReadHandleKey<xAOD::ElectronContainer> Analysis::JpsiPlus1Track::m_electronCollectionKey
private

Definition at line 90 of file JpsiPlus1Track.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_excludeCrossJpsiTracks

bool Analysis::JpsiPlus1Track::m_excludeCrossJpsiTracks
private

Definition at line 73 of file JpsiPlus1Track.h.

◆ m_excludeJpsiMuonsOnly

bool Analysis::JpsiPlus1Track::m_excludeJpsiMuonsOnly
private

Definition at line 72 of file JpsiPlus1Track.h.

◆ m_iVertexFitter

ToolHandle< Trk::IVertexFitter > Analysis::JpsiPlus1Track::m_iVertexFitter
private

Definition at line 74 of file JpsiPlus1Track.h.

◆ m_jpsiCollectionKey

SG::ReadHandleKey<xAOD::VertexContainer> Analysis::JpsiPlus1Track::m_jpsiCollectionKey
private

Definition at line 67 of file JpsiPlus1Track.h.

◆ m_jpsiMassLower

double Analysis::JpsiPlus1Track::m_jpsiMassLower
private

Definition at line 69 of file JpsiPlus1Track.h.

◆ m_jpsiMassUpper

double Analysis::JpsiPlus1Track::m_jpsiMassUpper
private

Definition at line 68 of file JpsiPlus1Track.h.

◆ m_kMassHyp

bool Analysis::JpsiPlus1Track::m_kMassHyp
private

Definition at line 61 of file JpsiPlus1Track.h.

◆ m_muonMasses

std::vector<double> Analysis::JpsiPlus1Track::m_muonMasses
private

Definition at line 86 of file JpsiPlus1Track.h.

◆ m_MuonsUsedInJpsi

SG::ReadHandleKey<xAOD::MuonContainer> Analysis::JpsiPlus1Track::m_MuonsUsedInJpsi
private

Definition at line 71 of file JpsiPlus1Track.h.

◆ m_piMassHyp

bool Analysis::JpsiPlus1Track::m_piMassHyp
private

Definition at line 60 of file JpsiPlus1Track.h.

◆ m_requiredNElectrons

int Analysis::JpsiPlus1Track::m_requiredNElectrons =0
private

Definition at line 85 of file JpsiPlus1Track.h.

◆ m_requiredNMuons

int Analysis::JpsiPlus1Track::m_requiredNMuons =0
private

Definition at line 84 of file JpsiPlus1Track.h.

◆ m_skipNoElectron

bool Analysis::JpsiPlus1Track::m_skipNoElectron = false
private

Definition at line 91 of file JpsiPlus1Track.h.

◆ m_trkDeltaZ

double Analysis::JpsiPlus1Track::m_trkDeltaZ
private

Definition at line 83 of file JpsiPlus1Track.h.

◆ m_trkMaxEta

double Analysis::JpsiPlus1Track::m_trkMaxEta
private

Definition at line 63 of file JpsiPlus1Track.h.

◆ m_TrkParticleCollection

SG::ReadHandleKey<xAOD::TrackParticleContainer> Analysis::JpsiPlus1Track::m_TrkParticleCollection
private

Definition at line 70 of file JpsiPlus1Track.h.

◆ m_TrkParticleGSFCollection

SG::ReadHandleKey<xAOD::TrackParticleContainer> Analysis::JpsiPlus1Track::m_TrkParticleGSFCollection
private

Definition at line 88 of file JpsiPlus1Track.h.

◆ m_trkSelector

ToolHandle< Trk::ITrackSelectorTool > Analysis::JpsiPlus1Track::m_trkSelector
private

Definition at line 75 of file JpsiPlus1Track.h.

◆ m_trkThresholdPt

double Analysis::JpsiPlus1Track::m_trkThresholdPt
private

Definition at line 62 of file JpsiPlus1Track.h.

◆ m_trkTrippletMassLower

double Analysis::JpsiPlus1Track::m_trkTrippletMassLower
private

Definition at line 81 of file JpsiPlus1Track.h.

◆ m_trkTrippletMassUpper

double Analysis::JpsiPlus1Track::m_trkTrippletMassUpper
private

Definition at line 80 of file JpsiPlus1Track.h.

◆ m_trkTrippletPt

double Analysis::JpsiPlus1Track::m_trkTrippletPt
private

Definition at line 82 of file JpsiPlus1Track.h.

◆ m_useGSFTrack

std::bitset<3> Analysis::JpsiPlus1Track::m_useGSFTrack
private

Definition at line 89 of file JpsiPlus1Track.h.

◆ m_useGSFTrackIndices

std::vector<int> Analysis::JpsiPlus1Track::m_useGSFTrackIndices
private

Definition at line 87 of file JpsiPlus1Track.h.

◆ m_useMassConst

bool Analysis::JpsiPlus1Track::m_useMassConst
private

Definition at line 77 of file JpsiPlus1Track.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_VKVFitter

Trk::TrkVKalVrtFitter* Analysis::JpsiPlus1Track::m_VKVFitter
private

Definition at line 76 of file JpsiPlus1Track.h.


The documentation for this class was generated from the following files:
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
Analysis::JpsiPlus1Track::m_requiredNMuons
int m_requiredNMuons
Definition: JpsiPlus1Track.h:84
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
xAOD::BPhysHelper
Definition: BPhysHelper.h:71
max
#define max(a, b)
Definition: cfImp.cxx:41
Analysis::JpsiPlus1Track::m_candidateLimit
size_t m_candidateLimit
Definition: JpsiPlus1Track.h:92
egammaEnergyPositionAllSamples::e1
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::TrkVKalVrtFitter::VKalVrtFitFast
virtual StatusCode VKalVrtFitFast(std::span< const xAOD::TrackParticle *const >, Amg::Vector3D &Vertex, double &minDZ, IVKalState &istate) const
Definition: VKalVrtFitFastSvc.cxx:56
xAOD::Vertex_v1::trackParticleLinks
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
Trk::indices
std::pair< long int, long int > indices
Definition: AlSymMatBase.h:24
xAOD::TrackParticle_v1::vz
float vz() const
The z origin for the parameters.
Analysis::JpsiPlus1Track::m_useGSFTrack
std::bitset< 3 > m_useGSFTrack
Definition: JpsiPlus1Track.h:89
xAOD::TrackParticle_v1::z0
float z0() const
Returns the parameter.
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ParticleTest.tp
tp
Definition: ParticleTest.py:25
Analysis::kMass
constexpr double kMass
Definition: JpsiPlus1Track.cxx:34
Analysis::JpsiPlus1Track::m_jpsiMassLower
double m_jpsiMassLower
Definition: JpsiPlus1Track.h:69
Analysis::JpsiPlus1Track::m_BMassUpper
double m_BMassUpper
Definition: JpsiPlus1Track.h:65
Analysis::JpsiUpsilonCommon::isContainedIn
static bool isContainedIn(const xAOD::TrackParticle *, const std::vector< const xAOD::TrackParticle * > &)
Definition: JpsiUpsilonCommon.cxx:58
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
Analysis::JpsiUpsilonCommon::cutRange
static bool cutRange(double value, double min, double max)
Definition: JpsiUpsilonCommon.cxx:72
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
Analysis::JpsiPlus1Track::m_TrkParticleGSFCollection
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleGSFCollection
Definition: JpsiPlus1Track.h:88
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
Analysis::JpsiPlus1Track::m_muonMasses
std::vector< double > m_muonMasses
Definition: JpsiPlus1Track.h:86
Analysis::JpsiPlus1Track::m_trkDeltaZ
double m_trkDeltaZ
Definition: JpsiPlus1Track.h:83
Analysis::JpsiPlus1Track::m_trkTrippletMassUpper
double m_trkTrippletMassUpper
Definition: JpsiPlus1Track.h:80
Trk::TrkVKalVrtFitter::setMassForConstraint
virtual void setMassForConstraint(double Mass, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:134
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Analysis::JpsiPlus1Track::m_BThresholdPt
double m_BThresholdPt
Definition: JpsiPlus1Track.h:64
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
python.TrigInDetConfig.inputTracks
inputTracks
Definition: TrigInDetConfig.py:183
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
extractSporadic.h
list h
Definition: extractSporadic.py:97
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::Vertex_v1::setTrackParticleLinks
void setTrackParticleLinks(const TrackParticleLinks_t &trackParticles)
Set all track particle links at once.
Analysis::JpsiPlus1Track::m_excludeJpsiMuonsOnly
bool m_excludeJpsiMuonsOnly
Definition: JpsiPlus1Track.h:72
Analysis::JpsiPlus1Track::m_jpsiMassUpper
double m_jpsiMassUpper
Definition: JpsiPlus1Track.h:68
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Analysis::JpsiPlus1Track::m_useGSFTrackIndices
std::vector< int > m_useGSFTrackIndices
Definition: JpsiPlus1Track.h:87
Analysis::JpsiPlus1Track::m_piMassHyp
bool m_piMassHyp
Definition: JpsiPlus1Track.h:60
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DerivationFramework::TrackBag
std::vector< const xAOD::TrackParticle * > TrackBag
Definition: BPhysAddMuonBasedInvMass.h:32
xAOD::Vertex_v1::clearTracks
void clearTracks()
Remove all tracks from the vertex.
Definition: Vertex_v1.cxx:331
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Analysis::JpsiPlus1Track::getInvariantMass
static double getInvariantMass(const std::vector< const xAOD::TrackParticle * > &trk, double mass1, double mass2, double mass3)
Definition: JpsiPlus1Track.cxx:473
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Analysis::JpsiPlus1Track::fit
xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *, const xAOD::TrackParticleContainer *) const
Definition: JpsiPlus1Track.cxx:428
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
Analysis::JpsiPlus1Track::m_jpsiCollectionKey
SG::ReadHandleKey< xAOD::VertexContainer > m_jpsiCollectionKey
Definition: JpsiPlus1Track.h:67
Analysis::JpsiPlus1Track::m_VKVFitter
Trk::TrkVKalVrtFitter * m_VKVFitter
Definition: JpsiPlus1Track.h:76
Analysis::JpsiPlus1Track::m_BMassLower
double m_BMassLower
Definition: JpsiPlus1Track.h:66
Analysis::JpsiPlus1Track::m_trkThresholdPt
double m_trkThresholdPt
Definition: JpsiPlus1Track.h:62
Analysis::JpsiPlus1Track::m_trkTrippletMassLower
double m_trkTrippletMassLower
Definition: JpsiPlus1Track.h:81
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Analysis::JpsiPlus1Track::m_TrkParticleCollection
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleCollection
Definition: JpsiPlus1Track.h:70
Analysis::JpsiPlus1Track::m_chi2cut
double m_chi2cut
Definition: JpsiPlus1Track.h:79
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Analysis::JpsiPlus1Track::m_trkSelector
ToolHandle< Trk::ITrackSelectorTool > m_trkSelector
Definition: JpsiPlus1Track.h:75
a
TList * a
Definition: liststreamerinfos.cxx:10
Analysis::JpsiPlus1Track::m_useMassConst
bool m_useMassConst
Definition: JpsiPlus1Track.h:77
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
egammaEnergyPositionAllSamples::e2
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Analysis::piMass
constexpr double piMass
Definition: JpsiPlus1Track.cxx:35
Analysis::JpsiPlus1Track::m_electronCollectionKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronCollectionKey
Definition: JpsiPlus1Track.h:90
Analysis::JpsiPlus1Track::m_altMassConst
double m_altMassConst
Definition: JpsiPlus1Track.h:78
Analysis::JpsiPlus1Track::m_iVertexFitter
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition: JpsiPlus1Track.h:74
Analysis::JpsiPlus1Track::m_skipNoElectron
bool m_skipNoElectron
Definition: JpsiPlus1Track.h:91
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Analysis::JpsiPlus1Track::m_requiredNElectrons
int m_requiredNElectrons
Definition: JpsiPlus1Track.h:85
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Trk::TrkVKalVrtFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const TrackParameters * > &perigeeList, const Amg::Vector3D &startingPoint) const override final
Interface for MeasuredPerigee with starting point.
Definition: TrkVKalVrtFitter.cxx:261
Analysis::muMass
constexpr double muMass
Definition: JpsiPlus1Track.cxx:33
Analysis::JpsiPlus1Track::m_kMassHyp
bool m_kMassHyp
Definition: JpsiPlus1Track.h:61
Analysis::JpsiPlus1Track::m_MuonsUsedInJpsi
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonsUsedInJpsi
Definition: JpsiPlus1Track.h:71
Analysis::JpsiUpsilonCommon::getPt
static double getPt(const xAOD::TrackParticle *, const xAOD::TrackParticle *)
Definition: JpsiUpsilonCommon.cxx:17
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Analysis::JpsiPlus1Track::m_trkTrippletPt
double m_trkTrippletPt
Definition: JpsiPlus1Track.h:82
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Trk::TrkVKalVrtFitter::setMassInputParticles
virtual void setMassInputParticles(const std::vector< double > &, IVKalState &istate) const override final
Definition: SetFitOptions.cxx:187
Analysis::JpsiPlus1Track::m_trkMaxEta
double m_trkMaxEta
Definition: JpsiPlus1Track.h:63
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
Analysis::JpsiPlus1Track::m_excludeCrossJpsiTracks
bool m_excludeCrossJpsiTracks
Definition: JpsiPlus1Track.h:73
Trk::TrkVKalVrtFitter::makeState
virtual std::unique_ptr< IVKalState > makeState(const EventContext &ctx) const override final
Definition: TrkVKalVrtFitter.cxx:118
fitman.k
k
Definition: fitman.py:528
Analysis::JpsiUpsilonCommon::cutRangeOR
static bool cutRangeOR(const std::vector< double > &values, double min, double max)
Definition: JpsiUpsilonCommon.cxx:76
Trk::TrkVKalVrtFitter
Definition: TrkVKalVrtFitter.h:67