ATLAS Offline Software
Loading...
Searching...
No Matches
TileCellBuilder Class Reference

This class creates Cells from RawChannels and stores them in a container. More...

#include <TileCellBuilder.h>

Inheritance diagram for TileCellBuilder:

Classes

class  DoubleVectorIterator
struct  VecParams

Public Member Functions

 TileCellBuilder (const std::string &type, const std::string &name, const IInterface *parent)
 Contructor.
virtual ~TileCellBuilder ()
 Destructor.
virtual StatusCode initialize () override
 Initializer.
virtual StatusCode finalize () override
virtual StatusCode process (CaloCellContainer *theCellContainer, const EventContext &ctx) const override
 method to process all raw channels and store them in container
void reset (bool fullSizeCont, bool printReset=true)
 Method to reset the options of the TileCellContainer.

Static Public Member Functions

static const InterfaceID & interfaceID ()

Private Types

enum  CELL_CHANNEL { E1_CHANNEL = 12 }
enum  CELL_TOWER { E1_TOWER = 10 , E1_TOWER_UPGRADE_ABC = 42 }
typedef TileDrawerEvtStatus TileDrawerEvtStatusArray[5][64]
 status of every drawer

Private Member Functions

template<class ITERATOR, class COLLECTION>
void build (const EventContext &ctx, TileDrawerEvtStatusArray &drawerEvtStatus, VecParams &params, const ITERATOR &begin, const ITERATOR &end, COLLECTION *coll, TileCellContainer *MBTSCells, TileCellContainer *E4prCells) const
 < method to process raw channels from a given vector and store them in collection
bool maskBadChannel (TileDrawerEvtStatusArray &drawerEvtStatus, const TileDQstatus *DQstatus, const TileDCSState *dcsState, const TileBadChannels *badChannels, TileCell *pCell, HWIdentifier hwid) const
 method to check if channels are good or bad.
bool maskBadChannels (TileDrawerEvtStatusArray &drawerEvtStatus, const TileDQstatus *DQstatus, const TileDCSState *dcsState, const TileBadChannels *badChannels, TileCell *pCell) const
void correctCell (TileCell *pCell, int correction, int pmt, int gain, float ener, float time, unsigned char iqual, unsigned char qbit, int ch_type) const
 Compute calibrated energy, time, etc.
unsigned char iquality (float qual) const
unsigned char qbits (TileDrawerEvtStatusArray &drawerEvtStatus, TileFragHash::TYPE RChType, int ros, int drawer, bool count_over, bool good_time, bool good_ener, bool overflow, bool underflow, bool good_overflowfit) const
 method to compute the cell quality bits

Private Attributes

SG::ReadHandleKey< TileRawChannelContainerm_rawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainerm_dspRawChannelContainerKey
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey
SG::ReadHandleKey< TileDQstatusm_DQstatusKey
SG::WriteHandleKey< TileCellContainerm_MBTSContainerKey
SG::WriteHandleKey< TileCellContainerm_E4prContainerKey
SG::WriteDecorHandleKey< xAOD::EventInfom_EventInfoTileStatusKey
std::string m_dspRawChannelContainer
float m_eneForTimeCut
 keep time for channels with energy above cut
float m_eneForTimeCutMBTS
 similar cut for MBTS in pC
float m_zeroEnergy
 energy to store in every PMT if both PMT are bad
int m_qualityCut
 cut on channel quality (set energy to m_zeroEnergy for them)
bool m_correctTime
 should time be corrected (deltat added from CondDB)
bool m_correctAmplitude
 If true, amplitude is corrected by parabolic function (needed for OF without iterations)
bool m_of2
 If true, assume OF2 method for amplitude correction, otherwise - OF1.
bool m_mergeChannels
 If true, missing raw channels are taken from DSP container.
float m_ampMinThresh
 correct amplitude if it's above amplitude threshold (in ADC counts)
float m_timeMinThresh
 correct amplitude is time is above time min threshold
float m_timeMaxThresh
 correct amplitude is time is below time max threshold
float m_minEneChan [3]
 channel energy thresholds for masking (normal,gap,mbts)
float m_eThreshold
 cell energy threshold to consider the cell
float m_maxTimeDiff
 maximum time difference between the PMTs in the cell
float m_maxTime
 maximum time for the PMTs in the cels
float m_minTime
 minimum time for the PMTs in the cels
float m_maxChi2
 maximum chi2 for the PMTs in the cels
float m_minChi2
 minimum chi2 for the PMTs in the cels
bool m_thresholdNotSet
 bool variable to check whether some threshold have been set
bool m_fullSizeCont
bool m_maskBadChannels
 if true=> bad channels are masked
bool m_fakeCrackCells
 if true=> fake E3/E4 cells added
int m_skipGain
 for two-gain calib runs skip one of two gains
int m_useDemoCabling
bool m_checkDCS
const TileIDm_tileID
 Pointer to TileID.
const TileTBIDm_tileTBID
 Pointer to TileTBID.
const TileHWIDm_tileHWID
 Pointer to TileHWID.
const TileCablingServicem_cabling
 TileCabling instance.
SG::ReadCondHandleKey< TileBadChannelsm_badChannelsKey
 Name of TileBadChannels in condition store.
SG::ReadCondHandleKey< TileEMScalem_emScaleKey
 Name of TileEMScale in condition store.
ToolHandle< TileCondToolTimingm_tileToolTiming
ToolHandleArray< ITileRawChannelToolm_noiseFilterTools
SG::ReadCondHandleKey< TileDCSStatem_DCSStateKey
 Name of TileDCSState object in condition store.
ServiceHandle< TileCablingSvcm_cablingSvc
 Name of Tile cabling service.
const TileDetDescrManagerm_tileMgr
 Pointer to TileDetDescrManager.
const MbtsDetDescrManagerm_mbtsMgr
 Pointer to MbtsDetDescrManager.
std::vector< CaloAffectedRegionInfom_affectedRegionInfo_global
std::vector< CaloAffectedRegionInfom_affectedRegionInfo_current_run
int m_towerE1 = E1_TOWER
bool m_notUpgradeCabling
bool m_run2
std::string m_infoName
const TileInfom_tileInfo
float m_ADCmaskValueMinusEps
float m_ADCmaskValuePlusEps
bool m_run2plus

Friends

class TileHid2RESrcID

Detailed Description

This class creates Cells from RawChannels and stores them in a container.

Definition at line 106 of file TileCellBuilder.h.

Member Typedef Documentation

◆ TileDrawerEvtStatusArray

typedef TileDrawerEvtStatus TileCellBuilder::TileDrawerEvtStatusArray[5][64]
private

status of every drawer

Definition at line 132 of file TileCellBuilder.h.

Member Enumeration Documentation

◆ CELL_CHANNEL

Enumerator
E1_CHANNEL 

Definition at line 386 of file TileCellBuilder.h.

◆ CELL_TOWER

Enumerator
E1_TOWER 
E1_TOWER_UPGRADE_ABC 

Definition at line 387 of file TileCellBuilder.h.

Constructor & Destructor Documentation

◆ TileCellBuilder()

TileCellBuilder::TileCellBuilder ( const std::string & type,
const std::string & name,
const IInterface * parent )

Contructor.

< normal channel energy threshold for masking

< gap channel energy threshold for masking

