ATLAS Offline Software
Classes | Typedefs | Functions
IDTPM Namespace Reference

Athena include(s). More...

Classes

class  DeltaRMatchingTool_trk
 
class  DeltaRMatchingTool_trkTruth
 
class  DeltaRMatchingTool_truthTrk
 
class  DeltaRMatchingToolBase
 
class  EfficiencyPlots
 
class  IPlotsDefReadTool
 
class  ITrackMatchingLookup
 
class  ITrackMatchingTool
 
class  ITrackSelectionTool
 
class  JsonPlotsDefReadTool
 
class  OfflineElectronDecoratorAlg
 
class  OfflineElectronPlots
 
class  OfflineMuonDecoratorAlg
 
class  OfflineTauDecoratorAlg
 
class  OfflineTrackQualitySelectionTool
 Uses InDetTrackSelection tool and working points defined there for tracks quality selection In future it is possible that the selection cuts & logic will be moved here. More...
 
class  PlotMgr
 
class  ResolutionPlots
 
class  RoiSelectionTool
 
class  SinglePlotDefinition
 
class  TrackAnalysisCollections
 
class  TrackAnalysisPlotsMgr
 
class  TrackMatchingLookup_trk
 
class  TrackMatchingLookup_trkTruth
 
class  TrackMatchingLookup_truthTrk
 
class  TrackMatchingLookupBase
 
class  TrackObjectSelectionTool
 
class  TrackParametersPlots
 
class  TrackQualitySelectionTool
 
class  TrackRoiSelectionTool
 
class  TrackTruthMatchingTool
 
class  TruthHitDecoratorAlg
 
class  TruthTrackMatchingTool
 
class  TruthTrackQualitySelectionTool
 

Typedefs

typedef TrigCompositeUtils::LinkInfo< TrigRoiDescriptorCollectionroiCollection_t
 
template<class ContainerType , class VariableType >
using WriteKeyAccessorPair = std::pair< SG::WriteDecorHandleKey< ContainerType >, SG::AuxElement::ConstAccessor< VariableType > >
 Useful declarations. More...
 
template<class ContainerType , class VariableType >
using WriteAccessorRefPair = std::pair< SG::WriteDecorHandle< ContainerType, VariableType >, SG::AuxElement::ConstAccessor< VariableType > & >
 
template<class ContainerType , class VariableType >
using OptionalDecoration = std::pair< SG::WriteDecorHandle< ContainerType, VariableType >, bool >
 

Functions

const xAOD::ElectrongetLinkedElectron (const xAOD::TrackParticle &track, const std::string &quality)
 getLinkedElectron More...
 
const xAOD::MuongetLinkedMuon (const xAOD::TrackParticle &track, const std::string &quality)
 getLinkedMuon More...
 
const xAOD::TauJetgetLinkedTau (const xAOD::TrackParticle &track, const int requiredNtracks, const std::string &type, const std::string &quality)
 getLinkedTau More...
 
bool isUnlinkedTruth (const xAOD::TrackParticle &track)
 isUnlinkedTruth More...
 
float getTruthMatchProb (const xAOD::TrackParticle &track)
 getTruthMatchProb More...
 
const xAOD::TruthParticlegetLinkedTruth (const xAOD::TrackParticle &track, const float truthProbCut)
 getLinkedTruth More...
 
template<typename container_t >
bool isUnlinkedObject (const xAOD::TrackParticle &track, const std::string &decoName)
 Templated method to check if a track is not linked to an object. More...
 
template<typename container_t >
container_t::const_value_type getLinkedObject (const xAOD::TrackParticle &track, const std::string &decoName)
 Templated method to retrieve object linked to a track. More...
 
template<class T_Parent , class T_Cont , class T >
void createDecoratorKeysAndAccessor (T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< WriteKeyAccessorPair< T_Cont, T > > &decor_out)
 create a pair composed of a WriteDecorHandleKey to create a decorator handle and an accessor to check the availablilty of a decoration More...
 
template<class T_Parent , class T_Cont >
void createDecoratorKeys (T_Parent &parent, const SG::ReadHandleKey< T_Cont > &container_key, const std::string &prefix, const std::vector< std::string > &decor_names, std::vector< SG::WriteDecorHandleKey< T_Cont > > &decor_out)
 like createDecoratorKeysAndAccessor but without the accessor to check the availablilty of a decoration More...
 
template<class T_Cont , class T >
std::vector< OptionalDecoration< T_Cont, T > > createDecoratorsIfNeeded (const T_Cont &container, const std::vector< WriteKeyAccessorPair< T_Cont, T > > &keys, const EventContext &ctx, bool verbose=false)
 Like above - FIXME: maybe not needed. More...
 
template<class T_Cont , class T >
std::vector< SG::WriteDecorHandle< T_Cont, T > > createDecorators (const std::vector< SG::WriteDecorHandleKey< T_Cont > > &keys, const EventContext &ctx)
 similar to createDecoratorsIfNeeded, but without the checking if decorations already exist More...
 
