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

struct  VecParams
class  DoubleVectorIterator

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< TileRawChannelContainer > m_rawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_dspRawChannelContainerKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
SG::WriteHandleKey< TileCellContainer > m_MBTSContainerKey
SG::WriteHandleKey< TileCellContainer > m_E4prContainerKey
SG::WriteDecorHandleKey< xAOD::EventInfo > m_EventInfoTileStatusKey
std::string m_dspRawChannelContainer
Gaudi::Property< float > m_eneForTimeCut
Gaudi::Property< float > m_eneForTimeCutMBTS
Gaudi::Property< float > m_zeroEnergy
Gaudi::Property< int > m_qualityCut
Gaudi::Property< bool > m_correctTime
Gaudi::Property< bool > m_correctAmplitude
Gaudi::Property< bool > m_of2
Gaudi::Property< bool > m_mergeChannels
Gaudi::Property< float > m_ampMinThresh
Gaudi::Property< float > m_timeMinThresh
Gaudi::Property< float > m_timeMaxThresh
Gaudi::Property< float > m_minEneChan
Gaudi::Property< float > m_minEneGap
Gaudi::Property< float > m_minEneMBTS
Gaudi::Property< float > m_eThreshold
Gaudi::Property< float > m_maxTimeDiff
Gaudi::Property< float > m_maxTime {this, "MaxTime", 100000., "Maximum time for the PMTs in the cells"}
Gaudi::Property< float > m_minTime {this, "MinTime", -100000., "Minimum time for the PMTs in the cells"}
Gaudi::Property< float > m_maxChi2 {this, "MaxChi2", 100000., "Maximum chi2 for the PMTs in the cells"}
Gaudi::Property< float > m_minChi2 {this, "MinChi2", -100000., "Minimum chi2 for the PMTs in the cells"}
bool m_thresholdNotSet {true}
 bool variable to check whether some threshold have been set
Gaudi::Property< bool > m_fullSizeCont {this, "fullSizeCont", true, "Use full size cell container"}
Gaudi::Property< bool > m_maskBadChannels
Gaudi::Property< bool > m_fakeCrackCells
Gaudi::Property< int > m_skipGain
Gaudi::Property< int > m_useDemoCabling
Gaudi::Property< bool > m_checkDCS {this, "CheckDCS", false, "Check DCS state"}
const TileID * m_tileID {nullptr}
 Pointer to TileID.
const TileTBID * m_tileTBID {nullptr}
 Pointer to TileTBID.
const TileHWID * m_tileHWID {nullptr}
 Pointer to TileHWID.
const TileCablingService * m_cabling {nullptr}
 TileCabling instance.
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
 Name of TileBadChannels in condition store.
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
 Name of TileEMScale in condition store.
ToolHandle< TileCondToolTiming > m_tileToolTiming
ToolHandleArray< ITileRawChannelTool > m_noiseFilterTools
SG::ReadCondHandleKey< TileDCSState > m_DCSStateKey
 Name of TileDCSState object in condition store.
ServiceHandle< TileCablingSvc > m_cablingSvc
 Name of Tile cabling service.
const TileDetDescrManager * m_tileMgr {nullptr}
 Pointer to TileDetDescrManager.
const MbtsDetDescrManager * m_mbtsMgr {nullptr}
 Pointer to MbtsDetDescrManager.
std::vector< CaloAffectedRegionInfo > m_affectedRegionInfo_global
std::vector< CaloAffectedRegionInfo > m_affectedRegionInfo_current_run
int m_towerE1 = E1_TOWER
bool m_notUpgradeCabling {true}
bool m_run2 {false}
Gaudi::Property< std::string > m_infoName {this, "TileInfoName", "TileInfo", "Name of TileInfo object"}
const TileInfo * m_tileInfo {nullptr}
float m_ADCmaskValueMinusEps {0.f}
float m_ADCmaskValuePlusEps {0.f}
bool m_run2plus {false}

Friends

class TileHid2RESrcID

Detailed Description

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

Definition at line 108 of file TileCellBuilder.h.

Member Typedef Documentation

◆ TileDrawerEvtStatusArray

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

status of every drawer

Definition at line 134 of file TileCellBuilder.h.

Member Enumeration Documentation

◆ CELL_CHANNEL

Enumerator
E1_CHANNEL 

Definition at line 415 of file TileCellBuilder.h.

◆ CELL_TOWER

Enumerator
E1_TOWER 
E1_TOWER_UPGRADE_ABC 

Definition at line 416 of file TileCellBuilder.h.

Constructor & Destructor Documentation

◆ TileCellBuilder()

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

Contructor.

Definition at line 45 of file TileCellBuilder.cxx.

47 : base_class(type, name, parent)
48{
49 declareInterface<TileCellBuilder>( this );
50}

◆ ~TileCellBuilder()

TileCellBuilder::~TileCellBuilder ( )
virtualdefault

Destructor.

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 941 of file TileCellBuilder.cxx.

