39#include "CaloDetDescr/CaloDetDescrElement.h"
50#include "eformat/ROBFragment.h"
51#include "eformat/FullEventFragment.h"
54#include "GaudiKernel/ITHistSvc.h"
59#include "boost/date_time/local_time/local_time.hpp"
60#include "boost/date_time/posix_time/posix_time.hpp"
65memset(array,0,sizeof(array))
67#define CLEAR1(array) \
68memset(array,-1,sizeof(array))
70#define CLEAR2(array,size) \
71 memset(array,0,sizeof(array)/size)
73#define CLEAR3(array,size) \
74 memset(array,-1,sizeof(array)/size)
77#define CLEAR4(array,size) \
78memset(array,0,sizeof(*array)*N_ROS2*N_MODULES*N_CHANS*m_nSamples/size)
81#define CLEAR5(array,size) \
82memset(array,-1,sizeof(*array)*N_ROS2*N_MODULES*N_CHANS*m_nSamples/size)
85#define CLEAR6(array) \
86memset(array,0,sizeof(*array)*N_ROS*N_MODULES*N_TMDBCHANS*m_nSamples)
94#define NAME3(s1,s2,s3) \
97#define NAME5(s1,s2,s3,s4,s5) \
98(s1+s2+s3+s4+s5).c_str()
100#define sample_ind(r,m,c,i) (((r*N_MODULES + m)*N_CHANS + c)*m_nSamples) + i
102#define sample_ind_TMDB(r,m,c,i) (((r*N_MODULES + m)*N_TMDBCHANS + c)*m_nSamples) + i
246 m_arrays->m_sample = (
short *) malloc(sample_size*
sizeof(
short));
247 m_arrays->m_sampleFlt = (
short *) malloc(sample_size*
sizeof(
short));
248 m_arrays->m_sampleTMDB = (
unsigned char *) malloc(sample_TMDB_size*
sizeof(
unsigned char));
270 return StatusCode::SUCCESS;
286 bool calibMode = (calib == 1);
287 if ( calibMode !=
m_calibMode && calib!=0xFFFFFFFF ) {
288 ATH_MSG_INFO(
"Calib mode from data is " << calibMode );
299 ATH_MSG_INFO(
"Final offline units are not set, will use DSP units" );
304 ATH_MSG_INFO(
"calibrateEnergy is disabled, don't want to use DSP units" );
327 return StatusCode::SUCCESS;
385 const eformat::FullEventFragment<const uint32_t*>*
event =
nullptr;
388 std::vector<const ROBDataProviderSvc::ROBF*> robf;
391 robFrag = (robf.size() > 0 ) ? robf[0] :
nullptr;
393 m_evTime =
event->bc_time_seconds();
397 m_l1ID[rod] = robFrag->rod_lvl1_id();
398 m_l1Type[rod] = robFrag->rod_lvl1_trigger_type();
399 m_evType[rod] = robFrag->rod_detev_type();
400 m_evBCID[rod] = robFrag->rod_bc_id();
409 m_run = ctx.eventID().run_number();
410 m_evt = ctx.eventID().event_number();
412 if ( ctx.eventID().lumi_block() ){
417 if (ctx.eventID().time_stamp() > 0) {
418 m_evTime = ctx.eventID().time_stamp();
422 using namespace boost::local_time;
423 using namespace boost::posix_time;
440 static const time_zone_ptr gva_tz(
new posix_time_zone((std::string)
"CET+01CEST01:00:00,M3.5.0/02:00:00,M10.5.0/03:00:00"));
441 local_date_time gva_time(from_time_t(
m_evTime),gva_tz);
450 struct tm gva_tm(to_tm(gva_time));
451 strftime(
m_dateTime, 32,
"%Y-%b-%d %H:%M:%S %Z", &gva_tm);
452 m_HHMMSS = gva_tm.tm_hour*10000+gva_tm.tm_min*100+gva_tm.tm_sec;
470 ATH_MSG_WARNING(
"Some problems in execute - ntuple was not filled at all" );
483 return StatusCode::SUCCESS;
493 const char* gainnames[2] = {
"LG",
"HG"};
522 for(
int chan=0;chan<28;++chan){
530 for(
int chan=28;chan<32;++chan){
539 for(
int chan=0;chan<32;++chan){
553 msg(MSG::DEBUG) << gainnames[gn] <<
" CHAN " << ch <<
" SIG= " <<
m_arrays->m_chan[chan] <<
endmsg;
554 msg(MSG::DEBUG) << gainnames[gn] <<
" CHAN " << ch <<
" PED= " <<
m_arrays->m_chan_Ped[chan] <<
"+/-" <<
m_arrays->m_chan_SPed[chan] <<
" ( " << laserObj->
isSet(ch, gn, 0) <<
" ) " <<
endmsg;
555 msg(MSG::DEBUG) << gainnames[gn] <<
" CHAN " << ch <<
" PED= " <<
m_arrays->m_chan_Lin[chan] <<
"+/-" <<
m_arrays->m_chan_SLin[chan] <<
" ( " << laserObj->
isSet(ch, gn, 1) <<
" ) " <<
endmsg;
556 msg(MSG::DEBUG) << gainnames[gn] <<
" CHAN " << ch <<
" LED= " <<
m_arrays->m_chan_Led[chan] <<
"+/-" <<
m_arrays->m_chan_SLed[chan] <<
" ( " << laserObj->
isSet(ch, gn, 2) <<
" ) " <<
endmsg;
557 msg(MSG::DEBUG) << gainnames[gn] <<
" CHAN " << ch <<
" ALP= " <<
m_arrays->m_chan_Alpha[chan] <<
"+/-" <<
m_arrays->m_chan_SAlpha[chan] <<
" ( " << laserObj->
isSet(ch, gn, 3) <<
" ) " <<
endmsg;
569 <<
" adc " <<
m_arrays->m_las_PMT_ADC[gn][i]
570 <<
" ped " <<
m_arrays->m_las_PMT_Ped[gn][i]
571 <<
" rms " <<
m_arrays->m_las_PMT_Ped_RMS[gn][i]
572 <<
" tdc " <<
m_arrays->m_las_PMT_TDC[gn][i] );
575 for (
unsigned int i=0; i<14; ++i) {
585 <<
" adc " <<
m_arrays->m_las_D_ADC[gn][i]
586 <<
" ped " <<
m_arrays->m_las_D_Ped[gn][i]
587 <<
" rms " <<
m_arrays->m_las_D_Ped_RMS[gn][i]
588 <<
" alp " <<
m_arrays->m_las_D_Alpha[gn][i]
589 <<
" rms " <<
m_arrays->m_las_D_Alpha_RMS[gn][i]
590 <<
" ape " <<
m_arrays->m_las_D_AlphaPed[gn][i]
591 <<
" rms " <<
m_arrays->m_las_D_AlphaPed_RMS[gn][i] );
596 return StatusCode::SUCCESS;
601 const uint32_t* cispar = DQstatus.
cispar();
607 if (
msgLvl(MSG::VERBOSE)) {
608 if (oldval != cispar[i]) {
612 }
else if (last == i-1) {
621 if (
msgLvl(MSG::VERBOSE)) {
632 return StatusCode::SUCCESS;
648 if (containerKey.
empty()) {
649 return StatusCode::FAILURE;
669 ATH_MSG_ERROR(
"RawChannel units are not ADC counts, can't apply DSP-like calibration" );
670 return StatusCode::FAILURE;
684 std::vector<float> sumE(3);
696 for(; itColl != itCollEnd; ++itColl) {
697 int fragId = (*itColl)->identify();
699 int drawer = fragId & 0x3F;
700 int ROS = (fragId>>8);
703 int rosH = rosI +
N_ROS;
707 <<
" Frag id 0x" << MSG::hex << fragId << MSG::dec
709 <<
" drawer " << drawer );
712 it = (*itColl)->begin();
713 itEnd = (*itColl)->end();
717 memset(E, 0,
sizeof(E));
718 memset(gain, 0,
sizeof(gain));
721 for(; it != itEnd; ++it) {
736 if(cmpCounter>48) rosI = rosH;
739 if(adc == 1) rosI = rosH;
753 ene[rosI][drawer][channel] = energy;
754 time[rosI][drawer][channel] = rch->
time();
756 ped[rosI][drawer][channel] = rch->
pedestal();
757 if (
m_arrays->m_gain[rosI][drawer][channel] < 0)
758 m_arrays->m_gain[rosI][drawer][channel] = adc;
770 if (
msgLvl(MSG::VERBOSE)) {
775 <<
" type " << std::min(
index,0)
777 <<
" time=" << rch->
time()
785 m_arrays->m_ROD_GlobalCRC[rosL][drawer] = (*itColl)->getFragGlobalCRC() & 1;
786 m_arrays->m_ROD_BCID[rosL][drawer] = (*itColl)->getFragDSPBCID();
787 m_arrays->m_ROD_DMUMask[rosL][drawer][0] = (*itColl)->getFragRODChipMask();
788 m_arrays->m_ROD_DMUMask[rosL][drawer][1] = (*itColl)->getFragFEChipMask();
790 for(
unsigned int dmu=0;dmu<
N_DMUS;dmu++) {
792 m_arrays->m_ROD_DMUBCIDErr[rosL][drawer][dmu] = ((*itColl)->getFragBCID() >> dmu) & 1;
793 m_arrays->m_ROD_DMUmemoryErr[rosL][drawer][dmu] = ((*itColl)->getFragMemoryPar() >> dmu) & 1;
794 m_arrays->m_ROD_DMUSstrobeErr[rosL][drawer][dmu] = ((*itColl)->getFragSstrobe() >> dmu) & 1;
795 m_arrays->m_ROD_DMUDstrobeErr[rosL][drawer][dmu] = ((*itColl)->getFragDstrobe() >> dmu) & 1;
796 m_arrays->m_ROD_DMUHeadformatErr[rosL][drawer][dmu] = ((*itColl)->getFragHeaderBit() >> dmu) & 1;
797 m_arrays->m_ROD_DMUHeadparityErr[rosL][drawer][dmu] = ((*itColl)->getFragHeaderPar() >> dmu) & 1;
798 m_arrays->m_ROD_DMUDataformatErr[rosL][drawer][dmu] = ((*itColl)->getFragSampleBit() >> dmu) & 1;
799 m_arrays->m_ROD_DMUDataparityErr[rosL][drawer][dmu] = ((*itColl)->getFragSamplePar() >> dmu) & 1;
800 m_arrays->m_ROD_DMUfeCRC[rosL][drawer][dmu] = ((*itColl)->getFragFEChipMask() >> dmu) & 1;
801 m_arrays->m_ROD_DMUrodCRC[rosL][drawer][dmu] = ((*itColl)->getFragRODChipMask() >> dmu) & 1;
827 for(; it != end; ++it) {
834 return StatusCode::SUCCESS;
846 if (containerKey.
empty()) {
847 return StatusCode::FAILURE;
852 SG::makeHandle (containerKey, ctx).get();
866 ATH_MSG_ERROR(
"RawChannel units are not ADC counts, can't apply DSP-like calibration" );
867 return StatusCode::FAILURE;
881 std::vector<float> sumE(3);
893 for (; itColl != itCollEnd; ++itColl) {
894 int fragId = (*itColl)->identify();
896 int drawer = fragId & 0x3F;
897 int ROS = (fragId >> 8);
900 int rosH = rosI +
N_ROS;
904 <<
" Frag id 0x" << MSG::hex << fragId << MSG::dec
906 <<
" drawer " << drawer );
909 it = (*itColl)->begin();
910 itEnd = (*itColl)->end();
914 memset(E, 0,
sizeof(E));
915 memset(gain, 0,
sizeof(gain));
917 for(; it != itEnd; ++it) {
932 if(cmpCounter>48) rosI = rosH;
935 if(adc == 1) rosI = rosH;
942 for (
int i = 0; i < 7; ++i) {
951 ene[
sample_ind(rosI,drawer,channel,i)] = energy;
955 ped[rosI][drawer][channel] = rch->
pedestal();
957 if (
m_arrays->m_gain[rosI][drawer][channel] < 0)
958 m_arrays->m_gain[rosI][drawer][channel] = adc;
961 E[channel] = ene[
sample_ind(rosI,drawer,channel,0)];
964 m_bad[rosL][drawer][channel] = (rch->
quality() > 15.99);
970 if (
msgLvl(MSG::VERBOSE)) {
975 <<
" type " << std::min(
index,0)
976 <<
" ene=" << ene[
sample_ind(rosI,drawer,channel,0)]
977 <<
" time=" << rch->
time()
985 m_arrays->m_ROD_GlobalCRC[rosL][drawer] = (*itColl)->getFragGlobalCRC() & 1;
986 m_arrays->m_ROD_BCID[rosL][drawer] = (*itColl)->getFragDSPBCID();
987 m_arrays->m_ROD_DMUMask[rosL][drawer][0] = (*itColl)->getFragRODChipMask();
988 m_arrays->m_ROD_DMUMask[rosL][drawer][1] = (*itColl)->getFragFEChipMask();
990 for(
unsigned int dmu=0;dmu<
N_DMUS;dmu++) {
992 m_arrays->m_ROD_DMUBCIDErr[rosL][drawer][dmu] = ((*itColl)->getFragBCID() >> dmu) & 1;
993 m_arrays->m_ROD_DMUmemoryErr[rosL][drawer][dmu] = ((*itColl)->getFragMemoryPar() >> dmu) & 1;
994 m_arrays->m_ROD_DMUSstrobeErr[rosL][drawer][dmu] = ((*itColl)->getFragSstrobe() >> dmu) & 1;
995 m_arrays->m_ROD_DMUDstrobeErr[rosL][drawer][dmu] = ((*itColl)->getFragDstrobe() >> dmu) & 1;
996 m_arrays->m_ROD_DMUHeadformatErr[rosL][drawer][dmu] = ((*itColl)->getFragHeaderBit() >> dmu) & 1;
997 m_arrays->m_ROD_DMUHeadparityErr[rosL][drawer][dmu] = ((*itColl)->getFragHeaderPar() >> dmu) & 1;
998 m_arrays->m_ROD_DMUDataformatErr[rosL][drawer][dmu] = ((*itColl)->getFragSampleBit() >> dmu) & 1;
999 m_arrays->m_ROD_DMUDataparityErr[rosL][drawer][dmu] = ((*itColl)->getFragSamplePar() >> dmu) & 1;
1000 m_arrays->m_ROD_DMUfeCRC[rosL][drawer][dmu] = ((*itColl)->getFragFEChipMask() >> dmu) & 1;
1001 m_arrays->m_ROD_DMUrodCRC[rosL][drawer][dmu] = ((*itColl)->getFragRODChipMask() >> dmu) & 1;
1027 for(; it != end; ++it) {
1034 return StatusCode::SUCCESS;
1048 if (containerKey.
empty())
1049 return StatusCode::FAILURE;
1055 bool emptyColl =
true;
1062 for(; itColl != itCollEnd; ++itColl) {
1063 int fragId = (*itColl)->identify();
1064 int drawer = fragId & 0x3F;
1065 int ROS = (fragId>>8);
1068 int rosH = rosI +
N_ROS;
1070 if (
msgLvl(MSG::VERBOSE)) {
1072 <<
" Frag id 0x" << MSG::hex << fragId << MSG::dec
1074 <<
" drawer " << drawer );
1078 <<
" BCID=" << (*itColl)->getFragBCID() << MSG::hex
1079 <<
" CRC=0x" << ((*itColl)->getFragCRC()&0xffff)
1080 <<
" DMUMask=0x" << ((*itColl)->getFragDMUMask()&0xffff) << MSG::dec );
1083 <<
" Lvl1Type=" << (*itColl)->getLvl1Type()
1084 <<
" EvBCID=" << (*itColl)->getRODBCID()
1085 <<
" EvType=" << (*itColl)->getDetEvType() );
1097 rod = (((rod>>2)<<1) | (rod&1));
1100 m_l1ID[rod] = (*itColl)->getLvl1Id();
1101 m_l1Type[rod] = (*itColl)->getLvl1Type();
1102 m_evType[rod] = (*itColl)->getDetEvType();
1103 m_evBCID[rod] = (*itColl)->getRODBCID();
1118 m_arrays->m_rodBCID[rosL][drawer] = (*itColl)->getRODBCID();
1119 m_arrays->m_fragSize[rosL][drawer]=(*itColl)->getFragSize();
1121 m_arrays->m_slinkCRC[rosL][drawer][0] = ((*itColl)->getFragCRC()>>16) & 0xffff;
1122 m_arrays->m_dmuMask[rosL][drawer][0] = ((*itColl)->getFragDMUMask()>>16) & 0xffff;
1123 m_arrays->m_slinkCRC[rosL][drawer][1] = (*itColl)->getFragCRC() & 0xffff;
1124 m_arrays->m_dmuMask[rosL][drawer][1] = (*itColl)->getFragDMUMask() & 0xffff;
1126 uint32_t CRCmask = (*itColl)->getFragDMUMask();
1127 uint32_t fe_crc = CRCmask & 0xFFFF;
1128 uint32_t rod_crc = CRCmask >> 16;
1130 const std::vector<uint32_t> & headerVec = (*itColl)->getFragChipHeaderWords();
1131 unsigned int headsize = std::min(16U,
static_cast<unsigned int>(headerVec.size()));
1133 for (
unsigned int ih = 0; ih < headsize; ++ih) {
1135 m_arrays->m_DMUheader[rosL][drawer][ih] = headerVec[ih];
1136 m_arrays->m_DMUbcid[rosL][drawer][ih] = (headerVec[ih] & 0xFFF);
1139 m_arrays->m_DMUmemoryErr[rosL][drawer][ih] = (headerVec[ih] >> 25 & 0x1);
1140 m_arrays->m_DMUSstrobeErr[rosL][drawer][ih] = (headerVec[ih] >> 24 & 0x1);
1141 m_arrays->m_DMUDstrobeErr[rosL][drawer][ih] = (headerVec[ih] >> 23 & 0x1);
1143 m_arrays->m_feCRC[rosL][drawer][ih] = (fe_crc >> ih & 0x1);
1144 m_arrays->m_rodCRC[rosL][drawer][ih] = (rod_crc >> ih & 0x1);
1148 const std::vector<uint32_t> & headerVecHi = (*itColl)->getFragChipHeaderWordsHigh();
1149 unsigned int headsizehi = std::min(16U,
static_cast<unsigned int>(headerVecHi.size()));
1151 for (
unsigned int ih = 0; ih < headsizehi; ++ih) {
1153 m_arrays->m_DMUheader[rosH][drawer][ih] = headerVecHi[ih];
1154 m_arrays->m_DMUbcid[rosH][drawer][ih] = (headerVecHi[ih] & 0xFFF);
1157 m_arrays->m_DMUmemoryErr[rosH][drawer][ih] = (headerVecHi[ih] >> 25 & 0x1);
1158 m_arrays->m_DMUSstrobeErr[rosH][drawer][ih] = (headerVecHi[ih] >> 24 & 0x1);
1159 m_arrays->m_DMUDstrobeErr[rosH][drawer][ih] = (headerVecHi[ih] >> 23 & 0x1);
1161 m_arrays->m_feCRC[rosH][drawer][ih] = -1 ;
1162 m_arrays->m_rodCRC[rosH][drawer][ih] = -1;
1170 for (; it != itEnd; ++it) {
1185 if (cmpCounter > 48) rosI = rosH;
1188 if (gain == 1) rosI = rosH;
1193 a_gain[rosI][drawer][channel] = gain;
1196 const std::vector<float> & sampleVec = digit->samples();
1197 int siz = sampleVec.size();
1198 if (
msgLvl(MSG::VERBOSE)) {
1200 digit->cell_ID_index(
index,pmt);
1201 msg(MSG::VERBOSE) <<
"TD ch " << channel
1203 <<
" type " << std::min(
index,0) <<
" {";
1204 for(
int i=0;i<siz;i++) {
1205 msg(MSG::VERBOSE) <<(int)sampleVec[i] <<
" ";
1211 if (
msgLvl(MSG::VERBOSE))
1214 if (
msgLvl(MSG::VERBOSE))
1217 for (
int n = 0; n < siz; ++n) {
1218 a_sample[
sample_ind(rosI,drawer,channel,n)] = (short) sampleVec[n];
1224 if (emptyColl)
return StatusCode::FAILURE;
1225 else return StatusCode::SUCCESS;
1230 const char * part[4] = {
"LBA",
"LBC",
"EBA",
"EBC"};
1248 for(; it != itLast; ++it) {
1252 const std::vector<bool> & decision = obj->GetDecision();
1253 int siz = decision.size();
1257 int fragId = (*it)->identify();
1258 int drawer = fragId & 0x3F;
1259 int ros = ((fragId>>8) & 0xF) - 1;
1260 bcid[2] = ((fragId>>24) & 0xF);
1261 bcid[1] = ((fragId>>20) & 0xF);
1262 bcid[0] = ((fragId>>16) & 0XF);
1269 for (
int n = 0; n < siz; ++n) {
1270 m_arrays->m_decisionTMDB[ros][drawer][n] = (
unsigned char) decision[n];
1273 for (
int n = 0; n < 3; ++n) {
1274 m_arrays->m_bcidTMDB[ros][drawer][n] = (
unsigned char) bcid[n];
1277 if (
msgLvl(MSG::VERBOSE)) {
1278 std::stringstream
ss;
1279 for (
int n = 0; n < siz; ++n) {
1280 ss<<std::setw(5)<<(int)
m_arrays->m_decisionTMDB[ros][drawer][n];
1282 ATH_MSG_VERBOSE(
"TMDB 0x" <<MSG::hex<< fragId <<MSG::dec<<
" "<< part[ros]
1283 << std::setfill(
'0') << std::setw(2)
1284 << drawer+1 << std::setfill(
' ')
1285 <<
" BCID check " << bcid[0] <<
"/"<< bcid[1] <<
"/"<< bcid[2] <<
" decision: " <<
ss.str() );
1291 return StatusCode::SUCCESS;
1296 const char * part[4] = {
"LBA",
"LBC",
"EBA",
"EBC"};
1311 for(; itColl1 != itCollEnd1; ++itColl1) {
1318 int fragId = (*itColl1)->identify();
1319 int drawer = fragId & 0x3F;
1320 int ros = (fragId>>8) - 1;
1323 ATH_MSG_VERBOSE(
"TMDB 0x" <<MSG::hex<< fragId <<MSG::dec<<
" "<< part[ros]
1324 << std::setfill(
'0') << std::setw(2)
1325 << drawer+1 << std::setfill(
' ') );
1327 for (; it1 != itEnd1; ++it1) {
1330 ATH_MSG_WARNING(
"Too many channels in TMDB Digi container for frag 0x" <<MSG::hex<< fragId <<MSG::dec <<
" keeping only first " <<
N_TMDBCHANS <<
" channels in ntuple ");
1337 const std::vector<float> & sampleVec = digit->samples();
1338 int siz = sampleVec.size();
1345 for (
int n = 0; n < siz; ++n) {
1349 if (
msgLvl(MSG::VERBOSE)) {
1350 std::stringstream
ss;
1351 for (
int n = 0; n < siz; ++n) {
1363 return StatusCode::SUCCESS;
1368 const char * part[4] = {
"LBA",
"LBC",
"EBA",
"EBC"};
1383 for(; itColl2 != itCollEnd2; ++itColl2) {
1390 int fragId = (*itColl2)->identify();
1391 int drawer = fragId & 0x3F;
1392 int ros = (fragId>>8) - 1;
1395 ATH_MSG_VERBOSE(
"TMDB 0x" <<MSG::hex<< fragId <<MSG::dec<<
" "<< part[ros]
1396 << std::setfill(
'0') << std::setw(2)
1397 << drawer+1 << std::setfill(
' ') );
1399 for (; it2 != itEnd2; ++it2) {
1402 ATH_MSG_WARNING(
"Too many channels in TMDB RCh container for frag 0x" <<MSG::hex<< fragId <<MSG::dec <<
" keeping only first " <<
N_TMDBCHANS <<
" channels in ntuple ");
1408 m_arrays->m_eTMDB[ros][drawer][ichannel] =
rc -> amplitude();
1418 return StatusCode::SUCCESS;
1431 return StatusCode::SUCCESS;
1443 return StatusCode::SUCCESS;
1451 std::vector<std::string>
files;
1452 m_fileMgr->getFiles(Io::ROOT, ( Io::WRITE | Io::CREATE ),
files);
1466 TTree* ntuplePtr =
new TTree(ntupleID.c_str(),
"TileCal-CellMap");
1468 ATH_MSG_ERROR(
"Problem registering TileRec CellMap Tree" );
1494 std::string ntupleDCS =
"Tile_DCS";
1495 m_DCSntuplePtr =
new TTree(ntupleDCS.c_str(),
"TileCal-DCS data");
1502 return StatusCode::SUCCESS;
1534 float eta[4][64][48];
1535 float phi[4][64][48];
1536 short tower[4][64][48];
1537 short sample[4][64][48];
1538 short ind[4][64][48];
1539 short pmt[4][64][48];
1540 short bad[4][64][48][2];
1550 ntuplePtr->Branch(
"eta",
eta,
"eta[4][64][48]/F");
1551 ntuplePtr->Branch(
"phi",
phi,
"phi[4][64][48]/F");
1552 ntuplePtr->Branch(
"tower", tower,
"tower[4][64][48]/S");
1553 ntuplePtr->Branch(
"sample", sample,
"sample[4][64][48]/S");
1554 ntuplePtr->Branch(
"ind", ind,
"ind[4][64][48]/S");
1555 ntuplePtr->Branch(
"pmt", pmt,
"pmt[4][64][48]/S");
1556 ntuplePtr->Branch(
"bad",
bad,
"bad[4][64][48][2]/S");
1561 for (; itr != end; ++itr) {
1565 for (
int i = 0; i < 2; ++i) {
1574 pm =
m_cabling->channel2hole(ROS, chan);
1575 if ((ROS == 3 && drawer == 14) || (ROS == 4 && drawer == 17)) {
1576 if (pm < 0) pm = -pm;
1577 if (chan == 2 || chan == 3) pm = -pm;
1581 eta[rosI][drawer][chan] = caloDDE->
eta();
1582 phi[rosI][drawer][chan] = caloDDE->
phi();
1583 tower[rosI][drawer][chan] =
m_tileID->tower(cell_id);
1584 sample[rosI][drawer][chan] =
m_tileID->sample(cell_id);
1585 ind[rosI][drawer][chan] =
index;
1586 pmt[rosI][drawer][chan] = pm;
1592 if (
detStore()->retrieve(mbtsMgr).isFailure() ) {
1593 ATH_MSG_WARNING(
"Unable to retrieve MbtsDetDescrManager from DetectorStore" );
1596 for (
int ROS = 1; ROS < 5; ++ROS) {
1598 for (
int drawer = 0; drawer < 64; ++drawer) {
1599 for (
int chan = 0; chan < 48; ++chan) {
1600 for (
int adc = 0; adc < 2; ++adc) {
1606 ind[rosI][drawer][chan] =
index;
1607 pmt[rosI][drawer][chan] = 1;
1611 if (caloDDE->
z() > 0.0)
1612 eta[rosI][drawer][chan] = fabs(caloDDE->
eta());
1614 eta[rosI][drawer][chan] = -fabs(caloDDE->
eta());
1615 phi[rosI][drawer][chan] = caloDDE->
phi();
1646 std::string dim =
"[" + std::to_string(
N_RODS) +
"]/I";
1657 //Clear Tree TRIGGER variables
1690 //Clear Tree CISPAR variables
1711 const char* gainnames[2] = {
"LG",
"HG"};
1712 const char* channames[16] = {
"Diode0",
"Diode1",
"Diode2",
"Diode3",
"Diode4",
"Diode5",
"Diode6",
"Diode7",
1713 "Diode8",
"Diode9",
"ExtCIS0",
"IntCIS",
"DiodePhocal",
"ExtCIS1",
"PMT1",
"PMT2"};
1728 for(
int chan=0;chan<32;++chan){
1731 m_ntuplePtr->Branch(Form(
"LASER_%s_%s_ADC",gainnames[gn],channames[ch]),&(
m_arrays->m_chan[chan]),Form(
"LASER_%s_%s_ADC/I",gainnames[gn],channames[ch]));
1732 m_ntuplePtr->Branch(Form(
"LASER_%s_%s_Ped",gainnames[gn],channames[ch]),&(
m_arrays->m_chan_Ped[chan]),Form(
"LASER_%s_%s_Ped/F",gainnames[gn],channames[ch]));
1733 m_ntuplePtr->Branch(Form(
"LASER_%s_%s_Led",gainnames[gn],channames[ch]),&(
m_arrays->m_chan_Led[chan]),Form(
"LASER_%s_%s_Led/F",gainnames[gn],channames[ch]));
1734 m_ntuplePtr->Branch(Form(
"LASER_%s_%s_Ped1",gainnames[gn],channames[ch]),&(
m_arrays->m_chan_Lin[chan]),Form(
"LASER_%s_%s_Ped1/F",gainnames[gn],channames[ch]));
1735 m_ntuplePtr->Branch(Form(
"LASER_%s_%s_Alpha",gainnames[gn],channames[ch]),&(
m_arrays->m_chan_Alpha[chan]),Form(
"LASER_%s_%s_Alpha/F",gainnames[gn],channames[ch]));
1736 m_ntuplePtr->Branch(Form(
"LASER_%s_%s_Sigma_Ped",gainnames[gn],channames[ch]),&(
m_arrays->m_chan_SPed[chan]),Form(
"LASER_%s_%s_Sigma_Ped/F",gainnames[gn],channames[ch]));
1737 m_ntuplePtr->Branch(Form(
"LASER_%s_%s_Sigma_Led",gainnames[gn],channames[ch]),&(
m_arrays->m_chan_SLed[chan]),Form(
"LASER_%s_%s_Sigma_Led/F",gainnames[gn],channames[ch]));
1738 m_ntuplePtr->Branch(Form(
"LASER_%s_%s_Sigma_Ped1",gainnames[gn],channames[ch]),&(
m_arrays->m_chan_SLin[chan]),Form(
"LASER_%s_%s_Sigma_Ped1/F",gainnames[gn],channames[ch]));
1739 m_ntuplePtr->Branch(Form(
"LASER_%s_%s_Sigma_Alpha",gainnames[gn],channames[ch]),&(
m_arrays->m_chan_SAlpha[chan]),Form(
"LASER_%s_%s_Sigma_Alpha/F",gainnames[gn],channames[ch]));
1746 m_ntuplePtr->Branch(
"LASER_Diode_1_ADC", &(
m_arrays->m_las_D_ADC[0][0]),
"LASER_Diode_1_ADC/I");
1747 m_ntuplePtr->Branch(
"LASER_Diode_2_ADC", &(
m_arrays->m_las_D_ADC[0][1]),
"LASER_Diode_2_ADC/I");
1748 m_ntuplePtr->Branch(
"LASER_Diode_3_ADC", &(
m_arrays->m_las_D_ADC[0][2]),
"LASER_Diode_3_ADC/I");
1749 m_ntuplePtr->Branch(
"LASER_Diode_4_ADC", &(
m_arrays->m_las_D_ADC[0][3]),
"LASER_Diode_4_ADC/I");
1751 m_ntuplePtr->Branch(
"LASER_Diode_1_Ped", &(
m_arrays->m_las_D_Ped[0][0]),
"LASER_Diode_1_Ped/F");
1752 m_ntuplePtr->Branch(
"LASER_Diode_2_Ped", &(
m_arrays->m_las_D_Ped[0][1]),
"LASER_Diode_2_Ped/F");
1753 m_ntuplePtr->Branch(
"LASER_Diode_3_Ped", &(
m_arrays->m_las_D_Ped[0][2]),
"LASER_Diode_3_Ped/F");
1754 m_ntuplePtr->Branch(
"LASER_Diode_4_Ped", &(
m_arrays->m_las_D_Ped[0][3]),
"LASER_Diode_4_Ped/F");
1756 m_ntuplePtr->Branch(
"LASER_Diode_1_Ped_RMS", &(
m_arrays->m_las_D_Ped_RMS[0][0]),
"LASER_Diode_1_Ped_RMS/F");
1757 m_ntuplePtr->Branch(
"LASER_Diode_2_Ped_RMS", &(
m_arrays->m_las_D_Ped_RMS[0][1]),
"LASER_Diode_2_Ped_RMS/F");
1758 m_ntuplePtr->Branch(
"LASER_Diode_3_Ped_RMS", &(
m_arrays->m_las_D_Ped_RMS[0][2]),
"LASER_Diode_3_Ped_RMS/F");
1759 m_ntuplePtr->Branch(
"LASER_Diode_4_Ped_RMS", &(
m_arrays->m_las_D_Ped_RMS[0][3]),
"LASER_Diode_4_Ped_RMS/F");
1761 m_ntuplePtr->Branch(
"LASER_Diode_1_Alpha", &(
m_arrays->m_las_D_Alpha[0][0]),
"LASER_Diode_1_Alpha/F");
1762 m_ntuplePtr->Branch(
"LASER_Diode_2_Alpha", &(
m_arrays->m_las_D_Alpha[0][1]),
"LASER_Diode_2_Alpha/F");
1763 m_ntuplePtr->Branch(
"LASER_Diode_3_Alpha", &(
m_arrays->m_las_D_Alpha[0][2]),
"LASER_Diode_3_Alpha/F");
1764 m_ntuplePtr->Branch(
"LASER_Diode_4_Alpha", &(
m_arrays->m_las_D_Alpha[0][3]),
"LASER_Diode_4_Alpha/F");
1766 m_ntuplePtr->Branch(
"LASER_Diode_1_Alpha_RMS", &(
m_arrays->m_las_D_Alpha_RMS[0][0]),
"LASER_Diode_1_Alpha_RMS/F");
1767 m_ntuplePtr->Branch(
"LASER_Diode_2_Alpha_RMS", &(
m_arrays->m_las_D_Alpha_RMS[0][1]),
"LASER_Diode_2_Alpha_RMS/F");
1768 m_ntuplePtr->Branch(
"LASER_Diode_3_Alpha_RMS", &(
m_arrays->m_las_D_Alpha_RMS[0][2]),
"LASER_Diode_3_Alpha_RMS/F");
1769 m_ntuplePtr->Branch(
"LASER_Diode_4_Alpha_RMS", &(
m_arrays->m_las_D_Alpha_RMS[0][3]),
"LASER_Diode_4_Alpha_RMS/F");
1771 m_ntuplePtr->Branch(
"LASER_Diode_1_AlphaPed", &(
m_arrays->m_las_D_AlphaPed[0][0]),
"LASER_Diode_1_AlphaPed/F");
1772 m_ntuplePtr->Branch(
"LASER_Diode_2_AlphaPed", &(
m_arrays->m_las_D_AlphaPed[0][1]),
"LASER_Diode_2_AlphaPed/F");
1773 m_ntuplePtr->Branch(
"LASER_Diode_3_AlphaPed", &(
m_arrays->m_las_D_AlphaPed[0][2]),
"LASER_Diode_3_AlphaPed/F");
1774 m_ntuplePtr->Branch(
"LASER_Diode_4_AlphaPed", &(
m_arrays->m_las_D_AlphaPed[0][3]),
"LASER_Diode_4_AlphaPed/F");
1776 m_ntuplePtr->Branch(
"LASER_Diode_1_AlphaPed_RMS", &(
m_arrays->m_las_D_AlphaPed_RMS[0][0]),
"LASER_Diode_1_AlphaPed_RMS/F");
1777 m_ntuplePtr->Branch(
"LASER_Diode_2_AlphaPed_RMS", &(
m_arrays->m_las_D_AlphaPed_RMS[0][1]),
"LASER_Diode_2_AlphaPed_RMS/F");
1778 m_ntuplePtr->Branch(
"LASER_Diode_3_AlphaPed_RMS", &(
m_arrays->m_las_D_AlphaPed_RMS[0][2]),
"LASER_Diode_3_AlphaPed_RMS/F");
1779 m_ntuplePtr->Branch(
"LASER_Diode_4_AlphaPed_RMS", &(
m_arrays->m_las_D_AlphaPed_RMS[0][3]),
"LASER_Diode_4_AlphaPed_RMS/F");
1781 m_ntuplePtr->Branch(
"LASER_PMT_1_ADC", &(
m_arrays->m_las_PMT_ADC[0][0]),
"LASER_PMT_1_ADC/I");
1782 m_ntuplePtr->Branch(
"LASER_PMT_2_ADC", &(
m_arrays->m_las_PMT_ADC[0][1]),
"LASER_PMT_2_ADC/I");
1784 m_ntuplePtr->Branch(
"LASER_PMT_1_TDC", &(
m_arrays->m_las_PMT_TDC[0][0]),
"LASER_PMT_1_TDC/I");
1785 m_ntuplePtr->Branch(
"LASER_PMT_2_TDC", &(
m_arrays->m_las_PMT_TDC[0][1]),
"LASER_PMT_2_TDC/I");
1787 m_ntuplePtr->Branch(
"LASER_PMT_1_Ped", &(
m_arrays->m_las_PMT_Ped[0][0]),
"LASER_PMT_1_Ped/F");
1788 m_ntuplePtr->Branch(
"LASER_PMT_2_Ped", &(
m_arrays->m_las_PMT_Ped[0][1]),
"LASER_PMT_2_Ped/F");
1790 m_ntuplePtr->Branch(
"LASER_PMT_1_Ped_RMS", &(
m_arrays->m_las_PMT_Ped_RMS[0][0]),
"LASER_PMT_1_Ped_RMS/F");
1791 m_ntuplePtr->Branch(
"LASER_PMT_2_Ped_RMS", &(
m_arrays->m_las_PMT_Ped_RMS[0][1]),
"LASER_PMT_2_Ped_RMS/F");
1802 //Clear Tree LASER variables
1833 memset(
m_arrays->m_las_D_Alpha_RMS, 0,
sizeof(
m_arrays->m_las_D_Alpha_RMS));
1835 memset(
m_arrays->m_las_D_AlphaPed_RMS, 0,
sizeof(
m_arrays->m_las_D_AlphaPed_RMS));
1840 memset(
m_arrays->m_las_PMT_Ped_RMS, 0,
sizeof(
m_arrays->m_las_PMT_Ped_RMS));
1854 std::string suf[3] = {
"_lo",
"_hi",
""};
1872 int imin = 2,
imax = 3,
ir = 0, is = 0;
1880 int size = sample_size * (
imax-imin);
1881 m_arrays->m_eMF = (
float *) malloc(
size*
sizeof(
float));
1882 m_arrays->m_tMF = (
float *) malloc(
size*
sizeof(
float));
1885 for (
int i = imin; i <
imax; ++i) {
1887 std::string f_suf(suf[i]);
1905 std::string samples =
"[4][64][48][" + std::to_string(
m_nSamples) +
"]/S";
2014 std::string f_samples =
"[4][64][48][" + std::to_string(
m_nSamples) +
"]/F";
2023 m_ntuplePtr->Branch(
"ROD_GlobalCRC",
m_arrays->m_ROD_GlobalCRC,
"ROD_GlobalCRC[4][64]/S");
2025 m_ntuplePtr->Branch(
"ROD_DMUBCIDErr",
m_arrays->m_ROD_DMUBCIDErr,
"ROD_DMUBCIDErr[4][64][16]/S");
2026 m_ntuplePtr->Branch(
"ROD_DMUmemoryErr",
m_arrays->m_ROD_DMUmemoryErr,
"ROD_DMUmemoryErr[4][64][16]/S");
2027 m_ntuplePtr->Branch(
"ROD_DMUSstrobeErr",
m_arrays->m_ROD_DMUSstrobeErr,
"ROD_DMUSstrobeErr[4][64][16]/S");
2028 m_ntuplePtr->Branch(
"ROD_DMUDstrobeErr",
m_arrays->m_ROD_DMUDstrobeErr,
"ROD_DMUDstrobeErr[4][64][16]/S");
2029 m_ntuplePtr->Branch(
"ROD_DMUheadformatErr",
m_arrays->m_ROD_DMUHeadformatErr,
"ROD_DMUheadformatErr[4][64][16]/S");
2030 m_ntuplePtr->Branch(
"ROD_DMUheadparityErr",
m_arrays->m_ROD_DMUHeadparityErr,
"ROD_DMUheadparityErr[4][64][16]/S");
2031 m_ntuplePtr->Branch(
"ROD_DMUdataformatErr",
m_arrays->m_ROD_DMUDataformatErr,
"ROD_DMUdataformatErr[4][64][16]/S");
2032 m_ntuplePtr->Branch(
"ROD_DMUdataparityErr",
m_arrays->m_ROD_DMUDataparityErr,
"ROD_DMUdataparityErr[4][64][16]/S");
2194 m_ntuplePtr->Branch(
"decisionTMDB",
m_arrays->m_decisionTMDB,
"decisionTMDB[4][64][4]/b");
2220 for (
int i = 0; i < 9; ++i) {
2221 br[i] = (mask % 10);
2270 for (
int ROS = 1; ROS < 5; ++ROS) {
2273 for (
int drawer = 0; drawer < 64; ++drawer) {
2276 bool drbad =
m_tileDCS->isStatusBad(ROS, drawer);
2284 <<
" DRSTATES=" <<
m_arrays->m_DRSTATES[rosI][drawer]
2285 <<
" DRSTATUS=" <<
m_arrays->m_DRSTATUS[rosI][drawer]
2286 <<
" => " << ((drbad) ?
"bad" :
"good") );
2290 for (
int channel=0; channel<48; ++channel){
2292 m_arrays->m_HV[rosI][drawer][channel] =
m_tileDCS->getChannelHV(ROS, drawer, channel);
2293 m_arrays->m_HVSET[rosI][drawer][channel] =
m_tileDCS->getChannelHVSet(ROS, drawer, channel);
2294 m_arrays->m_HVSTATUS[rosI][drawer][channel] =
m_tileDCS->getDCSHVStatus(ROS, drawer, channel);
2295 m_arrays->m_CHSTATUS[rosI][drawer][channel] =
m_tileDCS->getDCSStatus(ROS, drawer, channel)
2297 bool chbad =
m_tileDCS->isStatusBad(ROS, drawer, channel);
2299 if (chbad || chStat.
isBad()) {
2305 if (
m_tileDCS->isStatusHVBad(ROS, drawer, channel)) {
2309 if (
msgLvl(MSG::VERBOSE) || (chbad && !drbad)) {
2310 int pmt=abs(
m_cabling->channel2hole(ROS,channel));
2312 <<
" channel=" << channel <<
" pmt=" << pmt
2313 <<
" HV=" <<
m_arrays->m_HV[rosI][drawer][channel]
2314 <<
" HVSET=" <<
m_arrays->m_HVSET[rosI][drawer][channel]
2315 <<
" HVSTATUS=" <<
m_arrays->m_HVSTATUS[rosI][drawer][channel]
2316 <<
" CHSTATUS=" <<
m_arrays->m_CHSTATUS[rosI][drawer][channel]
2317 <<
" => " << ((chbad) ?
"bad" :
"good") );
2321 for (
int ind=0; ind<7; ++ind){
2322 m_arrays->m_TEMP[rosI][drawer][ind] =
m_tileDCS->getChannelHV(ROS, drawer, ind+48);
2324 <<
" TEMP" << ind+1 <<
"=" <<
m_arrays->m_TEMP[rosI][drawer][ind] );
2339 return StatusCode::SUCCESS;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
Property holding a SG store/key/clid from which a ReadHandle is made.
size_t size() const
Number of registered mappings.
#define CLEAR5(array, size)
#define CLEAR4(array, size)
#define sample_ind_TMDB(r, m, c, i)
#define CLEAR2(array, size)
#define sample_ind(r, m, c, i)
#define NAME3(s1, s2, s3)
#define CLEAR3(array, size)
#define N_ROS
Filename : TileAANtuple.h Author : Alexander Solodkov (based on TileTBAANtuple) Created : April,...
TileContainer< TileMuonReceiverObj > TileMuonReceiverContainer
TileContainer< TileL2 > TileL2Container
static const Attributes_t empty
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
bool msgLvl(const MSG::Level lvl) const
This class groups all DetDescr information related to a CaloCell.
Identifier identify() const override final
cell identifier
float eta() const
cell eta
float phi() const
cell phi
IdentifierHash onl2() const
cell online identifier 2
IdentifierHash onl1() const
cell online identifier 1
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
const_iterator end() const noexcept
const_iterator begin() const noexcept
This is a "hash" representation of an Identifier.
CaloDetDescrElement * get_element(const Identifier &elementId) const
Property holding a SG store/key/clid from which a ReadHandle is made.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
int m_l1ID[N_RODS]
Level1 ID from ROD header.
float m_sumEt_yy[N_DRAWERS]
Sum Et calcualted inside DSP.
StatusCode storeTMDBDigits(const EventContext &ctx)
float m_sumEt_zz[N_DRAWERS]
Sum Et recalculated offline using offline OF.
StatusCode execute(const EventContext &ctx)
Execute method.
bool m_pmtOrder
change channel ordering to pmt ordering in ntuple
StatusCode storeRawChannels(const EventContext &ctx, const SG::ReadHandleKey< TileRawChannelContainer > &containerKey, float ene[N_ROS2][N_MODULES][N_CHANS], float time[N_ROS2][N_MODULES][N_CHANS], float chi2[N_ROS2][N_MODULES][N_CHANS], float ped[N_ROS2][N_MODULES][N_CHANS], bool fillAll)
/ Fill ntuple with data from TRC.
StatusCode storeBeamElements(const TileDQstatus &DQstatus)
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
void TRIGGER_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add TRIGGER variables t...
SG::ReadHandleKey< TileBeamElemContainer > m_beamElemContainerKey
bool m_calibMode
If data should be put in calib mode.
int m_finalUnit
calibrate everything to this level
void DIGI_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree DIGI variables...
SG::ReadHandleKey< TileLaserObject > m_laserObjectKey
bool m_useDspUnits
true if energy should be converted to units used in DSP
std::unique_ptr< Arrays > m_arrays
StatusCode initNTuple(const EventContext &ctx)
StatusCode storeTMDBRawChannel(const EventContext &ctxx)
uint32_t m_cispar[N_CISPAR]
StatusCode storeLaser(const EventContext &ctx)
float m_sumE_xx[N_DRAWERS]
Sum E recalculated offline using DSP raw channels.
ToolHandle< ITileDCSTool > m_tileDCS
float m_sumEz_xx[N_DRAWERS]
Sum Ez recalculated offline using DSP raw channels.
float m_sumEz_yy[N_DRAWERS]
Sum Ez calcualted inside DSP.
StatusCode initialize()
Alg standard interface function.
TileRawChannelUnit::UNIT m_rchUnit
Unit for TileRawChannels (ADC, pCb, MeV).
SG::ReadHandleKey< TileDigitsContainer > m_tileMuRcvDigitsContainerKey
StatusCode storeMFRawChannels(const EventContext &ctx, const SG::ReadHandleKey< TileRawChannelContainer > &containerKey, float *ene, float *time, float chi2[N_ROS2][N_MODULES][N_CHANS], float ped[N_ROS2][N_MODULES][N_CHANS], bool fillAll)
void LASER_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree LASER variabl...
SG::ReadHandleKey< TileL2Container > m_l2CntKey
void CISPAR_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree CISPAR variabl...
ServiceHandle< IFileMgr > m_fileMgr
bool m_bad[N_ROS][N_MODULES][N_CHANS]
TileRawChannelUnit::UNIT m_dspUnit
Unit for TileRawChannels in DSP.
void TMDB_addBranch(void)
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
SG::ReadHandleKey< TileRawChannelContainer > m_of1RawChannelContainerKey
std::vector< uint32_t > m_ROBID
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
main Tile Calibration tool
void fillCellMap(TTree *ntuplePtr)
///////////////////////////////////////////////////////////////////////////
ServiceHandle< IROBDataProviderSvc > m_robSvc
bool m_compareMode
If two sets of data should be compared (e.g.
float m_sumEt_xx[N_DRAWERS]
Sum Et recalculated offline using DSP raw channels.
int digiChannel2PMT(int fragType, int chan)
StatusCode storeDigits(const EventContext &ctx, const SG::ReadHandleKey< TileDigitsContainer > &containerKey, short *sample, short gain[N_ROS2][N_MODULES][N_CHANS], bool fillAll)
/ Fill Ntuple with info from TileDigits / Return true if the collection is empty
SG::ReadHandleKey< TileRawChannelContainer > m_dspRawChannelContainerKey
int m_evt
event number in a run
void TMDB_clearBranch(void)
SG::ReadHandleKey< TileDigitsContainer > m_fltDigitsContainerKey
StatusCode storeTMDBDecision(const EventContext &ctx)
int m_nSamples
number of samples
ToolHandle< TileL2Builder > m_l2Builder
ServiceHandle< ITHistSvc > m_thistSvc
TileAANtuple(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadHandleKey< TileRawChannelContainer > m_wienerRawChannelContainerKey
short CheckDMUFormat(uint32_t header)
bit_31 of the DMU header must be 1 and bit_17 of the DMU header must be 0
short CheckDMUParity(uint32_t header)
Parity of the DMU header should be odd.
SG::ReadHandleKey< TileRawChannelContainer > m_qieRawChannelContainerKey
int m_l1Type[N_RODS]
Level1 Type from ROD header.
float m_sumEz_zz[N_DRAWERS]
Sum Ez recalculated offline using offline OF.
bool m_calibrateEnergy
convert energy to new units or use amplitude from RawChannel directly
int m_lumiBlock
lumiblock number in a run
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
uint32_t m_dspFlags
DSP flags from BS.
int m_trigType
trigger type (1=Phys, 2=Laser, 4=Ped, 8=CIS)
void CISPAR_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree CISPAR variab...
SG::ReadHandleKey< TileRawChannelContainer > m_fitcRawChannelContainerKey
bool m_checkDCS
if false, do not use TileDCS at all
void DIGI_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// /Clear Tree DIGI variabl...
float m_sumE_zz[N_DRAWERS]
Sum E recalculated offline using offline OF.
void LASER_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree LASER variable...
int m_HHMMSS
event time in HH:MM:SS
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
SG::ReadCondHandleKey< TileHid2RESrcID > m_hid2RESrcIDKey
float m_sumE_yy[N_DRAWERS]
Sum E calcualted inside DSP.
const TileCablingService * m_cabling
cabling tool
SG::ReadHandleKey< TileRawChannelContainer > m_fitRawChannelContainerKey
bool m_bsInput
true if bytestream file is used
SG::ReadHandleKey< TileRawChannelContainer > m_mfRawChannelContainerKey
void TRIGGER_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree TRIGGER varia...
SG::ReadHandleKey< TileMuonReceiverContainer > m_tileMuRcvContainerKey
int m_evType[N_RODS]
Event Type from ROD header.
SG::ReadHandleKey< TileRawChannelContainer > m_optRawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_tileMuRcvRawChannelContainerKey
int m_DCSBranches
mask like 110101 - which DCS branches to fill
ToolHandle< ITileBadChanTool > m_tileBadChanTool
Tile Bad Channel tool.
const TileDetDescrManager * m_tileMgr
Pointer to TileDetDescrManager.
int m_evBCID[N_RODS]
Event BCID from ROD header.
char m_dateTime[32]
event date and time
StatusCode ntuple_clear()
const TileHWID * m_tileHWID
StatusCode ntuple_initialize(const EventContext &ctx, const TileDQstatus &DQstatus)
Class holding bad channel problems.
static const TileCablingService * getInstance()
get pointer to service instance
static std::string getDrawerString(unsigned int ros, unsigned int drawer)
Return the drawer name, e.g.
static unsigned int getDrawerIdxFromFragId(unsigned int fragId)
Returns a drawer hash from fragId This function assumes drawer context (i.e.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Class that holds Data Quality fragment information and provides functions to extract the data quality...
uint32_t calibMode() const
Calibration mode.
const uint32_t * cispar() const
CIS parameters.
calo_element_vec::const_iterator calo_element_const_iterator
int getFiltNumber() const
double getSigmaPedAlpha(const unsigned int i, const unsigned int gain=0) const
double getSigmaAlpha(const unsigned int i, const unsigned int gain=0) const
double getPedestalAlpha(const unsigned int i, const unsigned int gain=0) const
double getMean(int chan, int gain, int type) const
double getPumpDiodeTemp() const
int getPMADC(const unsigned int j, const unsigned int gain=0) const
double getPMSigmaPedestal(const unsigned int j, const unsigned int gain=0) const
double getAlpha(const unsigned int i, const unsigned int gain=0) const
double getDiodeCurrOrd() const
int getDiodeADC(const unsigned int i, const unsigned int gain=0) const
bool getQDCTimeout() const
double getDiodeSigmaPedestal(const unsigned int i, const unsigned int gain=0) const
double getDiodePedestal(const unsigned int i, const unsigned int gain=0) const
bool isSet(int chan, int gain, int type) const
int getTDC(const unsigned int j, const unsigned int gain=0) const
double getDiodeCurrMeas() const
bool getTDCTimeout() const
double getSigma(int chan, int gain, int type) const
double getPMPedestal(const unsigned int j, const unsigned int gain=0) const
@ OnlineMegaElectronVolts
float pedestal(void) const
float time(int ind=0) const
float quality(int ind=0) const
float amplitude(int ind=0) const
uint32_t get_bsflags() const
Identifier cell_ID_index(int &index, int &pmt) const
HWIdentifier adc_HWID(void) const
double chi2(TH1 *h0, TH1 *h1)
int ir
counter of the current depth
std::vector< std::string > files
file names and file pointers
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())