|
ATLAS Offline Software
|
Go to the documentation of this file.
24 #include "CaloDetDescr/CaloDetDescrElement.h"
35 #include "CLHEP/Units/SystemOfUnits.h"
41 static const InterfaceID IID_ITileCellBuilder(
"TileCellBuilder", 1, 0);
44 return IID_ITileCellBuilder;
51 , m_eneForTimeCut(35. *
MeV)
52 , m_eneForTimeCutMBTS(0.03675)
54 , m_eThreshold(-100000.)
55 , m_maxTimeDiff(100000.)
60 , m_thresholdNotSet(true)
61 , m_fullSizeCont(true)
62 , m_maskBadChannels(true)
63 , m_fakeCrackCells(false)
70 , m_notUpgradeCabling(true)
75 declareInterface<TileCellBuilder>(
this );
132 declareProperty(
"OF2",
m_of2 =
true);
146 declareProperty(
"TileInfoName",
m_infoName =
"TileInfo");
148 declareProperty(
"CheckDCS",
m_checkDCS =
false);
171 ATH_MSG_WARNING(
"Unable to retrieve MbtsDetDescrManager from DetectorStore" );
226 ATH_MSG_INFO(
"TileCellBuilder initialization completed" );
233 return StatusCode::SUCCESS;
249 ATH_MSG_INFO(
"none of thresholds set, all RawChannels will be converted to Cells");
269 return StatusCode::SUCCESS;
273 const EventContext& ctx)
const
299 if (
params.m_correctAmplitude ||
params.m_correctTime) {
300 int DataType = (bsflags & 0x30000000) >> 28;
302 bool of2 = ((bsflags & 0x4000000) != 0);
303 if (of2 !=
params.m_of2) {
307 params.m_maxTimeCorr = 63.9375;
308 if (
params.m_correctAmplitude && ((bsflags & 0x3000000) != 0)) {
309 ATH_MSG_WARNING(
"Using results of Opt filter with interations from DSP, disabling amplitude correction" );
310 params.m_correctAmplitude =
false;
312 if (
params.m_correctTime && ((bsflags & 0x3000000) == 0)) {
313 ATH_MSG_WARNING(
"Using results of Opt filter without interations from DSP, disabling time correction" );
314 params.m_correctTime =
false;
317 params.m_maxTimeCorr = ((bsflags >> 27) & 1) ? 100.0 : 75.0;
318 if (
params.m_correctAmplitude && ((bsflags & 0x6000) != 0)) {
319 ATH_MSG_WARNING(
"Amplitude correction was done already in optimal filter, disabling it here" );
320 params.m_correctAmplitude =
false;
322 if (
params.m_correctTime && ((bsflags & 0x9000) != 0)) {
323 ATH_MSG_WARNING(
"Time correction was done already in optimal filter or best phase is used, disabling it here" );
324 params.m_correctTime =
false;
329 std::unique_ptr<TileCellContainer> MBTSCells;
334 std::unique_ptr<TileCellContainer> E4prCells;
352 if (!dspRawChannelContainer.
isValid()) {
359 std::unique_ptr<TileMutableRawChannelContainer> copiedDspContainer;
363 <<
" (i.e. on second container only) " );
366 copiedDspContainer = std::make_unique<TileMutableRawChannelContainer> (*dspContainer);
368 dspContainer = copiedDspContainer.get();
371 ATH_CHECK( noiseFilterTool->process(*copiedDspContainer, ctx) );
377 unsigned int dspFlags = dspContainer->
get_bsflags();
378 int DataType = (dspFlags & 0x30000000) >> 28;
379 float dspTimeCut =
params.m_maxTimeCorr;
380 bool dspCorrectAmplitude =
false, dspCorrectTime =
false, dspOf2 =
true;
382 dspOf2 = ((dspFlags & 0x4000000) != 0);
383 if (dspOf2 !=
params.m_of2)
ATH_MSG_DEBUG(
"OF2 flag in DSPcontainer is " << ((dspOf2)?
"True":
"False"));
384 dspTimeCut = 63.9375;
385 dspCorrectAmplitude = ((dspFlags & 0x3000000) == 0);
386 dspCorrectTime = ((dspFlags & 0x3000000) != 0);
388 dspTimeCut = ((dspFlags >> 27) & 1) ? 100.0 : 75.0;
395 std::vector<const TileRawChannel *> oflVec;
396 std::vector<const TileRawChannel *> dspVec;
405 for (; dspItr != endDsp; ++dspItr) {
411 dspVec.push_back(
p2);
412 }
else if (
id2 == id1) {
413 oflVec.push_back(
p1);
417 id1 =
p1->adc_HWID();
424 oflVec.push_back(
p1);
428 bool id2gtid1 = (
id2 > id1);
429 id1 =
p1->adc_HWID();
430 if (id2gtid1 && (
id2 < id1)) {
431 dspVec.push_back(
p2);
434 if (
id2 == id1) ++dspItr;
438 if (
id2 >= id1)
break;
442 for (; oflItr !=
end; ++oflItr) {
443 oflVec.push_back(*oflItr);
446 for (; dspItr != endDsp; ++dspItr) {
447 dspVec.push_back(*dspItr);
457 params2.
m_of2 = dspOf2;
463 &dspVec, params2, 0);
467 &dspVec, params2, 2);
470 <<
" offline vector size = " << oflVec.size()
471 <<
", dsp vector size = " << dspVec.size() );
473 build (ctx, drawerEvtStatus,
params, vecBeg, vecEnd, theCellContainer,
474 MBTSCells.get(), E4prCells.get());
482 std::unique_ptr<TileMutableRawChannelContainer> copiedContainer;
483 std::unique_ptr<SelectAllObject<TileRawChannelContainer> > selCopied;
493 ATH_CHECK( noiseFilterTool->process(*copiedContainer, ctx) );
496 selCopied = std::make_unique<SelectAllObject<TileRawChannelContainer> > (copiedContainer.get());
497 begin = selCopied->begin();
498 end = selCopied->end();
503 MBTSCells.get(), E4prCells.get());
536 unsigned int flag = 0;
538 int drConsecMaxMax = 0;
541 for (
int p = 1;
p < 5; ++
p) {
552 for (
int d = 0;
d < 64; ++
d) {
562 if (drConsec > drConsecMax) {
563 drConsecMax = drConsec;
564 if (drConsecMax > drConsecMaxMax) {
565 drConsecMaxMax = drConsecMax;
566 drConsecNum = ((
p - 1) << 6) | (
d - drConsec);
570 if (
evt[
d].nMaskedChannels > 0) {
573 if (
evt[
d].nBadQuality) ++hasBadQ;
574 if (
evt[
d].nOverflow) ++hasOver;
575 if (
evt[
d].nUnderflow) ++hasUnder;
576 if (
evt[
d].nSomeSignal) ++hasSig;
579 if (drConsec != 0 && drConsecMax < 64) {
580 for (
int d = 0;
d < drConsecMax; ++
d) {
587 if (drConsec > drConsecMax) {
588 drConsecMax = drConsec;
601 if (hasBadQ > 15) fl |= 0x00001000;
602 if (hasOver) fl |= 0x00000100;
603 if (hasUnder) fl |= 0x00000010;
604 if (hasSig) fl |= 0x00000001;
606 #ifdef ALLOW_DEBUG_COUT
607 std::cout<<
"partition "<<
p<<
" drAbsent "<<drAbsent<<
" drMasked "<<drMasked<<
" drConsec "<<drConsecMax
608 <<
" hasBadQ "<<hasBadQ<<
" hasOver "<<hasOver<<
" hasUnder "<<hasUnder<<
" hasSig "<<hasSig<<std::endl;
610 flag |= fl << (
p - 1);
621 flag |= (drConsecNum << 20);
622 #ifdef ALLOW_DEBUG_COUT
623 std::cout<<
"warning in partition " << (drConsecNum>>6)+1 <<
" for modules "
624 <<(drConsecNum)%64 <<
" - " <<(drConsecNum+drConsecMaxMax-1)%64 <<std::endl;
628 #ifdef ALLOW_DEBUG_COUT
629 std::cout<<
"partition flag 0x0"<<std::hex<<
flag<<std::dec<<
" error "<<
error<<std::endl;
642 ATH_MSG_DEBUG(
" set eventInfo for Tile for this event to 0x" << MSG::hex <<
flag << MSG::dec );
657 ATH_MSG_WARNING(
" cannot retrieve EventInfo, will not set Tile information " );
663 return StatusCode::SUCCESS;
668 ,
float ener,
float time,
unsigned char iqual,
unsigned char qbit,
int ch_type)
const {
676 #ifdef ALLOW_DEBUG_COUT
677 std::cout <<
"channel with negative energy " << ener <<
" => setting quality to 255" << std::endl;
708 ++drawerEvtStatus[
ros][
drawer].nChannels;
711 if (overflow) ++drawerEvtStatus[
ros][
drawer].nOverflow;
712 if (underflow) ++drawerEvtStatus[
ros][
drawer].nUnderflow;
714 #ifdef ALLOW_DEBUG_COUT
715 if (overflow) std::cout <<
"channel with overflow " << ((count_over)?
"":
"MBTS") << std::endl;
716 if (underflow) std::cout <<
"channel with underflow " << ((count_over)?
"":
"MBTS") << std::endl;
717 if (overfit) std::cout <<
"channel with corrected overflow " << ((count_over)?
"":
"MBTS") << std::endl;
728 ++drawerEvtStatus[
ros][
drawer].nSomeSignal;
750 ++drawerEvtStatus[
ros][
drawer].nBadQuality;
765 ++drawerEvtStatus[
ros][
drawer].nMaskedChannels;
797 bool single_PMT_C10 =
false;
818 ++drawerEvtStatus[ros1][drawer1].nBadQuality;
836 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
871 ++drawerEvtStatus[ros2][drawer2].nBadQuality;
880 || (dcsState ? dcsState->
isStatusBad(ros2, drawer2, chan2) :
false);
887 if (single_PMT_C10) {
893 #ifdef ALLOW_DEBUG_COUT
897 << drawer2+1 <<
" status " <<
chan1 <<
"/" << chan2 <<
" "
898 << (chStatus1.
isBad()?
"bad":
"good") <<
"/"
899 << (chStatus2.
isBad()?
"bad":
"good") <<
"/"
900 << ((
m_run2plus)?
" RUN2+ cabling":
"RUN1 cabling")
906 #ifdef ALLOW_DEBUG_COUT
908 std::cout <<
"Ene of chan1 was " << pCell->
ene1() <<
" changing to half of " << pCell->
ene2()
909 <<
" and setting bad1=true" << std::endl;
915 --drawerEvtStatus[ros1][drawer1].nMaskedChannels;
919 #ifdef ALLOW_DEBUG_COUT
921 std::cout <<
"Ene of chan2 was " << pCell->
ene2() <<
" changing to half of " << pCell->
ene1()
922 <<
" and setting bad2=true" << std::endl;
928 --drawerEvtStatus[ros2][drawer2].nMaskedChannels;
934 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
935 ++drawerEvtStatus[ros2][drawer2].nMaskedChannels;
950 }
else if (bad1 && !bad2) {
952 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
954 float ene2 = pCell->
ene2();
959 uint8_t qual1 = qual2 + qualCorrection;
975 }
else if (!bad1 && bad2) {
977 ++drawerEvtStatus[ros2][drawer2].nMaskedChannels;
979 float ene1 = pCell->
ene1();
984 uint8_t qual2 = qual1 + qualCorrection;
1024 return single_PMT_C10;
1028 template<
class ITERATOR,
class COLLECTION>
1030 TileDrawerEvtStatusArray& drawerEvtStatus,
1032 const ITERATOR &
begin,
1033 const ITERATOR &
end,
1056 float eCellTot = 0.0;
1057 float eMBTSTot = 0.0;
1058 float eE4prTot = 0.0;
1059 bool EBdrawerPresent[128];
1060 memset(EBdrawerPresent, 0,
sizeof(EBdrawerPresent));
1069 for (ITERATOR rawItr =
begin; rawItr !=
end; ++rawItr) {
1101 ATH_MSG_ERROR(
"But amplitude correction works only with ADC counts " );
1102 ATH_MSG_ERROR(
"Please, disable CIS calibration in optimal filter " );
1109 bool good_time = (fabs(
time) <
params.m_maxTimeCorr);
1120 bool overflow =
false;
1121 bool underflow =
false;
1122 bool overfit =
false;
1126 }
else if (
ped > 39500.) {
1149 if (
params.m_correctTime && good_time && non_zero_time)
1161 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,
1162 26,25,24,29,31,32,27,28,30,35,34,33,38,37,43,44,41,40,39,36,42,47,46,45};
1163 channel1 = pmt2channel[
channel];
1167 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,
1168 26,25,24,29,28,27,32,31,30,35,34,33,38,37,36,41,40,39,44,43,42,47,46,45};
1169 channel1 = pmt2channel[
channel];
1172 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,
1173 31,32,30,35, 33,34, 38,37,41,40,39,36, 26,25,24,29,28,27, 44,43,42,47,46,45};
1174 channel1 = pmt2channelEB[
channel];
1191 unsigned char qbit =
qbits(drawerEvtStatus,
params.m_RChType,
1193 , overflow, underflow, overfit);
1201 pCell->
set(NULL, cell_id);
1214 <<
" time= " <<
time
1215 <<
" qual= " << pChannel->
quality()
1216 <<
" iqual= " << (
int) iqual
1217 <<
" qbit = 0x" << MSG::hex << (
int) qbit << MSG::dec;
1226 *badChannels, pCell, adc_id))
1228 <<
" bad channel masked, new energy=" << pCell->
energy() );
1234 }
else if (
index == -2) {
1246 unsigned char qbit =
qbits(drawerEvtStatus,
params.m_RChType,
1247 ros,
drawer,
false, (good_time && non_zero_time),
1270 <<
" time= " <<
time
1271 <<
" qual= " << pChannel->
quality()
1272 <<
" iqual= " << (
int) iqual
1273 <<
" qbit = 0x" << MSG::hex << (
int) qbit << MSG::dec;
1282 *badChannels, pCell, adc_id))
1284 <<
" bad channel masked, new energy=" << pCell->
energy() );
1289 }
else if (
index != -1) {
1298 unsigned char qbit =
qbits(drawerEvtStatus,
params.m_RChType,
1300 , overflow, underflow, overfit);
1307 int side = (
ros == 3) ? 1 : -1;
1312 allCells[
index2] = pCell2;
1314 pCell2->
set(dde2, cell_id2);
1336 pCell->
set(dde, cell_id);
1343 float calib1 = (amp != 0) ? ener / amp : 0.0;
1346 <<
" calib=" << calib1
1347 <<
" nCell=" << nCell
1348 <<
" energy=" << ener <<
" (" << pCell->
energy() <<
", " << pCell->
eneDiff() <<
")" <<
endmsg;
1351 <<
" time= " <<
time
1352 <<
" qual= " << pChannel->
quality()
1353 <<
" iqual= " << (
int) iqual
1354 <<
" qbit = 0x" << MSG::hex << (
int) qbit << MSG::dec;
1367 unsigned char qbit =
qbits(drawerEvtStatus,
params.m_RChType,
1368 0,
drawer,
false, non_zero_time,
false, overflow, underflow, overfit);
1371 <<
" is not connected" <<
endmsg;
1374 <<
" time= " <<
time
1375 <<
" qual= " << pChannel->
quality()
1376 <<
" iqual= " << (
int) iqual
1377 <<
" qbit = 0x" << MSG::hex << (
int) qbit << MSG::dec;
1386 if ((
params.m_correctTime && good_time && non_zero_time) || pChannel->
sizeTime() > 1) {
1403 if (
maskBadChannels (drawerEvtStatus, DQstatus, dcsState, *badChannels, pCell))
1405 <<
" bad channels masked, new energy=" << pCell->
energy() );
1415 coll->push_back(pCell);
1423 allCells[
index] = 0;
1433 if (EBdrawerPresent[
ind]) {
1447 <<
" ene=" << pCell->
energy()
1448 <<
" status=" << (pCell->
badcell() ?
"bad" :
"good") );
1450 coll->push_back(pCell);
1458 <<
" RawChSum=" << eCh
1459 <<
" nCell=" << nCell
1461 <<
" nFake=" << nFake
1462 <<
" eneTot=" << eCellTot;
1466 <<
" eMBTS=" << eMBTSTot;
1469 <<
" eE4pr=" << eE4prTot;
def retrieve(aClass, aKey=None)
static const InterfaceID & interfaceID()
virtual bool badcell(void) const override final
check if whole cell is bad (i.e.
float m_ADCmaskValueMinusEps
void setQbit2(unsigned char qbit)
set quality bits of second PMT
IdentifierHash onl2() const
cell online identifier 2
unsigned constexpr int nChannels
void setTime_nonvirt(float t)
float time1(void) const
get time of first PMT
virtual void setTime(float t) override final
set cell time, reset timeDiff
SG::WriteDecorHandleKey< xAOD::EventInfo > m_EventInfoTileStatusKey
size_type cell_hash_max(void) const
std::string to_string(const Identifier &id, int level=0) const
extract all fields from TileTB identifier Identifier get_all_fields ( const Identifier & id,...
const TileCablingService * m_cabling
TileCabling instance.
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
void set(const CaloDetDescrElement *caloDDE, const Identifier &ID)
Fast method to change the identity of a cell.
const_pointer_type cptr()
Dereference the pointer.
float m_ampMinThresh
correct amplitude if it's above amplitude threshold (in ADC counts)
void reset(bool fullSizeCont, bool printReset=true)
Method to reset the options of the TileCellContainer.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
float time2(void) const
get time of second PMT
int m_skipGain
for two-gain calib runs skip one of two gains
StatusCode status() const
Return the error status from the constructors.
float pedestal(void) const
void setQual2(unsigned char qual)
set quality of second PMT
void setHasCalo(const CaloCell_ID::SUBCALO caloNum)
set which calo has been filled.
float ene1(void) const
get energy of first PMT
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
SG::WriteHandleKey< TileCellContainer > m_E4prContainerKey
float m_timeMinThresh
correct amplitude is time is above time min threshold
Class holding bad channel problems.
int side(const Identifier &id) const
int sample(const Identifier &id) const
@ NotSet
The flag was not set to anything.
Identifier h2s_cell_id_index(const HWIdentifier &id, int &index, int &pmt) const
bool m_mergeChannels
If true, missing raw channels are taken from DSP container.
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
HWIdentifier adc_HWID(void) const
bool updateEventFlags(const EventFlagSubDet subDet, const uint32_t flags_in) const
Turn on a set of event flags for one particular sub-detector.
unsigned char iquality(float qual) const
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...
float time(int ind=0) const
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
const TileHWID * m_tileHWID
Pointer to TileHWID.
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
double energy() const
get energy (data member)
@ Error
The sub-detector issued an error.
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
bool m_maskBadChannels
if true=> bad channels are masked
int ADCmaskValue() const
Returns the overlay magic number that indicates channels which were masked in background dataset.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
IdentifierHash onl1() const
cell online identifier 1
float m_maxTimeDiff
maximum time difference between the PMTs in the cell
float quality(int ind=0) const
const MbtsDetDescrManager * m_mbtsMgr
Pointer to MbtsDetDescrManager.
float timeDiff(void) const
get time diff for two PMTs (data member)
void setQbit1(unsigned char qbit)
set quality bits of first PMT
float calibrateChannel(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT rawDataUnitIn, TileRawChannelUnit::UNIT rawDataUnitOut) const
Calibrate a Tile channel.
Handle class for recording to StoreGate.
Class that holds Data Quality fragment information and provides functions to extract the data quality...
uint8_t qual2(void) const
get quality of second PMT (data member)
Identifier identify() const override final
cell identifier
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
SG::ReadCondHandleKey< TileDCSState > m_DCSStateKey
Name of TileDCSState object in condition store.
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
bool isRun2PlusCabling() const
float m_minEneChan[3]
channel energy thresholds for masking (normal,gap,mbts)
float m_timeMaxThresh
correct amplitude is time is below time max threshold
TileFragHash::TYPE m_RChType
float amplitude(int ind=0) const
int module(const Identifier &id) 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.
::StatusCode StatusCode
StatusCode definition for legacy code.
uint32_t get_bsflags() const
const TileID * m_tileID
Pointer to TileID.
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
void setEnergy_nonvirt(float e1, float e2, int gain1, int gain2)
SUBCALO
enumeration of sub calorimeters
const TileDetDescrManager * m_tileMgr
Pointer to TileDetDescrManager.
float m_maxTime
maximum time for the PMTs in the cels
CaloDetDescrElement * get_element(const Identifier &elementId) const
uint8_t qbit1(void) const
get quality bits of first PMT (data member)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
float m_minChi2
minimum chi2 for the PMTs in the cels
Information produced by TileDQstatusAlg (used to be done by TileBeamInfoProvider).
float m_maxChi2
maximum chi2 for the PMTs in the cels
int gain1(void) const
get gain of first PMT
float eneDiff(void) const
all get methods
bool isRun2Cabling() const
EventFlagErrorState
States that a given sub-detector could be in.
const TileTBID * m_tileTBID
Pointer to TileTBID.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors
CaloDetDescrElement * get_cell_element(unsigned int cell_hash) const
SG::ReadHandleKey< TileRawChannelContainer > m_dspRawChannelContainerKey
TileDrawerEvtStatus TileDrawerEvtStatusArray[5][64]
status of every drawer
int getCablingType() const
static double correctAmp(double phase, bool of2=true)
Amplitude correction factor according to the time when using weights for tau=0 without iterations.
bool m_of2
If true, assume OF2 method for amplitude correction, otherwise - OF1.
Condition object to keep Tile channel and ADC status.
void setQuality(unsigned char qual, unsigned char qbit, int pmt)
set quality value and quality bits for one PMT
HWIdentifier channel_id(int ros, int drawer, int channel) const
channel HWIdentifer
Helpers for checking error return status codes and reporting errors.
float m_zeroEnergy
energy to store in every PMT if both PMT are bad
bool m_correctTime
should time be corrected (deltat added from CondDB)
float m_eneForTimeCut
keep time for channels with energy above cut
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
bool maskBadChannels(TileDrawerEvtStatusArray &drawerEvtStatus, const TileDQstatus *DQstatus, const TileDCSState *dcsState, const TileBadChannels *badChannels, TileCell *pCell) const
virtual StatusCode initialize() override
Initializer.
Container class for CaloCell.
static const char * BadPatternName(float ped)
virtual void addEnergy(float e) override final
add energy, keep eneDiff
void build(const EventContext &ctx, TileDrawerEvtStatusArray &drawerEvtStatus, VecParams ¶ms, 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
virtual void setEnergy(float ene) override final
set total energy, reset eneDiff to zero
TileRawChannelUnit::UNIT m_RChUnit
const TileBchStatus & getAdcStatus(const HWIdentifier adc_id) const
Return Tile ADC status.
HWIdentifier adc_id(int ros, int drawer, int channel, int adc) const
adc HWIdentifer
uint8_t qbit2(void) const
get quality bits of second PMT (data member)
@ Warning
The sub-detector issued a warning.
int gain2(void) const
get gain of second PMT
@ Tile
The Tile calorimeter.
float undoOnlineChannelCalibration(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT onlUnit) const
Undo the calibration applied in ROD signal reconstruction.
float ene2(void) const
get energy of second PMT
Helper for holding non-const raw data prior to recording in SG.
static bool C10_connected(int module)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ToolHandleArray< ITileRawChannelTool > m_noiseFilterTools
def time(flags, cells_name, *args, **kw)
SG::WriteHandleKey< TileCellContainer > m_MBTSContainerKey
std::string to_string(const Identifier &id, int level=0) const
#define ATH_MSG_WARNING(x)
int m_qualityCut
cut on channel quality (set energy to m_zeroEnergy for them)
float m_eThreshold
cell energy threshold to consider the cell
This class keep detailed status info about one drawer in a given event.
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.
float m_eneForTimeCutMBTS
similar cut for MBTS in pC
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
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
bool m_correctAmplitude
If true, amplitude is corrected by parabolic function (needed for OF without iterations)
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
uint8_t qual1(void) const
get quality of first PMT (data member)
void setQual1(unsigned char qual)
set quality of first PMT
Condition object to keep Tile DCS status from DB.
bool m_thresholdNotSet
bool variable to check whether some threshold have been set
bool updateErrorState(const EventFlagSubDet subDet, const EventFlagErrorState state) const
Update the error state for one particular sub-detector.
float m_ADCmaskValuePlusEps
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
virtual ~TileCellBuilder()
Destructor.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
IdentifierHash cell_hash(const Identifier &cell_id) const
fast conversion from ID to hash for cells
int section(const Identifier &id) const
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...
Handle class for reading from StoreGate.
TileCellBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Contructor.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
bool m_fakeCrackCells
if true=> fake E3/E4 cells added
Identifier cell_id(const Identifier &any_id) const
float m_minTime
minimum time for the PMTs in the cels
virtual StatusCode finalize() override
ToolHandle< TileCondToolTiming > m_tileToolTiming
int E1_merged_with_run2plus(int ros, int module) const
const TileInfo * m_tileInfo
virtual StatusCode process(CaloCellContainer *theCellContainer, const EventContext &ctx) const override
method to process all raw channels and store them in container
const_pointer_type cptr()