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

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

#include <TileCellBuilderFromHit.h>

Inheritance diagram for TileCellBuilderFromHit:

Public Member Functions

 TileCellBuilderFromHit (const std::string &type, const std::string &name, const IInterface *parent)
 Contructor.
virtual ~TileCellBuilderFromHit ()
 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

Static Public Member Functions

static const InterfaceID & interfaceID ()

Private Types

typedef TileDrawerEvtStatus TileDrawerEvtStatusArray[5][64]
 status of every drawer

Private Member Functions

template<class ITERATOR, class COLLECTION>
void build (const CaloNoise *caloNoise, TileDrawerEvtStatusArray &drawerEvtStatus, const ITERATOR &begin, const ITERATOR &end, COLLECTION *coll, TileCellContainer *MBTSCells, TileCellContainer *E4prCells, const TileSamplingFraction *samplingFraction) const
bool maskBadChannel (TileDrawerEvtStatusArray &drawerEvtStatus, TileCell *pCell, const EventContext &ctx) const
 method to check if channels are good or bad.
bool maskBadChannels (TileDrawerEvtStatusArray &drawerEvtStatus, TileCell *pCell, bool single_PMT_C10, bool Ecell, const EventContext &ctx) const
void correctCell (TileCell *pCell, int correction, int pmt, int gain, float ener, float time, unsigned char iqual, unsigned char qbit) const
 Compute calibrated energy, time, etc.
