93 for(TrackingGeometry::DetContainer::const_iterator it = geometry->
dets().begin(); it != geometry->
dets().end(); it++){
95 if( dynamic_cast< RPCChamber* >( *it ) != 0 ){
99 std::vector< const RPCRoll*> rollsRaf = (ch->
rolls());
100 for(std::vector<const RPCRoll*>::iterator
r = rollsRaf.begin();
101 r != rollsRaf.end(); ++
r){
103 if((*r)->id() == SimDetId) {
113 float distanceFromEdge = 0;
114 float half_stripL = 0.;
116 if(SimRoll->id().region() == 0){
117 const RectangularStripTopology* top_=
dynamic_cast<const RectangularStripTopology*
> (&(SimRoll->topology()));
118 half_stripL = top_->stripLength()/2;
119 distanceFromEdge = half_stripL + simHitPos.
y();
121 const TrapezoidalStripTopology* top_=
dynamic_cast<const TrapezoidalStripTopology*
> (&(SimRoll->topology()));
122 half_stripL = top_->stripLength()/2;
123 distanceFromEdge = half_stripL - simHitPos.
y();
127 float prop_time = distanceFromEdge/
sspeed;
130 double total_time = tof + prop_time +
timOff + rr_tim1 + rr_el;
133 double time_differ = 0.;
139 time_differ = total_time - (timeref + ( half_stripL/
sspeed ) +
timOff);
146 for(
int n = -5;
n <= 5; ++
n){
154 sup_time = lbGate/2 +
n*
lbGate;
157 if(inf_time < time_differ && time_differ < sup_time) {
CLHEP::RandGaussQ * gauss1
float getTime(uint32_t id)
const RPCGeometry * getGeometry()
float timeOfFlight() const
Local3DPoint localPosition() const
RPCSimSetUp * getRPCSimSetUp()
const std::vector< const RPCRoll * > & rolls() const
Return the Rolls.
virtual const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
CLHEP::RandGaussQ * gauss2
ESHandle< TrackerGeometry > geometry
unsigned int detUnitId() const