949{
950 // Now retrieve the TileDQstatus
951 const TileDQstatus* DQstatus = nullptr;
953 DQstatus = SG::makeHandle (m_DQstatusKey, ctx).get();
954 }
955
956 const TileDCSState* dcsState = m_checkDCS ? SG::ReadCondHandle(m_DCSStateKey, ctx).cptr() : nullptr;
957 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey, ctx);
958 SG::ReadCondHandle<TileBadChannels> badChannels(m_badChannelsKey, ctx);
959
960 /* zero all counters and sums */
961 int nTwo = 0;
962 int nCell = 0;
963 int nFake = 0;
964 int nMBTS = 0;
965 int nE4pr = 0;
966 int nChan = 0;
967 float eCh = 0.0;
968 float eCellTot = 0.0;
969 float eMBTSTot = 0.0;
970 float eE4prTot = 0.0;
971 bool EBdrawerPresent[128];
972 memset(EBdrawerPresent, 0, sizeof(EBdrawerPresent));
973 DataPool<TileCell> tileCellsP(5217);
974 //**
975 //* Iterate over raw channels, creating new TileCells (or incrementing
976 //* existing ones). Add each new TileCell to the output collection
977 //**
978
979 std::vector<TileCell*> allCells (m_tileID->cell_hash_max(), nullptr);
980
981 for (ITERATOR rawItr = begin; rawItr != end; ++rawItr) {
982
983 const TileRawChannel* pChannel = (*rawItr);
984 HWIdentifier adc_id = pChannel->adc_HWID();
985 int ros = m_tileHWID->ros(adc_id);
986 int drawer = m_tileHWID->drawer(adc_id);
987 int channel = m_tileHWID->channel(adc_id);
988 int gain = m_tileHWID->adc(adc_id);
989 if (gain == m_skipGain) {
990 ATH_MSG_VERBOSE (" skipping adc_id=" << m_tileHWID->to_string(adc_id));
991 continue; // select only one of two gains in calib runs
992 }
993 int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
994 if (channel == 0 && ros > 2) EBdrawerPresent[(ros - 3) * 64 + drawer] = true; // EB drawer appeared in the data
995
996 float time = pChannel->uncorrTime(); // take uncorrected time (if available)
997 float amp = pChannel->amplitude();
998
999 TileRawChannelUnit::UNIT oldUnit = params.m_RChUnit;
1000 if (params.m_correctAmplitude && time > m_timeMinThresh && time < m_timeMaxThresh) { // parabolic correction
1001 if (params.m_RChUnit > TileRawChannelUnit::OnlineADCcounts) { // convert from online units to ADC counts
1003 amp = emScale->undoOnlineChannelCalibration(drawerIdx, channel, gain, amp, params.m_RChUnit);
1004
1005 if (amp > m_ampMinThresh) // amp cut in ADC counts
1006 amp *= TileRawChannelBuilder::correctAmp(time,params.m_of2);
1007 } else if (params.m_RChUnit == TileRawChannelUnit::ADCcounts
1009 if (amp > m_ampMinThresh)
1010 amp *= TileRawChannelBuilder::correctAmp(time,params.m_of2);
1011 } else {
1012 ATH_MSG_ERROR( "Units in raw channel container is " << params.m_RChUnit );
1013 ATH_MSG_ERROR( "But amplitude correction works only with ADC counts " );
1014 ATH_MSG_ERROR( "Please, disable CIS calibration in optimal filter " );
1015 }
1016 }
1017
1018 float qual = pChannel->quality();
1019
1020 // check that time was really reconstructed
1021 bool good_time = (fabs(time) < params.m_maxTimeCorr);
1022 bool non_zero_time = (params.m_RChType == TileFragHash::OptFilterDspCompressed)
1023 ? ((qual > 2.99 && qual < 4.01))
1024 : ((qual > 0.0 || params.m_RChType == TileFragHash::OptFilterDsp));
1025
1026 // new feature in rel 17.2.7 - pedestal keeps information about overflow and underflow
1027 // if there is an underflow, 10000 is added to pedestal value
1028 // if there is an overflow, 20000 is added to pedestal value
1029 // if there is an underflow in all samples, 80000 is added to pedestal value
1030 // if there is an overflow in all samples, 90000 is added to pedestal value
1031 // if there is bad pattern nunber N 100000+N*10000 is added to pedestal value
1032 bool overflow = false;
1033 bool underflow = false;
1034 bool overfit = false;
1035 float ped = pChannel->pedestal();
1036 if (ped > 59500.) { // one of bad patterns
1037 qual = 9999; // mask all bad patterns
1038 } else if (ped > 39500.) { // 40000 for constant value or 50000 for all zeros in disconnexted channel
1039 // nothing to do
1040 } else if (ped > m_ADCmaskValuePlusEps) { // 10000 for underflow or 20000 for overflow or 10000+20000
1041 // NOTE: opt filter can yield values between (-500, 4600) and overlay magic number is 4800 in case of 12-bit ADCs
1042 underflow = ((ped < 10000. + m_ADCmaskValuePlusEps) || (ped > 29500.));
1043 overflow = (ped > 10000. + m_ADCmaskValuePlusEps);
1044 // special flag indicating that fit method was applied for overflow channels
1045 overfit = ( (ped > 20000. + m_ADCmaskValueMinusEps && ped < 29500) || (ped > 30000. + m_ADCmaskValueMinusEps && ped < 39500) );
1046
1047 if (overflow
1048 && gain == TileID::LOWGAIN
1049 && amp > 0
1050 && time > m_timeMinThresh
1051 && time < m_timeMaxThresh) {
1052
1053 qual = fabs(qual);
1054 if (qual > m_qualityCut && qual < 9999.) {
1055 qual = m_qualityCut; // to avoid masking of overflow in low gain
1056 }
1057 }
1058 }
1059
1060 // apply time correction if needed
1061 if (params.m_correctTime && good_time && non_zero_time)
1062 time -= m_tileToolTiming->getSignalPhase(drawerIdx, channel, gain);
1063 else
1064 time = pChannel->time();
1065
1066 ++nChan;
1067 eCh += amp;
1068
1069 int index, pmt;
1070 int channel1 = channel;
1071
1072 if (m_useDemoCabling == 2015 && ros == 4 && drawer == 1) {
1073 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,
1074 26,25,24,29,31,32,27,28,30,35,34,33,38,37,43,44,41,40,39,36,42,47,46,45};
1075 channel1 = pmt2channel[channel];
1076
1077 } else if ( (m_useDemoCabling >= 2016 && m_useDemoCabling <= 2019)
1078 && (ros == 2 && (drawer == 1 || drawer>2)) ) {
1079 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,
1080 26,25,24,29,28,27,32,31,30,35,34,33,38,37,36,41,40,39,44,43,42,47,46,45};
1081 channel1 = pmt2channel[channel];
1082 } else if ( (m_useDemoCabling >= 2018)
1083 && (ros == 4 && drawer>=2) ) {
1084 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,
1085 31,32,30,35, 33,34, 38,37,41,40,39,36, 26,25,24,29,28,27, 44,43,42,47,46,45};
1086 channel1 = pmt2channelEB[channel];
1087 }
1088
1089 Identifier cell_id = m_cabling->h2s_cell_id_index (ros, drawer, channel1, index, pmt);
1090
1091 if (index == -3) { // E4' cells
1092
1093 if (E4prCells) { // do something with them only if the container exists
1094 ++nE4pr;
1095
1096 // convert ADC counts to MeV. like for normal cells
1097 float ener = emScale->calibrateChannel(drawerIdx, channel, gain, amp, oldUnit
1099
1100 eE4prTot += ener;
1101 unsigned char iqual = iquality(qual);
1102 // for E4' cell qbit use only non_zero_time flag and check that energy is above standatd energy threshold in MeV
1103 unsigned char qbit = qbits(drawerEvtStatus, params.m_RChType,
1104 ros, drawer, true, non_zero_time, (fabs(ener) > m_eneForTimeCut)
1105 , overflow, underflow, overfit);
1109
1110 TileCell* pCell = tileCellsP.nextElementPtr();
1111 // no CaloDDE
1112 // Cell ID is set explicitly
1113 pCell->set(NULL, cell_id);
1114 pCell->setEnergy_nonvirt(ener, 0, cgain, 3);
1115 pCell->setTime_nonvirt(time);
1116 pCell->setQual1(iqual);
1117 pCell->setQual2(0);
1118 pCell->setQbit1(qbit);
1119 pCell->setQbit2(0);
1120
1121 if (msgLvl(MSG::VERBOSE)) {
1122 msg(MSG::VERBOSE) << " E4' cell_id=" << m_tileTBID->to_string(cell_id)
1123 << " adc_id=" << m_tileHWID->to_string(adc_id)
1124 << " ene= " << ener
1125 << " amp= " << amp
1126 << " time= " << time
1127 << " qual= " << pChannel->quality()
1128 << " iqual= " << (int) iqual
1129 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec;
1130
1131 if (ped > m_ADCmaskValuePlusEps)
1132 msg(MSG::VERBOSE) << " err = " << TileRawChannelBuilder::BadPatternName(ped) << endmsg;
1133 else
1134 msg(MSG::VERBOSE) << endmsg;
1135 }
1136
1137 if (m_maskBadChannels && maskBadChannel(drawerEvtStatus, DQstatus, dcsState,
1138 *badChannels, pCell, adc_id))
1139 ATH_MSG_VERBOSE ( "cell with id=" << m_tileTBID->to_string(cell_id)
1140 << " bad channel masked, new energy=" << pCell->energy() );
1141
1142 E4prCells->push_back(pCell); // store cell in container
1143
1144 }
1145
1146 } else if (index == -2) { // MBTS cells
1147
1148 if (MBTSCells) { // do something with them only if contaier existst
1149 ++nMBTS;
1150
1151 // convert ADC counts to pCb and not to MeV
1152 float ener = emScale->calibrateChannel(drawerIdx, channel, gain, amp , oldUnit
1154
1155 eMBTSTot += ener;
1156 unsigned char iqual = iquality(qual);
1157 // for MBTS qbit use AND of good_time and non_zero_time and check that energy is above MBTS energy threshold in pC
1158 unsigned char qbit = qbits(drawerEvtStatus, params.m_RChType,
1159 ros, drawer, false, (good_time && non_zero_time),
1160 (fabs(ener) > m_eneForTimeCutMBTS), overflow, underflow, overfit);
1161
1165
1166 TileCell* pCell = tileCellsP.nextElementPtr();
1167 // MBTS CaloDDE
1168 // Cell ID is set explicitly
1169 pCell->set((m_mbtsMgr) ? m_mbtsMgr->get_element(cell_id) : NULL, cell_id);
1170 pCell->setEnergy_nonvirt(ener, 0, cgain, 3);
1171 pCell->setTime_nonvirt(time);
1172 pCell->setQual1(iqual);
1173 pCell->setQual2(0);
1174 pCell->setQbit1(qbit);
1175 pCell->setQbit2(0);
1176
1177 if (msgLvl(MSG::VERBOSE)) {
1178 msg(MSG::VERBOSE) << " MBTS cell_id=" << m_tileTBID->to_string(cell_id)
1179 << " adc_id=" << m_tileHWID->to_string(adc_id)
1180 << " ene= " << ener
1181 << " amp= " << amp
1182 << " time= " << time
1183 << " qual= " << pChannel->quality()
1184 << " iqual= " << (int) iqual
1185 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec;
1186
1187 if (ped > m_ADCmaskValuePlusEps)
1188 msg(MSG::VERBOSE) << " err = " << TileRawChannelBuilder::BadPatternName(ped) << endmsg;
1189 else
1190 msg(MSG::VERBOSE) << endmsg;
1191 }
1192
1193 if (m_maskBadChannels && maskBadChannel(drawerEvtStatus, DQstatus, dcsState,
1194 *badChannels, pCell, adc_id))
1195 ATH_MSG_VERBOSE ( "cell with id=" << m_tileTBID->to_string(cell_id)
1196 << " bad channel masked, new energy=" << pCell->energy() );
1197
1198 MBTSCells->push_back(pCell); // store cell in container
1199
1200 }
1201 } else if (index != -1) { // connected channel
1202
1203 float ener = emScale->calibrateChannel(drawerIdx, channel, gain, amp
1205
1206 eCellTot += ener;
1207
1208 unsigned char iqual = iquality(qual);
1209 // for normal cell qbit use only non_zero_time flag and check that energy is above standatd energy threshold in MeV
1210 unsigned char qbit = qbits(drawerEvtStatus, params.m_RChType,
1211 ros, drawer, true, non_zero_time, (fabs(ener) > m_eneForTimeCut)
1212 , overflow, underflow, overfit);
1213
1214
1215 if (m_run2plus && channel == E1_CHANNEL && ros > 2) { // Raw channel -> E1 cell.
1216
1217 int drawer2 = m_cabling->E1_merged_with_run2plus(ros,drawer);
1218 if (drawer2 != 0) { // Raw channel splitted into two E1 cells for Run 2.
1219 int side = (ros == 3) ? 1 : -1;
1220 Identifier cell_id2 = m_tileID->cell_id(TileID::GAPDET, side, drawer2, m_towerE1, TileID::SAMP_E);
1221 int index2 = m_tileID->cell_hash(cell_id2);
1222 TileCell* pCell2 = tileCellsP.nextElementPtr();
1223 ++nCell;
1224 allCells[index2] = pCell2;
1225 const CaloDetDescrElement* dde2 = m_tileMgr->get_cell_element(index2);
1226 pCell2->set(dde2, cell_id2);
1228 int pmt2(0);
1229 ener /= 2.0F;
1230 correctCell(pCell2, 1, pmt2, gain, ener, time, iqual, qbit, 1);
1231
1232 ATH_MSG_DEBUG("E1 cell Id => " << m_tileID->to_string(cell_id)
1233 << " splitted into " << m_tileID->to_string(cell_id2));
1234
1235
1236 }
1237
1238 }
1239
1240 TileCell* pCell = allCells[index];
1241 if (pCell) {
1242 ++nTwo;
1243 correctCell(pCell, 2, pmt, gain, ener, time, iqual, qbit, 0); // correct & merge 2 PMTs in one cell
1244 } else {
1245 ++nCell;
1246 allCells[index] = pCell = tileCellsP.nextElementPtr();
1247 const CaloDetDescrElement* dde = m_tileMgr->get_cell_element(index);
1248 pCell->set(dde, cell_id);
1250 int ch_type = (dde->onl2() == TileHWID::NOT_VALID_HASH) ? 1 : 0;
1251 correctCell(pCell, 1, pmt, gain, ener, time, iqual, qbit, ch_type); // correct & save e,t,q in new cell
1252 }
1253
1254 if (msgLvl(MSG::VERBOSE)) {
1255 float calib1 = (amp != 0) ? ener / amp : 0.0;
1256 msg(MSG::VERBOSE) << " cell_id=" << m_tileID->to_string(cell_id, -2)
1257 << " adc_id=" << m_tileHWID->to_string(adc_id)
1258 << " calib=" << calib1
1259 << " nCell=" << nCell
1260 << " energy=" << ener << " (" << pCell->energy() << ", " << pCell->eneDiff() << ")" << endmsg;
1261
1262 msg(MSG::VERBOSE) << " amp= " << amp
1263 << " time= " << time
1264 << " qual= " << pChannel->quality()
1265 << " iqual= " << (int) iqual
1266 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec;
1267
1268 if (ped > m_ADCmaskValuePlusEps)
1269 msg(MSG::VERBOSE) << " err = " << TileRawChannelBuilder::BadPatternName(ped) << endmsg;
1270 else
1271 msg(MSG::VERBOSE) << endmsg;
1272 }
1273
1274 } else {
1275
1276 if (msgLvl(MSG::VERBOSE)) {
1277
1278 unsigned char iqual = iquality(qual);
1279 unsigned char qbit = qbits(drawerEvtStatus, params.m_RChType,
1280 0, drawer, false, non_zero_time, false, overflow, underflow, overfit); //fake ros number here
1281
1282 msg(MSG::VERBOSE) << " channel with adc_id=" << m_tileHWID->to_string(adc_id)
1283 << " is not connected" << endmsg;
1284
1285 msg(MSG::VERBOSE) << " amp= " << amp
1286 << " time= " << time
1287 << " qual= " << pChannel->quality()
1288 << " iqual= " << (int) iqual
1289 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec;
1290
1291 if (ped > m_ADCmaskValuePlusEps)
1292 msg(MSG::VERBOSE) << " err = " << TileRawChannelBuilder::BadPatternName(ped) << endmsg;
1293 else
1294 msg(MSG::VERBOSE) << endmsg;
1295 }
1296 }
1297 if (msgLvl(MSG::VERBOSE)) {
1298 if ((params.m_correctTime && good_time && non_zero_time) || pChannel->sizeTime() > 1) {
1299 msg(MSG::VERBOSE) << " OF_time = " << pChannel->uncorrTime()
1300 << " corr_time = " << time << endmsg;
1301 }
1302 }
1303 }
1304
1305 //**
1306 // Now store all TileCells
1307 //**
1308 for (unsigned int index = 0; index < allCells.size(); ++index) {
1309
1310 TileCell * pCell = allCells[index];
1311
1312 if (pCell) { // cell exists
1313
1315 if (maskBadChannels (drawerEvtStatus, DQstatus, dcsState, *badChannels, pCell))
1316 ATH_MSG_VERBOSE ( "cell with id=" << m_tileID->to_string(pCell->ID(), -2)
1317 << " bad channels masked, new energy=" << pCell->energy() );
1318
1320 || (pCell->energy() > m_eThreshold
1321 && fabs(pCell->timeDiff()) < m_maxTimeDiff
1322 && pCell->time1() < m_maxTime && pCell->time1() > m_minTime
1323 && pCell->time2() < m_maxTime && pCell->time2() > m_minTime
1324 && pCell->qual1() > m_minChi2 && pCell->qual1() < m_maxChi2
1325 && pCell->qual2() > m_minChi2 && pCell->qual2() < m_maxChi2)) {
1326
1327 coll->push_back(pCell); // store cell in container
1328
1329 } else {
1330
1331 //delete pCell; it's dangerous to delete cell, if it's in DataPool
1332
1333 }
1334
1335 allCells[index] = 0; // clear pointer for next event
1336 } else if (m_fakeCrackCells) { // can be true only for full-size container
1337
1338 pCell = tileCellsP.nextElementPtr();
1339 const CaloDetDescrElement* dde = m_tileMgr->get_cell_element(index);
1340 pCell->set(dde, dde->identify());
1341
1342 if (m_tileID->section(pCell->ID()) == TileID::GAPDET) { // missing D4/E3/E4 cell
1343
1344 int ind = m_tileID->module(pCell->ID()) + ((m_tileID->side(pCell->ID()) > 0) ? 0 : 64);
1345 if (EBdrawerPresent[ind]) {
1346 ++nFake;
1347 if (m_tileID->sample(pCell->ID()) == TileID::SAMP_E) {
1348 pCell->setEnergy(0.0, 0.0, TileID::LOWGAIN, CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
1349 pCell->setQuality(0, TileCell::MASK_BADCH, 0); // reset quality flag for first pmt
1350 pCell->setQuality(0, TileCell::MASK_BADCH, 1); // reset quality flag for second pmt
1351 } else {
1352 pCell->setEnergy(0.0, 0.0, TileID::LOWGAIN, TileID::LOWGAIN); // reset energy completely, indicate problem putting low gain
1353 pCell->setQuality(0, 0, 0); // reset quality flag for first pmt
1354 pCell->setQuality(0, 0, 1); // reset quality flag for second pmt
1355 }
1356 pCell->setTime(0.0); // reset time completely
1357
1358 ATH_MSG_VERBOSE ( "adding fake cell with id=" << m_tileID->to_string(pCell->ID(), -2)
1359 << " ene=" << pCell->energy()
1360 << " status=" << (pCell->badcell() ? "bad" : "good") );
1361
1362 coll->push_back(pCell); // store cell in container
1363 }
1364 }
1365 }
1366 }
1367
1368 if (msgLvl(MSG::DEBUG)) {
1369 msg(MSG::DEBUG) << " nChan=" << nChan
1370 << " RawChSum=" << eCh
1371 << " nCell=" << nCell
1372 << " n2=" << nTwo
1373 << " nFake=" << nFake
1374 << " eneTot=" << eCellTot;
1375
1376 if (MBTSCells)
1377 msg(MSG::DEBUG) << " nMBTS=" << nMBTS
1378 << " eMBTS=" << eMBTSTot;
1379 if (E4prCells)
1380 msg(MSG::DEBUG) << " nE4pr=" << nE4pr
1381 << " eE4pr=" << eE4prTot;
1382
1383 msg(MSG::DEBUG) << endmsg;
1384 }
1385}
#define endmsg
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_VERBOSE(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
const TileDetDescrManager * m_tileMgr
Pointer to TileDetDescrManager.
Gaudi::Property< bool > m_fakeCrackCells
Gaudi::Property< float > m_eneForTimeCut
Gaudi::Property< float > m_ampMinThresh
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
const TileTBID * m_tileTBID
Pointer to TileTBID.
Gaudi::Property< bool > m_maskBadChannels
Gaudi::Property< int > m_qualityCut
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.
Gaudi::Property< float > m_minChi2
const MbtsDetDescrManager * m_mbtsMgr
Pointer to MbtsDetDescrManager.
Gaudi::Property< float > m_maxTime
bool maskBadChannels(TileDrawerEvtStatusArray &drawerEvtStatus, const TileDQstatus *DQstatus, const TileDCSState *dcsState, const TileBadChannels *badChannels, TileCell *pCell) const
Gaudi::Property< float > m_eneForTimeCutMBTS
Gaudi::Property< float > m_timeMaxThresh
unsigned char iquality(float qual) const
bool m_thresholdNotSet
bool variable to check whether some threshold have been set
SG::ReadCondHandleKey< TileDCSState > m_DCSStateKey
Name of TileDCSState object in condition store.
Gaudi::Property< float > m_minTime
const TileCablingService * m_cabling
TileCabling instance.
Gaudi::Property< float > m_maxChi2
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
const TileHWID * m_tileHWID
Pointer to TileHWID.
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
Gaudi::Property< float > m_eThreshold
Gaudi::Property< float > m_timeMinThresh
Gaudi::Property< float > m_maxTimeDiff
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.
Gaudi::Property< bool > m_checkDCS
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
Gaudi::Property< int > m_useDemoCabling
Gaudi::Property< int > m_skipGain
const TileID * m_tileID
Pointer to TileID.
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 576 of file TileCellBuilder.cxx.

577 {
578//************************************************************************
579
580// Merge two pmts in one cell if needed
581// and apply corrections
582
583 // do not trust to energies below certain threshold
584 const float minEneChan = (ch_type == 0) ? m_minEneChan.value()
585 : (ch_type == 1) ? m_minEneGap.value()
586 : m_minEneMBTS.value();
587 if (ener < minEneChan) {
588#ifdef ALLOW_DEBUG_COUT
589 std::cout << "channel with negative energy " << ener << " => setting quality to 255" << std::endl;
590#endif
591 iqual = 255;
592 }
593
594 switch (correction) {
595 case 1: // first pmt for this cell
596 pCell->addEnergy(ener, pmt, gain);
597 pCell->setTime(time); // overwrite time completely
598 pCell->setQuality(iqual, qbit, pmt);
599 pCell->setQuality(0, 0, 1 - pmt);
600 break;
601 case 2: // second pmt for this cell
602 pCell->addEnergy(ener, pmt, gain);
603 pCell->setTime(time, pmt); // calculate average time and timeDiff
604 pCell->setQuality(iqual, qbit, pmt);
605 break;
606 }
607}
Gaudi::Property< float > m_minEneChan
Gaudi::Property< float > m_minEneGap
Gaudi::Property< float > m_minEneMBTS
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 165 of file TileCellBuilder.cxx.

165 {
166
167 ATH_MSG_INFO( "Finalizing" );
168
169 return StatusCode::SUCCESS;
170}
#define ATH_MSG_INFO(x,...)

◆ initialize()

StatusCode TileCellBuilder::initialize ( )
overridevirtual

Initializer.

Definition at line 60 of file TileCellBuilder.cxx.

60 {
61
62 // retrieve MBTS and Tile detector manager, TileID helper and TileIfno from det store
63 if (m_MBTSContainerKey.key().empty()) {
64 m_mbtsMgr = nullptr;
65 } else {
66
67 ATH_CHECK( m_MBTSContainerKey.initialize() );
68 ATH_MSG_INFO( "Storing MBTS cells in " << m_MBTSContainerKey.key() );
69
70 if (detStore()->retrieve(m_mbtsMgr).isFailure()) {
71 ATH_MSG_WARNING( "Unable to retrieve MbtsDetDescrManager from DetectorStore" );
72 m_mbtsMgr = nullptr;
73 }
74 }
75
76 ATH_CHECK( m_eventInfoKey.initialize() );
77 ATH_CHECK( m_DQstatusKey.initialize() );
78 ATH_CHECK( m_EventInfoTileStatusKey.initialize() );
79 ATH_CHECK( m_emScaleKey.initialize() );
80
81 ATH_CHECK( detStore()->retrieve(m_tileMgr) );
82 ATH_CHECK( detStore()->retrieve(m_tileID) );
83 ATH_CHECK( detStore()->retrieve(m_tileTBID) );
84 ATH_CHECK( detStore()->retrieve(m_tileHWID) );
85
86 ATH_CHECK( m_badChannelsKey.initialize() );
87
88 // access tools and store them
89 ATH_CHECK( m_noiseFilterTools.retrieve() );
90
91 //=== get TileCondToolTiming
92 ATH_CHECK( m_tileToolTiming.retrieve() );
93
94 ATH_CHECK( m_DCSStateKey.initialize(m_checkDCS) );
95
96 ATH_CHECK( m_cablingSvc.retrieve() );
97 m_cabling = m_cablingSvc->cablingService();
98
99 reset(true, false);
100
101 m_run2 = m_cabling->isRun2Cabling();
102 m_run2plus = m_cabling->isRun2PlusCabling();
103
104 if (m_run2 && !m_E4prContainerKey.key().empty()) {
105 ATH_CHECK( m_E4prContainerKey.initialize() );
106 ATH_MSG_INFO( "Storing E4' cells in " << m_E4prContainerKey.key() );
107 } else {
108 m_E4prContainerKey = ""; // no E4' container for RUN1
109 }
110
111 if (m_cabling->getCablingType() == TileCablingService::UpgradeABC) {
113 m_notUpgradeCabling = false;
114 }
115
116 ATH_CHECK( m_rawChannelContainerKey.initialize() );
117
119 || m_dspRawChannelContainerKey.key().empty())) {
120 m_mergeChannels = false;
121 }
122
124 ATH_CHECK( m_eventInfoKey.initialize() );
125
126 ATH_MSG_INFO( "TileCellBuilder initialization completed" );
127
128 //=== get TileInfo
129 ATH_CHECK( detStore()->retrieve(m_tileInfo, m_infoName.value()) );
130 m_ADCmaskValueMinusEps = m_tileInfo->ADCmaskValue() - 0.01; // indicates channels which were masked in background dataset
131 m_ADCmaskValuePlusEps = m_tileInfo->ADCmaskValue() + 0.01; // indicates channels which were masked in background dataset
132
133 return StatusCode::SUCCESS;
134}
#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.
Gaudi::Property< bool > m_mergeChannels
SG::WriteDecorHandleKey< xAOD::EventInfo > m_EventInfoTileStatusKey
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
const TileInfo * m_tileInfo
SG::WriteHandleKey< TileCellContainer > m_E4prContainerKey
SG::WriteHandleKey< TileCellContainer > m_MBTSContainerKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
ToolHandleArray< ITileRawChannelTool > m_noiseFilterTools
Gaudi::Property< std::string > m_infoName
const std::string reset

