ATLAS Offline Software
TBECLArRawChannelBuilder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TBREC_TBECLARRAWCHANNELBUILDER_H
6 #define TBREC_TBECLARRAWCHANNELBUILDER_H
7 
9 #include "GaudiKernel/ToolHandle.h"
12 #include "LArElecCalib/ILArOFC.h"
13 
15 
17 
22 
23 class CaloCell_ID;
24 
26 {
27 public:
28  TBECLArRawChannelBuilder (const std::string& name, ISvcLocator* pSvcLocator);
29  virtual StatusCode initialize() override;
30  virtual StatusCode execute() override;
31  virtual StatusCode finalize() override;
32 
33 private:
34  //Services & Tools
37 
38  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey {this,"keyCabling", "LArOnOffIdMap", "Input key for Id mapping"} ;
39  SG::ReadCondHandleKey<ILArHVScaleCorr> m_offlineHVScaleCorrKey{this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"};
40 
41  //Algo-properties
45  float m_Ecut;
49  bool m_useIntercept[4];
51  bool m_phaseInv ;
52  float m_ramp_max[3];
53 
55  float m_OFCTimeBin;
59  unsigned int m_iPedestal;
60  unsigned int m_shapeMode;
61 
62  unsigned m_skipSaturCells; // 0 = no skip ; 1 = skip saturating cells ; 2 = skipp all event
63  short m_AdcMax;
64 
65  //Counters for errors & warnings per job:
66  int m_noEnergy; // Number of events with at least completly failed channel
67  int m_noTime; // Number of events with at least one channel without time info
68  int m_noShape; // Number of events with at least one channel without Shape (=with not quality factor);
69  int m_noShapeDer; // Number of events with at least one channel without ShapeDerivative (=not taken into accout for quality factor);
70  int m_saturation; // Number of events with at least one saturating channel
71 
72  //bool m_errorPrint;
73  int m_lastNoEnergy; // Number of completly failed channels in previous event
74  int m_lastNoTime; // Number of channels without time info in previous event
75  int m_lastNoShape; // Number of channels without Shape (=with not quality factor) in previous event
76  int m_lastNoShapeDer; // Number of channels without ShapeDerivative in previous event
77  //int m_lastSaturCells; // Number of saturating channels without in previous event (not used)
78 
79  float m_aveNoEnergy; // Average number of completly failed channels per event
80  float m_aveNoTime; // Average number of channels without time info per event
81  float m_aveNoShape; // Average number of channels without Shape (=with not quality factor) per event
82  float m_aveNoShapeDer; // Average number of channels without ShapeDerivative per event
83  float m_aveSaturCells; // Average number of saturating channels per event
84 
85  int m_nEvents; // Total number of processed events ;
86  float m_aveChannels; // Average number of readout channels per event
87  bool m_hvcorr;
88 
89  //Time ranges for OFC application
91 
92  //Private Member functions:
93  //void sortChannels(LArRawChannelContainer* container) ;
94 
95  // to be used for detailed DEBUG output only
96  const LArEM_ID* m_emId;
97 
98  // For useRamp = False
99  float m_adc2mev[30];
100 
103  {this, "OFCKey", "LArOFC", "SG Key of OFC conditions object" };
104 
106  { this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" };
107 };
108 
109 #endif
TBECLArRawChannelBuilder::execute
virtual StatusCode execute() override
Definition: TBECLArRawChannelBuilder.cxx:181
TBECLArRawChannelBuilder::m_noEnergy
int m_noEnergy
Definition: TBECLArRawChannelBuilder.h:66
TBECLArRawChannelBuilder::m_noShapeDer
int m_noShapeDer
Definition: TBECLArRawChannelBuilder.h:69
TBECLArRawChannelBuilder::m_lastNoTime
int m_lastNoTime
Definition: TBECLArRawChannelBuilder.h:74
TBECLArRawChannelBuilder::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: TBECLArRawChannelBuilder.h:35
TBECLArRawChannelBuilder::m_offlineHVScaleCorrKey
SG::ReadCondHandleKey< ILArHVScaleCorr > m_offlineHVScaleCorrKey
Definition: TBECLArRawChannelBuilder.h:39
TBECLArRawChannelBuilder::m_binHalfOffset
bool m_binHalfOffset
Definition: TBECLArRawChannelBuilder.h:56
TBECLArRawChannelBuilder::m_aveSaturCells
float m_aveSaturCells
Definition: TBECLArRawChannelBuilder.h:83
TBECLArRawChannelBuilder::m_aveNoShape
float m_aveNoShape
Definition: TBECLArRawChannelBuilder.h:81
TBECLArRawChannelBuilder::m_lastNoShapeDer
int m_lastNoShapeDer
Definition: TBECLArRawChannelBuilder.h:76
TBECLArRawChannelBuilder::m_lastNoShape
int m_lastNoShape
Definition: TBECLArRawChannelBuilder.h:75
TBECLArRawChannelBuilder::m_ChannelContainerName
std::string m_ChannelContainerName
Definition: TBECLArRawChannelBuilder.h:42
TBECLArRawChannelBuilder::m_OFCTimeBin
float m_OFCTimeBin
Definition: TBECLArRawChannelBuilder.h:55
TBECLArRawChannelBuilder::m_phaseInv
bool m_phaseInv
Definition: TBECLArRawChannelBuilder.h:51
TBECLArRawChannelBuilder::m_lastNoEnergy
int m_lastNoEnergy
Definition: TBECLArRawChannelBuilder.h:73
ILArOFC.h
TBECLArRawChannelBuilder::TBECLArRawChannelBuilder
TBECLArRawChannelBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TBECLArRawChannelBuilder.cxx:27
TBECLArRawChannelBuilder::m_iPedestal
unsigned int m_iPedestal
Definition: TBECLArRawChannelBuilder.h:59
TBECLArRawChannelBuilder::m_aveNoEnergy
float m_aveNoEnergy
Definition: TBECLArRawChannelBuilder.h:79
TBECLArRawChannelBuilder::m_calo_id
const CaloCell_ID * m_calo_id
Definition: TBECLArRawChannelBuilder.h:36
ReadCondHandle.h
CaloCell_ID.h
TBECLArRawChannelBuilder::m_Ecut
float m_Ecut
Definition: TBECLArRawChannelBuilder.h:45
TBECLArRawChannelBuilder::m_adc2mevKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
Definition: TBECLArRawChannelBuilder.h:106
AthAlgorithm.h
TBECLArRawChannelBuilder::m_saturation
int m_saturation
Definition: TBECLArRawChannelBuilder.h:70
TBECLArRawChannelBuilder::m_ofcKey
SG::ReadCondHandleKey< ILArOFC > m_ofcKey
Property: OFC coefficients (conditions input).
Definition: TBECLArRawChannelBuilder.h:103
LArADC2MeV.h
TBECLArRawChannelBuilder::m_useRamp
bool m_useRamp
Definition: TBECLArRawChannelBuilder.h:43
TBECLArRawChannelBuilder
Definition: TBECLArRawChannelBuilder.h:26
LArOnOffIdMapping.h
TBECLArRawChannelBuilder::m_noShape
int m_noShape
Definition: TBECLArRawChannelBuilder.h:68
TBECLArRawChannelBuilder::m_adc2mev
float m_adc2mev[30]
Definition: TBECLArRawChannelBuilder.h:99
TBECLArRawChannelBuilder::m_SamplingPeriodeLowerLimit
double m_SamplingPeriodeLowerLimit
Definition: TBECLArRawChannelBuilder.h:90
ILArHVScaleCorr.h
TBECLArRawChannelBuilder::m_aveChannels
float m_aveChannels
Definition: TBECLArRawChannelBuilder.h:86
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TBECLArRawChannelBuilder::m_pedestalFallbackMode
int m_pedestalFallbackMode
Definition: TBECLArRawChannelBuilder.h:58
TBECLArRawChannelBuilder::m_useOFCPhase
bool m_useOFCPhase
Definition: TBECLArRawChannelBuilder.h:50
TBECLArRawChannelBuilder::m_useTDC
bool m_useTDC
Definition: TBECLArRawChannelBuilder.h:43
TBECLArRawChannelBuilder::m_useShape
bool m_useShape
Definition: TBECLArRawChannelBuilder.h:43
TBECLArRawChannelBuilder::m_skipSaturCells
unsigned m_skipSaturCells
Definition: TBECLArRawChannelBuilder.h:62
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
TBECLArRawChannelBuilder::m_aveNoShapeDer
float m_aveNoShapeDer
Definition: TBECLArRawChannelBuilder.h:82
AthAlgorithm
Definition: AthAlgorithm.h:47
TBECLArRawChannelBuilder::finalize
virtual StatusCode finalize() override
Definition: TBECLArRawChannelBuilder.cxx:723
ReadCondHandleKey.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LArOnlineID
Definition: LArOnlineID.h:20
TBECLArRawChannelBuilder::m_NOFCTimeBins
int m_NOFCTimeBins
Definition: TBECLArRawChannelBuilder.h:48
TBECLArRawChannelBuilder::m_SamplingPeriodeUpperLimit
double m_SamplingPeriodeUpperLimit
Definition: TBECLArRawChannelBuilder.h:90
TBECLArRawChannelBuilder::m_NOFCPhases
int m_NOFCPhases
Definition: TBECLArRawChannelBuilder.h:47
SG::ReadCondHandleKey< LArOnOffIdMapping >
TBECLArRawChannelBuilder::m_DataLocation
std::string m_DataLocation
Definition: TBECLArRawChannelBuilder.h:42
TBECLArRawChannelBuilder::m_shapeMode
unsigned int m_shapeMode
Definition: TBECLArRawChannelBuilder.h:60
TBECLArRawChannelBuilder::m_ConvertADCToHighGain
bool m_ConvertADCToHighGain
Definition: TBECLArRawChannelBuilder.h:44
TBECLArRawChannelBuilder::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: TBECLArRawChannelBuilder.h:38
TBECLArRawChannelBuilder::m_aveNoTime
float m_aveNoTime
Definition: TBECLArRawChannelBuilder.h:80
TBECLArRawChannelBuilder::m_useIntercept
bool m_useIntercept[4]
Definition: TBECLArRawChannelBuilder.h:49
TBECLArRawChannelBuilder::m_emId
const LArEM_ID * m_emId
Definition: TBECLArRawChannelBuilder.h:96
TBECLArRawChannelBuilder::m_initialTimeSampleShift
int m_initialTimeSampleShift
Definition: TBECLArRawChannelBuilder.h:46
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
TBECLArRawChannelBuilder::m_hvcorr
bool m_hvcorr
Definition: TBECLArRawChannelBuilder.h:87
TBECLArRawChannelBuilder::initialize
virtual StatusCode initialize() override
Definition: TBECLArRawChannelBuilder.cxx:93
TBECLArRawChannelBuilder::m_nEvents
int m_nEvents
Definition: TBECLArRawChannelBuilder.h:85
TBECLArRawChannelBuilder::m_allowTimeJump
bool m_allowTimeJump
Definition: TBECLArRawChannelBuilder.h:57
TBECLArRawChannelBuilder::m_SamplingPeriode
double m_SamplingPeriode
Definition: TBECLArRawChannelBuilder.h:54
TBECLArRawChannelBuilder::m_AdcMax
short m_AdcMax
Definition: TBECLArRawChannelBuilder.h:63
LArRawChannelContainer.h
LArOnlineID.h
TBECLArRawChannelBuilder::m_ramp_max
float m_ramp_max[3]
Definition: TBECLArRawChannelBuilder.h:52
TBECLArRawChannelBuilder::m_noTime
int m_noTime
Definition: TBECLArRawChannelBuilder.h:67