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::JpsiFinder_ee Class Reference

#include <JpsiFinder_ee.h>

Inheritance diagram for Analysis::JpsiFinder_ee:
Collaboration diagram for Analysis::JpsiFinder_ee:

Public Member Functions

 JpsiFinder_ee (const std::string &t, const std::string &n, const IInterface *p)
 
 ~JpsiFinder_ee ()
 
virtual StatusCode initialize () override
 
virtual StatusCode performSearch (const EventContext &ctx, xAOD::VertexContainer &vxContainer) const override
 
std::vector< JpsiEECandidategetPairs (const std::vector< const xAOD::TrackParticle * > &) const
 
std::vector< JpsiEECandidategetPairs (const std::vector< const xAOD::Electron * > &) const
 
std::vector< JpsiEECandidategetPairs2Colls (const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::Electron * > &, bool) const
 
double getInvariantMass (const JpsiEECandidate &, const std::vector< double > &) const
 
std::vector< JpsiEECandidateselectCharges (const std::vector< JpsiEECandidate > &, const std::string &) const
 
xAOD::Vertexfit (const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *importedTrackCollection) const
 
bool passesEgammaCuts (const xAOD::Electron *) const
 
bool isContainedIn (const xAOD::TrackParticle *, const xAOD::TrackParticleContainer *) const
 
TVector3 trackMomentum (const xAOD::Vertex *vxCandidate, int trkIndex) 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 ()
 

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_elel
 
bool m_eltrk
 
bool m_trktrk
 
bool m_allElectrons
 
bool m_useTrackMeasurement
 
bool m_useV0Fitter
 
bool m_diElectrons
 
double m_trk1M
 
double m_trk2M
 
double m_thresholdPt
 
double m_higherPt
 
double m_trkThresholdPt
 
double m_invMassUpper
 
double m_invMassLower
 
double m_collAngleTheta
 
double m_collAnglePhi
 
double m_Chi2Cut
 
bool m_oppChOnly
 
bool m_sameChOnly
 
bool m_allChCombs
 
SG::ReadHandleKey< xAOD::ElectronContainerm_electronCollectionKey
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_TrkParticleCollection
 
ToolHandle< Trk::IVertexFitterm_iVertexFitter
 
ToolHandle< Trk::IVertexFitterm_iV0VertexFitter
 
ToolHandle< Trk::ITrackSelectorToolm_trkSelector
 
ToolHandle< InDet::VertexPointEstimatorm_vertexEstimator
 
bool m_egammaCuts
 
std::string m_elSelection
 
bool m_doTagAndProbe
 
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 53 of file JpsiFinder_ee.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

◆ JpsiFinder_ee()

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

Definition at line 95 of file JpsiFinder_ee.cxx.

95  : AthAlgTool(t,n,p),
96  m_elel(true),
97  m_eltrk(false),
98  m_trktrk(false),
99  m_allElectrons(false),
100  m_useTrackMeasurement(true),
101  m_useV0Fitter(false),
102  m_diElectrons(true),
103  m_trk1M(0.511),
104  m_trk2M(0.511),
105  m_thresholdPt(0.0),
106  m_higherPt(0.0),
107  m_trkThresholdPt(0.0),
108  m_invMassUpper(100000.0),
109  m_invMassLower(0.0),
110  m_collAngleTheta(0.0),
111  m_collAnglePhi(0.0),
112  m_Chi2Cut(50.),
113  m_oppChOnly(true),
114  m_sameChOnly(false),
115  m_allChCombs(false),
116  m_electronCollectionKey("Electrons"),
117  m_TrkParticleCollection("InDetTrackParticles"),
118  m_iVertexFitter("Trk::TrkVKalVrtFitter"),
119  m_iV0VertexFitter("Trk::V0VertexFitter"),
120  m_trkSelector("InDet::TrackSelectorTool"),
121  m_vertexEstimator("InDet::VertexPointEstimator"),
122  m_egammaCuts(true),
123  m_elSelection("d0_or_nod0"),
124  m_doTagAndProbe(false)
125 
126  {
127  declareInterface<JpsiFinder_ee>(this);
128  declareProperty("elAndEl",m_elel);
129  declareProperty("elAndTrack",m_eltrk);
130  declareProperty("TrackAndTrack",m_trktrk);
131  declareProperty("allElectrons",m_allElectrons);
132  declareProperty("useElectronTrackMeasurement",m_useTrackMeasurement);
133  declareProperty("useV0Fitter",m_useV0Fitter);
134  declareProperty("assumeDiElectrons",m_diElectrons);
135 // declareProperty("electronLHValue",m_electronLHValue);
136  declareProperty("track1Mass",m_trk1M);
137  declareProperty("track2Mass",m_trk2M);
138  declareProperty("elThresholdPt",m_thresholdPt);
139  declareProperty("higherPt",m_higherPt);
140  declareProperty("trackThresholdPt",m_trkThresholdPt);
141  declareProperty("invMassUpper",m_invMassUpper);
142  declareProperty("invMassLower",m_invMassLower);
143  declareProperty("collAngleTheta",m_collAngleTheta);
144  declareProperty("collAnglePhi",m_collAnglePhi);
145  declareProperty("Chi2Cut",m_Chi2Cut);
146  declareProperty("oppChargesOnly",m_oppChOnly);
147  declareProperty("sameChargesOnly",m_sameChOnly);
148  declareProperty("allChargeCombinations",m_allChCombs);
149  declareProperty("electronCollectionKey",m_electronCollectionKey);
150  declareProperty("TrackParticleCollection",m_TrkParticleCollection);
151  declareProperty("TrkVertexFitterTool",m_iVertexFitter);
152  declareProperty("V0VertexFitterTool",m_iV0VertexFitter);
153  declareProperty("TrackSelectorTool",m_trkSelector);
154  declareProperty("VertexPointEstimator",m_vertexEstimator);
155  declareProperty("useEgammaCuts",m_egammaCuts);
156  declareProperty("doTagAndProbe",m_doTagAndProbe);
157  declareProperty("ElectronSelection",m_elSelection);
158  }