◆ interfaceID()

const InterfaceID & TileCellBuilder::interfaceID ( )
static

Definition at line 40 of file TileCellBuilder.cxx.

40 {
42}
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 322 of file TileCellBuilder.h.

322 {
323 return std::min(255, abs((int) qual));
324 } // 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 649 of file TileCellBuilder.cxx.

652{
653 int ros = m_tileHWID->ros(hwid);
654 int drawer = m_tileHWID->drawer(hwid);
655 int chan = m_tileHWID->channel(hwid);
656 int gain = m_tileHWID->adc(hwid);
657 TileBchStatus chStatus = badChannels->getAdcStatus(hwid);
658
659 // check quality first
660 bool bad = ((int) pCell->qual1() > m_qualityCut);
661 if (bad) {
662 ++drawerEvtStatus[ros][drawer].nBadQuality;
663
664 } else {
665 // check bad status in DB
666 bad = chStatus.isBad();
667
668 // Now checking the DQ status
669 if (!bad && m_notUpgradeCabling && DQstatus) {
670 bad = !(DQstatus->isAdcDQgood(ros, drawer, chan, gain))
671 || (dcsState ? dcsState->isStatusBad(ros, drawer, chan) : false);
672 }
673 }
674
675 if (bad) {
676 // only one channel in this cell and it is bad
677 ++drawerEvtStatus[ros][drawer].nMaskedChannels;
678
679 //pCell->setEnergy(m_zeroEnergy,0.0,TileID::LOWGAIN,CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
680 //pCell->setTime(0.0); // reset time completely
681 //pCell->setQuality(255,TileCell::MASK_BADCH,0); // reset quality flag for first pmt
682
683 if (gain == CaloGain::INVALIDGAIN) {
684 pCell->setEnergy(0.0, 0.0, TileID::LOWGAIN, CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
685 } else {
686 pCell->setEnergy(0.0, 0.0); // reset energy completely without changing the gain
687 }
688 pCell->setTime(-100.0); // reset time to big negative number to distinguish this bad cell from good cells
689 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit1() & TileCell::MASK_ALGO)), 0); // reset quality flag for first pmt
690 pCell->setQuality(0, TileCell::MASK_BADCH, 1); // reset quality flag for second pmt
691
692 return true;
693
694 } else if (chStatus.isBadTiming()) {
695 pCell->setTime(0.0); // channel with bad timing - no cell time
696 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
697 pCell->setQuality(pCell->qual1(), qbit1, 0); // update qbits for first pmt
698 }
699
700 return false;
701}
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 705 of file TileCellBuilder.cxx.

