ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::TrkOrigin Namespace Reference

Enumerations

enum  OriginType {
  Fake =0 , Pileup , KshortDecay , StrangeMesonDecay ,
  LambdaDecay , StrangeBaryonDecay , TauDecay , GammaConversion ,
  OtherDecay , HadronicInteraction , OtherSecondary , BHadronDecay ,
  DHadronDecay , Fragmentation , OtherOrigin
}

Functions

bool isFake (int origin)
 Helper functions.
bool isPileup (int origin)
 from pileup
bool isV0Decay (int origin)
 from V0
bool isKshortDecay (int origin)
 from Kshort decay
bool isLambdaDecay (int origin)
 from Lambda decay
bool isStrangeMesonDecay (int origin)
 from strange meson decay
bool isStrangeBaryonDecay (int origin)
 from strange baryon decay
bool isGammaConversion (int origin)
 from conversions
bool isHadronicInteraction (int origin)
 from hadronic interactions
bool isFromTau (int origin)
 from tau decay
bool isSecondary (int origin)
 from long living particle decays or gamma conversions or hadronic interactions and anything else with barcode > 200000
bool isFromB (int origin)
 from B decay chain including B-->D
bool isFromD (int origin)
 from D decay chain including B-->D
bool isFromBNotFromD (int origin)
 from B decay chain excluding B-->D
bool isFromDNotFromB (int origin)
 from D decay chain excluding B-->D
bool isFromDfromB (int origin)
 from B-->D decay chain
bool isFragmentation (int origin)
 not from B, D, or any secondary
bool isPrimary (int origin)
 not fake, not pileup, not secondaries
int getTrkOrigin (int exclusiveOrigin)

Enumeration Type Documentation

◆ OriginType

Enumerator
Fake 
Pileup 
KshortDecay 
StrangeMesonDecay 
LambdaDecay 
StrangeBaryonDecay 
TauDecay 
GammaConversion 
OtherDecay 
HadronicInteraction 
OtherSecondary 
BHadronDecay 
DHadronDecay 
Fragmentation 
OtherOrigin 

Definition at line 29 of file InDetTrackTruthOriginDefs.h.

29 {
30 // fake
31 Fake=0,
32 // pileup
33 Pileup,
34 // secondaries
44 // B/D decays
47 // fragmentation
49 // unknown?
51 };

Function Documentation

◆ getTrkOrigin()

int InDet::TrkOrigin::getTrkOrigin ( int exclusiveOrigin)
inline

Definition at line 170 of file InDetTrackTruthOriginDefs.h.

170 {
171 /*
172 input is exclusive origin enum value
173 Here we convert from exclusive origin (used by ftag) to trk origin (bitmask used by track truth tools)
174 */
175 switch (exclusiveOrigin) {
177 return (0x1 << Pileup);
179 return (0x1 << Fake);
181 return (0x1 << BHadronDecay);
183 return (0x1 << BHadronDecay) | (0x1 << DHadronDecay);
185 return (0x1 << DHadronDecay);
187 return (0x1 << TauDecay);
189 return (0x1 << StrangeMesonDecay) | (0x1 << StrangeBaryonDecay) | (0x1 << GammaConversion) | (0x1 << HadronicInteraction) | (0x1 << OtherDecay) | (0x1 << OtherSecondary);
191 return 0; // primary tracks have no bits set
192 default:
193 return (0x1 << OtherOrigin);
194 }
195 }

◆ isFake()

bool InDet::TrkOrigin::isFake ( int origin)
inline

Helper functions.

fake

Definition at line 56 of file InDetTrackTruthOriginDefs.h.

56 {
57 if (origin & (0x1 << Fake)) return true;
58 return false;
59 }

◆ isFragmentation()

bool InDet::TrkOrigin::isFragmentation ( int origin)
inline

not from B, D, or any secondary

Definition at line 156 of file InDetTrackTruthOriginDefs.h.

156 {
157 if (origin & (0x1 << Fragmentation)) return true;
158 return false;
159 }

◆ isFromB()

bool InDet::TrkOrigin::isFromB ( int origin)
inline

from B decay chain including B-->D

Definition at line 124 of file InDetTrackTruthOriginDefs.h.

124 {
125 if (origin & (0x1 << BHadronDecay)) return true;
126 return false;
127 }

◆ isFromBNotFromD()

bool InDet::TrkOrigin::isFromBNotFromD ( int origin)
inline

from B decay chain excluding B-->D

Definition at line 136 of file InDetTrackTruthOriginDefs.h.

136 {
137 if (isFromD(origin)) return false;
138 if (origin & (0x1 << BHadronDecay)) return true;
139 return false;
140 }
bool isFromD(int origin)
from D decay chain including B-->D

◆ isFromD()

bool InDet::TrkOrigin::isFromD ( int origin)
inline

from D decay chain including B-->D

Definition at line 130 of file InDetTrackTruthOriginDefs.h.

