9 #include "CLHEP/Random/RandFlat.h"
10 #include "CLHEP/Random/RandPoissonQ.h"
13 aveEff =
config.getParameter<
double>(
"averageEfficiency");
14 aveCls =
config.getParameter<
double>(
"averageClusterSize");
17 dtimCs =
config.getParameter<
double>(
"deltatimeAdjacentStrip");
19 sspeed =
config.getParameter<
double>(
"signalPropagationSpeed");
29 std::cout <<
"Average Cluster Size = " <<
aveCls <<
" strips" << std::endl;
31 std::cout <<
"RPC Signal formation time = " <<
timOff <<
" ns" << std::endl;
32 std::cout <<
"RPC adjacent strip delay = " <<
dtimCs <<
" 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) {
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);