< MBTS channel energy threshold for masking (not used currently(

Definition at line 48 of file TileCellBuilder.cxx.

50 : base_class(type, name, parent)
51 , m_eneForTimeCut(35. * MeV) // keep time only for cells above 70 MeV (more than 35 MeV in at least one PMT to be precise)
52 , m_eneForTimeCutMBTS(0.03675) // the same cut for MBTS, but in pC, corresponds to 3 ADC counts or 35 MeV
53 , m_qualityCut(254) // cut on overflow in quality (if quality is 255 - assume that channel is bad)
54 , m_eThreshold(-100000.)
55 , m_maxTimeDiff(100000.)
56 , m_maxTime (100000.)
57 , m_minTime(-100000.)
58 , m_maxChi2(100000.)
59 , m_minChi2(-100000.)
60 , m_thresholdNotSet(true)
61 , m_fullSizeCont(true)
62 , m_maskBadChannels(true)
63 , m_fakeCrackCells(false)
64 , m_tileID(nullptr)
65 , m_tileTBID(nullptr)
66 , m_tileHWID(nullptr)
67 , m_cabling(nullptr)
68 , m_tileMgr(nullptr)
69 , m_mbtsMgr(nullptr)
71 , m_run2(false)
72 , m_tileInfo(0)
73 , m_run2plus(false)
74{
75 declareInterface<TileCellBuilder>( this );
76
77 //memset(m_drawerRunStatus, 0, sizeof(m_drawerRunStatus));
78 //memset(m_eventErrorCounter, 0, sizeof(m_eventErrorCounter));
79
80 // never set energy to zero, but set it to some small number
81 // this will help TopoCluster to assign proper weight to the cell if needed
82 m_zeroEnergy = 0.5 * MeV; // half a MeV in both PMTs i.e. one MeV in a cell
83
85 m_minEneChan[0] = -5000. * MeV;
87 m_minEneChan[1] = -10000. * MeV;
89 m_minEneChan[2] = -999999. * MeV;
90
91 declareProperty( "MinEnergyChan", m_minEneChan[0]);
92 declareProperty( "MinEnergyGap", m_minEneChan[1]);
93 declareProperty( "MinEnergyMBTS", m_minEneChan[2]);
94
95 // Energy threshold in MeV that the Cell must exceed to be considered:
96 declareProperty("EThreshold",m_eThreshold);
97
98 // Maximum difference between times of two PMTs in cell:
99 declareProperty("MaxTimeDiff", m_maxTimeDiff);
100
101 // Maximum and minimum time for a cell to be included:
102 declareProperty("MaxTime", m_maxTime);
103 declareProperty("MinTime", m_minTime);
104
105 // Maximum and Minimum fit quality for cell to be considered:
106 declareProperty("MaxChi2", m_maxChi2);
107 declareProperty("MinChi2", m_minChi2);
108
109 declareProperty("fullSizeCont", m_fullSizeCont);
110
111 // put zero energy in bad channels and recover from single-channel failure using second PMT is a cell
112 declareProperty("maskBadChannels", m_maskBadChannels);
113
114 // create fake E3/E4 crack scintillators with zero energy when they do not exist
115 declareProperty("fakeCrackCells", m_fakeCrackCells);
116
117 // PMT energy will be set to this value if channel is bad
118 declareProperty("BadChannelZeroEnergy", m_zeroEnergy);
119 // PMT with energy above cut will preserve time info in ESD
120 declareProperty("EneForTimeCut", m_eneForTimeCut);
121 declareProperty("EneForTimeCutMBTS", m_eneForTimeCutMBTS);
122 // PMT with quality greater than this cut will be masked
123 declareProperty("QualityCut", m_qualityCut);
124
125 // apply time correction taking numbers from CondDB (if not yet done in OF)
126 declareProperty("correctTime", m_correctTime = false);
127
128 // apply parabolic amplitude correction (if not yet done in OF without iterations)
129 declareProperty("correctAmplitude", m_correctAmplitude = false);
130
131 // use parabolic amplitude correction for OF2 or OF1 method
132 declareProperty("OF2", m_of2 = true);
133
134 // merge DSP results with offline reco results
135 declareProperty("mergeChannels", m_mergeChannels = true);
136
137 // thresholds for parabolic amplitude correction
138 declareProperty("AmpMinForAmpCorrection", m_ampMinThresh = 15.0);
139 declareProperty("TimeMinForAmpCorrection", m_timeMinThresh = -12.5);
140 declareProperty("TimeMaxForAmpCorrection", m_timeMaxThresh = 12.5);
141
142 declareProperty("SkipGain", m_skipGain = -1); // never skip any gain by default
143
144 declareProperty("UseDemoCabling", m_useDemoCabling = 0); // if set to 2015 - assume TB 2015 cabling
145
146 declareProperty("TileInfoName", m_infoName = "TileInfo");
147
148 declareProperty("CheckDCS", m_checkDCS = false);
149}
static const double MeV
const TileDetDescrManager * m_tileMgr
Pointer to TileDetDescrManager.
int m_qualityCut
cut on channel quality (set energy to m_zeroEnergy for them)
float m_timeMaxThresh
correct amplitude is time is below time max threshold
const TileTBID * m_tileTBID
Pointer to TileTBID.
float m_timeMinThresh
correct amplitude is time is above time min threshold
bool m_mergeChannels
If true, missing raw channels are taken from DSP container.
const MbtsDetDescrManager * m_mbtsMgr
Pointer to MbtsDetDescrManager.
const TileInfo * m_tileInfo
bool m_fakeCrackCells
if true=> fake E3/E4 cells added
bool m_thresholdNotSet
bool variable to check whether some threshold have been set
bool m_of2
If true, assume OF2 method for amplitude correction, otherwise - OF1.
const TileCablingService * m_cabling
TileCabling instance.
int m_skipGain
for two-gain calib runs skip one of two gains
float m_eneForTimeCut
keep time for channels with energy above cut
const TileHWID * m_tileHWID
Pointer to TileHWID.
float m_minEneChan[3]
channel energy thresholds for masking (normal,gap,mbts)
float m_zeroEnergy
energy to store in every PMT if both PMT are bad
float m_maxChi2
maximum chi2 for the PMTs in the cels
bool m_correctTime
should time be corrected (deltat added from CondDB)
float m_eneForTimeCutMBTS
similar cut for MBTS in pC
bool m_correctAmplitude
If true, amplitude is corrected by parabolic function (needed for OF without iterations)
float m_minTime
minimum time for the PMTs in the cels
float m_ampMinThresh
correct amplitude if it's above amplitude threshold (in ADC counts)
std::string m_infoName
bool m_maskBadChannels
if true=> bad channels are masked
float m_maxTimeDiff
maximum time difference between the PMTs in the cell
float m_maxTime
maximum time for the PMTs in the cels
const TileID * m_tileID
Pointer to TileID.
float m_minChi2
minimum chi2 for the PMTs in the cels
float m_eThreshold
cell energy threshold to consider the cell

◆ ~TileCellBuilder()

TileCellBuilder::~TileCellBuilder ( )
virtual

Destructor.

Definition at line 154 of file TileCellBuilder.cxx.

154 {
155}

Member Function Documentation

◆ build()

template<class ITERATOR, class COLLECTION>
void TileCellBuilder::build ( const EventContext & ctx,
TileDrawerEvtStatusArray & drawerEvtStatus,
VecParams & params,
const ITERATOR & begin,
const ITERATOR & end,
COLLECTION * coll,
TileCellContainer * MBTSCells,
TileCellContainer * E4prCells ) const
private

< method to process raw channels from a given vector and store them in collection

Definition at line 1038 of file TileCellBuilder.cxx.

1046{
1047 // Now retrieve the TileDQstatus
1048 const TileDQstatus* DQstatus = nullptr;
1050 DQstatus = SG::makeHandle (m_DQstatusKey, ctx).get();
1051 }
1052
1053 const TileDCSState* dcsState = m_checkDCS ? SG::ReadCondHandle(m_DCSStateKey, ctx).cptr() : nullptr;
1054 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey, ctx);
1055 SG::ReadCondHandle<TileBadChannels> badChannels(m_badChannelsKey, ctx);
1056
1057 /* zero all counters and sums */
1058 int nTwo = 0;
1059 int nCell = 0;
1060 int nFake = 0;
1061 int nMBTS = 0;
1062 int nE4pr = 0;
1063 int nChan = 0;
1064 float eCh = 0.0;
1065 float eCellTot = 0.0;
1066 float eMBTSTot = 0.0;
1067 float eE4prTot = 0.0;
1068 bool EBdrawerPresent[128];
1069 memset(EBdrawerPresent, 0, sizeof(EBdrawerPresent));
1070 DataPool<TileCell> tileCellsP(5217);
1071 //**
1072 //* Iterate over raw channels, creating new TileCells (or incrementing
1073 //* existing ones). Add each new TileCell to the output collection
1074 //**
1075
1076 std::vector<TileCell*> allCells (m_tileID->cell_hash_max(), nullptr);
1077
1078 for (ITERATOR rawItr = begin; rawItr != end; ++rawItr) {
1079
1080 const TileRawChannel* pChannel = (*rawItr);
1081 HWIdentifier adc_id = pChannel->adc_HWID();
1082 int ros = m_tileHWID->ros(adc_id);
1083 int drawer = m_tileHWID->drawer(adc_id);
1084 int channel = m_tileHWID->channel(adc_id);
1085 int gain = m_tileHWID->adc(adc_id);
1086 if (gain == m_skipGain) {
1087 ATH_MSG_VERBOSE (" skipping adc_id=" << m_tileHWID->to_string(adc_id));
1088 continue; // select only one of two gains in calib runs
1089 }
1090 int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
1091 if (channel == 0 && ros > 2) EBdrawerPresent[(ros - 3) * 64 + drawer] = true; // EB drawer appeared in the data
1092
1093 float time = pChannel->uncorrTime(); // take uncorrected time (if available)
1094 float amp = pChannel->amplitude();
1095
1096 TileRawChannelUnit::UNIT oldUnit = params.m_RChUnit;
1097 if (params.m_correctAmplitude && time > m_timeMinThresh && time < m_timeMaxThresh) { // parabolic correction
1098 if (params.m_RChUnit > TileRawChannelUnit::OnlineADCcounts) { // convert from online units to ADC counts
1100 amp = emScale->undoOnlineChannelCalibration(drawerIdx, channel, gain, amp, params.m_RChUnit);
1101
1102 if (amp > m_ampMinThresh) // amp cut in ADC counts
1103 amp *= TileRawChannelBuilder::correctAmp(time,params.m_of2);
1104 } else if (params.m_RChUnit == TileRawChannelUnit::ADCcounts
1106 if (amp > m_ampMinThresh)
1107 amp *= TileRawChannelBuilder::correctAmp(time,params.m_of2);
1108 } else {
1109 ATH_MSG_ERROR( "Units in raw channel container is " << params.m_RChUnit );
1110 ATH_MSG_ERROR( "But amplitude correction works only with ADC counts " );
1111 ATH_MSG_ERROR( "Please, disable CIS calibration in optimal filter " );
1112 }
1113 }
1114
1115 float qual = pChannel->quality();
1116
1117 // check that time was really reconstructed
1118 bool good_time = (fabs(time) < params.m_maxTimeCorr);
1119 bool non_zero_time = (params.m_RChType == TileFragHash::OptFilterDspCompressed)
1120 ? ((qual > 2.99 && qual < 4.01))
1121 : ((qual > 0.0 || params.m_RChType == TileFragHash::OptFilterDsp));
1122
1123 // new feature in rel 17.2.7 - pedestal keeps information about overflow and underflow
1124 // if there is an underflow, 10000 is added to pedestal value
1125 // if there is an overflow, 20000 is added to pedestal value
1126 // if there is an underflow in all samples, 80000 is added to pedestal value
1127 // if there is an overflow in all samples, 90000 is added to pedestal value
1128 // if there is bad pattern nunber N 100000+N*10000 is added to pedestal value
1129 bool overflow = false;
1130 bool underflow = false;
1131 bool overfit = false;
1132 float ped = pChannel->pedestal();
1133 if (ped > 59500.) { // one of bad patterns
1134 qual = 9999; // mask all bad patterns
1135 } else if (ped > 39500.) { // 40000 for constant value or 50000 for all zeros in disconnexted channel
1136 // nothing to do
1137 } else if (ped > m_ADCmaskValuePlusEps) { // 10000 for underflow or 20000 for overflow or 10000+20000
1138 // NOTE: opt filter can yield values between (-500, 4600) and overlay magic number is 4800 in case of 12-bit ADCs
1139 underflow = ((ped < 10000. + m_ADCmaskValuePlusEps) || (ped > 29500.));
1140 overflow = (ped > 10000. + m_ADCmaskValuePlusEps);
1141 // special flag indicating that fit method was applied for overflow channels
1142 overfit = ( (ped > 20000. + m_ADCmaskValueMinusEps && ped < 29500) || (ped > 30000. + m_ADCmaskValueMinusEps && ped < 39500) );
1143
1144 if (overflow
1145 && gain == TileID::LOWGAIN
1146 && amp > 0
1147 && time > m_timeMinThresh
1148 && time < m_timeMaxThresh) {
1149
1150 qual = fabs(qual);
1151 if (qual > m_qualityCut && qual < 9999.) {
1152 qual = m_qualityCut; // to avoid masking of overflow in low gain
1153 }
1154 }
1155 }
1156
1157 // apply time correction if needed
1158 if (params.m_correctTime && good_time && non_zero_time)
1159 time -= m_tileToolTiming->getSignalPhase(drawerIdx, channel, gain);
1160 else
1161 time = pChannel->time();
1162
1163 ++nChan;
1164 eCh += amp;
1165
1166 int index, pmt;
1167 int channel1 = channel;
1168
1169 if (m_useDemoCabling == 2015 && ros == 4 && drawer == 1) {
1170 int pmt2channel[48] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
1171 26,25,24,29,31,32,27,28,30,35,34,33,38,37,43,44,41,40,39,36,42,47,46,45};
1172 channel1 = pmt2channel[channel];
1173
1174 } else if ( (m_useDemoCabling >= 2016 && m_useDemoCabling <= 2019)
1175 && (ros == 2 && (drawer == 1 || drawer>2)) ) {
1176 int pmt2channel[48] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
1177 26,25,24,29,28,27,32,31,30,35,34,33,38,37,36,41,40,39,44,43,42,47,46,45};
1178 channel1 = pmt2channel[channel];
1179 } else if ( (m_useDemoCabling >= 2018)
1180 && (ros == 4 && drawer>=2) ) {
1181 int pmt2channelEB[48] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
1182 31,32,30,35, 33,34, 38,37,41,40,39,36, 26,25,24,29,28,27, 44,43,42,47,46,45};
1183 channel1 = pmt2channelEB[channel];
1184 }
1185
1186 Identifier cell_id = m_cabling->h2s_cell_id_index (ros, drawer, channel1, index, pmt);
1187
1188 if (index == -3) { // E4' cells
1189
1190 if (E4prCells) { // do something with them only if the container exists
1191 ++nE4pr;
1192
1193 // convert ADC counts to MeV. like for normal cells
1194 float ener = emScale->calibrateChannel(drawerIdx, channel, gain, amp, oldUnit
1196
1197 eE4prTot += ener;
1198 unsigned char iqual = iquality(qual);
1199 // for E4' cell qbit use only non_zero_time flag and check that energy is above standatd energy threshold in MeV
1200 unsigned char qbit = qbits(drawerEvtStatus, params.m_RChType,
1201 ros, drawer, true, non_zero_time, (fabs(ener) > m_eneForTimeCut)
1202 , overflow, underflow, overfit);
1206
1207 TileCell* pCell = tileCellsP.nextElementPtr();
1208 // no CaloDDE
1209 // Cell ID is set explicitly
1210 pCell->set(NULL, cell_id);
1211 pCell->setEnergy_nonvirt(ener, 0, cgain, 3);
1212 pCell->setTime_nonvirt(time);
1213 pCell->setQual1(iqual);
1214 pCell->setQual2(0);
1215 pCell->setQbit1(qbit);
1216 pCell->setQbit2(0);
1217
1218 if (msgLvl(MSG::VERBOSE)) {
1219 msg(MSG::VERBOSE) << " E4' cell_id=" << m_tileTBID->to_string(cell_id)
1220 << " adc_id=" << m_tileHWID->to_string(adc_id)
1221 << " ene= " << ener
1222 << " amp= " << amp
1223 << " time= " << time
1224 << " qual= " << pChannel->quality()
1225 << " iqual= " << (int) iqual
1226 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec;
1227
1228 if (ped > m_ADCmaskValuePlusEps)
1229 msg(MSG::VERBOSE) << " err = " << TileRawChannelBuilder::BadPatternName(ped) << endmsg;
1230 else
1231 msg(MSG::VERBOSE) << endmsg;
1232 }
1233
1234 if (m_maskBadChannels && maskBadChannel(drawerEvtStatus, DQstatus, dcsState,
1235 *badChannels, pCell, adc_id))
1236 ATH_MSG_VERBOSE ( "cell with id=" << m_tileTBID->to_string(cell_id)
1237 << " bad channel masked, new energy=" << pCell->energy() );
1238
1239 E4prCells->push_back(pCell); // store cell in container
1240
1241 }
1242
1243 } else if (index == -2) { // MBTS cells
1244
1245 if (MBTSCells) { // do something with them only if contaier existst
1246 ++nMBTS;
1247
1248 // convert ADC counts to pCb and not to MeV
1249 float ener = emScale->calibrateChannel(drawerIdx, channel, gain, amp , oldUnit
1251
1252 eMBTSTot += ener;
1253 unsigned char iqual = iquality(qual);
1254 // for MBTS qbit use AND of good_time and non_zero_time and check that energy is above MBTS energy threshold in pC
1255 unsigned char qbit = qbits(drawerEvtStatus, params.m_RChType,
1256 ros, drawer, false, (good_time && non_zero_time),
1257 (fabs(ener) > m_eneForTimeCutMBTS), overflow, underflow, overfit);
1258
1262
1263 TileCell* pCell = tileCellsP.nextElementPtr();
1264 // MBTS CaloDDE
1265 // Cell ID is set explicitly
1266 pCell->set((m_mbtsMgr) ? m_mbtsMgr->get_element(cell_id) : NULL, cell_id);
1267 pCell->setEnergy_nonvirt(ener, 0, cgain, 3);
1268 pCell->setTime_nonvirt(time);
1269 pCell->setQual1(iqual);
1270 pCell->setQual2(0);
1271 pCell->setQbit1(qbit);
1272 pCell->setQbit2(0);
1273
1274 if (msgLvl(MSG::VERBOSE)) {
1275 msg(MSG::VERBOSE) << " MBTS cell_id=" << m_tileTBID->to_string(cell_id)
1276 << " adc_id=" << m_tileHWID->to_string(adc_id)
1277 << " ene= " << ener
1278 << " amp= " << amp
1279 << " time= " << time
1280 << " qual= " << pChannel->quality()
1281 << " iqual= " << (int) iqual
1282 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec;
1283
1284 if (ped > m_ADCmaskValuePlusEps)
1285 msg(MSG::VERBOSE) << " err = " << TileRawChannelBuilder::BadPatternName(ped) << endmsg;
1286 else
1287 msg(MSG::VERBOSE) << endmsg;
1288 }
1289
1290 if (m_maskBadChannels && maskBadChannel(drawerEvtStatus, DQstatus, dcsState,
1291 *badChannels, pCell, adc_id))
1292 ATH_MSG_VERBOSE ( "cell with id=" << m_tileTBID->to_string(cell_id)
1293 << " bad channel masked, new energy=" << pCell->energy() );
1294
1295 MBTSCells->push_back(pCell); // store cell in container
1296
1297 }
1298 } else if (index != -1) { // connected channel
1299
1300 float ener = emScale->calibrateChannel(drawerIdx, channel, gain, amp
1302
1303 eCellTot += ener;
1304
1305 unsigned char iqual = iquality(qual);
1306 // for normal cell qbit use only non_zero_time flag and check that energy is above standatd energy threshold in MeV
1307 unsigned char qbit = qbits(drawerEvtStatus, params.m_RChType,
1308 ros, drawer, true, non_zero_time, (fabs(ener) > m_eneForTimeCut)
1309 , overflow, underflow, overfit);
1310
1311
1312 if (m_run2plus && channel == E1_CHANNEL && ros > 2) { // Raw channel -> E1 cell.
1313
1314 int drawer2 = m_cabling->E1_merged_with_run2plus(ros,drawer);
1315 if (drawer2 != 0) { // Raw channel splitted into two E1 cells for Run 2.
1316 int side = (ros == 3) ? 1 : -1;
1317 Identifier cell_id2 = m_tileID->cell_id(TileID::GAPDET, side, drawer2, m_towerE1, TileID::SAMP_E);
1318 int index2 = m_tileID->cell_hash(cell_id2);
1319 TileCell* pCell2 = tileCellsP.nextElementPtr();
1320 ++nCell;
1321 allCells[index2] = pCell2;
1322 const CaloDetDescrElement* dde2 = m_tileMgr->get_cell_element(index2);
1323 pCell2->set(dde2, cell_id2);
1325 int pmt2(0);
1326 ener /= 2.0F;
1327 correctCell(pCell2, 1, pmt2, gain, ener, time, iqual, qbit, 1);
1328
1329 ATH_MSG_DEBUG("E1 cell Id => " << m_tileID->to_string(cell_id)
1330 << " splitted into " << m_tileID->to_string(cell_id2));
1331
1332
1333 }
1334
1335 }
1336
1337 TileCell* pCell = allCells[index];
1338 if (pCell) {
1339 ++nTwo;
1340 correctCell(pCell, 2, pmt, gain, ener, time, iqual, qbit, 0); // correct & merge 2 PMTs in one cell
1341 } else {
1342 ++nCell;
1343 allCells[index] = pCell = tileCellsP.nextElementPtr();
1344 const CaloDetDescrElement* dde = m_tileMgr->get_cell_element(index);
1345 pCell->set(dde, cell_id);
1347 int ch_type = (dde->onl2() == TileHWID::NOT_VALID_HASH) ? 1 : 0;
1348 correctCell(pCell, 1, pmt, gain, ener, time, iqual, qbit, ch_type); // correct & save e,t,q in new cell
1349 }
1350
1351 if (msgLvl(MSG::VERBOSE)) {
1352 float calib1 = (amp != 0) ? ener / amp : 0.0;
1353 msg(MSG::VERBOSE) << " cell_id=" << m_tileID->to_string(cell_id, -2)
1354 << " adc_id=" << m_tileHWID->to_string(adc_id)
1355 << " calib=" << calib1
1356 << " nCell=" << nCell
1357 << " energy=" << ener << " (" << pCell->energy() << ", " << pCell->eneDiff() << ")" << endmsg;
1358
1359 msg(MSG::VERBOSE) << " amp= " << amp
1360 << " time= " << time
1361 << " qual= " << pChannel->quality()
1362 << " iqual= " << (int) iqual
1363 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec;
1364
1365 if (ped > m_ADCmaskValuePlusEps)
1366 msg(MSG::VERBOSE) << " err = " << TileRawChannelBuilder::BadPatternName(ped) << endmsg;
1367 else
1368 msg(MSG::VERBOSE) << endmsg;
1369 }
1370
1371 } else {
1372
1373 if (msgLvl(MSG::VERBOSE)) {
1374
1375 unsigned char iqual = iquality(qual);
1376 unsigned char qbit = qbits(drawerEvtStatus, params.m_RChType,
1377 0, drawer, false, non_zero_time, false, overflow, underflow, overfit); //fake ros number here
1378
1379 msg(MSG::VERBOSE) << " channel with adc_id=" << m_tileHWID->to_string(adc_id)
1380 << " is not connected" << endmsg;
1381
1382 msg(MSG::VERBOSE) << " amp= " << amp
1383 << " time= " << time
1384 << " qual= " << pChannel->quality()
1385 << " iqual= " << (int) iqual
1386 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec;
1387
1388 if (ped > m_ADCmaskValuePlusEps)
1389 msg(MSG::VERBOSE) << " err = " << TileRawChannelBuilder::BadPatternName(ped) << endmsg;
1390 else
1391 msg(MSG::VERBOSE) << endmsg;
1392 }
1393 }
1394 if (msgLvl(MSG::VERBOSE)) {
1395 if ((params.m_correctTime && good_time && non_zero_time) || pChannel->sizeTime() > 1) {
1396 msg(MSG::VERBOSE) << " OF_time = " << pChannel->uncorrTime()
1397 << " corr_time = " << time << endmsg;
1398 }
1399 }
1400 }
1401
1402 //**
1403 // Now store all TileCells
1404 //**
1405 for (unsigned int index = 0; index < allCells.size(); ++index) {
1406
1407 TileCell * pCell = allCells[index];
1408
1409 if (pCell) { // cell exists
1410
1412 if (maskBadChannels (drawerEvtStatus, DQstatus, dcsState, *badChannels, pCell))
1413 ATH_MSG_VERBOSE ( "cell with id=" << m_tileID->to_string(pCell->ID(), -2)
1414 << " bad channels masked, new energy=" << pCell->energy() );
1415
1417 || (pCell->energy() > m_eThreshold
1418 && fabs(pCell->timeDiff()) < m_maxTimeDiff
1419 && pCell->time1() < m_maxTime && pCell->time1() > m_minTime
1420 && pCell->time2() < m_maxTime && pCell->time2() > m_minTime
1421 && pCell->qual1() > m_minChi2 && pCell->qual1() < m_maxChi2
1422 && pCell->qual2() > m_minChi2 && pCell->qual2() < m_maxChi2)) {
1423
1424 coll->push_back(pCell); // store cell in container
1425
1426 } else {
1427
1428 //delete pCell; it's dangerous to delete cell, if it's in DataPool
1429
1430 }
1431
1432 allCells[index] = 0; // clear pointer for next event
1433 } else if (m_fakeCrackCells) { // can be true only for full-size container
1434
1435 pCell = tileCellsP.nextElementPtr();
1436 const CaloDetDescrElement* dde = m_tileMgr->get_cell_element(index);
1437 pCell->set(dde, dde->identify());
1438
1439 if (m_tileID->section(pCell->ID()) == TileID::GAPDET) { // missing D4/E3/E4 cell
1440
1441 int ind = m_tileID->module(pCell->ID()) + ((m_tileID->side(pCell->ID()) > 0) ? 0 : 64);
1442 if (EBdrawerPresent[ind]) {
1443 ++nFake;
1444 if (m_tileID->sample(pCell->ID()) == TileID::SAMP_E) {
1445 pCell->setEnergy(0.0, 0.0, TileID::LOWGAIN, CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
1446 pCell->setQuality(0, TileCell::MASK_BADCH, 0); // reset quality flag for first pmt
1447 pCell->setQuality(0, TileCell::MASK_BADCH, 1); // reset quality flag for second pmt
1448 } else {
1449 pCell->setEnergy(0.0, 0.0, TileID::LOWGAIN, TileID::LOWGAIN); // reset energy completely, indicate problem putting low gain
1450 pCell->setQuality(0, 0, 0); // reset quality flag for first pmt
1451 pCell->setQuality(0, 0, 1); // reset quality flag for second pmt
1452 }
1453 pCell->setTime(0.0); // reset time completely
1454
1455 ATH_MSG_VERBOSE ( "adding fake cell with id=" << m_tileID->to_string(pCell->ID(), -2)
1456 << " ene=" << pCell->energy()
1457 << " status=" << (pCell->badcell() ? "bad" : "good") );
1458
1459 coll->push_back(pCell); // store cell in container
1460 }
1461 }
1462 }
1463 }
1464
1465 if (msgLvl(MSG::DEBUG)) {
1466 msg(MSG::DEBUG) << " nChan=" << nChan
1467 << " RawChSum=" << eCh
1468 << " nCell=" << nCell
1469 << " n2=" << nTwo
1470 << " nFake=" << nFake
1471 << " eneTot=" << eCellTot;
1472
1473 if (MBTSCells)
1474 msg(MSG::DEBUG) << " nMBTS=" << nMBTS
1475 << " eMBTS=" << eMBTSTot;
1476 if (E4prCells)
1477 msg(MSG::DEBUG) << " nE4pr=" << nE4pr
1478 << " eE4pr=" << eE4prTot;
1479
1480 msg(MSG::DEBUG) << endmsg;
1481 }
1482}
#define endmsg
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
double energy() const
get energy (data member)
Definition CaloCell.h:327
void set(const CaloDetDescrElement *caloDDE, const Identifier &ID)
Fast method to change the identity of a cell.
Definition CaloCell.h:511
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition CaloCell.h:295
Identifier identify() const override final
cell identifier
IdentifierHash onl2() const
cell online identifier 2
value_type push_back(value_type pElem)
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
ToolHandle< TileCondToolTiming > m_tileToolTiming
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
bool maskBadChannel(TileDrawerEvtStatusArray &drawerEvtStatus, const TileDQstatus *DQstatus, const TileDCSState *dcsState, const TileBadChannels *badChannels, TileCell *pCell, HWIdentifier hwid) const
method to check if channels are good or bad.
bool maskBadChannels(TileDrawerEvtStatusArray &drawerEvtStatus, const TileDQstatus *DQstatus, const TileDCSState *dcsState, const TileBadChannels *badChannels, TileCell *pCell) const
unsigned char iquality(float qual) const
SG::ReadCondHandleKey< TileDCSState > m_DCSStateKey
Name of TileDCSState object in condition store.
unsigned char qbits(TileDrawerEvtStatusArray &drawerEvtStatus, TileFragHash::TYPE RChType, int ros, int drawer, bool count_over, bool good_time, bool good_ener, bool overflow, bool underflow, bool good_overflowfit) const
method to compute the cell quality bits
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
void correctCell(TileCell *pCell, int correction, int pmt, int gain, float ener, float time, unsigned char iqual, unsigned char qbit, int ch_type) const
Compute calibrated energy, time, etc.
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
uint8_t qual1(void) const
get quality of first PMT (data member)
Definition TileCell.h:197
float time1(void) const
get time of first PMT
Definition TileCell.h:192
void setEnergy_nonvirt(float e1, float e2, int gain1, int gain2)
Definition TileCell.h:257
void setQual2(unsigned char qual)
set quality of second PMT
Definition TileCell.h:165
virtual bool badcell(void) const override final
check if whole cell is bad (i.e.
Definition TileCell.h:214
void setTime_nonvirt(float t)
Definition TileCell.h:244
float eneDiff(void) const
all get methods
Definition TileCell.h:182
virtual void setEnergy(float ene) override final
set total energy, reset eneDiff to zero (final override of CaloCell method)
Definition TileCell.cxx:123
uint8_t qual2(void) const
get quality of second PMT (data member)
Definition TileCell.h:200
void setQbit1(unsigned char qbit)
set quality bits of first PMT
Definition TileCell.h:168
void setQbit2(unsigned char qbit)
set quality bits of second PMT
Definition TileCell.h:171
void setQuality(unsigned char qual, unsigned char qbit, int pmt)
set quality value and quality bits for one PMT (TileCell specific overloads)
Definition TileCell.h:280
void setQual1(unsigned char qual)
set quality of first PMT
Definition TileCell.h:162
virtual void setTime(float t) override final
set cell time, reset timeDiff
Definition TileCell.h:251
float timeDiff(void) const
get time diff for two PMTs (data member)
Definition TileCell.h:184
float time2(void) const
get time of second PMT
Definition TileCell.h:194
@ MASK_BADCH
Definition TileCell.h:63
@ NOT_VALID_HASH
Definition TileHWID.h:314
static const char * BadPatternName(float ped)
static double correctAmp(double phase, bool of2=true)
Amplitude correction factor according to the time when using weights for tau=0 without iterations.
float pedestal(void) const
float time(int ind=0) const
float quality(int ind=0) const
int sizeTime() const
float uncorrTime() const
float amplitude(int ind=0) const
HWIdentifier adc_HWID(void) const
Definition TileRawData.h:53
@ INVALIDGAIN
Definition CaloGain.h:18
@ TILEONEHIGH
Definition CaloGain.h:17
@ TILEONELOW
Definition CaloGain.h:16
time(flags, cells_name, *args, **kw)
str index
Definition DeMoScan.py:362
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
MsgStream & msg
Definition testRead.cxx:32

◆ correctCell()

void TileCellBuilder::correctCell ( TileCell * pCell,
int correction,
int pmt,
int gain,
float ener,
float time,
unsigned char iqual,
unsigned char qbit,
int ch_type ) const
private

Compute calibrated energy, time, etc.

for TileCell and adjust it.

Definition at line 676 of file TileCellBuilder.cxx.

677 {
678//************************************************************************
679
680// Merge two pmts in one cell if needed
681// and apply corrections
682
683 // do not trust to energies below certain threshold
684 if (ener < m_minEneChan[ch_type]) {
685#ifdef ALLOW_DEBUG_COUT
686 std::cout << "channel with negative energy " << ener << " => setting quality to 255" << std::endl;
687#endif
688 iqual = 255;
689 }
690
691 switch (correction) {
692 case 1: // first pmt for this cell
693 pCell->addEnergy(ener, pmt, gain);
694 pCell->setTime(time); // overwrite time completely
695 pCell->setQuality(iqual, qbit, pmt);
696 pCell->setQuality(0, 0, 1 - pmt);
697 break;
698 case 2: // second pmt for this cell
699 pCell->addEnergy(ener, pmt, gain);
700 pCell->setTime(time, pmt); // calculate average time and timeDiff
701 pCell->setQuality(iqual, qbit, pmt);
702 break;
703 }
704}
void addEnergy(float e, int pmt, int gain)
set energy and gain for one PMT
Definition TileCell.cxx:145

◆ finalize()

StatusCode TileCellBuilder::finalize ( )
overridevirtual

Definition at line 265 of file TileCellBuilder.cxx.

265 {
266
267 ATH_MSG_INFO( "Finalizing" );
268
269 return StatusCode::SUCCESS;
270}
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode TileCellBuilder::initialize ( )
overridevirtual

Initializer.

Definition at line 160 of file TileCellBuilder.cxx.

160 {
161
162 // retrieve MBTS and Tile detector manager, TileID helper and TileIfno from det store
163 if (m_MBTSContainerKey.key().empty()) {
164 m_mbtsMgr = nullptr;
165 } else {
166
167 ATH_CHECK( m_MBTSContainerKey.initialize() );
168 ATH_MSG_INFO( "Storing MBTS cells in " << m_MBTSContainerKey.key() );
169
170 if (detStore()->retrieve(m_mbtsMgr).isFailure()) {
171 ATH_MSG_WARNING( "Unable to retrieve MbtsDetDescrManager from DetectorStore" );
172 m_mbtsMgr = nullptr;
173 }
174 }
175
176 ATH_CHECK( m_eventInfoKey.initialize() );
177 ATH_CHECK( m_DQstatusKey.initialize() );
178 ATH_CHECK( m_EventInfoTileStatusKey.initialize() );
179 ATH_CHECK( m_emScaleKey.initialize() );
180
181 ATH_CHECK( detStore()->retrieve(m_tileMgr) );
182 ATH_CHECK( detStore()->retrieve(m_tileID) );
183 ATH_CHECK( detStore()->retrieve(m_tileTBID) );
184 ATH_CHECK( detStore()->retrieve(m_tileHWID) );
185
186 ATH_CHECK( m_badChannelsKey.initialize() );
187
188 // access tools and store them
189 ATH_CHECK( m_noiseFilterTools.retrieve() );
190
191 //=== get TileCondToolTiming
192 ATH_CHECK( m_tileToolTiming.retrieve() );
193
194 ATH_CHECK( m_DCSStateKey.initialize(m_checkDCS) );
195
196 ATH_CHECK( m_cablingSvc.retrieve() );
197 m_cabling = m_cablingSvc->cablingService();
198
199 reset(true, false);
200
201 m_run2 = m_cabling->isRun2Cabling();
202 m_run2plus = m_cabling->isRun2PlusCabling();
203
204 if (m_run2 && !m_E4prContainerKey.key().empty()) {
205 ATH_CHECK( m_E4prContainerKey.initialize() );
206 ATH_MSG_INFO( "Storing E4' cells in " << m_E4prContainerKey.key() );
207 } else {
208 m_E4prContainerKey = ""; // no E4' container for RUN1
209 }
210
211 if (m_cabling->getCablingType() == TileCablingService::UpgradeABC) {
213 m_notUpgradeCabling = false;
214 }
215
216 ATH_CHECK( m_rawChannelContainerKey.initialize() );
217
219 || m_dspRawChannelContainerKey.key().empty())) {
220 m_mergeChannels = false;
221 }
222
224 ATH_CHECK( m_eventInfoKey.initialize() );
225
226 ATH_MSG_INFO( "TileCellBuilder initialization completed" );
227
228 //=== get TileInfo
229 ATH_CHECK( detStore()->retrieve(m_tileInfo, m_infoName) );
230 m_ADCmaskValueMinusEps = m_tileInfo->ADCmaskValue() - 0.01; // indicates channels which were masked in background dataset
231 m_ADCmaskValuePlusEps = m_tileInfo->ADCmaskValue() + 0.01; // indicates channels which were masked in background dataset
232
233 return StatusCode::SUCCESS;
234}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< TileRawChannelContainer > m_dspRawChannelContainerKey
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
void reset(bool fullSizeCont, bool printReset=true)
Method to reset the options of the TileCellContainer.
SG::WriteDecorHandleKey< xAOD::EventInfo > m_EventInfoTileStatusKey
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
SG::WriteHandleKey< TileCellContainer > m_E4prContainerKey
SG::WriteHandleKey< TileCellContainer > m_MBTSContainerKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
ToolHandleArray< ITileRawChannelTool > m_noiseFilterTools

