4 #include "CLHEP/Random/RandFlat.h" 5 #include "CLHEP/Random/RandPoissonQ.h" 14 : theHitReader(nullptr),
15 theLuminosity(
pset.getParameter<double>(
"luminosity")),
16 theStartTime(
pset.getParameter<double>(
"startTime")),
17 theEndTime(
pset.getParameter<double>(
"endTime")),
18 theEventOccupancy(
pset.getParameter<
vector<double> >(
"eventOccupancy"))
24 string reader =
pset.getParameter<
string>(
"reader");
28 }
else if (
reader ==
"ROOT") {
38 CLHEP::HepRandomEngine* engine) {
42 CLHEP::RandPoissonQ randPoissonQ(*engine, meanNumberOfEvents);
43 int nEventsToAdd = randPoissonQ.fire();
49 for (
int i = 0;
i < nEventsToAdd; ++
i) {
52 vector<PSimHit> neutronHits;
55 for (vector<PSimHit>::const_iterator neutronHitItr = neutronHits.begin(); neutronHitItr != neutronHits.end();
57 const PSimHit& rawHit = *neutronHitItr;
std::vector< double > theEventOccupancy
unsigned int detUnitId() const
Local3DPoint exitPoint() const
Exit point in the local Det frame.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static std::string const input
SubsystemNeutronReader(const edm::ParameterSet &pset)
std::vector< int > theChambersDone
just makes sure chambers aren't done twice
NeutronReader * theHitReader
unsigned short processType() const
virtual ~SubsystemNeutronReader()
void generateChamberNoise(int chamberType, int chamberIndex, edm::PSimHitContainer &result, CLHEP::HepRandomEngine *)
virtual int detId(int chamberIndex, int localDetId)=0
Local3DPoint entryPoint() const
Entry point in the local Det frame.
unsigned int trackId() const
float theEventsInWindow
how many collsions happened between theStartTime and theEndTime
float tof() const
deprecated name for timeOfFlight()
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
float energyLoss() const
The energy deposit in the PSimHit, in ???.
virtual void readNextEvent(int chamberType, edm::PSimHitContainer &result)=0
Geom::Theta< float > thetaAtEntry() const
fast and more accurate access to momentumAtEntry().theta()
std::vector< PSimHit > PSimHitContainer
float theLuminosity
in units of 10**34, set by Muon:NeutronLuminosity
Geom::Phi< float > phiAtEntry() const
fast and more accurate access to momentumAtEntry().phi()