14 vector<uint32_t>::const_iterator& eiter,
TofTruth_t& tt)
16 uint32_t helpVal = *(
iter++); assert(
iter != eiter);
26 tt.
trackIndex = (helpVal&m_trackIndexMask) >> m_trackIndexIndex;
27 tt.
partId = (helpVal&m_partIdMask) >> m_partIdIndex;
28 tt.
scinNb = (helpVal&m_scinNbMask) >> m_scinNbIndex;
70 return StatusCode::SUCCESS;
80 f.open(initFile.c_str());
83 cerr <<
"Error: could not open file " << initFile << endl;
84 return StatusCode::FAILURE;
88 cerr <<
"Error: could not find '##TofTruthConf' in file " << initFile << endl;
89 return StatusCode::FAILURE;
93 !
Builder::expectInt( f,
"trackIndex", initFile, m_trackIndexIndex, m_trackIndexMask) ||
105 return StatusCode::FAILURE;
109 return StatusCode::SUCCESS;
124void TofMcHitBuilder::makeTofTruth
125(TofMcHitCol::const_iterator& pTofMcHit,
TofTruth_t& tt)
134 tt.
trackIndex = (*pTofMcHit)->getTrackIndex();
137 tt.
x = int((*pTofMcHit)->getPositionX() *
m_xCoeff);
138 tt.
y = int((*pTofMcHit)->getPositionY() *
m_yCoeff);
139 tt.
z = int((*pTofMcHit)->getPositionZ() *
m_zCoeff);
static bool find(ifstream &f, string msg, string fname)
static bool expect(ifstream &f, string msg, string fname)
static bool expectLong(ifstream &f, string msg, string fname, uint64_t &val)
static bool expectInt(ifstream &f, string msg, string fname, uint32_t &val1, uint32_t &val2)
static value_type getPHI_BARREL_MAX()
static bool is_barrel(const Identifier &id)
Test for barrel.
static int phi_module(const Identifier &id)
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
static int layer(const Identifier &id)
virtual uint32_t getREID(uint32_t reid)
virtual StatusCode initialize(string &initFile)
virtual void unPack(vector< uint32_t >::const_iterator &, vector< uint32_t >::const_iterator &, TofTruth_t &)
uint64_t m_trackLengthCoeff
virtual StatusCode pack(TofMcHitCol *tofMcHitCol, WriteRawEvent *&re)
virtual uint32_t getTEID(uint32_t teid)
ObjectVector< TofMcHit > TofMcHitCol