◆ ~JpsiFinder_ee()

Analysis::JpsiFinder_ee::~JpsiFinder_ee ( )

Definition at line 160 of file JpsiFinder_ee.cxx.

160 { }

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::JpsiFinder_ee::fit ( const std::vector< const xAOD::TrackParticle * > &  inputTracks,
const xAOD::TrackParticleContainer importedTrackCollection 
) const

Definition at line 378 of file JpsiFinder_ee.cxx.

378  {
379  ATH_MSG_DEBUG("inside JpsiFinder_ee::fit");
380  const Trk::TrkV0VertexFitter* concreteVertexFitter=0;
381  if (m_useV0Fitter) {
382  ATH_MSG_DEBUG("using v0 fitter");
383  // making a concrete fitter for the V0Fitter
384  concreteVertexFitter = dynamic_cast<const Trk::TrkV0VertexFitter * >(m_iV0VertexFitter.get());
385  if(concreteVertexFitter == 0) {
386  ATH_MSG_FATAL("The vertex fitter passed is not a V0 Vertex Fitter");
387  return NULL;
388  }
389  }
390 
391  const Trk::Perigee& aPerigee1 = inputTracks[0]->perigeeParameters();
392  const Trk::Perigee& aPerigee2 = inputTracks[1]->perigeeParameters();
393  int sflag = 0;
394  int errorcode = 0;
395  Amg::Vector3D startingPoint = m_vertexEstimator->getCirclesIntersectionPoint(&aPerigee1,&aPerigee2,sflag,errorcode);
396  if (errorcode != 0) {startingPoint(0) = 0.0; startingPoint(1) = 0.0; startingPoint(2) = 0.0;}
397  if (m_useV0Fitter) {
398  xAOD::Vertex* myVxCandidate = concreteVertexFitter->fit(inputTracks, startingPoint);
399  ATH_MSG_DEBUG("Initial fit was a success!");
400  // Added by ASC
401  if(myVxCandidate != 0){
402  std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > newLinkVector;
403  for(unsigned int i=0; i< myVxCandidate->trackParticleLinks().size(); i++)
404  { ElementLink<DataVector<xAOD::TrackParticle> > mylink=myVxCandidate->trackParticleLinks()[i]; //makes a copy (non-const)
405  mylink.setStorableObject(*importedTrackCollection, true);
406  newLinkVector.push_back( mylink ); }
407 
408  myVxCandidate->clearTracks();
409  myVxCandidate->setTrackParticleLinks( newLinkVector );
410  }
411 
412 
413 
414  return myVxCandidate;
415  } else {
416  xAOD::Vertex* myVxCandidate = m_iVertexFitter->fit(inputTracks, startingPoint);
417  ATH_MSG_DEBUG("Initial fit was a success! " << myVxCandidate);
418  // Added by ASC
419  if(myVxCandidate != 0){
420  std::vector<ElementLink<DataVector<xAOD::TrackParticle> > > newLinkVector;
421  for(unsigned int i=0; i< myVxCandidate->trackParticleLinks().size(); i++){
422  ElementLink<DataVector<xAOD::TrackParticle> > mylink=myVxCandidate->trackParticleLinks()[i]; //makes a copy (non-const)
423  mylink.setStorableObject(*importedTrackCollection, true);
424  newLinkVector.push_back( mylink );
425  ATH_MSG_DEBUG("Set a link!");
426  }
427  myVxCandidate->clearTracks();
428  myVxCandidate->setTrackParticleLinks( newLinkVector );
429  ATH_MSG_DEBUG("Set all links");
430  }
431 
432  return myVxCandidate;
433  }
434 
435 
436 
437  return NULL;
438 
439  } // End of fit method

◆ getInvariantMass()

double Analysis::JpsiFinder_ee::getInvariantMass ( const JpsiEECandidate jpsiIn,
const std::vector< double > &  massHypotheses 
) const

Definition at line 550 of file JpsiFinder_ee.cxx.

550  {
551  double mass1 = massHypotheses.at(0);
552  double mass2 = massHypotheses.at(1);
553 
554  // construct 4-vectors from track perigee parameters using given mass hypotheses.
555  // NOTE: in new data model (xAOD) the defining parameters are expressed as perigee parameters w.r.t. the beamspot
556  // NOTE2: TrackParticle::p4() method already returns TLorentzVector, however, we want to enforce our own mass hypothesis
557  TLorentzVector mu1;
558  TLorentzVector mu2;
559  mu1.SetVectM(jpsiIn.trackParticle1->p4().Vect(), mass1);
560  mu2.SetVectM(jpsiIn.trackParticle2->p4().Vect(), mass2);
561 
562  return (mu1+mu2).M();
563 
564  }

◆ getPairs() [1/2]

std::vector< JpsiEECandidate > Analysis::JpsiFinder_ee::getPairs ( const std::vector< const xAOD::Electron * > &  electronsIn) const

Definition at line 475 of file JpsiFinder_ee.cxx.

475  {
476 
477  std::vector<JpsiEECandidate> myPairs;
478  JpsiEECandidate pair;
479  std::vector<const xAOD::Electron*>::const_iterator outerItr;
480  std::vector<const xAOD::Electron*>::const_iterator innerItr;
481 
482  if(electronsIn.size()>=2){
483  for(outerItr=electronsIn.begin();outerItr<electronsIn.end();++outerItr){
484  for(innerItr=(outerItr+1);innerItr!=electronsIn.end();++innerItr){
485 // if((*outerItr)->auxdata<int>("truthOrigin") == 26 && (*innerItr)->auxdata<int>("truthOrigin")==26) ATH_MSG_DEBUG("pair is from jpsi!");
486 // else continue;
487  pair.el1 = *innerItr;
488  pair.el2 = *outerItr;
489  pair.pairType = ELEL;
490  myPairs.push_back(pair);
491  }
492  }
493  }
494 
495  return(myPairs);
496  }

