9 #include "CLHEP/Random/RandFlat.h"
10 #include "CLHEP/Random/RandPoissonQ.h"
37 CLHEP::HepRandomEngine* engine)
45 for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin();
46 _hit != rpcHits.end(); ++_hit){
54 std::pair<int, int> digi(topology.channel(entr)+1,
64 CLHEP::HepRandomEngine* engine)
73 const RectangularStripTopology* top_ =
dynamic_cast<const
74 RectangularStripTopology*
>(&(roll->
topology()));
75 float xmin = (top_->localPosition(0.)).
x();
76 float xmax = (top_->localPosition((
float)roll->
nstrips())).x();
77 float striplength = (top_->stripLength());
78 area = striplength*(xmax-
xmin);
82 const TrapezoidalStripTopology* top_=
dynamic_cast<const TrapezoidalStripTopology*
>(&(roll->
topology()));
83 float xmin = (top_->localPosition(0.)).
x();
84 float xmax = (top_->localPosition((
float)roll->
nstrips())).x();
85 float striplength = (top_->stripLength());
86 area = striplength*(xmax-
xmin);
91 CLHEP::RandPoissonQ randPoissonQ(*engine, ave);
92 N_hits = randPoissonQ.fire();
95 int strip =
static_cast<int>(CLHEP::RandFlat::shoot(engine, 1, nstrips));
97 time_hit = (
static_cast<int>(CLHEP::RandFlat::shoot(engine, (
nbxing*
gate)/gate))) -
nbxing/2;
98 std::pair<int, int> digi(strip,time_hit);
T getParameter(std::string const &) const
const Topology & topology() const
CaloTopology const * topology(0)
void simulateNoise(const RPCRoll *, CLHEP::HepRandomEngine *) override
RPCSynchronizer * _rpcSync
DetectorHitMap theDetectorHitMap
void setRPCSimSetUp(RPCSimSetUp *simsetup)
RPCSimSetUp * getRPCSimSetUp()
const RPCRollSpecs * specs() const
int getSimHitBx(const PSimHit *, CLHEP::HepRandomEngine *)
std::set< std::pair< int, int > > strips
uint32_t rawId() const
get the raw id
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
RPCSimSimple(const edm::ParameterSet &config)
Container::value_type value_type
void simulate(const RPCRoll *roll, const edm::PSimHitContainer &rpcHits, CLHEP::HepRandomEngine *) override
std::vector< PSimHit > PSimHitContainer
RPCDigiSimLinks theRpcDigiSimLinks
const Topology & topology() const
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.