CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes
SiStripRecHitMatcher Class Reference

#include <SiStripRecHitMatcher.h>

Public Types

typedef boost::function< void(SiStripMatchedRecHit2D
const &)> 
Collector
 
typedef
SiStripMatchedRecHit2DCollectionNew::FastFiller 
CollectorMatched
 
typedef
SiStripRecHit2DCollectionNew::DetSet::const_iterator 
RecHitIterator
 
typedef std::vector< const
SiStripRecHit2D * > 
SimpleHitCollection
 
typedef
SimpleHitCollection::const_iterator 
SimpleHitIterator
 
typedef std::pair< LocalPoint,
LocalPoint
StripPosition
 

Public Member Functions

template<typename MonoIterator , typename StereoIterator , typename CollectorHelper >
void doubleMatch (MonoIterator monoRHiter, MonoIterator monoRHend, StereoIterator seconditer, StereoIterator seconditerend, const GluedGeomDet *gluedDet, LocalVector trdir, CollectorHelper &collectorHelper) const
 
SiStripMatchedRecHit2D * match (const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
 
SiStripMatchedRecHit2D * match (const SiStripMatchedRecHit2D *originalRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
 
edm::OwnVector
< SiStripMatchedRecHit2D > 
match (const SiStripRecHit2D *monoRH, RecHitIterator begin, RecHitIterator end, const GluedGeomDet *gluedDet) const
 
edm::OwnVector
< SiStripMatchedRecHit2D > 
match (const SiStripRecHit2D *monoRH, RecHitIterator begin, RecHitIterator end, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
 
edm::OwnVector
< SiStripMatchedRecHit2D > 
match (const SiStripRecHit2D *monoRH, SimpleHitIterator begin, SimpleHitIterator end, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
 
void match (const SiStripRecHit2D *monoRH, RecHitIterator begin, RecHitIterator end, CollectorMatched &collector, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
 
void match (const SiStripRecHit2D *monoRH, SimpleHitIterator begin, SimpleHitIterator end, CollectorMatched &collector, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
 
void match (const SiStripRecHit2D *monoRH, SimpleHitIterator begin, SimpleHitIterator end, edm::OwnVector< SiStripMatchedRecHit2D > &collector, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
 
void match (const SiStripRecHit2D *monoRH, SimpleHitIterator begin, SimpleHitIterator end, std::vector< SiStripMatchedRecHit2D * > &collector, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
 
void match (const SiStripRecHit2D *monoRH, SimpleHitIterator begin, SimpleHitIterator end, Collector &collector, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
 the actual implementation More...
 
StripPosition project (const GeomDetUnit *det, const GluedGeomDet *glueddet, StripPosition strip, LocalVector trackdirection) const
 
 SiStripRecHitMatcher (const edm::ParameterSet &conf)
 
 SiStripRecHitMatcher (const double theScale)
 

Public Attributes

float scale_
 

Detailed Description

Definition at line 23 of file SiStripRecHitMatcher.h.

Member Typedef Documentation

typedef boost::function<void(SiStripMatchedRecHit2D const&)> SiStripRecHitMatcher::Collector

Definition at line 33 of file SiStripRecHitMatcher.h.

Definition at line 27 of file SiStripRecHitMatcher.h.

Definition at line 29 of file SiStripRecHitMatcher.h.

typedef std::vector<const SiStripRecHit2D *> SiStripRecHitMatcher::SimpleHitCollection

Definition at line 30 of file SiStripRecHitMatcher.h.

typedef SimpleHitCollection::const_iterator SiStripRecHitMatcher::SimpleHitIterator

Definition at line 31 of file SiStripRecHitMatcher.h.

Definition at line 36 of file SiStripRecHitMatcher.h.

Constructor & Destructor Documentation

SiStripRecHitMatcher::SiStripRecHitMatcher ( const edm::ParameterSet conf)

Definition at line 18 of file SiStripRecHitMatcher.cc.

References edm::ParameterSet::getParameter(), and scale_.

18  {
19  scale_=conf.getParameter<double>("NSigmaInside");
20 }
T getParameter(std::string const &) const
SiStripRecHitMatcher::SiStripRecHitMatcher ( const double  theScale)

Definition at line 22 of file SiStripRecHitMatcher.cc.

References scale_.

22  {
23  scale_=theScale;
24 }

Member Function Documentation

template<typename MonoIterator , typename StereoIterator , typename CollectorHelper >
void SiStripRecHitMatcher::doubleMatch ( MonoIterator  monoRHiter,
MonoIterator  monoRHend,
StereoIterator  seconditer,
StereoIterator  seconditerend,
const GluedGeomDet gluedDet,
LocalVector  trdir,
CollectorHelper &  collectorHelper 
) const
SiStripMatchedRecHit2D * SiStripRecHitMatcher::match ( const SiStripRecHit2D *  monoRH,
const SiStripRecHit2D *  stereoRH,
const GluedGeomDet gluedDet,
LocalVector  trackdirection 
) const

Definition at line 28 of file SiStripRecHitMatcher.cc.

References runEdmFileComparison::collection.

Referenced by TkGluedMeasurementDet::collectRecHits(), RoadSearchCloudMakerAlgorithm::CorrectMatchedHit(), RoadSearchTrackCandidateMakerAlgorithm::createSeedTrajectory(), RoadSearchTrackCandidateMakerAlgorithm::extrapolateTrajectory(), RoadSearchTrackCandidateMakerAlgorithm::FindBestHits(), and match().

31  {
32  SimpleHitCollection stereoHits(1,stereoRH);
33  std::vector<SiStripMatchedRecHit2D*> collection;
34  match( monoRH,
35  stereoHits.begin(), stereoHits.end(),
36  collection,
37  gluedDet,trackdirection);
38 
39  return collection.empty() ? (SiStripMatchedRecHit2D*)(0) : collection.front();
40 }
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
std::vector< const SiStripRecHit2D * > SimpleHitCollection
SiStripMatchedRecHit2D * SiStripRecHitMatcher::match ( const SiStripMatchedRecHit2D *  originalRH,
const GluedGeomDet gluedDet,
LocalVector  trackdirection 
) const

Definition at line 43 of file SiStripRecHitMatcher.cc.

45  {
46 
47  throw "SiStripRecHitMatcher::match(const SiStripMatchedRecHit2D *,..) is obsoltete since 5.2.0";
48 
49  /*
50  const SiStripRecHit2D* theMonoRH = origRH->monoHit();
51  // const SiStripRecHit2D* theStereoRH = origRH->stereoHit();
52  SimpleHitCollection theStereoHits(1, origRH->stereoHit());
53  // theStereoHits.push_back(theStereoRH);
54 
55  std::vector<SiStripMatchedRecHit2D*> collection;
56  match( theMonoRH,
57  theStereoHits.begin(), theStereoHits.end(),
58  collection,
59  gluedDet,trackdirection);
60 
61  return collection.empty() ? (SiStripMatchedRecHit2D*)(0) : collection.front();
62  */
63 
64  return nullptr;
65 }
edm::OwnVector<SiStripMatchedRecHit2D> SiStripRecHitMatcher::match ( const SiStripRecHit2D *  monoRH,
RecHitIterator  begin,
RecHitIterator  end,
const GluedGeomDet gluedDet 
) const
inline

Definition at line 61 of file SiStripRecHitMatcher.h.

References match().

63  {
64  return match(monoRH,begin, end, gluedDet,LocalVector(0.,0.,0.));
65  }
Local3DVector LocalVector
Definition: LocalVector.h:12
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
#define end
Definition: vmac.h:38
#define begin
Definition: vmac.h:31
edm::OwnVector< SiStripMatchedRecHit2D > SiStripRecHitMatcher::match ( const SiStripRecHit2D *  monoRH,
RecHitIterator  begin,
RecHitIterator  end,
const GluedGeomDet gluedDet,
LocalVector  trackdirection 
) const

Definition at line 69 of file SiStripRecHitMatcher.cc.

References end, i, and match().

73 {
74  SimpleHitCollection stereoHits;
75  stereoHits.reserve(end-begin);
76 
77  for (RecHitIterator i=begin; i != end; ++i) {
78  stereoHits.push_back( &(*i)); // convert to simple pointer
79  }
80  return match( monoRH,
81  stereoHits.begin(), stereoHits.end(),
82  gluedDet,trackdirection);
83 }
int i
Definition: DBlmapReader.cc:9
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
#define end
Definition: vmac.h:38
std::vector< const SiStripRecHit2D * > SimpleHitCollection
SiStripRecHit2DCollectionNew::DetSet::const_iterator RecHitIterator
#define begin
Definition: vmac.h:31
edm::OwnVector< SiStripMatchedRecHit2D > SiStripRecHitMatcher::match ( const SiStripRecHit2D *  monoRH,
SimpleHitIterator  begin,
SimpleHitIterator  end,
const GluedGeomDet gluedDet,
LocalVector  trackdirection 
) const

Definition at line 86 of file SiStripRecHitMatcher.cc.

References match(), and edm::OwnVector< T, P >::reserve().

89  {
91  collector.reserve(end-begin); // a resonable estimate of its size...
92  match(monoRH,begin,end,collector,gluedDet,trackdirection);
93  return collector;
94 }
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
#define end
Definition: vmac.h:38
#define begin
Definition: vmac.h:31
void reserve(size_t)
Definition: OwnVector.h:267
void SiStripRecHitMatcher::match ( const SiStripRecHit2D *  monoRH,
RecHitIterator  begin,
RecHitIterator  end,
CollectorMatched collector,
const GluedGeomDet gluedDet,
LocalVector  trackdirection 
) const

Definition at line 132 of file SiStripRecHitMatcher.cc.

References end, i, and match().

136  {
137 
138  // is this really needed now????
139  SimpleHitCollection stereoHits;
140  stereoHits.reserve(end-begin);
141  for (RecHitIterator i=begin; i != end; ++i)
142  stereoHits.push_back( &(*i)); // convert to simple pointer
143 
144  return match( monoRH,
145  stereoHits.begin(), stereoHits.end(),
146  collector,
147  gluedDet,trackdirection);
148 }
int i
Definition: DBlmapReader.cc:9
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
#define end
Definition: vmac.h:38
std::vector< const SiStripRecHit2D * > SimpleHitCollection
SiStripRecHit2DCollectionNew::DetSet::const_iterator RecHitIterator
#define begin
Definition: vmac.h:31
void SiStripRecHitMatcher::match ( const SiStripRecHit2D *  monoRH,
SimpleHitIterator  begin,
SimpleHitIterator  end,
CollectorMatched collector,
const GluedGeomDet gluedDet,
LocalVector  trackdirection 
) const

Definition at line 151 of file SiStripRecHitMatcher.cc.

References match(), edmNew::DetSetVector< T >::FastFiller::push_back(), and query::result.

155  {
156 
157  Collector result(boost::bind(&CollectorMatched::push_back,boost::ref(collector),_1));
158  match(monoRH,begin,end,result,gluedDet,trackdirection);
159 
160 }
void push_back(data_type const &d)
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
tuple result
Definition: query.py:137
#define end
Definition: vmac.h:38
#define begin
Definition: vmac.h:31
boost::function< void(SiStripMatchedRecHit2D const &)> Collector
void SiStripRecHitMatcher::match ( const SiStripRecHit2D *  monoRH,
SimpleHitIterator  begin,
SimpleHitIterator  end,
edm::OwnVector< SiStripMatchedRecHit2D > &  collector,
const GluedGeomDet gluedDet,
LocalVector  trackdirection 
) const

Definition at line 98 of file SiStripRecHitMatcher.cc.

References match(), AlCaHLTBitMon_ParallelJobs::p, edm::OwnVector< T, P >::push_back(), and query::result.

102  {
103 
104  std::vector<SiStripMatchedRecHit2D*> result;
105  result.reserve(end-begin);
106  match(monoRH,begin,end,result,gluedDet,trackdirection);
107  for (std::vector<SiStripMatchedRecHit2D*>::iterator p=result.begin(); p!=result.end();
108  p++) collector.push_back(*p);
109 }
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
void push_back(D *&d)
Definition: OwnVector.h:273
tuple result
Definition: query.py:137
#define end
Definition: vmac.h:38
#define begin
Definition: vmac.h:31
void SiStripRecHitMatcher::match ( const SiStripRecHit2D *  monoRH,
SimpleHitIterator  begin,
SimpleHitIterator  end,
std::vector< SiStripMatchedRecHit2D * > &  collector,
const GluedGeomDet gluedDet,
LocalVector  trackdirection 
) const

Definition at line 119 of file SiStripRecHitMatcher.cc.

References clone(), match(), and query::result.

123  {
124  Collector result(boost::bind(&pb,boost::ref(collector),
125  boost::bind(&SiStripMatchedRecHit2D::clone,_1)));
126  match(monoRH,begin,end,result,gluedDet,trackdirection);
127 }
SiStripMatchedRecHit2D * match(const SiStripRecHit2D *monoRH, const SiStripRecHit2D *stereoRH, const GluedGeomDet *gluedDet, LocalVector trackdirection) const
tuple result
Definition: query.py:137
#define end
Definition: vmac.h:38
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
#define begin
Definition: vmac.h:31
boost::function< void(SiStripMatchedRecHit2D const &)> Collector
void SiStripRecHitMatcher::match ( const SiStripRecHit2D *  monoRH,
SimpleHitIterator  begin,
SimpleHitIterator  end,
Collector collector,
const GluedGeomDet gluedDet,
LocalVector  trackdirection 
) const

the actual implementation

Definition at line 165 of file SiStripRecHitMatcher.cc.

References trackerHits::c, alignmentValidation::c1, diffTreeTool::diff, end, error, GeomDet::geographicalId(), StripTopology::localPitch(), StripTopology::localPosition(), m, PV3DBase< T, PVType, FrameType >::mag2(), Topology::measurementError(), Topology::measurementPosition(), GluedGeomDet::monoDet(), position, project(), indexGen::s2, scale_, GluedGeomDet::stereoDet(), GeomDet::surface(), toLocal(), GeomDetUnit::topology(), HelpertRecHit2DLocalPos::updateWithAPE(), MeasurementError::uu(), x, and create_public_lumi_plots::xy.

169  {
170  // stripdet = mono
171  // partnerstripdet = stereo
172  const GeomDetUnit* stripdet = gluedDet->monoDet();
173  const GeomDetUnit* partnerstripdet = gluedDet->stereoDet();
174  const StripTopology& topol=(const StripTopology&)stripdet->topology();
175 
176  // position of the initial and final point of the strip (RPHI cluster) in local strip coordinates
177  double RPHIpointX = topol.measurementPosition(monoRH->localPositionFast()).x();
178  MeasurementPoint RPHIpointini(RPHIpointX,-0.5);
179  MeasurementPoint RPHIpointend(RPHIpointX,0.5);
180 
181  // position of the initial and final point of the strip in local coordinates (mono det)
182  StripPosition stripmono=StripPosition(topol.localPosition(RPHIpointini),topol.localPosition(RPHIpointend));
183 
184  if(trackdirection.mag2()<FLT_MIN){// in case of no track hypothesis assume a track from the origin through the center of the strip
185  LocalPoint lcenterofstrip=monoRH->localPositionFast();
186  GlobalPoint gcenterofstrip=(stripdet->surface()).toGlobal(lcenterofstrip);
187  GlobalVector gtrackdirection=gcenterofstrip-GlobalPoint(0,0,0);
188  trackdirection=(gluedDet->surface()).toLocal(gtrackdirection);
189  }
190 
191  //project mono hit on glued det
192  StripPosition projectedstripmono=project(stripdet,gluedDet,stripmono,trackdirection);
193  const StripTopology& partnertopol=(const StripTopology&)partnerstripdet->topology();
194 
195  double m00 = -(projectedstripmono.second.y()-projectedstripmono.first.y());
196  double m01 = (projectedstripmono.second.x()-projectedstripmono.first.x());
197  double c0 = m01*projectedstripmono.first.y() + m00*projectedstripmono.first.x();
198 
199  //error calculation (the part that depends on mono RH only)
200  // LocalVector RPHIpositiononGluedendvector=projectedstripmono.second-projectedstripmono.first;
201  /*
202  double l1 = 1./RPHIpositiononGluedendvector.perp2();
203  double c1 = RPHIpositiononGluedendvector.y();
204  double s1 =-RPHIpositiononGluedendvector.x();
205  */
206  double c1 = -m00;
207  double s1 = -m01;
208  double l1 = 1./(c1*c1+s1*s1);
209 
210 
211  // FIXME: here for test...
212  double sigmap12 = monoRH->sigmaPitch();
213  if (sigmap12<0) {
214  //AlgebraicSymMatrix tmpMatrix = monoRH->parametersError();
215  /*
216  std::cout << "DEBUG START" << std::endl;
217  std::cout << "APE mono,stereo,glued : "
218  << stripdet->alignmentPositionError()->globalError().cxx() << " , "
219  << partnerstripdet->alignmentPositionError()->globalError().cxx() << " , "
220  << gluedDet->alignmentPositionError()->globalError().cxx() << std::endl;
221  */
222  LocalError tmpError(monoRH->localPositionErrorFast());
223  HelpertRecHit2DLocalPos::updateWithAPE(tmpError,*stripdet);
224  MeasurementError errormonoRH=topol.measurementError(monoRH->localPositionFast(),tmpError);
225  /*
226  std::cout << "localPosError.xx(), helper.xx(), param.xx(): "
227  << monoRH->localPositionError().xx() << " , "
228  << monoRH->parametersError()[0][0] << " , "
229  << tmpMatrix[0][0] << std::endl;
230  */
231  //MeasurementError errormonoRH=topol.measurementError(monoRH->localPosition(),monoRH->localPositionError());
232  double pitch=topol.localPitch(monoRH->localPositionFast());
233  monoRH->setSigmaPitch(sigmap12=errormonoRH.uu()*pitch*pitch);
234  }
235 
236  SimpleHitIterator seconditer;
237 
238  for(seconditer=begin;seconditer!=end;++seconditer){//iterate on stereo rechits
239 
240  // position of the initial and final point of the strip (STEREO cluster)
241  double STEREOpointX=partnertopol.measurementPosition((*seconditer)->localPositionFast()).x();
242  MeasurementPoint STEREOpointini(STEREOpointX,-0.5);
243  MeasurementPoint STEREOpointend(STEREOpointX,0.5);
244 
245  // position of the initial and final point of the strip in local coordinates (stereo det)
246  StripPosition stripstereo(partnertopol.localPosition(STEREOpointini),partnertopol.localPosition(STEREOpointend));
247 
248  //project stereo hit on glued det
249  StripPosition projectedstripstereo=project(partnerstripdet,gluedDet,stripstereo,trackdirection);
250 
251 
252  double m10=-(projectedstripstereo.second.y()-projectedstripstereo.first.y());
253  double m11=(projectedstripstereo.second.x()-projectedstripstereo.first.x());
254 
255  //perform the matching
256  //(x2-x1)(y-y1)=(y2-y1)(x-x1)
257  AlgebraicMatrix22 m; AlgebraicVector2 c; // FIXME understand why moving this initializer out of the loop changes the output!
258  m(0,0)=m00;
259  m(0,1)=m01;
260  m(1,0)=m10;
261  m(1,1)=m11;
262  c(0)=c0;
263  c(1)=m11*projectedstripstereo.first.y()+m10*projectedstripstereo.first.x();
264  m.Invert();
265  AlgebraicVector2 solution = m * c;
266  LocalPoint position(solution(0),solution(1));
267 
268  /*
269  {
270  double m00 = -(projectedstripmono.second.y()-projectedstripmono.first.y());
271  double m01 = (projectedstripmono.second.x()-projectedstripmono.first.x());
272  double m10 = -(projectedstripstereo.second.y()-projectedstripstereo.first.y());
273  double m11 = (projectedstripstereo.second.x()-projectedstripstereo.first.x());
274  double c0 = m01*projectedstripmono.first.y() + m00*projectedstripmono.first.x();
275  double c1 = m11*projectedstripstereo.first.y() + m10*projectedstripstereo.first.x();
276 
277  double invDet = 1./(m00*m11-m10*m01);
278  }
279  */
280 
281  //
282  // temporary fix by tommaso
283  //
284 
285 
286  LocalError tempError (100,0,100);
287  if (!((gluedDet->surface()).bounds().inside(position,tempError,scale_))) continue;
288 
289  // then calculate the error
290  /*
291  LocalVector stereopositiononGluedendvector=projectedstripstereo.second-projectedstripstereo.first;
292  double l2 = 1./stereopositiononGluedendvector.perp2();
293  double c2 = stereopositiononGluedendvector.y();
294  double s2 =-stereopositiononGluedendvector.x();
295  */
296 
297  double c2 = -m10;
298  double s2 = -m11;
299  double l2 = 1./(c2*c2+s2*s2);
300 
301 
302  // FIXME: here for test...
303  double sigmap22 = (*seconditer)->sigmaPitch();
304  if (sigmap22<0) {
305  //AlgebraicSymMatrix tmpMatrix = (*seconditer)->parametersError();
306  LocalError tmpError((*seconditer)->localPositionErrorFast());
307  HelpertRecHit2DLocalPos::updateWithAPE(tmpError, *partnerstripdet);
308  MeasurementError errorstereoRH=partnertopol.measurementError((*seconditer)->localPositionFast(),tmpError);
309  //MeasurementError errorstereoRH=partnertopol.measurementError((*seconditer)->localPosition(),(*seconditer)->localPositionError());
310  double pitch=partnertopol.localPitch((*seconditer)->localPositionFast());
311  (*seconditer)->setSigmaPitch(sigmap22=errorstereoRH.uu()*pitch*pitch);
312  }
313 
314  double diff=(c1*s2-c2*s1);
315  double invdet2=1/(diff*diff*l1*l2);
316  float xx= invdet2*(sigmap12*s2*s2*l2+sigmap22*s1*s1*l1);
317  float xy=-invdet2*(sigmap12*c2*s2*l2+sigmap22*c1*s1*l1);
318  float yy= invdet2*(sigmap12*c2*c2*l2+sigmap22*c1*c1*l1);
319  LocalError error(xx,xy,yy);
320 
321  if((gluedDet->surface()).bounds().inside(position,error,scale_)){ //if it is inside the gluedet bonds
322  //Change NSigmaInside in the configuration file to accept more hits
323  //...and add it to the Rechit collection
324 
325  const SiStripRecHit2D* secondHit = *seconditer;
326  collector(SiStripMatchedRecHit2D(position, error,gluedDet->geographicalId() ,
327  monoRH,secondHit));
328  }
329  }
330 }
T mag2() const
Definition: PV3DBase.h:65
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:20
StripPosition project(const GeomDetUnit *det, const GluedGeomDet *glueddet, StripPosition strip, LocalVector trackdirection) const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static void updateWithAPE(LocalError &le, const GeomDet &det)
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepStd< double, 2, 2 > > AlgebraicMatrix22
tuple s2
Definition: indexGen.py:106
virtual const Topology & topology() const =0
virtual float localPitch(const LocalPoint &) const =0
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
std::pair< LocalPoint, LocalPoint > StripPosition
float uu() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
#define end
Definition: vmac.h:38
#define begin
Definition: vmac.h:31
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
SimpleHitCollection::const_iterator SimpleHitIterator
virtual LocalPoint localPosition(float strip) const =0
Definition: DDAxes.h:10
ROOT::Math::SVector< double, 2 > AlgebraicVector2
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:21
SiStripRecHitMatcher::StripPosition SiStripRecHitMatcher::project ( const GeomDetUnit det,
const GluedGeomDet glueddet,
StripPosition  strip,
LocalVector  trackdirection 
) const

Definition at line 333 of file SiStripRecHitMatcher.cc.

References pileupReCalc_HLTpaths::scale, GeomDet::surface(), toLocal(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by match().

334 {
335 
336  GlobalPoint globalpointini=(det->surface()).toGlobal(strip.first);
337  GlobalPoint globalpointend=(det->surface()).toGlobal(strip.second);
338 
339  // position of the initial and final point of the strip in glued local coordinates
340  LocalPoint positiononGluedini=(glueddet->surface()).toLocal(globalpointini);
341  LocalPoint positiononGluedend=(glueddet->surface()).toLocal(globalpointend);
342 
343  //correct the position with the track direction
344 
345  float scale=-positiononGluedini.z()/trackdirection.z();
346 
347  LocalPoint projpositiononGluedini= positiononGluedini + scale*trackdirection;
348  LocalPoint projpositiononGluedend= positiononGluedend + scale*trackdirection;
349 
350  return StripPosition(projpositiononGluedini,projpositiononGluedend);
351 }
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
std::pair< LocalPoint, LocalPoint > StripPosition
T z() const
Definition: PV3DBase.h:63
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35

Member Data Documentation

float SiStripRecHitMatcher::scale_

Definition at line 130 of file SiStripRecHitMatcher.h.

Referenced by match(), and SiStripRecHitMatcher().