◆ getPairs() [2/2]

std::vector< JpsiEECandidate > Analysis::JpsiFinder_ee::getPairs ( const std::vector< const xAOD::TrackParticle * > &  TracksIn) const

Definition at line 448 of file JpsiFinder_ee.cxx.

448  {
449 
450  std::vector<JpsiEECandidate> myPairs;
451  JpsiEECandidate pair;
452  std::vector<const xAOD::TrackParticle*>::const_iterator outerItr;
453  std::vector<const xAOD::TrackParticle*>::const_iterator innerItr;
454 
455  if(TracksIn.size()>=2){
456  for(outerItr=TracksIn.begin();outerItr<TracksIn.end();++outerItr){
457  for(innerItr=(outerItr+1);innerItr!=TracksIn.end();++innerItr){
458  pair.trackParticle1 = *innerItr;
459  pair.trackParticle2 = *outerItr;
460  pair.pairType = TRK2;
461  myPairs.push_back(pair);
462  }
463  }
464  }
465 
466  return(myPairs);
467  }

◆ getPairs2Colls()

std::vector< JpsiEECandidate > Analysis::JpsiFinder_ee::getPairs2Colls ( const std::vector< const xAOD::TrackParticle * > &  tracks,
const std::vector< const xAOD::Electron * > &  electrons,
bool  tagAndProbe 
) const

Definition at line 504 of file JpsiFinder_ee.cxx.

504  {
505 
506  std::vector<JpsiEECandidate> myPairs;
507  JpsiEECandidate pair;
508 
509  // Unless user is running in tag and probe mode, remove tracks which are also identified as muons
510  std::vector<const xAOD::TrackParticle*> tracksToKeep;
511  if (!tagAndProbe) {
512  if(tracks.size()>=1 && electrons.size()>=1){
513  for (const xAOD::TrackParticle* trk : tracks) {
514  bool trackIsElectron(false);
515  for (const xAOD::Electron* ele : electrons) {
516  if ( ele->trackParticleLink().cachedElement() == trk ) {
517  trackIsElectron=true;
518  break;
519  }
520  }
521  if (!trackIsElectron) tracksToKeep.push_back(trk);
522  }
523  }
524  } else {tracksToKeep = tracks;}
525 
526  if(tracksToKeep.size()>=1 && electrons.size()>=1){
527  for (const xAOD::TrackParticle* trk : tracks) {
528  for (const xAOD::Electron* ele : electrons) {
529  pair.el1 = ele;
530  // Muon track 1st
531  pair.trackParticle1 = ele->trackParticleLink().cachedElement();
532  pair.trackParticle2 = trk;
533  pair.pairType = ELTRK;
534  myPairs.push_back(pair);
535  }
536  }
537  }
538 
539  return(myPairs);
540  }

◆ initialize()

StatusCode Analysis::JpsiFinder_ee::initialize ( )
overridevirtual

Definition at line 32 of file JpsiFinder_ee.cxx.

32  {
33 
34  // Initialize the ReadHandles
37 
38  // retrieving vertex Fitter
39  ATH_CHECK(m_iVertexFitter.retrieve());
40 
41  // retrieving V0 Fitter
42  ATH_CHECK(m_iV0VertexFitter.retrieve(DisableTool{!m_useV0Fitter }));
43  // Get the track selector tool from ToolSvc
44  ATH_CHECK(m_trkSelector.retrieve());
45 
46 
47  // Get the vertex point estimator tool from ToolSvc
48  ATH_CHECK(m_vertexEstimator.retrieve());
49 
50 
51  // Get the Particle Properties Service
52  IPartPropSvc* partPropSvc = 0;
53  StatusCode sc = service("PartPropSvc", partPropSvc, true);
54  if (sc.isFailure()) {
55  ATH_MSG_ERROR("Could not initialize Particle Properties Service");
56  return StatusCode::FAILURE;
57  } else {
58  auto particleDataTable = partPropSvc->PDT();
59  const HepPDT::ParticleData* pd_el = particleDataTable->particle(MC::ELECTRON);
60  if (m_diElectrons) {m_trk1M = pd_el->mass(); m_trk2M = pd_el->mass();}
61  }
62 
63  if (m_doTagAndProbe) ATH_MSG_WARNING("You have requested tag and probe mode. Duplicate mu+trk pairs WILL be allowed, charge ordering WILL NOT be done. Tag track will be first in each candidate");
64 
65 
66 // // Check that the user's settings are sensible
67  bool illogicalOptions(false);
68  if ( (m_elel && m_eltrk) || (m_elel && m_trktrk) || (m_eltrk && m_trktrk) ) {
69  ATH_MSG_WARNING("You are requesting incompatible combinations of muons and tracks in the pairs. JpsiEECandidates will be EMPTY!");
70  illogicalOptions=true;
71  };
72  if ( (m_doTagAndProbe && m_elel) || (m_doTagAndProbe && m_trktrk) ) {
73  ATH_MSG_WARNING("You are requesting Tag and Probe analysis but have not requested mu+trk mode. This is impossible. JpsiEECandidates will be EMPTY!");
74  illogicalOptions=true;
75  };
77  ATH_MSG_WARNING("You are requesting incompatible combinations of charges in the pairs. JpsiEECandidates will be EMPTY!");
78  illogicalOptions=true;
79  };
81  ATH_MSG_WARNING("You are requesting same-sign or all-sign combinations in a tag and probe analysis. This doesn't make sense. JpsiEECandidates will be EMPTY!");
82  illogicalOptions=true;
83  }
84  if (illogicalOptions) return StatusCode::FAILURE;
85 
86 
87 
88  ATH_MSG_DEBUG("Initialize successful");
89 
90  return StatusCode::SUCCESS;
91 
92  }