◆ interfaceID()

const InterfaceID & TileCellBuilder::interfaceID ( )
static

Definition at line 43 of file TileCellBuilder.cxx.

43 {
45}
static const InterfaceID IID_ITileCellBuilder("TileCellBuilder", 1, 0)

◆ iquality()

unsigned char TileCellBuilder::iquality ( float qual) const
inlineprivate

< method to compute the cell quality

Definition at line 293 of file TileCellBuilder.h.

293 {
294 return std::min(255, abs((int) qual));
295 } // keep quality within 8 bits make it "unsigned char"

◆ maskBadChannel()

bool TileCellBuilder::maskBadChannel ( TileDrawerEvtStatusArray & drawerEvtStatus,
const TileDQstatus * DQstatus,
const TileDCSState * dcsState,
const TileBadChannels * badChannels,
TileCell * pCell,
HWIdentifier hwid ) const
private

method to check if channels are good or bad.

Puts zero if both channels are bad or recovers from single-channel failure. It returns true if cell was changed, false otherwise

Definition at line 746 of file TileCellBuilder.cxx.

749{
750 int ros = m_tileHWID->ros(hwid);
751 int drawer = m_tileHWID->drawer(hwid);
752 int chan = m_tileHWID->channel(hwid);
753 int gain = m_tileHWID->adc(hwid);
754 TileBchStatus chStatus = badChannels->getAdcStatus(hwid);
755
756 // check quality first
757 bool bad = ((int) pCell->qual1() > m_qualityCut);
758 if (bad) {
759 ++drawerEvtStatus[ros][drawer].nBadQuality;
760
761 } else {
762 // check bad status in DB
763 bad = chStatus.isBad();
764
765 // Now checking the DQ status
766 if (!bad && m_notUpgradeCabling && DQstatus) {
767 bad = !(DQstatus->isAdcDQgood(ros, drawer, chan, gain))
768 || (dcsState ? dcsState->isStatusBad(ros, drawer, chan) : false);
769 }
770 }
771
772 if (bad) {
773 // only one channel in this cell and it is bad
774 ++drawerEvtStatus[ros][drawer].nMaskedChannels;
775
776 //pCell->setEnergy(m_zeroEnergy,0.0,TileID::LOWGAIN,CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
777 //pCell->setTime(0.0); // reset time completely
778 //pCell->setQuality(255,TileCell::MASK_BADCH,0); // reset quality flag for first pmt
779
780 if (gain == CaloGain::INVALIDGAIN) {
781 pCell->setEnergy(0.0, 0.0, TileID::LOWGAIN, CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
782 } else {
783 pCell->setEnergy(0.0, 0.0); // reset energy completely without changing the gain
784 }
785 pCell->setTime(-100.0); // reset time to big negative number to distinguish this bad cell from good cells
786 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit1() & TileCell::MASK_ALGO)), 0); // reset quality flag for first pmt
787 pCell->setQuality(0, TileCell::MASK_BADCH, 1); // reset quality flag for second pmt
788
789 return true;
790
791 } else if (chStatus.isBadTiming()) {
792 pCell->setTime(0.0); // channel with bad timing - no cell time
793 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
794 pCell->setQuality(pCell->qual1(), qbit1, 0); // update qbits for first pmt
795 }
796
797 return false;
798}
const TileBchStatus & getAdcStatus(const HWIdentifier adc_id) const
Return Tile ADC status.
bool isBadTiming() const
bool isBad() const
@ MASK_TIME
Definition TileCell.h:67
@ MASK_ALGO
Definition TileCell.h:62
uint8_t qbit1(void) const
get quality bits of first PMT (data member)
Definition TileCell.h:203
bool isStatusBad(unsigned int ros, unsigned int drawer) const
Return true if given Tile drawer considered as bad by summary drawer states per LVPS otherwise return...
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors

