ATLAS Offline Software
RpdSubtractCentroidTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ZDCANALYSIS_RPDSUBTRACTCENTROIDTOOL_H
6 #define ZDCANALYSIS_RPDSUBTRACTCENTROIDTOOL_H
7 
8 #include <array>
9 #include <bitset>
10 
14 #include "ZdcUtils/RPDUtils.h"
15 
16 #include "AsgTools/AsgTool.h"
22 
23 namespace ZDC {
24 
25 class RpdSubtractCentroidTool : public virtual IZdcAnalysisTool, public asg::AsgTool {
27  public:
28  enum {
29  ValidBit = 0, // analysis and output are valid
30  HasCentroidBit = 1, // centroid was calculated but analysis is invalid
31  ZDCInvalidBit = 2, // ZDC analysis on this side failed => analysis is invalid
32  InsufficientZDCEnergyBit = 3, // ZDC energy on this side is below minimum => analysis is invalid
33  ExcessiveZDCEnergyBit = 4, // ZDC energy on this side is above maximum => analysis is invalid
34  EMInvalidBit = 5, // EM analysis on this side failed => analysis is invalid
35  InsufficientEMEnergyBit = 6, // EM energy on this side is below minimum => analysis is invalid
36  ExcessiveEMEnergyBit = 7, // EM energy on this side is above maximum => analysis is invalid
37  RPDInvalidBit = 8, // RPD analysis on this side was invalid => calculation stopped and analysis is invalid
38  PileupBit = 9, // pileup was detected in RPD on this side
39  ExcessivePileupBit = 10, // pileup was detected in RPD on this side and a channel exceeded the fractional limit => analysis is invalid
40  ZeroSumBit = 11, // sum of subtracted RPD amplitudes on this side was not positive => calculation stopped and analysis is invalid
41  ExcessiveSubtrUnderflowBit = 12, // a subtracted RPD amplitude on this side was negative and exceeded the fractional limit => analysis is invalid
42 
43  Row0ValidBit = 13, // row 0 x centroid is valid
44  Row1ValidBit = 14, // row 1 x centroid is valid
45  Row2ValidBit = 15, // row 2 x centroid is valid
46  Row3ValidBit = 16, // row 3 x centroid is valid
47  Col0ValidBit = 17, // column 0 y centroid is valid
48  Col1ValidBit = 18, // column 1 y centroid is valid
49  Col2ValidBit = 19, // column 2 y centroid is valid
50  Col3ValidBit = 20, // column 3 y centroid is valid
51 
53  };
54 
55  explicit RpdSubtractCentroidTool(const std::string& name);
56  ~RpdSubtractCentroidTool() override = default;
57 
58  // this tool should never be copied or moved
63 
64  // interface from AsgTool and IZdcAnalysisTool
65  StatusCode initialize() override;
66  StatusCode recoZdcModules(const xAOD::ZdcModuleContainer& moduleContainer, const xAOD::ZdcModuleContainer& moduleSumContainer) override;
67  StatusCode reprocessZdc() override;
68 
69  private:
70  // tool properties to be configured in Python
71  std::string m_configuration;
73  std::string m_ZDCSumContainerName;
74  bool m_writeAux;
75  std::string m_auxSuffix;
76  // these are optional and null by default; if their values are set, they will overwrite the bulk configuration from config string
85 
86  // these are the final reconstruction parameters
87  std::vector<float> m_minZDCEnergy;
88  std::vector<float> m_maxZDCEnergy;
89  std::vector<float> m_minEMEnergy;
90  std::vector<float> m_maxEMEnergy;
91  std::vector<float> m_pileupMaxFrac;
92  std::vector<float> m_maximumNegativeSubtrAmpFrac;
95 
96  StatusCode initializeKey(std::string const& containerName, SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> & readHandleKey, std::string const& key);
97  StatusCode initializeKey(std::string const& containerName, SG::WriteDecorHandleKey<xAOD::ZdcModuleContainer> & writeHandleKey, std::string const& key);
98  static bool nonNegative(float const x) { return x >= 0; }
99  static bool anyNonNegative(std::vector<float> const& v) { return std::any_of(v.begin(), v.end(), nonNegative); }
100 
101  // internal properties
102  //
103  bool m_initialized = false;
104  bool m_readZDCDecorations = false;
105 
106  // results from RPD analysis needed for centroid calculation (read from AOD)
107  //
108  struct RPDChannelData {
109  unsigned int channel;
110  float xposRel;
111  float yposRel;
112  unsigned short row;
113  unsigned short col;
114  float amp;
115  float subtrAmp;
116  float pileupFrac;
117  unsigned int status;
118  };
119  std::array<std::bitset<RPDDataAnalyzer::N_STATUS_BITS>, 2> m_RPDSideStatus {};
120  std::optional<std::array<unsigned int, 2>> m_ZDCSideStatus;
121  std::optional<std::array<float, 2>> m_ZDCFinalEnergy;
122  std::optional<std::array<float, 2>> m_EMCalibEnergy;
123  std::optional<std::array<std::bitset<ZDCPulseAnalyzer::N_STATUS_BITS>, 2>> m_EMStatus;
124  std::array<std::array<std::array<RPDChannelData, RPDUtils::nCols>, RPDUtils::nRows>, 2> m_RPDChannelData {};
126  // alignment (geometry) and crossing angle correction, to be read from ZdcConditions
127  //
128  std::array<float, 2> m_alignmentXOffset {};
129  std::array<float, 2> m_alignmentYOffset {};
132  // average centroids, to be read from monitoring histograms
133  //
134  std::array<float, 2> m_avgXCentroid {};
135  std::array<float, 2> m_avgYCentroid {};
137  // centroid calculation results (reset each event)
138  //
139  bool m_eventValid = false;
140  std::array<std::bitset<N_STATUS_BITS>, 2> m_centroidStatus {1 << ValidBit, 1 << ValidBit};
141  std::array<std::vector<float>, 2> m_subtrAmp = {
142  std::vector<float>(RPDUtils::nChannels, 0.0),
143  std::vector<float>(RPDUtils::nChannels, 0.0)
144  };
145  std::array<std::array<float, RPDUtils::nRows>, 2> m_subtrAmpRowSum {};
146  std::array<std::array<float, RPDUtils::nCols>, 2> m_subtrAmpColSum {};
147  std::array<float, 2> m_subtrAmpSum {};
148  std::array<float, 2> m_xCentroidPreGeomCorPreAvgSubtr {};
149  std::array<float, 2> m_yCentroidPreGeomCorPreAvgSubtr {};
150  std::array<float, 2> m_xCentroidPreAvgSubtr {};
151  std::array<float, 2> m_yCentroidPreAvgSubtr {};
152  std::array<float, 2> m_xCentroid {};
153  std::array<float, 2> m_yCentroid {};
154  std::array<std::vector<float>, 2> m_xRowCentroid = {
155  std::vector<float>(RPDUtils::nRows, 0.0),
156  std::vector<float>(RPDUtils::nRows, 0.0)
157  };
158  std::array<std::vector<float>, 2> m_yColCentroid = {
159  std::vector<float>(RPDUtils::nCols, 0.0),
160  std::vector<float>(RPDUtils::nCols, 0.0)
161  };
162  std::array<float, 2> m_reactionPlaneAngle {};
165  // methods used for centroid calculation
166  //
167  enum class SubstepStatus {
168  Success, // continue to next step
169  Failure, // stop (do not proceed to next step) and propagate error to Athena
170  SkipEvent, // stop (do not proceed to next step) and tell Athena the event was a success
171  };
172  void reset();
173  SubstepStatus readAOD(xAOD::ZdcModuleContainer const& moduleContainer, xAOD::ZdcModuleContainer const& moduleSumContainer);
174  bool checkZdcRpdValidity(unsigned int side);
175  bool subtractRpdAmplitudes(unsigned int side);
176  void calculateDetectorCentroid(unsigned int side);
177  void geometryCorrection(unsigned int side);
178  void subtractAverageCentroid(unsigned int side);
179  void calculateReactionPlaneAngle(unsigned int side);
180  void writeAOD(xAOD::ZdcModuleContainer const& moduleSumContainer) const;
181 
182  // note that we leave the keys of read/write decor handle keys unset here since they will be set
183  // by this tool's initialize(); this is because container names (and suffix) are taken as tool properties
184  // and cannot be used in an in-class initializer (before constructor, where properties are declared)
185 
186  // read handle keys
187  //
189  this, "EventInfoKey", "EventInfo",
190  "Location of the event info"
191  };
193  this, "xposRelKey", "",
194  "X position of RPD tile center relative to center of RPD active area"
195  };
197  this, "yposRelKey", "",
198  "Y position of RPD tile center relative to center of RPD active area"
199  };
201  this, "rowKey", "",
202  "Row index of RPD channel"
203  };
205  this, "colKey", "",
206  "Column index of RPD channel"
207  };
209  this, "CalibEnergyKey", "",
210  "ZDC module amplitude"
211  };
213  this, "ZDCModuleStatusKey", "",
214  "ZDC module status word"
215  };
217  this, "RPDChannelAmplitudeKey", "",
218  "RPD channel amplitude"
219  };
221  this, "RPDChannelAmplitudeCalibKey", "",
222  "Calibrated RPD channel amplitude"
223  };
225  this, "RPDChannelMaxADCKey", "",
226  "RPD channel max ADC"
227  };
229  this, "RPDChannelMaxADCCalibKey", "",
230  "Calibrated RPD channel max ADC"
231  };
233  this, "RPDChannelPileupFracKey", "",
234  "RPD channel (out of time) pileup as a fraction of non-pileup sum"
235  };
237  this, "RPDChannelStatusKey", "",
238  "RPD channel status word"
239  };
241  this, "RPDStatusKey", "",
242  "RPD side status word"
243  };
245  this, "FinalEnergyKey", "",
246  "ZDC final energy"
247  };
249  this, "ZDCStatusKey", "",
250  "ZDC sum status word"
251  };
252 
253  // write handle keys
255  this, "centroidEventValidKey", "",
256  "Event status: true if both centroids are valid, else false"
257  };
259  this, "centroidStatusKey", "",
260  "Centroid status word"
261  };
263  this, "RPDChannelSubtrAmpKey", "",
264  "RPD channel subtracted amplitudes (tile mass) used in centroid calculation"
265  };
267  this, "RPDSubtrAmpSumKey", "",
268  "Sum of RPD channel subtracted amplitudes (total mass) used in centroid calculation"
269  };
271  this, "xCentroidPreGeomCorPreAvgSubtrKey", "",
272  "X centroid before geometry corrections and before average centroid subtraction (RPD detector coordinates)"
273  };
275  this, "yCentroidPreGeomCorPreAvgSubtrKey", "",
276  "Y centroid before geometry corrections and before average centroid subtraction (RPD detector coordinates)"
277  };
279  this, "xCentroidPreAvgSubtrKey", "",
280  "X centroid after geometry corrections and before average centroid subtraction"
281  };
283  this, "yCentroidPreAvgSubtrKey", "",
284  "Y centroid after geometry corrections and before average centroid subtraction"
285  };
287  this, "xCentroidKey", "",
288  "X centroid after geometry corrections and after average centroid subtraction"
289  };
291  this, "yCentroidKey", "",
292  "Y centroid after geometry corrections and after average centroid subtraction"
293  };
295  this, "xRowCentroidKey", "",
296  "Row X centroids before geometry corrections and before average centroid subtraction (RPD detector coordinates)"
297  };
299  this, "yColCentroidKey", "",
300  "Column Y centroids before geometry corrections and before average centroid subtraction (RPD detector coordinates)"
301  };
303  this, "reactionPlaneAngleKey", "",
304  "Reaction plane angle in [-pi, pi) from the positive x axis"
305  };
307  this, "cosDeltaReactionPlaneAngleKey", "",
308  "Cosine of the difference between the reaction plane angles of the two sides"
309  };
310 
311 };
312 } // namespace ZDC
313 
314 #endif
ZDC::RpdSubtractCentroidTool::RpdSubtractCentroidTool
RpdSubtractCentroidTool(RpdSubtractCentroidTool &&)=delete
ZDC::RpdSubtractCentroidTool::operator=
RpdSubtractCentroidTool & operator=(RpdSubtractCentroidTool &&)=delete
ZDC::RpdSubtractCentroidTool::PileupBit
@ PileupBit
Definition: RpdSubtractCentroidTool.h:38
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
ZDC::RpdSubtractCentroidTool::m_RPDChannelMaxADCCalibKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_RPDChannelMaxADCCalibKey
Definition: RpdSubtractCentroidTool.h:228
ZDC::RpdSubtractCentroidTool::checkZdcRpdValidity
bool checkZdcRpdValidity(unsigned int side)
Definition: RpdSubtractCentroidTool.cxx:292
ZDC::RpdSubtractCentroidTool::m_ZDCFinalEnergyKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_ZDCFinalEnergyKey
Definition: RpdSubtractCentroidTool.h:244
ZDC::RpdSubtractCentroidTool::m_centroidStatus
std::array< std::bitset< N_STATUS_BITS >, 2 > m_centroidStatus
event status
Definition: RpdSubtractCentroidTool.h:140
RPDUtils::nChannels
unsigned constexpr int nChannels
Definition: RPDUtils.h:23
ZDC::RpdSubtractCentroidTool::m_EMStatus
std::optional< std::array< std::bitset< ZDCPulseAnalyzer::N_STATUS_BITS >, 2 > > m_EMStatus
EM calibrated energy on each side.
Definition: RpdSubtractCentroidTool.h:123
ZDC::RpdSubtractCentroidTool::ExcessiveSubtrUnderflowBit
@ ExcessiveSubtrUnderflowBit
Definition: RpdSubtractCentroidTool.h:41
ZDC::RpdSubtractCentroidTool::m_reactionPlaneAngle
std::array< float, 2 > m_reactionPlaneAngle
the y centroid for each column on each side
Definition: RpdSubtractCentroidTool.h:162
ZDC::RpdSubtractCentroidTool::m_forceUseCalibDecorations
RPDUtils::OptionalToolProperty< bool > m_forceUseCalibDecorations
Definition: RpdSubtractCentroidTool.h:84
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
ZDC::RpdSubtractCentroidTool::m_useRPDSumAdc
bool m_useRPDSumAdc
Definition: RpdSubtractCentroidTool.h:93
ZDC::RpdSubtractCentroidTool::m_subtrAmpColSum
std::array< std::array< float, RPDUtils::nCols >, 2 > m_subtrAmpColSum
subtracted amplitude for each row on each side
Definition: RpdSubtractCentroidTool.h:146
ZDC::RpdSubtractCentroidTool::m_RPDChannelMaxADCKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_RPDChannelMaxADCKey
Definition: RpdSubtractCentroidTool.h:224
ZDC::RpdSubtractCentroidTool::~RpdSubtractCentroidTool
~RpdSubtractCentroidTool() override=default
ZDC::RpdSubtractCentroidTool::m_ZDCFinalEnergy
std::optional< std::array< float, 2 > > m_ZDCFinalEnergy
ZDC analysis status on each side.
Definition: RpdSubtractCentroidTool.h:121
ZDC::RpdSubtractCentroidTool::m_readZDCDecorations
bool m_readZDCDecorations
Definition: RpdSubtractCentroidTool.h:104
ZDC::RpdSubtractCentroidTool::Row0ValidBit
@ Row0ValidBit
Definition: RpdSubtractCentroidTool.h:43
ZDC::RpdSubtractCentroidTool::m_forceMaxEMEnergy
RPDUtils::OptionalToolProperty< std::vector< float > > m_forceMaxEMEnergy
Definition: RpdSubtractCentroidTool.h:80
ZDC::RpdSubtractCentroidTool::m_centroidStatusKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_centroidStatusKey
Definition: RpdSubtractCentroidTool.h:258
ZDC::RpdSubtractCentroidTool::m_RPDSideStatus
std::array< std::bitset< RPDDataAnalyzer::N_STATUS_BITS >, 2 > m_RPDSideStatus
Definition: RpdSubtractCentroidTool.h:119
ZDC::RpdSubtractCentroidTool::m_forcePileupMaxFrac
RPDUtils::OptionalToolProperty< std::vector< float > > m_forcePileupMaxFrac
Definition: RpdSubtractCentroidTool.h:81
ZDC::RpdSubtractCentroidTool::m_RPDChannelSubtrAmpKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_RPDChannelSubtrAmpKey
Definition: RpdSubtractCentroidTool.h:262
ZDC::RpdSubtractCentroidTool::m_forceMinZDCEnergy
RPDUtils::OptionalToolProperty< std::vector< float > > m_forceMinZDCEnergy
Definition: RpdSubtractCentroidTool.h:77
ZDC::RpdSubtractCentroidTool::m_RPDChannelPileupFracKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_RPDChannelPileupFracKey
Definition: RpdSubtractCentroidTool.h:232
ZDC::RpdSubtractCentroidTool::m_reactionPlaneAngleKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_reactionPlaneAngleKey
Definition: RpdSubtractCentroidTool.h:302
ZDCPulseAnalyzer.h
ZDC::RpdSubtractCentroidTool::m_RPDSubtrAmpSumKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_RPDSubtrAmpSumKey
Definition: RpdSubtractCentroidTool.h:266
ZDC::RpdSubtractCentroidTool::m_cosDeltaReactionPlaneAngleKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_cosDeltaReactionPlaneAngleKey
Definition: RpdSubtractCentroidTool.h:306
ZDC::RpdSubtractCentroidTool::m_auxSuffix
std::string m_auxSuffix
Definition: RpdSubtractCentroidTool.h:75
ZDC::RpdSubtractCentroidTool::readAOD
SubstepStatus readAOD(xAOD::ZdcModuleContainer const &moduleContainer, xAOD::ZdcModuleContainer const &moduleSumContainer)
Definition: RpdSubtractCentroidTool.cxx:195
ZDC::RpdSubtractCentroidTool::subtractAverageCentroid
void subtractAverageCentroid(unsigned int side)
Definition: RpdSubtractCentroidTool.cxx:419
ZDC::RpdSubtractCentroidTool::m_subtrAmp
std::array< std::vector< float >, 2 > m_subtrAmp
centroid status (valid by default) on each side
Definition: RpdSubtractCentroidTool.h:141
ZDC::RpdSubtractCentroidTool::m_RPDSideStatusKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_RPDSideStatusKey
Definition: RpdSubtractCentroidTool.h:240
ZDC::RpdSubtractCentroidTool::recoZdcModules
StatusCode recoZdcModules(const xAOD::ZdcModuleContainer &moduleContainer, const xAOD::ZdcModuleContainer &moduleSumContainer) override
Definition: RpdSubtractCentroidTool.cxx:481
ZDC::RpdSubtractCentroidTool::m_yCentroid
std::array< float, 2 > m_yCentroid
x centroid after geomerty correction and after average subtraction on each side
Definition: RpdSubtractCentroidTool.h:153
ZDC::RpdSubtractCentroidTool::RpdSubtractCentroidTool
RpdSubtractCentroidTool(const std::string &name)
Definition: RpdSubtractCentroidTool.cxx:18
ZDC::RpdSubtractCentroidTool::m_minEMEnergy
std::vector< float > m_minEMEnergy
Definition: RpdSubtractCentroidTool.h:89
ZDC::RpdSubtractCentroidTool::SubstepStatus
SubstepStatus
cosine of difference between reaction plane angles of the two sides
Definition: RpdSubtractCentroidTool.h:167
ZDC::RpdSubtractCentroidTool::RPDChannelData::channel
unsigned int channel
Definition: RpdSubtractCentroidTool.h:109
ZDC::RpdSubtractCentroidTool::anyNonNegative
static bool anyNonNegative(std::vector< float > const &v)
Definition: RpdSubtractCentroidTool.h:99
ZDC::RpdSubtractCentroidTool::m_subtrAmpSum
std::array< float, 2 > m_subtrAmpSum
subtracted amplitude for each column on each side
Definition: RpdSubtractCentroidTool.h:147
ZDC::RpdSubtractCentroidTool::SubstepStatus::Failure
@ Failure
ZDC::RpdSubtractCentroidTool::m_RPDChannelData
std::array< std::array< std::array< RPDChannelData, RPDUtils::nCols >, RPDUtils::nRows >, 2 > m_RPDChannelData
EM modlue status word on each side.
Definition: RpdSubtractCentroidTool.h:124
ZDC::RpdSubtractCentroidTool::m_useCalibDecorations
bool m_useCalibDecorations
Definition: RpdSubtractCentroidTool.h:94
IZdcAnalysisTool.h
ZDC::RpdSubtractCentroidTool::m_yColCentroid
std::array< std::vector< float >, 2 > m_yColCentroid
the x centroid for each row on each side
Definition: RpdSubtractCentroidTool.h:158
ZDC::RpdSubtractCentroidTool::RPDChannelData::xposRel
float xposRel
Definition: RpdSubtractCentroidTool.h:110
SG::ReadHandleKey< xAOD::EventInfo >
ZDC::RpdSubtractCentroidTool::m_configuration
std::string m_configuration
Definition: RpdSubtractCentroidTool.h:71
ZDC::RpdSubtractCentroidTool::m_xCentroidPreAvgSubtr
std::array< float, 2 > m_xCentroidPreAvgSubtr
y centroid before geomerty correction and before average subtraction (RPD detector coordinates) on ea...
Definition: RpdSubtractCentroidTool.h:150
ZDC::RpdSubtractCentroidTool::m_minZDCEnergy
std::vector< float > m_minZDCEnergy
Definition: RpdSubtractCentroidTool.h:87
x
#define x
ZDC::RpdSubtractCentroidTool::m_forceMaximumNegativeSubtrAmpFrac
RPDUtils::OptionalToolProperty< std::vector< float > > m_forceMaximumNegativeSubtrAmpFrac
Definition: RpdSubtractCentroidTool.h:82
ZDC::RpdSubtractCentroidTool::m_forceMinEMEnergy
RPDUtils::OptionalToolProperty< std::vector< float > > m_forceMinEMEnergy
Definition: RpdSubtractCentroidTool.h:79
RPDUtils::OptionalToolProperty
Definition: RPDUtils.h:44
ZDC::IZdcAnalysisTool
Definition: IZdcAnalysisTool.h:15
ZDC::RpdSubtractCentroidTool::Row1ValidBit
@ Row1ValidBit
Definition: RpdSubtractCentroidTool.h:44
ZDC::RpdSubtractCentroidTool::m_colKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_colKey
Definition: RpdSubtractCentroidTool.h:204
ZDC::RpdSubtractCentroidTool::Col3ValidBit
@ Col3ValidBit
Definition: RpdSubtractCentroidTool.h:50
ZDC::RpdSubtractCentroidTool::m_xRowCentroidKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_xRowCentroidKey
Definition: RpdSubtractCentroidTool.h:294
ZDC::RpdSubtractCentroidTool::m_ZDCStatusKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_ZDCStatusKey
Definition: RpdSubtractCentroidTool.h:248
ZDC::RpdSubtractCentroidTool::initialize
StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition: RpdSubtractCentroidTool.cxx:46
ZDC::RpdSubtractCentroidTool::m_cosDeltaReactionPlaneAngle
float m_cosDeltaReactionPlaneAngle
reaction plane angle on each side
Definition: RpdSubtractCentroidTool.h:163
TRT::Hit::side
@ side
Definition: HitInfo.h:83
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ZDC::RpdSubtractCentroidTool::subtractRpdAmplitudes
bool subtractRpdAmplitudes(unsigned int side)
Definition: RpdSubtractCentroidTool.cxx:349
ZDC::RpdSubtractCentroidTool::ExcessiveZDCEnergyBit
@ ExcessiveZDCEnergyBit
Definition: RpdSubtractCentroidTool.h:33
ZDC::RpdSubtractCentroidTool::RPDChannelData
Definition: RpdSubtractCentroidTool.h:108
ZDC::RpdSubtractCentroidTool::m_ZDCSideStatus
std::optional< std::array< unsigned int, 2 > > m_ZDCSideStatus
RPD analysis status word on each side.
Definition: RpdSubtractCentroidTool.h:120
ZDC::RpdSubtractCentroidTool::m_forceMaxZDCEnergy
RPDUtils::OptionalToolProperty< std::vector< float > > m_forceMaxZDCEnergy
Definition: RpdSubtractCentroidTool.h:78
ZDC::RpdSubtractCentroidTool::m_yCentroidPreAvgSubtr
std::array< float, 2 > m_yCentroidPreAvgSubtr
x centroid after geomerty correction and before average subtraction on each side
Definition: RpdSubtractCentroidTool.h:151
ZDC::RpdSubtractCentroidTool::ExcessivePileupBit
@ ExcessivePileupBit
Definition: RpdSubtractCentroidTool.h:39
ZDC::RpdSubtractCentroidTool::m_alignmentYOffset
std::array< float, 2 > m_alignmentYOffset
geometry + crossing angle correction in x (ATLAS coordinates)
Definition: RpdSubtractCentroidTool.h:129
ZDC::RpdSubtractCentroidTool::Col1ValidBit
@ Col1ValidBit
Definition: RpdSubtractCentroidTool.h:48
ZDC::RpdSubtractCentroidTool::RPDChannelData::amp
float amp
Definition: RpdSubtractCentroidTool.h:114
ZDC::RpdSubtractCentroidTool::m_alignmentXOffset
std::array< float, 2 > m_alignmentXOffset
RPD channel data for each channel (first index row, then index column) on each side.
Definition: RpdSubtractCentroidTool.h:128
ZDC::RpdSubtractCentroidTool::m_RPDChannelAmplitudeCalibKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_RPDChannelAmplitudeCalibKey
Definition: RpdSubtractCentroidTool.h:220
ZDC::RpdSubtractCentroidTool::m_xposRelKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_xposRelKey
Definition: RpdSubtractCentroidTool.h:192
ZDC::RpdSubtractCentroidTool::SubstepStatus::SkipEvent
@ SkipEvent
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ZDC::RpdSubtractCentroidTool::m_yCentroidPreAvgSubtrKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_yCentroidPreAvgSubtrKey
Definition: RpdSubtractCentroidTool.h:282
ZDC::RpdSubtractCentroidTool::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: RpdSubtractCentroidTool.h:188
ZDC::RpdSubtractCentroidTool
Definition: RpdSubtractCentroidTool.h:25
ZDC::RpdSubtractCentroidTool::ValidBit
@ ValidBit
Definition: RpdSubtractCentroidTool.h:29
ZDC::RpdSubtractCentroidTool::RPDChannelData::yposRel
float yposRel
Definition: RpdSubtractCentroidTool.h:111
ZDC::RpdSubtractCentroidTool::m_ZDCModuleCalibEnergyKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_ZDCModuleCalibEnergyKey
Definition: RpdSubtractCentroidTool.h:208
ZDC::RpdSubtractCentroidTool::RPDChannelData::status
unsigned int status
Definition: RpdSubtractCentroidTool.h:117
ZDC::RpdSubtractCentroidTool::m_RPDChannelAmplitudeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_RPDChannelAmplitudeKey
Definition: RpdSubtractCentroidTool.h:216
ZDC::RpdSubtractCentroidTool::m_maxEMEnergy
std::vector< float > m_maxEMEnergy
Definition: RpdSubtractCentroidTool.h:90
ZDC::RpdSubtractCentroidTool::m_eventValid
bool m_eventValid
average y centroid
Definition: RpdSubtractCentroidTool.h:139
ZDC::RpdSubtractCentroidTool::m_rowKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_rowKey
Definition: RpdSubtractCentroidTool.h:200
ZDC::RpdSubtractCentroidTool::m_EMCalibEnergy
std::optional< std::array< float, 2 > > m_EMCalibEnergy
ZDC final (calibrated) energy on each side.
Definition: RpdSubtractCentroidTool.h:122
ZDC::RpdSubtractCentroidTool::Col0ValidBit
@ Col0ValidBit
Definition: RpdSubtractCentroidTool.h:47
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ZDC::RpdSubtractCentroidTool::m_ZDCModuleContainerName
std::string m_ZDCModuleContainerName
Definition: RpdSubtractCentroidTool.h:72
ZDC::RpdSubtractCentroidTool::reset
void reset()
Definition: RpdSubtractCentroidTool.cxx:173
ZDC::RpdSubtractCentroidTool::m_ZDCModuleStatusKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_ZDCModuleStatusKey
Definition: RpdSubtractCentroidTool.h:212
ZDC::RpdSubtractCentroidTool::m_writeAux
bool m_writeAux
Definition: RpdSubtractCentroidTool.h:74
ZDC::RpdSubtractCentroidTool::m_RPDChannelStatusKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_RPDChannelStatusKey
Definition: RpdSubtractCentroidTool.h:236
ZDC::RpdSubtractCentroidTool::m_initialized
bool m_initialized
Definition: RpdSubtractCentroidTool.h:103
ZDC::RpdSubtractCentroidTool::RPDChannelData::col
unsigned short col
Definition: RpdSubtractCentroidTool.h:113
ZDC::RpdSubtractCentroidTool::InsufficientZDCEnergyBit
@ InsufficientZDCEnergyBit
Definition: RpdSubtractCentroidTool.h:32
ZDC::RpdSubtractCentroidTool::m_yCentroidPreGeomCorPreAvgSubtrKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_yCentroidPreGeomCorPreAvgSubtrKey
Definition: RpdSubtractCentroidTool.h:274
RPDUtils::nCols
unsigned constexpr int nCols
Definition: RPDUtils.h:25
RPDUtils.h
ZDC::RpdSubtractCentroidTool::m_yCentroidPreGeomCorPreAvgSubtr
std::array< float, 2 > m_yCentroidPreGeomCorPreAvgSubtr
x centroid before geomerty correction and before average subtraction (RPD detector coordinates) on ea...
Definition: RpdSubtractCentroidTool.h:149
ZDC::RpdSubtractCentroidTool::ZeroSumBit
@ ZeroSumBit
Definition: RpdSubtractCentroidTool.h:40
ZDC::RpdSubtractCentroidTool::m_xCentroidPreGeomCorPreAvgSubtr
std::array< float, 2 > m_xCentroidPreGeomCorPreAvgSubtr
subtracted amplitude sum on each side
Definition: RpdSubtractCentroidTool.h:148
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ZDC::RpdSubtractCentroidTool::m_yposRelKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_yposRelKey
Definition: RpdSubtractCentroidTool.h:196
ZDC::RpdSubtractCentroidTool::RPDChannelData::subtrAmp
float subtrAmp
Definition: RpdSubtractCentroidTool.h:115
ZDC::RpdSubtractCentroidTool::m_ZDCSumContainerName
std::string m_ZDCSumContainerName
Definition: RpdSubtractCentroidTool.h:73
ZDC::RpdSubtractCentroidTool::initializeKey
StatusCode initializeKey(std::string const &containerName, SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > &readHandleKey, std::string const &key)
Definition: RpdSubtractCentroidTool.cxx:36
ZDC::RpdSubtractCentroidTool::RPDInvalidBit
@ RPDInvalidBit
Definition: RpdSubtractCentroidTool.h:37
RPDDataAnalyzer.h
ZDC::RpdSubtractCentroidTool::m_centroidEventValidKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_centroidEventValidKey
Definition: RpdSubtractCentroidTool.h:254
ZDC::RpdSubtractCentroidTool::EMInvalidBit
@ EMInvalidBit
Definition: RpdSubtractCentroidTool.h:34
ZDC::RpdSubtractCentroidTool::m_maxZDCEnergy
std::vector< float > m_maxZDCEnergy
Definition: RpdSubtractCentroidTool.h:88
ZDC::RpdSubtractCentroidTool::Col2ValidBit
@ Col2ValidBit
Definition: RpdSubtractCentroidTool.h:49
EventInfo.h
ZDC::RpdSubtractCentroidTool::calculateDetectorCentroid
void calculateDetectorCentroid(unsigned int side)
Definition: RpdSubtractCentroidTool.cxx:387
ZDC::RpdSubtractCentroidTool::m_xRowCentroid
std::array< std::vector< float >, 2 > m_xRowCentroid
y centroid after geomerty correction and after average subtraction on each side
Definition: RpdSubtractCentroidTool.h:154
ZDC::RpdSubtractCentroidTool::m_pileupMaxFrac
std::vector< float > m_pileupMaxFrac
Definition: RpdSubtractCentroidTool.h:91
ZDC::RpdSubtractCentroidTool::RPDChannelData::row
unsigned short row
Definition: RpdSubtractCentroidTool.h:112
ZDC::RpdSubtractCentroidTool::InsufficientEMEnergyBit
@ InsufficientEMEnergyBit
Definition: RpdSubtractCentroidTool.h:35
python.PyAthena.v
v
Definition: PyAthena.py:154
WriteDecorHandleKey.h
ZDC::RpdSubtractCentroidTool::m_xCentroidKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_xCentroidKey
Definition: RpdSubtractCentroidTool.h:286
ZDC::RpdSubtractCentroidTool::m_subtrAmpRowSum
std::array< std::array< float, RPDUtils::nRows >, 2 > m_subtrAmpRowSum
subtracted amplitude for each channel on each side
Definition: RpdSubtractCentroidTool.h:145
ZDC::RpdSubtractCentroidTool::Row3ValidBit
@ Row3ValidBit
Definition: RpdSubtractCentroidTool.h:46
ZDC::RpdSubtractCentroidTool::m_yColCentroidKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_yColCentroidKey
Definition: RpdSubtractCentroidTool.h:298
ZDC::RpdSubtractCentroidTool::m_xCentroidPreGeomCorPreAvgSubtrKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_xCentroidPreGeomCorPreAvgSubtrKey
Definition: RpdSubtractCentroidTool.h:270
ZDC::RpdSubtractCentroidTool::operator=
RpdSubtractCentroidTool & operator=(RpdSubtractCentroidTool const &)=delete
ZDC::RpdSubtractCentroidTool::m_maximumNegativeSubtrAmpFrac
std::vector< float > m_maximumNegativeSubtrAmpFrac
Definition: RpdSubtractCentroidTool.h:92
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
ZDC
Definition: RPDAnalysisTool.cxx:12
ZDC::RpdSubtractCentroidTool::writeAOD
void writeAOD(xAOD::ZdcModuleContainer const &moduleSumContainer) const
Definition: RpdSubtractCentroidTool.cxx:437
ZDC::RpdSubtractCentroidTool::RPDChannelData::pileupFrac
float pileupFrac
Definition: RpdSubtractCentroidTool.h:116
ZDC::RpdSubtractCentroidTool::reprocessZdc
StatusCode reprocessZdc() override
Definition: RpdSubtractCentroidTool.cxx:518
RPDUtils::nRows
unsigned constexpr int nRows
Definition: RPDUtils.h:24
ZDC::RpdSubtractCentroidTool::geometryCorrection
void geometryCorrection(unsigned int side)
Definition: RpdSubtractCentroidTool.cxx:413
ZDC::RpdSubtractCentroidTool::m_forceUseRPDSumAdc
RPDUtils::OptionalToolProperty< bool > m_forceUseRPDSumAdc
Definition: RpdSubtractCentroidTool.h:83
ZDC::RpdSubtractCentroidTool::nonNegative
static bool nonNegative(float const x)
Definition: RpdSubtractCentroidTool.h:98
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
ZDC::RpdSubtractCentroidTool::calculateReactionPlaneAngle
void calculateReactionPlaneAngle(unsigned int side)
Definition: RpdSubtractCentroidTool.cxx:424
AsgTool.h
ZDC::RpdSubtractCentroidTool::m_xCentroidPreAvgSubtrKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_xCentroidPreAvgSubtrKey
Definition: RpdSubtractCentroidTool.h:278
ZDC::RpdSubtractCentroidTool::Row2ValidBit
@ Row2ValidBit
Definition: RpdSubtractCentroidTool.h:45
ZDC::RpdSubtractCentroidTool::HasCentroidBit
@ HasCentroidBit
Definition: RpdSubtractCentroidTool.h:30
ZDC::RpdSubtractCentroidTool::ZDCInvalidBit
@ ZDCInvalidBit
Definition: RpdSubtractCentroidTool.h:31
ZdcModuleContainer.h
ZDC::RpdSubtractCentroidTool::RpdSubtractCentroidTool
RpdSubtractCentroidTool(RpdSubtractCentroidTool const &)=delete
ZDC::RpdSubtractCentroidTool::N_STATUS_BITS
@ N_STATUS_BITS
Definition: RpdSubtractCentroidTool.h:52
ZDC::RpdSubtractCentroidTool::SubstepStatus::Success
@ Success
ZDC::RpdSubtractCentroidTool::m_avgYCentroid
std::array< float, 2 > m_avgYCentroid
average x centroid
Definition: RpdSubtractCentroidTool.h:135
ZDC::RpdSubtractCentroidTool::ExcessiveEMEnergyBit
@ ExcessiveEMEnergyBit
Definition: RpdSubtractCentroidTool.h:36
ZDC::RpdSubtractCentroidTool::m_xCentroid
std::array< float, 2 > m_xCentroid
y centroid after geomerty correction and before average subtraction on each side
Definition: RpdSubtractCentroidTool.h:152
ZDC::RpdSubtractCentroidTool::m_avgXCentroid
std::array< float, 2 > m_avgXCentroid
geometry + crossing angle correction in y (ATLAS coordinates)
Definition: RpdSubtractCentroidTool.h:134
ZDC::RpdSubtractCentroidTool::m_yCentroidKey
SG::WriteDecorHandleKey< xAOD::ZdcModuleContainer > m_yCentroidKey
Definition: RpdSubtractCentroidTool.h:290
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37