◆ 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::JpsiFinder_ee::interfaceID ( )
inlinestatic

Definition at line 60 of file JpsiFinder_ee.h.

60 { return IID_JpsiFinder_ee;}

◆ isContainedIn()

bool Analysis::JpsiFinder_ee::isContainedIn ( const xAOD::TrackParticle theTrack,
const xAOD::TrackParticleContainer theCollection 
) const

Definition at line 636 of file JpsiFinder_ee.cxx.

636  {
637  return std::find(theCollection->begin(), theCollection->end(), theTrack) != theCollection->end();
638  }

◆ 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.

◆ passesEgammaCuts()

bool Analysis::JpsiFinder_ee::passesEgammaCuts ( const xAOD::Electron electron) const

Definition at line 612 of file JpsiFinder_ee.cxx.

612  {
613 
614  static const SG::AuxElement::Accessor<char> isLHVeryLoosenod0("DFCommonElectronsLHVeryLoosenod0");
615  static const SG::AuxElement::Accessor<char> isLHVeryLoose("DFCommonElectronsLHVeryLoose");
616 
617  bool passesSelection = false;
618  bool passesLHVLoose = isLHVeryLoose(*electron);
619  bool passesLHVLoosenod0 = isLHVeryLoosenod0(*electron);
620 
621  if(m_elSelection == "d0") passesSelection = passesLHVLoose;
622  else if(m_elSelection == "nod0") passesSelection = passesLHVLoosenod0;
623  else if(m_elSelection == "d0_or_nod0") passesSelection = passesLHVLoose || passesLHVLoosenod0;
624  else ATH_MSG_ERROR("Invalid electron selection " << m_elSelection);
625 
626  ATH_MSG_DEBUG("Electron with pT, eta: " << electron->pt() << " " << electron->eta() << " passes " << m_elSelection << " " << passesSelection);
627  return passesSelection;
628 
629  }

◆ performSearch()

StatusCode Analysis::JpsiFinder_ee::performSearch ( const EventContext &  ctx,
xAOD::VertexContainer vxContainer 
) const
overridevirtual

Implements Analysis::ICandidateSearch.

Definition at line 167 of file JpsiFinder_ee.cxx.