◆ maskBadChannels()

bool TileCellBuilder::maskBadChannels ( TileDrawerEvtStatusArray & drawerEvtStatus,
const TileDQstatus * DQstatus,
const TileDCSState * dcsState,
const TileBadChannels * badChannels,
TileCell * pCell ) const
private

Definition at line 802 of file TileCellBuilder.cxx.

805{
806 bool single_PMT_C10 = false;
807
808 const CaloDetDescrElement* caloDDE = pCell->caloDDE();
809
810 IdentifierHash hash1 = caloDDE->onl1();
811 IdentifierHash hash2 = caloDDE->onl2();
812
813 int gain1 = pCell->gain1();
814
815 HWIdentifier ch_id1 = m_tileHWID->channel_id(hash1);
816
817 int ros1 = m_tileHWID->ros(ch_id1);
818 int drawer1 = m_tileHWID->drawer(ch_id1);
819 int chan1 = m_tileHWID->channel(ch_id1);
820
821 HWIdentifier adc_id1 = m_tileHWID->adc_id(ros1, drawer1, chan1, ((gain1 < 0) ? 1 : gain1));
822 const TileBchStatus& chStatus1 = badChannels->getAdcStatus(adc_id1);
823
824 // check quality first
825 bool bad1 = ((int) pCell->qual1() > m_qualityCut);
826 if (bad1) {
827 ++drawerEvtStatus[ros1][drawer1].nBadQuality;
828
829 } else {
830 // check bad status in DB
831 bad1 = (gain1 < 0) || chStatus1.isBad();
832
833 // Now checking the DQ status
834 if (!bad1 && m_notUpgradeCabling && DQstatus) {
835 bad1 = !(DQstatus->isAdcDQgood(ros1, drawer1, chan1, gain1))
836 || (dcsState ? dcsState->isStatusBad(ros1, drawer1, chan1) : false);
837 }
838 }
839
840 if (hash2 == TileHWID::NOT_VALID_HASH) {
841 // gap/crack scintillators with one PMT per cell
842
843 if (bad1) {
844 // only one channel in this cell and it is bad
845 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
846
847 if (gain1 == CaloGain::INVALIDGAIN) {
848 pCell->setEnergy(m_zeroEnergy, 0.0, TileID::LOWGAIN, CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
849 } else {
850 pCell->setEnergy(m_zeroEnergy, 0.0); // reset energy completely without changing gain
851 }
852 pCell->setTime(0.0); // reset time completely
853 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit1() & TileCell::MASK_ALGO)), 0); // reset quality flag for first pmt
854 pCell->setQuality(0, TileCell::MASK_BADCH, 1); // reset quality flag for second pmt
855
856 return true;
857
858 } else if (chStatus1.isBadTiming()) {
859 pCell->setTime(0.0); // channel with bad timing - no cell time
860 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
861 pCell->setQuality(pCell->qual1(), qbit1, 0); // update qbits for first pmt
862 }
863
864 } else { //cell has both PMTs
865
866 int gain2 = pCell->gain2();
867
868 HWIdentifier ch_id2 = m_tileHWID->channel_id(hash2);
869
870 int ros2 = m_tileHWID->ros(ch_id2);
871 int drawer2 = m_tileHWID->drawer(ch_id2);
872 int chan2 = m_tileHWID->channel(ch_id2);
873
874 HWIdentifier adc_id2 = m_tileHWID->adc_id(ros2, drawer2, chan2, ((gain2 < 0) ? 1 : gain2));
875 const TileBchStatus& chStatus2 = badChannels->getAdcStatus(adc_id2);
876
877 // check quality first
878 bool bad2 = ((int) pCell->qual2() > m_qualityCut);
879 if (bad2) {
880 ++drawerEvtStatus[ros2][drawer2].nBadQuality;
881
882 } else {
883 // check bad status in DB
884 bad2 = (gain2 < 0) || chStatus2.isBad();
885
886 // Now checking the DQ status
887 if (!bad2 && m_notUpgradeCabling && DQstatus) {
888 bad2 = !(DQstatus->isAdcDQgood(ros2, drawer2, chan2, gain2))
889 || (dcsState ? dcsState->isStatusBad(ros2, drawer2, chan2) : false);
890 }
891 }
892
893 single_PMT_C10 = (((ros2 == TileHWID::EXTBAR_POS && chan1 == 4)
894 || (ros2 == TileHWID::EXTBAR_NEG && chan2 == 4))
895 && !m_cabling->C10_connected(drawer2));
896 if (single_PMT_C10) {
897 // for special C10 disconnected channel might be masked in DB
898 // and energy of good channel is taken twice with correct weight
899 // but if this channel is not masked in DB - set its bad status
900 // equal to bad status of real channel, so that cell is masked correctly
901 // if real channel connected to a cell is bad
902#ifdef ALLOW_DEBUG_COUT
903 static int cnt=0;
904 if (++cnt < 17) {
905 std::cout << "special C10 in " << ((ros2==TileHWID::EXTBAR_POS) ? "EBA" : "EBC")
906 << drawer2+1 << " status " << chan1 << "/" << chan2 << " "
907 << (chStatus1.isBad()?"bad":"good") << "/"
908 << (chStatus2.isBad()?"bad":"good") << "/"
909 << ((m_run2plus)?" RUN2+ cabling": "RUN1 cabling")
910 << std::endl;
911 }
912#endif
913 if (chan1 == 4) {
914 if (m_run2plus || !chStatus1.isBad()) {
915#ifdef ALLOW_DEBUG_COUT
916 if (cnt < 17) {
917 std::cout << "Ene of chan1 was " << pCell->ene1() << " changing to half of " << pCell->ene2()
918 << " and setting bad1=true" << std::endl;
919 }
920#endif
921 pCell->setEnergy(pCell->ene2()/2., pCell->ene2()/2., gain2, gain2);
922 //bad1 = bad2;
923 bad1 = true;
924 --drawerEvtStatus[ros1][drawer1].nMaskedChannels; // since it's fake masking, decrease counter by 1 in advance
925 }
926 } else {
927 if (m_run2plus || !chStatus2.isBad()) {
928#ifdef ALLOW_DEBUG_COUT
929 if (cnt < 17) {
930 std::cout << "Ene of chan2 was " << pCell->ene2() << " changing to half of " << pCell->ene1()
931 << " and setting bad2=true" << std::endl;
932 }
933#endif
934 pCell->setEnergy(pCell->ene1()/2., pCell->ene1()/2., gain1, gain1);
935 //bad2 = bad1;
936 bad2 = true;
937 --drawerEvtStatus[ros2][drawer2].nMaskedChannels; // since it's fake masking, decrease counter by 1 in advance
938 }
939 }
940 }
941 if (bad1 && bad2) {
942 // both channels are bad
943 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
944 ++drawerEvtStatus[ros2][drawer2].nMaskedChannels;
945
946 if (gain1 == CaloGain::INVALIDGAIN || gain2 == CaloGain::INVALIDGAIN) {
947 if (gain1 == CaloGain::INVALIDGAIN) gain1 = 0; // this is TileID::LOWGAIN; - commented out to make Coverity happy
948 if (gain2 == CaloGain::INVALIDGAIN) gain2 = 0; // this is TileID::LOWGAIN; - commented out to make Coverity happy
949 pCell->setEnergy(m_zeroEnergy, m_zeroEnergy, gain1, gain2); // reset energy completely, indicate problem putting low gain
950 } else {
951 pCell->setEnergy(m_zeroEnergy, m_zeroEnergy); // reset energy completely without changing gain
952 }
953 pCell->setTime(0.0); // reset time completely
954 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit1() & TileCell::MASK_ALGO)), 0); // reset quality flag for first pmt
955 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit2() & TileCell::MASK_ALGO)), 1); // reset quality flag for second pmt
956
957 return true;
958
959 } else if (bad1 && !bad2) {
960 // first channel is bad
961 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
962
963 float ene2 = pCell->ene2();
964 pCell->setEnergy(ene2, ene2, gain2, gain2); // use energy/gain from second pmt for both pmts
965
966 uint8_t qualCorrection = (gain1 != CaloGain::INVALIDGAIN) ? (gain1 - gain2) : 0;
967 uint8_t qual2 = pCell->qual2();
968 uint8_t qual1 = qual2 + qualCorrection; // if gains are different, qua11 and qual2 will be different
969 if (qual1 > m_qualityCut && gain1 > gain2) qual1 = qual2 - qualCorrection; // new feature in release 17.2
970
971 if (chStatus2.isBadTiming()) {
972 pCell->setTime(0.0); // time in second pmt is bad - no cell time
973 uint8_t qbit2 = pCell->qbit2() & (~(TileCell::MASK_TIME)); // clear time bit for second pmt
974 uint8_t qbit1 = qbit2 | TileCell::MASK_BADCH; // set bad channel bit for first pmt
975 pCell->setQuality(qual1, qbit1, 0); // change quality and qbits for first pmt
976 pCell->setQuality(qual2, qbit2, 1); // update qbits for second pmt
977 } else {
978 pCell->setTime(pCell->time2()); // use time from second pmt as cell time
979 pCell->setQuality(qual1, (pCell->qbit2() | TileCell::MASK_BADCH), 0); // change quality flag for first pmt
980 }
981
982 return true;
983
984 } else if (!bad1 && bad2) {
985 // second channel is bad
986 ++drawerEvtStatus[ros2][drawer2].nMaskedChannels;
987
988 float ene1 = pCell->ene1();
989 pCell->setEnergy(ene1, ene1, gain1, gain1); // use energy/gain from first pmt for both pmts
990
991 uint8_t qualCorrection = (gain2 != CaloGain::INVALIDGAIN) ? (gain2 - gain1) : 0;
992 uint8_t qual1 = pCell->qual1();
993 uint8_t qual2 = qual1 + qualCorrection; // if gains are different, qua11 and qual2 will be different
994 if (qual2 > m_qualityCut && gain2 > gain1) qual2 = qual1 - qualCorrection; // new feature in release 17.2
995
996 if (chStatus1.isBadTiming()) {
997 pCell->setTime(0.0); // time in first pmt is bad - no cell time
998 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
999 uint8_t qbit2 = qbit1 | TileCell::MASK_BADCH; // set bad channel bit for second pmt
1000 pCell->setQuality(qual1, qbit1, 0); // update qbits for first pmt
1001 pCell->setQuality(qual2, qbit2, 1); // change quality and qbits for second pmt
1002 } else {
1003 pCell->setTime(pCell->time1()); // use time from first pmt as cell time
1004 pCell->setQuality(qual2, (pCell->qbit1() | TileCell::MASK_BADCH), 1); // change quality flag for second pmt
1005 }
1006
1007 return true;
1008
1009 } else {
1010
1011 if (chStatus1.isBadTiming()) {
1012
1013 if (chStatus2.isBadTiming()) {
1014 pCell->setTime(0.0); // time in both pmts is bad - no cell time
1015 uint8_t qbit2 = pCell->qbit2() & (~(TileCell::MASK_TIME)); // clear time bit for second pmt
1016 pCell->setQuality(pCell->qual2(), qbit2, 1); // update qbits for second pmt
1017 } else {
1018 pCell->setTime(pCell->time2()); // use time from second pmt as cell time
1019 }
1020 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
1021 pCell->setQuality(pCell->qual1(), qbit1, 0); // update qbits for first pmt
1022
1023 } else if (chStatus2.isBadTiming()) {
1024
1025 pCell->setTime(pCell->time1()); // use time from first pmt as cell time
1026 uint8_t qbit2 = pCell->qbit2() & (~(TileCell::MASK_TIME)); // clear time bit for second pmt
1027 pCell->setQuality(pCell->qual2(), qbit2, 1); // update qbits for second pmt
1028 }
1029 }
1030
1031 }
1032
1033 return single_PMT_C10;
1034}
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
IdentifierHash onl1() const
cell online identifier 1
int gain2(void) const
get gain of second PMT
Definition TileCell.cxx:175
uint8_t qbit2(void) const
get quality bits of second PMT (data member)
Definition TileCell.h:206
int gain1(void) const
get gain of first PMT
Definition TileCell.cxx:168
float ene1(void) const
get energy of first PMT
Definition TileCell.h:187
float ene2(void) const
get energy of second PMT
Definition TileCell.h:189
@ EXTBAR_NEG
Definition TileHWID.h:71
@ EXTBAR_POS
Definition TileHWID.h:70

