4 #include "CLHEP/Random/RandFlat.h" 5 #include "CLHEP/Random/RandPoissonQ.h" 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"))
30 else if (reader ==
"ROOT")
45 CLHEP::HepRandomEngine* engine)
53 CLHEP::RandPoissonQ randPoissonQ(*engine, meanNumberOfEvents);
54 int nEventsToAdd = randPoissonQ.fire();
60 for(
int i = 0;
i < nEventsToAdd; ++
i) {
63 vector<PSimHit> neutronHits;
66 for( vector<PSimHit>::const_iterator neutronHitItr = neutronHits.begin();
67 neutronHitItr != neutronHits.end(); ++neutronHitItr)
69 const PSimHit & rawHit = *neutronHitItr;
73 rawHit.
tof()+timeOffset,
78 result.push_back(
hit);
T getParameter(std::string const &) const
std::vector< double > theEventOccupancy
float tof() const
deprecated name for timeOfFlight()
Geom::Theta< float > thetaAtEntry() const
fast and more accurate access to momentumAtEntry().theta()
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
Local3DPoint exitPoint() const
Exit point in the local Det frame.
NeutronReader * theHitReader
virtual ~SubsystemNeutronReader()
void generateChamberNoise(int chamberType, int chamberIndex, edm::PSimHitContainer &result, CLHEP::HepRandomEngine *)
virtual int detId(int chamberIndex, int localDetId)=0
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
float theEventsInWindow
how many collsions happened between theStartTime and theEndTime
unsigned short processType() const
virtual void readNextEvent(int chamberType, edm::PSimHitContainer &result)=0
float energyLoss() const
The energy deposit in the PSimHit, in ???.
unsigned int trackId() const
Geom::Phi< float > phiAtEntry() const
fast and more accurate access to momentumAtEntry().phi()
std::vector< PSimHit > PSimHitContainer
Local3DPoint entryPoint() const
Entry point in the local Det frame.
float theLuminosity
in units of 10**34, set by Muon:NeutronLuminosity
unsigned int detUnitId() const