168  {
169  ATH_MSG_DEBUG( "JpsiFinder_ee::performSearch" );
170 
171 
172  // Get the electrons from StoreGate
173  const xAOD::ElectronContainer* importedElectronCollection=nullptr;
175  if(!ehandle.isValid()){
176  ATH_MSG_WARNING("No electron collection with key " << m_electronCollectionKey.key() << " found in StoreGate. JpsiEECandidates will be EMPTY!");
177  return StatusCode::SUCCESS;;
178  }else{
179  importedElectronCollection = ehandle.cptr();
180  ATH_MSG_DEBUG("Found electron collections with key "<<m_electronCollectionKey.key());
181  }
182  ATH_MSG_DEBUG("Electron container size "<<importedElectronCollection->size());
183 
184  // Get ID tracks
186  const xAOD::TrackParticleContainer* importedTrackCollection(0);
187  if(!thandle.isValid()){
188  ATH_MSG_WARNING("No TrackParticle collection with name " << m_TrkParticleCollection << " found in StoreGate!");
189  return StatusCode::SUCCESS;;
190  } else {
191  importedTrackCollection = thandle.cptr();
192  }
193 
194  // Typedef for vectors of tracks and muons
195  typedef std::vector<const xAOD::TrackParticle*> TrackBag;
196  typedef std::vector<const xAOD::Electron*> ElectronBag;
197 
198  // Select the inner detector tracks
199  const xAOD::Vertex* vx = 0;
200  TrackBag theIDTracksAfterSelection;
201  if (m_trktrk || m_eltrk) {
203  for (trkCItr=importedTrackCollection->begin(); trkCItr!=importedTrackCollection->end(); ++trkCItr) {
204  const xAOD::TrackParticle* TP = (*trkCItr);
205  if ( fabs(TP->pt())<m_trkThresholdPt ) continue;
206  if ( !m_trkSelector->decision(*TP, vx) ) continue;
207  theIDTracksAfterSelection.push_back(TP);
208  }
209  if (theIDTracksAfterSelection.size() == 0) return StatusCode::SUCCESS;;
210  ATH_MSG_DEBUG("Number of tracks after ID track selection: " << theIDTracksAfterSelection.size());
211  }
212 
213  // Select the muons
214  ElectronBag theElectronsAfterSelection;
216  if (m_elel || m_eltrk) {
217  for (elItr=importedElectronCollection->begin(); elItr!=importedElectronCollection->end(); ++elItr) {
218  if ( *elItr == NULL ) continue;
219  if (!(*elItr)->trackParticleLink().isValid()) continue; // No electrons without ID tracks
220  const xAOD::TrackParticle* elTrk(0);
221  elTrk = (*elItr)->trackParticleLink().cachedElement();
222 
223  if ( elTrk==NULL) continue;
224  if ( !m_trkSelector->decision(*elTrk, vx) ) continue; // all ID tracks must pass basic tracking cuts
225  if ( fabs(elTrk->pt())<m_thresholdPt ) continue; // higher pt cut if needed
226 
227  if ( m_egammaCuts && !passesEgammaCuts(*elItr)) continue; // egamma cuts
228  theElectronsAfterSelection.push_back(*elItr);
229  }
230  if (theElectronsAfterSelection.size() == 0) return StatusCode::SUCCESS;;
231  ATH_MSG_DEBUG("Number of electrons after selection: " << theElectronsAfterSelection.size());
232  }
233 
234  // Sort into pairs - end result will be a vector of JpsiEECandidate structs
235  std::vector<JpsiEECandidate> jpsiCandidates;
236  if (m_elel) jpsiCandidates = getPairs(theElectronsAfterSelection);
237  if (m_trktrk) jpsiCandidates = getPairs(theIDTracksAfterSelection);
238  if (m_eltrk) jpsiCandidates = getPairs2Colls(theIDTracksAfterSelection,theElectronsAfterSelection,m_doTagAndProbe);
239 
240  ATH_MSG_DEBUG("Number of pairs with ee from a B decay: " << jpsiCandidates.size() );
241 
242  // Pair-wise selections
244 
245  // (1) Enforce one combined muon [deleted, no electron equivalent]
246 
247  // (2) Establish track content for candidates
248  // and set the appropriate track collections for the combined muon tracks where appropriate (for saving to persistency later)
249 
250  // el+trk or trk+trk - always ID track collection
251  if (m_eltrk || m_trktrk) {
252  for (jpsiItr=jpsiCandidates.begin(); jpsiItr!=jpsiCandidates.end(); ++jpsiItr) {
253  (*jpsiItr).collection1 = importedTrackCollection;
254  (*jpsiItr).collection2 = importedTrackCollection;
255  }
256  }
257 
258  if (m_elel) {
259  for (jpsiItr=jpsiCandidates.begin(); jpsiItr!=jpsiCandidates.end(); ++jpsiItr) {
260  if ( m_useTrackMeasurement ) {
261  (*jpsiItr).trackParticle1 = (*jpsiItr).el1->trackParticleLink().cachedElement();
262  (*jpsiItr).trackParticle2 = (*jpsiItr).el2->trackParticleLink().cachedElement();
263  (*jpsiItr).collection1 = importedTrackCollection;
264  (*jpsiItr).collection2 = importedTrackCollection;
265  } else {
266  ATH_MSG_WARNING("Not setup for non-track electron measurements yet....");
267  }
268  } // iteration over candidates
269  }
270 
271 
272  // (3) Enforce higher track pt if requested
273  if (m_higherPt>0.0) {
274  int index(0);
275  std::vector<int> listToDelete;
276  std::vector<int>::reverse_iterator ii;
277  for(jpsiItr=jpsiCandidates.begin(); jpsiItr!=jpsiCandidates.end();++jpsiItr,++index) {
278  if( (fabs((*jpsiItr).trackParticle1->pt()) < m_higherPt) && (fabs((*jpsiItr).trackParticle2->pt()) < m_higherPt) ) listToDelete.push_back(index);
279  }
280  for (ii=listToDelete.rbegin(); ii!=listToDelete.rend(); ++ii) {
281  jpsiCandidates.erase(jpsiCandidates.begin() + (*ii) );
282  }
283  ATH_MSG_DEBUG("Number of candidates after higherPt cut: " << jpsiCandidates.size() );
284  }
285 
286  // (4) Select all opp/same charged track pairs
287  std::vector<JpsiEECandidate> sortedJpsiEECandidates;
288  if (m_oppChOnly) sortedJpsiEECandidates = selectCharges(jpsiCandidates,"OPPOSITE");
289  if (m_sameChOnly) sortedJpsiEECandidates = selectCharges(jpsiCandidates,"SAME");
290  if (m_allChCombs) sortedJpsiEECandidates = selectCharges(jpsiCandidates,"ALL");
291  ATH_MSG_DEBUG("Number of candidates after charge selection: " << sortedJpsiEECandidates.size() );
292 
293  // (5) Select for decay angle, if requested
294  if (m_collAnglePhi>0.0 && m_collAngleTheta>0.0) {
295  int index(0);
296  std::vector<int> listToDelete;
297  std::vector<int>::reverse_iterator ii;
298  for(jpsiItr=sortedJpsiEECandidates.begin(); jpsiItr!=sortedJpsiEECandidates.end();++jpsiItr,++index) {
299  double deltatheta = fabs( (*jpsiItr).trackParticle1->theta() - (*jpsiItr).trackParticle2->theta() );
300  // -3.14 < phi < +3.14 ==> correction
301  double deltaphi = std::abs(xAOD::P4Helpers::deltaPhi((*jpsiItr).trackParticle1->phi0() , (*jpsiItr).trackParticle2->phi0()));
302  // perform the angle cuts
303  if ((deltatheta > m_collAngleTheta) || (deltaphi > m_collAnglePhi)) listToDelete.push_back(index);
304  }
305  for (ii=listToDelete.rbegin(); ii!=listToDelete.rend(); ++ii) {
306  sortedJpsiEECandidates.erase(sortedJpsiEECandidates.begin() + (*ii) );
307  }
308  ATH_MSG_DEBUG("Number of collimated candidates: " << sortedJpsiEECandidates.size() );
309  }
310 
311  // (6) Select for invariant mass, if requested
312  std::vector<double> trkMasses;
313  trkMasses.push_back(m_trk1M);
314  trkMasses.push_back(m_trk2M);
315  if ( (m_invMassLower > 0.0) || (m_invMassUpper > 0.0) ) {
316  int index(0);
317  std::vector<int> listToDelete;
318  std::vector<int>::reverse_iterator ii;
319  for(jpsiItr=sortedJpsiEECandidates.begin(); jpsiItr!=sortedJpsiEECandidates.end(); ++jpsiItr,++index) {
320  double invMass = getInvariantMass(*jpsiItr,trkMasses);
321  // std::cout << "inv. mass: " << invMass << std::endl;
322  if ( invMass < m_invMassLower || invMass > m_invMassUpper ) {
323  listToDelete.push_back(index);
324  }
325  }
326  for (ii=listToDelete.rbegin(); ii!=listToDelete.rend(); ++ii) {
327  sortedJpsiEECandidates.erase(sortedJpsiEECandidates.begin() + (*ii) );
328  }
329  ATH_MSG_DEBUG("Number of candidates passing invariant mass selection: " << sortedJpsiEECandidates.size() );
330  }
331 
332  if (sortedJpsiEECandidates.size() == 0) return StatusCode::SUCCESS;;
333 
334  // Fit each pair of tracks to a vertex
335  int itritn = 0;
336  for(jpsiItr=sortedJpsiEECandidates.begin(); jpsiItr!=sortedJpsiEECandidates.end(); ++jpsiItr) {
337  ATH_MSG_DEBUG("jpsiItr: " << itritn); itritn++;
338  std::vector<const xAOD::TrackParticle*> theTracks; theTracks.clear();
339  theTracks.push_back((*jpsiItr).trackParticle1);
340  theTracks.push_back((*jpsiItr).trackParticle2);
341  ATH_MSG_DEBUG("theTracks size (should be two!) " << theTracks.size() << " being vertexed with tracks " << importedTrackCollection);
342  std::unique_ptr<xAOD::Vertex> myVxCandidate{fit(theTracks,importedTrackCollection)}; // This line actually does the fitting and object making
343  if (myVxCandidate != 0) {
344  // Chi2 cut if requested
345  double chi2 = myVxCandidate->chiSquared();
346  ATH_MSG_DEBUG("chi2 is: " << chi2);
347  if (m_Chi2Cut == 0.0 || chi2 <= m_Chi2Cut) {
348  // decorate the candidate with refitted tracks and muons via the BPhysHelper
349  xAOD::BPhysHelper jpsiHelper(myVxCandidate.get());
350  jpsiHelper.setRefTrks();
351  if (m_elel || m_eltrk) {
352  std::vector<const xAOD::Electron*> theStoredElectrons;
353  theStoredElectrons.push_back((*jpsiItr).el1);
354  if (m_elel) theStoredElectrons.push_back((*jpsiItr).el2);
355  jpsiHelper.setElectrons(theStoredElectrons,importedElectronCollection);
356  }
357  // Retain the vertex
358  vxContainer.push_back(std::move(myVxCandidate));
359  }
360  } else { // fit failed
361  ATH_MSG_DEBUG("Fitter failed!");
362  // Don't try to delete the object, since we arrived here,
363  // because this pointer is null...
364  //delete myVxCandidate;
365  }
366  }
367  ATH_MSG_DEBUG("vxContainer size " << vxContainer.size());
368 
369  return StatusCode::SUCCESS;;
370  }