template<class T_Cont , class T_Cont_Elm , class T >
void decorateOrWarnIfUnequal (const T_Cont_Elm &particle, WriteAccessorRefPair< T_Cont, T > &decorator, const T &value)
 Fill the decoration if it deas not exist or it has a different value. More...
 
template<class T_Cont , class T_Cont_Elm , class T >
void decorateOrRejectQuietly (const T_Cont_Elm &particle, OptionalDecoration< T_Cont, T > &decorator, const T &value)
 Safe method to fill the decoration if decor flag is true. More...
 
template<class T_Cont , class T_Cont_Elm , class T >
void decorate (const T_Cont_Elm &particle, OptionalDecoration< T_Cont, T > &decorator, const T &value)
 unsafe fill decoration method for convenience More...
 
template<class U >
float pT (const U &p)
 Accessor utility function for getting the value of pT. More...
 
template<class U >
float pTsig (const U &p)
 Accessor utility function for getting the value of signed pT. More...
 
template<class U >
float eta (const U &p)
 Accessor utility function for getting the value of eta. More...
 
float getTheta (const xAOD::TrackParticle &p)
 Accessor utility function for getting the value of theta. More...
 
float getTheta (const xAOD::TruthParticle &p)
 
template<class U >
float theta (const U &p)
 
template<class U >
float phi (const U &p)
 Accessor utility function for getting the value of phi. More...
 
float getZ0 (const xAOD::TrackParticle &p)
 Accessor utility function for getting the value of z0. More...
 
float getZ0 (const xAOD::TruthParticle &p)
 
template<class U >
float z0 (const U &p)
 
template<class U >
float z0SinTheta (const U &p)
 
float getD0 (const xAOD::TrackParticle &p)
 Accessor utility function for getting the value of d0. More...
 
float getD0 (const xAOD::TruthParticle &p)
 
template<class U >
float d0 (const U &p)
 
float getProdR (const xAOD::TrackParticle &)
 Accessor utility function for getting the value of R. More...
 
float getProdR (const xAOD::TruthParticle &p)
 
template<class U >
float prodR (const U &p)
 
float getProdZ (const xAOD::TrackParticle &)
 Accessor utility function for getting the value of Z. More...
 
float getProdZ (const xAOD::TruthParticle &p)
 
template<class U >
float prodZ (const U &p)
 
float getR (const xAOD::TrackParticle &)
 Accessor utility function for getting the value of prodR. More...
 
float getR (const xAOD::TruthParticle &p)
 
template<class U >
float R (const U &p)
 
float getZ (const xAOD::TrackParticle &)
 Accessor utility function for getting the value of prodZ. More...
 
float getZ (const xAOD::TruthParticle &p)
 
template<class U >
float Z (const U &p)
 
float getQoverP (const xAOD::TrackParticle &p)
 Accessor utility function for getting the value of qOverP. More...
 
float getQoverP (const xAOD::TruthParticle &p)
 
template<class U >
float qOverP (const U &p)
 
template<class U >
float qOverPT (const U &p)
 
template<class U >
float eTot (const U &p)
 Accessor utility function for getting the value of Energy. More...
 
template<class U >
float eT (const U &p)
 Accessor utility function for getting the value of Tranverse energy. More...
 
float getChiSquared (const xAOD::TrackParticle &p)
 Accessor utility function for getting the value of chi^2. More...
 
float getChiSquared (const xAOD::TruthParticle &)
 
template<class U >
float chiSquared (const U &p)
 
float getNdof (const xAOD::TrackParticle &p)
 Accessor utility function for getting the value of #dof. More...
 
float getNdof (const xAOD::TruthParticle &)
 
template<class U >
float ndof (const U &p)
 
float getTrackParameterError (const xAOD::TrackParticle &p, Trk::ParamDefs param)
 Accessor utilify function for track parameter uncertainty. More...
 
float getTrackParameterError (const xAOD::TruthParticle &, Trk::ParamDefs)
 
template<class U >
float trackParameterError (const U &p, Trk::ParamDefs param)
 
float getQOverPtError (const xAOD::TrackParticle &p)
 
float getQOverPtError (const xAOD::TruthParticle &)
 
template<class U >
float qOverPtError (const U &p)
 
template<class U >
float pTError (const U &p)
 
float getZ0SinThetaError (const xAOD::TrackParticle &p)
 
float getZ0SinThetaError (const xAOD::TruthParticle &)
 
template<class U >
float z0SinThetaError (const U &p)
 
template<class U1 , class U2 = U1>
float deltaPhi (const U1 &p1, const U2 &p2)
 Accessor utility function for getting the DeltaPhi betwen two tracks. More...
 
template<class U1 , class U2 = U1>
float deltaEta (const U1 &p1, const U2 &p2)
 Accessor utility function for getting the DeltaEta betwen two tracks. More...
 