◆ process()

StatusCode TileCellBuilder::process ( CaloCellContainer * theCellContainer,
const EventContext & ctx ) const
overridevirtual

method to process all raw channels and store them in container

Definition at line 272 of file TileCellBuilder.cxx.

274{
275 //**
276 //* Get TileRawChannels
277 //**
278
279 TileDrawerEvtStatusArray drawerEvtStatus;
280
281 SG::ReadHandle<TileRawChannelContainer> rawChannelContainer(m_rawChannelContainerKey, ctx);
282
283 if (!rawChannelContainer.isValid()) {
284 ATH_MSG_WARNING( " Could not find container " << m_rawChannelContainerKey.key() );
285 ATH_MSG_WARNING( " do not fill CaloCellContainer " );
286
287 } else {
288
289 ATH_MSG_DEBUG( "Container " << m_rawChannelContainerKey.key() << " with TileRawChannels found ");
290
291 // We use a data pool, so the container must be VIEW_ELEMENTS.
292 if (theCellContainer->ownPolicy() != SG::VIEW_ELEMENTS) {
293 if (!theCellContainer->empty()) {
294 ATH_MSG_ERROR("Non-empty owning cell container.");
295 return StatusCode::FAILURE;
296 }
297 theCellContainer->clear (SG::VIEW_ELEMENTS);
298 }
299
300
302 params.m_RChType = rawChannelContainer->get_type();
303 params.m_RChUnit = rawChannelContainer->get_unit();
304 params.m_correctAmplitude = m_correctAmplitude;
305 params.m_correctTime = m_correctTime;
306 params.m_of2 = m_of2;
307 unsigned int bsflags = rawChannelContainer->get_bsflags();
308 if (params.m_correctAmplitude || params.m_correctTime) {
309 int DataType = (bsflags & 0x30000000) >> 28;
310 if (DataType < 3) { // real data
311 bool of2 = ((bsflags & 0x4000000) != 0);
312 if (of2 != params.m_of2) {
313 params.m_of2 = of2;
314 ATH_MSG_WARNING( "OF2 flag in data is " << ((params.m_of2)?"True":"False"));
315 }
316 params.m_maxTimeCorr = 63.9375; // 64-1/16 ns is hard limit in DSP
317 if (params.m_correctAmplitude && ((bsflags & 0x3000000) != 0)) {
318 ATH_MSG_WARNING( "Using results of Opt filter with interations from DSP, disabling amplitude correction" );
319 params.m_correctAmplitude = false;
320 }
321 if (params.m_correctTime && ((bsflags & 0x3000000) == 0)) {
322 ATH_MSG_WARNING( "Using results of Opt filter without interations from DSP, disabling time correction" );
323 params.m_correctTime = false;
324 }
325 } else {
326 params.m_maxTimeCorr = ((bsflags >> 27) & 1) ? 100.0 : 75.0; // 100 or 75 ns is the limit for 9 or 7 samples
327 if (params.m_correctAmplitude && ((bsflags & 0x6000) != 0)) {
328 ATH_MSG_WARNING( "Amplitude correction was done already in optimal filter, disabling it here" );
329 params.m_correctAmplitude = false;
330 }
331 if (params.m_correctTime && ((bsflags & 0x9000) != 0)) {
332 ATH_MSG_WARNING( "Time correction was done already in optimal filter or best phase is used, disabling it here" );
333 params.m_correctTime = false;
334 }
335 }
336 }
337
338 std::unique_ptr<TileCellContainer> MBTSCells;
339 if (!m_MBTSContainerKey.key().empty()) {
340 MBTSCells = std::make_unique<TileCellContainer>(SG::VIEW_ELEMENTS);
341 }
342
343 std::unique_ptr<TileCellContainer> E4prCells;
344 if (!m_E4prContainerKey.key().empty()) {
345 E4prCells = std::make_unique<TileCellContainer>(SG::VIEW_ELEMENTS);
346 }
347
349 SelectAllObject<TileRawChannelContainer>::const_iterator begin = selAll.begin();
350 SelectAllObject<TileRawChannelContainer>::const_iterator end = selAll.end();
351
354 && !m_dspRawChannelContainerKey.key().empty()) {
355
356 ATH_MSG_DEBUG( "Merging " << m_rawChannelContainerKey.key()
357 << " and " << m_dspRawChannelContainerKey.key() );
358
359 SG::ReadHandle<TileRawChannelContainer> dspRawChannelContainer(m_dspRawChannelContainerKey, ctx);
360
361 if (!dspRawChannelContainer.isValid()) {
362 // no DSP channels, build cells from primary container
363 ATH_MSG_DEBUG( " No " << m_dspRawChannelContainerKey.key() << " found, nothing to merge " );
364
365 } else {
366
367 const TileRawChannelContainer* dspContainer = dspRawChannelContainer.cptr();
368 std::unique_ptr<TileMutableRawChannelContainer> copiedDspContainer;
369
370 if (m_noiseFilterTools.size() > 0) {
371 ATH_MSG_DEBUG( " Running noise filter on " << m_dspRawChannelContainerKey.key()
372 << " (i.e. on second container only) " );
373
374 // apply noise filter on dsp container before merging it with offline container
375 copiedDspContainer = std::make_unique<TileMutableRawChannelContainer> (*dspContainer);
376 ATH_CHECK( copiedDspContainer->status() );
377 dspContainer = copiedDspContainer.get();
378
379 for (const ToolHandle<ITileRawChannelTool>& noiseFilterTool : m_noiseFilterTools) {
380 ATH_CHECK( noiseFilterTool->process(*copiedDspContainer, ctx) );
381 }
382 }
383
384 TileFragHash::TYPE dspType = dspContainer->get_type();
385 TileRawChannelUnit::UNIT dspUnit = dspContainer->get_unit();
386 unsigned int dspFlags = dspContainer->get_bsflags();
387 int DataType = (dspFlags & 0x30000000) >> 28;
388 float dspTimeCut = params.m_maxTimeCorr;
389 bool dspCorrectAmplitude = false, dspCorrectTime = false, dspOf2 = true;
390 if (DataType < 3) { // real data
391 dspOf2 = ((dspFlags & 0x4000000) != 0);
392 if (dspOf2 != params.m_of2) ATH_MSG_DEBUG( "OF2 flag in DSPcontainer is " << ((dspOf2)?"True":"False"));
393 dspTimeCut = 63.9375; // 64-1/16 ns is hard limit in DSP
394 dspCorrectAmplitude = ((dspFlags & 0x3000000) == 0);
395 dspCorrectTime = ((dspFlags & 0x3000000) != 0);
396 } else { // dsp container contains results of offline reco
397 dspTimeCut = ((dspFlags >> 27) & 1) ? 100.0 : 75.0; // 100 or 75 ns is the limit for 9 or 7 samples
398 }
399
400 SelectAllObject<TileRawChannelContainer> selAllDsp(dspContainer);
401 SelectAllObject<TileRawChannelContainer>::const_iterator beginDsp = selAllDsp.begin();
402 SelectAllObject<TileRawChannelContainer>::const_iterator endDsp = selAllDsp.end();
403
404 std::vector<const TileRawChannel *> oflVec;
405 std::vector<const TileRawChannel *> dspVec;
406
407 SelectAllObject<TileRawChannelContainer>::const_iterator oflItr = begin;
408 SelectAllObject<TileRawChannelContainer>::const_iterator dspItr = beginDsp;
409
410 if (oflItr != end) {
411 const TileRawChannel *p1 = (*oflItr);
412 HWIdentifier id1 = p1->adc_HWID();
413
414 for (; dspItr != endDsp; ++dspItr) {
415
416 const TileRawChannel *p2 = (*dspItr);
417 HWIdentifier id2 = p2->adc_HWID();
418
419 if (id2 < id1) {
420 dspVec.push_back(p2);
421 } else if (id2 == id1) {
422 oflVec.push_back(p1);
423 ++oflItr;
424 if (oflItr != end) {
425 p1 = (*oflItr);
426 id1 = p1->adc_HWID();
427 } else {
428 ++dspItr;
429 break;
430 }
431 } else {
432 while (id2 >= id1) {
433 oflVec.push_back(p1);
434 ++oflItr;
435 if (oflItr != end) {
436 p1 = (*oflItr);
437 bool id2gtid1 = (id2 > id1);
438 id1 = p1->adc_HWID();
439 if (id2gtid1 && (id2 < id1)) {
440 dspVec.push_back(p2); // id2 is in the gap between old and new id1 - keep it
441 }
442 } else {
443 if (id2 == id1) ++dspItr;
444 break;
445 }
446 }
447 if (id2 >= id1) break;
448 }
449 }
450 // copy all remaining channels
451 for (; oflItr != end; ++oflItr) {
452 oflVec.push_back(*oflItr);
453 }
454 }
455 for (; dspItr != endDsp; ++dspItr) {
456 dspVec.push_back(*dspItr);
457 }
458
459 VecParams params1 = params;
460 VecParams params2;
461 params2.m_RChType = dspType;
462 params2.m_RChUnit = dspUnit;
463 params2.m_maxTimeCorr = dspTimeCut;
464 params2.m_correctAmplitude = dspCorrectAmplitude;
465 params2.m_correctTime = dspCorrectTime;
466 params2.m_of2 = dspOf2;
467
468 // build here with special iterator over 2 vectors
469 DoubleVectorIterator<std::vector<const TileRawChannel *>, const TileRawChannel *> vecBeg(
470 params,
471 &oflVec, params1,
472 &dspVec, params2, 0);
473 DoubleVectorIterator<std::vector<const TileRawChannel *>, const TileRawChannel *> vecEnd(
474 params,
475 &oflVec, params1,
476 &dspVec, params2, 2);
477
478 ATH_MSG_DEBUG("Build raw channels from two vectors:"
479 << " offline vector size = " << oflVec.size()
480 << ", dsp vector size = " << dspVec.size() );
481
482 build (ctx, drawerEvtStatus, params, vecBeg, vecEnd, theCellContainer,
483 MBTSCells.get(), E4prCells.get());
484 begin = end;
485 }
486
487 }
488
489 if (begin != end) { // no merging applied, use original raw channel container
490
491 std::unique_ptr<TileMutableRawChannelContainer> copiedContainer;
492 std::unique_ptr<SelectAllObject<TileRawChannelContainer> > selCopied;
493
494 if (m_noiseFilterTools.size() > 0) {
495 ATH_MSG_DEBUG( " Running noise filter on " << m_rawChannelContainerKey.key() );
496 // apply noise filter on input container before sending it to the build() method
497 copiedContainer = std::make_unique<TileMutableRawChannelContainer> (*rawChannelContainer);
498 ATH_CHECK( copiedContainer->status() );
499
500 for (const ToolHandle<ITileRawChannelTool>& noiseFilterTool : m_noiseFilterTools)
501 {
502 ATH_CHECK( noiseFilterTool->process(*copiedContainer, ctx) );
503 }
504
505 selCopied = std::make_unique<SelectAllObject<TileRawChannelContainer> > (copiedContainer.get());
506 begin = selCopied->begin();
507 end = selCopied->end();
508 }
509
510 ATH_MSG_DEBUG( " Calling build() method for rawChannels from " << m_rawChannelContainerKey.key() );
511 build (ctx, drawerEvtStatus, params, begin, end, theCellContainer,
512 MBTSCells.get(), E4prCells.get());
513 }
514
515 if (!m_MBTSContainerKey.key().empty()) {
516 SG::WriteHandle<TileCellContainer> MBTSContainer(m_MBTSContainerKey, ctx);
517 ATH_CHECK( MBTSContainer.record(std::move(MBTSCells)) );
518 }
519
520 if (!m_E4prContainerKey.key().empty()) {
521 SG::WriteHandle<TileCellContainer> E4prContainer(m_E4prContainerKey, ctx);
522 ATH_CHECK( E4prContainer.record(std::move(E4prCells)) );
523 }
524
526
527 //specify that a given calorimeter has been filled
528 theCellContainer->setHasCalo(caloNum);
529 }
530
531 //enum EventFlagErrorState { NotSet, Warning, Error };
533 // flag will contain status of a given event
534 // every 4 bits - status of partitions LBA,LBC,EBA,EBC
535 // bits 0-3 - there is a signal above threshold in partitions
536 // bits 4-7 - there are channels with underflow (sample=0) in partition (since rel 17.2.6.4)
537 // bits 8-11 - there are channels with overflow (sample=m_tileInfo->ADCmax()) in partition (since rel 17.2.6.4)
538 // bits 12-15 - there are at least 16 drawers with bad quality in partition
539 // bits 16-19 - maximal length of consecutive bad area (since rel 17.2.6.5)
540 // bits 20-23 - there are at least 16 drawers which are completely masked in partition
541 // bits 24-27 - there are at least 16 drawers which do not send data in partition
542 // bits 28-31 - reserved for global good/warning/bad status
543 // bits 20-27 are also used for module number which gives warning status (since release 17.2.6.5)
544 // in case of warning we are sure that bits which indicates error are not filled
545 unsigned int flag = 0;
546
547 int drConsecMaxMax = 0;
548 int drConsecNum = 0;
549
550 for (int p = 1; p < 5; ++p) {
551 TileDrawerEvtStatus * evt = drawerEvtStatus[p];
552 //TileDrawerRunStatus * run = m_drawerRunStatus[p];
553 int drAbsent = 0;
554 int drMasked = 0;
555 int drConsec = 0;
556 int drConsecMax = 0;
557 int hasBadQ = 0;
558 int hasOver = 0;
559 int hasUnder = 0;
560 int hasSig = 0;
561 for (int d = 0; d < 64; ++d) {
562 if (evt[d].nChannels == 0) {
563 ++drConsec;
564 ++drAbsent;
565 //++(run[d].drawerAbsent);
566 } else if (evt[d].nMaskedChannels >= evt[d].nChannels) {
567 ++drConsec;
568 ++drMasked;
569 //++(run[d].drawerMasked);
570 } else {
571 if (drConsec > drConsecMax) {
572 drConsecMax = drConsec;
573 if (drConsecMax > drConsecMaxMax) {
574 drConsecMaxMax = drConsecMax;
575 drConsecNum = ((p - 1) << 6) | (d - drConsec);
576 }
577 }
578 drConsec = 0;
579 if (evt[d].nMaskedChannels > 0) {
580 //++(run[d].channelsMasked);
581 }
582 if (evt[d].nBadQuality) ++hasBadQ;
583 if (evt[d].nOverflow) ++hasOver;
584 if (evt[d].nUnderflow) ++hasUnder;
585 if (evt[d].nSomeSignal) ++hasSig;
586 }
587 }
588 if (drConsec != 0 && drConsecMax < 64) { // 64th drawer is bad - check transition from 64th to 1st drawer
589 for (int d = 0; d < drConsecMax; ++d) {
590 if (evt[d].nChannels == 0 || evt[d].nMaskedChannels >= evt[d].nChannels) {
591 ++drConsec;
592 } else {
593 break;
594 }
595 }
596 if (drConsec > drConsecMax) {
597 drConsecMax = drConsec;
598 }
599 }
600 unsigned int fl = 0;
601 if (drAbsent > 15) {
602 fl |= 0x01000000;
604 }
605 if (drMasked > 15) {
606 fl |= 0x00100000;
608 }
609 //if (drConsecMax > 1)fl |= 0x00010000; // want to use these bits for length of consecutive area
610 if (hasBadQ > 15) fl |= 0x00001000;
611 if (hasOver) fl |= 0x00000100;
612 if (hasUnder) fl |= 0x00000010;
613 if (hasSig) fl |= 0x00000001;
614
615#ifdef ALLOW_DEBUG_COUT
616 std::cout<<"partition "<<p<<" drAbsent "<<drAbsent<<" drMasked "<<drMasked<<" drConsec "<<drConsecMax
617 <<" hasBadQ "<<hasBadQ<<" hasOver "<<hasOver<<" hasUnder "<<hasUnder<<" hasSig "<<hasSig<<std::endl;
618#endif
619 flag |= fl << (p - 1);
620 }
621
622 // number of consecutively masked modules (if it's > 15 we have error already set)
623 flag |= (std::min(15, drConsecMaxMax) << 16);
624
625 if (drConsecMaxMax > 1 && error < xAOD::EventInfo::Warning) {
626 // setting warning flag
628 // putting starting module number of consecutive bad area
629 // instead of bits which indicates 16 masked or 16 absent modules in partition
630 flag |= (drConsecNum << 20);
631#ifdef ALLOW_DEBUG_COUT
632 std::cout<<"warning in partition " << (drConsecNum>>6)+1 << " for modules "
633 <<(drConsecNum)%64 <<" - " <<(drConsecNum+drConsecMaxMax-1)%64 <<std::endl;
634#endif
635 }
636
637#ifdef ALLOW_DEBUG_COUT
638 std::cout<<"partition flag 0x0"<<std::hex<<flag<<std::dec<<" error "<<error<<std::endl;
639#endif
640
641 //++m_eventErrorCounter[error]; // error index is 0 or 1 or 2 here
642 //++m_eventErrorCounter[3]; // count separately total number of events
643
644
645 // retrieve EventInfo
646 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey, ctx);
647
648 if (eventInfo.isValid()) {
649
650 if (flag != 0) {
651 ATH_MSG_DEBUG( " set eventInfo for Tile for this event to 0x" << MSG::hex << flag << MSG::dec );
652 if (!eventInfo->updateEventFlags(xAOD::EventInfo::Tile, flag)) {
653 ATH_MSG_WARNING( " cannot set eventInfo for Tile " );
654 }
655 }
656
657 if (error != xAOD::EventInfo::NotSet) {
658 ATH_MSG_DEBUG( " set error bits for Tile for this event to " << error );
659 if (!eventInfo->updateErrorState(xAOD::EventInfo::Tile, error)) {
660 ATH_MSG_WARNING( " cannot set error state for Tile " );
661 }
662 }
663
664 }
665 else {
666 ATH_MSG_WARNING( " cannot retrieve EventInfo, will not set Tile information " );
667 }
668
669 // Execution completed.
670 ATH_MSG_DEBUG( "TileCellBuilder execution completed." );
671
672 return StatusCode::SUCCESS;
673}
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
SelectAllObjectMT< DCC, OBJECT > SelectAllObject
Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current TileRawChannelContainer
void setHasCalo(const CaloCell_ID::SUBCALO caloNum)
set which calo has been filled.
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
void clear()
Erase all the elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
TileDrawerEvtStatus TileDrawerEvtStatusArray[5][64]
status of every drawer
void build(const EventContext &ctx, TileDrawerEvtStatusArray &drawerEvtStatus, VecParams &params, const ITERATOR &begin, const ITERATOR &end, COLLECTION *coll, TileCellContainer *MBTSCells, TileCellContainer *E4prCells) const
< method to process raw channels from a given vector and store them in collection
TYPE
initialize
uint32_t get_bsflags() const
@ Tile
The Tile calorimeter.
EventFlagErrorState
States that a given sub-detector could be in.
@ Warning
The sub-detector issued a warning.
@ NotSet
The flag was not set to anything.
@ Error
The sub-detector issued an error.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
bool flag
Definition master.py:29
TileFragHash::TYPE m_RChType