unsigned char iquality (float qual) const
unsigned char qbits (TileDrawerEvtStatusArray &drawerEvtStatus, 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
int mbts_index (int side, int phi, int eta) const
int e4pr_index (int phi) const

Private Attributes

SG::ReadCondHandleKey< CaloNoisem_caloNoiseKey
SG::ReadHandleKey< TileHitContainerm_hitContainerKey
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey
SG::WriteHandleKey< TileCellContainerm_MBTSContainerKey
SG::WriteHandleKey< TileCellContainerm_E4prContainerKey
SG::ReadCondHandleKey< TileSamplingFractionm_samplingFractionKey
 Name of TileSamplingFraction in condition store.
std::string m_infoName
float m_eneForTimeCut
 keep time for channels with energy above cut
float m_eneForTimeCutMBTS
 similar cut for MBTS in pC
float m_zeroEnergy
 energy to store in every PMT if both PMT are bad
int m_qualityCut
 cut on channel quality (set energy to m_zeroEnergy for them)
float m_maxTime
 maximum time for the PMTs in the cels
float m_minTime
 minimum time for the PMTs in the cels
bool m_maskBadChannels
 if true=> bad channels are masked
float m_noiseSigma
 cell electronic noise if CaloNoise is switched off
const TileIDm_tileID {nullptr}
 Pointer to TileID.
const TileTBIDm_tileTBID {nullptr}
 Pointer to TileTBID.
const TileHWIDm_tileHWID {nullptr}
 Pointer to TileHWID.
const TileCablingServicem_cabling {nullptr}
 Pointer to TileCabling.
ServiceHandle< IAthRNGSvcm_rndmSvc { this, "RndmSvc", "AthRNGSvc", "Random Number Service used in TileCellBuildetFromHit" }
 < Random number service to use
ToolHandle< ITileBadChanToolm_tileBadChanTool
SG::ReadCondHandleKey< TileEMScalem_emScaleKey
 Name of TileEMScale in condition store.
ServiceHandle< TileCablingSvcm_cablingSvc
 Name of Tile cabling service.
const TileDetDescrManagerm_tileMgr {nullptr}
 Pointer to TileDetDescrManager.
const MbtsDetDescrManagerm_mbtsMgr {nullptr}
 Pointer to MbtsDetDescrManager.
TileFragHash::TYPE m_RChType
 Type of TileRawChannels (Fit, OF2, etc.).
std::vector< CaloAffectedRegionInfom_affectedRegionInfo_global
 TileDrawerRunStatus m_drawerRunStatus[5][64]; //!< overall status of drawer in whole run.
std::vector< CaloAffectedRegionInfom_affectedRegionInfo_current_run
 method to process raw channels from a given vector and store them in collection
bool m_RUN2
bool m_RUN2plus
int m_E1_TOWER

Static Private Attributes

static const int NSIDE = 2
static const int NPHI = 8
static const int NETA = 2
static const int NCELLMBTS = NSIDE * NPHI * NETA
static const int E4SIDE = -1
static const int E4ETA = 2
static const int E4NPHI = 4
static const int NCELLE4PR = E4NPHI

Detailed Description

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

Definition at line 79 of file TileCellBuilderFromHit.h.

Member Typedef Documentation

◆ TileDrawerEvtStatusArray

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

status of every drawer

Definition at line 101 of file TileCellBuilderFromHit.h.

Constructor & Destructor Documentation

◆ TileCellBuilderFromHit()

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

Contructor.

Definition at line 71 of file TileCellBuilderFromHit.cxx.

73 : base_class(type, name, parent)
74 , m_eneForTimeCut(35. * MeV) // keep time only for cells above 70 MeV (more than 35 MeV in at least one PMT to be precise)
75 , m_eneForTimeCutMBTS(0.03675) // the same cut for MBTS, but in pC, corresponds to 3 ADC counts or 35 MeV
76 , m_qualityCut(254) // cut on overflow in quality (if quality is 255 - assume that channel is bad)
77 , m_maxTime (25.)
78 , m_minTime(-25.)
79 , m_maskBadChannels(false)
80 , m_noiseSigma(20.*MeV)
82 , m_RUN2(false)
83 , m_RUN2plus(false)
84 , m_E1_TOWER(10)
85{
86 declareInterface<TileCellBuilderFromHit>( this );
87
88 //memset(m_drawerRunStatus, 0, sizeof(m_drawerRunStatus));
89 //memset(m_eventErrorCounter, 0, sizeof(m_eventErrorCounter));
90
91 // never set energy to zero, but set it to some small number
92 // this will help TopoCluster to assign proper weight to the cell if needed
93 m_zeroEnergy = 0.5 * MeV; // half a MeV in both PMTs i.e. one MeV in a cell
94
95 // Noise Sigma
96 declareProperty("NoiseSigma",m_noiseSigma);
97
98 // Maximum and minimum time for a cell to be included:
99 declareProperty("MaxTime", m_maxTime);
100 declareProperty("MinTime", m_minTime);
101
102 // put zero energy in bad channels and recover from single-channel failure using second PMT is a cell
103 declareProperty("maskBadChannels", m_maskBadChannels);
104
105 // PMT energy will be set to this value if channel is bad
106 declareProperty("BadChannelZeroEnergy", m_zeroEnergy);
107 // PMT with energy above cut will preserve time info in ESD
108 declareProperty("EneForTimeCut", m_eneForTimeCut);
109 declareProperty("EneForTimeCutMBTS", m_eneForTimeCutMBTS);
110 // PMT with quality greater than this cut will be masked
111 declareProperty("QualityCut", m_qualityCut);
112}
static const double MeV
int m_qualityCut
cut on channel quality (set energy to m_zeroEnergy for them)
float m_zeroEnergy
energy to store in every PMT if both PMT are bad
float m_maxTime
maximum time for the PMTs in the cels
float m_minTime
minimum time for the PMTs in the cels
bool m_maskBadChannels
if true=> bad channels are masked
TileFragHash::TYPE m_RChType
Type of TileRawChannels (Fit, OF2, etc.).
float m_eneForTimeCutMBTS
similar cut for MBTS in pC
float m_noiseSigma
cell electronic noise if CaloNoise is switched off
float m_eneForTimeCut
keep time for channels with energy above cut

◆ ~TileCellBuilderFromHit()

TileCellBuilderFromHit::~TileCellBuilderFromHit ( )
virtual

Destructor.

Definition at line 117 of file TileCellBuilderFromHit.cxx.

117 {
118}

Member Function Documentation

◆ build()

template<class ITERATOR, class COLLECTION>
void TileCellBuilderFromHit::build ( const CaloNoise * caloNoise,
TileDrawerEvtStatusArray & drawerEvtStatus,
const ITERATOR & begin,
const ITERATOR & end,
COLLECTION * coll,
TileCellContainer * MBTSCells,
TileCellContainer * E4prCells,
const TileSamplingFraction * samplingFraction ) const
private

< vector to of pointers to MBTS cells

< vector to of pointers to E4' cells

Definition at line 734 of file TileCellBuilderFromHit.cxx.

740{
741 static const std::string rngname = name() + "-" + ClassName<COLLECTION>::name();
742 const EventContext& ctx = Gaudi::Hive::currentContext();
743 ATHRNG::RNGWrapper* wrapper = m_rndmSvc->getEngine(this);
744 wrapper->setSeed (rngname, ctx);
745 CLHEP::HepRandomEngine* engine = wrapper->getEngine (ctx);
746
747 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey, ctx);
748
749 /* zero all counters and sums */
750 int nTwo = 0;
751 int nCell = 0;
752 int nFake = 0;
753 int nMBTS = 0;
754 int nE4pr = 0;
755 int nChan = 0;
756 float eCh = 0.0;
757 float eCellTot = 0.0;
758 float eMBTSTot = 0.0;
759 float eE4prTot = 0.0;
760 bool EBdrawerPresent[128];
761 memset(EBdrawerPresent, 0, sizeof(EBdrawerPresent));
762#ifdef USE_TILECELLS_DATAPOOL
763 DataPool<TileCell> tileCellsP(5217);
764#endif
765 //**
766 //* Iterate over hits, creating new TileCells (or incrementing
767 //* existing ones). Add each new TileCell to the output collection
768 //**
769
770 bool overflow = false;
771 bool underflow = false;
772 bool overfit = false;
773 float ener_min = (!m_caloNoiseKey.empty()) ? 1.0E-30F : 0.0;
774
775 std::vector<TileCell*> allCells (m_tileID->cell_hash_max(), nullptr);
776 std::vector<TileCell*> MBTSVec;
777 if (MBTSCells) {
778 MBTSVec.resize (NCELLMBTS);
779 }
780 std::vector<TileCell*> E4prVec;
781 if (E4prCells) {
782 E4prVec.resize (NCELLE4PR);
783 }
784
785 for (ITERATOR hitItr = begin; hitItr != end; ++hitItr) {
786
787 const TileHit* pHit = (*hitItr);
788
789 // Get hit id (logical pmt id)
790 Identifier cell_id = pHit->identify();
791
792 double ehit = 0.;
793 double thit = 0.;
794
795 int hitsize = pHit->size();
796 for (int ind = 0; ind < hitsize; ++ind) { // loop over sub-hits
797 float tim = pHit->time(ind);
798 if (m_minTime < tim && tim < m_maxTime) {
799 float ene = pHit->energy(ind);
800 ehit += ene;
801 thit += tim*ene;
802 }
803 }
804
805 float ener = ener_min;
806 float time = 0.;
807 float qual = 0.;
809 bool good_time = false;
810 bool non_zero_time = (ehit!=0.0);
811
812 HWIdentifier channel_id = m_cabling->s2h_channel_id(cell_id);
813 int ros = m_tileHWID->ros(channel_id);
814 int drawer = m_tileHWID->drawer(channel_id);
815 int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
816 int channel = m_tileHWID->channel(channel_id);
817
818 if (non_zero_time) {
819 time = thit / ehit;
820 // Convert hit energy deposit to cell energy
821 ener = ehit * samplingFraction->getSamplingFraction(drawerIdx, channel);
822 if (ener > 10000. * MeV) { // very simple check - if above 10 GeV assume low gain
824 }
825 good_time = (fabs(time) < 25.);
826 }
827
828 bool MBTS = false, E4pr = false, E1_CELL = false;
829 int section,side,tower,sample,pmt,index;
830
831 // Get logical ID of cell
832 if (m_tileTBID->is_tiletb(cell_id)) {
833
834 pmt = 0;
835 side = m_tileTBID->type(cell_id);
836 int phi = m_tileTBID->module(cell_id);
837 int eta = m_tileTBID->channel(cell_id);
838 if (eta<2) {
839 MBTS = true;
840 index = mbts_index(std::max(0,side),phi,eta);
841 } else {
842 E4pr = true;
844 }
845
846 } else {
847
848 MBTS = false;
849 E4pr = false;
850
851 pmt = m_tileID->pmt(cell_id); // 0 or 1 - first or second PMT of the cell
852
853 cell_id = m_tileID->cell_id(cell_id); // remove pmt field from cell_id
854 index = m_tileID->cell_hash(cell_id);
855
856 section = m_tileID->section(cell_id);
857 side = m_tileID->side(cell_id);
858 drawer = m_tileID->module(cell_id);
859 tower = m_tileID->tower(cell_id);
860 sample = m_tileID->sample(cell_id);
861
862 // instead of using cabling (which might be wrong for upgrade geometry
863 // try to figure out ros/drawer/channel
864 ros = ( TileID::POSITIVE == side ) ? 1 : 2;
865 if ( TileID::BARREL != section ) ros += 2;
866 else if (tower == 0 && sample == TileID::SAMP_D && pmt == 1) ros = 2; // Cell D0, second PMT in LBC
867 channel = -1; // don't know channel
868 E1_CELL = (section == TileID::GAPDET && sample == TileID::SAMP_E && tower == m_E1_TOWER);
869 }
870
871 ++nChan;
872 eCh += ener;
873
874 if (E4pr) { // E4' cells
875
876 if (E4prCells) { // do something with them only if contaier existst
877 ++nE4pr;
878
879 eE4prTot += ener;
880 unsigned char iqual = iquality(qual);
881 // for E4' cell qbit use only non_zero_time flag and check that energy is above standatd energy threshold in MeV
882 unsigned char qbit = qbits(drawerEvtStatus,
883 ros, drawer, true, non_zero_time, (fabs(ener) > m_eneForTimeCut)
884 , overflow, underflow, overfit);
888
889 TileCell* pCell = NEWTILECELL();
890 // no CaloDDE
891 // Cell ID is set explicitly
892 pCell->set(NULL, cell_id);
893 pCell->setEnergy_nonvirt(ener, 0, cgain, 3);
894 pCell->setTime_nonvirt(time);
895 pCell->setQual1(iqual);
896 pCell->setQual2(0);
897 pCell->setQbit1(qbit);
898 pCell->setQbit2(0);
899
900 if (msgLvl(MSG::VERBOSE)) {
901 msg(MSG::VERBOSE) << " E4' cell_id=" << m_tileTBID->to_string(cell_id)
902 << " adc_id=" << "5/0/" << ros << "/" << drawer << "/" << channel << "/" << gain
903 << " ene= " << ener
904 << " ehit= " << ehit
905 << " time= " << time
906 << " iqual= " << (int) iqual
907 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec << endmsg;
908 }
909
910 if (E4prVec[index]) {
911 msg(MSG::WARNING) << " double E4' cell_id=" << m_tileTBID->to_string(cell_id)
912 << " ignoring previous value" << endmsg;
913 }
914 E4prVec[index] = pCell;
915 }
916
917 } else if (MBTS) { // MBTS cells
918
919 if (MBTSCells) { // do something with them only if contaier existst
920 ++nMBTS;
921
922 // convert energy to pCb
923 ener /= emScale->calibrateChannel(drawerIdx, channel, gain, 1.,
926 gain = (ener>12.) ? TileID::LOWGAIN : TileID::HIGHGAIN; // assume low gain above 12 pC
927 eMBTSTot += ener;
928 unsigned char iqual = iquality(qual);
929 // for MBTS qbit use AND of good_time and non_zero_time and check that energy is above MBTS energy threshold in pC
930 unsigned char qbit = qbits(drawerEvtStatus,
931 ros, drawer, false, (good_time && non_zero_time)
932 , (fabs(ener) > m_eneForTimeCutMBTS), overflow, underflow, overfit);
936
937 TileCell* pCell = NEWTILECELL();
938 // MBTS CaloDDE
939 // Cell ID is set explicitly
940 pCell->set((m_mbtsMgr) ? m_mbtsMgr->get_element(cell_id) : NULL, cell_id);
941 pCell->setEnergy_nonvirt(ener, 0, cgain, 3);
942 pCell->setTime_nonvirt(time);
943 pCell->setQual1(iqual);
944 pCell->setQual2(0);
945 pCell->setQbit1(qbit);
946 pCell->setQbit2(0);
947
948 if (msgLvl(MSG::VERBOSE)) {
949 msg(MSG::VERBOSE) << " MBTS cell_id=" << m_tileTBID->to_string(cell_id)
950 << " adc_id=" << "5/0/" << ros << "/" << drawer << "/" << channel << "/" << gain
951 << " ene= " << ener
952 << " ehit= " << ehit
953 << " time= " << time
954 << " iqual= " << (int) iqual
955 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec << endmsg;
956 }
957
958 if (MBTSVec[index]) {
959 msg(MSG::WARNING) << " double MBTS cell_id=" << m_tileTBID->to_string(cell_id)
960 << " ignoring previous value" << endmsg;
961 }
962 MBTSVec[index] = pCell;
963 }
964 } else {
965
966 eCellTot += ener;
967
968 unsigned char iqual = iquality(qual);
969 // for normal cell qbit use only non_zero_time flag and check that energy is above standard energy threshold in MeV
970 unsigned char qbit = qbits(drawerEvtStatus, ros, drawer, true, non_zero_time,
971 (fabs(ener) > m_eneForTimeCut), overflow, underflow, overfit);
972
973 if (E1_CELL && m_RUN2plus) {
974
975 int drawer2 = m_cabling->E1_merged_with_run2plus(ros,drawer);
976 if (drawer2 != 0) { // Raw channel split into two E1 cells for Run 2.
977 Identifier cell_id2 = m_tileID->cell_id(TileID::GAPDET, side, drawer2, m_E1_TOWER, TileID::SAMP_E);
978 int index2 = m_tileID->cell_hash(cell_id2);
979 TileCell* pCell2 = NEWTILECELL();
980 ++nCell;
981 allCells[index2] = pCell2;
982 const CaloDetDescrElement* dde2 = m_tileMgr->get_cell_element(index2);
983 pCell2->set(dde2, cell_id2);
985 int pmt2(0);
986 ener *= 0.5F;
987 correctCell(pCell2, 1, pmt2, gain, ener, time, iqual, qbit);
988
989 ATH_MSG_DEBUG("E1 cell Id => " << m_tileID->to_string(cell_id)
990 << " split into " << m_tileID->to_string(cell_id2));
991 }
992 }
993
994 TileCell* pCell = allCells[index];
995 if (pCell) {
996 ++nTwo;
997 correctCell(pCell, 2, pmt, gain, ener, time, iqual, qbit); // correct & merge 2 PMTs in one cell
998 } else {
999 ++nCell;
1000 allCells[index] = pCell = NEWTILECELL();
1001 const CaloDetDescrElement* dde = m_tileMgr->get_cell_element(index);
1002 pCell->set(dde, cell_id);
1004 correctCell(pCell, 1, pmt, gain, ener, time, iqual, qbit); // correct & save e,t,q in new cell
1005 }
1006
1007 if (msgLvl(MSG::VERBOSE)) {
1008 float calib1 = (ehit != 0.0) ? ener / ehit : 0.0;
1009 msg(MSG::VERBOSE) << " cell_id=" << m_tileID->to_string(cell_id, -2)
1010 << " adc_id=" << "5/0/" << ros << "/" << drawer << "/" << channel << "/" << gain
1011 << " calib=" << calib1
1012 << " nCell=" << nCell
1013 << " energy=" << ener << " (" << pCell->energy() << ", " << pCell->eneDiff() << ")" << endmsg;
1014
1015 msg(MSG::VERBOSE) << " ehit= " << ehit
1016 << " time= " << time
1017 << " iqual= " << (int) iqual
1018 << " qbit = 0x" << MSG::hex << (int) qbit << MSG::dec << endmsg;
1019 }
1020 }
1021 }
1022
1023
1024
1025 unsigned char iqual = 0;
1026 unsigned char qbit = m_RChType;
1027
1028 //**
1029 // Now store all TileCells
1030 //**
1031 for (unsigned int index = 0; index < allCells.size(); ++index) {
1032
1033 TileCell * pCell = allCells[index];
1034 const CaloDetDescrElement* dde = m_tileMgr->get_cell_element(index);
1035 if(!dde)
1036 {
1037 ATH_MSG_VERBOSE ("skipping dummy tower with id=" << m_tileID->to_string(m_tileID->cell_id((IdentifierHash)index), -2) << " hash " << index);
1038 continue;
1039 }
1040 Identifier cell_id = dde->identify();
1041
1042 int section = m_tileID->section(cell_id);
1043 int side = m_tileID->side(cell_id);
1044 int module = m_tileID->module(cell_id);
1045 int sample = m_tileID->sample(cell_id);
1046
1047 bool single_PMT_C10 = ( section == TileID::GAPDET && sample == TileID::SAMP_B && !m_cabling->C10_connected(module) );
1048 bool missing_D4 = ( section == TileID::GAPDET && sample == TileID::SAMP_D && (module == ((side>0)?14:17)) );
1049 bool Ecell = (sample == TileID::SAMP_E);
1050 bool single_PMT = Ecell || single_PMT_C10;
1051
1052 if (!pCell) {
1053
1054 if ( ! missing_D4 ) {
1055
1056 ++nCell;
1057 if (!single_PMT) ++nTwo;
1058
1059 allCells[index] = pCell = NEWTILECELL();
1060 pCell->set(dde, cell_id);
1061
1062 pCell->setEnergy_nonvirt(ener_min, 0.0, TileID::HIGHGAIN, (Ecell)?3:TileID::HIGHGAIN); // reset energy completely
1063 pCell->setTime_nonvirt(0.0); // reset time completely
1064 pCell->setQuality(iqual, qbit, 0); // reset quality flag for first pmt
1065 pCell->setQuality(iqual, qbit, 1); // reset quality flag for second pmt
1066
1067 ATH_MSG_VERBOSE ( "adding cell with no signal with id=" << m_tileID->to_string(pCell->ID(), -2));
1068 }
1069 }
1070
1071 if (pCell) { // cell exists
1072
1074 if (maskBadChannels (drawerEvtStatus, pCell, single_PMT_C10, Ecell, ctx))
1075 ATH_MSG_VERBOSE ( "cell with id=" << m_tileID->to_string(pCell->ID(), -2)
1076 << " bad channels masked, new energy=" << pCell->energy() );
1077
1078 bool bad1=pCell->badch1();
1079 bool bad2=pCell->badch2();
1080
1081 if (! (bad1 && bad2) ) {
1082
1083 float noiseSigma = m_noiseSigma;
1084 if (caloNoise) {
1085 noiseSigma = caloNoise->getEffectiveSigma (pCell->ID(), pCell->gain(), pCell->energy());
1086 }
1087
1088 if (bad1 || bad2 || single_PMT) {
1089
1090 float ene = RandGaussQ::shoot(engine, 0.0, noiseSigma);
1091
1092 ATH_MSG_VERBOSE ( "Cell noise for cell id=" << m_tileID->to_string(pCell->ID(), -2)
1093 << " sigma " << noiseSigma << " noise " << ene );
1094 if (Ecell)
1095 pCell->addEnergy(ene,0,pCell->gain1());
1096 else
1097 pCell->addEnergy(ene);
1098
1099 } else {
1100
1101 int gain1=pCell->gain1();
1102 int gain2=pCell->gain2();
1103
1104 if (gain1!=gain2) {
1105
1106 float ene = RandGaussQ::shoot(engine, 0.0, noiseSigma);
1107 ATH_MSG_VERBOSE ( "Cell noise for cell id=" << m_tileID->to_string(pCell->ID(), -2)
1108 << " sigma " << noiseSigma << " noise " << ene );
1109
1110 if (gain1==TileID::LOWGAIN)
1111 pCell->addEnergy(ene,0,gain1);
1112 else
1113 pCell->addEnergy(ene,1,gain2);
1114
1115 } else {
1116
1117 noiseSigma *= M_SQRT1_2;
1118 float ene1 = RandGaussQ::shoot(engine, 0.0, noiseSigma);
1119 float ene2 = RandGaussQ::shoot(engine, 0.0, noiseSigma);
1120
1121 ATH_MSG_VERBOSE ( "Cell noise for cell id=" << m_tileID->to_string(pCell->ID(), -2)
1122 << " sigma " << noiseSigma*M_SQRT2 << " noise " << ene1+ene2 << " noise1 " << ene1 << " noise2 " << ene2 );
1123
1124 pCell->addEnergy(ene1,0,gain1);
1125 pCell->addEnergy(ene2,0,gain2);
1126 }
1127 }
1128 }
1129 coll->push_back(pCell); // store cell in container
1130 allCells[index] = 0; // clear pointer for next event
1131 }
1132 }
1133
1134
1135 if (MBTSCells) {
1136
1137 for (int side = 0; side < NSIDE; ++side) {
1138 for (int phi = 0; phi < NPHI; ++phi) {
1139 for (int eta = 0; eta < NETA; ++eta) {
1140
1141 int index=mbts_index(side,phi,eta);
1142 TileCell * pCell = MBTSVec[index];
1143
1144 bool merged_MBTS = ( eta == 1 && (phi&1) == 1 && m_RUN2); // in RUN2 every second outer MBTS does not exist
1145
1146 if (!pCell && !merged_MBTS) {
1147
1148 ++nMBTS;
1149 MBTSVec[index] = pCell = NEWTILECELL();
1150
1151 Identifier cell_id = m_tileTBID->channel_id((side > 0) ? 1 : -1, phi, eta);
1152 pCell->set((m_mbtsMgr) ? m_mbtsMgr->get_element(cell_id) : NULL, cell_id);
1153 pCell->setEnergy_nonvirt(0.0, 0.0, CaloGain::TILEONEHIGH, CaloGain::INVALIDGAIN); // reset energy completely
1154 pCell->setTime_nonvirt(0.0); // reset time completely
1155 pCell->setQuality(iqual, qbit, 0); // reset quality flag for first pmt
1156 pCell->setQuality(iqual, qbit, 1); // reset quality flag for second pmt
1157 }
1158
1159 if (pCell) {
1160 if (m_maskBadChannels && maskBadChannel (drawerEvtStatus, pCell, ctx))
1161 ATH_MSG_VERBOSE ( "MBTS cell with id=" << m_tileTBID->to_string(pCell->ID())
1162 << " bad channel masked, new energy=" << pCell->energy() );
1163
1164 MBTSCells->push_back(pCell); // store cell in container
1165 MBTSVec[index] = 0; // clear pointer for next event
1166 }
1167 }
1168 }
1169 }
1170 }
1171
1172 if (E4prCells) {
1173
1174 for (int phi = 0; phi < E4NPHI; ++phi) {
1175
1176 int index = e4pr_index(phi);
1177 TileCell * pCell = E4prVec[index];
1178
1179 if (!pCell) {
1180
1181 ++nE4pr;
1182 E4prVec[index] = pCell = NEWTILECELL();
1183
1184 pCell->set(NULL, m_tileTBID->channel_id(E4SIDE, phi, E4ETA));
1185 pCell->setEnergy_nonvirt(0.0, 0.0, CaloGain::TILEONEHIGH, CaloGain::INVALIDGAIN); // reset energy completely
1186 pCell->setTime_nonvirt(0.0); // reset time completely
1187 pCell->setQuality(iqual, qbit, 0); // reset quality flag for first pmt
1188 pCell->setQuality(iqual, qbit, 1); // reset quality flag for second pmt
1189 }
1190
1191 if (pCell) {
1192 if (m_maskBadChannels && maskBadChannel (drawerEvtStatus, pCell, ctx))
1193 ATH_MSG_VERBOSE ( "E4pr cell with id=" << m_tileTBID->to_string(pCell->ID())
1194 << " bad channel masked, new energy=" << pCell->energy() );
1195
1196 E4prCells->push_back(pCell); // store cell in container
1197 E4prVec[index] = 0; // clear pointer for next event
1198 }
1199 }
1200 }
1201
1202 if (msgLvl(MSG::DEBUG)) {
1203 msg(MSG::DEBUG) << " nChan=" << nChan
1204 << " RawChSum=" << eCh
1205 << " nCell=" << nCell
1206 << " n2=" << nTwo
1207 << " nFake=" << nFake
1208 << " eneTot=" << eCellTot;
1209
1210 if (MBTSCells)
1211 msg(MSG::DEBUG) << " nMBTS=" << nMBTS
1212 << " eMBTS=" << eMBTSTot;
1213 if (E4prCells)
1214 msg(MSG::DEBUG) << " nE4pr=" << nE4pr
1215 << " eE4pr=" << eE4prTot;
1216
1217 msg(MSG::DEBUG) << endmsg;
1218 }
1219}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define endmsg
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
void section(const std::string &sec)
#define NEWTILECELL
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition RNGWrapper.h:154
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition RNGWrapper.h:108
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
CaloGain::CaloGain gain() const
get gain (data member )
Definition CaloCell.h:361
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
float getEffectiveSigma(const Identifier id, const int gain, const float energy) const
Definition CaloNoise.h:56
static std::string name()
Return the name of class T as a string.
value_type push_back(value_type pElem)
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
const MbtsDetDescrManager * m_mbtsMgr
Pointer to MbtsDetDescrManager.
unsigned char iquality(float qual) const
bool maskBadChannel(TileDrawerEvtStatusArray &drawerEvtStatus, TileCell *pCell, const EventContext &ctx) const
method to check if channels are good or bad.
bool maskBadChannels(TileDrawerEvtStatusArray &drawerEvtStatus, TileCell *pCell, bool single_PMT_C10, bool Ecell, const EventContext &ctx) const
const TileTBID * m_tileTBID
Pointer to TileTBID.
unsigned char qbits(TileDrawerEvtStatusArray &drawerEvtStatus, int ros, int drawer, bool count_over, bool good_time, bool good_ener, bool overflow, bool underflow, bool good_overflowfit) const
method to compute the cell quality bits
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
const TileDetDescrManager * m_tileMgr
Pointer to TileDetDescrManager.
const TileID * m_tileID
Pointer to TileID.
void correctCell(TileCell *pCell, int correction, int pmt, int gain, float ener, float time, unsigned char iqual, unsigned char qbit) const
Compute calibrated energy, time, etc.
const TileHWID * m_tileHWID
Pointer to TileHWID.
const TileCablingService * m_cabling
Pointer to TileCabling.
SG::ReadCondHandleKey< CaloNoise > m_caloNoiseKey
int mbts_index(int side, int phi, int eta) const
ServiceHandle< IAthRNGSvc > m_rndmSvc
< Random number service to use
void addEnergy(float e, int pmt, int gain)
set energy and gain for one PMT
Definition TileCell.cxx:145
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
void setTime_nonvirt(float t)
Definition TileCell.h:244
float eneDiff(void) const
all get methods
Definition TileCell.h:182
int gain2(void) const
get gain of second PMT
Definition TileCell.cxx:175
bool badch1(void) const
check if first PMT is in bad channel list and masked
Definition TileCell.h:209
int gain1(void) const
get gain of first PMT
Definition TileCell.cxx:168
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
bool badch2(void) const
check if second PMT is in bad channel list and masked
Definition TileCell.h:212
float time(int ind=0) const
Return time of ind-th sub-hit.
float energy(int ind=0) const
Return energy of ind-th sub-hit.
Identifier identify(void) const
Return logical ID of the pmt.
int size(void) const
Return length of energy/time vectors.
float getSamplingFraction(unsigned int drawerIdx, unsigned int channel) const
Return Tile Calorimeter sampling fraction.
@ 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
MsgStream & msg
Definition testRead.cxx:32

◆ correctCell()

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

Compute calibrated energy, time, etc.

for TileCell and adjust it.

Definition at line 409 of file TileCellBuilderFromHit.cxx.

410 {
411//************************************************************************
412
413// Merge two pmts in one cell if needed
414// and apply corrections
415
416 switch (correction) {
417 case 1: // first pmt for this cell
418 pCell->addEnergy(ener, pmt, gain);
419 pCell->setTime(time); // overwrite time completely
420 pCell->setQuality(iqual, qbit, pmt);
421 pCell->setQuality(0, 0, 1 - pmt);
422 break;
423 case 2: // second pmt for this cell
424 pCell->addEnergy(ener, pmt, gain);
425 pCell->setTime(time, pmt); // calculate average time and timeDiff
426 pCell->setQuality(iqual, qbit, pmt);
427 break;
428 }
429}
virtual void setTime(float t) override final
set cell time, reset timeDiff
Definition TileCell.h:251

◆ e4pr_index()

int TileCellBuilderFromHit::e4pr_index ( int phi) const
inlineprivate

Definition at line 229 of file TileCellBuilderFromHit.h.

229 {
230 return phi;
231 }

◆ finalize()

StatusCode TileCellBuilderFromHit::finalize ( )
overridevirtual

Definition at line 190 of file TileCellBuilderFromHit.cxx.

190 {
191
192 ATH_MSG_INFO( "Finalizing" );
193
194 return StatusCode::SUCCESS;
195}
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode TileCellBuilderFromHit::initialize ( )
overridevirtual

Initializer.

Definition at line 123 of file TileCellBuilderFromHit.cxx.

123 {
124
125 // retrieve MBTS and Tile detector manager, TileID helper and TileIfno from det store
126 // retrieve MBTS and Tile detector manager, TileID helper and TileIfno from det store
127 if (m_MBTSContainerKey.empty()) {
128 m_mbtsMgr = nullptr;
129 } else {
130
131 ATH_CHECK( m_MBTSContainerKey.initialize() );
132 ATH_MSG_INFO( "Storing MBTS cells in " << m_MBTSContainerKey.key() );
133
134 if (detStore()->retrieve(m_mbtsMgr).isFailure()) {
135 ATH_MSG_WARNING( "Unable to retrieve MbtsDetDescrManager from DetectorStore" );
136 m_mbtsMgr = nullptr;
137 }
138 }
139
140 ATH_CHECK( m_eventInfoKey.initialize() );
141 ATH_CHECK( m_hitContainerKey.initialize() );
142 ATH_CHECK( m_samplingFractionKey.initialize() );
143 ATH_CHECK( m_emScaleKey.initialize() );
144
145 ATH_CHECK( detStore()->retrieve(m_tileMgr) );
146 ATH_CHECK( detStore()->retrieve(m_tileID) );
147 ATH_CHECK( detStore()->retrieve(m_tileTBID) );
148 ATH_CHECK( detStore()->retrieve(m_tileHWID) );
149
150 //=== get TileBadChanTool
151 ATH_CHECK( m_tileBadChanTool.retrieve() );
152
153 //---- retrieve the noise ----------------
154 if (!m_caloNoiseKey.empty()) {
155 ATH_CHECK( m_caloNoiseKey.initialize() );
156 ATH_MSG_INFO( "Reading electronic noise from DB" );
157 } else {
158 ATH_MSG_INFO( "Noise Sigma " << m_noiseSigma << " MeV is selected!" );
159 }
160
161 ATH_CHECK( m_rndmSvc.retrieve());
162 (void) m_rndmSvc->getEngine(this); // get this created early.
163
164 ATH_MSG_INFO( "max time thr " << m_maxTime << " ns" );
165 ATH_MSG_INFO( "min time thr " << m_minTime << " ns" );
166
167 m_E1_TOWER = (m_tileID->cell_hash_max() < 10000) ? 10 : 40;
168
169 ATH_MSG_INFO( "taking hits from '" << m_hitContainerKey.key() << "'" );
170
171 ATH_CHECK( m_cablingSvc.retrieve() );
172 m_cabling = m_cablingSvc->cablingService();
173
174 m_RUN2 = (m_cabling->getCablingType() == TileCablingService::RUN2Cabling);
175 m_RUN2plus = m_cabling->isRun2PlusCabling();
176
177 if (m_RUN2 && !m_E4prContainerKey.empty()) {
178 ATH_CHECK( m_E4prContainerKey.initialize() );
179 ATH_MSG_INFO( "Storing E4' cells in " << m_E4prContainerKey.key() );
180 } else {
181 m_E4prContainerKey = ""; // no E4' container for RUN1
182 }
183
184
185 ATH_MSG_INFO( "TileCellBuilderFromHit initialization completed" );
186
187 return StatusCode::SUCCESS;
188}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
SG::ReadHandleKey< TileHitContainer > m_hitContainerKey
SG::ReadCondHandleKey< TileSamplingFraction > m_samplingFractionKey
Name of TileSamplingFraction in condition store.
SG::WriteHandleKey< TileCellContainer > m_E4prContainerKey
ToolHandle< ITileBadChanTool > m_tileBadChanTool
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
SG::WriteHandleKey< TileCellContainer > m_MBTSContainerKey

◆ interfaceID()

const InterfaceID & TileCellBuilderFromHit::interfaceID ( )
static

Definition at line 66 of file TileCellBuilderFromHit.cxx.

66 {
68}
static const InterfaceID IID_ITileCellBuilderFromHit("TileCellBuilderFromHit", 1, 0)

◆ iquality()

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

< method to compute the cell quality

Definition at line 206 of file TileCellBuilderFromHit.h.

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

◆ maskBadChannel()

bool TileCellBuilderFromHit::maskBadChannel ( TileDrawerEvtStatusArray & drawerEvtStatus,
TileCell * pCell,
const EventContext & ctx ) 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 464 of file TileCellBuilderFromHit.cxx.

466{
467 Identifier cell_id = pCell->ID();
468
469 HWIdentifier channel_id = m_cabling->s2h_channel_id(cell_id);
470 int ros = m_tileHWID->ros(channel_id);
471 int drawer = m_tileHWID->drawer(channel_id);
472 int channel = m_tileHWID->channel(channel_id);
473 int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
474 int gain = pCell->gain1();
475
476 TileBchStatus chStatus = m_tileBadChanTool->getAdcStatus(drawerIdx, channel, gain, ctx);
477
478 // check quality first
479 bool bad = ((int) pCell->qual1() > m_qualityCut);
480 if (bad) {
481 ++drawerEvtStatus[ros][drawer].nBadQuality;
482
483 } else {
484 // check bad status in DB
485 bad = chStatus.isBad();
486
487 }
488
489 if (bad) {
490 // only one channel in this cell and it is bad
491 ++drawerEvtStatus[ros][drawer].nMaskedChannels;
492
493 //pCell->setEnergy(m_zeroEnergy,0.0,TileID::LOWGAIN,CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
494 //pCell->setTime(0.0); // reset time completely
495 //pCell->setQuality(255,TileCell::MASK_BADCH,0); // reset quality flag for first pmt
496
497 if (gain == CaloGain::INVALIDGAIN) {
498 pCell->setEnergy(0.0, 0.0, TileID::LOWGAIN, CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
499 } else {
500 pCell->setEnergy(0.0, 0.0); // reset energy completely without changing the gain
501 }
502 pCell->setTime(-100.0); // reset time to big negative number to distinguish this bad cell from good cells
503 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit1() & TileCell::MASK_ALGO)), 0); // reset quality flag for first pmt
504 pCell->setQuality(0, TileCell::MASK_BADCH, 1); // reset quality flag for second pmt
505
506 return true;
507
508 } else if (chStatus.isBadTiming()) {
509 pCell->setTime(0.0); // channel with bad timing - no cell time
510 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
511 pCell->setQuality(pCell->qual1(), qbit1, 0); // update qbits for first pmt
512 }
513
514 return false;
515}
bool isBadTiming() const
bool isBad() const
uint8_t qual1(void) const
get quality of first PMT (data member)
Definition TileCell.h:197
virtual void setEnergy(float ene) override final
set total energy, reset eneDiff to zero (final override of CaloCell method)
Definition TileCell.cxx:123
@ MASK_TIME
Definition TileCell.h:67
@ MASK_ALGO
Definition TileCell.h:62
@ MASK_BADCH
Definition TileCell.h:63
uint8_t qbit1(void) const
get quality bits of first PMT (data member)
Definition TileCell.h:203