template<class U1 , class U2 = U1>
float deltaR (const U1 &p1, const U2 &p2)
 Accessor utility function for getting the DeltaR betwen two tracks. More...
 

Detailed Description

Athena include(s).

Gaudi includes.

xAOD includes

local includes

Athena includes.

Athena include(s)

STL include(s)

Local include(s)

STD includes

STL include(s) xAOD includes

EDM includes STL includes

Local includes

xAOD includes STL includes Local includes

STL includes

local include(s) STL include(s)

EDM includes local includes STD includes

local includes STD includes

Local include(s) EDM includes

Local include(s) STD includes

Athena includes EDM includes STD includes Local includes

Typedef Documentation

◆ OptionalDecoration

template<class ContainerType , class VariableType >
using IDTPM::OptionalDecoration = typedef std::pair< SG::WriteDecorHandle<ContainerType, VariableType>, bool >

Definition at line 46 of file SafeDecorator.h.

◆ roiCollection_t

Definition at line 30 of file RoiSelectionTool.h.

◆ WriteAccessorRefPair

template<class ContainerType , class VariableType >
using IDTPM::WriteAccessorRefPair = typedef std::pair< SG::WriteDecorHandle<ContainerType, VariableType>, SG::AuxElement::ConstAccessor<VariableType>& >

Definition at line 41 of file SafeDecorator.h.

◆ WriteKeyAccessorPair

template<class ContainerType , class VariableType >
using IDTPM::WriteKeyAccessorPair = typedef std::pair< SG::WriteDecorHandleKey<ContainerType>, SG::AuxElement::ConstAccessor<VariableType> >

Useful declarations.

Definition at line 36 of file SafeDecorator.h.

Function Documentation

◆ chiSquared()

template<class U >
float IDTPM::chiSquared ( const U &  p)
inline

Definition at line 136 of file TrackParametersHelper.h.

136 { return getChiSquared(p); }

◆ createDecoratorKeys()

template<class T_Parent , class T_Cont >
void IDTPM::createDecoratorKeys ( T_Parent &  parent,
const SG::ReadHandleKey< T_Cont > &  container_key,
const std::string &  prefix,
const std::vector< std::string > &  decor_names,
std::vector< SG::WriteDecorHandleKey< T_Cont > > &  decor_out 
)

like createDecoratorKeysAndAccessor but without the accessor to check the availablilty of a decoration

Definition at line 75 of file SafeDecorator.h.

81  {
82  decor_out.clear();
83  decor_out.reserve( decor_names.size() );
84  for (const std::string &a_decor_name : decor_names) {
85  assert( !a_decor_name.empty() );
86  decor_out.emplace_back( container_key.key()+"."+prefix+a_decor_name );
87  // need to declare handles, otherwise the scheduler would not
88  // pick up the data dependencies introduced by the decorations
89  parent.declare( decor_out.back() );
90  decor_out.back().setOwner(&parent);
91  decor_out.back().initialize().ignore();
92  }
93  }

◆ createDecoratorKeysAndAccessor()

template<class T_Parent , class T_Cont , class T >
void IDTPM::createDecoratorKeysAndAccessor ( T_Parent &  parent,
const SG::ReadHandleKey< T_Cont > &  container_key,
const std::string &  prefix,
const std::vector< std::string > &  decor_names,
std::vector< WriteKeyAccessorPair< T_Cont, T > > &  decor_out 
)

create a pair composed of a WriteDecorHandleKey to create a decorator handle and an accessor to check the availablilty of a decoration

Definition at line 52 of file SafeDecorator.h.

58  {
59  decor_out.clear();
60  decor_out.reserve( decor_names.size() );
61  for( const std::string& a_decor_name: decor_names ) {
62  decor_out.emplace_back(
63  SG::WriteDecorHandleKey< T_Cont >( container_key.key()+"."+prefix+a_decor_name ),
65  );
66  parent.declare( decor_out.back().first );
67  decor_out.back().first.setOwner( &parent );
68  decor_out.back().first.initialize().ignore();
69  }
70  }

◆ createDecorators()

template<class T_Cont , class T >
std::vector< SG::WriteDecorHandle< T_Cont, T > > IDTPM::createDecorators ( const std::vector< SG::WriteDecorHandleKey< T_Cont > > &  keys,
const EventContext &  ctx 
)

similar to createDecoratorsIfNeeded, but without the checking if decorations already exist

Definition at line 159 of file SafeDecorator.h.

162  {
163  std::vector< SG::WriteDecorHandle< T_Cont, T > > out;
164  out.reserve( keys.size() );
165  for( const SG::WriteDecorHandleKey< T_Cont >& a_key : keys ) {
166  out.emplace_back( a_key, ctx );
167  if( not out.back().isValid() ) {
168  std::stringstream msg;
169  msg << "Failed to create decorator handle " << a_key.key();
170  throw std::runtime_error( msg.str() );
171  }
172  } // close SG::WriteDecorHandleKey loop
173  return out;
174  }

