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 60 of file RPCSynchronizer.cc.
References RPCGeometry::dets(), PSimHit::detUnitId(), geometry, RPCSimSetUp::getGeometry(), RPCSimSetUp::getTime(), PSimHit::localPosition(), n, alignCSCRings::r, RectangularStripTopology::stripLength(), TrapezoidalStripTopology::stripLength(), PSimHit::timeOfFlight(), and PV3DBase< T, PVType, FrameType >::y().
Referenced by RPCSimSimple::simulate(), RPCSimParam::simulate(), RPCSimAverageNoise::simulate(), RPCSimAverageNoiseEffCls::simulate(), RPCSimAverageNoiseEff::simulate(), RPCSimAsymmetricCls::simulate(), and RPCSimAverage::simulate().
73 float rr_el = CLHEP::RandGaussQ::shoot(engine, 0.,
resEle);
79 for(TrackingGeometry::DetContainer::const_iterator it = geometry->
dets().begin(); it != geometry->
dets().end(); it++){
81 if( dynamic_cast< const RPCChamber* >( *it ) != 0 ){
83 auto ch =
dynamic_cast<const RPCChamber*
>( *it );
85 std::vector< const RPCRoll*> rollsRaf = (ch->rolls());
86 for(std::vector<const RPCRoll*>::iterator
r = rollsRaf.begin();
87 r != rollsRaf.end(); ++
r){
89 if((*r)->id() == SimDetId) {
99 float distanceFromEdge = 0;
100 float half_stripL = 0.;
102 if(SimRoll->id().region() == 0){
105 distanceFromEdge = half_stripL + simHitPos.
y();
109 distanceFromEdge = half_stripL - simHitPos.
y();
113 float prop_time = distanceFromEdge/
sspeed;
115 double rr_tim1 = CLHEP::RandGaussQ::shoot(engine, 0.,
resRPC);
116 double total_time = tof + prop_time +
timOff + rr_tim1 + rr_el;
119 double time_differ = 0.;
125 time_differ = total_time - (timeref + ( half_stripL/
sspeed ) +
timOff);
132 for(
int n = -5;
n <= 5; ++
n){
143 if(inf_time < time_differ && time_differ < sup_time) {
virtual float stripLength() const
float getTime(uint32_t id)
const RPCGeometry * getGeometry()
float timeOfFlight() const
Local3DPoint localPosition() const
RPCSimSetUp * getRPCSimSetUp()
virtual const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
ESHandle< TrackerGeometry > geometry
virtual float stripLength() const
det heigth (strip length in the middle)
unsigned int detUnitId() const