◆ 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  }

◆ selectCharges()

std::vector< JpsiEECandidate > Analysis::JpsiFinder_ee::selectCharges ( const std::vector< JpsiEECandidate > &  jpsisIn,
const std::string &  selection 
) const

Definition at line 572 of file JpsiFinder_ee.cxx.

572  {
573 
574  bool opposite(false),same(false),all(false);
575  if (selection=="OPPOSITE") opposite=true;
576  if (selection=="SAME") same=true;
577  if (selection=="ALL") all=true;
578 
579  JpsiEECandidate tmpJpsi;
580  std::vector<JpsiEECandidate> jpsis;
581  double qOverP1=0.;
582  double qOverP2=0.;
583  for(auto jpsiItr=jpsisIn.cbegin();jpsiItr!=jpsisIn.cend();jpsiItr++){
584  bool oppCh(false),sameCh(false);
585  tmpJpsi = *jpsiItr;
586  qOverP1=(*jpsiItr).trackParticle1->qOverP();
587  qOverP2=(*jpsiItr).trackParticle2->qOverP();
588  if(qOverP1*qOverP2<0.0) oppCh=true; // product charge < 0
589  if(qOverP1*qOverP2>0.0) sameCh=true; // product charge > 0
590  // +ve should be first so swap
591  // Don't do it for tag and probe analyses (because tag muon must not change position)
592  if (oppCh && qOverP1<0.0 && !m_doTagAndProbe) {
593  tmpJpsi.trackParticle1 = (*jpsiItr).trackParticle2;
594  tmpJpsi.trackParticle2 = (*jpsiItr).trackParticle1;
595  tmpJpsi.el1 = (*jpsiItr).el2;
596  tmpJpsi.el2 = (*jpsiItr).el1;
597  tmpJpsi.collection1 = (*jpsiItr).collection2;
598  tmpJpsi.collection2 = (*jpsiItr).collection1;
599  }
600  if (oppCh && (opposite || all) ) jpsis.push_back(tmpJpsi);
601  if (sameCh && (same || all) ) jpsis.push_back(tmpJpsi);
602 
603  } // end of for loop
604 
605  return(jpsis);
606  }

◆ 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.

◆ trackMomentum()

TVector3 Analysis::JpsiFinder_ee::trackMomentum ( const xAOD::Vertex vxCandidate,
int  trkIndex 
) const

Definition at line 644 of file JpsiFinder_ee.cxx.

645  {
646  double px = 0., py = 0., pz = 0.;
647  if (0 != vxCandidate) {
648  const Trk::TrackParameters* aPerigee = vxCandidate->vxTrackAtVertex()[trkIndex].perigeeAtVertex();
649  px = aPerigee->momentum()[Trk::px];
650  py = aPerigee->momentum()[Trk::py];
651  pz = aPerigee->momentum()[Trk::pz];
652  }
653  TVector3 mom(px,py,pz);
654  return mom;
655  }

◆ 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_allChCombs

bool Analysis::JpsiFinder_ee::m_allChCombs
private

Definition at line 96 of file JpsiFinder_ee.h.

◆ m_allElectrons

bool Analysis::JpsiFinder_ee::m_allElectrons
private

Definition at line 80 of file JpsiFinder_ee.h.

◆ m_Chi2Cut

double Analysis::JpsiFinder_ee::m_Chi2Cut
private

Definition at line 93 of file JpsiFinder_ee.h.

◆ m_collAnglePhi