◆ createDecoratorsIfNeeded()

template<class T_Cont , class T >
std::vector< OptionalDecoration< T_Cont,T > > IDTPM::createDecoratorsIfNeeded ( const T_Cont &  container,
const std::vector< WriteKeyAccessorPair< T_Cont, T > > &  keys,
const EventContext &  ctx,
bool  verbose = false 
)

Like above - FIXME: maybe not needed.

create/book the decorations if they do not exist already

Definition at line 114 of file SafeDecorator.h.

119  {
120  std::vector< OptionalDecoration< T_Cont, T > > out;
121  bool all_available = true;
122  if( !container.empty() ) {
123  std::vector<bool> decorate;
124  decorate.reserve( keys.size() );
125  for( const WriteKeyAccessorPair< T_Cont, T >& a_key : keys ) {
126  decorate.push_back( !a_key.second.isAvailable( *container[0] ) );
127  all_available &= !decorate.back();
128  if( verbose && !decorate.back() ) {
129  std::cout << "WARNING IDTPM::createDecoratorsIfNeeded: Decoration "
130  << a_key.first.key() << " already exists; reject update."
131  << std::endl;
132  } // close if( verbose && !decorate.back() )
133  } // close WriteKeyAccessorPair loop
134 
135  if( !all_available ) {
136  std::size_t idx = 0;
137  out.reserve( keys.size() );
138  for( const WriteKeyAccessorPair< T_Cont, T >& a_key : keys ) {
139  assert( idx < decorate.size() );
140  out.emplace_back(
141  SG::WriteDecorHandle< T_Cont,T >( a_key.first, ctx ),
142  decorate[idx++]
143  );
144  if( not out.back().first.isPresent() ) {
145  std::stringstream msg;
146  msg << "Container " << a_key.first.key()
147  << " to be decorated does not exist.";
148  throw std::runtime_error( msg.str() );
149  } // close if( not out.back().first.isPresent() )
150  } // close WriteKeyAccessorPair loop
151  } // close if( !all_available )
152  } // close if( !container.empty() )
153  return out;
154  }

◆ d0()

template<class U >
float IDTPM::d0 ( const U &  p)
inline

Definition at line 74 of file TrackParametersHelper.h.

74 { return getD0( p ); }

◆ decorate()

template<class T_Cont , class T_Cont_Elm , class T >
void IDTPM::decorate ( const T_Cont_Elm &  particle,
OptionalDecoration< T_Cont, T > &  decorator,
const T &  value 
)

unsafe fill decoration method for convenience

Definition at line 209 of file SafeDecorator.h.

213  {
214  decorator.first( particle ) = value;
215  }

◆ decorateOrRejectQuietly()

template<class T_Cont , class T_Cont_Elm , class T >
void IDTPM::decorateOrRejectQuietly ( const T_Cont_Elm &  particle,
OptionalDecoration< T_Cont, T > &  decorator,
const T &  value 
)

Safe method to fill the decoration if decor flag is true.

Definition at line 197 of file SafeDecorator.h.

201  {
202  if( decorator.second ) {
203  decorator.first( particle ) = value;
204  }
205  }

◆ decorateOrWarnIfUnequal()

template<class T_Cont , class T_Cont_Elm , class T >
void IDTPM::decorateOrWarnIfUnequal ( const T_Cont_Elm &  particle,
WriteAccessorRefPair< T_Cont, T > &  decorator,
const T &  value 
)

Fill the decoration if it deas not exist or it has a different value.

Definition at line 178 of file SafeDecorator.h.

182  {
183  if( !decorator.second.isAvailable( particle ) ) {
184  const T existing = decorator.second( particle );
185  if( not CxxUtils::fpcompare::equal( existing, value ) ) {
186  std::cout << "WARNING IDTPM::safeDecorator: " << decorator.first.decorKey()
187  << " Already exists on this object with a different value."
188  << std::endl;
189  }
190  } else {
191  decorator.first( particle ) = value;
192  }
193  }

◆ deltaEta()

template<class U1 , class U2 = U1>
float IDTPM::deltaEta ( const U1 &  p1,
const U2 &  p2 
)
inline

Accessor utility function for getting the DeltaEta betwen two tracks.

Definition at line 189 of file TrackParametersHelper.h.

189  {
190  return ( eta(p1) - eta(p2) );
191  }

◆ deltaPhi()

template<class U1 , class U2 = U1>
float IDTPM::deltaPhi ( const U1 &  p1,
const U2 &  p2 
)
inline

Accessor utility function for getting the DeltaPhi betwen two tracks.

Definition at line 183 of file TrackParametersHelper.h.

183  {
184  return p1.p4().DeltaPhi( p2.p4() );
185  }

◆ deltaR()

template<class U1 , class U2 = U1>
float IDTPM::deltaR ( const U1 &  p1,
const U2 &  p2 
)
inline

Accessor utility function for getting the DeltaR betwen two tracks.

Definition at line 195 of file TrackParametersHelper.h.

