9 #include "CLHEP/Random/RandFlat.h"
10 #include "CLHEP/Random/RandPoissonQ.h"
29 std::cout <<
"Average Cluster Size = " << aveCls <<
" strips" << std::endl;
30 std::cout <<
"RPC Time Resolution = " << resRPC <<
" ns" << std::endl;
31 std::cout <<
"RPC Signal formation time = " << timOff <<
" ns" << std::endl;
32 std::cout <<
"RPC adjacent strip delay = " << dtimCs <<
" ns" << std::endl;
33 std::cout <<
"Electronic Jitter = " << resEle <<
" ns" << std::endl;
34 std::cout <<
"Signal propagation time = " << sspeed <<
" x c" << std::endl;
35 std::cout <<
"Link Board Gate Width = " << lbGate <<
" ns" << std::endl;
51 for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin(); _hit != rpcHits.end(); ++_hit) {
57 float eff = CLHEP::RandFlat::shoot(engine);
59 int centralStrip = topology.channel(entr) + 1;
60 int fstrip = centralStrip;
61 int lstrip = centralStrip;
63 double w = CLHEP::RandFlat::shoot(engine);
66 int clsize =
static_cast<int>(-1. *
aveCls *
log(w) + 1.);
68 cls.push_back(centralStrip);
70 for (
int cl = 0;
cl < (clsize - 1) / 2;
cl++)
71 if (centralStrip -
cl - 1 >= 1) {
72 fstrip = centralStrip -
cl - 1;
73 cls.push_back(fstrip);
75 for (
int cl = 0;
cl < (clsize - 1) / 2;
cl++)
76 if (centralStrip +
cl + 1 <= roll->
nstrips()) {
77 lstrip = centralStrip +
cl + 1;
78 cls.push_back(lstrip);
80 if (clsize % 2 == 0) {
85 if (lstrip < roll->nstrips()) {
87 cls.push_back(lstrip);
92 cls.push_back(fstrip);
98 for (std::vector<int>::iterator
i = cls.begin();
i != cls.end();
i++) {
100 std::pair<unsigned int, int> digi(*
i, time_hit);
114 if (rpcId.
region() == 0) {
119 area = striplength * (xmax -
xmin);
125 area = striplength * (xmax -
xmin);
130 CLHEP::RandPoissonQ randPoissonQ(*engine, ave);
131 N_hits = randPoissonQ.fire();
134 int strip =
static_cast<int>(CLHEP::RandFlat::shoot(engine, 1, nstrips));
136 time_hit = (
static_cast<int>(CLHEP::RandFlat::shoot(engine, (
nbxing *
gate) / gate))) -
nbxing / 2;
137 std::pair<int, int> digi(strip, time_hit);
LocalPoint centreOfStrip(int strip) const
LocalPoint localPosition(float strip) const override
static std::vector< std::string > checklist log
DetectorHitMap theDetectorHitMap
void setRPCSimSetUp(RPCSimSetUp *simsetup)
constexpr uint32_t rawId() const
get the raw id
RPCSimSetUp * getRPCSimSetUp()
const RPCRollSpecs * specs() const
int getSimHitBx(const PSimHit *, CLHEP::HepRandomEngine *)
float stripLength() const override
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
Container::value_type value_type
std::set< std::pair< int, int > > strips
void simulateNoise(const RPCRoll *, CLHEP::HepRandomEngine *) override
const Topology & topology() const override
void simulate(const RPCRoll *roll, const edm::PSimHitContainer &rpcHits, CLHEP::HepRandomEngine *) override
T getParameter(std::string const &) const
tuple config
parse the configuration file
const Topology & topology() const override
std::vector< PSimHit > PSimHitContainer
RPCSynchronizer * _rpcSync
float stripLength() const override
det heigth (strip length in the middle)
RPCSimParam(const edm::ParameterSet &config)
RPCDigiSimLinks theRpcDigiSimLinks
LocalPoint localPosition(float strip) const override
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.