double Analysis::JpsiFinder_ee::m_collAnglePhi
private

Definition at line 92 of file JpsiFinder_ee.h.

◆ m_collAngleTheta

double Analysis::JpsiFinder_ee::m_collAngleTheta
private

Definition at line 91 of file JpsiFinder_ee.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_diElectrons

bool Analysis::JpsiFinder_ee::m_diElectrons
private

Definition at line 83 of file JpsiFinder_ee.h.

◆ m_doTagAndProbe

bool Analysis::JpsiFinder_ee::m_doTagAndProbe
private

Definition at line 105 of file JpsiFinder_ee.h.

◆ m_egammaCuts

bool Analysis::JpsiFinder_ee::m_egammaCuts
private

Definition at line 103 of file JpsiFinder_ee.h.

◆ m_electronCollectionKey

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

Definition at line 97 of file JpsiFinder_ee.h.

◆ m_elel

bool Analysis::JpsiFinder_ee::m_elel
private

Definition at line 77 of file JpsiFinder_ee.h.

◆ m_elSelection

std::string Analysis::JpsiFinder_ee::m_elSelection
private

Definition at line 104 of file JpsiFinder_ee.h.

◆ m_eltrk

bool Analysis::JpsiFinder_ee::m_eltrk
private

Definition at line 78 of file JpsiFinder_ee.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_higherPt

double Analysis::JpsiFinder_ee::m_higherPt
private

Definition at line 87 of file JpsiFinder_ee.h.

◆ m_invMassLower

double Analysis::JpsiFinder_ee::m_invMassLower
private

Definition at line 90 of file JpsiFinder_ee.h.

◆ m_invMassUpper

double Analysis::JpsiFinder_ee::m_invMassUpper
private

Definition at line 89 of file JpsiFinder_ee.h.

◆ m_iV0VertexFitter

ToolHandle< Trk::IVertexFitter > Analysis::JpsiFinder_ee::m_iV0VertexFitter
private

Definition at line 100 of file JpsiFinder_ee.h.

◆ m_iVertexFitter

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

Definition at line 99 of file JpsiFinder_ee.h.

◆ m_oppChOnly

bool Analysis::JpsiFinder_ee::m_oppChOnly
private

Definition at line 94 of file JpsiFinder_ee.h.

◆ m_sameChOnly

bool Analysis::JpsiFinder_ee::m_sameChOnly
private

Definition at line 95 of file JpsiFinder_ee.h.

◆ m_thresholdPt

double Analysis::JpsiFinder_ee::m_thresholdPt
private

Definition at line 86 of file JpsiFinder_ee.h.

◆ m_trk1M

double Analysis::JpsiFinder_ee::m_trk1M
private

Definition at line 84 of file JpsiFinder_ee.h.

◆ m_trk2M

double Analysis::JpsiFinder_ee::m_trk2M
private

Definition at line 85 of file JpsiFinder_ee.h.

◆ m_TrkParticleCollection

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

Definition at line 98 of file JpsiFinder_ee.h.

◆ m_trkSelector

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

Definition at line 101 of file JpsiFinder_ee.h.

◆ m_trkThresholdPt

double Analysis::JpsiFinder_ee::m_trkThresholdPt
private

Definition at line 88 of file JpsiFinder_ee.h.

◆ m_trktrk

bool Analysis::JpsiFinder_ee::m_trktrk
private

Definition at line 79 of file JpsiFinder_ee.h.

◆ m_useTrackMeasurement

bool Analysis::JpsiFinder_ee::m_useTrackMeasurement
private

Definition at line 81 of file JpsiFinder_ee.h.

◆ m_useV0Fitter

bool Analysis::JpsiFinder_ee::m_useV0Fitter
private

Definition at line 82 of file JpsiFinder_ee.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexEstimator

ToolHandle< InDet::VertexPointEstimator > Analysis::JpsiFinder_ee::m_vertexEstimator
private