◆ qbits()

unsigned char TileCellBuilder::qbits ( TileDrawerEvtStatusArray & drawerEvtStatus,
TileFragHash::TYPE RChType,
int ros,
int drawer,
bool count_over,
bool good_time,
bool good_ener,
bool overflow,
bool underflow,
bool good_overflowfit ) const
private

method to compute the cell quality bits

Definition at line 706 of file TileCellBuilder.cxx.

716{
717 ++drawerEvtStatus[ros][drawer].nChannels;
718 // new feature in rel 17.2.7 - count underflows and overflows
719 if (count_over) {
720 if (overflow) ++drawerEvtStatus[ros][drawer].nOverflow;
721 if (underflow) ++drawerEvtStatus[ros][drawer].nUnderflow;
722 }
723#ifdef ALLOW_DEBUG_COUT
724 if (overflow) std::cout << "channel with overflow " << ((count_over)?"":"MBTS") << std::endl;
725 if (underflow) std::cout << "channel with underflow " << ((count_over)?"":"MBTS") << std::endl;
726 if (overfit) std::cout << "channel with corrected overflow " << ((count_over)?"":"MBTS") << std::endl;
727#endif
728
729 unsigned char qbit = (overfit) ? (TileFragHash::FitFilter & TileCell::MASK_ALGO)
730 : (RChType & TileCell::MASK_ALGO);
731 if (good_time) qbit |= TileCell::MASK_TIME;
732 if (overflow || underflow) qbit |= TileCell::MASK_OVER;
733
734 if (good_ener) {
735 qbit |= TileCell::MASK_AMPL;
736 if (count_over) {
737 ++drawerEvtStatus[ros][drawer].nSomeSignal;
738 }
739 }
740
741 return qbit;
742}
@ MASK_AMPL
Definition TileCell.h:65
@ MASK_OVER
Definition TileCell.h:64

