1 // Dear emacs, this is -*- c++ -*-
4 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
7 #ifndef XAODTAU_TAUACCESSORS_V3_ICC
8 #define XAODTAU_TAUACCESSORS_V3_ICC
13 #define DEFINE_TAUJETPARAMETER_ACCESSOR(TYPE, NAME ) \
14 case xAOD::TauJetParameters::NAME: \
16 static const SG::AuxElement::Accessor< TYPE > a( #NAME ); \
22 #ifndef TAUTRACK_V1_ACCESSORS
24 const SG::AuxElement::Accessor< float >* discriminantAccessorV3( xAOD::TauJetParameters::TauID discriminant ) {
26 switch( discriminant ) {
28 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, Likelihood );
29 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, SafeLikelihood );
30 DEFINE_TAUJETPARAMETER_ACCESSOR( float, EleMatchLikelihoodScore );
31 DEFINE_TAUJETPARAMETER_ACCESSOR( float, BDTJetScore );
32 DEFINE_TAUJETPARAMETER_ACCESSOR( float, RNNJetScore );
33 DEFINE_TAUJETPARAMETER_ACCESSOR( float, RNNEleScore );
34 DEFINE_TAUJETPARAMETER_ACCESSOR( float, BDTEleScore );
35 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTauScore );
36 DEFINE_TAUJETPARAMETER_ACCESSOR( float, BDTJetScoreSigTrans );
37 DEFINE_TAUJETPARAMETER_ACCESSOR( float, RNNJetScoreSigTrans );
38 DEFINE_TAUJETPARAMETER_ACCESSOR( float, RNNEleScoreSigTrans );
39 //DEFINE_TAUJETPARAMETER_ACCESSOR( float, BDTJetScoreBkgTrans );
42 std::cerr << "xAOD::TauJetParameters ERROR Unknown tau discriminant value ("
43 << discriminant << ") requested" << std::endl;
49 template <> const SG::AuxElement::Accessor< float >* panTauDetailsAccessorV3<float>( xAOD::TauJetParameters::PanTauDetails detail ) {
54 //!PanTau variables when using CellBased pfos
55 //BDT output distributions
56 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTValue_1p0n_vs_1p1n );
57 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTValue_1p1n_vs_1pXn );
58 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTValue_3p0n_vs_3pXn );
59 //Variables used in BDTs
60 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Charged_JetMoment_EtDRxTotalEt );
61 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Charged_StdDev_Et_WrtEtAllConsts );
62 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_HLV_SumM );
63 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_PID_BDTValues_BDTSort_1 );
64 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_PID_BDTValues_BDTSort_2 );
65 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_Ratio_1stBDTEtOverEtAllConsts );
66 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_Ratio_EtOverEtAllConsts );
67 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Neutral_Shots_NPhotonsInSeed );
68 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Combined_DeltaR1stNeutralTo1stCharged );
69 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PanTau_BDTVar_Charged_HLV_SumM );
72 std::cerr << "xAOD::TauJetParameters ERROR Unknown float panTau Detail ("
73 << detail << ") requested" << std::endl;
78 template <> const SG::AuxElement::Accessor< int >* panTauDetailsAccessorV3<int>( xAOD::TauJetParameters::PanTauDetails detail ) {
84 //!integer PanTau variables when using pfos
85 //Flag whether this seed has pantau info
86 DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_isPanTauCandidate );
87 //decay modes (input mode [proto] and output mode [final])
88 DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_DecayModeProto );
89 DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_DecayMode );
90 //Variables used in BDTs
91 DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_BDTVar_Basic_NNeutralConsts );
92 DEFINE_TAUJETPARAMETER_ACCESSOR( int, PanTau_DecayModeExtended );
95 std::cerr << "xAOD::TauJetParameters ERROR Unknown integer panTau Detail ("
96 << detail << ") requested" << std::endl;
103 template <> const SG::AuxElement::Accessor< float >* detailsAccessorV3<float>( xAOD::TauJetParameters::Detail detail ) {
107 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ipZ0SinThetaSigLeadTrk );
108 DEFINE_TAUJETPARAMETER_ACCESSOR( float, etOverPtLeadTrk );
109 DEFINE_TAUJETPARAMETER_ACCESSOR( float, leadTrkPt );
110 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ipSigLeadTrk );
111 DEFINE_TAUJETPARAMETER_ACCESSOR( float, massTrkSys );
112 DEFINE_TAUJETPARAMETER_ACCESSOR( float, trkWidth2 );
113 DEFINE_TAUJETPARAMETER_ACCESSOR( float, trFlightPathSig );
114 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, ele_E237E277 );//r21 cleanup
115 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, ele_PresamplerFraction );//r21 cleanup
116 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, ele_ECALFirstFraction );//r21 cleanup
117 DEFINE_TAUJETPARAMETER_ACCESSOR( float, numEffTopoClusters );
118 DEFINE_TAUJETPARAMETER_ACCESSOR( float, topoInvMass );
119 DEFINE_TAUJETPARAMETER_ACCESSOR( float, effTopoInvMass );
120 DEFINE_TAUJETPARAMETER_ACCESSOR( float, topoMeanDeltaR );
121 DEFINE_TAUJETPARAMETER_ACCESSOR( float, effTopoMeanDeltaR );
122 DEFINE_TAUJETPARAMETER_ACCESSOR( float, EMRadius );
123 DEFINE_TAUJETPARAMETER_ACCESSOR( float, hadRadius );
124 DEFINE_TAUJETPARAMETER_ACCESSOR( float, etEMAtEMScale );
125 DEFINE_TAUJETPARAMETER_ACCESSOR( float, etHadAtEMScale );
126 DEFINE_TAUJETPARAMETER_ACCESSOR( float, isolFrac );
127 DEFINE_TAUJETPARAMETER_ACCESSOR( float, centFrac );
128 DEFINE_TAUJETPARAMETER_ACCESSOR( float, stripWidth2 );
129 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, etEMCalib );//r21 cleanup
130 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, etHadCalib );//r21 cleanup
131 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, seedCalo_eta );//r21 cleanup
132 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, seedCalo_phi );//r21 cleanup
133 DEFINE_TAUJETPARAMETER_ACCESSOR( float, trkAvgDist );
134 DEFINE_TAUJETPARAMETER_ACCESSOR( float, trkRmsDist );
135 DEFINE_TAUJETPARAMETER_ACCESSOR( float, lead2ClusterEOverAllClusterE );
136 DEFINE_TAUJETPARAMETER_ACCESSOR( float, lead3ClusterEOverAllClusterE );
137 DEFINE_TAUJETPARAMETER_ACCESSOR( float, caloIso );
138 DEFINE_TAUJETPARAMETER_ACCESSOR( float, caloIsoCorrected );
139 DEFINE_TAUJETPARAMETER_ACCESSOR( float, dRmax );
140 DEFINE_TAUJETPARAMETER_ACCESSOR( float, secMaxStripEt );
141 DEFINE_TAUJETPARAMETER_ACCESSOR( float, sumEMCellEtOverLeadTrkPt );
142 DEFINE_TAUJETPARAMETER_ACCESSOR( float, hadLeakEt );
143 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, EM_TES_scale );//r21 cleanup
144 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, LC_TES_precalib );//r21 cleanup
145 DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing1 );
146 DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing2 );
147 DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing3 );
148 DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing4 );
149 DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing5 );
150 DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing6 );
151 DEFINE_TAUJETPARAMETER_ACCESSOR( float, cellBasedEnergyRing7 );
152 DEFINE_TAUJETPARAMETER_ACCESSOR( float, TRT_NHT_OVER_NLT );
153 DEFINE_TAUJETPARAMETER_ACCESSOR( float, TauJetVtxFraction );
155 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PSSFraction );
156 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ChPiEMEOverCaloEME );
157 DEFINE_TAUJETPARAMETER_ACCESSOR( float, EMPOverTrkSysP );
159 DEFINE_TAUJETPARAMETER_ACCESSOR( float, TESOffset );
160 DEFINE_TAUJETPARAMETER_ACCESSOR( float, TESCalibConstant );
162 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, etEflow );//r21 cleanup
163 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, mEflow );//r21 cleanup
164 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, ptRatioEflow );//r21 cleanup
166 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, etEflowTopo );//r21 cleanup
167 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, mEflowTopo );//r21 cleanup
168 // DEFINE_TAUJETPARAMETER_ACCESSOR( float, ptRatioEflowTopo );//r21 cleanup
170 DEFINE_TAUJETPARAMETER_ACCESSOR( float, innerTrkAvgDist );
171 DEFINE_TAUJETPARAMETER_ACCESSOR( float, SumPtTrkFrac );
174 DEFINE_TAUJETPARAMETER_ACCESSOR( float, centFracCorrected );
175 DEFINE_TAUJETPARAMETER_ACCESSOR( float, etOverPtLeadTrkCorrected );
176 DEFINE_TAUJETPARAMETER_ACCESSOR( float, innerTrkAvgDistCorrected );
177 DEFINE_TAUJETPARAMETER_ACCESSOR( float, SumPtTrkFracCorrected );
178 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ipSigLeadTrkCorrected );
179 DEFINE_TAUJETPARAMETER_ACCESSOR( float, trFlightPathSigCorrected );
180 DEFINE_TAUJETPARAMETER_ACCESSOR( float, massTrkSysCorrected );
181 DEFINE_TAUJETPARAMETER_ACCESSOR( float, dRmaxCorrected );
182 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ChPiEMEOverCaloEMECorrected );
183 DEFINE_TAUJETPARAMETER_ACCESSOR( float, EMPOverTrkSysPCorrected );
184 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ptRatioEflowApproxCorrected );
185 DEFINE_TAUJETPARAMETER_ACCESSOR( float, mEflowApproxCorrected );
187 DEFINE_TAUJETPARAMETER_ACCESSOR( float, mEflowApprox );
188 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ptRatioEflowApprox );
190 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ClustersMeanCenterLambda );
191 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ClustersMeanEMProbability );
192 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ClustersMeanFirstEngDens );
193 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ClustersMeanSecondLambda );
194 DEFINE_TAUJETPARAMETER_ACCESSOR( float, ClustersMeanPresamplerFrac );
195 DEFINE_TAUJETPARAMETER_ACCESSOR( float, PFOEngRelDiff );
196 DEFINE_TAUJETPARAMETER_ACCESSOR( float, LC_pantau_interpolPt );
199 std::cerr << "xAOD::TauJetParameters ERROR Unknown float detail ("
200 << detail << ") requested" << std::endl;
205 template <> const SG::AuxElement::Accessor< int >* detailsAccessorV3<int>( xAOD::TauJetParameters::Detail detail ) {
209 DEFINE_TAUJETPARAMETER_ACCESSOR( int, numCells );
210 DEFINE_TAUJETPARAMETER_ACCESSOR( int, numTopoClusters );
211 DEFINE_TAUJETPARAMETER_ACCESSOR( int, nStrip );
212 // DEFINE_TAUJETPARAMETER_ACCESSOR( int, nPi0 );//r21 cleanup
213 DEFINE_TAUJETPARAMETER_ACCESSOR( int, nCharged );
214 // DEFINE_TAUJETPARAMETER_ACCESSOR( int, nPi0Topo );//r21 cleanup
215 // DEFINE_TAUJETPARAMETER_ACCESSOR( int, nChargedTopo );//r21 cleanup
216 DEFINE_TAUJETPARAMETER_ACCESSOR( int, GhostMuonSegmentCount );
217 DEFINE_TAUJETPARAMETER_ACCESSOR( int, nChargedTracks );
218 DEFINE_TAUJETPARAMETER_ACCESSOR( int, nIsolatedTracks );
219 DEFINE_TAUJETPARAMETER_ACCESSOR( int, nModifiedIsolationTracks );
220 DEFINE_TAUJETPARAMETER_ACCESSOR( int, nAllTracks );
221 DEFINE_TAUJETPARAMETER_ACCESSOR( int, nLargeRadiusTracks );
224 std::cerr << "xAOD::TauJetParameters ERROR Unknown integer detail ("
225 << detail << ") requested" << std::endl;
230 template <> const SG::AuxElement::Accessor< ElementLink<IParticleContainer> >* detailsAccessorV3<ElementLink<IParticleContainer > >( xAOD::TauJetParameters::Detail detail ) {
234 DEFINE_TAUJETPARAMETER_ACCESSOR( ElementLink<IParticleContainer>, electronLink );
237 std::cerr << "xAOD::TauJetParameters ERROR Unknown IParticle detail ("
238 << detail << ") requested" << std::endl;
245 template <> const SG::AuxElement::Accessor< float >* trackDetailsAccessorV3<float>( xAOD::TauJetParameters::TrackDetail detail ) {
248 DEFINE_TAUJETPARAMETER_ACCESSOR( float, CaloSamplingEtaEM );
249 DEFINE_TAUJETPARAMETER_ACCESSOR( float, CaloSamplingEtaHad );
250 DEFINE_TAUJETPARAMETER_ACCESSOR( float, CaloSamplingPhiEM );
251 DEFINE_TAUJETPARAMETER_ACCESSOR( float, CaloSamplingPhiHad );
253 std::cerr << "xAOD::TauJetParameters ERROR Unknown integer detail ("
254 << detail << ") requested" << std::endl;
258 #endif //TAUTRACK_V1_ACCESSORS to aid with link issues
260 #endif // XAODTAU_TAUJETACCESSORS_V3_ICC