8 #include "CLHEP/Units/SystemOfUnits.h"
19 declareInterface<IDataRetriever>(
this);
33 return StatusCode::SUCCESS;
37 int numTrigTowers = TTVector->
size();
41 DataVect phi; phi.reserve(numTrigTowers);
42 DataVect eta; eta.reserve(numTrigTowers);
43 DataVect emEnergyVec; emEnergyVec.reserve(numTrigTowers);
44 DataVect hadEnergyVec; hadEnergyVec.reserve(numTrigTowers);
46 DataVect sumEnergyVec; sumEnergyVec.reserve(numTrigTowers);
47 DataVect numADCVec; numADCVec.reserve(numTrigTowers);
48 DataVect emBCIDVec; emBCIDVec.reserve(numTrigTowers);
49 DataVect hadBCIDVec; hadBCIDVec.reserve(numTrigTowers);
50 DataVect isEMSaturated; isEMSaturated.reserve(numTrigTowers);
51 DataVect isHadSaturated; isHadSaturated.reserve(numTrigTowers);
52 DataVect emADCVec; emADCVec.reserve(numTrigTowers);
53 DataVect hadADCVec; hadADCVec.reserve(numTrigTowers);
57 for ( trigTowerIter = TTVector->
begin(); trigTowerIter < TTVector->
end(); ++trigTowerIter ){
60 if ( (*trigTowerIter)->cpET() == 0 )
continue;
76 const int layer = (*trigTowerIter)->layer();
77 const int cpET = (*trigTowerIter)->cpET();
78 const int peakEnergy = (*trigTowerIter)->adc()[(*trigTowerIter)->adcPeak()];
79 const int jepET = (*trigTowerIter)->jepET();
83 emEnergy = peakEnergy;
86 hadEnergy = peakEnergy;
90 <<
" at layer: " <<
layer <<
", with"
91 <<
" eta:"<<(*trigTowerIter)->eta() <<
", phi:"<<(*trigTowerIter)->phi()
92 <<
", em energy:"<< emEnergy <<
", had energy:"<< hadEnergy
93 <<
", cpET:" << cpET <<
", jepET:"<< jepET <<
endmsg;
96 eta.push_back(
DataType( (*trigTowerIter)->eta() ));
97 phi.push_back(
DataType( (*trigTowerIter)->phi() ));
99 sumEnergy = emEnergy+hadEnergy;
101 emEnergyVec.push_back( emEnergy );
102 hadEnergyVec.push_back( hadEnergy );
103 sumEnergyVec.push_back( sumEnergy );
106 isEMSaturated.push_back(
DataType( ((*trigTowerIter)->isCpSaturated())? 1 : 0 ));
107 isHadSaturated.push_back(
DataType( ((*trigTowerIter)->isJepSaturated())? 1 : 0 ));
109 emADCVec.push_back( 0. );
110 hadADCVec.push_back( 0. );
111 numADCVec.push_back( 0. );
112 emBCIDVec.push_back( 0. );
113 hadBCIDVec.push_back( 0. );
119 myDataMap[
"phi"] = std::move(phi);
120 myDataMap[
"eta"] = std::move(eta);
121 myDataMap[
"emEnergy"] = std::move(emEnergyVec);
122 myDataMap[
"hadEnergy"] = std::move(hadEnergyVec);
123 myDataMap[
"sumEnergy"] = std::move(sumEnergyVec);
125 myDataMap[
"emADC"] = std::move(emADCVec);
126 myDataMap[
"hadADC"] = std::move(hadADCVec);
127 myDataMap[
"numADC"] = std::move(numADCVec);
128 myDataMap[
"emBCID"] = std::move(emBCIDVec);
129 myDataMap[
"hadBCID"] = std::move(hadBCIDVec);
130 myDataMap[
"isEMSaturated"] = std::move(isEMSaturated);
131 myDataMap[
"isHadSaturated"] = std::move(isHadSaturated);