ATLAS Offline Software
LArRawChannelBuilder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
17 #ifndef LARRAWCHANNELBUILDER
18 #define LARRAWCHANNELBUILDER
19 
24 #include "GaudiKernel/ToolHandle.h"
25 #include "GaudiKernel/ServiceHandle.h"
26 #include "LArElecCalib/ILArOFC.h"
31 
33 
35 
37 {
38 
39 public:
40  LArRawChannelBuilder (const std::string& name, ISvcLocator* pSvcLocator);
41  virtual StatusCode initialize() override;
42  virtual StatusCode execute() override;
43  virtual StatusCode finalize() override;
44 
45 private:
46  //Services & Tools
48  //LArRawOrdering m_larRawOrdering;
49 
50 
51  //Algo-properties
53  { this, "DataLocation", "FREE", "" };
55  { this, "LArRawChannelContainerName", "LArRawChannels", "" };
56  float m_Ecut;
60  bool m_useIntercept[4]{};
62  bool m_phaseInv ;
63  float m_ramp_max[3];
64 
66  float m_OFCTimeBin;
70  unsigned int m_iPedestal;
71  unsigned int m_shapeMode;
72 
73  unsigned m_skipSaturCells; // 0 = no skip ; 1 = skip saturating cells ; 2 = skipp all event
74  short m_AdcMax;
75 
76  //Counters for errors & warnings per job:
77  int m_noEnergy; // Number of events with at least completly failed channel
78  int m_noTime; // Number of events with at least one channel without time info
79  int m_noShape; // Number of events with at least one channel without Shape (=with not quality factor);
80  int m_noShapeDer; // Number of events with at least one channel without ShapeDerivative (=not taken into accout for quality factor);
81  int m_saturation; // Number of events with at least one saturating channel
82 
83  //bool m_errorPrint;
84  int m_lastNoEnergy; // Number of completly failed channels in previous event
85  int m_lastNoTime; // Number of channels without time info in previous event
86  int m_lastNoShape; // Number of channels without Shape (=with not quality factor) in previous event
87  int m_lastNoShapeDer; // Number of channels without ShapeDerivative in previous event
88  //int m_lastSaturCells; // Number of saturating channels without in previous event (not used)
89 
90  float m_aveNoEnergy; // Average number of completly failed channels per event
91  float m_aveNoTime; // Average number of channels without time info per event
92  float m_aveNoShape; // Average number of channels without Shape (=with not quality factor) per event
93  float m_aveNoShapeDer; // Average number of channels without ShapeDerivative per event
94  float m_aveSaturCells; // Average number of saturating channels per event
95 
96  int m_nEvents; // Total number of processed events ;
97  float m_aveChannels; // Average number of readout channels per event
98 
99  //Time ranges for OFC application
101 
102  //Private Member functions:
103  //void sortChannels(LArRawChannelContainer* container) ;
104 
105  // to be used for detailed DEBUG output only
106  const LArEM_ID* m_emId;
107  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
109  { this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" };
110 
111  int m_firstSample; // shift to apply to Shape from DB to match digitized samples
112  std::string m_pedestalKey;
113  std::string m_shapesKey;
114 
117  {this, "OFCKey", "LArOFC", "SG Key of OFC conditions object" };
118 };
119 
120 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
LArRawChannelBuilder::m_initialTimeSampleShift
int m_initialTimeSampleShift
Definition: LArRawChannelBuilder.h:57
LArRawChannelBuilder::m_lastNoEnergy
int m_lastNoEnergy
Definition: LArRawChannelBuilder.h:84
LArRawChannelBuilder::m_aveNoTime
float m_aveNoTime
Definition: LArRawChannelBuilder.h:91
LArRawChannelBuilder::m_noShape
int m_noShape
Definition: LArRawChannelBuilder.h:79
LArRawChannelBuilder::m_noTime
int m_noTime
Definition: LArRawChannelBuilder.h:78
LArRawChannelBuilder::m_adc2mevKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
Definition: LArRawChannelBuilder.h:109
LArRawChannelBuilder::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArRawChannelBuilder.h:107
LArRawChannelBuilder::m_SamplingPeriodeLowerLimit
double m_SamplingPeriodeLowerLimit
Definition: LArRawChannelBuilder.h:100
LArRawChannelBuilder::m_lastNoShape
int m_lastNoShape
Definition: LArRawChannelBuilder.h:86
LArRawChannelBuilder::m_iPedestal
unsigned int m_iPedestal
Definition: LArRawChannelBuilder.h:70
LArRawChannelBuilder::m_aveNoShapeDer
float m_aveNoShapeDer
Definition: LArRawChannelBuilder.h:93
ILArOFC.h
SG::ReadHandleKey< LArDigitContainer >
LArRawChannelBuilder::m_shapeMode
unsigned int m_shapeMode
Definition: LArRawChannelBuilder.h:71
LArRawChannelBuilder::m_skipSaturCells
unsigned m_skipSaturCells
Definition: LArRawChannelBuilder.h:73
CaloCell_ID.h
AthAlgorithm.h
LArADC2MeV.h
LArRawChannelBuilder::m_SamplingPeriode
double m_SamplingPeriode
Definition: LArRawChannelBuilder.h:65
LArRawChannelBuilder::m_aveChannels
float m_aveChannels
Definition: LArRawChannelBuilder.h:97
LArRawChannelBuilder::m_aveNoEnergy
float m_aveNoEnergy
Definition: LArRawChannelBuilder.h:90
LArOnOffIdMapping.h
LArRawChannelBuilder::m_ChannelContainerName
SG::WriteHandleKey< LArRawChannelContainer > m_ChannelContainerName
Definition: LArRawChannelBuilder.h:55
SG::WriteHandleKey< LArRawChannelContainer >
LArRawChannelBuilder::m_ramp_max
float m_ramp_max[3]
Definition: LArRawChannelBuilder.h:63
LArRawChannelBuilder::m_useOFCPhase
bool m_useOFCPhase
Definition: LArRawChannelBuilder.h:61
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArRawChannelBuilder::m_shapesKey
std::string m_shapesKey
Definition: LArRawChannelBuilder.h:113
LArRawChannelBuilder::m_pedestalKey
std::string m_pedestalKey
Definition: LArRawChannelBuilder.h:112
LArRawChannelBuilder::m_aveSaturCells
float m_aveSaturCells
Definition: LArRawChannelBuilder.h:94
LArRawChannelBuilder::m_NOFCPhases
int m_NOFCPhases
Definition: LArRawChannelBuilder.h:58
LArRawChannelBuilder::finalize
virtual StatusCode finalize() override
Definition: LArRawChannelBuilder.cxx:637
LArRawChannelBuilder::m_saturation
int m_saturation
Definition: LArRawChannelBuilder.h:81
LArRawChannelBuilder::m_SamplingPeriodeUpperLimit
double m_SamplingPeriodeUpperLimit
Definition: LArRawChannelBuilder.h:100
LArRawChannelBuilder::m_firstSample
int m_firstSample
Definition: LArRawChannelBuilder.h:111
AthAlgorithm
Definition: AthAlgorithm.h:47
LArRawChannelBuilder::m_useIntercept
bool m_useIntercept[4]
Definition: LArRawChannelBuilder.h:60
LArRawChannelBuilder::m_pedestalFallbackMode
int m_pedestalFallbackMode
Definition: LArRawChannelBuilder.h:69
ReadCondHandleKey.h
LArRawChannelBuilder::m_OFCTimeBin
float m_OFCTimeBin
Definition: LArRawChannelBuilder.h:66
LArRawChannelBuilder
CTB LArRawChannelBuilder: Convert ADC samples into energy.
Definition: LArRawChannelBuilder.h:37
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
LArRawChannelBuilder::m_nEvents
int m_nEvents
Definition: LArRawChannelBuilder.h:96
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LArRawChannelBuilder::m_aveNoShape
float m_aveNoShape
Definition: LArRawChannelBuilder.h:92
LArRawChannelBuilder::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: LArRawChannelBuilder.h:47
LArOnlineID
Definition: LArOnlineID.h:20
LArDigitContainer.h
LArRawChannelBuilder::m_Ecut
float m_Ecut
Definition: LArRawChannelBuilder.h:56
LArRawChannelBuilder::execute
virtual StatusCode execute() override
Definition: LArRawChannelBuilder.cxx:155
SG::ReadCondHandleKey< LArOnOffIdMapping >
LArRawChannelBuilder::m_dataLocation
SG::ReadHandleKey< LArDigitContainer > m_dataLocation
Definition: LArRawChannelBuilder.h:53
LArRawChannelBuilder::m_allowTimeJump
bool m_allowTimeJump
Definition: LArRawChannelBuilder.h:68
LArRawChannelBuilder::m_AdcMax
short m_AdcMax
Definition: LArRawChannelBuilder.h:74
LArRawChannelBuilder::m_binHalfOffset
bool m_binHalfOffset
Definition: LArRawChannelBuilder.h:67
LArRawChannelBuilder::initialize
virtual StatusCode initialize() override
Definition: LArRawChannelBuilder.cxx:82
LArRawChannelBuilder::m_NOFCTimeBins
int m_NOFCTimeBins
Definition: LArRawChannelBuilder.h:59
LArRawChannelBuilder::m_phaseInv
bool m_phaseInv
Definition: LArRawChannelBuilder.h:62
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
LArRawChannelBuilder::m_lastNoTime
int m_lastNoTime
Definition: LArRawChannelBuilder.h:85
LArRawChannelBuilder::m_ofcKey
SG::ReadCondHandleKey< ILArOFC > m_ofcKey
Property: OFC coefficients (conditions input).
Definition: LArRawChannelBuilder.h:117
LArRawChannelBuilder::m_emId
const LArEM_ID * m_emId
Definition: LArRawChannelBuilder.h:106
LArRawChannelBuilder::LArRawChannelBuilder
LArRawChannelBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArRawChannelBuilder.cxx:27
LArRawChannelBuilder::m_noShapeDer
int m_noShapeDer
Definition: LArRawChannelBuilder.h:80
LArRawChannelContainer.h
LArRawChannelBuilder::m_noEnergy
int m_noEnergy
Definition: LArRawChannelBuilder.h:77
LArOnlineID.h
LArRawChannelBuilder::m_lastNoShapeDer
int m_lastNoShapeDer
Definition: LArRawChannelBuilder.h:87