◆ maskBadChannels()

bool TileCellBuilderFromHit::maskBadChannels ( TileDrawerEvtStatusArray & drawerEvtStatus,
TileCell * pCell,
bool single_PMT_C10,
bool Ecell,
const EventContext & ctx ) const
private

Definition at line 519 of file TileCellBuilderFromHit.cxx.

521 {
522
523 const CaloDetDescrElement* caloDDE = pCell->caloDDE();
524
525 IdentifierHash hash1 = caloDDE->onl1();
526 IdentifierHash hash2 = caloDDE->onl2();
527
528 int gain1 = pCell->gain1();
529
530 HWIdentifier ch_id1 = m_tileHWID->channel_id(hash1);
531
532 int ros1 = m_tileHWID->ros(ch_id1);
533 int drawer1 = m_tileHWID->drawer(ch_id1);
534 int chan1 = m_tileHWID->channel(ch_id1);
535 int drawerIdx1 = TileCalibUtils::getDrawerIdx(ros1, drawer1);
536 const TileBchStatus& chStatus1 = m_tileBadChanTool->getAdcStatus(drawerIdx1, chan1, (gain1 < 0) ? 1 : gain1, ctx);
537
538 // check quality first
539 bool bad1 = ((int) pCell->qual1() > m_qualityCut);
540 if (bad1) {
541 ++drawerEvtStatus[ros1][drawer1].nBadQuality;
542
543 } else {
544 // check bad status in DB
545 bad1 = (gain1 < 0) || chStatus1.isBad();
546
547 }
548
549 if ( Ecell || hash2 == TileHWID::NOT_VALID_HASH) {
550 // gap/crack scintillators with one PMT per cell
551
552 if (bad1) {
553 // only one channel in this cell and it is bad
554 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
555
556 if (gain1 == CaloGain::INVALIDGAIN) {
557 pCell->setEnergy(m_zeroEnergy, 0.0, TileID::LOWGAIN, CaloGain::INVALIDGAIN); // reset energy completely, indicate problem putting low gain
558 } else {
559 pCell->setEnergy(m_zeroEnergy, 0.0); // reset energy completely without changing gain
560 }
561 pCell->setTime(0.0); // reset time completely
562 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit1() & TileCell::MASK_ALGO)), 0); // reset quality flag for first pmt
563 pCell->setQuality(0, TileCell::MASK_BADCH, 1); // reset quality flag for second pmt
564
565 return true;
566
567 } else if (chStatus1.isBadTiming()) {
568 pCell->setTime(0.0); // channel with bad timing - no cell time
569 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
570 pCell->setQuality(pCell->qual1(), qbit1, 0); // update qbits for first pmt
571 }
572
573 } else { //cell has both PMTs
574
575 int gain2 = pCell->gain2();
576
577 HWIdentifier ch_id2 = m_tileHWID->channel_id(hash2);
578
579 int ros2 = m_tileHWID->ros(ch_id2);
580 int drawer2 = m_tileHWID->drawer(ch_id2);
581 int chan2 = m_tileHWID->channel(ch_id2);
582 int drawerIdx2 = TileCalibUtils::getDrawerIdx(ros2, drawer2);
583 const TileBchStatus& chStatus2 = m_tileBadChanTool->getAdcStatus(drawerIdx2, chan2, (gain2 < 0) ? 1 : gain2, ctx);
584
585 // check quality first
586 bool bad2 = ((int) pCell->qual2() > m_qualityCut);
587 if (bad2) {
588 ++drawerEvtStatus[ros2][drawer2].nBadQuality;
589
590 } else {
591 // check bad status in DB
592 bad2 = (gain2 < 0) || chStatus2.isBad();
593
594 }
595
596 if (single_PMT_C10) {
597 // for special C10 disconnected channel might be masked in DB
598 // and energy of good channel is taken twice with correct weight
599 // but if this channel is not masked in DB - set its bad status
600 // equal to bad status of real channel, so that cell is masked correctly
601 // if real channel connected to a cell is bad
602#ifdef ALLOW_DEBUG_COUT
603 static int cnt=0;
604 if (++cnt < 17) {
605 std::cout << "special C10 in " << ((ros2==TileHWID::EXTBAR_POS) ? "EBA" : "EBC")
606 << drawer2+1 << " status " << chan1 << "/" << chan2 << " "
607 << (chStatus1.isBad()?"bad":"good") << "/"
608 << (chStatus2.isBad()?"bad":"good") << "/"
609 << ((m_RUN2plus)?" RUN2+ cabling": "RUN1 cabling")
610 << std::endl;
611 }
612#endif
613 if (chan1 == 4) {
614 if (m_RUN2plus || !chStatus1.isBad()) {
615#ifdef ALLOW_DEBUG_COUT
616 if (cnt < 17) {
617 std::cout << "Ene of chan1 was " << pCell->ene1() << " changing to half of " << pCell->ene2()
618 << " and setting bad1=true" << std::endl;
619 }
620#endif
621 pCell->setEnergy(pCell->ene2()/2., pCell->ene2()/2., gain2, gain2);
622 //bad1 = bad2;
623 bad1 = true;
624 --drawerEvtStatus[ros1][drawer1].nMaskedChannels; // since it's fake masking, decrease counter by 1 in advance
625 }
626 } else {
627 if (m_RUN2plus || !chStatus2.isBad()) {
628#ifdef ALLOW_DEBUG_COUT
629 if (cnt < 17) {
630 std::cout << "Ene of chan2 was " << pCell->ene2() << " changing to half of " << pCell->ene1()
631 << " and setting bad2=true" << std::endl;
632 }
633#endif
634 pCell->setEnergy(pCell->ene1()/2., pCell->ene1()/2., gain1, gain1);
635 //bad2 = bad1;
636 bad2 = true;
637 --drawerEvtStatus[ros2][drawer2].nMaskedChannels; // since it's fake masking, decrease counter by 1 in advance
638 }
639 }
640 }
641 if (bad1 && bad2) {
642 // both channels are bad
643 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
644 ++drawerEvtStatus[ros2][drawer2].nMaskedChannels;
645
646 if (gain1 == CaloGain::INVALIDGAIN || gain2 == CaloGain::INVALIDGAIN) {
647 if (gain1 == CaloGain::INVALIDGAIN) gain1 = 0; // this is TileID::LOWGAIN; - commented out to make Coverity happy
648 if (gain2 == CaloGain::INVALIDGAIN) gain2 = 0; // this is TileID::LOWGAIN; - commented out to make Coverity happy
649 pCell->setEnergy(m_zeroEnergy, m_zeroEnergy, gain1, gain2); // reset energy completely, indicate problem putting low gain
650 } else {
651 pCell->setEnergy(m_zeroEnergy, m_zeroEnergy); // reset energy completely without changing gain
652 }
653 pCell->setTime(0.0); // reset time completely
654 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit1() & TileCell::MASK_ALGO)), 0); // reset quality flag for first pmt
655 pCell->setQuality(255, (TileCell::MASK_BADCH | (pCell->qbit2() & TileCell::MASK_ALGO)), 1); // reset quality flag for second pmt
656
657 return true;
658
659 } else if (bad1 && !bad2) {
660 // first channel is bad
661 ++drawerEvtStatus[ros1][drawer1].nMaskedChannels;
662
663 float ene2 = pCell->ene2();
664 pCell->setEnergy(ene2, ene2, gain2, gain2); // use energy/gain from second pmt for both pmts
665
666 if (chStatus2.isBadTiming()) {
667 pCell->setTime(0.0); // time in second pmt is bad - no cell time
668 uint8_t qual2 = pCell->qual2();
669 uint8_t qbit2 = pCell->qbit2() & (~(TileCell::MASK_TIME)); // clear time bit for second pmt
670 uint8_t qbit1 = qbit2 | TileCell::MASK_BADCH; // set bad channel bit for first pmt
671 uint8_t qual1 = qual2 + (gain1 - gain2); // if gains are different, qua11 and qual2 will be different
672 if (qual1 > m_qualityCut && gain1 > gain2) qual1 = qual2 - (gain1 - gain2); // new feature in release 17.2
673 pCell->setQuality(qual1, qbit1, 0); // change quality and qbits for first pmt
674 pCell->setQuality(qual2, qbit2, 1); // update qbits for second pmt
675 } else {
676 pCell->setTime(pCell->time2()); // use time from second pmt as cell time
677 pCell->setQuality(pCell->qual2(), (pCell->qbit2() | TileCell::MASK_BADCH), 0); // change quality flag for first pmt
678 }
679
680 return true;
681
682 } else if (!bad1 && bad2) {
683 // second channel is bad
684 ++drawerEvtStatus[ros2][drawer2].nMaskedChannels;
685
686 float ene1 = pCell->ene1();
687 pCell->setEnergy(ene1, ene1, gain1, gain1); // use energy/gain from first pmt for both pmts
688
689 if (chStatus1.isBadTiming()) {
690 pCell->setTime(0.0); // time in first pmt is bad - no cell time
691 uint8_t qual1 = pCell->qual1();
692 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
693 uint8_t qbit2 = qbit1 | TileCell::MASK_BADCH; // set bad channel bit for second pmt
694 uint8_t qual2 = qual1 + (gain2 - gain1); // if gains are different, qua11 and qual2 will be different
695 if (qual2 > m_qualityCut && gain2 > gain1) qual2 = qual1 - (gain2 - gain1); // new feature in release 17.2
696 pCell->setQuality(qual1, qbit1, 0); // update qbits for first pmt
697 pCell->setQuality(qual2, qbit2, 1); // change quality and qbits for second pmt
698 } else {
699 pCell->setTime(pCell->time1()); // use time from first pmt as cell time
700 pCell->setQuality(pCell->qual1(), (pCell->qbit1() | TileCell::MASK_BADCH), 1); // change quality flag for second pmt
701 }
702
703 return true;
704
705 } else {
706
707 if (chStatus1.isBadTiming()) {
708
709 if (chStatus2.isBadTiming()) {
710 pCell->setTime(0.0); // time in both pmts is bad - no cell time
711 uint8_t qbit2 = pCell->qbit2() & (~(TileCell::MASK_TIME)); // clear time bit for second pmt
712 pCell->setQuality(pCell->qual2(), qbit2, 1); // update qbits for second pmt
713 } else {
714 pCell->setTime(pCell->time2()); // use time from second pmt as cell time
715 }
716 uint8_t qbit1 = pCell->qbit1() & (~(TileCell::MASK_TIME)); // clear time bit for first pmt
717 pCell->setQuality(pCell->qual1(), qbit1, 0); // update qbits for first pmt
718
719 } else if (chStatus2.isBadTiming()) {
720
721 pCell->setTime(pCell->time1()); // use time from first pmt as cell time
722 uint8_t qbit2 = pCell->qbit2() & (~(TileCell::MASK_TIME)); // clear time bit for second pmt
723 pCell->setQuality(pCell->qual2(), qbit2, 1); // update qbits for second pmt
724 }
725 }
726
727 }
728
729 return single_PMT_C10;
730}
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
IdentifierHash onl2() const
cell online identifier 2
IdentifierHash onl1() const
cell online identifier 1
float time1(void) const
get time of first PMT
Definition TileCell.h:192
uint8_t qbit2(void) const
get quality bits of second PMT (data member)
Definition TileCell.h:206
uint8_t qual2(void) const
get quality of second PMT (data member)
Definition TileCell.h:200
float ene1(void) const
get energy of first PMT
Definition TileCell.h:187
float time2(void) const
get time of second PMT
Definition TileCell.h:194
float ene2(void) const
get energy of second PMT
Definition TileCell.h:189
@ EXTBAR_POS
Definition TileHWID.h:70
@ NOT_VALID_HASH
Definition TileHWID.h:314

