11 m_lvl1Helper(nullptr),
13 m_caloCellHelper(nullptr),
14 m_tileCablingService(nullptr),
15 m_bInitialized(false),
16 m_bLArDigitsInitialized(false),
17 m_bTileDigitsInitialized(false)
29 return std::vector<const CaloCell*>();
35 const std::vector<const CaloCell*> vCells(this->
caloCells(ttId));
36 std::vector<std::vector<const CaloCell*> > ccByLayer;
37 std::vector<const CaloCell*>
cc;
38 int caloSampleInUse(-10);
40 if(vCells.size()!=0) {
41 std::vector<const CaloCell*>::const_iterator itCells = vCells.begin();
42 for(;itCells!=vCells.end();++itCells) {
47 if( caloSampleInUse != currentCaloSample ){
48 ccByLayer.push_back(
cc);
50 caloSampleInUse = currentCaloSample;
52 cc.push_back(*itCells);
54 ccByLayer.push_back(
cc);
62 const std::vector<const CaloCell*> vCells(this->
caloCells(ttId));
64 int caloSampleInUse(-10);
65 if(vCells.size()!=0) {
66 std::vector<const CaloCell*>::const_iterator itCells = vCells.begin();
67 for(;itCells!=vCells.end();++itCells) {
71 if( caloSampleInUse != currentCaloSample ){
72 layers.push_back(currentCaloSample);
73 caloSampleInUse = currentCaloSample;
109 if(
cells.size()!=0) {
110 typedef std::vector<const CaloCell*>::const_iterator Itr;
114 float cellEnergy(0.0);
121 cellEnergy+=(*i)->energy()*0.5;
124 cellEnergy+=(*i)->energy();
129 cellEnergy+=(*i)->energy();
132 if(
mode == 1){
et += cellEnergy/cosh((*i)->eta());}
144 ATH_MSG_INFO(
"Initialize LVL1::L1CaloCells2TriggerTowers");
157 return StatusCode::FAILURE;
162 sc =
detStore()->retrieve(lvl1_id,
"CaloLVL1_ID");
180 return StatusCode::SUCCESS;
193 for(; it_towerId!=it_towerEnd;++it_towerId){
194 m_mTTCaloCells[(*it_towerId).get_identifier32().get_compact()].reserve(60);
198 for (;itCell!=cellContainer.
end();++itCell){
207 if (ttId1 != invalidId) {
210 if (ttId2 != invalidId) {
230 for(; it_towerId!=it_towerEnd;++it_towerId){
231 m_mTTLArDigits[(*it_towerId).get_identifier32().get_compact()].reserve(60);
235 for (;itLArDigit!=larDigitContainer.
end();++itLArDigit){
237 const LArDigit * larDigit= *itLArDigit;
240 if(
cabling->isOnlineConnected(larDigitChannelID)) {
289 for(; it_towerId!=it_towerEnd;++it_towerId){
290 m_mTTTileDigits[(*it_towerId).get_identifier32().get_compact()].reserve(8);
296 for(; collItr!=lastColl; ++collItr) {
301 if (digitsItr!=lastDigits) {
302 for(; digitsItr!=lastDigits; ++digitsItr) {
378 return std::vector<const LArDigit*>();
389 return std::vector<const TileDigits*>();
399 std::vector<const TileDigits*> vTileDigits(this->
tileDigits(ttId));
401 std::vector<double> vADCSum;
404 std::vector<const TileDigits*>::const_iterator it_digit = vTileDigits.begin();
405 for(;it_digit!=vTileDigits.end();++it_digit) {
407 std::vector<double> vADC((*it_digit)->get_digits());
409 int adcSize(vADC.size());
410 if(vADCSum.size()==0) vADCSum.resize(adcSize);
412 for(
int i=0;
i<adcSize;++
i) {
420 const double inv_nSum = 1. /
static_cast<double> (nSum);
421 for(;it_adc!=vADCSum.end();++it_adc){
422 (*it_adc) *= inv_nSum;
431 std::vector<const LArDigit*> vLArDigits(this->
larDigits(ttId));
433 std::vector<double> vADCSum;
436 std::vector<const LArDigit*>::const_iterator it_digit = vLArDigits.begin();
437 for(;it_digit!=vLArDigits.end();++it_digit) {
439 std::vector<short> vADC((*it_digit)->samples());
441 int adcSize(vADC.size());
442 if(vADCSum.size()==0) vADCSum.resize(adcSize);
444 for(
int i=0;
i<adcSize;++
i) {
452 const double inv_nSum = 1. /
static_cast<double> (nSum);
453 for(;it_adc!=vADCSum.end();++it_adc){
454 (*it_adc) *= inv_nSum;
470 std::vector<const CaloCell*> vCells =
it->second;
482 std::map<unsigned int, std::vector<const CaloCell*> >::const_iterator
it =
m_mTTCaloCells.begin();
488 std::vector<const CaloCell*> vCells =
it->second;
497 std::vector<const CaloCell*>::const_iterator itCells = vCells.begin();
498 for(;itCells!=vCells.end();++itCells) {
507 ATH_MSG_INFO(
" * tile - section: "<<
section <<
", side: "<<
side<<
", module: "<<
module<<
", tower: "<<tower<<
", sample: "<<
sample<<
" - eta: "<< (*itCells)->eta()<<
", phi: "<< (*itCells)->phi()<<
", E:" << (*itCells)->energy() );
515 ATH_MSG_INFO(
" * fcal - pos_neg_z: "<<pos_neg<<
", module: "<<
module<<
", ieta: "<<eta<<
", iphi: "<<phi<<
" - eta: "<< (*itCells)->eta()<<
", phi: "<< (*itCells)->phi()<<
", E:" << (*itCells)->energy() );
523 ATH_MSG_INFO(
" * larg - pos_neg_z: "<<pos_neg<<
", sampling: "<<sampling<<
", region: "<<region<<
", ieta: "<<eta<<
", iphi: "<<phi<<
" - eta: "<< (*itCells)->eta()<<
", phi: "<< (*itCells)->phi()<<
", E:" << (*itCells)->energy() );
533 std::vector<const LArDigit*>::const_iterator itLArDigits = vLArDigits.begin();
534 for(;itLArDigits!=vLArDigits.end();++itLArDigits) {
536 const LArDigit* larDigit= *itLArDigits;
541 std::vector<short> vADC= larDigit->
samples();
542 std::vector<short>::const_iterator it_sample = vADC.begin();
543 for(;it_sample!=vADC.end();++it_sample) std::cout<< *it_sample<<
" ";
544 std::cout<<std::endl;
567 std::vector<const LArDigit*> vLArDigits =
it->second;
568 this->
dump(vLArDigits);
577 std::map<unsigned int, std::vector<const LArDigit*> >::const_iterator
it =
m_mTTLArDigits.begin();
582 std::vector<const LArDigit*> vLArDigits =
it->second;
583 this->
dump(vLArDigits);
591 std::vector<const TileDigits*>::const_iterator itTileDigits = vTileDigits.begin();
592 for(;itTileDigits!=vTileDigits.end();++itTileDigits) {
603 std::vector<double> vADC = tileDigit->
get_digits();
604 std::vector<double>::const_iterator it_sample = vADC.begin();
605 for(;it_sample!=vADC.end();++it_sample){
618 std::vector<const TileDigits*> vTileDigits =
it->second;
619 this->
dump(vTileDigits);
627 std::map<unsigned int, std::vector<const TileDigits*> >::const_iterator
it =
m_mTTTileDigits.begin();
632 std::vector<const TileDigits*> vTileDigits =
it->second;
633 this->
dump(vTileDigits);