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;
108 if(0.0 <= posX && posX < 0.2) {
109 func = (clsMap[1])[(clsMap[1]).size()-1]*(rr_cl);
110 sum_clsize = clsMap[1];
112 if(0.2 <= posX && posX < 0.4) {
113 func = (clsMap[2])[(clsMap[2]).size()-1]*(rr_cl);
114 sum_clsize = clsMap[2];
116 if(0.4 <= posX && posX < 0.6) {
117 func = (clsMap[3])[(clsMap[3]).size()-1]*(rr_cl);
118 sum_clsize = clsMap[3];
120 if(0.6 <= posX && posX < 0.8) {
121 func = (clsMap[4])[(clsMap[4]).size()-1]*(rr_cl);
122 sum_clsize = clsMap[4];
124 if(0.8 <= posX && posX < 1.0) {
125 func = (clsMap[5])[(clsMap[5]).size()-1]*(rr_cl);
126 sum_clsize = clsMap[5];
129 for(vector<double>::iterator iter = sum_clsize.begin();
130 iter != sum_clsize.end(); ++iter){
135 else if(func < (*iter)){
155 for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin();
156 _hit != rpcHits.end(); ++_hit){
161 float posX = roll->
strip(_hit->localPosition()) - static_cast<int>(roll->
strip(_hit->localPosition()));
167 int centralStrip = topology.channel(entr)+1;
168 int fstrip=centralStrip;
169 int lstrip=centralStrip;
172 if (w < 1.
e-10) w=1.e-10;
175 std::vector<int> cls;
176 cls.push_back(centralStrip);
178 for (
int cl = 0; cl < (clsize-1)/2; cl++)
180 if (centralStrip - cl -1 >= 1 ){
181 fstrip = centralStrip-cl-1;
182 cls.push_back(fstrip);
184 if (centralStrip + cl + 1 <= roll->
nstrips() ){
185 lstrip = centralStrip+cl+1;
186 cls.push_back(lstrip);
194 if (lstrip < roll->nstrips() ){
196 cls.push_back(lstrip);
201 cls.push_back(fstrip);
207 for (std::vector<int>::iterator
i=cls.begin();
i!=cls.end();
i++){
209 std::pair<int, int> digi(*
i,time_hit );
222 unsigned int nstrips = roll->
nstrips();
226 if ( rpcId.
region() == 0 )
233 area = striplength*(xmax-xmin);
241 area = striplength*(xmax-xmin);
243 for(
unsigned int j = 0;
j < vnoise.size(); ++
j){
245 if(
j >= nstrips)
break;
252 std::pair<int, int> digi(
j+1,time_hit);
T getParameter(std::string const &) const
float strip(const LocalPoint &lp) const
LocalPoint centreOfStrip(int strip) const
CLHEP::RandFlat * flatDistribution2
const Topology & topology() const
virtual float stripLength() const
DetectorHitMap theDetectorHitMap
void setRPCSimSetUp(RPCSimSetUp *simsetup)
RPCSimSetUp * getRPCSimSetUp()
Container::value_type value_type
const RPCRollSpecs * specs() const
void simulateNoise(const RPCRoll *)
void setRandomEngine(CLHEP::HepRandomEngine &eng)
std::set< std::pair< int, int > > strips
uint32_t rawId() const
get the raw id
int getClSize(float posX)
std::map< int, std::vector< double > > clsMap
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
const T & max(const T &a, const T &b)
const std::map< int, std::vector< double > > & getClsMap()
RPCSimAverageNoise(const edm::ParameterSet &config)
int getSimHitBx(const PSimHit *)
void setRandomEngine(CLHEP::HepRandomEngine &eng)
CLHEP::RandFlat * flatDistribution
RPCSynchronizer * _rpcSync
virtual LocalPoint localPosition(float strip) const
CLHEP::RandPoissonQ * poissonDistribution_
std::vector< PSimHit > PSimHitContainer
virtual LocalPoint localPosition(float strip) const
void simulate(const RPCRoll *roll, const edm::PSimHitContainer &rpcHits)
virtual float stripLength() const
det heigth (strip length in the middle)
RPCDigiSimLinks theRpcDigiSimLinks
std::vector< double > sum_clsize
const Topology & topology() const
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.