|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "Identifier/Identifier.h"
19 #include "GaudiKernel/ServiceHandle.h"
25 : m_cellIdHelper(nullptr)
29 throw std::runtime_error (
"LArHitContainerCnv_p2: Can't get CaloCell_ID");
41 std::vector<float> tempE; tempE.reserve(
size);
42 std::vector<float> tempT; tempT.reserve(
size);
46 std::multimap <unsigned int, unsigned int> map_hashPositions;
48 for (
unsigned int w=0;
w<
size;++
w){
50 map_hashPositions.insert(std::pair<unsigned int, int>((
unsigned int)hashId,
w));
55 std::multimap<unsigned int, unsigned int>::const_iterator iter;
58 for (iter=map_hashPositions.begin(); iter != map_hashPositions.end(); ++iter) {
60 unsigned int pHash=(iter->first)-
old;
62 unsigned int pos=iter->second;
64 tempE.push_back( (
float) (transCont->
At(
pos))->
energy() );
65 tempT.push_back( (
float) (transCont->
At(
pos))->
time() );
74 B.reduceToUS(tempT, persCont->
m_time);
93 std::vector<float> tempE; tempE.reserve(
cells);
94 std::vector<float> tempT; tempT.reserve(
cells);
96 A.expandFromUStoFloat(persCont->
m_time,tempT);
97 A.expandToFloat(persCont->
m_energy,tempE);
104 tempE[
i] != 0 ? (
double)(tempT[
i])/tempE[
i] : 0);
const std::string & Name() const
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
std::vector< unsigned short > m_time
boost::transform_iterator< make_const, typename CONT::const_iterator > const_iterator
void reserve(size_type n)
std::vector< unsigned int > m_channelHash
const CaloCell_ID * m_cellIdHelper
void setName(const std::string &name)
virtual void transToPers(const LArHitContainer *transColl, LArHitContainer_p2 *persColl, MsgStream &log) override
Class to store hit energy and time in LAr cell from G4 simulation.
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
def time(flags, cells_name, *args, **kw)
Persistent represenation of a LArHitContainer,.
std::vector< unsigned int > m_energy
const std::string & name() const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual void persToTrans(const LArHitContainer_p2 *persColl, LArHitContainer *transColl, MsgStream &log) override
const T * At(unsigned int pos) const
const_iterator begin() const