3#include "Identifier/TofID.h"
4#include "RawDataCnv/EventManagement/TofMcHitBuilder.h"
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;
29 tt.
strip = (helpVal&m_stripMask) >> m_stripIndex;
71 return StatusCode::SUCCESS;
81 f.open(initFile.c_str());
84 cerr <<
"Error: could not open file " << initFile << endl;
85 return StatusCode::FAILURE;
89 cerr <<
"Error: could not find '##TofTruthConf' in file " << initFile << endl;
90 return StatusCode::FAILURE;
107 return StatusCode::FAILURE;
111 return StatusCode::SUCCESS;
126void TofMcHitBuilder::makeTofTruth
127(TofMcHitCol::const_iterator& pTofMcHit,
TofTruth_t& tt)
131 uint32_t scinNum = 0;
146 tt.
trackIndex = (*pTofMcHit)->getTrackIndex();
150 tt.
x = int((*pTofMcHit)->getPositionX() *
m_xCoeff);
151 tt.
y = int((*pTofMcHit)->getPositionY() *
m_yCoeff);
152 tt.
z = int((*pTofMcHit)->getPositionZ() *
m_zCoeff);
static bool expectLong(ifstream &f, string msg, string fname, uint64_t &val)
static bool expect(ifstream &f, string msg, string fname)
static bool expectInt(ifstream &f, string msg, string fname, uint32_t &val1, uint32_t &val2)
static bool find(ifstream &f, string msg, string fname)
static int endcap(const Identifier &id)
static int strip(const Identifier &id)
static bool is_scin(const Identifier &id)
static value_type getPHI_BARREL_MAX()
static bool is_barrel(const Identifier &id)
Test for barrel.
static bool is_mrpc(const Identifier &id)
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)
static int module(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)
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")