Go to the documentation of this file.
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;
NeutronReader * theHitReader
static const std::string input
void generateChamberNoise(int chamberType, int chamberIndex, edm::PSimHitContainer &result, CLHEP::HepRandomEngine *)
virtual int detId(int chamberIndex, int localDetId)=0
float tof() const
deprecated name for timeOfFlight()
float theEventsInWindow
how many collsions happened between theStartTime and theEndTime
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Local3DPoint entryPoint() const
Entry point in the local Det frame.
unsigned int detUnitId() const
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
unsigned short processType() const
Local3DPoint exitPoint() const
Exit point in the local Det frame.
float theLuminosity
in units of 10**34, set by Muon:NeutronLuminosity
Geom::Phi< float > phiAtEntry() const
fast and more accurate access to momentumAtEntry().phi()
std::vector< double > theEventOccupancy
std::vector< int > theChambersDone
just makes sure chambers aren't done twice
float energyLoss() const
The energy deposit in the PSimHit, in ???.
unsigned int trackId() const
std::vector< PSimHit > PSimHitContainer
Geom::Theta< float > thetaAtEntry() const
fast and more accurate access to momentumAtEntry().theta()
virtual void readNextEvent(int chamberType, edm::PSimHitContainer &result)=0
SubsystemNeutronReader(const edm::ParameterSet &pset)
virtual ~SubsystemNeutronReader()