708{
709 bool single_PMT_C10 = false;
710
711 const CaloDetDescrElement* caloDDE = pCell->caloDDE();
712
713 IdentifierHash hash1 = caloDDE->onl1();
714 IdentifierHash hash2 = caloDDE->onl2();
715
716 int gain1 = pCell->gain1();
717
718 HWIdentifier ch_id1 = m_tileHWID->channel_id(hash1);
719
720 int ros1 = m_tileHWID->ros(ch_id1);
721 int drawer1 = m_tileHWID->drawer(ch_id1);
722 int chan1 = m_tileHWID->channel(ch_id1);
723
724 HWIdentifier adc_id1 = m_tileHWID->adc_id(ros1, drawer1, chan1, ((gain1 < 0) ? 1 : gain1));
725 const TileBchStatus& chStatus1 = badChannels->getAdcStatus(adc_id1);
726
727 // check quality first
728 bool bad1 = ((int) pCell->qual1() > m_qualityCut);
729 if (bad1) {
730 ++drawerEvtStatus[ros1][drawer1].nBadQuality;
731
732 } else {
733 // check bad status in DB
734 bad1 = (gain1 < 0) || chStatus1.isBad();
735
736 // Now checking the DQ status
737 if (!bad1 && m_notUpgradeCabling && DQstatus) {
738 bad1 = !(DQstatus->isAdcDQgood(ros1, drawer1, chan1, gain1))
739 || (dcsState ? dcsState->isStatusBad(ros1, drawer1, chan1) : false);
740 }
741 }
742
743 if (hash2 == TileHWID::NOT_VALID_HASH) {
744 // gap/crack scintillators with one PMT per cell
745
746 if (bad1) {
747 // only one channel in this cell and it is bad
748 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
749
750 if (gain1 == CaloGain::INVALIDGAIN) {
751 pCell->setEnergy(m_zeroEnergy, 0.0, TileID::LOWGAIN, CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
752 } else {
753 pCell->setEnergy(m_zeroEnergy, 0.0); // reset energy completely without changing gain
754 }
755 pCell->setTime(0.0); // reset time completely
756 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit1() & TileCell::MASK_ALGO)), 0); // reset quality flag for first pmt
757 pCell->setQuality(0, TileCell::MASK_BADCH, 1); // reset quality flag for second pmt
758
759 return true;
760
761 } else if (chStatus1.isBadTiming()) {
762 pCell->setTime(0.0); // channel with bad timing - no cell time
763 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
764 pCell->setQuality(pCell->qual1(), qbit1, 0); // update qbits for first pmt
765 }
766
767 } else { //cell has both PMTs
768
769 int gain2 = pCell->gain2();
770
771 HWIdentifier ch_id2 = m_tileHWID->channel_id(hash2);
772
773 int ros2 = m_tileHWID->ros(ch_id2);
774 int drawer2 = m_tileHWID->drawer(ch_id2);
775 int chan2 = m_tileHWID->channel(ch_id2);
776
777 HWIdentifier adc_id2 = m_tileHWID->adc_id(ros2, drawer2, chan2, ((gain2 < 0) ? 1 : gain2));
778 const TileBchStatus& chStatus2 = badChannels->getAdcStatus(adc_id2);
779
780 // check quality first
781 bool bad2 = ((int) pCell->qual2() > m_qualityCut);
782 if (bad2) {
783 ++drawerEvtStatus[ros2][drawer2].nBadQuality;
784
785 } else {
786 // check bad status in DB
787 bad2 = (gain2 < 0) || chStatus2.isBad();
788
789 // Now checking the DQ status
790 if (!bad2 && m_notUpgradeCabling && DQstatus) {
791 bad2 = !(DQstatus->isAdcDQgood(ros2, drawer2, chan2, gain2))
792 || (dcsState ? dcsState->isStatusBad(ros2, drawer2, chan2) : false);
793 }
794 }
795
796 single_PMT_C10 = (((ros2 == TileHWID::EXTBAR_POS && chan1 == 4)
797 || (ros2 == TileHWID::EXTBAR_NEG && chan2 == 4))
798 && !m_cabling->C10_connected(drawer2));
799 if (single_PMT_C10) {
800 // for special C10 disconnected channel might be masked in DB
801 // and energy of good channel is taken twice with correct weight
802 // but if this channel is not masked in DB - set its bad status
803 // equal to bad status of real channel, so that cell is masked correctly
804 // if real channel connected to a cell is bad
805#ifdef ALLOW_DEBUG_COUT
806 static int cnt=0;
807 if (++cnt < 17) {
808 std::cout << "special C10 in " << ((ros2==TileHWID::EXTBAR_POS) ? "EBA" : "EBC")
809 << drawer2+1 << " status " << chan1 << "/" << chan2 << " "
810 << (chStatus1.isBad()?"bad":"good") << "/"
811 << (chStatus2.isBad()?"bad":"good") << "/"
812 << ((m_run2plus)?" RUN2+ cabling": "RUN1 cabling")
813 << std::endl;
814 }
815#endif
816 if (chan1 == 4) {
817 if (m_run2plus || !chStatus1.isBad()) {
818#ifdef ALLOW_DEBUG_COUT
819 if (cnt < 17) {
820 std::cout << "Ene of chan1 was " << pCell->ene1() << " changing to half of " << pCell->ene2()
821 << " and setting bad1=true" << std::endl;
822 }
823#endif
824 pCell->setEnergy(pCell->ene2()/2., pCell->ene2()/2., gain2, gain2);
825 //bad1 = bad2;
826 bad1 = true;
827 --drawerEvtStatus[ros1][drawer1].nMaskedChannels; // since it's fake masking, decrease counter by 1 in advance
828 }
829 } else {
830 if (m_run2plus || !chStatus2.isBad()) {
831#ifdef ALLOW_DEBUG_COUT
832 if (cnt < 17) {
833 std::cout << "Ene of chan2 was " << pCell->ene2() << " changing to half of " << pCell->ene1()
834 << " and setting bad2=true" << std::endl;
835 }
836#endif
837 pCell->setEnergy(pCell->ene1()/2., pCell->ene1()/2., gain1, gain1);
838 //bad2 = bad1;
839 bad2 = true;
840 --drawerEvtStatus[ros2][drawer2].nMaskedChannels; // since it's fake masking, decrease counter by 1 in advance
841 }
842 }
843 }
844 if (bad1 && bad2) {
845 // both channels are bad
846 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
847 ++drawerEvtStatus[ros2][drawer2].nMaskedChannels;
848
849 if (gain1 == CaloGain::INVALIDGAIN || gain2 == CaloGain::INVALIDGAIN) {
850 if (gain1 == CaloGain::INVALIDGAIN) gain1 = 0; // this is TileID::LOWGAIN; - commented out to make Coverity happy
851 if (gain2 == CaloGain::INVALIDGAIN) gain2 = 0; // this is TileID::LOWGAIN; - commented out to make Coverity happy
852 pCell->setEnergy(m_zeroEnergy, m_zeroEnergy, gain1, gain2); // reset energy completely, indicate problem putting low gain
853 } else {
854 pCell->setEnergy(m_zeroEnergy, m_zeroEnergy); // reset energy completely without changing gain
855 }
856 pCell->setTime(0.0); // reset time completely
857 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit1() & TileCell::MASK_ALGO)), 0); // reset quality flag for first pmt
858 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit2() & TileCell::MASK_ALGO)), 1); // reset quality flag for second pmt
859
860 return true;
861
862 } else if (bad1 && !bad2) {
863 // first channel is bad
864 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
865
866 float ene2 = pCell->ene2();
867 pCell->setEnergy(ene2, ene2, gain2, gain2); // use energy/gain from second pmt for both pmts
868
869 uint8_t qualCorrection = (gain1 != CaloGain::INVALIDGAIN) ? (gain1 - gain2) : 0;
870 uint8_t qual2 = pCell->qual2();
871 uint8_t qual1 = qual2 + qualCorrection; // if gains are different, qua11 and qual2 will be different
872 if (qual1 > m_qualityCut && gain1 > gain2) qual1 = qual2 - qualCorrection; // new feature in release 17.2
873
874 if (chStatus2.isBadTiming()) {
875 pCell->setTime(0.0); // time in second pmt is bad - no cell time
876 uint8_t qbit2 = pCell->qbit2() & (~(TileCell::MASK_TIME)); // clear time bit for second pmt
877 uint8_t qbit1 = qbit2 | TileCell::MASK_BADCH; // set bad channel bit for first pmt
878 pCell->setQuality(qual1, qbit1, 0); // change quality and qbits for first pmt
879 pCell->setQuality(qual2, qbit2, 1); // update qbits for second pmt
880 } else {
881 pCell->setTime(pCell->time2()); // use time from second pmt as cell time
882 pCell->setQuality(qual1, (pCell->qbit2() | TileCell::MASK_BADCH), 0); // change quality flag for first pmt
883 }
884
885 return true;
886
887 } else if (!bad1 && bad2) {
888 // second channel is bad
889 ++drawerEvtStatus[ros2][drawer2].nMaskedChannels;
890
891 float ene1 = pCell->ene1();
892 pCell->setEnergy(ene1, ene1, gain1, gain1); // use energy/gain from first pmt for both pmts
893
894 uint8_t qualCorrection = (gain2 != CaloGain::INVALIDGAIN) ? (gain2 - gain1) : 0;
895 uint8_t qual1 = pCell->qual1();
896 uint8_t qual2 = qual1 + qualCorrection; // if gains are different, qua11 and qual2 will be different
897 if (qual2 > m_qualityCut && gain2 > gain1) qual2 = qual1 - qualCorrection; // new feature in release 17.2
898
899 if (chStatus1.isBadTiming()) {
900 pCell->setTime(0.0); // time in first pmt is bad - no cell time
901 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
902 uint8_t qbit2 = qbit1 | TileCell::MASK_BADCH; // set bad channel bit for second pmt
903 pCell->setQuality(qual1, qbit1, 0); // update qbits for first pmt
904 pCell->setQuality(qual2, qbit2, 1); // change quality and qbits for second pmt
905 } else {
906 pCell->setTime(pCell->time1()); // use time from first pmt as cell time
907 pCell->setQuality(qual2, (pCell->qbit1() | TileCell::MASK_BADCH), 1); // change quality flag for second pmt
908 }
909
910 return true;
911
912 } else {
913
914 if (chStatus1.isBadTiming()) {
915
916 if (chStatus2.isBadTiming()) {
917 pCell->setTime(0.0); // time in both pmts is bad - no cell time
918 uint8_t qbit2 = pCell->qbit2() & (~(TileCell::MASK_TIME)); // clear time bit for second pmt
919 pCell->setQuality(pCell->qual2(), qbit2, 1); // update qbits for second pmt
920 } else {
921 pCell->setTime(pCell->time2()); // use time from second pmt as cell time
922 }
923 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
924 pCell->setQuality(pCell->qual1(), qbit1, 0); // update qbits for first pmt
925
926 } else if (chStatus2.isBadTiming()) {
927
928 pCell->setTime(pCell->time1()); // use time from first pmt as cell time
929 uint8_t qbit2 = pCell->qbit2() & (~(TileCell::MASK_TIME)); // clear time bit for second pmt
930 pCell->setQuality(pCell->qual2(), qbit2, 1); // update qbits for second pmt
931 }
932 }
933
934 }
935
936 return single_PMT_C10;
937}
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
IdentifierHash onl1() const
cell online identifier 1
Gaudi::Property< float > m_zeroEnergy
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 172 of file TileCellBuilder.cxx.