195  {
196  return p1.p4().DeltaR( p2.p4() );
197  }

◆ eT()

template<class U >
float IDTPM::eT ( const U &  p)
inline

Accessor utility function for getting the value of Tranverse energy.

Definition at line 130 of file TrackParametersHelper.h.

130 { return p.p4().Et(); }

◆ eta()

template<class U >
float IDTPM::eta ( const U &  p)
inline

Accessor utility function for getting the value of eta.

Definition at line 40 of file TrackParametersHelper.h.

40 { return p.eta(); }

◆ eTot()

template<class U >
float IDTPM::eTot ( const U &  p)
inline

Accessor utility function for getting the value of Energy.

Definition at line 126 of file TrackParametersHelper.h.

126 { return p.e(); }

◆ getChiSquared() [1/2]

float IDTPM::getChiSquared ( const xAOD::TrackParticle p)
inline

Accessor utility function for getting the value of chi^2.

Definition at line 133 of file TrackParametersHelper.h.

133 { return p.chiSquared(); }

◆ getChiSquared() [2/2]

float IDTPM::getChiSquared ( const xAOD::TruthParticle )
inline

Definition at line 134 of file TrackParametersHelper.h.

134 { return -9999; }

◆ getD0() [1/2]

float IDTPM::getD0 ( const xAOD::TrackParticle p)
inline

Accessor utility function for getting the value of d0.

Definition at line 68 of file TrackParametersHelper.h.

68 { return p.d0(); }

◆ getD0() [2/2]

float IDTPM::getD0 ( const xAOD::TruthParticle p)
inline

Definition at line 69 of file TrackParametersHelper.h.

69  {
70  static thread_local SG::ConstAccessor<float> d0Acc("d0");
71  return (d0Acc.isAvailable(p)) ? d0Acc(p) : -9999.;
72  }

◆ getLinkedElectron()

const xAOD::Electron * IDTPM::getLinkedElectron ( const xAOD::TrackParticle track,
const std::string &  quality 
)

getLinkedElectron

Non-templated methods For offline electrons.

Definition at line 17 of file OfflineObjectDecorHelper.cxx.

18  {
19  std::string decoName = "LinkedElectron_" + quality;
20  return getLinkedObject< xAOD::ElectronContainer >( track, decoName );
21  }

◆ getLinkedMuon()

const xAOD::Muon * IDTPM::getLinkedMuon ( const xAOD::TrackParticle track,
const std::string &  quality 
)

getLinkedMuon

For offline muons.

Definition at line 25 of file OfflineObjectDecorHelper.cxx.

26  {
27  std::string decoName = "LinkedMuon_" + quality;
28  return getLinkedObject< xAOD::MuonContainer >( track, decoName );
29  }

◆ getLinkedObject()

template<typename container_t >
container_t::const_value_type IDTPM::getLinkedObject ( const xAOD::TrackParticle track,
const std::string &  decoName 
)

Templated method to retrieve object linked to a track.

Definition at line 39 of file OfflineObjectDecorHelper.h.

42  {
43  using elementLink_t = ElementLink< container_t >;
44 
45  if( isUnlinkedObject< container_t >( track, decoName ) ) return nullptr;
46 
47  elementLink_t eleLink = track.auxdata< elementLink_t >( decoName );
48 
49  if( not eleLink.isValid() ) return nullptr;
50 
51  return *eleLink;
52  }

◆ getLinkedTau()

const xAOD::TauJet * IDTPM::getLinkedTau ( const xAOD::TrackParticle track,
const int  requiredNtracks,
const std::string &  type,
const std::string &  quality 
)

getLinkedTau

For offline hadronic taus.

Definition at line 33 of file OfflineObjectDecorHelper.cxx.

36  {
37  std::string decoName = "LinkedTau" + type +
38  std::to_string( requiredNtracks ) + "_" + quality;
39  return getLinkedObject< xAOD::TauJetContainer >( track, decoName );
40  }

◆ getLinkedTruth()

const xAOD::TruthParticle * IDTPM::getLinkedTruth ( const xAOD::TrackParticle track,
const float  truthProbCut 
)

getLinkedTruth

Definition at line 58 of file OfflineObjectDecorHelper.cxx.

59  {
60  float prob = getTruthMatchProb( track );
61  if( prob < truthProbCut ) return nullptr;
62 
63  return getLinkedObject< xAOD::TruthParticleContainer >(
64  track, "truthParticleLink" );
65  }

◆ getNdof() [1/2]

float IDTPM::getNdof ( const xAOD::TrackParticle p)
inline

Accessor utility function for getting the value of #dof.

Definition at line 139 of file TrackParametersHelper.h.

139 { return p.numberDoF(); }

◆ getNdof() [2/2]

float IDTPM::getNdof ( const xAOD::TruthParticle )
inline

Definition at line 140 of file TrackParametersHelper.h.

140 { return -9999; }

◆ getProdR() [1/2]

