Class for the RPC strip response simulation based on a parametrized model (ORCA-based)
- Author
- Raffaello Trentadue – INFN Bari
Definition at line 35 of file RPCSynchronizer.h.
int RPCSynchronizer::getSimHitBx |
( |
const PSimHit * |
simhit, |
|
|
CLHEP::HepRandomEngine * |
engine |
|
) |
| |
Definition at line 56 of file RPCSynchronizer.cc.
References simKBmtfDigis_cfi::bx, ecal_dqm_sourceclient-live_cfg::cosmics, PSimHit::detUnitId(), RPCSimSetUp::getGeometry(), RPCSimSetUp::getTime(), PSimHit::localPosition(), dqmiodumpmetadata::n, lumi::N_BX, 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().
67 float rr_el = CLHEP::RandGaussQ::shoot(engine, 0.,
resEle);
71 const RPCRoll* SimRoll =
nullptr;
73 for (TrackingGeometry::DetContainer::const_iterator it =
geometry->dets().begin(); it !=
geometry->dets().end();
75 if (dynamic_cast<const RPCChamber*>(*it) !=
nullptr) {
76 auto ch =
dynamic_cast<const RPCChamber*
>(*it);
78 std::vector<const RPCRoll*> rollsRaf = (ch->rolls());
79 for (std::vector<const RPCRoll*>::iterator
r = rollsRaf.begin();
r != rollsRaf.end(); ++
r) {
80 if ((*r)->id() == SimDetId) {
88 if (SimRoll !=
nullptr) {
89 float distanceFromEdge = 0;
90 float half_stripL = 0.;
92 if (SimRoll->id().region() == 0) {
95 distanceFromEdge = half_stripL + simHitPos.
y();
99 distanceFromEdge = half_stripL - simHitPos.
y();
102 float prop_time = distanceFromEdge /
sspeed;
104 double rr_tim1 = CLHEP::RandGaussQ::shoot(engine, 0.,
resRPC);
105 double total_time = tof + prop_time +
timOff + rr_tim1 + rr_el;
108 double time_differ = 0.;
113 time_differ = total_time - (timeref + (half_stripL /
sspeed) +
timOff);
128 if (inf_time < time_differ && time_differ < sup_time) {
unsigned int detUnitId() const
float getTime(uint32_t id)
float stripLength() const override
const RPCGeometry * getGeometry()
RPCSimSetUp * getRPCSimSetUp()
Local3DPoint localPosition() const
float timeOfFlight() const
float stripLength() const override
det heigth (strip length in the middle)