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){
103 const RectangularStripTopology* top_=
dynamic_cast<const RectangularStripTopology*
> (&(SimRoll->topology()));
104 half_stripL = top_->stripLength()/2;
105 distanceFromEdge = half_stripL + simHitPos.
y();
107 const TrapezoidalStripTopology* top_=
dynamic_cast<const TrapezoidalStripTopology*
> (&(SimRoll->topology()));
108 half_stripL = top_->stripLength()/2;
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) {
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
unsigned int detUnitId() const