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 nano_mu_digi_cff::bx, ecal_dqm_sourceclient-live_cfg::cosmics, PSimHit::detUnitId(), RPCSimSetUp::getGeometry(), RPCSimSetUp::getTime(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, 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)
int RPCSynchronizer::getSimHitBxAndTimingForIRPC |
( |
const PSimHit * |
simhit, |
|
|
CLHEP::HepRandomEngine * |
engine |
|
) |
| |
Definition at line 138 of file RPCSynchronizer.cc.
References nano_mu_digi_cff::bx, ecal_dqm_sourceclient-live_cfg::cosmics, PSimHit::detUnitId(), RPCSimSetUp::getGeometry(), RPCSimSetUp::getTime(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, PSimHit::localPosition(), dqmiodumpmetadata::n, lumi::N_BX, RectangularStripTopology::stripLength(), TrapezoidalStripTopology::stripLength(), PSimHit::timeOfFlight(), and PV3DBase< T, PVType, FrameType >::y().
Referenced by RPCSimModelTiming::simulate().
154 const RPCRoll* SimRoll =
nullptr;
156 for (TrackingGeometry::DetContainer::const_iterator
it =
geometry->dets().begin();
it !=
geometry->dets().end();
158 if (dynamic_cast<const RPCChamber*>(*
it) !=
nullptr) {
159 auto ch =
dynamic_cast<const RPCChamber*
>(*it);
161 std::vector<const RPCRoll*> rollsRaf = (ch->rolls());
162 for (std::vector<const RPCRoll*>::iterator
r = rollsRaf.begin();
r != rollsRaf.end(); ++
r) {
163 if ((*r)->id() == SimDetId) {
171 if (SimRoll !=
nullptr) {
172 float distanceFromEdge = 0;
173 float half_stripL = 0.;
175 if (SimRoll->id().region() == 0) {
178 distanceFromEdge = half_stripL + simHitPos.
y();
182 distanceFromEdge = half_stripL - simHitPos.
y();
185 float prop_time = distanceFromEdge /
sspeed;
188 double rr_tim1 = CLHEP::RandGaussQ::shoot(engine, 0.,
irpc_timing_res);
190 double total_time = tof + prop_time +
timOff + rr_tim1 + rr_el;
193 double time_differ = 0.;
198 time_differ = total_time - (timeref + (half_stripL /
sspeed) +
timOff);
201 double exact_total_time = tof + prop_time +
timOff;
202 double exact_time_differ = 0.;
207 exact_time_differ = exact_total_time - (timeref + (half_stripL /
sspeed) +
timOff);
222 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()
double irpc_electronics_jitter
Local3DPoint localPosition() const
float timeOfFlight() const
float stripLength() const override
det heigth (strip length in the middle)