◆ reset()

void TileCellBuilder::reset ( bool fullSizeCont,
bool printReset = true )

Method to reset the options of the TileCellContainer.

Definition at line 236 of file TileCellBuilder.cxx.

236 {
237
238 if (printReset) ATH_MSG_INFO( "Resetting options in " << name() );
239
240 // check if any threshold was set in jobOptions
241 m_thresholdNotSet = ((fabs(m_eThreshold + 100000.) < 1)
242 && (fabs(m_maxTimeDiff - 100000.) < 1)
243 && (fabs(m_maxTime - 100000.) < 1)
244 && (fabs(m_minTime + 100000.) < 1)
245 && (fabs(m_maxChi2 - 100000.) < 1)
246 && (fabs(m_minChi2 + 100000.) < 1));
247
248 if (m_thresholdNotSet) {
249 ATH_MSG_INFO( "none of thresholds set, all RawChannels will be converted to Cells");
250 } else {
251 ATH_MSG_INFO( "Ene threshold " << m_eThreshold << " MeV" );
252 ATH_MSG_INFO( "max time diff " << m_maxTimeDiff << " ns" );
253 ATH_MSG_INFO( "max time thr " << m_maxTime << " ns" );
254 ATH_MSG_INFO( "min time thr " << m_minTime << " ns" );
255 ATH_MSG_INFO( "max qual thr " << m_maxChi2 );
256 ATH_MSG_INFO( "min qual thr " << m_minChi2 );
257 }
258
259 // prepare empty vector for all cell pointers
260 m_fullSizeCont = true;
261
262 ATH_MSG_INFO( "taking RawChannels from '" << m_rawChannelContainerKey.key() << "'" );
263}

◆ TileHid2RESrcID

friend class TileHid2RESrcID
friend

Definition at line 129 of file TileCellBuilder.h.

Member Data Documentation

◆ m_ADCmaskValueMinusEps