Definition at line 102 of file JpsiFinder_ee.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
Analysis::JpsiFinder_ee::m_invMassUpper
double m_invMassUpper
Definition: JpsiFinder_ee.h:89
Trk::py
@ py
Definition: ParamDefs.h:66
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::BPhysHelper
Definition: BPhysHelper.h:71
test_pyathena.px
px
Definition: test_pyathena.py:18
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Analysis::JpsiFinder_ee::m_trkSelector
ToolHandle< Trk::ITrackSelectorTool > m_trkSelector
Definition: JpsiFinder_ee.h:101
P4Helpers::invMass
double invMass(const I4Momentum &pA, const I4Momentum &pB)
invariant mass from two I4momentum references
Definition: P4Helpers.h:239
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
Analysis::JpsiFinder_ee::getPairs2Colls
std::vector< JpsiEECandidate > getPairs2Colls(const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::Electron * > &, bool) const
Definition: JpsiFinder_ee.cxx:504
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
xAOD::Vertex_v1::trackParticleLinks
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
Analysis::JpsiFinder_ee::m_TrkParticleCollection
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleCollection
Definition: JpsiFinder_ee.h:98
Analysis::JpsiFinder_ee::m_useTrackMeasurement
bool m_useTrackMeasurement
Definition: JpsiFinder_ee.h:81
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
xAOD::P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: xAODP4Helpers.h:69
Analysis::JpsiFinder_ee::m_sameChOnly
bool m_sameChOnly
Definition: JpsiFinder_ee.h:95
Analysis::JpsiFinder_ee::m_collAnglePhi
double m_collAnglePhi
Definition: JpsiFinder_ee.h:92
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
Analysis::JpsiFinder_ee::m_elSelection
std::string m_elSelection
Definition: JpsiFinder_ee.h:104
Analysis::JpsiFinder_ee::m_electronCollectionKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronCollectionKey
Definition: JpsiFinder_ee.h:97
Trk::pz
@ pz
global momentum (cartesian)
Definition: ParamDefs.h:67
python.TrigEgammaFastCaloHypoTool.same
def same(val, tool)
Definition: TrigEgammaFastCaloHypoTool.py:12
Analysis::JpsiFinder_ee::m_doTagAndProbe
bool m_doTagAndProbe
Definition: JpsiFinder_ee.h:105
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Analysis::JpsiFinder_ee::passesEgammaCuts
bool passesEgammaCuts(const xAOD::Electron *) const
Definition: JpsiFinder_ee.cxx:612
Analysis::JpsiFinder_ee::m_trk2M
double m_trk2M
Definition: JpsiFinder_ee.h:85
Analysis::JpsiFinder_ee::getPairs
std::vector< JpsiEECandidate > getPairs(const std::vector< const xAOD::TrackParticle * > &) const
Definition: JpsiFinder_ee.cxx:448
Analysis::JpsiFinder_ee::m_trkThresholdPt
double m_trkThresholdPt
Definition: JpsiFinder_ee.h:88
Analysis::JpsiFinder_ee::fit
xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *importedTrackCollection) const
Definition: JpsiFinder_ee.cxx:378
Analysis::ELEL
@ ELEL
Definition: JpsiFinder_ee.h:41
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Analysis::JpsiFinder_ee::m_invMassLower
double m_invMassLower
Definition: JpsiFinder_ee.h:90
python.TrigInDetConfig.inputTracks
inputTracks
Definition: TrigInDetConfig.py:168
Analysis::JpsiFinder_ee::m_thresholdPt
double m_thresholdPt
Definition: JpsiFinder_ee.h:86
lumiFormat.i
int i
Definition: lumiFormat.py:92
Analysis::JpsiFinder_ee::m_allChCombs
bool m_allChCombs
Definition: JpsiFinder_ee.h:96
beamspotman.n
n
Definition: beamspotman.py:731
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
Analysis::JpsiFinder_ee::m_Chi2Cut
double m_Chi2Cut
Definition: JpsiFinder_ee.h:93
xAOD::Vertex_v1::setTrackParticleLinks
void setTrackParticleLinks(const TrackParticleLinks_t &trackParticles)
Set all track particle links at once.
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
Analysis::JpsiFinder_ee::m_diElectrons
bool m_diElectrons
Definition: JpsiFinder_ee.h:83
Trk::px
@ px
Definition: ParamDefs.h:65
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
Analysis::JpsiFinder_ee::m_trktrk
bool m_trktrk
Definition: JpsiFinder_ee.h:79
PlotRamps.passesSelection
def passesSelection(gain, offset)
Definition: PlotRamps.py:8
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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
Trk::ParametersBase
Definition: ParametersBase.h:55
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
Analysis::JpsiFinder_ee::selectCharges
std::vector< JpsiEECandidate > selectCharges(const std::vector< JpsiEECandidate > &, const std::string &) const
Definition: JpsiFinder_ee.cxx:572
Analysis::JpsiFinder_ee::m_vertexEstimator
ToolHandle< InDet::VertexPointEstimator > m_vertexEstimator
Definition: JpsiFinder_ee.h:102
selection
std::string selection
Definition: fbtTestBasics.cxx:73
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Analysis::JpsiFinder_ee::m_iVertexFitter
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition: JpsiFinder_ee.h:99
Analysis::JpsiFinder_ee::m_egammaCuts
bool m_egammaCuts
Definition: JpsiFinder_ee.h:103
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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::JpsiFinder_ee::m_higherPt
double m_higherPt
Definition: JpsiFinder_ee.h:87
Analysis::JpsiFinder_ee::m_oppChOnly
bool m_oppChOnly
Definition: JpsiFinder_ee.h:94
Amg::py
@ py
Definition: GeoPrimitives.h:39
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Analysis::JpsiFinder_ee::m_trk1M
double m_trk1M
Definition: JpsiFinder_ee.h:84
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
xAOD::Electron_v1
Definition: Electron_v1.h:34
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:64
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
DeMoScan.index
string index
Definition: DeMoScan.py:362
Trk::TrkV0VertexFitter::fit
virtual xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &vectorTrk, const Amg::Vector3D &startingPoint) const override
Interface for xAOD::TrackParticle with Amg::Vector3D starting point.
Definition: TrkV0VertexFitter.cxx:83
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Analysis::JpsiFinder_ee::getInvariantMass
double getInvariantMass(const JpsiEECandidate &, const std::vector< double > &) const
Definition: JpsiFinder_ee.cxx:550
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Analysis::JpsiFinder_ee::m_collAngleTheta
double m_collAngleTheta
Definition: JpsiFinder_ee.h:91
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Analysis::JpsiFinder_ee::m_elel
bool m_elel
Definition: JpsiFinder_ee.h:77
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:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
Analysis::ELTRK
@ ELTRK
Definition: JpsiFinder_ee.h:41
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Trk::TrkV0VertexFitter
This class implements a vertex fitting algorithm optimised for V0 finding.
Definition: TrkV0VertexFitter.h:40
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Analysis::JpsiFinder_ee::m_eltrk
bool m_eltrk
Definition: JpsiFinder_ee.h:78
xAOD::Vertex_v1::vxTrackAtVertex
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
Definition: Vertex_v1.cxx:181
Analysis::JpsiFinder_ee::m_allElectrons
bool m_allElectrons
Definition: JpsiFinder_ee.h:80
Analysis::TRK2
@ TRK2
Definition: JpsiFinder_ee.h:41
Analysis::JpsiFinder_ee::m_iV0VertexFitter
ToolHandle< Trk::IVertexFitter > m_iV0VertexFitter
Definition: JpsiFinder_ee.h:100
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Analysis::JpsiFinder_ee::m_useV0Fitter
bool m_useV0Fitter
Definition: JpsiFinder_ee.h:82
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528