ATLAS Offline Software
MuonAccessors_v1.icc
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 
8 // System include(s):
9 #include <iostream>
10 // #include "MuonAccessors_v1.h"
11 /// Helper macro for managing cluster moment Accessor objects
12 #define DEFINE_ACCESSOR(TYPE, NAME ) \
13  case xAOD::Muon_v1::NAME: \
14  { \
15  static const SG::AuxElement::Accessor< TYPE > a( #NAME ); \
16  return &a; \
17  } \
18  break;
19 
20 namespace xAOD {
21 
22 
23  template<>
24  const SG::AuxElement::Accessor< float >*
25  parameterAccessorV1<float>( Muon_v1::ParamDef type ) {
26  switch( type ) {
27  DEFINE_ACCESSOR( float, spectrometerFieldIntegral );
28  DEFINE_ACCESSOR( float, scatteringCurvatureSignificance );
29  DEFINE_ACCESSOR( float, scatteringNeighbourSignificance );
30  DEFINE_ACCESSOR( float, momentumBalanceSignificance );
31  DEFINE_ACCESSOR( float, segmentDeltaEta );
32  DEFINE_ACCESSOR( float, segmentDeltaPhi );
33  DEFINE_ACCESSOR( float, segmentChi2OverDoF );
34  DEFINE_ACCESSOR( float, t0 );
35  DEFINE_ACCESSOR( float, beta );
36  DEFINE_ACCESSOR( float, annBarrel );
37  DEFINE_ACCESSOR( float, annEndCap );
38  DEFINE_ACCESSOR( float, innAngle );
39  DEFINE_ACCESSOR( float, midAngle );
40  DEFINE_ACCESSOR( float, msInnerMatchChi2 );
41  DEFINE_ACCESSOR( float, msOuterMatchChi2 );
42  DEFINE_ACCESSOR( float, meanDeltaADCCountsMDT );
43  DEFINE_ACCESSOR( float, CaloLRLikelihood );
44  DEFINE_ACCESSOR( float, CaloMuonScore );
45  DEFINE_ACCESSOR( float, FSR_CandidateEnergy );
46  DEFINE_ACCESSOR( float, EnergyLoss );
47  DEFINE_ACCESSOR( float, ParamEnergyLoss );
48  DEFINE_ACCESSOR( float, MeasEnergyLoss );
49  DEFINE_ACCESSOR( float, EnergyLossSigma );
50  DEFINE_ACCESSOR( float, ParamEnergyLossSigmaPlus );
51  DEFINE_ACCESSOR( float, ParamEnergyLossSigmaMinus );
52  DEFINE_ACCESSOR( float, MeasEnergyLossSigma );
53  default:
54  std::cerr << "xAOD::Muon::parameterAccessorV1 ERROR Unknown float ParamDef ("
55  << type << ") requested.";
56  if (type == Muon_v1::msInnerMatchDOF || type == Muon_v1::msOuterMatchDOF || type == Muon_v1::CaloMuonIDTag)
57  std::cerr << " (This type is actually int)"<<std::endl;
58  std::cerr << std::endl;
59  return 0;
60  }
61  }
62 
63  template<>
64  const SG::AuxElement::Accessor< int >*
65  parameterAccessorV1<int>( Muon_v1::ParamDef type ) {
66  switch( type ) {
67  DEFINE_ACCESSOR( int, msInnerMatchDOF );
68  DEFINE_ACCESSOR( int, msOuterMatchDOF );
69  DEFINE_ACCESSOR( int, CaloMuonIDTag );
70  default:
71  std::cerr << "xAOD::Muon::parameterAccessorV1 ERROR Unknown integer ParamDef ("
72  << type << ") requested." << std::endl;
73  return 0;
74  }
75  }
76 
77 } // namespace xAOD