1#include "RawDataCnv/EventManagement/MdcMcHitBuilder.h"
2#include "Identifier/MdcID.h"
10 vector<uint32_t>::const_iterator& eiter,
MdcTruth_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 );
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;
64 return StatusCode::SUCCESS;
73 f.open( initFile.c_str() );
77 cerr <<
"Error: could not open file " << initFile << endl;
78 return StatusCode::FAILURE;
83 cerr <<
"Error: could not find '##MdcTruthConf' in file " << initFile << endl;
84 return StatusCode::FAILURE;
98 return StatusCode::FAILURE;
102 return StatusCode::SUCCESS;
109void MdcMcHitBuilder::makeMdcTruth( MdcMcHitCol::const_iterator&
iter,
MdcTruth_t& mt ) {
117 mt.
x = int( ( *iter )->getPositionX() *
m_xCoeff );
118 mt.
y = int( ( *iter )->getPositionY() *
m_yCoeff );
119 mt.
z = int( ( *iter )->getPositionZ() *
m_zCoeff );
120 mt.
posFlag = ( *iter )->getPositionFlag();
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 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 &)
ObjectVector< MdcMcHit > MdcMcHitCol