 |
ATLAS Offline Software
|
Go to the documentation of this file.
47 #define WRONG_SAMPLE(frag,chan,size) \
48 msg(MSG::ERROR) << "Wrong no. of samples (" << size \
49 << ") for channel " << chan \
50 << " in frag 0x"<<MSG::hex << frag << MSG::dec \
51 << " - " << BeamFragName[frag&0x1F] << endmsg;
53 #define WRONG_CHANNEL(frag,chan) \
54 msg(MSG::ERROR) << "Wrong channel " << chan \
55 << " in frag 0x"<<MSG::hex << frag << MSG::dec \
56 << " - " << BeamFragName[frag&0x1F] << endmsg;
58 #define FRAG_FOUND(frag,chan,size) \
59 if (msgLvl(MSG::DEBUG)) \
60 msg(MSG::DEBUG) << "Found channel " << chan \
61 << " in frag 0x"<<MSG::hex << frag << MSG::dec \
62 << " - " << BeamFragName[frag&0x1F] \
63 << " of size " << size << endmsg;
66 #define SIGNAL_FOUND(frag,chan,amplitude) \
67 if (msgLvl(MSG::DEBUG)) \
68 msg(MSG::DEBUG) << "Found channel " << chan \
69 << " in frag 0x"<<MSG::hex << frag << MSG::dec \
70 << " - " << BeamFragName[frag&0x1F] \
71 << " with amp=" << amplitude << endmsg;
73 #define MAX_DRAWERS 256
84 , m_thistSvc(
"THistSvc",
name)
89 char frg[6] =
"0x000";
95 sprintf(frg,
"0x%3.3x",
i);
126 return StatusCode::SUCCESS;
241 if (
sc.isFailure()) {
243 return StatusCode::FAILURE;
253 ATH_MSG_INFO(
"Final offline units are not set, will use DSP units" );
259 ATH_MSG_INFO(
"calibrateEnergy is disabled, don't want to use DSP units" );
293 msg(
MSG::INFO) <<
" - negative number, will read frag IDs from the data" << MSG::dec <<
endmsg;
359 return StatusCode::SUCCESS;
364 const EventContext& ctx = Gaudi::Hive::currentContext();
390 m_run = ctx.eventID().run_number();
391 m_evt = ctx.eventID().event_number();
394 if (ctx.eventID().time_stamp() > 0) {
395 m_evTime = ctx.eventID().time_stamp();
448 return StatusCode::SUCCESS;
459 return StatusCode::FAILURE;
523 return StatusCode::SUCCESS;
529 return StatusCode::SUCCESS;
541 if ( collItr!=lastColl ) {
542 m_l1ID.at(nDrawersAll) = (*collItr)->getLvl1Id();
543 m_l1Type.at(nDrawersAll) = (*collItr)->getLvl1Type();
544 m_evType.at(nDrawersAll) = (*collItr)->getDetEvType();
545 m_evBCID.at(nDrawersAll) = (*collItr)->getRODBCID();
547 m_l1ID.at(nDrawersAll) = 0xFFFFFFFF;
548 m_l1Type.at(nDrawersAll) = 0xFFFFFFFF;
549 m_evType.at(nDrawersAll) = 0xFFFFFFFF;
550 m_evBCID.at(nDrawersAll) = 0xFFFFFFFF;
557 for(; collItr != lastColl; ++collItr) {
564 for (; beamItr != lastBeam; ++beamItr) {
566 std::vector<uint32_t> digits = (*beamItr)->get_digits();
568 << MSG::hex <<
" frag: 0x" << (*collItr)->identify()
570 <<
" digits size " << digits.size() <<
endmsg;
572 for (
unsigned int k = 0;
k < digits.size();
k++)
577 beamItr = (*collItr)->begin();
580 int frag = (*collItr)->identify();
584 if (
m_trigType == 0 && (*collItr)->getLvl1Type() != 0 )
590 for (; beamItr != lastBeam; ++beamItr) {
593 std::vector<uint32_t> digits = (*beamItr)->get_digits();
595 int dsize = digits.size();
622 if(cha < 8)
m_btdc1[cha] = amplitude;
623 else if(cha < 16)
m_btdc2[cha-8] = amplitude;
632 case 0:
m_s1cou = amplitude;
break;
633 case 1:
m_s2cou = amplitude;
break;
634 case 2:
m_s3cou = amplitude;
break;
635 case 3:
m_cher1 = amplitude;
break;
636 case 4:
m_cher2 = amplitude;
break;
637 case 5:
m_muTag = amplitude;
break;
645 case 0:
m_s1cou = amplitude;
break;
646 case 1:
m_s2cou = amplitude;
break;
647 case 2:
m_s3cou = amplitude;
break;
648 case 3:
m_cher1 = amplitude;
break;
649 case 4:
m_muTag = amplitude;
break;
650 case 5:
m_cher2 = amplitude;
break;
654 case 8:
m_las0 = amplitude;
break;
655 case 9:
m_las1 = amplitude;
break;
656 case 10:
m_las2 = amplitude;
break;
657 case 11:
m_las3 = amplitude;
break;
667 case 0:
m_sc1 = amplitude;
break;
668 case 1:
m_sc2 = amplitude;
break;
683 if(cha < 14)
m_muBack[cha] = amplitude;
685 else if (cha < 16)
m_muCalib[cha - 14] = amplitude;
692 if(cha < 6)
m_muBack[cha + 8] = amplitude;
694 else if (cha < 8)
m_muCalib[cha - 6] = amplitude;
703 if (amplitude & 0xFF00)
m_trigType = amplitude >> 8;
713 case 0:
m_las0 = amplitude;
break;
714 case 1:
m_las1 = amplitude;
break;
715 case 2:
m_las2 = amplitude;
break;
716 case 3:
m_las3 = amplitude;
break;
729 for (
int k = 0;
k < dsize;
k++) {
748 m_qdc[cha] = amplitude;
750 }
else if (cha == 15) {
760 if(cha < 8)
m_ecal[cha] = amplitude;
768 if(cha < 16)
m_cispar[cha] = amplitude;
775 if (
m_run > 2211444) {
778 case 0:
m_s1cou = amplitude;
break;
779 case 1:
m_s2cou = amplitude;
break;
781 if (
m_run < 2310000) {
788 case 3:
m_cher1 = amplitude;
break;
789 case 4:
m_cher2 = amplitude;
break;
790 case 5:
m_cher3 = amplitude;
break;
791 default:
m_muBack[cha - 6] = amplitude;
796 case 0:
m_s1cou = amplitude;
break;
797 case 1:
m_s2cou = amplitude;
break;
798 case 2:
m_s3cou = amplitude;
break;
799 case 3:
m_cher1 = amplitude;
break;
800 case 4:
m_cher2 = amplitude;
break;
801 case 5:
m_cher3 = amplitude;
break;
810 case 0:
m_s1cou = amplitude;
break;
811 case 1:
m_s2cou = amplitude;
break;
812 case 2:
m_s3cou = amplitude;
break;
813 case 3:
m_muTag = amplitude;
break;
814 case 4:
m_cher1 = amplitude;
break;
815 case 5:
m_cher2 = amplitude;
break;
850 if (
m_run > 2310000 && cha < 16) {
852 }
else if (cha == 0) {
864 m_tof[cha] = amplitude;
876 m_tof[cha] = amplitude;
883 if(cha < 8)
m_tof[cha] = amplitude;
891 if ((cha > 11) && (cha < 16) && (
m_run > 2211136)) {
892 m_tof[cha] = amplitude;
900 (*m_btdc)[cha].push_back(amplitude);
908 if(cha < 16)
m_btdc2[cha] = amplitude;
916 for (
int ibit = 0; ibit < 32; ++ibit){
919 }
else if (cha == 3) {
929 for (
int ibit=0; ibit < 32; ++ibit){
932 }
else if (cha == 3) {
942 for (
int ibit = 0; ibit < 32; ++ibit){
945 }
else if (cha == 3) {
955 for (
int ibit = 0; ibit < 32; ++ibit){
958 }
else if (cha == 3) {
968 for (
int ibit = 0; ibit < 32; ++ibit){
971 }
else if (cha == 3) {
981 for (
int ibit = 0; ibit < 32; ++ibit){
984 }
else if (cha == 3) {
994 for (
int ibit = 0; ibit < 32; ++ibit){
997 }
else if (cha == 3) {
1007 for (
int ibit = 0; ibit < 32; ++ibit){
1010 }
else if (cha == 3) {
1024 for (
int i=0;
i<8; ++
i) {
1040 if (
m_run > 2211444) {
1056 if (
m_run > 2211444) {
1082 if (
m_run > 2211444) {
1147 ATH_MSG_ERROR(
"No EventInfo object found! Can't read run number!" );
1174 return StatusCode::SUCCESS;
1186 , std::vector<std::array<float, MAX_CHAN>>* eneVec
1187 , std::vector<std::array<float, MAX_CHAN>>* timeVec
1188 , std::vector<std::array<float, MAX_CHAN>>* chi2Vec
1189 , std::vector<std::array<float, MAX_CHAN>>* pedVec
1190 ,
bool saveDQstatus)
1194 if (containerKey.
empty()) {
1195 return StatusCode::FAILURE;
1198 bool isFELIX = containerKey.
key().find(
"Flx") != std::string::npos;
1217 ATH_MSG_ERROR(
"RawChannel units are not ADC counts, can't apply DSP-like calibration" );
1218 return StatusCode::FAILURE;
1234 int drawerIndex, fragType;
1239 int fragId = rawChannelCollection->identify();
1243 if ( itr != drawerMap.end() ) {
1244 drawerIndex = (*itr).second;
1249 if (drawerIndex < 0) {
1250 if ( !rawChannelCollection->empty() )
1251 ATH_MSG_DEBUG(
"frag id 0x" << MSG::hex << fragId << MSG::dec <<
" was not found among valid frag IDs when storing TRC!" );
1253 fragType = isFELIX ? fragId >> 8 :
m_drawerType[drawerIndex];
1256 <<
" Frag id 0x" << MSG::hex << fragId << MSG::dec
1257 <<
" index "<< drawerIndex );
1261 int index = drawerIndex;
1274 double energy = rch->amplitude();
1286 (
m_TBperiod==2017 && ((fragId&0xFF)<4 && !(fragId == 0x201 || fragId == 0x203))) ||
1287 (
m_TBperiod==2018 && ((fragId&0xFF)<4 && !(fragId == 0x201 || fragId == 0x402))) ||
1288 (
m_TBperiod==2019 && ((fragId&0xFF)<5 && !(fragId == 0x201 || fragId == 0x203 || fragId >= 0x402))) ||
1289 (
m_TBperiod==2022 && ((fragId&0xFF)<4 && !(fragId == 0x201 || (
m_run >= 2210456 && fragId == 0x402)))))
1303 <<
" time=" << rch->time()
1304 <<
" chi2=" << rch->quality()
1305 <<
" ped=" << rch->pedestal()
1307 <<
" index " <<
index );
1311 if (saveDQstatus && !isFELIX) {
1322 for (
unsigned int dmu = 0; dmu <
MAX_DMU; ++dmu) {
1336 return StatusCode::SUCCESS;
1347 if (containerKey.
empty()) {
1348 return StatusCode::FAILURE;
1354 bool emptyColl =
true;
1357 int drawerIndex, fragType,
channel;
1359 std::vector<float> sampleVec;
1360 std::vector<uint32_t> headerVec;
1361 std::vector<uint32_t> headerVecHi;
1369 int fragId = digitsCollection->identify();
1370 int ros = (fragId >> 8);
1371 int drawer = fragId & 0x3F;
1375 drawerIndex = (*itr).second;
1380 if (drawerIndex < 0) {
1381 if ( !digitsCollection->empty() )
1382 ATH_MSG_DEBUG(
"frag id 0x" << MSG::hex << fragId << MSG::dec <<
" was not found among valid frag IDs when storing TRC!" );
1388 <<
" Frag id 0x" << MSG::hex << fragId << MSG::dec
1389 <<
" index " << drawerIndex
1393 <<
" BCID=" << digitsCollection->getFragBCID()<<MSG::hex
1394 <<
" CRC=0x" << (digitsCollection->getFragCRC()&0xffff)
1395 <<
" DMUMask=0x" << (digitsCollection->getFragDMUMask()&0xffff)<<MSG::dec );
1398 <<
" Lvl1Type=" << digitsCollection->getLvl1Type()
1399 <<
" EvBCID=" << digitsCollection->getRODBCID()
1400 <<
" EvType=" << digitsCollection->getDetEvType() );
1402 ATH_MSG_DEBUG(
" Header=" << digitsCollection->getFragChipHeaderWords() );
1409 m_l1ID.at(drawerIndex) = digitsCollection->getLvl1Id();
1410 m_l1Type.at(drawerIndex) = digitsCollection->getLvl1Type();
1411 m_evType.at(drawerIndex) = digitsCollection->getDetEvType();
1412 m_evBCID.at(drawerIndex) = digitsCollection->getRODBCID();
1414 m_frBCID.at(drawerIndex) = digitsCollection->getFragBCID();
1422 int drawerIndexHi = drawerIndex +
m_nDrawers;
1424 if (!digitsCollection->empty()) {
1427 m_rodBCIDVec.at(drawerIndex) = digitsCollection->getRODBCID();
1428 m_sizeVec.at(drawerIndex) = digitsCollection->getFragSize();
1429 m_sizeVec.at(drawerIndexHi) = digitsCollection->getFragSize();
1433 headerVec = digitsCollection->getFragChipHeaderWords();
1434 headerVecHi = digitsCollection->getFragChipHeaderWordsHigh();
1435 CRCmask = digitsCollection->getFragDMUMask();
1436 fe_crc = CRCmask & 0xFFFF;
1437 rod_crc = CRCmask >> 16;
1439 unsigned int headsize =
std::min(16U,
static_cast<unsigned int>(headerVec.size()));
1440 unsigned int headsizehi =
std::min(16U,
static_cast<unsigned int>(headerVecHi.size()));
1442 for (
unsigned int ih = 0; ih < headsize; ++ih) {
1444 m_bcidVec.at(drawerIndex)[ih] = (headerVec[ih] & 0xFFF);
1451 m_feCRCVec.at(drawerIndex)[ih] = (fe_crc >> ih & 0x1);
1452 m_rodCRCVec.at(drawerIndex)[ih] = (rod_crc >> ih & 0x1);
1460 for (
unsigned int ihhi = 0; ihhi < headsizehi; ++ihhi) {
1461 m_bcidVec.at(drawerIndexHi)[ihhi] = (headerVecHi[ihhi] & 0xFFF);
1477 m_slinkCRCVec.at(drawerIndex)[0] = (digitsCollection->getFragCRC() >> 16) & 0xffff;
1478 m_dmuMaskVec.at(drawerIndex)[0] = (digitsCollection->getFragDMUMask() >> 16) & 0xffff;
1479 m_slinkCRCVec.at(drawerIndex)[1] = digitsCollection->getFragCRC() & 0xffff;
1480 m_dmuMaskVec.at(drawerIndex)[1] = digitsCollection->getFragDMUMask() & 0xffff;
1482 m_slinkCRCVec.at(drawerIndexHi)[0] = (digitsCollection->getFragCRC() >> 16) & 0xffff;
1483 m_dmuMaskVec.at(drawerIndexHi)[0] = (digitsCollection->getFragDMUMask() >> 16) & 0xffff;
1484 m_slinkCRCVec.at(drawerIndexHi)[1] = digitsCollection->getFragCRC() & 0xffff;
1485 m_dmuMaskVec.at(drawerIndexHi)[1] = digitsCollection->getFragDMUMask() & 0xffff;
1488 for (
const TileDigits* tile_digits : *digitsCollection) {
1496 int index = (
gain == 1) ? drawerIndexHi : drawerIndex;
1506 (
m_TBperiod==2017 && ((fragId&0xFF)<4 && !(fragId == 0x201 || fragId == 0x203))) ||
1507 (
m_TBperiod==2018 && ((fragId&0xFF)<4 && !(fragId == 0x201 || fragId == 0x402))) ||
1508 (
m_TBperiod==2019 && ((fragId&0xFF)<5 && !(fragId == 0x201 || fragId == 0x203 || fragId >= 0x402))) ||
1509 (
m_TBperiod==2022 && ((fragId&0xFF)<4 && !(fragId == 0x201 || (
m_run >= 2210456 && fragId == 0x402)))))
1519 <<
" index " <<
index );
1522 sampleVec = tile_digits->samples();
1523 int siz = sampleVec.size();
1526 msg(
MSG::DEBUG) <<
"Digits(" << siz <<
")." << (dcnt++) <<
" {";
1527 for (
int i = 0;
i < siz;
i++) {
1531 if (siz > nSamplesInDrawer) {
1538 if (siz > nSamplesInDrawer) siz = nSamplesInDrawer;
1545 m_rodBCIDVec.at(drawerIndex) = digitsCollection->getRODBCID();
1546 m_sizeVec.at(drawerIndex) = digitsCollection->getFragSize();
1549 headerVec = digitsCollection->getFragChipHeaderWords();
1550 CRCmask = digitsCollection->getFragDMUMask();
1551 fe_crc = CRCmask & 0xFFFF;
1552 rod_crc = CRCmask >> 16;
1554 int headsize = headerVec.size();
1556 for (
int ih = 0; ih < headsize; ++ih) {
1557 m_bcidVec.at(drawerIndex)[ih] = (headerVec[ih] & 0xFFF);
1564 m_feCRCVec.at(drawerIndex)[ih] = (fe_crc >> ih & 0x1);
1565 m_rodCRCVec.at(drawerIndex)[ih] = (rod_crc >> ih & 0x1);
1573 m_slinkCRCVec.at(drawerIndex)[0] = (digitsCollection->getFragCRC() >> 16) & 0xffff;
1574 m_dmuMaskVec.at(drawerIndex)[0] = (digitsCollection->getFragDMUMask() >> 16) & 0xffff;
1575 m_slinkCRCVec.at(drawerIndex)[1] = digitsCollection->getFragCRC() & 0xffff;
1576 m_dmuMaskVec.at(drawerIndex)[1] = digitsCollection->getFragDMUMask() & 0xffff;
1582 for (
const TileDigits* tile_digits : *digitsCollection) {
1592 (
m_TBperiod==2017 && ((fragId&0xFF)<4 && !(fragId == 0x201 || fragId == 0x203))) ||
1593 (
m_TBperiod==2018 && ((fragId&0xFF)<4 && !(fragId == 0x201 || fragId == 0x402))) ||
1594 (
m_TBperiod==2019 && ((fragId&0xFF)<5 && !(fragId == 0x201 || fragId == 0x203 || fragId >= 0x402))) ||
1595 (
m_TBperiod==2022 && ((fragId&0xFF)<4 && !(fragId == 0x201 || (
m_run >= 2210456 && fragId == 0x402)))))
1605 sampleVec = tile_digits->samples();
1606 int siz = sampleVec.size();
1608 msg(
MSG::DEBUG) <<
"Digits(" << siz <<
")." << (dcnt++) <<
" {";
1610 for (
int i = 0;
i < siz;
i++) {
1614 if (siz > nSamplesInDrawer) {
1621 if (siz > nSamplesInDrawer) siz = nSamplesInDrawer;
1622 std::transform(sampleVec.begin(), sampleVec.begin() + siz, &
m_sampleVec.at(drawerIndex).get()[0] + nSamplesInDrawer *
channel, [] (
float v) {return static_cast<int>(v);});
1630 return StatusCode::FAILURE;
1632 return StatusCode::SUCCESS;
1638 if (containerKey.
empty()) {
1639 return StatusCode::FAILURE;
1645 bool emptyColl =
true;
1650 std::vector<float> sampleVecLo;
1651 std::vector<float> sampleVecHi;
1655 int fragId = digitsCollection->identify();
1658 drawerIndex = (*itr).second;
1663 if (drawerIndex < 0) {
1664 if ( !digitsCollection->empty() )
1665 ATH_MSG_DEBUG(
"FELIX frag id 0x" << MSG::hex << fragId << MSG::dec <<
" was not found among valid frag IDs when storing TRC!" );
1670 <<
" FELIX Frag id 0x" << MSG::hex << fragId << MSG::dec
1671 <<
" index " << drawerIndex);
1673 ATH_MSG_DEBUG(
" Size=" << digitsCollection->getFragSize());
1676 <<
" EvBCID=" << digitsCollection->getRODBCID()
1677 <<
" EvType=" << digitsCollection->getDetEvType() );
1678 ATH_MSG_DEBUG(
" Headers = "<< digitsCollection->getFragExtraWords() );
1698 std::vector<uint32_t> extraWords = digitsCollection->getFragExtraWords();
1701 std::reference_wrapper<std::array<int,MAX_MINIDRAWER>>
1708 auto it = extraWords.begin();
1709 for (
int i = 0;
i < 10; ++
i) {
1717 if(!digitsCollection->empty()) {
1722 m_sizeflxVec.at(drawerIndex) = digitsCollection->getFragSize();
1727 for (
const TileDigits* tile_digits : *digitsCollection) {
1733 int index = (
gain == 1) ? drawerIndexHi : drawerIndex;
1743 <<
" index " <<
index );
1747 sampleVecLo = tile_digits->samples();
1748 }
else if (
gain == 1) {
1749 sampleVecHi = tile_digits->samples();
1752 int sizLo = sampleVecLo.size();
1753 int sizHi = sampleVecHi.size();
1759 msg(
MSG::DEBUG) <<
"Low gain Digits(" << sizLo <<
")." << (dcnt++) <<
" {";
1760 for (
int i = 0;
i < sizLo;
i++) {
1764 if (sizLo > nSamplesInDrawer) {
1772 msg(
MSG::DEBUG) <<
"High gain Digits(" << sizHi <<
")." << (dcnt++) <<
" {";
1773 for (
int i = 0;
i < sizHi;
i++) {
1777 if (sizHi > nSamplesInDrawer) {
1786 if (sizLo > nSamplesInDrawer) sizLo = nSamplesInDrawer;
1787 if (sizHi > nSamplesInDrawer) sizHi = nSamplesInDrawer;
1790 sampleVecLo.clear();
1791 sampleVecHi.clear();
1799 return StatusCode::FAILURE;
1801 return StatusCode::SUCCESS;
1812 return StatusCode::FAILURE;
1824 for (
const TileHit& cinp : *hitVec) {
1832 int drawerIndex = ( itr !=
m_drawerMap.end() ) ? (*itr).second : -1;
1834 if (drawerIndex < 0) {
1835 ATH_MSG_WARNING(
"frag id 0x" << MSG::hex << fragId << MSG::dec <<
" was not found among valid frag IDs when storing HITS!" );
1843 if (hitVec->empty())
1844 return StatusCode::FAILURE;
1846 return StatusCode::SUCCESS;
1857 return StatusCode::FAILURE;
1866 bool emptyColl =
true;
1872 int fragId = hitCollection->identify();
1874 int drawerIndex = ( itr !=
m_drawerMap.end() ) ? (*itr).second : -1;
1876 if (drawerIndex < 0) {
1877 if ( !hitCollection->empty() )
1878 ATH_MSG_WARNING(
"frag id 0x" << MSG::hex << fragId << MSG::dec <<
" was not found among valid frag IDs when storing HITS!" );
1884 <<
" Frag id 0x" << MSG::hex << fragId << MSG::dec
1885 <<
" index " << drawerIndex );
1887 if (emptyColl) emptyColl = hitCollection->empty();
1889 for (
const TileHit* cinp : *hitCollection) {
1896 return StatusCode::FAILURE;
1898 return StatusCode::SUCCESS;
1902 std::array<float, MAX_CHAN>& ehitVec,
1903 std::array<float, MAX_CHAN>& thitVec,
1915 for (
int i = 0;
i <
size; ++
i)
1919 for (
int i = 0;
i <
size; ++
i)
1925 double ehit=0.0, thit=0.0;
1929 double t = cinp->
time(
i);
1931 if (-75.<
t &&
t<75.) {
1954 (
m_TBperiod==2017 && ((fragId&0xFF)<4 && !(fragId == 0x201 || fragId == 0x203))) ||
1955 (
m_TBperiod==2018 && ((fragId&0xFF)<4 && !(fragId == 0x201 || fragId == 0x402))) ||
1956 (
m_TBperiod==2019 && ((fragId&0xFF)<5 && !(fragId == 0x201 || fragId == 0x203 || fragId >= 0x402))) ||
1957 (
m_TBperiod==2022 && ((fragId&0xFF)<4 && !(fragId == 0x201 || (
m_run >= 2210456 && fragId == 0x402)))))
1967 <<
" index " <<
m_drawerMap.find(fragId)->second );
2016 return StatusCode::SUCCESS;
2093 auto tree = std::make_unique<TTree>(
m_ntupleID.value().c_str(),
"TileBEAM-Ntuple");
2127 return StatusCode::SUCCESS;
2133 return StatusCode::FAILURE;
2140 ATH_MSG_DEBUG(
"succeeded retrieving cellContainer from SG" );
2142 ATH_MSG_DEBUG(
"TileTBAANtuple : about to iterate over CaloCells" );
2184 return StatusCode::SUCCESS;
2205 return StatusCode::SUCCESS;
2214 std::vector<unsigned int> frags;
2217 if (!digitsCollection->empty()) {
2219 frags.push_back(digitsCollection->identify());
2222 size = frags.size();
2231 unsigned int rosOrder[5] = { 2, 1, 3, 4, 0 };
2232 unsigned int dr = 0;
2233 char frg[6] =
"0x000";
2239 msg(
MSG::INFO) <<
"setting drawerList from data " << MSG::hex;
2240 for (
unsigned int ir = 0;
ir < 5; ++
ir) {
2241 for (
unsigned int i = 0;
i <
size; ++
i) {
2242 unsigned int frag = frags[
i];
2243 if (frag >> 8 == rosOrder[
ir]) {
2244 sprintf(frg,
"0x%3.3x", frag);
2291 if (!digitsCollection->empty()) {
2292 int siz = digitsCollection->front()->samples().size();
2302 return StatusCode::SUCCESS;
2322 return StatusCode::SUCCESS;
2331 std::vector<unsigned int> frags;
2334 if (!digitsCollection->empty()) {
2336 frags.push_back(digitsCollection->identify());
2340 unsigned int nFrags = frags.size();
2351 std::ostringstream
os;
2352 os <<
"setting FELIX drawers from data " << std::hex;
2353 unsigned int drawerIndex = 0;
2354 for (
unsigned int frag : frags) {
2356 os <<
" 0x" << frag;
2370 ATH_MSG_ERROR(
"can't find any FELIX TileDigits collections" );
2371 ATH_MSG_ERROR(
"can't set up FELIX fragment list for ntuple" );
2380 if (!digitsCollection->empty()) {
2381 int siz = digitsCollection->front()->samples().size();
2391 return StatusCode::SUCCESS;
2415 std::ifstream etafile;
2418 if (etafile.good()) {
2486 if (nDrawersAll > 0) {
2487 m_l1ID.resize(nDrawersAll + 1);
2559 for(
unsigned i=0;
i<33; ++
i){
m_qdc[
i]=0.0; }
2619 for(
unsigned i=0;
i<33; ++
i){
m_qdc[
i]=0.0; }
2768 for (
int j = 0; j < 16; j++) {
2860 m_btdc =
new std::vector<std::vector<int> >(16);
3004 for (
int i=0;
i<16;
i+=2) {
3009 for (
int i=0;
i<16;
i+=2) {
3014 for (
int i=0;
i<16;
i+=2) {
3020 for (std::vector<int>& btdc_amplitudes : *
m_btdc) {
3021 btdc_amplitudes.clear();
3175 std::ostringstream oss;
3177 std::string nSampStr=oss.str();
3183 std::string
digit[10] = {
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9" };
3184 std::vector<std::string> suffixArr;
3191 suffixArr.resize(
length);
3193 for (
unsigned int i = 0;
i < listSize; ++
i) {
3200 }
else if (testbeam) {
3209 suff.replace(
suff.find(
"0x"), 2,
"");
3210 suffixArr[
i] =
suff +
"lo";
3220 suffixArr.resize(
length);
3222 for (
unsigned int i = 0;
i < listSize; ++
i) {
3229 }
else if (testbeam) {
3238 suff.replace(
suff.find(
"0x"), 2,
"");
3239 suffixArr[
i] =
suff;
3253 for (
unsigned int i = 0;
i <
length;
i++) {
3260 nSamplesInDrawer =
it->second;
3264 m_bcidVec.push_back(std::array<int, MAX_DMU>());
3276 m_gainVec.push_back(std::array<int, MAX_CHAN>());
3278 m_feCRCVec.push_back(std::array<int, MAX_DMU>());
3279 m_rodCRCVec.push_back(std::array<int, MAX_DMU>());
3281 m_eneVec.push_back(std::array<float, MAX_CHAN>());
3282 m_timeVec.push_back(std::array<float, MAX_CHAN>());
3286 m_efitVec.push_back(std::array<float, MAX_CHAN>());
3287 m_tfitVec.push_back(std::array<float, MAX_CHAN>());
3288 m_pedfitVec.push_back(std::array<float, MAX_CHAN>());
3289 m_chi2Vec.push_back(std::array<float, MAX_CHAN>());
3291 m_efitcVec.push_back(std::array<float, MAX_CHAN>());
3292 m_tfitcVec.push_back(std::array<float, MAX_CHAN>());
3294 m_chi2cVec.push_back(std::array<float, MAX_CHAN>());
3296 m_eOptVec.push_back(std::array<float, MAX_CHAN>());
3297 m_tOptVec.push_back(std::array<float, MAX_CHAN>());
3298 m_pedOptVec.push_back(std::array<float, MAX_CHAN>());
3301 m_eDspVec.push_back(std::array<float, MAX_CHAN>());
3302 m_tDspVec.push_back(std::array<float, MAX_CHAN>());
3318 m_ntuplePtr->Branch((
"Evt"+suffixArr[
i]).c_str(), &
m_evtVec.data()[
i], (
"Evt"+suffixArr[
i]+
"/I").c_str());
3321 m_ntuplePtr->Branch((
"BCID"+suffixArr[
i]).c_str(), &
m_bcidVec.back(), (
"bcid"+suffixArr[
i]+
"[16]/I").c_str());
3334 m_ntuplePtr->Branch((
"Gain"+suffixArr[
i]).c_str(),&
m_gainVec.back(), (
"gain"+suffixArr[
i]+
"[48]/I").c_str());
3336 if (nSamplesInDrawer > 0) {
3339 (
"sample" + suffixArr[
i] +
"[48]["+nSampStr+
"]/I").c_str());
3343 m_ntuplePtr->Branch((
"feCRC" + suffixArr[
i]).c_str(), &
m_feCRCVec.back(), (
"fe_crc" + suffixArr[
i] +
"[16]/I").c_str());
3344 m_ntuplePtr->Branch((
"rodCRC" + suffixArr[
i]).c_str(), &
m_rodCRCVec.back(), (
"rod_crc" + suffixArr[
i] +
"[16]/I").c_str());
3349 m_ntuplePtr->Branch((
"Ene" + suffixArr[
i]).c_str(), &
m_eneVec.back(), (
"ene" + suffixArr[
i] +
"[48]/F").c_str());
3350 m_ntuplePtr->Branch((
"Time" + suffixArr[
i]).c_str(), &
m_timeVec.back(), (
"time" + suffixArr[
i] +
"[48]/F").c_str());
3351 m_ntuplePtr->Branch((
"Ped" + suffixArr[
i]).c_str(), &
m_pedFlatVec.back(), (
"pedflat" + suffixArr[
i] +
"[48]/F").c_str());
3352 m_ntuplePtr->Branch((
"Chi2ene" + suffixArr[
i]).c_str(), &
m_chi2FlatVec.back(), (
"chiflat" + suffixArr[
i] +
"[48]/F").c_str());
3358 m_ntuplePtr->Branch((
"Efit" + suffixArr[
i]).c_str(), &
m_efitVec.back(), (
"efit" + suffixArr[
i] +
"[48]/F").c_str());
3359 m_ntuplePtr->Branch((
"Tfit" + suffixArr[
i]).c_str(), &
m_tfitVec.back(), (
"tfit" + suffixArr[
i] +
"[48]/F").c_str());
3360 m_ntuplePtr->Branch((
"Pedfit" + suffixArr[
i]).c_str(), &
m_pedfitVec.back(), (
"pedfit" + suffixArr[
i] +
"[48]/F").c_str());
3361 m_ntuplePtr->Branch((
"Chi2fit" + suffixArr[
i]).c_str(), &
m_chi2Vec.back(), (
"chifit" + suffixArr[
i] +
"[48]/F").c_str());
3367 m_ntuplePtr->Branch((
"Efitc" + suffixArr[
i]).c_str(), &
m_efitcVec.back(), (
"efitc" + suffixArr[
i] +
"[48]/F").c_str());
3368 m_ntuplePtr->Branch((
"Tfitc" + suffixArr[
i]).c_str(), &
m_tfitcVec.back(), (
"tfitc" + suffixArr[
i] +
"[48]/F").c_str());
3369 m_ntuplePtr->Branch((
"Pedfitc" + suffixArr[
i]).c_str(), &
m_pedfitcVec.back(), (
"pedfitc" + suffixArr[
i] +
"[48]/F").c_str());
3370 m_ntuplePtr->Branch((
"Chi2fitc" + suffixArr[
i]).c_str(), &
m_chi2cVec.back(), (
"chifitc" + suffixArr[
i] +
"[48]/F").c_str());
3376 m_ntuplePtr->Branch((
"Eopt"+suffixArr[
i]).c_str(), &
m_eOptVec.back(), (
"eOpt"+suffixArr[
i]+
"[48]/F").c_str());
3377 m_ntuplePtr->Branch((
"Topt"+suffixArr[
i]).c_str(), &
m_tOptVec.back(), (
"tOpt"+suffixArr[
i]+
"[48]/F").c_str());
3378 m_ntuplePtr->Branch((
"Pedopt"+suffixArr[
i]).c_str(), &
m_pedOptVec.back(), (
"pedOpt"+suffixArr[
i]+
"[48]/F").c_str());
3385 m_ntuplePtr->Branch((
"Edsp"+suffixArr[
i]).c_str(), &
m_eDspVec.back(), (
"eDsp"+suffixArr[
i]+
"[48]/F").c_str());
3386 m_ntuplePtr->Branch((
"Tdsp"+suffixArr[
i]).c_str(), &
m_tDspVec.back(), (
"tDsp"+suffixArr[
i]+
"[48]/F").c_str());
3498 std::vector<std::string> suffixArr(
length,
"");
3501 for (
const std::pair<const unsigned int, unsigned int>& fragAndDrawer :
m_drawerFlxMap) {
3502 unsigned int frag = fragAndDrawer.first;
3503 unsigned int ros = frag >> 8;
3504 unsigned int drawer = frag & 0x3F;
3505 unsigned int drawerIndex = fragAndDrawer.second;
3507 std::ostringstream drawerName;
3510 drawerName << (
drawer & 7);
3513 drawerName << std::setw(2) << std::setfill(
'0') <<
drawer;
3516 moduleNames.at(drawerIndex) = drawerName.str();
3517 suffixArr.at(drawerIndex) = drawerName.str() +
"lo";
3518 suffixArr.at(drawerIndex +
m_nDrawersFlx) = drawerName.str() +
"hi";
3534 for (
unsigned int i = 0;
i <
length; ++
i) {
3560 std::string
suffix = moduleNames[
i];
3590 if (nSamplesInDrawer > 0) {
3593 (
"Flxsample" + suffixArr[
i] +
"[48]["+nSampStrFlx+
"]/I").c_str());
3668 std::string
digit[10] = {
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9" };
3669 std::vector<std::string> suffixArr;
3674 suffixArr.resize(
length);
3676 for (
unsigned int i = 0;
i < listSize; ++
i) {
3683 }
else if (testbeam) {
3692 suff.replace(
suff.find(
"0x"), 2,
"");
3693 suffixArr[
i] =
suff;
3699 for (
unsigned int i = 0;
i <
length;
i++) {
3704 m_ehitVec.push_back(std::array<float, MAX_CHAN>());
3705 m_thitVec.push_back(std::array<float, MAX_CHAN>());
3706 m_ehitCnt.push_back(std::array<float, MAX_CHAN>());
3707 m_thitCnt.push_back(std::array<float, MAX_CHAN>());
3716 m_ntuplePtr->Branch((
"EhitG4"+suffixArr[
i]).c_str(),&
m_ehitVec.back(),(
"eHitG4"+suffixArr[
i]+
"[48]/F").c_str());
3717 m_ntuplePtr->Branch((
"ThitG4"+suffixArr[
i]).c_str(),&
m_thitVec.back(),(
"tHitG4"+suffixArr[
i]+
"[48]/F").c_str());
3723 ATH_MSG_DEBUG(
"Adding G4 corrected hit info for " << suffixArr[
i] );
3725 m_ntuplePtr->Branch((
"EhitSim"+suffixArr[
i]).c_str(),&
m_ehitCnt.back(),(
"eHitSim"+suffixArr[
i]+
"[48]/F").c_str());
3726 m_ntuplePtr->Branch((
"ThitSim"+suffixArr[
i]).c_str(),&
m_thitCnt.back(),(
"tHitSim"+suffixArr[
i]+
"[48]/F").c_str());
3746 template<
typename T>
3751 template<
typename T,
size_t N>
3753 for (std::array<T,N>& arr :
vec) {
3754 std::fill(arr.begin(), arr.end(),
static_cast<T>(-1));
3758 template<
typename T,
size_t N>
3760 for (std::array<T,N>& arr :
vec) {
3761 std::fill(arr.begin(), arr.end(),
static_cast<T>(0));
3767 for (
unsigned int i = 0;
i <
vec.size(); ++
i) {
def retrieve(aClass, aKey=None)
std::vector< std::unique_ptr< int[]> > m_sampleflxVec
std::vector< std::array< int, MAX_DMU > > m_feCRCVec
Gaudi::Property< float > m_beamBC1Z_0
std::vector< std::array< float, MAX_CHAN > > m_pedflxoptVec
std::array< unsigned int, 96 > m_coincTrig4
float getSamplingFraction(unsigned int drawerIdx, unsigned int channel) const
Return Tile Calorimeter sampling fraction.
std::array< unsigned int, 96 > m_coincTrig3
void COINCBOARD_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree COINCBOARD va...
Gaudi::Property< float > m_beamBC0Z
char data[hepevt_bytes_allocation_ATLAS]
std::array< float, 8 > m_ecal
int getTDC(const unsigned int j, const unsigned int gain=0) const
Gaudi::Property< Long64_t > m_treeSize
std::vector< std::array< int, MAX_MINIDRAWER > > m_mdChargeTimeflxVec
Gaudi::Property< bool > m_calibMode
Gaudi::Property< float > m_beamBC1Y2
Const iterator class for DataVector/DataList.
std::array< float, 3 > m_BarEne
std::vector< int > m_frBCID
std::vector< std::array< float, MAX_CHAN > > m_chi2FlatVec
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
std::vector< std::array< short, MAX_DMU > > m_DMUSstrobeErrVec
std::vector< std::array< int, MAX_CHAN > > m_gainflxVec
std::vector< std::array< int, 2 > > m_slinkCRCVec
std::array< float, 14 > m_muBack
void checkIsPropertySetup(float property, const std::string &name)
std::array< int, 16 > m_tof
static const TileCablingService * getInstance()
get pointer to service instance
std::vector< std::array< float, MAX_CHAN > > m_chi2cVec
std::vector< std::array< int, MAX_MINIDRAWER > > m_mdRunTypeflxVec
std::vector< std::array< short, MAX_DMU > > m_DMUparityErrVec
Gaudi::Property< float > m_beamBC2Y2
void FELIX_addBranch(void)
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
std::vector< short > m_sizeflxVec
SG::ReadHandleKey< TileRawChannelContainer > m_flatRawChannelContainerKey
Scalar eta() const
pseudorapidity method
std::map< unsigned int, unsigned int, std::less< unsigned int > > m_drawerFlxMap
Gaudi::Property< std::vector< int > > m_drawerType
std::vector< short > m_rodBCIDVec
StatusCode storeHitVector(const EventContext &ctx)
std::vector< std::array< float, MAX_CHAN > > m_efitVec
double getPumpDiodeTemp() const
SG::ReadHandleKey< TileLaserObject > m_laserObjectKey
SG::ReadHandleKey< TileHitContainer > m_hitContainerKey
std::vector< int > m_evBCID
std::vector< std::array< short, MAX_DMU > > m_DMUmemoryErrVec
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
std::array< unsigned int, 96 > m_coincTrig7
std::vector< std::array< int, MAX_MINIDRAWER > > m_mdBcidflxVec
std::vector< std::array< float, MAX_CHAN > > m_chi2OptVec
std::vector< std::array< float, MAX_CHAN > > m_pedFlatVec
void CISPAR_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree CISPAR variabl...
bool m_calibrateEnergyThisEvent
void QDC_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add QDC variables to th...
double getAlpha(const unsigned int i, const unsigned int gain=0) const
std::vector< std::array< short, MAX_DMU > > m_ROD_DMUBCIDVec
SG::ReadCondHandleKey< TileSamplingFraction > m_samplingFractionKey
Name of TileSamplingFraction in condition store.
#define WRONG_SAMPLE(frag, chan, size)
std::vector< int > m_adderPayload
std::vector< std::array< int, MAX_MINIDRAWER > > m_mdCapacitorflxVec
std::vector< std::array< float, MAX_CHAN > > m_pedOptVec
double getDiodeCurrOrd() const
bool msgLvl(const MSG::Level lvl) const
Gaudi::Property< std::string > m_ntupleID
std::vector< short > m_rodBCIDflxVec
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
Gaudi::Property< float > m_beamBC0X2
StatusCode storeDigitsFlx(const EventContext &ctx, const SG::ReadHandleKey< TileDigitsContainer > &containerKey)
std::map< unsigned int, unsigned int, std::less< unsigned int > > m_drawerMap
Gaudi::Property< int > m_finalUnit
std::vector< std::array< int, MAX_MINIDRAWER > > m_mdModuleflxVec
std::vector< std::array< float, MAX_CHAN > > m_tfitcVec
std::vector< size_t > vec
std::vector< int > m_evtVec
void HIT_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree HIT variables ...
std::array< unsigned int, 96 > m_coincTrig6
TileTBAANtuple(const std::string &name, ISvcLocator *pSvcLocator)
void LASER_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree LASER variabl...
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
std::vector< std::array< float, MAX_CHAN > > m_eflxfitVec
StatusCode ntuple_clear()
bool empty() const
Test if the key is blank.
double m_las_D3_AlphaPed_RMS
Gaudi::Property< float > m_beamBN1X2
std::vector< std::array< uint32_t, MAX_DMU > > m_DMUheaderVec
Gaudi::Property< bool > m_bsInput
void ENETOTAL_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree ENETOTAL vari...
StatusCode ntuple_initialize(const EventContext &ctx)
Alg standard interface function LF TODO: We could have a problem with the new feature introduced by S...
virtual StatusCode execute() override
std::vector< std::array< float, MAX_CHAN > > m_pedflxfitVec
int size(void) const
Return length of energy/time vectors
uint32_t runNumber() const
The current event's run number.
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Gaudi::Property< bool > m_useDspUnits
Gaudi::Property< float > m_beamBN2X2
Gaudi::Property< float > m_beamBC2Z
std::vector< std::array< int, MAX_MINIDRAWER > > m_mdPedHiflxVec
StatusCode storeDigits(const EventContext &ctx, const SG::ReadHandleKey< TileDigitsContainer > &containerKey, const TileDQstatus *dqStatus=nullptr)
/ Fill Ntuple with info from TileDigits / Return true if the collection is empty, / which means that ...
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
void clear_samples(std::vector< std::unique_ptr< int[]>> &vec, const std::vector< int > &nsamples, int nchan=MAX_CHAN)
int getPMADC(const unsigned int j, const unsigned int gain=0) const
std::vector< std::array< float, MAX_CHAN > > m_tflxfitVec
void ENETOTAL_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree ENETOTAL varia...
int getFiltNumber() const
void clear_init_zero(std::vector< std::array< T, N >> &vec)
void ECAL_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree ECAL variable...
std::vector< std::array< float, MAX_CHAN > > m_eneVec
double getSigmaPedAlpha(const unsigned int i, const unsigned int gain=0) const
ServiceHandle< ITHistSvc > m_thistSvc
Gaudi::Property< float > m_beamBN1Y2
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
std::vector< std::array< int, 2 > > m_dmuMaskVec
Gaudi::Property< float > m_beamBN1X1
std::vector< int * > m_adder
SG::ReadHandleKey< TileRawChannelContainer > m_dspRawChannelContainerKey
void FELIX_clearBranch(void)
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Class that holds Data Quality fragment information and provides functions to extract the data quality...
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
void setupBeamChambersBeforeTB2015(void)
Gaudi::Property< float > m_beamBN2Y1
#define FRAG_FOUND(frag, chan, size)
std::array< float, 3 > m_ExtEne
Gaudi::Property< bool > m_calibrateEnergy
Gaudi::Property< float > m_beamBC2Z_0
std::map< unsigned int, unsigned int, std::less< unsigned int > >::iterator drawerMap_iterator
void setupBeamChambersTB2015(void)
std::array< int, 16 > m_btdc2
const TileHWID * m_tileHWID
Gaudi::Property< float > m_beamBC1X2
std::vector< std::array< float, MAX_CHAN > > m_tDspVec
msgSvc
Provide convenience handles for various services.
Condition object to keep and provide Tile Calorimeter sampling fraction and number of photoelectrons.
void setupPropertyDefaultValue(float property, float defaultValue, const std::string &name)
Gaudi::Property< int > m_nSamplesFlx
std::vector< std::array< float, MAX_CHAN > > m_chi2Vec
std::vector< int > m_evType
StatusCode storeHitContainer(const EventContext &ctx)
/ Fill Ntuple with MC truth info from simulation / Namely, hit energies corrected by photoelectron st...
SG::ReadHandleKey< TileRawChannelContainer > m_flxOptRawChannelContainerKey
std::vector< int > m_evtflxVec
std::vector< std::unique_ptr< int[]> > m_sampleVec
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< float > m_beamBN1Y1
uint32_t get_bsflags() const
void BEAM_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree BEAM variables...
#define WRONG_CHANNEL(frag, chan)
int digiChannel2PMT(int fragType, int chan)
std::vector< std::vector< int > > * m_btdc
Gaudi::Property< int > m_eventsPerFile
std::vector< std::array< short, 2 > > m_ROD_DMUMaskVec
std::vector< std::array< int, MAX_MINIDRAWER > > m_mdPedLoflxVec
StatusCode initListFlx(const EventContext &ctx)
Gaudi::Property< float > m_beamBN2Y2
void HIT_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// /Clear Tree HIT variable...
void setupBeamChambersTB2016_2020(void)
short CheckDMUParity(uint32_t header)
Parity of the DMU header should be odd.
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Gaudi::Property< unsigned int > m_nDrawersFlx
Gaudi::Property< std::vector< std::string > > m_drawerList
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
SG::ReadHandleKey< TileBeamElemContainer > m_beamElemContainerKey
virtual StatusCode initialize() override
Gaudi::Property< std::string > m_streamName
Gaudi::Property< float > m_beamBC2Z_min90
std::vector< std::array< float, MAX_CHAN > > m_ehitVec
std::vector< int > m_l1ID
std::array< unsigned int, 96 > m_coincTrig2
const_iterator end() const
return const_iterator for end of container
Gaudi::Property< float > m_beamBC1Z
StatusCode storeCells(const EventContext &ctx)
Gaudi::Property< float > m_beamBC2X1
#define CHECK(...)
Evaluate an expression and check for errors.
const TileCablingService * m_cabling
Gaudi::Property< bool > m_completeNtuple
StatusCode initNTuple(void)
Gaudi::Property< float > m_beamBC0Y1
std::map< int, int > m_nSamplesInDrawerMap
std::vector< short > m_sizeVec
Gaudi::Property< float > m_beamBN2X1
const_iterator begin() const
return const_iterator for first entry
void MUON_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree MUON variable...
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
std::array< unsigned int, 96 > m_coincTrig5
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerFlxKey
std::vector< int > m_nSamplesInDrawer
std::vector< std::array< short, MAX_DMU > > m_DMUformatErrVec
Gaudi::Property< unsigned int > m_nDrawers
void DIGI_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree DIGI variables...
std::array< uint32_t, 33 > m_qdc
Gaudi::Property< float > m_beamBC1X1
void ADDER_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree ADDER variable...
SG::ReadHandleKey< TileHitVector > m_hitVectorKey
StatusCode storeRawChannels(const EventContext &ctx, const SG::ReadHandleKey< TileRawChannelContainer > &containerKey, bool calibMode, std::vector< std::array< float, MAX_CHAN >> *eneVec, std::vector< std::array< float, MAX_CHAN >> *timeVec, std::vector< std::array< float, MAX_CHAN >> *chi2Vec, std::vector< std::array< float, MAX_CHAN >> *pedVec, bool saveDQstatus=false)
/ Fill ntuple with data from TRC.
std::vector< std::array< float, MAX_CHAN > > m_thitCnt
SG::ReadHandleKey< TileRawChannelContainer > m_fitRawChannelContainerKey
void QDC_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree QDC variables
double getDiodeSigmaPedestal(const unsigned int i, const unsigned int gain=0) const
void COINCBOARD_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree COINCBOARD var...
std::vector< std::array< float, MAX_CHAN > > m_tfitVec
SG::ReadHandleKey< TileRawChannelContainer > m_fitcRawChannelContainerKey
std::vector< std::array< int, MAX_DMU > > m_rodCRCVec
std::vector< short > m_ROD_GlobalCRCVec
int checkSampleParityErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has data word parity error
void ECAL_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add ECAL variables to t...
std::vector< std::array< short, MAX_DMU > > m_ROD_DMUHeadformatErrVec
std::string to_string(const DetectorType &type)
int getDiodeADC(const unsigned int i, const unsigned int gain=0) const
Gaudi::Property< std::vector< std::string > > m_beamFragList
int checkHeaderParityErr(int partition, int drawer, int dmu, int gain) const
returns 1 if DMU has header word parity error
std::array< unsigned int, 96 > m_coincTrig1
void TRIGGER_addBranch(void)
///////////////////////////////////////////////////////////////////////////
void clear_init_minus1(std::vector< T > &vec)
std::array< int, 16 > m_btdc1
StatusCode initialize(bool used=true)
void LASER_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add Tree LASER variable...
std::array< float, 4 > m_lasExtra
std::vector< std::array< int, MAX_MINIDRAWER > > m_mdL1idflxVec
Gaudi::Property< float > m_beamBC1Z_min90
void MUON_addBranch(void)
//////////////////////////////////////////////////////////////////////////// /Add MUON variables to t...
double getPMPedestal(const unsigned int j, const unsigned int gain=0) const
void BEAM_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree BEAM variable...
Gaudi::Property< std::string > m_etaFileName
Container class for CaloCell.
std::vector< std::array< float, MAX_CHAN > > m_eDspVec
std::vector< std::array< float, MAX_CHAN > > m_tOptVec
double getDiodeCurrMeas() const
Gaudi::Property< float > m_radius
Gaudi::Property< float > m_beamBC1Y1
std::array< float, 3 > m_GapEne
Class describing the basic event information.
std::vector< std::array< float, MAX_CHAN > > m_pedfitcVec
int ir
counter of the current depth
std::vector< int > m_nSamplesFlxInDrawer
double m_las_D1_AlphaPed_RMS
std::vector< std::array< float, MAX_CHAN > > m_tflxoptVec
std::array< float, 16 > m_timeAdd
Gaudi::Property< float > m_beamBC2X2
std::vector< std::array< int, MAX_DMU > > m_bcidVec
double m_las_D4_Alpha_RMS
std::vector< std::array< short, MAX_DMU > > m_DMUHeadparityErrVec
TileRawChannelUnit::UNIT m_dspUnit
Unit for TileRawChannels in DSP.
void TRIGGER_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree TRIGGER varia...
TileRawChannelUnit::UNIT m_rchUnit
Unit for TileRawChannels (ADC, pCb, MeV)
std::array< float, 2 > m_muCalib
StatusCode storeLaser(const EventContext &ctx)
Data object for each calorimeter readout cell.
CaloCell_ID::CaloSample getSampling() const
cell sampling
HWIdentifier pmt_HWID(void) const
Return pmt hardware ID (== channel ID)
std::vector< std::array< short, MAX_DMU > > m_ROD_DMUSstrobeErrVec
#define ATH_MSG_WARNING(x)
float energy(int ind=0) const
Return energy of ind-th sub-hit
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
Gaudi::Property< bool > m_unpackAdder
std::vector< std::array< int, MAX_MINIDRAWER > > m_mdRunflxVec
SG::ReadHandleKey< TileRawChannelContainer > m_optRawChannelContainerKey
double getPMSigmaPedestal(const unsigned int j, const unsigned int gain=0) const
Gaudi::Property< float > m_beamBC0Y2
double getDiodePedestal(const unsigned int i, const unsigned int gain=0) const
Gaudi::Property< float > m_beamBC2Z_90
Gaudi::Property< bool > m_pmtOrder
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Gaudi::Property< int > m_nSamples
std::vector< std::array< float, MAX_CHAN > > m_chi2flxoptVec
Gaudi::Property< float > m_beamBC2Y1
std::vector< std::array< short, MAX_DMU > > m_ROD_DMUmemoryErrVec
std::vector< std::array< float, MAX_CHAN > > m_chi2DspVec
std::vector< std::array< short, MAX_DMU > > m_DMUDstrobeErrVec
std::vector< std::array< float, MAX_CHAN > > m_thitVec
std::vector< std::array< short, MAX_DMU > > m_DMUDataparityErrVec
std::array< int, 16 > m_scaler
#define SIGNAL_FOUND(frag, chan, amplitude)
void ADDER_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree ADDER variabl...
double m_las_PMT2_Ped_RMS
Gaudi::Property< float > m_beamBC1Z_90
void storeHit(const TileHit *hit, int fragType, int fragId, std::array< float, MAX_CHAN > &ehitVec, std::array< float, MAX_CHAN > &thitVec, const TileSamplingFraction *samplingFraction)
std::vector< std::array< short, MAX_DMU > > m_ROD_DMUDataformatErrVec
std::vector< std::array< short, MAX_DMU > > m_ROD_DMUDstrobeErrVec
ToolHandle< TileRawChannelBuilderFlatFilter > m_adderFilterAlgTool
void CISPAR_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// Clear Tree CISPAR variab...
SG::ReadHandleKey< TileRawChannelContainer > m_flxFitRawChannelContainerKey
double m_las_PMT1_Ped_RMS
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...
std::vector< std::array< float, MAX_CHAN > > m_timeVec
double getSigmaAlpha(const unsigned int i, const unsigned int gain=0) const
std::vector< std::array< float, MAX_CHAN > > m_eflxoptVec
std::array< float, 4 > m_LarEne
std::vector< std::array< int, MAX_CHAN > > m_gainVec
std::map< int, int > m_nSamplesFlxInDrawerMap
std::array< float, 16 > m_eneAdd
float time(int ind=0) const
Return time of ind-th sub-hit
double m_las_D4_AlphaPed_RMS
std::vector< std::array< float, MAX_CHAN > > m_chi2flxfitVec
double m_las_D2_Alpha_RMS
double m_las_D2_AlphaPed_RMS
static unsigned int getDrawerIdxFromFragId(unsigned int fragId)
Returns a drawer hash from fragId This function assumes drawer context (i.e.
double m_las_D1_Alpha_RMS
StatusCode initList(const EventContext &ctx)
Gaudi::Property< std::vector< std::string > > m_rosName
std::vector< int > m_l1Type
StatusCode storeBeamElements(const EventContext &ctx)
void DIGI_clearBranch(void)
//////////////////////////////////////////////////////////////////////////// /Clear Tree DIGI variabl...
Gaudi::Property< int > m_TBperiod
std::vector< std::array< float, MAX_CHAN > > m_ehitCnt
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
std::vector< std::array< float, MAX_CHAN > > m_eOptVec
std::array< unsigned int, 96 > m_coincTrig8
std::vector< std::array< float, MAX_CHAN > > m_pedfitVec
@ OnlineMegaElectronVolts
double m_las_D3_Alpha_RMS
std::vector< std::array< float, MAX_CHAN > > m_efitcVec
double getPedestalAlpha(const unsigned int i, const unsigned int gain=0) const
std::vector< std::array< int, MAX_MINIDRAWER > > m_mdChargeflxVec
short CheckDMUFormat(uint32_t header)
bit_31 of the DMU header must be 1 and bit_17 of the DMU header must be 0
Gaudi::Property< float > m_beamBC0X1