174{
175 //**
176 //* Get TileRawChannels
177 //**
178
179 TileDrawerEvtStatusArray drawerEvtStatus;
180
181 SG::ReadHandle<TileRawChannelContainer> rawChannelContainer(m_rawChannelContainerKey, ctx);
182
183 if (!rawChannelContainer.isValid()) {
184 ATH_MSG_WARNING( " Could not find container " << m_rawChannelContainerKey.key() );
185 ATH_MSG_WARNING( " do not fill CaloCellContainer " );
186
187 } else {
188
189 ATH_MSG_DEBUG( "Container " << m_rawChannelContainerKey.key() << " with TileRawChannels found ");
190
191 // We use a data pool, so the container must be VIEW_ELEMENTS.
192 if (theCellContainer->ownPolicy() != SG::VIEW_ELEMENTS) {
193 if (!theCellContainer->empty()) {
194 ATH_MSG_ERROR("Non-empty owning cell container.");
195 return StatusCode::FAILURE;
196 }
197 theCellContainer->clear (SG::VIEW_ELEMENTS);
198 }
199
200
202 params.m_RChType = rawChannelContainer->get_type();
203 params.m_RChUnit = rawChannelContainer->get_unit();
204 params.m_correctAmplitude = m_correctAmplitude;
205 params.m_correctTime = m_correctTime;
206 params.m_of2 = m_of2;
207 unsigned int bsflags = rawChannelContainer->get_bsflags();
208 if (params.m_correctAmplitude || params.m_correctTime) {
209 int DataType = (bsflags & 0x30000000) >> 28;
210 if (DataType < 3) { // real data
211 bool of2 = ((bsflags & 0x4000000) != 0);
212 if (of2 != params.m_of2) {
213 params.m_of2 = of2;
214 ATH_MSG_WARNING( "OF2 flag in data is " << ((params.m_of2)?"True":"False"));
215 }
216 params.m_maxTimeCorr = 63.9375; // 64-1/16 ns is hard limit in DSP
217 if (params.m_correctAmplitude && ((bsflags & 0x3000000) != 0)) {
218 ATH_MSG_WARNING( "Using results of Opt filter with interations from DSP, disabling amplitude correction" );
219 params.m_correctAmplitude = false;
220 }
221 if (params.m_correctTime && ((bsflags & 0x3000000) == 0)) {
222 ATH_MSG_WARNING( "Using results of Opt filter without interations from DSP, disabling time correction" );
223 params.m_correctTime = false;
224 }
225 } else {
226 params.m_maxTimeCorr = ((bsflags >> 27) & 1) ? 100.0 : 75.0; // 100 or 75 ns is the limit for 9 or 7 samples
227 if (params.m_correctAmplitude && ((bsflags & 0x6000) != 0)) {
228 ATH_MSG_WARNING( "Amplitude correction was done already in optimal filter, disabling it here" );
229 params.m_correctAmplitude = false;
230 }
231 if (params.m_correctTime && ((bsflags & 0x9000) != 0)) {
232 ATH_MSG_WARNING( "Time correction was done already in optimal filter or best phase is used, disabling it here" );
233 params.m_correctTime = false;
234 }
235 }
236 }
237
238 std::unique_ptr<TileCellContainer> MBTSCells;
239 if (!m_MBTSContainerKey.key().empty()) {
240 MBTSCells = std::make_unique<TileCellContainer>(SG::VIEW_ELEMENTS);
241 }
242
243 std::unique_ptr<TileCellContainer> E4prCells;
244 if (!m_E4prContainerKey.key().empty()) {
245 E4prCells = std::make_unique<TileCellContainer>(SG::VIEW_ELEMENTS);
246 }
247
249 SelectAllObject<TileRawChannelContainer>::const_iterator begin = selAll.begin();
250 SelectAllObject<TileRawChannelContainer>::const_iterator end = selAll.end();
251
254 && !m_dspRawChannelContainerKey.key().empty()) {
255
256 ATH_MSG_DEBUG( "Merging " << m_rawChannelContainerKey.key()
257 << " and " << m_dspRawChannelContainerKey.key() );
258
259 SG::ReadHandle<TileRawChannelContainer> dspRawChannelContainer(m_dspRawChannelContainerKey, ctx);
260
261 if (!dspRawChannelContainer.isValid()) {
262 // no DSP channels, build cells from primary container
263 ATH_MSG_DEBUG( " No " << m_dspRawChannelContainerKey.key() << " found, nothing to merge " );
264
265 } else {
266
267 const TileRawChannelContainer* dspContainer = dspRawChannelContainer.cptr();
268 std::unique_ptr<TileMutableRawChannelContainer> copiedDspContainer;
269
270 if (m_noiseFilterTools.size() > 0) {
271 ATH_MSG_DEBUG( " Running noise filter on " << m_dspRawChannelContainerKey.key()
272 << " (i.e. on second container only) " );
273
274 // apply noise filter on dsp container before merging it with offline container
275 copiedDspContainer = std::make_unique<TileMutableRawChannelContainer> (*dspContainer);
276 ATH_CHECK( copiedDspContainer->status() );
277 dspContainer = copiedDspContainer.get();
278
279 for (const ToolHandle<ITileRawChannelTool>& noiseFilterTool : m_noiseFilterTools) {
280 ATH_CHECK( noiseFilterTool->process(*copiedDspContainer, ctx) );
281 }
282 }
283
284 TileFragHash::TYPE dspType = dspContainer->get_type();
285 TileRawChannelUnit::UNIT dspUnit = dspContainer->get_unit();
286 unsigned int dspFlags = dspContainer->get_bsflags();
287 int DataType = (dspFlags & 0x30000000) >> 28;
288 float dspTimeCut = params.m_maxTimeCorr;
289 bool dspCorrectAmplitude = false, dspCorrectTime = false, dspOf2 = true;
290 if (DataType < 3) { // real data
291 dspOf2 = ((dspFlags & 0x4000000) != 0);
292 if (dspOf2 != params.m_of2) ATH_MSG_DEBUG( "OF2 flag in DSPcontainer is " << ((dspOf2)?"True":"False"));
293 dspTimeCut = 63.9375; // 64-1/16 ns is hard limit in DSP
294 dspCorrectAmplitude = ((dspFlags & 0x3000000) == 0);
295 dspCorrectTime = ((dspFlags & 0x3000000) != 0);
296 } else { // dsp container contains results of offline reco
297 dspTimeCut = ((dspFlags >> 27) & 1) ? 100.0 : 75.0; // 100 or 75 ns is the limit for 9 or 7 samples
298 }
299
300 SelectAllObject<TileRawChannelContainer> selAllDsp(dspContainer);
301 SelectAllObject<TileRawChannelContainer>::const_iterator beginDsp = selAllDsp.begin();
302 SelectAllObject<TileRawChannelContainer>::const_iterator endDsp = selAllDsp.end();
303
304 std::vector<const TileRawChannel *> oflVec;
305 std::vector<const TileRawChannel *> dspVec;
306
307 SelectAllObject<TileRawChannelContainer>::const_iterator oflItr = begin;
308 SelectAllObject<TileRawChannelContainer>::const_iterator dspItr = beginDsp;
309
310 if (oflItr != end) {
311 const TileRawChannel *p1 = (*oflItr);
312 HWIdentifier id1 = p1->adc_HWID();
313
314 for (; dspItr != endDsp; ++dspItr) {
315
316 const TileRawChannel *p2 = (*dspItr);
317 HWIdentifier id2 = p2->adc_HWID();
318
319 if (id2 < id1) {
320 dspVec.push_back(p2);
321 } else if (id2 == id1) {
322 oflVec.push_back(p1);
323 ++oflItr;
324 if (oflItr != end) {
325 p1 = (*oflItr);
326 id1 = p1->adc_HWID();
327 } else {
328 ++dspItr;
329 break;
330 }
331 } else {
332 while (id2 >= id1) {
333 oflVec.push_back(p1);
334 ++oflItr;
335 if (oflItr != end) {
336 p1 = (*oflItr);
337 bool id2gtid1 = (id2 > id1);
338 id1 = p1->adc_HWID();
339 if (id2gtid1 && (id2 < id1)) {
340 dspVec.push_back(p2); // id2 is in the gap between old and new id1 - keep it
341 }
342 } else {
343 if (id2 == id1) ++dspItr;
344 break;
345 }
346 }
347 if (id2 >= id1) break;
348 }
349 }
350 // copy all remaining channels
351 for (; oflItr != end; ++oflItr) {
352 oflVec.push_back(*oflItr);
353 }
354 }
355 for (; dspItr != endDsp; ++dspItr) {
356 dspVec.push_back(*dspItr);
357 }
358
359 VecParams params1 = params;
360 VecParams params2;
361 params2.m_RChType = dspType;
362 params2.m_RChUnit = dspUnit;
363 params2.m_maxTimeCorr = dspTimeCut;
364 params2.m_correctAmplitude = dspCorrectAmplitude;
365 params2.m_correctTime = dspCorrectTime;
366 params2.m_of2 = dspOf2;
367
368 // build here with special iterator over 2 vectors
369 DoubleVectorIterator<std::vector<const TileRawChannel *>, const TileRawChannel *> vecBeg(
370 params,
371 &oflVec, params1,
372 &dspVec, params2, 0);
373 DoubleVectorIterator<std::vector<const TileRawChannel *>, const TileRawChannel *> vecEnd(
374 params,
375 &oflVec, params1,
376 &dspVec, params2, 2);
377
378 ATH_MSG_DEBUG("Build raw channels from two vectors:"
379 << " offline vector size = " << oflVec.size()
380 << ", dsp vector size = " << dspVec.size() );
381
382 build (ctx, drawerEvtStatus, params, vecBeg, vecEnd, theCellContainer,
383 MBTSCells.get(), E4prCells.get());
384 begin = end;
385 }
386
387 }
388
389 if (begin != end) { // no merging applied, use original raw channel container
390
391 std::unique_ptr<TileMutableRawChannelContainer> copiedContainer;
392 std::unique_ptr<SelectAllObject<TileRawChannelContainer> > selCopied;
393
394 if (m_noiseFilterTools.size() > 0) {
395 ATH_MSG_DEBUG( " Running noise filter on " << m_rawChannelContainerKey.key() );
396 // apply noise filter on input container before sending it to the build() method
397 copiedContainer = std::make_unique<TileMutableRawChannelContainer> (*rawChannelContainer);
398 ATH_CHECK( copiedContainer->status() );
399
400 for (const ToolHandle<ITileRawChannelTool>& noiseFilterTool : m_noiseFilterTools)
401 {
402 ATH_CHECK( noiseFilterTool->process(*copiedContainer, ctx) );
403 }
404
405 selCopied = std::make_unique<SelectAllObject<TileRawChannelContainer> > (copiedContainer.get());
406 begin = selCopied->begin();
407 end = selCopied->end();
408 }
409
410 ATH_MSG_DEBUG( " Calling build() method for rawChannels from " << m_rawChannelContainerKey.key() );
411 build (ctx, drawerEvtStatus, params, begin, end, theCellContainer,
412 MBTSCells.get(), E4prCells.get());
413 }
414
415 if (!m_MBTSContainerKey.key().empty()) {
416 SG::WriteHandle<TileCellContainer> MBTSContainer(m_MBTSContainerKey, ctx);
417 ATH_CHECK( MBTSContainer.record(std::move(MBTSCells)) );
418 }
419
420 if (!m_E4prContainerKey.key().empty()) {
421 SG::WriteHandle<TileCellContainer> E4prContainer(m_E4prContainerKey, ctx);
422 ATH_CHECK( E4prContainer.record(std::move(E4prCells)) );
423 }
424
426
427 //specify that a given calorimeter has been filled
428 theCellContainer->setHasCalo(caloNum);
429 }
430
431 //enum EventFlagErrorState { NotSet, Warning, Error };
433 // flag will contain status of a given event
434 // every 4 bits - status of partitions LBA,LBC,EBA,EBC
435 // bits 0-3 - there is a signal above threshold in partitions
436 // bits 4-7 - there are channels with underflow (sample=0) in partition (since rel 17.2.6.4)
437 // bits 8-11 - there are channels with overflow (sample=m_tileInfo->ADCmax()) in partition (since rel 17.2.6.4)
438 // bits 12-15 - there are at least 16 drawers with bad quality in partition
439 // bits 16-19 - maximal length of consecutive bad area (since rel 17.2.6.5)
440 // bits 20-23 - there are at least 16 drawers which are completely masked in partition
441 // bits 24-27 - there are at least 16 drawers which do not send data in partition
442 // bits 28-31 - reserved for global good/warning/bad status
443 // bits 20-27 are also used for module number which gives warning status (since release 17.2.6.5)
444 // in case of warning we are sure that bits which indicates error are not filled
445 unsigned int flag = 0;
446
447 int drConsecMaxMax = 0;
448 int drConsecNum = 0;
449
450 for (int p = 1; p < 5; ++p) {
451 TileDrawerEvtStatus * evt = drawerEvtStatus[p];
452 //TileDrawerRunStatus * run = m_drawerRunStatus[p];
453 int drAbsent = 0;
454 int drMasked = 0;
455 int drConsec = 0;
456 int drConsecMax = 0;
457 int hasBadQ = 0;
458 int hasOver = 0;
459 int hasUnder = 0;
460 int hasSig = 0;
461 for (int d = 0; d < 64; ++d) {
462 if (evt[d].nChannels == 0) {
463 ++drConsec;
464 ++drAbsent;
465 //++(run[d].drawerAbsent);
466 } else if (evt[d].nMaskedChannels >= evt[d].nChannels) {
467 ++drConsec;
468 ++drMasked;
469 //++(run[d].drawerMasked);
470 } else {
471 if (drConsec > drConsecMax) {
472 drConsecMax = drConsec;
473 if (drConsecMax > drConsecMaxMax) {
474 drConsecMaxMax = drConsecMax;
475 drConsecNum = ((p - 1) << 6) | (d - drConsec);
476 }
477 }
478 drConsec = 0;
479 if (evt[d].nMaskedChannels > 0) {
480 //++(run[d].channelsMasked);
481 }
482 if (evt[d].nBadQuality) ++hasBadQ;
483 if (evt[d].nOverflow) ++hasOver;
484 if (evt[d].nUnderflow) ++hasUnder;
485 if (evt[d].nSomeSignal) ++hasSig;
486 }
487 }
488 if (drConsec != 0 && drConsecMax < 64) { // 64th drawer is bad - check transition from 64th to 1st drawer
489 for (int d = 0; d < drConsecMax; ++d) {
490 if (evt[d].nChannels == 0 || evt[d].nMaskedChannels >= evt[d].nChannels) {
491 ++drConsec;
492 } else {
493 break;
494 }
495 }
496 if (drConsec > drConsecMax) {
497 drConsecMax = drConsec;
498 }
499 }
500 unsigned int fl = 0;
501 if (drAbsent > 15) {
502 fl |= 0x01000000;
504 }
505 if (drMasked > 15) {
506 fl |= 0x00100000;
508 }
509 //if (drConsecMax > 1)fl |= 0x00010000; // want to use these bits for length of consecutive area
510 if (hasBadQ > 15) fl |= 0x00001000;
511 if (hasOver) fl |= 0x00000100;
512 if (hasUnder) fl |= 0x00000010;
513 if (hasSig) fl |= 0x00000001;
514
515#ifdef ALLOW_DEBUG_COUT
516 std::cout<<"partition "<<p<<" drAbsent "<<drAbsent<<" drMasked "<<drMasked<<" drConsec "<<drConsecMax
517 <<" hasBadQ "<<hasBadQ<<" hasOver "<<hasOver<<" hasUnder "<<hasUnder<<" hasSig "<<hasSig<<std::endl;
518#endif
519 flag |= fl << (p - 1);
520 }
521
522 // number of consecutively masked modules (if it's > 15 we have error already set)
523 flag |= (std::min(15, drConsecMaxMax) << 16);
524
525 if (drConsecMaxMax > 1 && error < xAOD::EventInfo::Warning) {
526 // setting warning flag
528 // putting starting module number of consecutive bad area
529 // instead of bits which indicates 16 masked or 16 absent modules in partition
530 flag |= (drConsecNum << 20);
531#ifdef ALLOW_DEBUG_COUT
532 std::cout<<"warning in partition " << (drConsecNum>>6)+1 << " for modules "
533 <<(drConsecNum)%64 <<" - " <<(drConsecNum+drConsecMaxMax-1)%64 <<std::endl;
534#endif
535 }
536
537#ifdef ALLOW_DEBUG_COUT
538 std::cout<<"partition flag 0x0"<<std::hex<<flag<<std::dec<<" error "<<error<<std::endl;
539#endif
540
541 //++m_eventErrorCounter[error]; // error index is 0 or 1 or 2 here
542 //++m_eventErrorCounter[3]; // count separately total number of events
543
544
545 // retrieve EventInfo
546 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey, ctx);
547
548 if (eventInfo.isValid()) {
549
550 if (flag != 0) {
551 ATH_MSG_DEBUG( " set eventInfo for Tile for this event to 0x" << MSG::hex << flag << MSG::dec );
552 if (!eventInfo->updateEventFlags(xAOD::EventInfo::Tile, flag)) {
553 ATH_MSG_WARNING( " cannot set eventInfo for Tile " );
554 }
555 }
556
557 if (error != xAOD::EventInfo::NotSet) {
558 ATH_MSG_DEBUG( " set error bits for Tile for this event to " << error );
559 if (!eventInfo->updateErrorState(xAOD::EventInfo::Tile, error)) {
560 ATH_MSG_WARNING( " cannot set error state for Tile " );
561 }
562 }
563
564 }
565 else {
566 ATH_MSG_WARNING( " cannot retrieve EventInfo, will not set Tile information " );
567 }
568
569 // Execution completed.
570 ATH_MSG_DEBUG( "TileCellBuilder execution completed." );
571
572 return StatusCode::SUCCESS;
573}
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
Gaudi::Property< bool > m_correctTime
Gaudi::Property< bool > m_correctAmplitude
Gaudi::Property< bool > m_of2
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
TileFragHash::TYPE get_type() const
TileRawChannelUnit::UNIT get_unit() const
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 609 of file TileCellBuilder.cxx.

