13 #include "CLHEP/Random/RandomEngine.h"
14 #include "CLHEP/Random/RandFlat.h"
15 #include <CLHEP/Random/RandGaussQ.h>
16 #include <CLHEP/Random/RandFlat.h>
42 #include "CLHEP/Random/Random.h"
43 #include "CLHEP/Random/RandFlat.h"
44 #include "CLHEP/Random/RandPoissonQ.h"
67 std::cout <<
"Average Cluster Size = "<<aveCls<<
" strips"<<std::endl;
68 std::cout <<
"RPC Time Resolution = "<<resRPC<<
" ns"<<std::endl;
69 std::cout <<
"RPC Signal formation time = "<<timOff<<
" ns"<<std::endl;
70 std::cout <<
"RPC adjacent strip delay = "<<dtimCs<<
" ns"<<std::endl;
71 std::cout <<
"Electronic Jitter = "<<resEle<<
" ns"<<std::endl;
72 std::cout <<
"Signal propagation time = "<<sspeed<<
" x c"<<std::endl;
73 std::cout <<
"Link Board Gate Width = "<<lbGate<<
" ns"<<std::endl;
107 if(0.0 <= posX && posX < 0.2) {
108 func = (clsMap[1])[(clsMap[1]).size()-1]*(rr_cl);
109 sum_clsize = clsMap[1];
111 if(0.2 <= posX && posX < 0.4) {
112 func = (clsMap[2])[(clsMap[2]).size()-1]*(rr_cl);
113 sum_clsize = clsMap[2];
115 if(0.4 <= posX && posX < 0.6) {
116 func = (clsMap[3])[(clsMap[3]).size()-1]*(rr_cl);
117 sum_clsize = clsMap[3];
119 if(0.6 <= posX && posX < 0.8) {
120 func = (clsMap[4])[(clsMap[4]).size()-1]*(rr_cl);
121 sum_clsize = clsMap[4];
123 if(0.8 <= posX && posX < 1.0) {
124 func = (clsMap[5])[(clsMap[5]).size()-1]*(rr_cl);
125 sum_clsize = clsMap[5];
128 for(vector<double>::iterator iter = sum_clsize.begin();
129 iter != sum_clsize.end(); ++iter){
134 else if(func < (*iter)){
154 for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin();
155 _hit != rpcHits.end(); ++_hit){
162 float posX = roll->
strip(_hit->localPosition()) - static_cast<int>(roll->
strip(_hit->localPosition()));
169 int centralStrip = topology.channel(entr)+1;
170 int fstrip=centralStrip;
171 int lstrip=centralStrip;
174 if (w < 1.e-10) w=1.e-10;
177 std::vector<int> cls;
178 cls.push_back(centralStrip);
180 for (
int cl = 0; cl < (clsize-1)/2; cl++)
181 if (centralStrip - cl -1 >= 1 ){
182 fstrip = centralStrip-cl-1;
183 cls.push_back(fstrip);
185 for (
int cl = 0; cl < (clsize-1)/2; cl++)
186 if (centralStrip + cl + 1 <= roll->
nstrips() ){
187 lstrip = centralStrip+cl+1;
188 cls.push_back(lstrip);
195 if (lstrip < roll->nstrips() ){
197 cls.push_back(lstrip);
202 cls.push_back(fstrip);
208 for (std::vector<int>::iterator
i=cls.begin();
i!=cls.end();
i++){
210 std::pair<int, int> digi(*
i,time_hit);
225 if ( rpcId.
region() == 0 )
232 area = striplength*(xmax-xmin);
240 area = striplength*(xmax-xmin);
251 std::pair<int, int> digi(strip,time_hit);
CLHEP::RandFlat * flatDistribution_
T getParameter(std::string const &) const
std::vector< double > sum_clsize
float strip(const LocalPoint &lp) const
LocalPoint centreOfStrip(int strip) const
const Topology & topology() const
CLHEP::RandPoissonQ * poissonDistribution
virtual float stripLength() const
int getClSize(float posX)
DetectorHitMap theDetectorHitMap
void setRPCSimSetUp(RPCSimSetUp *simsetup)
RPCSimSetUp * getRPCSimSetUp()
void simulateNoise(const RPCRoll *)
const RPCRollSpecs * specs() const
std::set< std::pair< int, int > > strips
uint32_t rawId() const
get the raw id
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
void setRandomEngine(CLHEP::HepRandomEngine &eng)
CLHEP::RandFlat * flatDistribution1
const T & max(const T &a, const T &b)
const std::map< int, std::vector< double > > & getClsMap()
CLHEP::RandFlat * flatDistribution2
Container::value_type value_type
int getSimHitBx(const PSimHit *)
void simulate(const RPCRoll *roll, const edm::PSimHitContainer &rpcHits)
RPCSynchronizer * _rpcSync
void setRandomEngine(CLHEP::HepRandomEngine &eng)
virtual LocalPoint localPosition(float strip) const
RPCSimAverage(const edm::ParameterSet &config)
std::vector< PSimHit > PSimHitContainer
virtual LocalPoint localPosition(float strip) const
virtual float stripLength() const
det heigth (strip length in the middle)
RPCDigiSimLinks theRpcDigiSimLinks
std::map< int, std::vector< double > > clsMap
const Topology & topology() const
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.