48 std::vector<std::pair< std::pair<DetId, LocalPoint> ,
float> > hitangleassociation;
49 return hitangleassociation;
54 std::vector<std::pair< std::pair<DetId, LocalPoint> ,
float> >hitangleassociation;
55 std::vector<TrajectoryMeasurement> TMeas=traj.
measurements();
56 std::vector<TrajectoryMeasurement>::iterator itm;
57 for (itm=TMeas.begin();itm!=TMeas.end();itm++){
60 const SiStripMatchedRecHit2D* matchedhit=
dynamic_cast<const SiStripMatchedRecHit2D*
>((*thit).hit());
61 const SiStripRecHit2D*
hit=
dynamic_cast<const SiStripRecHit2D*
>((*thit).hit());
68 const SiStripRecHit2D monohit=matchedhit->monoHit();
74 float thickness = ((((((monohit.geographicalId())>>25)&0x7f)==0xd)||
75 ((((monohit.geographicalId())>>25)&0x7f)==0xe))&&
76 ((((monohit.geographicalId())>>5)&0x7)>4)) ? 0.0500 : 0.0320;
78 hitangleassociation.push_back(make_pair(make_pair(monohit.geographicalId(),monohit.localPosition()), angle));
81 const SiStripRecHit2D stereohit=matchedhit->stereoHit();
84 if(stereotkdir.
z()!=0){
87 float thickness = ((((((stereohit.geographicalId())>>25)&0x7f)==0xd)||
88 ((((stereohit.geographicalId())>>25)&0x7f)==0xe))&&
89 ((((stereohit.geographicalId())>>5)&0x7)>4)) ? 0.0500 : 0.0320;
91 hitangleassociation.push_back(make_pair(make_pair(stereohit.geographicalId(),stereohit.localPosition()), angle));
98 if(trackdirection.
z()!=0){
101 float thickness = ((((((hit->geographicalId())>>25)&0x7f)==0xd)||
102 ((((hit->geographicalId())>>25)&0x7f)==0xe))&&
103 ((((hit->geographicalId())>>5)&0x7)>4)) ? 0.0500 : 0.0320;
105 hitangleassociation.push_back(make_pair(make_pair(hit->geographicalId(),hit->localPosition()), angle));
109 return hitangleassociation;
114 double v_xy =
sqrt(v.
x()*v.
x()+v.
y()*v.
y());
115 double L = fabs(thickness*v_xy/v.
z());
116 double Lmax = fabs(pitch/v.
x()*v_xy);
118 LogDebug(
"SiStripFineDelayTLA ") << L <<
" vs " << Lmax
119 <<
" Signal contained in strip. Correction is " << v.
z()/v.
mag();
120 return v.
z()/v.
mag();
122 LogDebug(
"SiStripFineDelayTLA ") << L <<
" vs " << Lmax
123 <<
" Signal not contained in strip. Correction is " << thickness/pitch*v.
x()/v_xy*v.
z()/v.
mag()
124 <<
" instead of " << v.
z()/v.
mag();
125 return thickness/pitch*v.
x()/v_xy*v.
z()/v.
mag();
SiStripFineDelayTLA(const edm::ParameterSet &conf)
const GeomDetUnit * monoDet() const
LocalVector localDirection() const
LocalPoint localPosition() const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
void init(const edm::Event &e, const edm::EventSetup &c)
double computeAngleCorr(const LocalVector &v, double pitch, double thickness)
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
DataContainer const & measurements() const
virtual const Topology & topology() const =0
std::vector< std::pair< std::pair< DetId, LocalPoint >,float > > findtrackangle(const std::vector< Trajectory > &traj)
virtual const GeomDet * idToDet(DetId) const
virtual ~SiStripFineDelayTLA()
const TrackerGeometry * tracker
const GeomDetUnit * stereoDet() const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)