619{
620 ++drawerEvtStatus[ros][drawer].nChannels;
621 // new feature in rel 17.2.7 - count underflows and overflows
622 if (count_over) {
623 if (overflow) ++drawerEvtStatus[ros][drawer].nOverflow;
624 if (underflow) ++drawerEvtStatus[ros][drawer].nUnderflow;
625 }
626#ifdef ALLOW_DEBUG_COUT
627 if (overflow) std::cout << "channel with overflow " << ((count_over)?"":"MBTS") << std::endl;
628 if (underflow) std::cout << "channel with underflow " << ((count_over)?"":"MBTS") << std::endl;
629 if (overfit) std::cout << "channel with corrected overflow " << ((count_over)?"":"MBTS") << std::endl;
630#endif
631
632 unsigned char qbit = (overfit) ? (TileFragHash::FitFilter & TileCell::MASK_ALGO)
633 : (RChType & TileCell::MASK_ALGO);
634 if (good_time) qbit |= TileCell::MASK_TIME;
635 if (overflow || underflow) qbit |= TileCell::MASK_OVER;
636
637 if (good_ener) {
638 qbit |= TileCell::MASK_AMPL;
639 if (count_over) {
640 ++drawerEvtStatus[ros][drawer].nSomeSignal;
641 }
642 }
643
644 return qbit;
645}
@ 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 136 of file TileCellBuilder.cxx.