◆ mbts_index()

int TileCellBuilderFromHit::mbts_index ( int side,
int phi,
int eta ) const
inlineprivate

Definition at line 222 of file TileCellBuilderFromHit.h.

222 {
223 return (side * NPHI + phi) * NETA + eta;
224 }

◆ process()

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

method to process all raw channels and store them in container

Definition at line 197 of file TileCellBuilderFromHit.cxx.

199{
200 //**
201 //* Get TileHits
202 //**
203
204 TileDrawerEvtStatusArray drawerEvtStatus;
205
206 SG::ReadCondHandle<TileSamplingFraction> samplingFraction(m_samplingFractionKey, ctx);
207 ATH_CHECK( samplingFraction.isValid() );
208
209 SG::ReadHandle<TileHitContainer> hitContainer(m_hitContainerKey, ctx);
210
211 if (!hitContainer.isValid()) {
212
213 ATH_MSG_WARNING( " Could not find container " << m_hitContainerKey.key() );
214 ATH_MSG_WARNING( " do not fill CaloCellContainer " );
215
216 } else {
217
218 ATH_MSG_DEBUG( "Container " << m_hitContainerKey.key() << " with TileHits found ");
219
220 std::unique_ptr<TileCellContainer> MBTSCells;
221 if (!m_MBTSContainerKey.empty()) {
222 MBTSCells = std::make_unique<TileCellContainer>(SG::VIEW_ELEMENTS);
223 }
224
225 std::unique_ptr<TileCellContainer> E4prCells;
226 if (!m_E4prContainerKey.empty()) {
227 E4prCells = std::make_unique<TileCellContainer>(SG::VIEW_ELEMENTS);
228 }
229
230 SelectAllObject<TileHitContainer> selAll(hitContainer.cptr());
231 SelectAllObject<TileHitContainer>::const_iterator begin = selAll.begin();
232 SelectAllObject<TileHitContainer>::const_iterator end = selAll.end();
233
234 const CaloNoise* caloNoise = nullptr;
235 if (!m_caloNoiseKey.empty()) {
236 SG::ReadCondHandle<CaloNoise> noiseH (m_caloNoiseKey, ctx);
237 caloNoise = noiseH.cptr();
238 }
239
240 if (begin != end) {
241 ATH_MSG_DEBUG( " Calling build() method for hits from " << m_hitContainerKey.key() );
242 build (caloNoise, drawerEvtStatus, begin, end, theCellContainer,
243 MBTSCells.get(), E4prCells.get(), *samplingFraction);
244 }
245
246 if (!m_MBTSContainerKey.empty()) {
247 SG::WriteHandle<TileCellContainer> MBTSContainer(m_MBTSContainerKey, ctx);
248 ATH_CHECK( MBTSContainer.record(std::move(MBTSCells)) );
249 }
250
251 if (!m_E4prContainerKey.empty()) {
252 SG::WriteHandle<TileCellContainer> E4prContainer(m_E4prContainerKey, ctx);
253 ATH_CHECK( E4prContainer.record(std::move(E4prCells)) );
254 }
255
257 //specify that a given calorimeter has been filled
258 if (theCellContainer->hasCalo(caloNum)) {
259 // log << MSG::WARNING << "CaloCellContainer has already been filled with TileCells (caloNum = "
260 // << caloNum << ")" << endreq ;
261 }
262 theCellContainer->setHasCalo(caloNum);
263 }
264
265 //enum EventFlagErrorState { NotSet, Warning, Error };
267 // flag will contain status of a given event
268 // every 4 bits - status of partitions LBA,LBC,EBA,EBC
269 // bits 0-3 - there is a signal above threshold in partitions
270 // bits 4-7 - there are channels with underflow (sample=0) in partition (since rel 17.2.6.4)
271 // bits 8-11 - there are channels with overflow (sample=m_tileInfo->ADCmax()) in partition (since rel 17.2.6.4)
272 // bits 12-15 - there are at least 16 drawers with bad quality in partition
273 // bits 16-19 - maximal length of consecutive bad area (since rel 17.2.6.5)
274 // bits 20-23 - there are at least 16 drawers which are completely masked in partition
275 // bits 24-27 - there are at least 16 drawers which do not send data in partition
276 // bits 28-31 - reserved for global good/warning/bad status
277 // bits 20-27 are also used for module number which gives warning status (since release 17.2.6.5)
278 // in case of warning we are sure that bits which indicates error are not filled
279 unsigned int flag = 0;
280
281 int drConsecMaxMax = 0;
282 int drConsecNum = 0;
283
284 for (int p = 1; p < 5; ++p) {
285 TileDrawerEvtStatus * evt = drawerEvtStatus[p];
286 //TileDrawerRunStatus * run = m_drawerRunStatus[p];
287 int drAbsent = 0;
288 int drMasked = 0;
289 int drConsec = 0;
290 int drConsecMax = 0;
291 int hasBadQ = 0;
292 int hasOver = 0;
293 int hasUnder = 0;
294 int hasSig = 0;
295 for (int d = 0; d < 64; ++d) {
296 if (evt[d].nChannels == 0) {
297 ++drConsec;
298 ++drAbsent;
299 //++(run[d].drawerAbsent);
300 } else if (evt[d].nMaskedChannels >= evt[d].nChannels) {
301 ++drConsec;
302 ++drMasked;
303 //++(run[d].drawerMasked);
304 } else {
305 if (drConsec > drConsecMax) {
306 drConsecMax = drConsec;
307 if (drConsecMax > drConsecMaxMax) {
308 drConsecMaxMax = drConsecMax;
309 drConsecNum = ((p - 1) << 6) | (d - drConsec);
310 }
311 }
312 drConsec = 0;
313 //if (evt[d].nMaskedChannels > 0) {
314 // ++(run[d].channelsMasked);
315 //}
316 if (evt[d].nBadQuality) ++hasBadQ;
317 if (evt[d].nOverflow) ++hasOver;
318 if (evt[d].nUnderflow) ++hasUnder;
319 if (evt[d].nSomeSignal) ++hasSig;
320 }
321 }
322 if (drConsec != 0 && drConsecMax < 64) { // 64th drawer is bad - check transition from 64th to 1st drawer
323 for (int d = 0; d < drConsecMax; ++d) {
324 if (evt[d].nChannels == 0 || evt[d].nMaskedChannels >= evt[d].nChannels) {
325 ++drConsec;
326 } else {
327 break;
328 }
329 }
330 if (drConsec > drConsecMax) {
331 drConsecMax = drConsec;
332 }
333 }
334 unsigned int fl = 0;
335 if (drAbsent > 15) {
336 fl |= 0x01000000;
338 }
339 if (drMasked > 15) {
340 fl |= 0x00100000;
342 }
343 //if (drConsecMax > 1)fl |= 0x00010000; // want to use these bits for length of consecutive area
344 if (hasBadQ > 15) fl |= 0x00001000;
345 if (hasOver) fl |= 0x00000100;
346 if (hasUnder) fl |= 0x00000010;
347 if (hasSig) fl |= 0x00000001;
348
349#ifdef ALLOW_DEBUG_COUT
350 std::cout<<"partition "<<p<<" drAbsent "<<drAbsent<<" drMasked "<<drMasked<<" drConsec "<<drConsecMax
351 <<" hasBadQ "<<hasBadQ<<" hasOver "<<hasOver<<" hasUnder "<<hasUnder<<" hasSig "<<hasSig<<std::endl;
352#endif
353 flag |= fl << (p - 1);
354 }
355
356 // number of consecutively masked modules (if it's > 15 we have error already set)
357 flag |= (std::min(15, drConsecMaxMax) << 16);
358
359 if (drConsecMaxMax > 1 && error < xAOD::EventInfo::Warning) {
360 // setting warning flag
362 // putting starting module number of consecutive bad area
363 // instead of bits which indicates 16 masked or 16 absent modules in partition
364 flag |= (drConsecNum << 20);
365#ifdef ALLOW_DEBUG_COUT
366 std::cout<<"warning in partition " << (drConsecNum>>6)+1 << " for modules "
367 <<(drConsecNum)%64 <<" - " <<(drConsecNum+drConsecMaxMax-1)%64 <<std::endl;
368#endif
369 }
370
371#ifdef ALLOW_DEBUG_COUT
372 std::cout<<"partition flag 0x0"<<std::hex<<flag<<std::dec<<" error "<<error<<std::endl;
373#endif
374
375 //++m_eventErrorCounter[error]; // error index is 0 or 1 or 2 here
376 //++m_eventErrorCounter[3]; // count separately total number of events
377
378 // retrieve EventInfo
379 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfoKey, ctx);
380
381 if (eventInfo.isValid()) {
382
383 if (flag != 0) {
384 ATH_MSG_DEBUG( " set eventInfo for Tile for this event to 0x" << MSG::hex << flag << MSG::dec );
385 if (!eventInfo->updateEventFlags(xAOD::EventInfo::Tile, flag)) {
386 ATH_MSG_WARNING( " cannot set eventInfo for Tile " );
387 }
388 }
389
390 if (error != xAOD::EventInfo::NotSet) {
391 ATH_MSG_DEBUG( " set error bits for Tile for this event to " << error );
392 if (!eventInfo->updateErrorState(xAOD::EventInfo::Tile, error)) {
393 ATH_MSG_WARNING( " cannot set error state for Tile " );
394 }
395 }
396
397 }
398 else {
399 ATH_MSG_WARNING( " cannot retrieve EventInfo, will not set Tile information " );
400 }
401
402 // Execution completed.
403 ATH_MSG_DEBUG( "TileCellBuilderFromHit execution completed." );
404
405 return StatusCode::SUCCESS;
406}
SelectAllObjectMT< DCC, OBJECT > SelectAllObject
bool hasCalo(const CaloCell_ID::SUBCALO caloNum) const
tell wether it has been filled with cells (maybe none) of a given calo
void setHasCalo(const CaloCell_ID::SUBCALO caloNum)
set which calo has been filled.
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
TileDrawerEvtStatus TileDrawerEvtStatusArray[5][64]
status of every drawer
void build(const CaloNoise *caloNoise, TileDrawerEvtStatusArray &drawerEvtStatus, const ITERATOR &begin, const ITERATOR &end, COLLECTION *coll, TileCellContainer *MBTSCells, TileCellContainer *E4prCells, const TileSamplingFraction *samplingFraction) 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

