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 57 of file RPCSynchronizer.cc.
68 float rr_el = CLHEP::RandGaussQ::shoot(engine, 0.,
resEle);
72 const RPCRoll* SimRoll =
nullptr;
74 for (TrackingGeometry::DetContainer::const_iterator it =
geometry->dets().begin(); it !=
geometry->dets().end();
76 if (dynamic_cast<const RPCChamber*>(*it) !=
nullptr) {
77 auto ch = dynamic_cast<const RPCChamber*>(*it);
79 std::vector<const RPCRoll*> rollsRaf = (ch->rolls());
80 for (std::vector<const RPCRoll*>::iterator
r = rollsRaf.begin();
r != rollsRaf.end(); ++
r) {
81 if ((*r)->id() == SimDetId) {
89 if (SimRoll !=
nullptr) {
90 float distanceFromEdge = 0;
91 float half_stripL = 0.;
93 if (SimRoll->id().region() == 0) {
96 distanceFromEdge = half_stripL + simHitPos.
y();
100 distanceFromEdge = half_stripL - simHitPos.
y();
103 float prop_time = distanceFromEdge /
sspeed;
105 double rr_tim1 = CLHEP::RandGaussQ::shoot(engine, 0.,
resRPC);
106 double total_time = tof + prop_time +
timOff + rr_tim1 + rr_el;
109 double time_differ = 0.;
114 time_differ = total_time - (timeref + (half_stripL /
sspeed) +
timOff);
129 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 139 of file RPCSynchronizer.cc.
155 const RPCRoll* SimRoll =
nullptr;
157 for (TrackingGeometry::DetContainer::const_iterator it =
geometry->dets().begin(); it !=
geometry->dets().end();
159 if (dynamic_cast<const RPCChamber*>(*it) !=
nullptr) {
160 auto ch = dynamic_cast<const RPCChamber*>(*it);
162 std::vector<const RPCRoll*> rollsRaf = (ch->rolls());
163 for (std::vector<const RPCRoll*>::iterator
r = rollsRaf.begin();
r != rollsRaf.end(); ++
r) {
164 if ((*r)->id() == SimDetId) {
172 if (SimRoll !=
nullptr) {
173 float distanceFromEdge = 0;
174 float half_stripL = 0.;
176 if (SimRoll->id().region() == 0) {
179 distanceFromEdge = half_stripL + simHitPos.
y();
183 distanceFromEdge = half_stripL - simHitPos.
y();
186 float prop_time = distanceFromEdge /
sspeed;
189 double rr_tim1 = CLHEP::RandGaussQ::shoot(engine, 0.,
irpc_timing_res);
191 double total_time = tof + prop_time +
timOff + rr_tim1 + rr_el;
194 double time_differ = 0.;
199 time_differ = total_time - (timeref + (half_stripL /
sspeed) +
timOff);
202 double exact_total_time = tof + prop_time +
timOff;
203 double exact_time_differ = 0.;
208 exact_time_differ = exact_total_time - (timeref + (half_stripL /
sspeed) +
timOff);
223 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().