136 {
137
138 if (printReset) ATH_MSG_INFO( "Resetting options in " << name() );
139
140 // check if any threshold was set in jobOptions
141 m_thresholdNotSet = ((fabs(m_eThreshold + 100000.) < 1)
142 && (fabs(m_maxTimeDiff - 100000.) < 1)
143 && (fabs(m_maxTime - 100000.) < 1)
144 && (fabs(m_minTime + 100000.) < 1)
145 && (fabs(m_maxChi2 - 100000.) < 1)
146 && (fabs(m_minChi2 + 100000.) < 1));
147
148 if (m_thresholdNotSet) {
149 ATH_MSG_INFO( "none of thresholds set, all RawChannels will be converted to Cells");
150 } else {
151 ATH_MSG_INFO( "Ene threshold " << m_eThreshold.value() << " MeV" );
152 ATH_MSG_INFO( "max time diff " << m_maxTimeDiff.value() << " ns" );
153 ATH_MSG_INFO( "max time thr " << m_maxTime.value() << " ns" );
154 ATH_MSG_INFO( "min time thr " << m_minTime.value() << " ns" );
155 ATH_MSG_INFO( "max qual thr " << m_maxChi2.value() );
156 ATH_MSG_INFO( "min qual thr " << m_minChi2.value() );
157 }
158
159 // prepare empty vector for all cell pointers
160 m_fullSizeCont = true;
161
162 ATH_MSG_INFO( "taking RawChannels from '" << m_rawChannelContainerKey.key() << "'" );
163}
Gaudi::Property< bool > m_fullSizeCont

◆ TileHid2RESrcID

friend class TileHid2RESrcID
friend

Definition at line 131 of file TileCellBuilder.h.

Member Data Documentation

◆ m_ADCmaskValueMinusEps

float TileCellBuilder::m_ADCmaskValueMinusEps {0.f}
private

Definition at line 424 of file TileCellBuilder.h.

424{0.f};

◆ m_ADCmaskValuePlusEps

float TileCellBuilder::m_ADCmaskValuePlusEps {0.f}
private

Definition at line 425 of file TileCellBuilder.h.

425{0.f};

◆ m_affectedRegionInfo_current_run

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

Definition at line 274 of file TileCellBuilder.h.

◆ m_affectedRegionInfo_global

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

Definition at line 273 of file TileCellBuilder.h.

◆ m_ampMinThresh

Gaudi::Property<float> TileCellBuilder::m_ampMinThresh
private
Initial value:
{this, "AmpMinForAmpCorrection", 15.0,
"Correct amplitude if it's above amplitude threshold (in ADC counts)"}

Definition at line 194 of file TileCellBuilder.h.

194 {this, "AmpMinForAmpCorrection", 15.0,
195 "Correct amplitude if it's above amplitude threshold (in ADC counts)"};

◆ 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 236 of file TileCellBuilder.h.

236 {this,
237 "TileBadChannels", "TileBadChannels", "Input Tile bad channel status"};

◆ m_cabling

const TileCablingService* TileCellBuilder::m_cabling {nullptr}
private

TileCabling instance.

Definition at line 231 of file TileCellBuilder.h.

231{nullptr};

◆ 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 260 of file TileCellBuilder.h.