◆ qbits()

unsigned char TileCellBuilderFromHit::qbits ( TileDrawerEvtStatusArray & drawerEvtStatus,
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 431 of file TileCellBuilderFromHit.cxx.

433 {
434
435 ++drawerEvtStatus[ros][drawer].nChannels;
436 // new feature in rel 17.2.7 - count underflows and overflows
437 if (count_over) {
438 if (overflow) ++drawerEvtStatus[ros][drawer].nOverflow;
439 if (underflow) ++drawerEvtStatus[ros][drawer].nUnderflow;
440 }
441#ifdef ALLOW_DEBUG_COUT
442 if (overflow) std::cout << "channel with overflow " << ((count_over)?"":"MBTS") << std::endl;
443 if (underflow) std::cout << "channel with underflow " << ((count_over)?"":"MBTS") << std::endl;
444 if (overfit) std::cout << "channel with corrected overflow " << ((count_over)?"":"MBTS") << std::endl;
445#endif
446
447 unsigned char qbit = (overfit) ? (TileFragHash::FitFilter & TileCell::MASK_ALGO)
449 if (good_time) qbit |= TileCell::MASK_TIME;
450 if (overflow || underflow) qbit |= TileCell::MASK_OVER;
451
452 if (good_ener) {
453 qbit |= TileCell::MASK_AMPL;
454 if (count_over) {
455 ++drawerEvtStatus[ros][drawer].nSomeSignal;
456 }
457 }
458
459 return qbit;
460}
@ MASK_AMPL
Definition TileCell.h:65
@ MASK_OVER
Definition TileCell.h:64

Member Data Documentation

◆ E4ETA

const int TileCellBuilderFromHit::E4ETA = 2
staticprivate

Definition at line 226 of file TileCellBuilderFromHit.h.

◆ E4NPHI

const int TileCellBuilderFromHit::E4NPHI = 4
staticprivate

Definition at line 227 of file TileCellBuilderFromHit.h.

◆ E4SIDE

const int TileCellBuilderFromHit::E4SIDE = -1
staticprivate

Definition at line 225 of file TileCellBuilderFromHit.h.

◆ m_affectedRegionInfo_current_run

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

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

Definition at line 180 of file TileCellBuilderFromHit.h.

◆ m_affectedRegionInfo_global

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

TileDrawerRunStatus m_drawerRunStatus[5][64]; //!< overall status of drawer in whole run.

Definition at line 179 of file TileCellBuilderFromHit.h.

◆ m_cabling

const TileCablingService* TileCellBuilderFromHit::m_cabling {nullptr}
private

Pointer to TileCabling.

Definition at line 145 of file TileCellBuilderFromHit.h.

145{nullptr};

◆ m_cablingSvc

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

Name of Tile cabling service.

Definition at line 162 of file TileCellBuilderFromHit.h.

162 { this,
163 "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};

◆ m_caloNoiseKey

SG::ReadCondHandleKey<CaloNoise> TileCellBuilderFromHit::m_caloNoiseKey
private
Initial value:
{this, "CaloNoise",
"electronicNoise",
"CaloNoise object to read"}

Definition at line 104 of file TileCellBuilderFromHit.h.

104 {this, "CaloNoise",
105 "electronicNoise",
106 "CaloNoise object to read"};

◆ m_E1_TOWER

int TileCellBuilderFromHit::m_E1_TOWER
private

Definition at line 216 of file TileCellBuilderFromHit.h.

◆ m_E4prContainerKey

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

Definition at line 120 of file TileCellBuilderFromHit.h.

120 {this, "E4prContainer",
121 "E4prContainer",
122 "Output Tile E4 prime container key"};

◆ m_emScaleKey

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

Name of TileEMScale in condition store.

Definition at line 156 of file TileCellBuilderFromHit.h.

156 {this,
157 "TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"};

◆ m_eneForTimeCut

float TileCellBuilderFromHit::m_eneForTimeCut
private

keep time for channels with energy above cut

Definition at line 132 of file TileCellBuilderFromHit.h.

◆ m_eneForTimeCutMBTS

float TileCellBuilderFromHit::m_eneForTimeCutMBTS
private

similar cut for MBTS in pC

Definition at line 133 of file TileCellBuilderFromHit.h.

◆ m_eventInfoKey

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

Definition at line 111 of file TileCellBuilderFromHit.h.

111 {this, "EventInfo",
112 "EventInfo",
113 "EventInfo key"};

◆ m_hitContainerKey

SG::ReadHandleKey<TileHitContainer> TileCellBuilderFromHit::m_hitContainerKey
private
Initial value:
{this, "TileHitContainer",
"TileHitCnt",
"Input Tile hit container key"}

Definition at line 107 of file TileCellBuilderFromHit.h.

107 {this, "TileHitContainer",
108 "TileHitCnt",
109 "Input Tile hit container key"};

◆ m_infoName

std::string TileCellBuilderFromHit::m_infoName
private

Definition at line 130 of file TileCellBuilderFromHit.h.

◆ m_maskBadChannels

bool TileCellBuilderFromHit::m_maskBadChannels
private

if true=> bad channels are masked

Definition at line 139 of file TileCellBuilderFromHit.h.

◆ m_maxTime

float TileCellBuilderFromHit::m_maxTime
private

maximum time for the PMTs in the cels

Definition at line 137 of file TileCellBuilderFromHit.h.

◆ m_MBTSContainerKey

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

Definition at line 116 of file TileCellBuilderFromHit.h.

116 {this, "MBTSContainer",
117 "MBTSContainer",
118 "Output Tile MBTS container key"};

◆ m_mbtsMgr

const MbtsDetDescrManager* TileCellBuilderFromHit::m_mbtsMgr {nullptr}
private

Pointer to MbtsDetDescrManager.

Definition at line 167 of file TileCellBuilderFromHit.h.

167{nullptr};

◆ m_minTime

float TileCellBuilderFromHit::m_minTime
private

minimum time for the PMTs in the cels

Definition at line 138 of file TileCellBuilderFromHit.h.

◆ m_noiseSigma

float TileCellBuilderFromHit::m_noiseSigma
private

cell electronic noise if CaloNoise is switched off

Definition at line 140 of file TileCellBuilderFromHit.h.

◆ m_qualityCut

int TileCellBuilderFromHit::m_qualityCut
private

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

Definition at line 135 of file TileCellBuilderFromHit.h.

◆ m_RChType

TileFragHash::TYPE TileCellBuilderFromHit::m_RChType
private

Type of TileRawChannels (Fit, OF2, etc.).

Definition at line 169 of file TileCellBuilderFromHit.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> TileCellBuilderFromHit::m_rndmSvc { this, "RndmSvc", "AthRNGSvc", "Random Number Service used in TileCellBuildetFromHit" }
private

< Random number service to use

Definition at line 147 of file TileCellBuilderFromHit.h.

148{ this, "RndmSvc", "AthRNGSvc", "Random Number Service used in TileCellBuildetFromHit" };

◆ m_RUN2

bool TileCellBuilderFromHit::m_RUN2
private

Definition at line 214 of file TileCellBuilderFromHit.h.

◆ m_RUN2plus

bool TileCellBuilderFromHit::m_RUN2plus
private

Definition at line 215 of file TileCellBuilderFromHit.h.

◆ m_samplingFractionKey

SG::ReadCondHandleKey<TileSamplingFraction> TileCellBuilderFromHit::m_samplingFractionKey
private
Initial value:
{this,
"TileSamplingFraction", "TileSamplingFraction", "Input Tile sampling fraction"}

Name of TileSamplingFraction in condition store.

Definition at line 126 of file TileCellBuilderFromHit.h.

126 {this,
127 "TileSamplingFraction", "TileSamplingFraction", "Input Tile sampling fraction"};

◆ m_tileBadChanTool

ToolHandle<ITileBadChanTool> TileCellBuilderFromHit::m_tileBadChanTool
private
Initial value:
{this,
"TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"}

Definition at line 150 of file TileCellBuilderFromHit.h.

150 {this,
151 "TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"};

◆ m_tileHWID

const TileHWID* TileCellBuilderFromHit::m_tileHWID {nullptr}
private

Pointer to TileHWID.

Definition at line 144 of file TileCellBuilderFromHit.h.

144{nullptr};

◆ m_tileID

const TileID* TileCellBuilderFromHit::m_tileID {nullptr}
private

Pointer to TileID.

Definition at line 142 of file TileCellBuilderFromHit.h.

142{nullptr};

◆ m_tileMgr

const TileDetDescrManager* TileCellBuilderFromHit::m_tileMgr {nullptr}
private

Pointer to TileDetDescrManager.

Definition at line 166 of file TileCellBuilderFromHit.h.

166{nullptr};

◆ m_tileTBID

const TileTBID* TileCellBuilderFromHit::m_tileTBID {nullptr}
private

Pointer to TileTBID.

Definition at line 143 of file TileCellBuilderFromHit.h.

143{nullptr};

◆ m_zeroEnergy

float TileCellBuilderFromHit::m_zeroEnergy
private

energy to store in every PMT if both PMT are bad

Definition at line 134 of file TileCellBuilderFromHit.h.

◆ NCELLE4PR

const int TileCellBuilderFromHit::NCELLE4PR = E4NPHI
staticprivate

Definition at line 228 of file TileCellBuilderFromHit.h.

◆ NCELLMBTS

const int TileCellBuilderFromHit::NCELLMBTS = NSIDE * NPHI * NETA
staticprivate

Definition at line 221 of file TileCellBuilderFromHit.h.

◆ NETA

const int TileCellBuilderFromHit::NETA = 2
staticprivate

Definition at line 220 of file TileCellBuilderFromHit.h.

◆ NPHI

const int TileCellBuilderFromHit::NPHI = 8
staticprivate

Definition at line 219 of file TileCellBuilderFromHit.h.

◆ NSIDE

const int TileCellBuilderFromHit::NSIDE = 2
staticprivate

Definition at line 218 of file TileCellBuilderFromHit.h.


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