float IDTPM::getProdR ( const xAOD::TrackParticle )
inline

Accessor utility function for getting the value of R.

Definition at line 77 of file TrackParametersHelper.h.

77 { return -9999.; } //FIXME

◆ getProdR() [2/2]

float IDTPM::getProdR ( const xAOD::TruthParticle p)
inline

Definition at line 78 of file TrackParametersHelper.h.

78  {
79  static thread_local SG::ConstAccessor<float> prodRAcc("prodR");
80  return (prodRAcc.isAvailable(p)) ? prodRAcc(p) : -9999.;
81  }

◆ getProdZ() [1/2]

float IDTPM::getProdZ ( const xAOD::TrackParticle )
inline

Accessor utility function for getting the value of Z.

Definition at line 86 of file TrackParametersHelper.h.

86 { return -9999.; } //FIXME

◆ getProdZ() [2/2]

float IDTPM::getProdZ ( const xAOD::TruthParticle p)
inline

Definition at line 87 of file TrackParametersHelper.h.

87  {
88  static thread_local SG::ConstAccessor<float> prodZAcc("prodZ");
89  return (prodZAcc.isAvailable(p)) ? prodZAcc(p) : -9999.;
90  }

◆ getQoverP() [1/2]

float IDTPM::getQoverP ( const xAOD::TrackParticle p)
inline

Accessor utility function for getting the value of qOverP.

Definition at line 113 of file TrackParametersHelper.h.

113 { return p.qOverP(); }

◆ getQoverP() [2/2]

float IDTPM::getQoverP ( const xAOD::TruthParticle p)
inline

Definition at line 114 of file TrackParametersHelper.h.

114  {
115  static thread_local SG::ConstAccessor<float> qOverPAcc("qOverP");
116  return (qOverPAcc.isAvailable(p)) ? qOverPAcc(p) : -9999.;
117  }

◆ getQOverPtError() [1/2]

float IDTPM::getQOverPtError ( const xAOD::TrackParticle p)
inline

Definition at line 152 of file TrackParametersHelper.h.

152  {
153  float inverseSinTheta = 1./std::sin(p.theta());
154  float cosTheta = std::cos(p.theta());
155  float qOverPT_err2 =
156  std::pow(trackParameterError(p, Trk::qOverP) * inverseSinTheta, 2)
157  + std::pow(p.qOverP() * cosTheta * trackParameterError(p, Trk::theta) * std::pow(inverseSinTheta, 2), 2)
158  - 2 * p.qOverP() * cosTheta * p.definingParametersCovMatrix()(Trk::qOverP, Trk::theta) * std::pow(inverseSinTheta, 3);
159  return std::sqrt(qOverPT_err2);
160  }

◆ getQOverPtError() [2/2]

float IDTPM::getQOverPtError ( const xAOD::TruthParticle )
inline

Definition at line 161 of file TrackParametersHelper.h.

161 { return -9999; }

◆ getR() [1/2]

float IDTPM::getR ( const xAOD::TrackParticle )
inline

Accessor utility function for getting the value of prodR.

Definition at line 95 of file TrackParametersHelper.h.

95 { return -9999.; } //FIXME

◆ getR() [2/2]

float IDTPM::getR ( const xAOD::TruthParticle p)
inline

Definition at line 96 of file TrackParametersHelper.h.

96  {
97  return ( p.hasProdVtx() ) ?
98  (*p.prodVtx()).perp() : -9999.;
99  }

◆ getTheta() [1/2]

float IDTPM::getTheta ( const xAOD::TrackParticle p)
inline

Accessor utility function for getting the value of theta.

Definition at line 43 of file TrackParametersHelper.h.

43 { return p.theta(); }

◆ getTheta() [2/2]

float IDTPM::getTheta ( const xAOD::TruthParticle p)
inline

Definition at line 44 of file TrackParametersHelper.h.

44  {
45  static thread_local SG::ConstAccessor<float> thetaAcc("theta");
46  return (thetaAcc.isAvailable(p)) ? thetaAcc(p) : -9999.;
47  }

◆ getTrackParameterError() [1/2]

float IDTPM::getTrackParameterError ( const xAOD::TrackParticle p,
Trk::ParamDefs  param 
)
inline

Accessor utilify function for track parameter uncertainty.

Definition at line 145 of file TrackParametersHelper.h.

145  {
146  return std::sqrt(p.definingParametersCovMatrix()(param, param));
147  }

◆ getTrackParameterError() [2/2]

float IDTPM::getTrackParameterError ( const xAOD::TruthParticle ,
Trk::ParamDefs   
)
inline

Definition at line 148 of file TrackParametersHelper.h.

148 { return -9999; }

◆ getTruthMatchProb()

float IDTPM::getTruthMatchProb ( const xAOD::TrackParticle track)

getTruthMatchProb

Definition at line 51 of file OfflineObjectDecorHelper.cxx.

