10 #include "CLHEP/Random/RandomEngine.h"
11 #include "CLHEP/Random/RandFlat.h"
15 #include "CLHEP/Random/Random.h"
16 #include "CLHEP/Random/RandFlat.h"
17 #include "CLHEP/Random/RandPoissonQ.h"
36 std::cout <<
"Average Cluster Size = "<<aveCls<<
" strips"<<std::endl;
37 std::cout <<
"RPC Time Resolution = "<<resRPC<<
" ns"<<std::endl;
38 std::cout <<
"RPC Signal formation time = "<<timOff<<
" ns"<<std::endl;
39 std::cout <<
"RPC adjacent strip delay = "<<dtimCs<<
" ns"<<std::endl;
40 std::cout <<
"Electronic Jitter = "<<resEle<<
" ns"<<std::endl;
41 std::cout <<
"Signal propagation time = "<<sspeed<<
" x c"<<std::endl;
42 std::cout <<
"Link Board Gate Width = "<<lbGate<<
" ns"<<std::endl;
77 for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin();
78 _hit != rpcHits.end(); ++_hit){
88 int centralStrip = topology.channel(entr)+1;
89 int fstrip=centralStrip;
90 int lstrip=centralStrip;
93 if (w < 1.
e-10) w=1.e-10;
94 int clsize =
static_cast<int>( -1.*
aveCls*
log(w)+1.);
96 cls.push_back(centralStrip);
98 for (
int cl = 0; cl < (clsize-1)/2; cl++)
99 if (centralStrip - cl -1 >= 1 ){
100 fstrip = centralStrip-cl-1;
101 cls.push_back(fstrip);
103 for (
int cl = 0; cl < (clsize-1)/2; cl++)
104 if (centralStrip + cl + 1 <= roll->
nstrips() ){
105 lstrip = centralStrip+cl+1;
106 cls.push_back(lstrip);
113 if (lstrip < roll->nstrips() ){
115 cls.push_back(lstrip);
120 cls.push_back(fstrip);
126 for (std::vector<int>::iterator
i=cls.begin();
i!=cls.end();
i++){
128 std::pair<unsigned int, int> digi(*
i,time_hit);
145 if ( rpcId.
region() == 0 )
147 const RectangularStripTopology* top_ =
dynamic_cast<const
148 RectangularStripTopology*
>(&(roll->
topology()));
149 float xmin = (top_->localPosition(0.)).
x();
150 float xmax = (top_->localPosition((
float)roll->
nstrips())).x();
151 float striplength = (top_->stripLength());
152 area = striplength*(xmax-
xmin);
156 const TrapezoidalStripTopology* top_=
dynamic_cast<const TrapezoidalStripTopology*
>(&(roll->
topology()));
157 float xmin = (top_->localPosition(0.)).
x();
158 float xmax = (top_->localPosition((
float)roll->
nstrips())).x();
159 float striplength = (top_->stripLength());
160 area = striplength*(xmax-
xmin);
171 std::pair<int, int> digi(strip,time_hit);
T getParameter(std::string const &) const
LocalPoint centreOfStrip(int strip) const
const Topology & topology() const
CLHEP::RandFlat * flatDistribution1
DetectorHitMap theDetectorHitMap
void setRPCSimSetUp(RPCSimSetUp *simsetup)
RPCSimSetUp * getRPCSimSetUp()
CLHEP::RandPoissonQ * poissonDistribution
const RPCRollSpecs * specs() const
std::set< std::pair< int, int > > strips
uint32_t rawId() const
get the raw id
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
void simulateNoise(const RPCRoll *)
void setRandomEngine(CLHEP::HepRandomEngine &eng)
Container::value_type value_type
int getSimHitBx(const PSimHit *)
void setRandomEngine(CLHEP::HepRandomEngine &eng)
CLHEP::RandFlat * flatDistribution2
CLHEP::RandFlat * flatDistribution_
std::vector< PSimHit > PSimHitContainer
RPCSynchronizer * _rpcSync
RPCSimParam(const edm::ParameterSet &config)
void simulate(const RPCRoll *roll, const edm::PSimHitContainer &rpcHits)
RPCDigiSimLinks theRpcDigiSimLinks
const Topology & topology() const
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.