260 { this,
261 "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};

◆ m_checkDCS

Gaudi::Property<bool> TileCellBuilder::m_checkDCS {this, "CheckDCS", false, "Check DCS state"}
private

Definition at line 226 of file TileCellBuilder.h.

226{this, "CheckDCS", false, "Check DCS state"};

◆ m_correctAmplitude

Gaudi::Property<bool> TileCellBuilder::m_correctAmplitude
private
Initial value:
{this, "correctAmplitude", false,
"If true, amplitude is corrected by parabolic function (needed for OF without iterations)"}

Definition at line 186 of file TileCellBuilder.h.

186 {this, "correctAmplitude", false,
187 "If true, amplitude is corrected by parabolic function (needed for OF without iterations)"};

◆ m_correctTime

Gaudi::Property<bool> TileCellBuilder::m_correctTime
private
Initial value:
{this, "correctTime", false,
"Should time be corrected (deltat added from CondDB)"}

Definition at line 184 of file TileCellBuilder.h.

184 {this, "correctTime", false,
185 "Should time be corrected (deltat added from CondDB)"};

◆ 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 254 of file TileCellBuilder.h.

254 {this,
255 "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 151 of file TileCellBuilder.h.

151 {this, "TileDQstatus",
152 "TileDQstatus",
153 "TileDQstatus key"};

◆ m_dspRawChannelContainer

std::string TileCellBuilder::m_dspRawChannelContainer
private

Definition at line 168 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 141 of file TileCellBuilder.h.

141 {this, "TileDSPRawChannelContainer",
142 "TileRawChannelCnt",
143 "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 159 of file TileCellBuilder.h.

159 {this, "E4prContainer",
160 "E4prContainer",
161 "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 242 of file TileCellBuilder.h.

242 {this,
243 "TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"};

◆ m_eneForTimeCut

Gaudi::Property<float> TileCellBuilder::m_eneForTimeCut
private
Initial value:
{this, "EneForTimeCut", 35. * CLHEP::MeV,
"Keep time for channels with energy above cut"}

Definition at line 171 of file TileCellBuilder.h.

171 {this, "EneForTimeCut", 35. * CLHEP::MeV,
172 "Keep time for channels with energy above cut"};

◆ m_eneForTimeCutMBTS

Gaudi::Property<float> TileCellBuilder::m_eneForTimeCutMBTS
private
Initial value:
{this, "EneForTimeCutMBTS", 0.03675,
"Similar cut for MBTS in pC"}

Definition at line 174 of file TileCellBuilder.h.

174 {this, "EneForTimeCutMBTS", 0.03675,
175 "Similar cut for MBTS in pC"};

◆ m_eThreshold

Gaudi::Property<float> TileCellBuilder::m_eThreshold
private
Initial value:
{this, "EThreshold", -100000.,
"Cell energy threshold (in MeV) to consider the cell"}

Definition at line 208 of file TileCellBuilder.h.

208 {this, "EThreshold", -100000.,
209 "Cell energy threshold (in MeV) to consider the cell"};

◆ m_eventInfoKey

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

Definition at line 145 of file TileCellBuilder.h.

145 {this, "EventInfo",
146 "EventInfo",
147 "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 163 of file TileCellBuilder.h.

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

◆ m_fakeCrackCells

Gaudi::Property<bool> TileCellBuilder::m_fakeCrackCells
private
Initial value:
{this, "fakeCrackCells", false,
"Create fake E3/E4 crack scintillators with zero energy when they do not exist"}

Definition at line 220 of file TileCellBuilder.h.

220 {this, "fakeCrackCells", false,
221 "Create fake E3/E4 crack scintillators with zero energy when they do not exist"};

◆ m_fullSizeCont

Gaudi::Property<bool> TileCellBuilder::m_fullSizeCont {this, "fullSizeCont", true, "Use full size cell container"}
private

Definition at line 217 of file TileCellBuilder.h.

217{this, "fullSizeCont", true, "Use full size cell container"};

◆ m_infoName

Gaudi::Property<std::string> TileCellBuilder::m_infoName {this, "TileInfoName", "TileInfo", "Name of TileInfo object"}
private

Definition at line 422 of file TileCellBuilder.h.

422{this, "TileInfoName", "TileInfo", "Name of TileInfo object"};

◆ m_maskBadChannels

Gaudi::Property<bool> TileCellBuilder::m_maskBadChannels
private
Initial value:
{this, "maskBadChannels", true,
"Put zero energy in bad channels and recover from single-channel failure using second PMT in a cell"}

Definition at line 218 of file TileCellBuilder.h.

218 {this, "maskBadChannels", true,
219 "Put zero energy in bad channels and recover from single-channel failure using second PMT in a cell"};

◆ m_maxChi2

Gaudi::Property<float> TileCellBuilder::m_maxChi2 {this, "MaxChi2", 100000., "Maximum chi2 for the PMTs in the cells"}
private

Definition at line 214 of file TileCellBuilder.h.

214{this, "MaxChi2", 100000., "Maximum chi2 for the PMTs in the cells"};

◆ m_maxTime

Gaudi::Property<float> TileCellBuilder::m_maxTime {this, "MaxTime", 100000., "Maximum time for the PMTs in the cells"}
private

Definition at line 212 of file TileCellBuilder.h.

212{this, "MaxTime", 100000., "Maximum time for the PMTs in the cells"};

◆ m_maxTimeDiff

Gaudi::Property<float> TileCellBuilder::m_maxTimeDiff
private
Initial value:
{this, "MaxTimeDiff", 100000.,
"Maximum time difference between the PMTs in the cell"}

Definition at line 210 of file TileCellBuilder.h.

210 {this, "MaxTimeDiff", 100000.,
211 "Maximum time difference between the PMTs in the cell"};

◆ m_MBTSContainerKey

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

Definition at line 155 of file TileCellBuilder.h.

155 {this, "MBTSContainer",
156 "MBTSContainer",
157 "Output Tile MBTS container key"};

◆ m_mbtsMgr

const MbtsDetDescrManager* TileCellBuilder::m_mbtsMgr {nullptr}
private

Pointer to MbtsDetDescrManager.

Definition at line 264 of file TileCellBuilder.h.

264{nullptr};

◆ m_mergeChannels

Gaudi::Property<bool> TileCellBuilder::m_mergeChannels
private
Initial value:
{this, "mergeChannels", true,
"If true, missing raw channels are taken from DSP container"}

Definition at line 190 of file TileCellBuilder.h.

190 {this, "mergeChannels", true,
191 "If true, missing raw channels are taken from DSP container"};

◆ m_minChi2

Gaudi::Property<float> TileCellBuilder::m_minChi2 {this, "MinChi2", -100000., "Minimum chi2 for the PMTs in the cells"}
private

Definition at line 215 of file TileCellBuilder.h.

215{this, "MinChi2", -100000., "Minimum chi2 for the PMTs in the cells"};

◆ m_minEneChan

Gaudi::Property<float> TileCellBuilder::m_minEneChan
private
Initial value:
{this, "MinEnergyChan", -5000. * CLHEP::MeV,
"Normal channel energy threshold for masking"}

Definition at line 202 of file TileCellBuilder.h.

202 {this, "MinEnergyChan", -5000. * CLHEP::MeV,
203 "Normal channel energy threshold for masking"};

◆ m_minEneGap

Gaudi::Property<float> TileCellBuilder::m_minEneGap
private
Initial value:
{this, "MinEnergyGap", -10000. * CLHEP::MeV,
"Gap channel energy threshold for masking"}

Definition at line 204 of file TileCellBuilder.h.

204 {this, "MinEnergyGap", -10000. * CLHEP::MeV,
205 "Gap channel energy threshold for masking"};

◆ m_minEneMBTS

Gaudi::Property<float> TileCellBuilder::m_minEneMBTS
private
Initial value:
{this, "MinEnergyMBTS", -999999. * CLHEP::MeV,
"MBTS channel energy threshold for masking (not used currently)"}

Definition at line 206 of file TileCellBuilder.h.

206 {this, "MinEnergyMBTS", -999999. * CLHEP::MeV,
207 "MBTS channel energy threshold for masking (not used currently)"};

◆ m_minTime

Gaudi::Property<float> TileCellBuilder::m_minTime {this, "MinTime", -100000., "Minimum time for the PMTs in the cells"}
private

Definition at line 213 of file TileCellBuilder.h.

213{this, "MinTime", -100000., "Minimum time for the PMTs in the cells"};

◆ m_noiseFilterTools

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

Definition at line 248 of file TileCellBuilder.h.

248 {this,
249 "NoiseFilterTools", {}, "Tile noise filter tools"};

◆ m_notUpgradeCabling

bool TileCellBuilder::m_notUpgradeCabling {true}
private

Definition at line 418 of file TileCellBuilder.h.

418{true};

◆ m_of2

Gaudi::Property<bool> TileCellBuilder::m_of2
private
Initial value:
{this, "OF2", true,
"If true, assume OF2 method for amplitude correction, otherwise - OF1"}

Definition at line 188 of file TileCellBuilder.h.

188 {this, "OF2", true,
189 "If true, assume OF2 method for amplitude correction, otherwise - OF1"};

◆ m_qualityCut

Gaudi::Property<int> TileCellBuilder::m_qualityCut
private
Initial value:
{this, "QualityCut", 254,
"Cut on channel quality (set energy to m_zeroEnergy for them)"}

Definition at line 182 of file TileCellBuilder.h.

182 {this, "QualityCut", 254,
183 "Cut on channel quality (set energy to m_zeroEnergy for them)"};

◆ m_rawChannelContainerKey

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

Definition at line 137 of file TileCellBuilder.h.

137 {this, "TileRawChannelContainer",
138 "TileRawChannelCnt",
139 "Input Tile raw channel container key"};

◆ m_run2

bool TileCellBuilder::m_run2 {false}
private

Definition at line 419 of file TileCellBuilder.h.

419{false};

◆ m_run2plus

bool TileCellBuilder::m_run2plus {false}
private

Definition at line 426 of file TileCellBuilder.h.

426{false};

◆ m_skipGain

Gaudi::Property<int> TileCellBuilder::m_skipGain
private
Initial value:
{this, "SkipGain", -1,
"For two-gain calib runs skip one of two gains (never skip any gain by default)"}

Definition at line 222 of file TileCellBuilder.h.

222 {this, "SkipGain", -1,
223 "For two-gain calib runs skip one of two gains (never skip any gain by default)"};

◆ m_thresholdNotSet

bool TileCellBuilder::m_thresholdNotSet {true}
private

bool variable to check whether some threshold have been set

Definition at line 216 of file TileCellBuilder.h.

216{true};

◆ m_tileHWID

const TileHWID* TileCellBuilder::m_tileHWID {nullptr}
private

Pointer to TileHWID.

Definition at line 230 of file TileCellBuilder.h.

230{nullptr};

◆ m_tileID

const TileID* TileCellBuilder::m_tileID {nullptr}
private

Pointer to TileID.

Definition at line 228 of file TileCellBuilder.h.

228{nullptr};

◆ m_tileInfo

const TileInfo* TileCellBuilder::m_tileInfo {nullptr}
private

Definition at line 423 of file TileCellBuilder.h.

423{nullptr};

◆ m_tileMgr

const TileDetDescrManager* TileCellBuilder::m_tileMgr {nullptr}
private

Pointer to TileDetDescrManager.

Definition at line 263 of file TileCellBuilder.h.

263{nullptr};

◆ m_tileTBID

const TileTBID* TileCellBuilder::m_tileTBID {nullptr}
private

Pointer to TileTBID.

Definition at line 229 of file TileCellBuilder.h.

229{nullptr};

◆ m_tileToolTiming

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

Definition at line 245 of file TileCellBuilder.h.

245 {this,
246 "TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"};

◆ m_timeMaxThresh

Gaudi::Property<float> TileCellBuilder::m_timeMaxThresh
private
Initial value:
{this, "TimeMaxForAmpCorrection", 12.5,
"Correct amplitude if time is below time max threshold"}

Definition at line 198 of file TileCellBuilder.h.

198 {this, "TimeMaxForAmpCorrection", 12.5,
199 "Correct amplitude if time is below time max threshold"};

◆ m_timeMinThresh

Gaudi::Property<float> TileCellBuilder::m_timeMinThresh
private
Initial value:
{this, "TimeMinForAmpCorrection", -12.5,
"Correct amplitude if time is above time min threshold"}

Definition at line 196 of file TileCellBuilder.h.

196 {this, "TimeMinForAmpCorrection", -12.5,
197 "Correct amplitude if time is above time min threshold"};

◆ m_towerE1

int TileCellBuilder::m_towerE1 = E1_TOWER
private

Definition at line 417 of file TileCellBuilder.h.

◆ m_useDemoCabling

Gaudi::Property<int> TileCellBuilder::m_useDemoCabling
private
Initial value:
{this, "UseDemoCabling", 0,
"Use demonstrator cabling (if set to 2015 - assume TB 2015 cabling)"}

Definition at line 224 of file TileCellBuilder.h.

224 {this, "UseDemoCabling", 0,
225 "Use demonstrator cabling (if set to 2015 - assume TB 2015 cabling)"};

◆ m_zeroEnergy

Gaudi::Property<float> TileCellBuilder::m_zeroEnergy
private
Initial value:
{this, "BadChannelZeroEnergy", 0.5 * CLHEP::MeV,
"Energy to store in every PMT if both PMT are bad"}

Definition at line 179 of file TileCellBuilder.h.

179 {this, "BadChannelZeroEnergy", 0.5 * CLHEP::MeV,
180 "Energy to store in every PMT if both PMT are bad"};

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