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 58 of file RPCSynchronizer.cc.
69 float rr_el = CLHEP::RandGaussQ::shoot(engine, 0.,
resEle);
73 const RPCRoll* SimRoll =
nullptr;
75 for (TrackingGeometry::DetContainer::const_iterator it =
geometry->dets().begin(); it !=
geometry->dets().end();
77 if (dynamic_cast<const RPCChamber*>(*it) !=
nullptr) {
78 auto ch = dynamic_cast<const RPCChamber*>(*it);
80 std::vector<const RPCRoll*> rollsRaf = (ch->rolls());
81 for (std::vector<const RPCRoll*>::iterator
r = rollsRaf.begin();
r != rollsRaf.end(); ++
r) {
82 if ((*r)->id() == SimDetId) {
90 if (SimRoll !=
nullptr) {
91 float distanceFromEdge = 0;
92 float half_stripL = 0.;
94 if (SimRoll->id().region() == 0) {
97 distanceFromEdge = half_stripL + simHitPos.
y();
101 distanceFromEdge = half_stripL - simHitPos.
y();
104 float prop_time = distanceFromEdge /
sspeed;
106 double rr_tim1 = CLHEP::RandGaussQ::shoot(engine, 0.,
resRPC);
107 double total_time = tof + prop_time +
timOff + rr_tim1 + rr_el;
110 double time_differ = 0.;
115 time_differ = total_time - (timeref + (half_stripL /
sspeed) +
timOff);
130 if (inf_time < time_differ && time_differ < sup_time) {
References l1GtPatternGenerator_cfi::bx, GlobalTrackerMuonAlignment_cfi::cosmics, PSimHit::detUnitId(), RPCSimSetUp::getGeometry(), RPCSimSetUp::getTime(), PSimHit::localPosition(), dqmiodumpmetadata::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(), RPCSimAverage::simulate(), RPCSimAverageNoiseEff::simulate(), RPCSimAverageNoiseEffCls::simulate(), and RPCSimAsymmetricCls::simulate().
int RPCSynchronizer::getSimHitBxAndTimingForIRPC |
( |
const PSimHit * |
simhit, |
|
|
CLHEP::HepRandomEngine * |
engine |
|
) |
| |
Definition at line 140 of file RPCSynchronizer.cc.
156 const RPCRoll* SimRoll =
nullptr;
158 for (TrackingGeometry::DetContainer::const_iterator it =
geometry->dets().begin(); it !=
geometry->dets().end();
160 if (dynamic_cast<const RPCChamber*>(*it) !=
nullptr) {
161 auto ch = dynamic_cast<const RPCChamber*>(*it);
163 std::vector<const RPCRoll*> rollsRaf = (ch->rolls());
164 for (std::vector<const RPCRoll*>::iterator
r = rollsRaf.begin();
r != rollsRaf.end(); ++
r) {
165 if ((*r)->id() == SimDetId) {
173 if (SimRoll !=
nullptr) {
174 float distanceFromEdge = 0;
175 float half_stripL = 0.;
177 if (SimRoll->id().region() == 0) {
180 distanceFromEdge = half_stripL + simHitPos.
y();
184 distanceFromEdge = half_stripL - simHitPos.
y();
187 float prop_time = distanceFromEdge /
sspeed;
190 double rr_tim1 = CLHEP::RandGaussQ::shoot(engine, 0.,
irpc_timing_res);
192 double total_time = tof + prop_time +
timOff + rr_tim1 + rr_el;
195 double time_differ = 0.;
200 time_differ = total_time - (timeref + (half_stripL /
sspeed) +
timOff);
203 double exact_total_time = tof + prop_time +
timOff;
204 double exact_time_differ = 0.;
209 exact_time_differ = exact_total_time - (timeref + (half_stripL /
sspeed) +
timOff);
224 if (inf_time < time_differ && time_differ < sup_time) {
References l1GtPatternGenerator_cfi::bx, GlobalTrackerMuonAlignment_cfi::cosmics, PSimHit::detUnitId(), RPCSimSetUp::getGeometry(), RPCSimSetUp::getTime(), PSimHit::localPosition(), dqmiodumpmetadata::n, lumi::N_BX, alignCSCRings::r, RectangularStripTopology::stripLength(), TrapezoidalStripTopology::stripLength(), PSimHit::timeOfFlight(), and PV3DBase< T, PVType, FrameType >::y().
Referenced by RPCSimModelTiming::simulate().