1#include "RawDataCnv/EventManagement/MucMcHitBuilder.h"
2#include "Identifier/MucID.h"
10 vector<uint32_t>::const_iterator& eiter,
MucTruth_t& mt ) {
11 uint32_t helpVal = *(
iter++ );
12 assert(
iter != eiter );
14 assert(
iter != eiter );
16 assert(
iter != eiter );
18 assert(
iter != eiter );
20 assert(
iter != eiter );
22 assert(
iter != eiter );
25 mt.
trackIndex = ( helpVal & m_trackIndexMask ) >> m_trackIndexIndex;
26 mt.
partId = ( helpVal & m_partIdMask ) >> m_partIdIndex;
27 mt.
segId = ( helpVal & m_segIdMask ) >> m_segIdIndex;
28 mt.
gapId = ( helpVal & m_gapIdMask ) >> m_gapIdIndex;
29 mt.
stripId = ( helpVal & m_stripIdMask ) >> m_stripIdIndex;
70 return StatusCode::SUCCESS;
79 f.open( initFile.c_str() );
83 cerr <<
"Error: could not open file " << initFile << endl;
84 return StatusCode::FAILURE;
89 cerr <<
"Error: could not find '##MucTruthConf' in file " << initFile << endl;
90 return StatusCode::FAILURE;
106 return StatusCode::FAILURE;
110 return StatusCode::SUCCESS;
117void MucMcHitBuilder::makeMucTruth( MucMcHitCol::const_iterator& pMucMcHit,
MucTruth_t& mt ) {
118 Identifier ident = ( *pMucMcHit )->identify();
120 mt.
trackIndex = ( *pMucMcHit )->getTrackIndex() % 1000;
125 mt.
x = int( ( *pMucMcHit )->getPositionX() *
m_xCoeff );
126 mt.
y = int( ( *pMucMcHit )->getPositionY() *
m_yCoeff );
127 mt.
z = int( ( *pMucMcHit )->getPositionZ() *
m_zCoeff );
128 mt.
px = int( ( *pMucMcHit )->getPx() *
m_pxCoeff );
129 mt.
py = int( ( *pMucMcHit )->getPy() *
m_pyCoeff );
130 mt.
pz = int( ( *pMucMcHit )->getPz() *
m_pzCoeff );
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
eformat::write::FullEventFragment WriteRawEvent
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 part(const Identifier &id)
static int gap(const Identifier &id)
static int seg(const Identifier &id)
static int strip(const Identifier &id)
virtual uint32_t getREID(uint32_t reid)
virtual StatusCode initialize(string &initFile)
virtual uint32_t getTEID(uint32_t teid)
virtual void unPack(vector< uint32_t >::const_iterator &, vector< uint32_t >::const_iterator &, MucTruth_t &)
virtual StatusCode pack(MucMcHitCol *mucMcHitCol, WriteRawEvent *&re)
ObjectVector< MucMcHit > MucMcHitCol