130 {
131 if (origin & (0x1 << DHadronDecay)) return true;
132 return false;
133 }

◆ isFromDfromB()

bool InDet::TrkOrigin::isFromDfromB ( int origin)
inline

from B-->D decay chain

Definition at line 150 of file InDetTrackTruthOriginDefs.h.

150 {
151 if (isFromB(origin) && isFromD(origin)) return true;
152 return false;
153 }
bool isFromB(int origin)
from B decay chain including B-->D

◆ isFromDNotFromB()

bool InDet::TrkOrigin::isFromDNotFromB ( int origin)
inline

from D decay chain excluding B-->D

Definition at line 143 of file InDetTrackTruthOriginDefs.h.

143 {
144 if (isFromB(origin)) return false;
145 if (origin & (0x1 << DHadronDecay)) return true;
146 return false;
147 }

◆ isFromTau()

bool InDet::TrkOrigin::isFromTau ( int origin)
inline

from tau decay

Definition at line 111 of file InDetTrackTruthOriginDefs.h.

111 {
112 if (origin & (0x1 << TauDecay)) return true;
113 return false;
114 }

◆ isGammaConversion()

bool InDet::TrkOrigin::isGammaConversion ( int origin)
inline

from conversions

Definition at line 99 of file InDetTrackTruthOriginDefs.h.

99 {
100 if (origin & (0x1 << GammaConversion)) return true;
101 return false;
102 }

◆ isHadronicInteraction()

bool InDet::TrkOrigin::isHadronicInteraction ( int origin)
inline

from hadronic interactions

Definition at line 105 of file InDetTrackTruthOriginDefs.h.

105 {
106 if (origin & (0x1 << HadronicInteraction)) return true;
107 return false;
108 }

◆ isKshortDecay()

bool InDet::TrkOrigin::isKshortDecay ( int origin)
inline

from Kshort decay

Definition at line 75 of file InDetTrackTruthOriginDefs.h.

75 {
76 if (origin & (0x1 << KshortDecay)) return true;
77 return false;
78 }

◆ isLambdaDecay()

bool InDet::TrkOrigin::isLambdaDecay ( int origin)
inline

from Lambda decay

Definition at line 81 of file InDetTrackTruthOriginDefs.h.

81 {
82 if (origin & (0x1 << LambdaDecay)) return true;
83 return false;
84 }

◆ isPileup()

bool InDet::TrkOrigin::isPileup ( int origin)
inline

from pileup

Definition at line 62 of file InDetTrackTruthOriginDefs.h.

62 {
63 if (origin & (0x1 << Pileup)) return true;
64 return false;
65 }

◆ isPrimary()

bool InDet::TrkOrigin::isPrimary ( int origin)
inline

not fake, not pileup, not secondaries

Definition at line 162 of file InDetTrackTruthOriginDefs.h.

162 {
163 if (isFake(origin)) return false;
164 if (isPileup(origin)) return false;
165 if (isSecondary(origin)) return false;
166 if (origin & (0x1 << OtherOrigin)) return false;
167 return true;
168 }
bool isPileup(int origin)
from pileup
bool isSecondary(int origin)
from long living particle decays or gamma conversions or hadronic interactions and anything else with...
bool isFake(int origin)
Helper functions.

◆ isSecondary()

bool InDet::TrkOrigin::isSecondary ( int origin)
inline

from long living particle decays or gamma conversions or hadronic interactions and anything else with barcode > 200000

Definition at line 117 of file InDetTrackTruthOriginDefs.h.

117 {
118 static constexpr auto bit=[](int bitpos){return 0x1<<bitpos;};
119 static constexpr int isSecondaryMask=bit(StrangeMesonDecay)|bit(StrangeBaryonDecay)|bit(GammaConversion)|bit(HadronicInteraction)|bit(OtherDecay)|bit(OtherSecondary);
120 return (origin & isSecondaryMask);
121 }

◆ isStrangeBaryonDecay()

bool InDet::TrkOrigin::isStrangeBaryonDecay ( int origin)
inline

from strange baryon decay

Definition at line 93 of file InDetTrackTruthOriginDefs.h.

93 {
94 if (origin & (0x1 << StrangeBaryonDecay)) return true;
95 return false;
96 }

◆ isStrangeMesonDecay()

bool InDet::TrkOrigin::isStrangeMesonDecay ( int origin)
inline

from strange meson decay

Definition at line 87 of file InDetTrackTruthOriginDefs.h.

87 {
88 if (origin & (0x1 << StrangeMesonDecay)) return true;
89 return false;
90 }

◆ isV0Decay()

bool InDet::TrkOrigin::isV0Decay ( int origin)
inline

from V0

Definition at line 68 of file InDetTrackTruthOriginDefs.h.

68 {
69 if (origin & (0x1 << KshortDecay)) return true;
70 if (origin & (0x1 << LambdaDecay)) return true;
71 return false;
72 }