Class for the RPC strip response simulation based on a parametrized model (ORCA-based)
- Author
- Raffaello Trentadue – INFN Bari
Definition at line 36 of file RPCSynchronizer.h.
int RPCSynchronizer::getSimHitBx |
( |
const PSimHit * |
simhit, |
|
|
CLHEP::HepRandomEngine * |
engine |
|
) |
| |
Definition at line 59 of file RPCSynchronizer.cc.
References GlobalTrackerMuonAlignment_cfi::cosmics, RPCGeometry::dets(), PSimHit::detUnitId(), RPCSimSetUp::getGeometry(), RPCSimSetUp::getTime(), PSimHit::localPosition(), gen::n, lumi::N_BX, alignCSCRings::r, RectangularStripTopology::stripLength(), TrapezoidalStripTopology::stripLength(), PSimHit::timeOfFlight(), and PV3DBase< T, PVType, FrameType >::y().
Referenced by RPCSimSimple::simulate(), RPCSimParam::simulate(), RPCSimAverageNoise::simulate(), RPCSimAverageNoiseEffCls::simulate(), RPCSimAverageNoiseEff::simulate(), RPCSimAverage::simulate(), and RPCSimAsymmetricCls::simulate().
71 float rr_el = CLHEP::RandGaussQ::shoot(engine, 0.,
resEle);
77 for(TrackingGeometry::DetContainer::const_iterator it = geometry->
dets().begin(); it != geometry->
dets().end(); it++){
79 if( dynamic_cast< const RPCChamber* >( *it ) != 0 ){
81 auto ch =
dynamic_cast<const RPCChamber*
>( *it );
83 std::vector< const RPCRoll*> rollsRaf = (ch->rolls());
84 for(std::vector<const RPCRoll*>::iterator
r = rollsRaf.begin();
85 r != rollsRaf.end(); ++
r){
87 if((*r)->id() == SimDetId) {
97 float distanceFromEdge = 0;
98 float half_stripL = 0.;
100 if(SimRoll->id().region() == 0){
103 distanceFromEdge = half_stripL + simHitPos.
y();
107 distanceFromEdge = half_stripL - simHitPos.
y();
111 float prop_time = distanceFromEdge/
sspeed;
113 double rr_tim1 = CLHEP::RandGaussQ::shoot(engine, 0.,
resRPC);
114 double total_time = tof + prop_time +
timOff + rr_tim1 + rr_el;
117 double time_differ = 0.;
123 time_differ = total_time - (timeref + ( half_stripL/
sspeed ) +
timOff);
141 if(inf_time < time_differ && time_differ < sup_time) {
virtual float stripLength() const
float getTime(uint32_t id)
const RPCGeometry * getGeometry()
float timeOfFlight() const
Local3DPoint localPosition() const
RPCSimSetUp * getRPCSimSetUp()
virtual const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
virtual float stripLength() const
det heigth (strip length in the middle)
unsigned int detUnitId() const
int RPCSynchronizer::getSimHitBxAndTimingForIRPC |
( |
const PSimHit * |
simhit, |
|
|
CLHEP::HepRandomEngine * |
engine |
|
) |
| |
Definition at line 152 of file RPCSynchronizer.cc.
References GlobalTrackerMuonAlignment_cfi::cosmics, RPCGeometry::dets(), PSimHit::detUnitId(), RPCSimSetUp::getGeometry(), RPCSimSetUp::getTime(), PSimHit::localPosition(), gen::n, lumi::N_BX, alignCSCRings::r, RectangularStripTopology::stripLength(), TrapezoidalStripTopology::stripLength(), PSimHit::timeOfFlight(), and PV3DBase< T, PVType, FrameType >::y().
Referenced by RPCSimModelTiming::simulate().
172 for(TrackingGeometry::DetContainer::const_iterator it = geometry->
dets().begin(); it != geometry->
dets().end(); it++){
174 if( dynamic_cast< const RPCChamber* >( *it ) != 0 ){
176 auto ch =
dynamic_cast<const RPCChamber*
>( *it );
178 std::vector< const RPCRoll*> rollsRaf = (ch->rolls());
179 for(std::vector<const RPCRoll*>::iterator
r = rollsRaf.begin();
180 r != rollsRaf.end(); ++
r){
182 if((*r)->id() == SimDetId) {
192 float distanceFromEdge = 0;
193 float half_stripL = 0.;
195 if(SimRoll->id().region() == 0){
198 distanceFromEdge = half_stripL + simHitPos.
y();
203 distanceFromEdge = half_stripL - simHitPos.
y();
207 float prop_time = distanceFromEdge/
sspeed;
210 double rr_tim1 = CLHEP::RandGaussQ::shoot(engine, 0.,
irpc_timing_res);
212 double total_time = tof + prop_time +
timOff + rr_tim1 + rr_el;
216 double time_differ = 0.;
222 time_differ = total_time - (timeref + ( half_stripL/
sspeed ) +
timOff);
225 double exact_total_time = tof + prop_time +
timOff;
226 double exact_time_differ = 0.;
229 exact_time_differ = (exact_total_time - (timeref + ((half_stripL/
sspeed ) + timOff)))/
cosmicPar;
232 exact_time_differ = exact_total_time - (timeref + ( half_stripL/
sspeed ) + timOff);
251 if(inf_time < time_differ && time_differ < sup_time) {
virtual float stripLength() const
float getTime(uint32_t id)
const RPCGeometry * getGeometry()
float timeOfFlight() const
Local3DPoint localPosition() const
RPCSimSetUp * getRPCSimSetUp()
virtual const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
double irpc_electronics_jitter
virtual float stripLength() const
det heigth (strip length in the middle)
unsigned int detUnitId() const