float TileCellBuilder::m_ADCmaskValueMinusEps
private

Definition at line 395 of file TileCellBuilder.h.

◆ m_ADCmaskValuePlusEps

float TileCellBuilder::m_ADCmaskValuePlusEps
private

Definition at line 396 of file TileCellBuilder.h.

◆ m_affectedRegionInfo_current_run

std::vector<CaloAffectedRegionInfo> TileCellBuilder::m_affectedRegionInfo_current_run
private

Definition at line 245 of file TileCellBuilder.h.

◆ m_affectedRegionInfo_global

std::vector<CaloAffectedRegionInfo> TileCellBuilder::m_affectedRegionInfo_global
private

Definition at line 244 of file TileCellBuilder.h.

◆ m_ampMinThresh

float TileCellBuilder::m_ampMinThresh
private

correct amplitude if it's above amplitude threshold (in ADC counts)

Definition at line 178 of file TileCellBuilder.h.

◆ m_badChannelsKey

SG::ReadCondHandleKey<TileBadChannels> TileCellBuilder::m_badChannelsKey
private
Initial value:
{this,
"TileBadChannels", "TileBadChannels", "Input Tile bad channel status"}

Name of TileBadChannels in condition store.

Definition at line 205 of file TileCellBuilder.h.

205 {this,
206 "TileBadChannels", "TileBadChannels", "Input Tile bad channel status"};

◆ m_cabling

const TileCablingService* TileCellBuilder::m_cabling
private

TileCabling instance.

Definition at line 200 of file TileCellBuilder.h.

◆ m_cablingSvc

ServiceHandle<TileCablingSvc> TileCellBuilder::m_cablingSvc
private
Initial value:
{ this,
"TileCablingSvc", "TileCablingSvc", "The Tile cabling service"}

Name of Tile cabling service.

Definition at line 229 of file TileCellBuilder.h.

229 { this,
230 "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};

◆ m_checkDCS

bool TileCellBuilder::m_checkDCS
private

Definition at line 195 of file TileCellBuilder.h.

◆ m_correctAmplitude

bool TileCellBuilder::m_correctAmplitude
private

If true, amplitude is corrected by parabolic function (needed for OF without iterations)

Definition at line 173 of file TileCellBuilder.h.

◆ m_correctTime

bool TileCellBuilder::m_correctTime
private

should time be corrected (deltat added from CondDB)

Definition at line 172 of file TileCellBuilder.h.

◆ m_DCSStateKey

SG::ReadCondHandleKey<TileDCSState> TileCellBuilder::m_DCSStateKey
private
Initial value:
{this,
"TileDCS", "TileDCS", "Input Tile DCS status"}

Name of TileDCSState object in condition store.

Definition at line 223 of file TileCellBuilder.h.

223 {this,
224 "TileDCS", "TileDCS", "Input Tile DCS status"};

◆ m_DQstatusKey

SG::ReadHandleKey<TileDQstatus> TileCellBuilder::m_DQstatusKey
private
Initial value:
{this, "TileDQstatus",
"TileDQstatus",
"TileDQstatus key"}

Definition at line 149 of file TileCellBuilder.h.

149 {this, "TileDQstatus",
150 "TileDQstatus",
151 "TileDQstatus key"};

◆ m_dspRawChannelContainer

std::string TileCellBuilder::m_dspRawChannelContainer
private

Definition at line 166 of file TileCellBuilder.h.

◆ m_dspRawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileCellBuilder::m_dspRawChannelContainerKey
private
Initial value:
{this, "TileDSPRawChannelContainer",
"TileRawChannelCnt",
"Input Tile DSP raw channel container key"}

Definition at line 139 of file TileCellBuilder.h.

139 {this, "TileDSPRawChannelContainer",
140 "TileRawChannelCnt",
141 "Input Tile DSP raw channel container key"};

◆ m_E4prContainerKey

SG::WriteHandleKey<TileCellContainer> TileCellBuilder::m_E4prContainerKey
private
Initial value:
{this, "E4prContainer",
"E4prContainer",
"Output Tile E4 prime container key"}

Definition at line 157 of file TileCellBuilder.h.

157 {this, "E4prContainer",
158 "E4prContainer",
159 "Output Tile E4 prime container key"};

◆ m_emScaleKey

SG::ReadCondHandleKey<TileEMScale> TileCellBuilder::m_emScaleKey
private
Initial value:
{this,
"TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"}

Name of TileEMScale in condition store.

Definition at line 211 of file TileCellBuilder.h.

211 {this,
212 "TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"};

◆ m_eneForTimeCut

float TileCellBuilder::m_eneForTimeCut
private

keep time for channels with energy above cut

Definition at line 168 of file TileCellBuilder.h.

◆ m_eneForTimeCutMBTS

float TileCellBuilder::m_eneForTimeCutMBTS
private

similar cut for MBTS in pC

Definition at line 169 of file TileCellBuilder.h.

◆ m_eThreshold

float TileCellBuilder::m_eThreshold
private

cell energy threshold to consider the cell

Definition at line 183 of file TileCellBuilder.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> TileCellBuilder::m_eventInfoKey
private
Initial value:
{this, "EventInfo",
"EventInfo",
"EventInfo key"}

Definition at line 143 of file TileCellBuilder.h.

143 {this, "EventInfo",
144 "EventInfo",
145 "EventInfo key"};

◆ m_EventInfoTileStatusKey

SG::WriteDecorHandleKey<xAOD::EventInfo> TileCellBuilder::m_EventInfoTileStatusKey
private
Initial value:
{this, "EventInfoTileStatus",
m_eventInfoKey, "TileStatus",
"Dummy decoration key to aid scheduling"}

Definition at line 161 of file TileCellBuilder.h.

161 {this, "EventInfoTileStatus",
162 m_eventInfoKey, "TileStatus",
163 "Dummy decoration key to aid scheduling"};

◆ m_fakeCrackCells

bool TileCellBuilder::m_fakeCrackCells
private

if true=> fake E3/E4 cells added

Definition at line 192 of file TileCellBuilder.h.

◆ m_fullSizeCont

bool TileCellBuilder::m_fullSizeCont
private

Definition at line 190 of file TileCellBuilder.h.

◆ m_infoName

std::string TileCellBuilder::m_infoName
private

Definition at line 393 of file TileCellBuilder.h.

◆ m_maskBadChannels

bool TileCellBuilder::m_maskBadChannels
private

if true=> bad channels are masked

Definition at line 191 of file TileCellBuilder.h.

◆ m_maxChi2

float TileCellBuilder::m_maxChi2
private

maximum chi2 for the PMTs in the cels

Definition at line 187 of file TileCellBuilder.h.

◆ m_maxTime

float TileCellBuilder::m_maxTime
private

maximum time for the PMTs in the cels

Definition at line 185 of file TileCellBuilder.h.

◆ m_maxTimeDiff

float TileCellBuilder::m_maxTimeDiff
private

maximum time difference between the PMTs in the cell

Definition at line 184 of file TileCellBuilder.h.

◆ m_MBTSContainerKey

SG::WriteHandleKey<TileCellContainer> TileCellBuilder::m_MBTSContainerKey
private
Initial value:
{this, "MBTSContainer",
"MBTSContainer",
"Output Tile MBTS container key"}

Definition at line 153 of file TileCellBuilder.h.

153 {this, "MBTSContainer",
154 "MBTSContainer",
155 "Output Tile MBTS container key"};

◆ m_mbtsMgr

const MbtsDetDescrManager* TileCellBuilder::m_mbtsMgr
private

Pointer to MbtsDetDescrManager.

Definition at line 233 of file TileCellBuilder.h.

◆ m_mergeChannels

bool TileCellBuilder::m_mergeChannels
private

If true, missing raw channels are taken from DSP container.

Definition at line 175 of file TileCellBuilder.h.

◆ m_minChi2

float TileCellBuilder::m_minChi2
private

minimum chi2 for the PMTs in the cels

Definition at line 188 of file TileCellBuilder.h.

◆ m_minEneChan

float TileCellBuilder::m_minEneChan[3]
private

channel energy thresholds for masking (normal,gap,mbts)

Definition at line 182 of file TileCellBuilder.h.

◆ m_minTime

float TileCellBuilder::m_minTime
private

minimum time for the PMTs in the cels

Definition at line 186 of file TileCellBuilder.h.

◆ m_noiseFilterTools

ToolHandleArray<ITileRawChannelTool> TileCellBuilder::m_noiseFilterTools
private
Initial value:
{this,
"NoiseFilterTools", {}, "Tile noise filter tools"}

Definition at line 217 of file TileCellBuilder.h.

217 {this,
218 "NoiseFilterTools", {}, "Tile noise filter tools"};

◆ m_notUpgradeCabling

bool TileCellBuilder::m_notUpgradeCabling
private

Definition at line 389 of file TileCellBuilder.h.

◆ m_of2

bool TileCellBuilder::m_of2
private

If true, assume OF2 method for amplitude correction, otherwise - OF1.

Definition at line 174 of file TileCellBuilder.h.

◆ m_qualityCut

int TileCellBuilder::m_qualityCut
private

cut on channel quality (set energy to m_zeroEnergy for them)

Definition at line 171 of file TileCellBuilder.h.

◆ m_rawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileCellBuilder::m_rawChannelContainerKey
private
Initial value:
{this, "TileRawChannelContainer",
"TileRawChannelCnt",
"Input Tile raw channel container key"}

Definition at line 135 of file TileCellBuilder.h.

135 {this, "TileRawChannelContainer",
136 "TileRawChannelCnt",
137 "Input Tile raw channel container key"};

◆ m_run2

bool TileCellBuilder::m_run2
private

Definition at line 390 of file TileCellBuilder.h.

◆ m_run2plus

bool TileCellBuilder::m_run2plus
private

Definition at line 397 of file TileCellBuilder.h.

◆ m_skipGain

int TileCellBuilder::m_skipGain
private

for two-gain calib runs skip one of two gains

Definition at line 193 of file TileCellBuilder.h.

◆ m_thresholdNotSet

bool TileCellBuilder::m_thresholdNotSet
private

bool variable to check whether some threshold have been set

Definition at line 189 of file TileCellBuilder.h.

◆ m_tileHWID

const TileHWID* TileCellBuilder::m_tileHWID
private

Pointer to TileHWID.

Definition at line 199 of file TileCellBuilder.h.

◆ m_tileID

const TileID* TileCellBuilder::m_tileID
private

Pointer to TileID.

Definition at line 197 of file TileCellBuilder.h.

◆ m_tileInfo

const TileInfo* TileCellBuilder::m_tileInfo
private

Definition at line 394 of file TileCellBuilder.h.

◆ m_tileMgr

const TileDetDescrManager* TileCellBuilder::m_tileMgr
private

Pointer to TileDetDescrManager.

Definition at line 232 of file TileCellBuilder.h.

◆ m_tileTBID

const TileTBID* TileCellBuilder::m_tileTBID
private

Pointer to TileTBID.

Definition at line 198 of file TileCellBuilder.h.

◆ m_tileToolTiming

ToolHandle<TileCondToolTiming> TileCellBuilder::m_tileToolTiming
private
Initial value:
{this,
"TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"}

Definition at line 214 of file TileCellBuilder.h.

214 {this,
215 "TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"};

◆ m_timeMaxThresh

float TileCellBuilder::m_timeMaxThresh
private

correct amplitude is time is below time max threshold

Definition at line 180 of file TileCellBuilder.h.

◆ m_timeMinThresh

float TileCellBuilder::m_timeMinThresh
private

correct amplitude is time is above time min threshold

Definition at line 179 of file TileCellBuilder.h.

◆ m_towerE1

int TileCellBuilder::m_towerE1 = E1_TOWER
private

Definition at line 388 of file TileCellBuilder.h.

◆ m_useDemoCabling

int TileCellBuilder::m_useDemoCabling
private

Definition at line 194 of file TileCellBuilder.h.

◆ m_zeroEnergy

float TileCellBuilder::m_zeroEnergy
private

energy to store in every PMT if both PMT are bad

Definition at line 170 of file TileCellBuilder.h.


The documentation for this class was generated from the following files: