ATLAS Offline Software
TauJetAccessors_v1.icc
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: TauJetAccessors_v1.icc 743783 2016-04-28 21:45:08Z griffith $
8 
9 #ifndef XAODTAU_TAUACCESSORS_V1_ICC
10 #define XAODTAU_TAUACCESSORS_V1_ICC
11 
12 // System include(s):
13 #include <iostream>
14 
15 #define DEFINE_TAUJETPARAMETER_ACCESSOR(TYPE, NAME ) \
16  case xAOD::TauJetParameters::NAME: \
17 { \
18  static const SG::AuxElement::Accessor< TYPE > a( #NAME ); \
19  return &a; \
20 } \
21 break;
22 
23 
24  const SG::AuxElement::Accessor< float >* discriminantAccessorV1( xAOD::TauJetParameters::TauID discriminant ) {
25 
26  switch( discriminant ) {
27 
28  DEFINE_TAUJETPARAMETER_ACCESSOR( float, Likelihood );
29  DEFINE_TAUJETPARAMETER_ACCESSOR( float, SafeLikelihood );
30  DEFINE_TAUJETPARAMETER_ACCESSOR( float, BDTJetScore );
31  DEFINE_TAUJETPARAMETER_ACCESSOR( float, BDTEleScore );
32  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTauScore );
33  DEFINE_TAUJETPARAMETER_ACCESSOR( float, BDTJetScoreSigTrans );
34  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, BDTJetScoreBkgTrans );
35 
36  default:
37  std::cerr << "xAOD::TauJetParameters ERROR Unknown tau discriminant value ("
38  << discriminant << ") requested" << std::endl;
39  return 0;
40  }
41  }
42 
43 
44  template <> const SG::AuxElement::Accessor< float >* panTauDetailsAccessorV1<float>( xAOD::TauJetParameters::PanTauDetails detail ) {
45 
46  switch( detail ) {
47 
48  //panTau details
49  //!PanTau variables when using CellBased pfos
50  //BDT output distributions
51  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTValue_1p0n_vs_1p1n );
52  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTValue_1p1n_vs_1pXn );
53  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTValue_3p0n_vs_3pXn );
54  //Variables used in BDTs
55  //DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Charged_JetMoment_EtDRxTotalEt );//r21 cleanup
56  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Charged_StdDev_Et_WrtEtAllConsts );
57  //DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_HLV_SumM );//r21 cleanup
58  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_PID_BDTValues_BDTSort_1 );
59  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_PID_BDTValues_BDTSort_2 );
60  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts );
61  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_Ratio_EtOverEtAllConsts );
62  //DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_Shots_NPhotonsInSeed );//r21 cleanup
63  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Combined_DeltaR1stNeutralTo1stCharged );
64 
65  //DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_CellBasedInput_BDTVar_Charged_HLV_SumM );//r21 cleanup
66 
67 
68 
69  // //!PanTau variables when using eflowRec pfos//r21 cleanup
70  // //BDT output distributions
71  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTValue_1p0n_vs_1p1n );
72  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTValue_1p1n_vs_1pXn );
73  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTValue_3p0n_vs_3pXn );
74  // //Variables used in BDTs
75  // //NOTE: They are different from the CellBased ones in general!
76  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTVar_Charged_HLV_SumPt );
77  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTVar_Charged_Ratio_EtOverEtAllConsts );
78  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTVar_Neutral_HLV_SumM );
79  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTVar_Neutral_PID_BDTValues_EtSort_1 );
80  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTVar_Neutral_PID_BDTValues_BDTSort_2 );
81  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTVar_Neutral_Ratio_EtOverEtAllConsts );
82  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTVar_Neutral_Mean_DRToLeading_WrtEtAllConsts );
83  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_eflowRecInput_BDTVar_Combined_DeltaR1stNeutralTo1stCharged );
84 
85 
86  default:
87  std::cerr << "xAOD::TauJetParameters ERROR Unknown float panTau Detail ("
88  << detail << ") requested" << std::endl;
89  return 0;
90  }
91  }
92 
93  template <> const SG::AuxElement::Accessor< int >* panTauDetailsAccessorV1<int>( xAOD::TauJetParameters::PanTauDetails detail ) {
94 
95  switch( detail ) {
96 
97 
98  //panTau details
99  //!integer PanTau variables when using CellBased pfos
100  //Flag whether this seed has pantau info
101  DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_isPanTauCandidate );
102  //decay modes (input mode [proto] and output mode [final])
103  DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_DecayModeProto );
104  DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_DecayMode );
105  //Variables used in BDTs
106  //DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_BDTVar_Basic_NNeutralConsts );//r21 cleanup
107 
108 
109  // //!integer PanTau variables when using eflowRec pfos
110  // //Flag whether this seed has pantau info
111  // DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_eflowRecInput_isPanTauCandidate );
112  // //decay modes (input mode [proto] and output mode [final])
113  // DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_eflowRecInput_DecayModeProto );
114  // DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_eflowRecInput_DecayMode );
115  // //Variables used in BDTs
116  // //NOTE: They are different from the CellBased ones in general!
117  // DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_eflowRecInput_BDTVar_Basic_NPi0NeutConsts );
118  // DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_eflowRecInput_BDTVar_Basic_NNeutralConsts );
119 
120  default:
121  std::cerr << "xAOD::TauJetParameters ERROR Unknown integer panTau Detail ("
122  << detail << ") requested" << std::endl;
123  return 0;
124  }
125  }
126 
127 
128 
129 
130  template <> const SG::AuxElement::Accessor< float >* detailsAccessorV1<float>( xAOD::TauJetParameters::Detail detail ) {
131 
132  switch( detail ) {
133 
134  DEFINE_TAUJETPARAMETER_ACCESSOR( float, ipZ0SinThetaSigLeadTrk );
135  DEFINE_TAUJETPARAMETER_ACCESSOR( float, etOverPtLeadTrk );
136  DEFINE_TAUJETPARAMETER_ACCESSOR( float, leadTrkPt );
137  DEFINE_TAUJETPARAMETER_ACCESSOR( float, ipSigLeadTrk );
138  DEFINE_TAUJETPARAMETER_ACCESSOR( float, massTrkSys );
139  DEFINE_TAUJETPARAMETER_ACCESSOR( float, trkWidth2 );
140  DEFINE_TAUJETPARAMETER_ACCESSOR( float, trFlightPathSig );
141  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, ele_E237E277 );//r21 cleanup
142  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, ele_PresamplerFraction );//r21 cleanup
143  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, ele_ECALFirstFraction );//r21 cleanup
144  DEFINE_TAUJETPARAMETER_ACCESSOR( float, numEffTopoClusters );
145  DEFINE_TAUJETPARAMETER_ACCESSOR( float, topoInvMass );
146  DEFINE_TAUJETPARAMETER_ACCESSOR( float, effTopoInvMass );
147  DEFINE_TAUJETPARAMETER_ACCESSOR( float, topoMeanDeltaR );
148  DEFINE_TAUJETPARAMETER_ACCESSOR( float, effTopoMeanDeltaR );
149  DEFINE_TAUJETPARAMETER_ACCESSOR( float, EMRadius );
150  DEFINE_TAUJETPARAMETER_ACCESSOR( float, hadRadius );
151  DEFINE_TAUJETPARAMETER_ACCESSOR( float, etEMAtEMScale );
152  DEFINE_TAUJETPARAMETER_ACCESSOR( float, etHadAtEMScale );
153  DEFINE_TAUJETPARAMETER_ACCESSOR( float, isolFrac );
154  DEFINE_TAUJETPARAMETER_ACCESSOR( float, centFrac );
155  DEFINE_TAUJETPARAMETER_ACCESSOR( float, stripWidth2 );
156  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, etEMCalib );//r21 cleanup
157  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, etHadCalib );//r21 cleanup
158  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, seedCalo_eta );//r21 cleanup
159  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, seedCalo_phi );//r21 cleanup
160  DEFINE_TAUJETPARAMETER_ACCESSOR( float, trkAvgDist );
161  DEFINE_TAUJETPARAMETER_ACCESSOR( float, trkRmsDist );
162  DEFINE_TAUJETPARAMETER_ACCESSOR( float, lead2ClusterEOverAllClusterE );
163  DEFINE_TAUJETPARAMETER_ACCESSOR( float, lead3ClusterEOverAllClusterE );
164  DEFINE_TAUJETPARAMETER_ACCESSOR( float, caloIso );
165  DEFINE_TAUJETPARAMETER_ACCESSOR( float, caloIsoCorrected );
166  DEFINE_TAUJETPARAMETER_ACCESSOR( float, dRmax );
167  DEFINE_TAUJETPARAMETER_ACCESSOR( float, secMaxStripEt );
168  DEFINE_TAUJETPARAMETER_ACCESSOR( float, sumEMCellEtOverLeadTrkPt );
169  DEFINE_TAUJETPARAMETER_ACCESSOR( float, hadLeakEt );
170  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, EM_TES_scale );//r21 cleanup
171  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, LC_TES_precalib );//r21 cleanup
172  DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing1 );
173  DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing2 );
174  DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing3 );
175  DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing4 );
176  DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing5 );
177  DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing6 );
178  DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing7 );
179  DEFINE_TAUJETPARAMETER_ACCESSOR( float, TRT_NHT_OVER_NLT );
180  DEFINE_TAUJETPARAMETER_ACCESSOR( float, TauJetVtxFraction );
181 
182  DEFINE_TAUJETPARAMETER_ACCESSOR( float, PSSFraction );
183  DEFINE_TAUJETPARAMETER_ACCESSOR( float, ChPiEMEOverCaloEME );
184  DEFINE_TAUJETPARAMETER_ACCESSOR( float, EMPOverTrkSysP );
185 
186  DEFINE_TAUJETPARAMETER_ACCESSOR( float, TESOffset );
187  DEFINE_TAUJETPARAMETER_ACCESSOR( float, TESCalibConstant );
188 
189  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, etEflow );//r21 cleanup
190  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, mEflow );//r21 cleanup
191  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, ptRatioEflow );//r21 cleanup
192 
193  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, etEflowTopo );//r21 cleanup
194  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, mEflowTopo );//r21 cleanup
195  // DEFINE_TAUJETPARAMETER_ACCESSOR( float, ptRatioEflowTopo );//r21 cleanup
196 
197  DEFINE_TAUJETPARAMETER_ACCESSOR( float, centFracCorrected );
198  DEFINE_TAUJETPARAMETER_ACCESSOR( float, etOverPtLeadTrkCorrected );
199  DEFINE_TAUJETPARAMETER_ACCESSOR( float, innerTrkAvgDist );
200  DEFINE_TAUJETPARAMETER_ACCESSOR( float, innerTrkAvgDistCorrected );
201  DEFINE_TAUJETPARAMETER_ACCESSOR( float, SumPtTrkFrac );
202  DEFINE_TAUJETPARAMETER_ACCESSOR( float, SumPtTrkFracCorrected );
203 
204  default:
205  std::cerr << "xAOD::TauJetParameters ERROR Unknown float detail ("
206  << detail << ") requested" << std::endl;
207  return 0;
208  }
209  }
210 
211  template <> const SG::AuxElement::Accessor< int >* detailsAccessorV1<int>( xAOD::TauJetParameters::Detail detail ) {
212 
213  switch( detail ) {
214 
215  DEFINE_TAUJETPARAMETER_ACCESSOR( int, numCells );
216  DEFINE_TAUJETPARAMETER_ACCESSOR( int, numTopoClusters );
217  DEFINE_TAUJETPARAMETER_ACCESSOR( int, nStrip );
218  //DEFINE_TAUJETPARAMETER_ACCESSOR( int, nPi0 );//r21 cleanup
219  DEFINE_TAUJETPARAMETER_ACCESSOR( int, nCharged );
220  //DEFINE_TAUJETPARAMETER_ACCESSOR( int, nPi0Topo );//r21 cleanup
221  //DEFINE_TAUJETPARAMETER_ACCESSOR( int, nChargedTopo );//r21 cleanup
222 
223  default:
224  std::cerr << "xAOD::TauJetParameters ERROR Unknown integer detail ("
225  << detail << ") requested" << std::endl;
226  return 0;
227  }
228  }
229 
230 
231 #endif // XAODTAU_TAUJETACCESSORS_V1_ICC