ATLAS Offline Software
TagNProbe.cxx
Go to the documentation of this file.
1 
12 
13 
14 TagNProbe::TagNProbe( const std::string& refName0,
15  const std::string& refName1,
16  double massMin, double massMax, bool unique_flag ) :
17  m_particleType0(refName0),
18  m_particleType1(refName1),
19  m_mass0(0),
20  m_mass1(0),
21  m_massMin(massMin),
22  m_massMax(massMax),
23  m_unique(unique_flag)
24 {
25  construct();
26 }
27 
28 TagNProbe::TagNProbe( const std::string& refName,
29  double massMin, double massMax, bool unique_flag ) :
30  m_particleType0(refName),
31  m_particleType1(refName),
32  m_mass0(0),
33  m_mass1(0),
34  m_massMin(massMin),
35  m_massMax(massMax),
36  m_unique(unique_flag)
37 {
38  construct();
39 }
40 
41 
43  const double muonMass = 0.10565; // GeV
44  const double electronMass = 0.000510; // GeV
45  const double tauMass = 1.77686; // GeV
46 
47  if ( m_particleType0.find("Muon")!=std::string::npos ) m_mass0 = muonMass;
48  else if ( m_particleType0.find("Electron")!=std::string::npos ) m_mass0 = electronMass;
49  else if ( m_particleType0.find("Tau")!=std::string::npos ) m_mass0 = tauMass;
50 
51  if ( m_particleType1.find("Muon")!=std::string::npos ) m_mass1 = muonMass;
52  else if ( m_particleType1.find("Electron")!=std::string::npos ) m_mass1 = electronMass;
53  else if ( m_particleType1.find("Tau")!=std::string::npos ) m_mass1 = tauMass;
54 }
55 
56 
57 
58 double TagNProbe::mass_obj( const TIDA::Track* t1, const TIDA::Track* t2, TrigObjectMatcher* tom ) const {
59 
60  if ( tom!=0 && tom->status() ) {
61  return mass( tom->object(t1->id()), tom->object(t2->id()) );
62  }
63  else {
64  return mass( t1, t2 );
65  }
66 
67 }
68 
69 
70 double TagNProbe::mass_obj( const TIDA::Track* t1, const TIDA::Track* t2, TrigObjectMatcher* tom_tag, TrigObjectMatcher* tom_probe ) const {
71 
72  if ( tom_tag!=0 && tom_tag->status() && tom_probe!=0 && tom_probe->status() ) {
74  return mass( tom_tag->object(t1->id()), tom_probe->object(t2->id()) );
75  }
76  else if ( tom_tag!=0 && tom_tag->status() ) {
78  return mass( tom_tag->object(t1->id()), t2 );
79  }
80  else if ( tom_probe!=0 && tom_probe->status() ) {
82  return mass( t1, tom_probe->object(t2->id()) );
83  }
84  else {
86  return mass( t1, t2 );
87  }
88 
89 }
90 
91 
92 TIDA::Chain* TagNProbe::findChain( const std::string& chainname, std::vector<TIDA::Chain>& chains ) const {
93  for ( size_t i=chains.size() ; i-- ; ) {
94  if ( chains[i].name() == chainname ) return &chains[i];
95  }
96  return 0;
97 }
98 
99 
ALFA_EventTPCnv_Dict::t1
std::vector< ALFA_RawDataCollection_p1 > t1
Definition: ALFA_EventTPCnvDict.h:43
TagNProbe::m_particleType1
std::string m_particleType1
Definition: TagNProbe.h:208
TagNProbe::m_particleType0
std::string m_particleType0
Definition: TagNProbe.h:207
TagNProbe::construct
void construct()
Definition: TagNProbe.cxx:42
TagNProbe::findChain
TIDA::Chain * findChain(const std::string &chainname, std::vector< TIDA::Chain > &chains) const
Definition: TagNProbe.cxx:92
TagNProbe::m_mass0
double m_mass0
Definition: TagNProbe.h:210
TagNProbe.h
emacs: this is -*- c++ -*-
TrigObjectMatcher
Definition: TrigObjectMatcher.h:24
lumiFormat.i
int i
Definition: lumiFormat.py:92
TrigObjectMatcher::status
bool status() const
Definition: TrigObjectMatcher.h:67
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TIDA::Chain
Definition: TIDAChain.h:28
python.copyTCTOutput.chains
chains
Definition: copyTCTOutput.py:81
ALFA_EventTPCnv_Dict::t2
std::vector< ALFA_RawDataContainer_p1 > t2
Definition: ALFA_EventTPCnvDict.h:44
TagNProbe::TagNProbe
TagNProbe(const std::string &refName, double massMin, double massMax, bool unique_flag=true)
Definition: TagNProbe.cxx:28
TIDA::Track
Definition: Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/Track.h:26
TagNProbe::mass_obj
double mass_obj(const TIDA::Track *t1, const TIDA::Track *t2, TrigObjectMatcher *tom=0) const
Definition: TagNProbe.cxx:58
TagNProbe::m_mass1
double m_mass1
Definition: TagNProbe.h:211
TagNProbe::mass
double mass(const T1 *t1, const T2 *t2) const
Definition: TagNProbe.h:128
TrigObjectMatcher::object
const TrackTrigObject * object(unsigned long track_id)
Definition: TrigObjectMatcher.h:61