CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DuplicateListMerger.cc
Go to the documentation of this file.
7 
10 
12 
13 DuplicateListMerger::DuplicateListMerger(const edm::ParameterSet& iPara)
14 {
15  diffHitsCut_ = 9999;
16  minTrkProbCut_ = 0.0;
17  if(iPara.exists("diffHitsCut"))diffHitsCut_ = iPara.getParameter<int>("diffHitsCut");
18  if(iPara.exists("minTrkProbCut"))minTrkProbCut_ = iPara.getParameter<double>("minTrkProbCut");
19  if(iPara.exists("mergedSource"))mergedTrackSource_ = iPara.getParameter<edm::InputTag>("mergedSource");
20  if(iPara.exists("originalSource"))originalTrackSource_ = iPara.getParameter<edm::InputTag>("originalSource");
21  if(iPara.exists("candidateSource"))candidateSource_ = iPara.getParameter<edm::InputTag>("candidateSource");
22 
23 
24  if(iPara.exists("mergedMVAVals")){
25  mergedMVAVals_ = iPara.getParameter<edm::InputTag>("mergedMVAVals");
26  }else{
28  }
29  if(iPara.exists("originalMVAVals")){
30  originalMVAVals_ = iPara.getParameter<edm::InputTag>("originalMVAVals");
31  }else{
33  }
34 
35  copyExtras_ = iPara.getUntrackedParameter<bool>("copyExtras",true);
37  if (iPara.exists("newQuality")) {
38  std::string qualityStr = iPara.getParameter<std::string>("newQuality");
39  if (qualityStr != "") {
40  qualityToSet_ = reco::TrackBase::qualityByName(qualityStr);
41  }
42  }
43 
44  produces<std::vector<reco::Track> >();
45  produces< std::vector<Trajectory> >();
46  produces< TrajTrackAssociationCollection >();
47 
48  produces<edm::ValueMap<float> >("MVAVals");
49 
50  makeReKeyedSeeds_ = iPara.getUntrackedParameter<bool>("makeReKeyedSeeds",false);
51  if (makeReKeyedSeeds_){
52  copyExtras_=true;
53  produces<TrajectorySeedCollection>();
54  }
55  if(copyExtras_){
56  produces<reco::TrackExtraCollection>();
57  produces<TrackingRecHitCollection>();
58  }
59 
60 }
61 
63 {
64 
65  /* no op */
66 
67 }
68 
70 {
72  iEvent.getByLabel(originalTrackSource_,originalHandle);
74  iEvent.getByLabel(mergedTrackSource_,mergedHandle);
75 
76  const reco::TrackCollection& mergedTracks(*mergedHandle);
77  reco::TrackRefProd originalTrackRefs(originalHandle);
78  reco::TrackRefProd mergedTrackRefs(mergedHandle);
79 
80  edm::Handle< std::vector<Trajectory> > mergedTrajHandle;
81  iEvent.getByLabel(mergedTrackSource_,mergedTrajHandle);
83  iEvent.getByLabel(mergedTrackSource_,mergedTrajTrackHandle);
84 
85  edm::Handle< std::vector<Trajectory> > originalTrajHandle;
86  iEvent.getByLabel(originalTrackSource_,originalTrajHandle);
87  edm::Handle< TrajTrackAssociationCollection > originalTrajTrackHandle;
88  iEvent.getByLabel(originalTrackSource_,originalTrajTrackHandle);
89 
91  iEvent.getByLabel(candidateSource_,candidateHandle);
92 
93  std::auto_ptr<std::vector<reco::Track> > out_generalTracks(new std::vector<reco::Track>());
94  out_generalTracks->reserve(originalHandle->size());
96  std::auto_ptr< std::vector<Trajectory> > outputTrajs = std::auto_ptr< std::vector<Trajectory> >(new std::vector<Trajectory>());
97  outputTrajs->reserve(originalTrajHandle->size()+mergedTrajHandle->size());
99  std::auto_ptr< TrajTrackAssociationCollection > outputTTAss = std::auto_ptr< TrajTrackAssociationCollection >(new TrajTrackAssociationCollection());
100  //std::auto_ptr< TrajectorySeedCollection > outputSeeds
101 
102  std::auto_ptr<reco::TrackExtraCollection> outputTrkExtras;
103  reco::TrackExtraRefProd refTrkExtras;
104  std::auto_ptr<TrackingRecHitCollection> outputTrkHits;
105  TrackingRecHitRefProd refTrkHits;
106  std::auto_ptr<TrajectorySeedCollection> outputSeeds;
108 
109  const int rSize = (int)originalHandle->size();
110  edm::RefToBase<TrajectorySeed> seedsRefs[rSize];
111 
112  edm::Handle<edm::ValueMap<float> > originalMVAStore;
113  edm::Handle<edm::ValueMap<float> > mergedMVAStore;
114 
115  iEvent.getByLabel(originalMVAVals_,originalMVAStore);
116  iEvent.getByLabel(mergedMVAVals_,mergedMVAStore);
117 
118  std::auto_ptr<edm::ValueMap<float> > vmMVA = std::auto_ptr<edm::ValueMap<float> >(new edm::ValueMap<float>);
119  edm::ValueMap<float>::Filler fillerMVA(*vmMVA);
120  std::vector<float> mvaVec;
121 
122 
123  if(copyExtras_){
124  outputTrkExtras = std::auto_ptr<reco::TrackExtraCollection>(new reco::TrackExtraCollection);
125  outputTrkExtras->reserve(originalHandle->size());
126  refTrkExtras = iEvent.getRefBeforePut<reco::TrackExtraCollection>();
127  outputTrkHits = std::auto_ptr<TrackingRecHitCollection>(new TrackingRecHitCollection);
128  outputTrkHits->reserve(originalHandle->size()*25);
129  refTrkHits = iEvent.getRefBeforePut<TrackingRecHitCollection>();
130  if (makeReKeyedSeeds_){
131  outputSeeds = std::auto_ptr<TrajectorySeedCollection>(new TrajectorySeedCollection);
132  outputSeeds->reserve(originalHandle->size());
133  refTrajSeeds = iEvent.getRefBeforePut<TrajectorySeedCollection>();
134  }
135  }
136 
137  //match new tracks to their candidates
138  std::vector<std::pair<int,const DuplicateRecord*> > matches;
139  for(int i = 0; i < (int)candidateHandle->size(); i++){
140  const DuplicateRecord& duplicateRecord = candidateHandle->at(i);
141  int matchTrack = matchCandidateToTrack(duplicateRecord.first,mergedHandle);
142  if(matchTrack < 0)continue;
143  const reco::Track& matchedTrack(mergedTracks[matchTrack]);
144  if( ChiSquaredProbability(matchedTrack.chi2(),matchedTrack.ndof()) < minTrkProbCut_)continue;
145  unsigned int dHits = (duplicateRecord.first.recHits().second - duplicateRecord.first.recHits().first) - matchedTrack.recHitsSize();
146  if(dHits > diffHitsCut_)continue;
147  matches.push_back(std::pair<int,const DuplicateRecord*>(matchTrack,&duplicateRecord));
148  }
149 
150  //check for candidates/tracks that share merged tracks, select minimum chi2, remove the rest
151  std::vector<std::pair<int,const DuplicateRecord*> >::iterator matchIter0 = matches.begin();
152  std::vector<std::pair<int,const DuplicateRecord*> >::iterator matchIter1;
153  while(matchIter0 != matches.end()){
154  double nchi2 = mergedTracks[matchIter0->first].normalizedChi2();
155  bool advance = true;
156  for(matchIter1 = matchIter0+1; matchIter1 != matches.end(); matchIter1++){
157  const reco::Track& match0first = *(matchIter0->second->second.first.get());
158  const reco::Track& match0second = *(matchIter0->second->second.second.get());
159  const reco::Track& match1first = *(matchIter1->second->second.first.get());
160  const reco::Track& match1second = *(matchIter1->second->second.second.get());
161  if(match1first.seedRef() == match0first.seedRef() ||
162  match1first.seedRef() == match0second.seedRef() ||
163  match1second.seedRef() == match0first.seedRef() ||
164  match1second.seedRef() == match0second.seedRef()){
165  double nchi2_1 = mergedTracks[matchIter1->first].normalizedChi2();
166  advance = false;
167  if(nchi2_1 < nchi2){
168  matches.erase(matchIter0);
169  }else{
170  matches.erase(matchIter1);
171  }
172  break;
173  }
174  }
175  if(advance)matchIter0++;
176  }
177 
178  //add the good merged tracks to the output list, remove input tracks
179  std::vector<reco::Track> inputTracks;
180 
181  refTrajs = iEvent.getRefBeforePut< std::vector<Trajectory> >();
182 
183  for(matchIter0 = matches.begin(); matchIter0 != matches.end(); matchIter0++){
184  reco::TrackRef inTrkRef1 = matchIter0->second->second.first;
185  reco::TrackRef inTrkRef2 = matchIter0->second->second.second;
186  const reco::Track& inTrk1 = *(inTrkRef1.get());
187  const reco::Track& inTrk2 = *(inTrkRef2.get());
188  reco::TrackBase::TrackAlgorithm newTrkAlgo = std::min(inTrk1.algo(),inTrk2.algo());
189  int combinedQualityMask = (inTrk1.qualityMask() | inTrk2.qualityMask());
190  inputTracks.push_back(inTrk1);
191  inputTracks.push_back(inTrk2);
192  out_generalTracks->push_back(mergedTracks[matchIter0->first]);
193  reco::TrackRef curTrackRef = reco::TrackRef(refTrks, out_generalTracks->size() - 1);
194  float mergedMVA = (*mergedMVAStore)[reco::TrackRef(mergedTrackRefs,matchIter0->first)];
195  mvaVec.push_back(mergedMVA);
196  out_generalTracks->back().setAlgorithm(newTrkAlgo);
197  out_generalTracks->back().setQualityMask(combinedQualityMask);
198  out_generalTracks->back().setQuality(qualityToSet_);
199  edm::RefToBase<TrajectorySeed> origSeedRef;
200  if(copyExtras_){
201  const reco::Track& track = mergedTracks[matchIter0->first];
202  origSeedRef = track.seedRef();
203  //creating a seed with rekeyed clusters if required
204  if (makeReKeyedSeeds_){
205  bool doRekeyOnThisSeed=false;
206 
207  edm::InputTag clusterRemovalInfos("");
208  //grab on of the hits of the seed
209  if (origSeedRef->nHits()!=0){
210  TrajectorySeed::const_iterator firstHit=origSeedRef->recHits().first;
211  const TrackingRecHit *hit = &*firstHit;
212  if (firstHit->isValid()){
214  // the cluster collection either produced a removalInfo or mot
215  //get the clusterremoval info from the provenance: will rekey if this is found
217  edm::Provenance prov=iEvent.getProvenance(pID);
218  clusterRemovalInfos=edm::InputTag(prov.moduleLabel(),
219  prov.productInstanceName(),
220  prov.processName());
221  doRekeyOnThisSeed=iEvent.getByLabel(clusterRemovalInfos,CRIh);
222  }//valid hit
223  }//nhit!=0
224 
225  if (doRekeyOnThisSeed && !(clusterRemovalInfos==edm::InputTag(""))) {
226  ClusterRemovalRefSetter refSetter(iEvent,clusterRemovalInfos);
227  TrajectorySeed::recHitContainer newRecHitContainer;
228  newRecHitContainer.reserve(origSeedRef->nHits());
229  TrajectorySeed::const_iterator iH=origSeedRef->recHits().first;
230  TrajectorySeed::const_iterator iH_end=origSeedRef->recHits().second;
231  for (;iH!=iH_end;++iH){
232  newRecHitContainer.push_back(*iH);
233  refSetter.reKey(&newRecHitContainer.back());
234  }
235  outputSeeds->push_back( TrajectorySeed( origSeedRef->startingState(),
236  newRecHitContainer,
237  origSeedRef->direction()));
238  }
239  //doRekeyOnThisSeed=true
240  else{
241  //just copy the one we had before
242  outputSeeds->push_back( TrajectorySeed(*origSeedRef));
243  }
244  edm::Ref<TrajectorySeedCollection> pureRef(refTrajSeeds, outputSeeds->size()-1);
245  origSeedRef=edm::RefToBase<TrajectorySeed>( pureRef);
246  }//creating a new seed and rekeying it rechit clusters.
247  // Fill TrackExtra collection
248  outputTrkExtras->push_back( reco::TrackExtra(
249  track.outerPosition(), track.outerMomentum(), track.outerOk(),
250  track.innerPosition(), track.innerMomentum(), track.innerOk(),
251  track.outerStateCovariance(), track.outerDetId(),
252  track.innerStateCovariance(), track.innerDetId(),
253  track.seedDirection(), origSeedRef ) );
254  seedsRefs[(*matchIter0).first]=origSeedRef;
255  out_generalTracks->back().setExtra( reco::TrackExtraRef( refTrkExtras, outputTrkExtras->size() - 1) );
256  reco::TrackExtra & tx = outputTrkExtras->back();
257  tx.setResiduals(track.residuals());
258  // fill TrackingRecHits
259  unsigned nh1=track.recHitsSize();
260  for ( unsigned ih=0; ih<nh1; ++ih ) {
261  //const TrackingRecHit*hit=&((*(track->recHit(ih))));
262  outputTrkHits->push_back( track.recHit(ih)->clone() );
263  tx.add( TrackingRecHitRef( refTrkHits, outputTrkHits->size() - 1) );
264  }
265  }
266  edm::Ref< std::vector<Trajectory> > trajRef(mergedTrajHandle, (*matchIter0).first);
267  TrajTrackAssociationCollection::const_iterator match = mergedTrajTrackHandle->find(trajRef);
268  if (match != mergedTrajTrackHandle->end()) {
269  if(curTrackRef.isNonnull()){
270  outputTrajs->push_back( *trajRef );
272  outputTrajs->back().setSeedRef( origSeedRef );
273  outputTTAss->insert(edm::Ref< std::vector<Trajectory> >(refTrajs, outputTrajs->size() - 1),curTrackRef );
274  }
275  }
276  }
277 
278  for(int i = 0; i < (int)originalHandle->size(); i++){
279  bool good = true;
280  const reco::Track& origTrack = originalHandle->at(i);
281  for(int j = 0; j < (int)inputTracks.size() && good; j++){
282  const reco::Track& inputTrack = inputTracks[j];
283  if(origTrack.seedRef() != inputTrack.seedRef())continue;
284  if(origTrack.charge() != inputTrack.charge())continue;
285  if(origTrack.momentum() != inputTrack.momentum())continue;
286  if(origTrack.referencePoint() != inputTrack.referencePoint())continue;
287  good = false;
288  }
289 
290  if(good){
291  out_generalTracks->push_back(origTrack);
292  reco::TrackRef curTrackRef = reco::TrackRef(refTrks, out_generalTracks->size() - 1);
293  edm::RefToBase<TrajectorySeed> origSeedRef;
294  reco::TrackRef origTrackRef = reco::TrackRef(originalHandle,i);
295  mvaVec.push_back((*originalMVAStore)[origTrackRef]);
296  //mvaVec.push_back((*originalMVAStore)[reco::TrackRef(originalTrackRefs,i)]);
297  if(copyExtras_){
298  const reco::Track& track = origTrack;
299  origSeedRef = track.seedRef();
300  //creating a seed with rekeyed clusters if required
301  if (makeReKeyedSeeds_){
302  bool doRekeyOnThisSeed=false;
303 
304  edm::InputTag clusterRemovalInfos("");
305  //grab on of the hits of the seed
306  if (origSeedRef->nHits()!=0){
307  TrajectorySeed::const_iterator firstHit=origSeedRef->recHits().first;
308  const TrackingRecHit *hit = &*firstHit;
309  if (firstHit->isValid()){
311  // the cluster collection either produced a removalInfo or mot
312  //get the clusterremoval info from the provenance: will rekey if this is found
314  edm::Provenance prov=iEvent.getProvenance(pID);
315  clusterRemovalInfos=edm::InputTag(prov.moduleLabel(),
316  prov.productInstanceName(),
317  prov.processName());
318  doRekeyOnThisSeed=iEvent.getByLabel(clusterRemovalInfos,CRIh);
319  }//valid hit
320  }//nhit!=0
321 
322  if (doRekeyOnThisSeed && !(clusterRemovalInfos==edm::InputTag(""))) {
323  ClusterRemovalRefSetter refSetter(iEvent,clusterRemovalInfos);
324  TrajectorySeed::recHitContainer newRecHitContainer;
325  newRecHitContainer.reserve(origSeedRef->nHits());
326  TrajectorySeed::const_iterator iH=origSeedRef->recHits().first;
327  TrajectorySeed::const_iterator iH_end=origSeedRef->recHits().second;
328  for (;iH!=iH_end;++iH){
329  newRecHitContainer.push_back(*iH);
330  refSetter.reKey(&newRecHitContainer.back());
331  }
332  outputSeeds->push_back( TrajectorySeed( origSeedRef->startingState(),
333  newRecHitContainer,
334  origSeedRef->direction()));
335  }
336  //doRekeyOnThisSeed=true
337  else{
338  //just copy the one we had before
339  outputSeeds->push_back( TrajectorySeed(*origSeedRef));
340  }
341  edm::Ref<TrajectorySeedCollection> pureRef(refTrajSeeds, outputSeeds->size()-1);
342  origSeedRef=edm::RefToBase<TrajectorySeed>( pureRef);
343  }//creating a new seed and rekeying it rechit clusters.
344 
345  // Fill TrackExtra collection
346  outputTrkExtras->push_back( reco::TrackExtra(
347  track.outerPosition(), track.outerMomentum(), track.outerOk(),
348  track.innerPosition(), track.innerMomentum(), track.innerOk(),
349  track.outerStateCovariance(), track.outerDetId(),
350  track.innerStateCovariance(), track.innerDetId(),
351  track.seedDirection(), origSeedRef ) );
352  seedsRefs[i]=origSeedRef;
353  out_generalTracks->back().setExtra( reco::TrackExtraRef( refTrkExtras, outputTrkExtras->size() - 1) );
354  reco::TrackExtra & tx = outputTrkExtras->back();
355  tx.setResiduals(track.residuals());
356 
357  // fill TrackingRecHits
358  unsigned nh1=track.recHitsSize();
359  for ( unsigned ih=0; ih<nh1; ++ih ) {
360  //const TrackingRecHit*hit=&((*(track->recHit(ih))));
361  outputTrkHits->push_back( track.recHit(ih)->clone() );
362  tx.add( TrackingRecHitRef( refTrkHits, outputTrkHits->size() - 1) );
363  }
364 
365  }
366 
367  edm::Ref< std::vector<Trajectory> > trajRef(originalTrajHandle, i);
368  TrajTrackAssociationCollection::const_iterator match = originalTrajTrackHandle->find(trajRef);
369  if (match != originalTrajTrackHandle->end()) {
370  if(curTrackRef.isNonnull()){
371  outputTrajs->push_back( *trajRef );
373  outputTrajs->back().setSeedRef( origSeedRef );
374  outputTTAss->insert(edm::Ref< std::vector<Trajectory> >(refTrajs, outputTrajs->size() - 1),curTrackRef );
375  }
376  }
377  }
378  }
379 
380  edm::ProductID nPID = refTrks.id();
381  edm::TestHandle<TrackCollection> out_gtHandle(out_generalTracks.get(),nPID);
382 
383  fillerMVA.insert(out_gtHandle,mvaVec.begin(),mvaVec.end());
384  fillerMVA.fill();
385 
386  iEvent.put(vmMVA,"MVAVals");
387  iEvent.put(out_generalTracks);
388  if (copyExtras_) {
389  iEvent.put(outputTrkExtras);
390  iEvent.put(outputTrkHits);
391  if (makeReKeyedSeeds_)
392  iEvent.put(outputSeeds);
393  }
394  iEvent.put(outputTrajs);
395  iEvent.put(outputTTAss);
396 }
397 
398 //------------------------------------------------------------
399 //------------------------------------------------------------
400 //------------------------------------------------------------
401 //------------------------------------------------------------
403  int track = -1;
404  std::vector<int> rawIds;
405  RecHitContainer::const_iterator candBegin = candidate.recHits().first;
406  RecHitContainer::const_iterator candEnd = candidate.recHits().second;
407  for(; candBegin != candEnd; candBegin++){
408  rawIds.push_back((*(candBegin)).rawId());
409  }
410 
411 
412  for(int i = 0; i < (int)tracks->size() && track < 0;i++){
413  if((tracks->at(i)).seedRef() != candidate.seedRef())continue;
414  int match = 0;
415  trackingRecHit_iterator trackRecBegin = tracks->at(i).recHitsBegin();
416  trackingRecHit_iterator trackRecEnd = tracks->at(i).recHitsEnd();
417  for(;trackRecBegin != trackRecEnd; trackRecBegin++){
418  if(std::find(rawIds.begin(),rawIds.end(),(*(trackRecBegin)).get()->rawId()) != rawIds.end())match++;
419  }
420  if(match != (int)tracks->at(i).recHitsSize())continue;
421  track = i;
422  }
423 
424  return track;
425 }
426 //------------------------------------------------------------
427 //------------------------------------------------------------
428 //------------------------------------------------------------
429 //------------------------------------------------------------
PropagationDirection direction() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
reference back()
Definition: OwnVector.h:320
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:150
range recHits() const
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:111
size_t recHitsSize() const
Get number of RecHits. (Warning, this includes invalid hits, which are not physical hits)...
Definition: Track.h:69
void reKey(TrackingRecHit *hit) const
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:10
bool exists(std::string const &parameterName) const
checks if a parameter exists
bool innerOk() const
return true if the innermost hit is valid
Definition: Track.h:40
#define min(a, b)
Definition: mlp_lapack.h:161
std::string const & processName() const
Definition: Provenance.h:63
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
const math::XYZPoint & outerPosition() const
position of the outermost hit
Definition: Track.h:47
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:153
TrackAlgorithm
track algorithm
Definition: TrackBase.h:82
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:42
TrackAlgorithm algo() const
Definition: TrackBase.h:332
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
void push_back(D *&d)
Definition: OwnVector.h:273
int iEvent
Definition: GenABIO.cc:243
std::vector< TrajectorySeed > TrajectorySeedCollection
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:107
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
int matchCandidateToTrack(TrackCandidate, edm::Handle< reco::TrackCollection >)
recHitContainer::const_iterator const_iterator
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:109
edm::Ref< TrackingRecHitCollection > TrackingRecHitRef
persistent reference to a TrackingRecHit
CovarianceMatrix outerStateCovariance() const
outermost trajectory state curvilinear errors
Definition: Track.h:51
int qualityMask() const
Definition: TrackBase.h:286
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
Definition: Track.h:59
int j
Definition: DBlmapReader.cc:9
float ChiSquaredProbability(double chiSquared, double nrDOF)
edm::InputTag mergedTrackSource_
track input collection
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > > TrajTrackAssociationCollection
void produce(edm::Event &, const edm::EventSetup &) override
produce one event
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
RefProd< PROD > getRefBeforePut()
Definition: Event.h:106
edm::ProductID clusterProductB(const TrackingRecHit *hit)
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
Definition: TrackExtraFwd.h:9
edm::OwnVector< TrackingRecHit > TrackingRecHitCollection
collection of TrackingRecHits
edm::RefToBase< TrajectorySeed > seedRef() const
Definition: Track.h:112
PTrajectoryStateOnDet const & startingState() const
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:46
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
Definition: Track.h:49
bool outerOk() const
return true if the outermost hit is valid
Definition: Track.h:38
tuple tracks
Definition: testEve_cfg.py:39
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:14
CovarianceMatrix innerStateCovariance() const
innermost trajectory state curvilinear errors
Definition: Track.h:53
range recHits() const
void add(const TrackingRecHitRef &r)
add a reference to a RecHit
std::string const & moduleLabel() const
Definition: Provenance.h:62
std::string const & label() const
Definition: InputTag.h:42
unsigned int nHits() const
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:45
TrackingRecHitRef recHit(size_t i) const
Get i-th hit on the track.
Definition: Track.h:67
ProductID id() const
Accessor for product ID.
Definition: RefProd.h:140
const TrackResiduals & residuals() const
Definition: Track.h:117
PropagationDirection seedDirection() const
direction of how the hits were sorted in the original seed
Definition: Track.h:105
int charge() const
track electric charge
Definition: TrackBase.h:113
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:6
std::string const & productInstanceName() const
Definition: Provenance.h:64
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
Provenance getProvenance(BranchID const &theID) const
Definition: Event.cc:68
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: Track.h:61
std::pair< TrackCandidate, std::pair< reco::TrackRef, reco::TrackRef > > DuplicateRecord
typedef container of candidate and input tracks
edm::RefToBase< TrajectorySeed > seedRef() const
void reserve(size_t)
Definition: OwnVector.h:267
reco::TrackBase::TrackQuality qualityToSet_
void setResiduals(const TrackResiduals &r)
set the residuals
Definition: TrackExtra.h:131