11 : theFileNameBase(fileNameBase),
13 theStreamPos(11, 0) {}
20 throw cms::Exception(
"NeutronReader") <<
"Muon neutron noise file missing " << fileName.str();
24 for (
int ihit = 0; ihit <
nhits; ++ihit) {
25 float entryX, entryY, entryZ, exitX, exitY, exitZ;
29 fin >> entryX >> entryY >> entryZ >> exitX >> exitY >> exitZ >> p >> tof >> eloss >> type >> layer >> track >>
33 PSimHit phit(entry, exit, p, tof, eloss, type, layer, track, theta, phi);
34 result.push_back(phit);
46 LogDebug(
"NeutronReader") <<
"starting from pos " <<
theStreamPos[chamberType] <<
" EOF " << fin.eof();
57 LogDebug(
"NeutronReader") <<
"reached EOF, resetting streampos ";
60 fin.seekg(0, ios::beg);
void readNextEvent(int chamberType, edm::PSimHitContainer &result) override
Geom::Theta< T > theta() const
std::string theFileNameBase
std::vector< std::streampos > theStreamPos
AsciiNeutronReader(std::string fileNameBase)
std::vector< PSimHit > PSimHitContainer
int read_nhits(std::ifstream &fin, int chamberType)
void resetStreampos(std::ifstream &fin, int chamberType)