51  {
52  return ( track.isAvailable< float >( "truthMatchProbability" ) ?
53  track.auxdata< float >( "truthMatchProbability" ) : -1. );
54  }

◆ getZ() [1/2]

float IDTPM::getZ ( const xAOD::TrackParticle )
inline

Accessor utility function for getting the value of prodZ.

Definition at line 104 of file TrackParametersHelper.h.

104 { return -9999.; } //FIXME

◆ getZ() [2/2]

float IDTPM::getZ ( const xAOD::TruthParticle p)
inline

Definition at line 105 of file TrackParametersHelper.h.

105  {
106  return ( p.hasProdVtx() ) ?
107  (*p.prodVtx()).z() : -9999.;
108  }

◆ getZ0() [1/2]

float IDTPM::getZ0 ( const xAOD::TrackParticle p)
inline

Accessor utility function for getting the value of z0.

Definition at line 56 of file TrackParametersHelper.h.

56 { return p.z0(); }

◆ getZ0() [2/2]

float IDTPM::getZ0 ( const xAOD::TruthParticle p)
inline

Definition at line 57 of file TrackParametersHelper.h.

57  {
58  static thread_local SG::ConstAccessor<float> z0Acc("z0");
59  return (z0Acc.isAvailable(p)) ? z0Acc(p) : -9999.;
60  }

◆ getZ0SinThetaError() [1/2]

float IDTPM::getZ0SinThetaError ( const xAOD::TrackParticle p)
inline

Definition at line 168 of file TrackParametersHelper.h.

168  {
169  float sinTheta = std::sin(p.theta());
170  float cosTheta = std::cos(p.theta());
171  float z0SinTheta_err2 =
172  std::pow(trackParameterError(p, Trk::z0) * sinTheta, 2)
173  + std::pow(p.z0() * cosTheta * trackParameterError(p, Trk::theta), 2)
174  + 2 * p.z0() * sinTheta * cosTheta * p.definingParametersCovMatrix()(Trk::z0, Trk::theta);
175  return std::sqrt(z0SinTheta_err2);
176  }

◆ getZ0SinThetaError() [2/2]

float IDTPM::getZ0SinThetaError ( const xAOD::TruthParticle )
inline

Definition at line 177 of file TrackParametersHelper.h.

177 { return -9999; }

◆ isUnlinkedObject()

template<typename container_t >
bool IDTPM::isUnlinkedObject ( const xAOD::TrackParticle track,
const std::string &  decoName 
)

Templated method to check if a track is not linked to an object.

Definition at line 31 of file OfflineObjectDecorHelper.h.

32  {
33  using elementLink_t = ElementLink< container_t >;
34  return ( not track.isAvailable< elementLink_t >( decoName ) );
35  }

◆ isUnlinkedTruth()

bool IDTPM::isUnlinkedTruth ( const xAOD::TrackParticle track)

isUnlinkedTruth

For truth particles.

Definition at line 44 of file OfflineObjectDecorHelper.cxx.

44  {
45  return isUnlinkedObject< xAOD::TruthParticleContainer >(
46  track, "truthParticleLink" );
47  }

◆ ndof()

template<class U >
float IDTPM::ndof ( const U &  p)
inline

Definition at line 142 of file TrackParametersHelper.h.

142 { return getNdof(p); }

◆ phi()

template<class U >
float IDTPM::phi ( const U &  p)
inline

Accessor utility function for getting the value of phi.

Definition at line 53 of file TrackParametersHelper.h.

53 { return p.phi(); }

◆ prodR()

template<class U >
float IDTPM::prodR ( const U &  p)
inline

Definition at line 83 of file TrackParametersHelper.h.

83 { return getProdR( p ); }

◆ prodZ()

template<class U >
float IDTPM::prodZ ( const U &  p)
inline

Definition at line 92 of file TrackParametersHelper.h.

92 { return getProdZ( p ); }

◆ pT()

template<class U >
float IDTPM::pT ( const U &  p)
inline

Accessor utility function for getting the value of pT.

Definition at line 30 of file TrackParametersHelper.h.

30 { return p.pt(); }

◆ pTError()

template<class U >
float IDTPM::pTError ( const U &  p)
inline

Definition at line 166 of file TrackParametersHelper.h.

166 { return qOverPtError(p) * std::pow(pT(p), 2); }

◆ pTsig()

template<class U >
float IDTPM::pTsig ( const U &  p)
inline

Accessor utility function for getting the value of signed pT.

Definition at line 34 of file TrackParametersHelper.h.

34  {
35  return p.charge() ? std::copysign( pT(p), p.charge() ) : 0.;
36  }

◆ qOverP()

template<class U >
float IDTPM::qOverP ( const U &  p)
inline

Definition at line 119 of file TrackParametersHelper.h.

119 { return getQoverP( p ); }

◆ qOverPT()

template<class U >
float IDTPM::qOverPT ( const U &  p)
inline

Definition at line 122 of file TrackParametersHelper.h.

122 { return qOverP( p ) / std::sin( theta( p ) ); }

