ATLAS Offline Software
CaloClusterAccessors_v1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: CaloClusterAccessors_v1.cxx 794609 2017-01-30 15:51:25Z menke $
6 
7 // System include(s):
8 #include <iostream>
9 
10 // Local include(s):
12 
14 #define DEFINE_ACCESSOR( NAME, TYPE ) \
15  case xAOD::CaloCluster_v1::NAME: \
16  { \
17  static const SG::AuxElement::Accessor< TYPE > a( #NAME ); \
18  return &a; \
19  } \
20  break
21 
22 namespace xAOD {
23 
26 
27  switch( moment ) {
28  DEFINE_ACCESSOR( FIRST_PHI , float );
29  DEFINE_ACCESSOR( FIRST_ETA , float );
30  DEFINE_ACCESSOR( SECOND_R , float );
31  DEFINE_ACCESSOR( SECOND_LAMBDA , float );
32  DEFINE_ACCESSOR( DELTA_PHI , float );
33  DEFINE_ACCESSOR( DELTA_THETA , float );
34  DEFINE_ACCESSOR( DELTA_ALPHA , float );
35  DEFINE_ACCESSOR( CENTER_X , float );
36  DEFINE_ACCESSOR( CENTER_Y , float );
37  DEFINE_ACCESSOR( CENTER_Z , float );
38  DEFINE_ACCESSOR( CENTER_MAG , float );
39  DEFINE_ACCESSOR( CENTER_LAMBDA , float );
40  DEFINE_ACCESSOR( LATERAL , float );
41  DEFINE_ACCESSOR( LONGITUDINAL , float );
42  DEFINE_ACCESSOR( ENG_FRAC_EM , float );
43  DEFINE_ACCESSOR( ENG_FRAC_MAX , float );
44  DEFINE_ACCESSOR( ENG_FRAC_CORE , float );
46  DEFINE_ACCESSOR( SECOND_ENG_DENS , float );
47  DEFINE_ACCESSOR( ISOLATION , float );
48  DEFINE_ACCESSOR( ENG_BAD_CELLS , float );
49  DEFINE_ACCESSOR( N_BAD_CELLS , float );
50  DEFINE_ACCESSOR( N_BAD_CELLS_CORR , float );
51  DEFINE_ACCESSOR( BAD_CELLS_CORR_E , float );
52  DEFINE_ACCESSOR( BADLARQ_FRAC , float );
53  DEFINE_ACCESSOR( ENG_POS , float );
54  DEFINE_ACCESSOR( ENG_BAD_HV_CELLS , float );
55  DEFINE_ACCESSOR( N_BAD_HV_CELLS , float );
56  DEFINE_ACCESSOR( SIGNIFICANCE , float );
57  DEFINE_ACCESSOR( PTD , float );
58  DEFINE_ACCESSOR( MASS , float );
59  DEFINE_ACCESSOR( SECOND_TIME , float );
60  DEFINE_ACCESSOR( CELL_SIGNIFICANCE , float );
61  DEFINE_ACCESSOR( CELL_SIG_SAMPLING , float );
62  DEFINE_ACCESSOR( AVG_LAR_Q , float );
63  DEFINE_ACCESSOR( AVG_TILE_Q , float );
65  DEFINE_ACCESSOR( HAD_WEIGHT , float );
66  DEFINE_ACCESSOR( OOC_WEIGHT , float );
67  DEFINE_ACCESSOR( DM_WEIGHT , float );
68  DEFINE_ACCESSOR( TILE_CONFIDENCE_LEVEL , float );
69  DEFINE_ACCESSOR( VERTEX_FRACTION , float );
70  DEFINE_ACCESSOR( NVERTEX_FRACTION , float );
71  DEFINE_ACCESSOR( ETACALOFRAME , float );
72  DEFINE_ACCESSOR( PHICALOFRAME , float );
73  DEFINE_ACCESSOR( ETA1CALOFRAME , float );
74  DEFINE_ACCESSOR( PHI1CALOFRAME , float );
75  DEFINE_ACCESSOR( ETA2CALOFRAME , float );
76  DEFINE_ACCESSOR( PHI2CALOFRAME , float );
77  DEFINE_ACCESSOR( ENG_CALIB_TOT , float );
78  DEFINE_ACCESSOR( ENG_CALIB_OUT_L , float );
79  DEFINE_ACCESSOR( ENG_CALIB_OUT_M , float );
80  DEFINE_ACCESSOR( ENG_CALIB_OUT_T , float );
81  DEFINE_ACCESSOR( ENG_CALIB_DEAD_L , float );
82  DEFINE_ACCESSOR( ENG_CALIB_DEAD_M , float );
83  DEFINE_ACCESSOR( ENG_CALIB_DEAD_T , float );
84  DEFINE_ACCESSOR( ENG_CALIB_EMB0 , float );
85  DEFINE_ACCESSOR( ENG_CALIB_EME0 , float );
86  DEFINE_ACCESSOR( ENG_CALIB_TILEG3 , float );
87  DEFINE_ACCESSOR( ENG_CALIB_DEAD_TOT , float );
88  DEFINE_ACCESSOR( ENG_CALIB_DEAD_EMB0 , float );
89  DEFINE_ACCESSOR( ENG_CALIB_DEAD_TILE0 , float );
90  DEFINE_ACCESSOR( ENG_CALIB_DEAD_TILEG3 , float );
91  DEFINE_ACCESSOR( ENG_CALIB_DEAD_EME0 , float );
92  DEFINE_ACCESSOR( ENG_CALIB_DEAD_HEC0 , float );
93  DEFINE_ACCESSOR( ENG_CALIB_DEAD_FCAL , float );
94  DEFINE_ACCESSOR( ENG_CALIB_DEAD_LEAKAGE , float );
95  DEFINE_ACCESSOR( ENG_CALIB_DEAD_UNCLASS , float );
96  DEFINE_ACCESSOR( ENG_CALIB_FRAC_EM , float );
97  DEFINE_ACCESSOR( ENG_CALIB_FRAC_HAD , float );
98  DEFINE_ACCESSOR( ENG_CALIB_FRAC_REST , float );
99 
100  DEFINE_ACCESSOR( ENERGY_DigiHSTruth , float );
101  DEFINE_ACCESSOR( ETA_DigiHSTruth , float );
102  DEFINE_ACCESSOR( PHI_DigiHSTruth , float );
103  DEFINE_ACCESSOR( TIME_DigiHSTruth , float );
104  DEFINE_ACCESSOR( ENERGY_CALIB_DigiHSTruth , float );
105  DEFINE_ACCESSOR( ETA_CALIB_DigiHSTruth , float );
106  DEFINE_ACCESSOR( PHI_CALIB_DigiHSTruth , float );
107  DEFINE_ACCESSOR( TIME_CALIB_DigiHSTruth , float );
108 
109  DEFINE_ACCESSOR( FIRST_PHI_DigiHSTruth , float );
110  DEFINE_ACCESSOR( FIRST_ETA_DigiHSTruth , float );
111  DEFINE_ACCESSOR( SECOND_R_DigiHSTruth , float );
112  DEFINE_ACCESSOR( SECOND_LAMBDA_DigiHSTruth , float );
113  DEFINE_ACCESSOR( DELTA_PHI_DigiHSTruth , float );
114  DEFINE_ACCESSOR( DELTA_THETA_DigiHSTruth , float );
115  DEFINE_ACCESSOR( DELTA_ALPHA_DigiHSTruth , float );
116  DEFINE_ACCESSOR( CENTER_X_DigiHSTruth , float );
117  DEFINE_ACCESSOR( CENTER_Y_DigiHSTruth , float );
118  DEFINE_ACCESSOR( CENTER_Z_DigiHSTruth , float );
119  DEFINE_ACCESSOR( CENTER_MAG_DigiHSTruth , float );
120  DEFINE_ACCESSOR( CENTER_LAMBDA_DigiHSTruth , float );
121  DEFINE_ACCESSOR( LATERAL_DigiHSTruth , float );
122  DEFINE_ACCESSOR( LONGITUDINAL_DigiHSTruth , float );
123  DEFINE_ACCESSOR( ENG_FRAC_EM_DigiHSTruth , float );
124  DEFINE_ACCESSOR( ENG_FRAC_MAX_DigiHSTruth , float );
125  DEFINE_ACCESSOR( ENG_FRAC_CORE_DigiHSTruth , float );
126  DEFINE_ACCESSOR( FIRST_ENG_DENS_DigiHSTruth , float );
127  DEFINE_ACCESSOR( SECOND_ENG_DENS_DigiHSTruth , float );
128  DEFINE_ACCESSOR( ISOLATION_DigiHSTruth , float );
129  DEFINE_ACCESSOR( ENG_BAD_CELLS_DigiHSTruth , float );
130  DEFINE_ACCESSOR( N_BAD_CELLS_DigiHSTruth , float );
131  DEFINE_ACCESSOR( N_BAD_CELLS_CORR_DigiHSTruth , float );
132  DEFINE_ACCESSOR( BAD_CELLS_CORR_E_DigiHSTruth , float );
133  DEFINE_ACCESSOR( BADLARQ_FRAC_DigiHSTruth , float );
134  DEFINE_ACCESSOR( ENG_POS_DigiHSTruth , float );
135  DEFINE_ACCESSOR( ENG_BAD_HV_CELLS_DigiHSTruth , float );
136  DEFINE_ACCESSOR( N_BAD_HV_CELLS_DigiHSTruth , float );
137  DEFINE_ACCESSOR( SIGNIFICANCE_DigiHSTruth , float );
138  DEFINE_ACCESSOR( CELL_SIGNIFICANCE_DigiHSTruth, float );
139  DEFINE_ACCESSOR( CELL_SIG_SAMPLING_DigiHSTruth, float );
140  DEFINE_ACCESSOR( AVG_LAR_Q_DigiHSTruth , float );
141  DEFINE_ACCESSOR( AVG_TILE_Q_DigiHSTruth , float );
142  DEFINE_ACCESSOR( EM_PROBABILITY_DigiHSTruth , float );
143  DEFINE_ACCESSOR( HAD_WEIGHT_DigiHSTruth , float );
144  DEFINE_ACCESSOR( OOC_WEIGHT_DigiHSTruth , float );
145  DEFINE_ACCESSOR( DM_WEIGHT_DigiHSTruth , float );
146 
147  default:
148  std::cerr << "xAOD::CaloCluster_v1 ERROR Unknown scalar moment ("
149  << moment << ") requested" << std::endl;
150  return nullptr;
151  }
152  }
153 
156  switch ( moment ) {
158  default:
159  std::cerr << "xAOD::CaloCluster_v1 ERROR Unknown compound moment type ("
160  << moment << ") requested" << std::endl;
161  return nullptr;
162  }
163  }
164 
165 } // namespace xAOD
TauGNNUtils::Variables::Cluster::CENTER_LAMBDA
bool CENTER_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:840
xAOD::momentAccessorV1
const SG::AuxElement::Accessor< float > * momentAccessorV1(xAOD::CaloCluster_v1::MomentType moment)
Helper function for managing cluster moment Accessor objects.
Definition: CaloClusterAccessors_v1.cxx:25
TauGNNUtils::Variables::Cluster::EM_PROBABILITY
bool EM_PROBABILITY(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:909
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
DEFINE_ACCESSOR
#define DEFINE_ACCESSOR(NAME, TYPE)
Helper macro for managing cluster moment Accessor objects.
Definition: CaloClusterAccessors_v1.cxx:14
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::CaloCluster_v1::MomentType
MomentType
Enums to identify different moments.
Definition: CaloCluster_v1.h:120
xAOD::CaloCluster_v1::ncells_store_t
std::vector< uint16_t > ncells_store_t
Store type for number-of-cells-in-sampling counter.
Definition: CaloCluster_v1.h:80
TauGNNUtils::Variables::Cluster::SECOND_LAMBDA
bool SECOND_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:835
TauGNNUtils::Variables::Cluster::SECOND_R
bool SECOND_R(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:830
CaloClusterAccessors_v1.h
TauGNNUtils::Variables::Cluster::CENTER_MAG
bool CENTER_MAG(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:916
TauGNNUtils::Variables::Cluster::FIRST_ENG_DENS
bool FIRST_ENG_DENS(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:902
xAOD::momentContainerAccessorV1
const SG::AuxElement::Accessor< xAOD::CaloCluster_v1::ncells_store_t > * momentContainerAccessorV1(xAOD::CaloCluster_v1::MomentType moment)
Helper function for managing cluster moment Accessor objects.
Definition: CaloClusterAccessors_v1.cxx:155