14 vector<uint32_t>::const_iterator& eiter,
MdcTruth_t& mt)
16 uint32_t helpVal = *(
iter++); assert(
iter != eiter);
23 mt.
trackIndex = (helpVal & m_trackIndexMask) >> m_trackIndexIndex;
24 mt.
layerId = (helpVal & m_layerIdMask) >> m_layerIdIndex;
25 mt.
cellId = (helpVal & m_cellIdMask) >> m_cellIdIndex;
26 mt.
posFlag = (helpVal & m_posFlagMask) ? 1 : 0 ;
65 return StatusCode::SUCCESS;
75 f.open(initFile.c_str());
78 cerr <<
"Error: could not open file " << initFile << endl;
79 return StatusCode::FAILURE;
83 cerr <<
"Error: could not find '##MdcTruthConf' in file " << initFile << endl;
84 return StatusCode::FAILURE;
88 !
Builder::expectInt( f,
"trackIndex", initFile, m_trackIndexIndex, m_trackIndexMask) ||
98 return StatusCode::FAILURE;
102 return StatusCode::SUCCESS;
117void MdcMcHitBuilder::makeMdcTruth
127 mt.
x = int((*iter)->getPositionX() *
m_xCoeff);
128 mt.
y = int((*iter)->getPositionY() *
m_yCoeff);
129 mt.
z = int((*iter)->getPositionZ() *
m_zCoeff);
130 mt.
posFlag = (*iter)->getPositionFlag();
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 int layer(const Identifier &id)
Values of different levels (failure returns 0)
static int wire(const Identifier &id)
virtual StatusCode initialize(string &initFile)
virtual StatusCode pack(MdcMcHitCol *mdcMcHitCol, WriteRawEvent *&re)
virtual uint32_t getREID(uint32_t reid)
virtual uint32_t getTEID(uint32_t teid)
virtual void unPack(vector< uint32_t >::const_iterator &, vector< uint32_t >::const_iterator &, MdcTruth_t &)