◆ qOverPtError()

template<class U >
float IDTPM::qOverPtError ( const U &  p)
inline

Definition at line 163 of file TrackParametersHelper.h.

163 { return getQOverPtError(p); }

◆ R()

template<class U >
float IDTPM::R ( const U &  p)
inline

Definition at line 101 of file TrackParametersHelper.h.

101 { return getR( p ); }

◆ theta()

template<class U >
float IDTPM::theta ( const U &  p)
inline

Definition at line 49 of file TrackParametersHelper.h.

49 { return getTheta( p ); }

◆ trackParameterError()

template<class U >
float IDTPM::trackParameterError ( const U &  p,
Trk::ParamDefs  param 
)
inline

Definition at line 150 of file TrackParametersHelper.h.

150 { return getTrackParameterError(p, param); }

◆ Z()

template<class U >
float IDTPM::Z ( const U &  p)
inline

Definition at line 110 of file TrackParametersHelper.h.

110 { return getZ( p ); }

◆ z0()

template<class U >
float IDTPM::z0 ( const U &  p)
inline

Definition at line 62 of file TrackParametersHelper.h.

62 { return getZ0( p ); }

◆ z0SinTheta()

template<class U >
float IDTPM::z0SinTheta ( const U &  p)
inline

Definition at line 65 of file TrackParametersHelper.h.

65 { return z0( p ) * std::sin( theta( p ) ); }

◆ z0SinThetaError()

template<class U >
float IDTPM::z0SinThetaError ( const U &  p)
inline

Definition at line 179 of file TrackParametersHelper.h.

179 { return getZ0SinThetaError(p); }
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
IDTPM::trackParameterError
float trackParameterError(const U &p, Trk::ParamDefs param)
Definition: TrackParametersHelper.h:150
IDTPM::getTruthMatchProb
float getTruthMatchProb(const xAOD::TrackParticle &track)
getTruthMatchProb
Definition: OfflineObjectDecorHelper.cxx:51
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
IDTPM::decorate
void decorate(const T_Cont_Elm &particle, OptionalDecoration< T_Cont, T > &decorator, const T &value)
unsafe fill decoration method for convenience
Definition: SafeDecorator.h:209
IDTPM::qOverPtError
float qOverPtError(const U &p)
Definition: TrackParametersHelper.h:163
perp
Scalar perp() const
perp method - perpenticular length
Definition: AmgMatrixBasePlugin.h:35
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
IDTPM::getD0
float getD0(const xAOD::TruthParticle &p)
Definition: TrackParametersHelper.h:69
IDTPM::z0
float z0(const U &p)
Definition: TrackParametersHelper.h:62
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
IDTPM::getChiSquared
float getChiSquared(const xAOD::TruthParticle &)
Definition: TrackParametersHelper.h:134
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Trk::z0
@ z0
Definition: ParamDefs.h:70
athena.value
value
Definition: athena.py:122
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:54
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
covarianceTool.prob
prob
Definition: covarianceTool.py:678
CxxUtils::fpcompare::equal
bool equal(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition: fpcompare.h:114
IDTPM::getZ0SinThetaError
float getZ0SinThetaError(const xAOD::TruthParticle &)
Definition: TrackParametersHelper.h:177
z
#define z
Trk::theta
@ theta
Definition: ParamDefs.h:72
IDTPM::getProdR
float getProdR(const xAOD::TruthParticle &p)
Definition: TrackParametersHelper.h:78
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:99
IDTPM::getTrackParameterError
float getTrackParameterError(const xAOD::TruthParticle &, Trk::ParamDefs)
Definition: TrackParametersHelper.h:148
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IDTPM::pT
float pT(const U &p)
Accessor utility function for getting the value of pT.
Definition: TrackParametersHelper.h:30
IDTPM::getQoverP
float getQoverP(const xAOD::TruthParticle &p)
Definition: TrackParametersHelper.h:114
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
IDTPM::getR
float getR(const xAOD::TruthParticle &p)
Definition: TrackParametersHelper.h:96
IDTPM::getQOverPtError
float getQOverPtError(const xAOD::TruthParticle &)
Definition: TrackParametersHelper.h:161
IDTPM::qOverP
float qOverP(const U &p)
Definition: TrackParametersHelper.h:119
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:73
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
IDTPM::getTheta
float getTheta(const xAOD::TruthParticle &p)
Definition: TrackParametersHelper.h:44
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
IDTPM::getZ
float getZ(const xAOD::TruthParticle &p)
Definition: TrackParametersHelper.h:105
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
IDTPM::getNdof
float getNdof(const xAOD::TruthParticle &)
Definition: TrackParametersHelper.h:140
IDTPM::getProdZ
float getProdZ(const xAOD::TruthParticle &p)
Definition: TrackParametersHelper.h:87
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
IDTPM::getZ0
float getZ0(const xAOD::TruthParticle &p)
Definition: TrackParametersHelper.h:57