|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "CLHEP/Units/SystemOfUnits.h"
29 , m_energy_cut(2.*
GeV)
31 , m_caloCellName(
"AllCalo")
92 msg() << MSG::INFO <<
"Included calorimeter samplings: ";
97 msg() << MSG::INFO <<
"\042" << sampling
109 samplingV.push_back(idSample);
116 <<
"Included calorimeter : \042"
118 <<
"\042 samplings:";
119 const std::vector<CaloSampling::CaloSample>& samplingV =
p.second;
129 return StatusCode::SUCCESS;
146 return StatusCode::FAILURE;
169 std::vector<CaloSampling::CaloSample> samplingV =
p.second;
185 if (
find(samplingV.begin(), samplingV.end(), idSample) != samplingV.end()) {
200 msg() << MSG::INFO <<
"FEB IDs: ";
202 std::ostringstream
os;
203 os << std::hex << febID;
204 msg() << MSG::INFO <<
" \042" <<
os.str() <<
"\042";
217 std::map<CaloSampling::CaloSample, double> sumEPerSampling, sumETimePerSampling;
218 std::map<HWIdentifier, double> sumEPerFeb, sumETimePerFeb;
219 double sumETotal = 0, sumETimeTotal = 0;
229 (
"Looping over CaloCells of calorimeter : \042"
232 std::vector<CaloSampling::CaloSample> samplingV =
p.second;
249 if (
find(samplingV.begin(), samplingV.end(), idSample) != samplingV.end()) {
263 double energy = (*cell)->e();
264 double time = (*cell)->time();
271 sumEPerSampling[idSample] +=
energy;
272 sumETimePerSampling[idSample] +=
energy *
time;
274 sumEPerFeb[febID] +=
energy;
282 (
"cell time = " <<
time/
ns <<
" ns"
283 <<
"; energy = " <<
energy/
GeV <<
" GeV" );
318 double peakTime = (sumEPerSampling[idSample] > 0.) ? sumETimePerSampling[idSample]/sumEPerSampling[idSample] :
NOTIME;
328 double peakTime = (sumEPerFeb[febID] > 0.) ? sumETimePerFeb[febID]/sumEPerFeb[febID] :
NOTIME;
330 m_febId_feb->push_back(febID.get_identifier32().get_compact());
338 m_time = (sumETotal > 0.) ? sumETimeTotal/sumETotal : 0.;
342 return StatusCode::SUCCESS;
352 return StatusCode::SUCCESS;
464 return StatusCode::SUCCESS;
481 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
CBNT_Timing(const std::string &name, ISvcLocator *pSvcLocator)
std::map< int, std::string > m_slotToFebNameLookup
int phi(const Identifier id) const
return phi according to :
Const iterator class for DataVector/DataList.
StatusCode setupLookupTables()
internal helpers
std::vector< long > * m_feedthrough_feb
std::string find(const std::string &s)
return a remapped string
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
std::vector< long > * m_eta_cell
std::vector< long > * m_slot_feb
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
int sampling(const Identifier id) const
return sampling according to :
const std::string & key() const
Return the StoreGate ID for the referenced object.
value_type get_compact() const
Get the compact id.
int eta(const Identifier id) const
return eta according to :
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
std::vector< std::string > m_sampling_names
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::vector< long > * m_layer_cell
std::vector< float > * m_energy_cell
std::vector< long > * m_febId_cell
::StatusCode StatusCode
StatusCode definition for legacy code.
std::map< CaloSampling::CaloSample, std::string > m_samplingToNameLookup
std::vector< HWIdentifier > m_febIDs
SUBCALO
enumeration of sub calorimeters
void addBranch(const std::string &branchname, T &obj, const std::string &leaflist)
std::vector< long > * m_febId_feb
std::map< CaloCell_ID::SUBCALO, std::string > m_caloToNameLookup
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
const LArOnlineID * m_onlineHelper
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
static const int NOENERGY
virtual StatusCode CBNT_finalize() override
StatusCode initialize(bool used=true)
virtual StatusCode CBNT_initialize() override
Wrapper to avoid constant divisions when using units.
Container class for CaloCell.
std::vector< float > * m_time_layer
std::vector< long > * m_layer_layer
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
std::string m_caloCellName
virtual StatusCode CBNT_execute() override
std::map< std::string, CaloSampling::CaloSample > m_samplingFromNameLookup
def time(flags, cells_name, *args, **kw)
CaloCell_ID::CaloSample getSampling() const
cell sampling
std::vector< float > * m_time_feb
std::vector< long > * m_phi_cell
std::vector< float > * m_time_cell
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
std::vector< CaloSampling::CaloSample > m_samplingIndices
stores
std::map< std::string, CaloCell_ID::SUBCALO > m_caloFromNameLookup
std::map< CaloCell_ID::SUBCALO, std::vector< CaloSampling::CaloSample > > m_calosAndSamplings
virtual StatusCode CBNT_clear() override
bool is_lar_em(Identifier id) const
std::map< CaloSampling::CaloSample, CaloCell_ID::SUBCALO > m_caloLookup