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.
References makePileupJSON::bx, ecal_dqm_sourceclient-live_cfg::cosmics, RPCGeometry::dets(), PSimHit::detUnitId(), relativeConstraints::geometry, 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().
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) {
float getTime(uint32_t id)
float stripLength() const override
const RPCGeometry * getGeometry()
float timeOfFlight() const
Local3DPoint localPosition() const
RPCSimSetUp * getRPCSimSetUp()
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
float stripLength() const override
det heigth (strip length in the middle)
unsigned int detUnitId() const
int RPCSynchronizer::getSimHitBxAndTimingForIRPC |
( |
const PSimHit * |
simhit, |
|
|
CLHEP::HepRandomEngine * |
engine |
|
) |
| |
Definition at line 139 of file RPCSynchronizer.cc.
References makePileupJSON::bx, ecal_dqm_sourceclient-live_cfg::cosmics, RPCGeometry::dets(), PSimHit::detUnitId(), relativeConstraints::geometry, 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().
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.;
206 exact_time_differ = (exact_total_time - (timeref + ((half_stripL /
sspeed) + timOff))) /
cosmicPar;
208 exact_time_differ = exact_total_time - (timeref + (half_stripL /
sspeed) + timOff);
223 if (inf_time < time_differ && time_differ < sup_time) {
float getTime(uint32_t id)
float stripLength() const override
const RPCGeometry * getGeometry()
float timeOfFlight() const
Local3DPoint localPosition() const
RPCSimSetUp * getRPCSimSetUp()
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
double irpc_electronics_jitter
float stripLength() const override
det heigth (strip length in the middle)
unsigned int detUnitId() const