CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
CRackTrajectoryBuilder Class Reference

#include <CRackTrajectoryBuilder.h>

Classes

class  CompareDetByTraj
 

Public Member Functions

 CRackTrajectoryBuilder (const edm::ParameterSet &conf)
 
Trajectory createStartingTrajectory (const TrajectorySeed &seed) const
 
const TransientTrackingRecHitBuilderhitBuilder () const
 
void init (const edm::EventSetup &es, bool)
 
void run (const TrajectorySeedCollection &collseed, const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const SiPixelRecHitCollection &collpixel, const edm::EventSetup &es, edm::Event &e, std::vector< Trajectory > &trajoutput)
 Runs the algorithm. More...
 
 ~CRackTrajectoryBuilder ()
 

Private Types

typedef std::pair< TrackingRecHitRangeIterator, TSOSPairTrackingRecHitTsos
 
typedef TrajectoryMeasurement TM
 
typedef std::vector< const TrackingRecHit * >::iterator TrackingRecHitIterator
 
typedef std::pair< TrackingRecHitIterator, TrackingRecHitIteratorTrackingRecHitRange
 
typedef std::vector< TrackingRecHitRange >::iterator TrackingRecHitRangeIterator
 
typedef TrajectoryStateOnSurface TSOS
 

Private Member Functions

void AddHit (Trajectory &traj, const std::vector< const TrackingRecHit * > &Hits, Propagator *currPropagator)
 
std::pair< TrajectoryStateOnSurface, const GeomDet * > innerState (const Trajectory &traj) const
 
bool isDifferentStripReHit2D (const SiStripRecHit2D &hitA, const SiStripRecHit2D &hitB)
 
bool qualityFilter (const Trajectory &traj)
 
std::vector< TrajectoryMeasurementseedMeasurements (const TrajectorySeed &seed) const
 
std::vector< const TrackingRecHit * > SortHits (const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const SiPixelRecHitCollection &collpixel, const TrajectorySeed &seed, const bool bAddSeedHits)
 
TSOS startingTSOS (const TrajectorySeed &seed) const
 
void updateTrajectory (Trajectory &traj, const TM &tm, const TransientTrackingRecHit &hit) const
 

Private Attributes

double chi2cut
 
bool debug_info
 
bool fastPropagation
 
std::string geometry
 
TransientTrackingRecHit::RecHitContainer hits
 
edm::ESHandle< MagneticFieldmagfield
 
const TransientTrackingRecHitBuilderRHBuilder
 
bool seed_plus
 
std::string theBuilderName
 
Chi2MeasurementEstimatortheEstimator
 
const KFTrajectoryFittertheFitter
 
int theMinHits
 
PropagatorWithMaterialthePropagator
 
PropagatorWithMaterialthePropagatorOp
 
const KFTrajectorySmoothertheSmoother
 
KFUpdatortheUpdator
 
edm::ESHandle< TrackerGeometrytracker
 
std::vector< TrajectorytrajFit
 
bool useMatchedHits
 

Friends

class CompareDetByTraj
 

Detailed Description

Definition at line 122 of file CRackTrajectoryBuilder.h.

Member Typedef Documentation

Definition at line 134 of file CRackTrajectoryBuilder.h.

Definition at line 126 of file CRackTrajectoryBuilder.h.

typedef std::vector<const TrackingRecHit*>::iterator CRackTrajectoryBuilder::TrackingRecHitIterator
private

Definition at line 128 of file CRackTrajectoryBuilder.h.

Definition at line 130 of file CRackTrajectoryBuilder.h.

Definition at line 131 of file CRackTrajectoryBuilder.h.

Definition at line 125 of file CRackTrajectoryBuilder.h.

Constructor & Destructor Documentation

CRackTrajectoryBuilder::CRackTrajectoryBuilder ( const edm::ParameterSet conf)

Definition at line 30 of file CRackTrajectoryBuilder.cc.

References trackAssociatorByChi2_cfi::chi2cut, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

30  {
31  //minimum number of hits per tracks
32 
33  theMinHits = conf.getParameter<int>("MinHits");
34  //cut on chi2
35  chi2cut = conf.getParameter<double>("Chi2Cut");
36  edm::LogInfo("CosmicTrackFinder") << "Minimum number of hits " << theMinHits << " Cut on Chi2= " << chi2cut;
37 
38  debug_info = conf.getUntrackedParameter<bool>("debug", false);
39  fastPropagation = conf.getUntrackedParameter<bool>("fastPropagation", false);
40  useMatchedHits = conf.getUntrackedParameter<bool>("useMatchedHits", true);
41 
42  geometry = conf.getUntrackedParameter<std::string>("GeometricStructure", "STANDARD");
43  theBuilderName = conf.getParameter<std::string>("TTRHBuilder");
44 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
CRackTrajectoryBuilder::~CRackTrajectoryBuilder ( )

Definition at line 46 of file CRackTrajectoryBuilder.cc.

46  {
47  // delete theInitialState;
48 }

Member Function Documentation

void CRackTrajectoryBuilder::AddHit ( Trajectory traj,
const std::vector< const TrackingRecHit * > &  Hits,
Propagator currPropagator 
)
private

do the old version ....

Definition at line 475 of file CRackTrajectoryBuilder.cc.

References trackAssociatorByChi2_cfi::chi2cut, Trajectory::chiSquared(), gather_cfg::cout, spr::find(), TrackingRecHit::geographicalId(), TrajectoryStateOnSurface::globalPosition(), hfClusterShapes_cfi::hits, TrajectoryStateOnSurface::isValid(), Trajectory::lastMeasurement(), Propagator::propagate(), Trajectory::push(), DetId::rawId(), PbPb_ZMuSkimMuonDPG_cff::tracker, TrajectoryStateOnSurface::update(), and TrajectoryMeasurement::updatedState().

477  {
478  vector<const TrackingRecHit*> Hits = _Hits;
479  if (Hits.empty())
480  return;
481 
482  if (debug_info)
483  cout << "CRackTrajectoryBuilder::AddHit" << endl;
484  if (debug_info)
485  cout << "START " << traj.lastMeasurement().updatedState() << endl;
486 
487  vector<TrackingRecHitRange> hitRangeByDet;
488  TrackingRecHitIterator prevDet;
489 
490  prevDet = Hits.begin();
491  for (TrackingRecHitIterator iHit = Hits.begin(); iHit != Hits.end(); iHit++) {
492  if ((*prevDet)->geographicalId() == (*iHit)->geographicalId())
493  continue;
494 
495  hitRangeByDet.push_back(make_pair(prevDet, iHit));
496  prevDet = iHit;
497  }
498  hitRangeByDet.push_back(make_pair(prevDet, Hits.end()));
499 
501 
502  if (fastPropagation) {
503  for (TrackingRecHitRangeIterator iHitRange = hitRangeByDet.begin(); iHitRange != hitRangeByDet.end(); iHitRange++) {
504  const TrackingRecHit* currHit = *(iHitRange->first);
505  DetId currDet = currHit->geographicalId();
506 
507  TSOS prSt =
508  currPropagator->propagate(traj.lastMeasurement().updatedState(), tracker->idToDet(currDet)->surface());
509 
510  if (!prSt.isValid()) {
511  if (debug_info)
512  cout << "Not Valid: PRST" << prSt.globalPosition();
513  // if (debug_info) cout << "Not Valid: HIT" << *currHit;
514 
515  continue;
516  }
517 
519  double chi2min = theEstimator->estimate(prSt, *bestHit).second;
520 
521  if (debug_info)
522  cout << "Size " << iHitRange->first - (*iHitRange).second << endl;
523  for (TrackingRecHitIterator iHit = (*iHitRange).first + 1; iHit != iHitRange->second; iHit++) {
524  if (debug_info)
525  cout << "loop3 "
526  << " " << Hits.end() - iHit << endl;
527 
529  double currChi2 = theEstimator->estimate(prSt, *tmpHit).second;
530  if (currChi2 < chi2min) {
531  chi2min = currChi2;
532  bestHit = tmpHit;
533  }
534  }
535  //now we have check if the track can be added to the trajectory
536  if (debug_info)
537  cout << chi2min << endl;
538  if (chi2min < chi2cut) {
539  if (debug_info)
540  cout << "chi2 fine : " << chi2min << endl;
541  TSOS UpdatedState = theUpdator->update(prSt, *bestHit);
542  if (UpdatedState.isValid()) {
543  hits.push_back(bestHit);
544  traj.push(TM(prSt, UpdatedState, bestHit, chi2min));
545  if (debug_info)
546  edm::LogInfo("CosmicTrackFinder") << "STATE UPDATED WITH HIT AT POSITION "
547 
548  << bestHit->globalPosition() << UpdatedState << " " << traj.chiSquared();
549  if (debug_info)
550  cout << "STATE UPDATED WITH HIT AT POSITION "
551 
552  << bestHit->globalPosition() << UpdatedState << " " << traj.chiSquared();
553  if (debug_info)
554  cout << "State is valid ..." << endl;
555  break; // now we need to
556  } else {
557  edm::LogWarning("CosmicTrackFinder") << " State can not be updated with hit at position " << endl;
558  TSOS UpdatedState = theUpdator->update(prSt, *bestHit);
559  if (UpdatedState.isValid()) {
560  cout << "NOT! UPDATED WITH HIT AT POSITION "
561 
562  << bestHit->globalPosition() << UpdatedState << " " << traj.chiSquared();
563  }
564  }
565  }
566  }
567  } //simple version end
568  else {
569  //first sort the dets in the order they are traversed by the trajectory
570  // we need three loops:
571  // 1: loop as long as there can be an new hit added to the trajectory
572  // 2: loop over all dets that might be hit
573  // 3: loop over all hits on a certain det
574 
575  std::vector<std::pair<TrackingRecHitRangeIterator, TSOS> > trackHitCandidates;
576  std::vector<std::pair<TrackingRecHitRangeIterator, TSOS> >::iterator iHitRange;
577  std::vector<uint32_t> processedDets;
578  do {
579  //create vector of possibly hit detectors...
580  trackHitCandidates.clear();
581  DetId currDet;
582  for (TrackingRecHitRangeIterator iHit = hitRangeByDet.begin(); iHit != hitRangeByDet.end(); iHit++) {
583  const TrackingRecHit* currHit = *(iHit->first);
584  currDet = currHit->geographicalId();
585 
586  if (find(processedDets.begin(), processedDets.end(), currDet.rawId()) != processedDets.end())
587  continue;
588 
589  TSOS prSt =
590  currPropagator->propagate(traj.lastMeasurement().updatedState(), tracker->idToDet(currDet)->surface());
591  if ((!prSt.isValid()) ||
592  (theEstimator->Chi2MeasurementEstimatorBase::estimate(prSt, tracker->idToDet(currDet)->surface()) == false))
593  // if ( ( !prSt.isValid() ) || (theEstimator->estimate(prSt,tracker->idToDet(currDet)->surface() ) == false) )
594  continue;
595 
596  trackHitCandidates.push_back(make_pair(iHit, prSt));
597  }
598 
599  if (trackHitCandidates.empty())
600  break;
601 
602  if (debug_info)
603  cout << Hits.size() << " (int) trackHitCandidates.begin() " << trackHitCandidates.size() << endl;
604  if (debug_info)
605  cout << "Before sorting ... " << endl;
606 
607  if (debug_info)
608  for (iHitRange = trackHitCandidates.begin(); iHitRange != trackHitCandidates.end(); iHitRange++) {
609  if (debug_info)
610  cout << (tracker->idToDet((*(iHitRange->first->first))->geographicalId()))->position();
611  }
612  if (debug_info)
613  cout << endl;
614 
615  stable_sort(trackHitCandidates.begin(),
616  trackHitCandidates.end(),
618 
619  if (debug_info)
620  cout << "After sorting ... " << endl;
621  if (debug_info) {
622  for (iHitRange = trackHitCandidates.begin(); iHitRange != trackHitCandidates.end(); iHitRange++) {
623  if (debug_info)
624  cout << (tracker->idToDet((*(iHitRange->first->first))->geographicalId()))->position();
625  }
626  cout << endl;
627  }
628 
629  for (iHitRange = trackHitCandidates.begin(); iHitRange != trackHitCandidates.end(); iHitRange++) //loop over dets
630  {
631  //now find the best hit of the detector
632  if (debug_info)
633  cout << "loop2 " << trackHitCandidates.size() << " " << trackHitCandidates.end() - iHitRange << endl;
634  const TrackingRecHit* currHit = *(iHitRange->first->first);
635 
637  TSOS currPrSt = (*iHitRange).second;
638 
639  if (debug_info)
640  cout << "curr position" << bestHit->globalPosition();
641  for (TrackingRecHitIterator iHit = (*iHitRange).first->first + 1; iHit != iHitRange->first->second; iHit++) {
643  if (debug_info)
644  cout << "curr position" << tmpHit->globalPosition();
645  }
646  }
647  if (debug_info)
648  cout << "Cross check end ..." << endl;
649 
650  //just a simple test if the same hit can be added twice ...
651  // for( iHitRange = trackHitCandidates.begin(); iHitRange != trackHitCandidates.end(); iHitRange++ ) //loop over all hits
652 
653  // break;
654 
655  for (iHitRange = trackHitCandidates.begin(); iHitRange != trackHitCandidates.end();
656  iHitRange++) //loop over detsall hits
657  {
658  //now find the best hit of the detector
659  if (debug_info)
660  cout << "loop2 " << trackHitCandidates.size() << " " << trackHitCandidates.end() - iHitRange << endl;
661 
662  const TrackingRecHit* currHit = *(iHitRange->first->first);
663 
664  processedDets.push_back(currHit->geographicalId().rawId());
665 
667 
668  if (debug_info)
669  cout << "curr position A" << bestHit->globalPosition() << endl;
670  TSOS currPrSt = (*iHitRange).second;
671  double chi2min = theEstimator->estimate(currPrSt, *bestHit).second;
672 
673  if (debug_info)
674  cout << "Size " << iHitRange->first->second - (*iHitRange).first->first << endl;
675  for (TrackingRecHitIterator iHit = (*iHitRange).first->first + 1; iHit != iHitRange->first->second; iHit++) {
676  if (debug_info)
677  cout << "loop3 "
678  << " " << Hits.end() - iHit << endl;
679 
681  if (debug_info)
682  cout << "curr position B" << tmpHit->globalPosition() << endl;
683  double currChi2 = theEstimator->estimate(currPrSt, *tmpHit).second;
684  if (currChi2 < chi2min) {
685  if (debug_info)
686  cout << "Is best hit" << endl;
687  chi2min = currChi2;
688  bestHit = tmpHit;
689  }
690  }
691  //now we have checked the det and can remove the entry from the vector...
692 
693  //if (debug_info) cout << "before erase ..." << endl;
694  //this is to slow ...
695  // hitRangeByDet.erase( (*iHitRange).first,(*iHitRange).first+1 );
696  //if (debug_info) cout << "after erase ..." << endl;
697 
698  if (debug_info)
699  cout << chi2min << endl;
700  //if the track can be added to the trajectory
701  if (chi2min < chi2cut) {
702  if (debug_info)
703  cout << "chi2 fine : " << chi2min << endl;
704 
705  // if (debug_info) cout << "previaous state " << traj.lastMeasurement().updatedState() <<endl;
706  TSOS UpdatedState = theUpdator->update(currPrSt, *bestHit);
707  if (UpdatedState.isValid()) {
708  hits.push_back(bestHit);
709  traj.push(TM(currPrSt, UpdatedState, bestHit, chi2min));
710  if (debug_info)
711  edm::LogInfo("CosmicTrackFinder") << "STATE UPDATED WITH HIT AT POSITION "
712  // <<tmphitbestdet->globalPosition()
713  << UpdatedState << " " << traj.chiSquared();
714  if (debug_info)
715  cout << "Added Hit" << bestHit->globalPosition() << endl;
716  if (debug_info)
717  cout << "State is valid ..." << UpdatedState << endl;
718  //cout << "updated state " << traj.lastMeasurement().updatedState() <<endl;
719 
720  // return; //break;
721  //
722  // TSOS prSt= currPropagator->propagate(traj.lastMeasurement().updatedState(),
723  // tracker->idToDet( bestHit->geographicalId() )->surface());
724  //
725  // if ( prSt.isValid())
726  // cout << "the same hit can be added twice ..." << endl;
727  //
728 
729  break;
730  } else {
731  if (debug_info)
732  edm::LogWarning("CosmicTrackFinder")
733  << " State can not be updated with hit at position " << bestHit->globalPosition();
734  // cout << "State can not be updated with hit at " << bestHit->globalPosition() << endl;
735  }
736  continue;
737  } else {
738  // cout << "chi2 to big : " << chi2min << endl;
739  }
740  if (debug_info)
741  cout << " continue 1 " << endl;
742  }
743  //now we remove all already processed dets from the list ...
744  // hitRangeByDet.erase( (*trackHitCandidates.begin()).first,(*iHitRange).first+1 );
745 
746  if (debug_info)
747  cout << " continue 2 " << endl;
748  }
749  //if this was the last exit
750  while (iHitRange != trackHitCandidates.end());
751  }
752 }
std::vector< TrackingRecHitRange >::iterator TrackingRecHitRangeIterator
Chi2MeasurementEstimator * theEstimator
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
GlobalPoint globalPosition() const
const TransientTrackingRecHitBuilder * RHBuilder
TransientTrackingRecHit::RecHitContainer hits
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
std::vector< const TrackingRecHit * >::iterator TrackingRecHitIterator
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition: KFUpdator.cc:177
edm::ESHandle< TrackerGeometry > tracker
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
Definition: DetId.h:17
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
float chiSquared() const
Definition: Trajectory.h:241
const TrackerGeomDet * idToDet(DetId) const override
TrajectoryStateOnSurface const & updatedState() const
DetId geographicalId() const
void push(const TrajectoryMeasurement &tm)
Definition: Trajectory.cc:50
TrajectoryMeasurement TM
Trajectory CRackTrajectoryBuilder::createStartingTrajectory ( const TrajectorySeed seed) const

Definition at line 214 of file CRackTrajectoryBuilder.cc.

References TrajectorySeed::direction(), mps_fire::i, eostools::move(), and mps_fire::result.

214  {
215  Trajectory result(seed, seed.direction());
216  std::vector<TM>&& seedMeas = seedMeasurements(seed);
217  for (auto i : seedMeas)
218  result.push(std::move(i));
219  return result;
220 }
PropagationDirection direction() const
std::vector< TrajectoryMeasurement > seedMeasurements(const TrajectorySeed &seed) const
def move(src, dest)
Definition: eostools.py:511
const TransientTrackingRecHitBuilder* CRackTrajectoryBuilder::hitBuilder ( ) const
inline

Definition at line 192 of file CRackTrajectoryBuilder.h.

References SurveyInfoScenario_cff::seed.

Referenced by cms::CosmicTrackFinder::produce().

192 { return RHBuilder; }
const TransientTrackingRecHitBuilder * RHBuilder
void CRackTrajectoryBuilder::init ( const edm::EventSetup es,
bool  seedplus 
)

Definition at line 50 of file CRackTrajectoryBuilder.cc.

References alongMomentum, trackAssociatorByChi2_cfi::chi2cut, Chi2MeasurementEstimator_cfi::Chi2MeasurementEstimator, edm::EventSetup::get(), volumeBasedMagneticField_1103l_cfi::magfield, oppositeToMomentum, edm::ESHandle< T >::product(), and PbPb_ZMuSkimMuonDPG_cff::tracker.

50  {
51  // edm::ParameterSet tise_params = conf_.getParameter<edm::ParameterSet>("TransientInitialStateEstimatorParameters") ;
52  // theInitialState = new TransientInitialStateEstimator( es,tise_params);
53 
54  //services
57 
58  if (seedplus) {
59  seed_plus = true;
62  } else {
63  seed_plus = false;
66  }
67 
68  theUpdator = new KFUpdator();
69  // theUpdator= new KFStripUpdator();
71 
73  es.get<TransientRecHitRecord>().get(theBuilderName, theBuilder);
74 
75  RHBuilder = theBuilder.product();
76 
77  theFitter = new KFTrajectoryFitter(*thePropagator, *theUpdator, *theEstimator);
78 
80 }
edm::ESHandle< MagneticField > magfield
Chi2MeasurementEstimator * theEstimator
const TransientTrackingRecHitBuilder * RHBuilder
const KFTrajectorySmoother * theSmoother
edm::ESHandle< TrackerGeometry > tracker
PropagatorWithMaterial * thePropagatorOp
PropagatorWithMaterial * thePropagator
const KFTrajectoryFitter * theFitter
T get() const
Definition: EventSetup.h:73
T const * product() const
Definition: ESHandle.h:86
std::pair< TrajectoryStateOnSurface, const GeomDet * > CRackTrajectoryBuilder::innerState ( const Trajectory traj) const
private

Definition at line 794 of file CRackTrajectoryBuilder.cc.

References alongMomentum, gen::C, Chi2MeasurementEstimator_cfi::Chi2MeasurementEstimator, Trajectory::direction(), Trajectory::foundHits(), mps_fire::i, TrajectoryStateOnSurface::localParameters(), Trajectory::measurements(), nhits, oppositeToMomentum, rpcPointValidation_cfi::recHit, and TrajectoryStateOnSurface::surface().

794  {
795  int lastFitted = 999;
796  int nhits = traj.foundHits();
797  if (nhits < lastFitted + 1)
798  lastFitted = nhits - 1;
799 
800  std::vector<TrajectoryMeasurement> measvec = traj.measurements();
802 
803  bool foundLast = false;
804  int actualLast = -99;
805  for (int i = lastFitted; i >= 0; i--) {
806  if (measvec[i].recHit()->isValid()) {
807  if (!foundLast) {
808  actualLast = i;
809  foundLast = true;
810  }
811  firstHits.push_back(measvec[i].recHit());
812  }
813  }
814  TSOS unscaledState = measvec[actualLast].updatedState();
815  AlgebraicSymMatrix55 C = ROOT::Math::SMatrixIdentity();
816  // C *= 100.;
817 
818  TSOS startingState(unscaledState.localParameters(),
820  unscaledState.surface(),
822 
823  // cout << endl << "FitTester starts with state " << startingState << endl;
824 
825  KFTrajectoryFitter backFitter(*thePropagator, KFUpdator(), Chi2MeasurementEstimator(100., 3));
826 
828 
829  // only direction matters in this contest
831 
832  vector<Trajectory> fitres = backFitter.fit(fakeSeed, firstHits, startingState);
833 
834  if (fitres.size() != 1) {
835  // cout << "FitTester: first hits fit failed!" << endl;
836  return std::pair<TrajectoryStateOnSurface, const GeomDet*>();
837  }
838 
839  TrajectoryMeasurement firstMeas = fitres[0].lastMeasurement();
840  const TSOS& firstState = firstMeas.updatedState();
841 
842  // cout << "FitTester: Fitted first state " << firstState << endl;
843  //cout << "FitTester: chi2 = " << fitres[0].chiSquared() << endl;
844 
845  TSOS initialState(
846  firstState.localParameters(), LocalTrajectoryError(C), firstState.surface(), thePropagator->magneticField());
847 
848  return std::pair<TrajectoryStateOnSurface, const GeomDet*>(initialState, firstMeas.recHit()->det());
849 }
int foundHits() const
Definition: Trajectory.h:206
const LocalTrajectoryParameters & localParameters() const
PropagationDirection
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
DataContainer const & measurements() const
Definition: Trajectory.h:178
const SurfaceType & surface() const
const MagneticField * magneticField() const override
std::vector< ConstRecHitPointer > ConstRecHitContainer
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
PropagatorWithMaterial * thePropagator
bool CRackTrajectoryBuilder::isDifferentStripReHit2D ( const SiStripRecHit2D hitA,
const SiStripRecHit2D hitB 
)
private

Definition at line 777 of file CRackTrajectoryBuilder.cc.

References TrackingRecHit::geographicalId(), BaseTrackerRecHit::localPosition(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

777  {
778  if (hitA.geographicalId() != hitB.geographicalId())
779  return true;
780  if (hitA.localPosition().x() != hitB.localPosition().x())
781  return true;
782  if (hitA.localPosition().y() != hitB.localPosition().y())
783  return true;
784  if (hitA.localPosition().z() != hitB.localPosition().z())
785  return true;
786 
787  // if (debug_info) cout << hitA.localPosition() << endl;
788  // if (debug_info) cout << hitB << endl;
789 
790  return false;
791 }
T y() const
Definition: PV3DBase.h:60
T z() const
Definition: PV3DBase.h:61
LocalPoint localPosition() const final
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:59
bool CRackTrajectoryBuilder::qualityFilter ( const Trajectory traj)
private

Definition at line 754 of file CRackTrajectoryBuilder.cc.

References Trajectory::foundHits(), hfClusterShapes_cfi::hits, and Trajectory::recHits().

754  {
755  int ngoodhits = 0;
756  if (geometry == "MTCC") {
757  auto hits = traj.recHits();
758  for (auto hit = hits.begin(); hit != hits.end(); hit++) {
759  unsigned int iid = (*hit)->hit()->geographicalId().rawId();
760  //CHECK FOR 3 hits r-phi
761  if (((iid >> 0) & 0x3) != 1)
762  ngoodhits++;
763  }
764  } else
765  ngoodhits = traj.foundHits();
766 
767  if (ngoodhits >= theMinHits) {
768  return true;
769  } else {
770  return false;
771  }
772 }
int foundHits() const
Definition: Trajectory.h:206
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
TransientTrackingRecHit::RecHitContainer hits
void CRackTrajectoryBuilder::run ( const TrajectorySeedCollection collseed,
const SiStripRecHit2DCollection collstereo,
const SiStripRecHit2DCollection collrphi,
const SiStripMatchedRecHit2DCollection collmatched,
const SiPixelRecHitCollection collpixel,
const edm::EventSetup es,
edm::Event e,
std::vector< Trajectory > &  trajoutput 
)

Runs the algorithm.

Definition at line 82 of file CRackTrajectoryBuilder.cc.

References alongMomentum, gather_cfg::cout, Trajectory::firstMeasurement(), Trajectory::foundHits(), hfClusterShapes_cfi::hits, init, iseed, Trajectory::recHits(), groupFilesInBlocks::reverse, Trajectory::seed(), PbPb_ZMuSkimMuonDPG_cff::tracker, and TrajectoryMeasurement::updatedState().

Referenced by cms::CosmicTrackFinder::produce().

89  {
90  std::vector<Trajectory> trajSmooth;
91  std::vector<Trajectory>::iterator trajIter;
92 
93  TrajectorySeedCollection::const_iterator iseed;
94  unsigned int IS = 0;
95  for (iseed = collseed.begin(); iseed != collseed.end(); iseed++) {
96  bool seedplus = ((*iseed).direction() == alongMomentum);
97  init(es, seedplus);
98  hits.clear();
99  trajFit.clear();
100  trajSmooth.clear();
101 
102  Trajectory startingTraj = createStartingTrajectory(*iseed);
103  Trajectory trajTmp; // used for the opposite direction
104  Trajectory traj = startingTraj;
105 
106  //first propagate track in opposite direction ...
107  seed_plus = !seed_plus;
108  vector<const TrackingRecHit*> allHitsOppsite = SortHits(collstereo, collrphi, collmatched, collpixel, *iseed, true);
109  seed_plus = !seed_plus;
110  if (!allHitsOppsite.empty()) {
111  //there are hits which are above the seed,
112  //cout << "Number of hits higher than seed " <<allHitsOppsite.size() << endl;
113 
114  AddHit(traj, allHitsOppsite, thePropagatorOp);
115 
116  if (debug_info) {
117  cout << "Hits in opposite direction..." << endl;
118  TransientTrackingRecHit::RecHitContainer::const_iterator iHit;
119  for (iHit = hits.begin(); iHit != hits.end(); iHit++) {
120  cout << (**iHit).globalPosition() << endl;
121  }
122  }
123 
124  // now add hist opposite to seed
125  //now crate new starting trajectory
126  reverse(hits.begin(), hits.end());
127  if (thePropagatorOp
128  ->propagate(traj.firstMeasurement().updatedState(),
129  tracker->idToDet((hits.front())->geographicalId())->surface())
130  .isValid()) {
131  TSOS startingStateNew = //TrajectoryStateWithArbitraryError()//
133  tracker->idToDet((hits.front())->geographicalId())->surface()));
134 
135  if (debug_info) {
136  cout << "Hits in opposite direction reversed..." << endl;
137  TransientTrackingRecHit::RecHitContainer::const_iterator iHit;
138  for (iHit = hits.begin(); iHit != hits.end(); iHit++) {
139  cout << (**iHit).globalPosition() << endl;
140  }
141  }
142 
143  const TrajectorySeed& tmpseed = traj.seed();
144  trajTmp = theFitter->fit(tmpseed, hits, startingStateNew).front();
145 
146  if (debug_info) {
147  cout << "Debugging show fitted hits" << endl;
148  auto hitsFit = trajTmp.recHits();
149  for (auto hit = hitsFit.begin(); hit != hitsFit.end(); hit++) {
150  cout << RHBuilder->build(&(*(*hit)->hit()))->globalPosition() << endl;
151  }
152  }
153  }
154  } else {
155  if (debug_info)
156  cout << "There are no hits in opposite direction ..." << endl;
157  }
158 
159  vector<const TrackingRecHit*> allHits;
160  if (trajTmp.foundHits()) {
161  traj = trajTmp;
162  allHits = SortHits(collstereo, collrphi, collmatched, collpixel, *iseed, false);
163  } else {
164  traj = startingTraj;
165  hits.clear();
166  allHits = SortHits(collstereo, collrphi, collmatched, collpixel, *iseed, true);
167  }
168 
169  AddHit(traj, allHits, thePropagator);
170 
171  if (debug_info) {
172  cout << "Debugging show All fitted hits" << endl;
173  auto hits = traj.recHits();
174  for (auto hit = hits.begin(); hit != hits.end(); hit++) {
175  cout << (*hit)->globalPosition() << endl;
176  }
177 
178  cout << qualityFilter(traj) << " <- quality filter good?" << endl;
179  }
180 
181  if (debug_info)
182  cout << "now do quality checks" << endl;
183  if (qualityFilter(traj)) {
184  const TrajectorySeed& tmpseed = traj.seed();
185  std::pair<TrajectoryStateOnSurface, const GeomDet*> initState =
186  innerState(traj); //theInitialState->innerState(traj);
187  if (initState.first.isValid())
188  trajFit = theFitter->fit(tmpseed, hits, initState.first);
189  }
190 
191  for (trajIter = trajFit.begin(); trajIter != trajFit.end(); trajIter++) {
192  trajSmooth = theSmoother->trajectories((*trajIter));
193  }
194  for (trajIter = trajSmooth.begin(); trajIter != trajSmooth.end(); trajIter++) {
195  if ((*trajIter).isValid()) {
196  if (debug_info)
197  cout << "adding track ... " << endl;
198  trajoutput.push_back((*trajIter));
199  }
200  }
201  delete theUpdator;
202  delete theEstimator;
203  delete thePropagator;
204  delete thePropagatorOp;
205  delete theFitter;
206  delete theSmoother;
207  //Only the first 30 seeds are considered
208  if (IS > 30)
209  return;
210  IS++;
211  }
212 }
int foundHits() const
Definition: Trajectory.h:206
Trajectory createStartingTrajectory(const TrajectorySeed &seed) const
TrajectorySeed const & seed() const
Access to the seed used to reconstruct the Trajectory.
Definition: Trajectory.h:263
Chi2MeasurementEstimator * theEstimator
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
const TransientTrackingRecHitBuilder * RHBuilder
TransientTrackingRecHit::RecHitContainer hits
virtual TrajectoryContainer trajectories(const Trajectory &traj) const
const KFTrajectorySmoother * theSmoother
std::pair< TrajectoryStateOnSurface, const GeomDet * > innerState(const Trajectory &traj) const
std::vector< Trajectory > trajFit
bool qualityFilter(const Trajectory &traj)
edm::ESHandle< TrackerGeometry > tracker
PropagatorWithMaterial * thePropagatorOp
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:166
int iseed
Definition: AMPTWrapper.h:134
void init(const edm::EventSetup &es, bool)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
PropagatorWithMaterial * thePropagator
const KFTrajectoryFitter * theFitter
const TrackerGeomDet * idToDet(DetId) const override
std::vector< const TrackingRecHit * > SortHits(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const SiPixelRecHitCollection &collpixel, const TrajectorySeed &seed, const bool bAddSeedHits)
TrajectoryStateOnSurface const & updatedState() const
void AddHit(Trajectory &traj, const std::vector< const TrackingRecHit * > &Hits, Propagator *currPropagator)
std::vector< TrajectoryMeasurement > CRackTrajectoryBuilder::seedMeasurements ( const TrajectorySeed seed) const
private

Definition at line 222 of file CRackTrajectoryBuilder.cc.

References rpcPointValidation_cfi::recHit, TrajectorySeed::recHits(), mps_fire::result, GeomDet::surface(), and TrackInfoProducer_cfi::updatedState.

222  {
223  std::vector<TrajectoryMeasurement> result;
224  TrajectorySeed::range hitRange = seed.recHits();
225  for (TrajectorySeed::const_iterator ihit = hitRange.first; ihit != hitRange.second; ihit++) {
226  //RC TransientTrackingRecHit* recHit = RHBuilder->build(&(*ihit));
228  const GeomDet* hitGeomDet = (&(*tracker))->idToDet(ihit->geographicalId());
229  TSOS invalidState(new BasicSingleTrajectoryState(hitGeomDet->surface()));
230 
231  if (ihit == hitRange.second - 1) {
233  result.emplace_back(invalidState, updatedState, recHit);
234 
235  } else {
236  result.emplace_back(invalidState, recHit);
237  }
238  }
239 
240  return result;
241 }
std::pair< const_iterator, const_iterator > range
const TransientTrackingRecHitBuilder * RHBuilder
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
recHitContainer::const_iterator const_iterator
TSOS startingTSOS(const TrajectorySeed &seed) const
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
range recHits() const
vector< const TrackingRecHit * > CRackTrajectoryBuilder::SortHits ( const SiStripRecHit2DCollection collstereo,
const SiStripRecHit2DCollection collrphi,
const SiStripMatchedRecHit2DCollection collmatched,
const SiPixelRecHitCollection collpixel,
const TrajectorySeed seed,
const bool  bAddSeedHits 
)
private

Definition at line 243 of file CRackTrajectoryBuilder.cc.

References gather_cfg::cout, edmNew::DetSetVector< T >::data(), spr::find(), TrackingRecHit::geographicalId(), TrajectoryStateOnSurface::globalPosition(), BaseTrackerRecHit::globalPosition(), hfClusterShapes_cfi::hits, TrajectoryStateOnSurface::isValid(), Trajectory::lastMeasurement(), TrajectoryStateOnSurface::localError(), LogDebug, visualization-live-secondInstance_cfg::m, LocalTrajectoryError::matrix(), SiStripMatchedRecHit2D::monoHit(), TrajectorySeed::nHits(), DetId::rawId(), TrajectorySeed::recHits(), alignCSCRings::s, SiStripMatchedRecHit2D::stereoHit(), PbPb_ZMuSkimMuonDPG_cff::tracker, TrajectoryMeasurement::updatedState(), PV3DBase< T, PVType, FrameType >::y(), multiplicitycorr_cfi::yMax, and photonAnalyzer_cfi::yMin.

248  {
249  //The Hits with global y more than the seed are discarded
250  //The Hits correspondign to the seed are discarded
251  //At the end all the hits are sorted in y
252  vector<const TrackingRecHit*> allHits;
253 
255  TrajectorySeed::range hRange = seed.recHits();
257  float yref = 0.;
258 
259  if (debug_info)
260  cout << "SEED " << startingTSOS(seed) << endl;
261  if (debug_info)
262  cout << "seed hits size " << seed.nHits() << endl;
263 
264  //seed debugging:
265  // GeomDet *seedDet = tracker->idToDet(seed.startingState().detId());
266 
267  // edm::LogInfo("CRackTrajectoryBuilder::SortHits") << "SEED " << seed.startingState();
268 
269  edm::LogInfo("CRackTrajectoryBuilder::SortHits") << "SEED " << startingTSOS(seed);
270  // edm::LogInfo("CRackTrajectoryBuilder::SortHits" << "seed hits size " << seed.nHits();
271 
272  // if (seed.nHits()<2)
273  // return allHits;
274 
275  float_t yMin = 0.;
276  float_t yMax = 0.;
277 
278  int seedHitSize = hRange.second - hRange.first;
279 
280  vector<int> detIDSeedMatched(seedHitSize);
281  vector<int> detIDSeedRphi(seedHitSize);
282  vector<int> detIDSeedStereo(seedHitSize);
283 
284  for (ihit = hRange.first; ihit != hRange.second; ihit++) {
285  // need to find track with lowest (seed_plus)/ highest y (seed_minus)
286  // split matched hits ...
287  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(&(*ihit));
288 
289  yref = RHBuilder->build(&(*ihit))->globalPosition().y();
290  if (ihit == hRange.first) {
291  yMin = yref;
292  yMax = yref;
293  }
294 
295  if (matchedhit) {
296  auto m = matchedhit->monoHit();
297  auto s = matchedhit->stereoHit();
298  float_t yGlobRPhi = RHBuilder->build(&m)->globalPosition().y();
299  float_t yGlobStereo = RHBuilder->build(&s)->globalPosition().y();
300 
301  if (debug_info)
302  cout << "Rphi ..." << yGlobRPhi << endl;
303  if (debug_info)
304  cout << "Stereo ..." << yGlobStereo << endl;
305 
306  if (yGlobStereo < yMin)
307  yMin = yGlobStereo;
308  if (yGlobRPhi < yMin)
309  yMin = yGlobRPhi;
310 
311  if (yGlobStereo > yMax)
312  yMax = yGlobStereo;
313  if (yGlobRPhi > yMax)
314  yMax = yGlobRPhi;
315 
316  detIDSeedMatched.push_back(matchedhit->geographicalId().rawId());
317  detIDSeedRphi.push_back(m.geographicalId().rawId());
318  detIDSeedStereo.push_back(s.geographicalId().rawId());
319 
320  if (bAddSeedHits) {
321  if (useMatchedHits) {
322  hits.push_back((RHBuilder->build(&(*ihit))));
323  } else {
324  if (((yGlobRPhi > yGlobStereo) && seed_plus) || ((yGlobRPhi < yGlobStereo) && !seed_plus)) {
325  hits.push_back((RHBuilder->build(&m)));
326  hits.push_back((RHBuilder->build(&s)));
327  } else {
328  hits.push_back((RHBuilder->build(&s)));
329  hits.push_back((RHBuilder->build(&m)));
330  }
331  }
332  }
333  } else if (bAddSeedHits) {
334  hits.push_back((RHBuilder->build(&(*ihit))));
335  detIDSeedRphi.push_back(ihit->geographicalId().rawId());
336  detIDSeedMatched.push_back(-1);
337  detIDSeedStereo.push_back(-1);
338  }
339 
340  if (yref < yMin)
341  yMin = yref;
342  if (yref > yMax)
343  yMax = yref;
344 
345  // if (bAddSeedHits)
346  // hits.push_back((RHBuilder->build(&(*ihit))));
347 
348  LogDebug("CosmicTrackFinder") << "SEED HITS" << RHBuilder->build(&(*ihit))->globalPosition();
349  if (debug_info)
350  cout << "SEED HITS" << RHBuilder->build(&(*ihit))->globalPosition() << endl;
351  // if (debug_info) cout <<"SEED HITS"<< seed.startingState().parameters() << endl;
352  }
353 
354  yref = (seed_plus) ? yMin : yMax;
355 
357  for (ipix = collpixel.data().begin(); ipix != collpixel.data().end(); ipix++) {
358  float ych = RHBuilder->build(&(*ipix))->globalPosition().y();
359  if ((seed_plus && (ych < yref)) || (!(seed_plus) && (ych > yref)))
360  allHits.push_back(&(*ipix));
361  }
362 
363  if (useMatchedHits) // use matched
364  {
365  //add the matched hits ...
367 
368  for (istripm = collmatched.data().begin(); istripm != collmatched.data().end(); istripm++) {
369  float ych = RHBuilder->build(&(*istripm))->globalPosition().y();
370 
371  int cDetId = istripm->geographicalId().rawId();
372  bool noSeedDet = (detIDSeedMatched.end() == find(detIDSeedMatched.begin(), detIDSeedMatched.end(), cDetId));
373 
374  if (noSeedDet)
375  if ((seed_plus && (ych < yref)) || (!(seed_plus) && (ych > yref)))
376  allHits.push_back(&(*istripm));
377  }
378 
379  //add the rpi hits, but only accept hits that are not matched hits
380  for (istrip = collrphi.data().begin(); istrip != collrphi.data().end(); istrip++) {
381  float ych = RHBuilder->build(&(*istrip))->globalPosition().y();
382  StripSubdetector monoDetId(istrip->geographicalId());
383  if (monoDetId.partnerDetId()) {
384  edm::LogInfo("CRackTrajectoryBuilder::SortHits") << "this det belongs to a glued det " << ych << endl;
385  continue;
386  }
387  int cDetId = istrip->geographicalId().rawId();
388  bool noSeedDet = (detIDSeedRphi.end() == find(detIDSeedRphi.begin(), detIDSeedRphi.end(), cDetId));
389  if (noSeedDet)
390  if ((seed_plus && (ych < yref)) || (!(seed_plus) && (ych > yref))) {
391  bool hitIsUnique = true;
392  //now
393  for (istripm = collmatched.data().begin(); istripm != collmatched.data().end(); istripm++) {
394  // if ( isDifferentStripReHit2D ( *istrip, (istripm->stereoHit() ) ) == false)
395  if (isDifferentStripReHit2D(*istrip, (istripm->monoHit())) == false) {
396  hitIsUnique = false;
397  edm::LogInfo("CRackTrajectoryBuilder::SortHits") << "rphi hit is in matched hits; y: " << ych << endl;
398  break;
399  }
400  } //end loop over all matched
401  if (hitIsUnique) {
402  // if (debug_info) cout << "adding rphi hit " << &(*istrip) << endl;
403  allHits.push_back(&(*istrip));
404  }
405  }
406  }
407 
408  } else // dont use matched ...
409  {
410  for (istrip = collrphi.data().begin(); istrip != collrphi.data().end(); istrip++) {
411  float ych = RHBuilder->build(&(*istrip))->globalPosition().y();
412  if ((seed_plus && (ych < yref)) || (!(seed_plus) && (ych > yref)))
413  allHits.push_back(&(*istrip));
414  }
415 
416  for (istrip = collstereo.data().begin(); istrip != collstereo.data().end(); istrip++) {
417  float ych = RHBuilder->build(&(*istrip))->globalPosition().y();
418  if ((seed_plus && (ych < yref)) || (!(seed_plus) && (ych > yref)))
419  allHits.push_back(&(*istrip));
420  }
421  }
422 
423  if (seed_plus)
424  stable_sort(allHits.begin(), allHits.end(), CompareHitY_plus(*tracker));
425  else
426  stable_sort(allHits.begin(), allHits.end(), CompareHitY(*tracker));
427 
428  if (debug_info) {
429  if (debug_info)
430  cout << "all hits" << endl;
431 
432  //starting trajectory
433  Trajectory startingTraj = createStartingTrajectory(seed);
434 
435  if (debug_info)
436  cout << "START " << startingTraj.lastMeasurement().updatedState() << endl;
437  if (debug_info)
438  cout << "START Err" << startingTraj.lastMeasurement().updatedState().localError().matrix() << endl;
439 
440  vector<const TrackingRecHit*>::iterator iHit;
441  for (iHit = allHits.begin(); iHit < allHits.end(); iHit++) {
442  GlobalPoint gphit = RHBuilder->build(*iHit)->globalPosition();
443  if (debug_info)
444  cout << "GH " << gphit << endl;
445 
446  // tracker->idToDet((*iHit)->geographicalId())->surface();
447 
448  TSOS prSt = thePropagator->propagate(startingTraj.lastMeasurement().updatedState(),
449  tracker->idToDet((*iHit)->geographicalId())->surface());
450 
451  if (prSt.isValid()) {
452  if (debug_info)
453  cout << "PR " << prSt.globalPosition() << endl;
454  //if (debug_info) cout << "PR Err" << prSt.localError().matrix() << endl;
455 
456  } else {
457  if (debug_info)
458  cout << "not valid" << endl;
459  }
460  }
461  if (debug_info)
462  cout << "all hits end" << endl;
463  }
464 
465  return allHits;
466 }
#define LogDebug(id)
std::pair< const_iterator, const_iterator > range
Trajectory createStartingTrajectory(const TrajectorySeed &seed) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
GlobalPoint globalPosition() const
const TransientTrackingRecHitBuilder * RHBuilder
TransientTrackingRecHit::RecHitContainer hits
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
recHitContainer::const_iterator const_iterator
edm::ESHandle< TrackerGeometry > tracker
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
data_type const * data(size_t cell) const
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
TSOS startingTSOS(const TrajectorySeed &seed) const
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
SiStripRecHit2D stereoHit() const
bool isDifferentStripReHit2D(const SiStripRecHit2D &hitA, const SiStripRecHit2D &hitB)
range recHits() const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
PropagatorWithMaterial * thePropagator
SiStripRecHit2D monoHit() const
unsigned int nHits() const
const TrackerGeomDet * idToDet(DetId) const override
TrajectoryStateOnSurface const & updatedState() const
DetId geographicalId() const
TrajectoryStateOnSurface CRackTrajectoryBuilder::startingTSOS ( const TrajectorySeed seed) const
private

Definition at line 468 of file CRackTrajectoryBuilder.cc.

References volumeBasedMagneticField_1103l_cfi::magfield, TrajectorySeed::startingState(), and trajectoryStateTransform::transientState().

468  {
469  PTrajectoryStateOnDet pState(seed.startingState());
470  const GeomDet* gdet = (&(*tracker))->idToDet(DetId(pState.detId()));
471  TSOS State = trajectoryStateTransform::transientState(pState, &(gdet->surface()), &(*magfield));
472  return State;
473 }
edm::ESHandle< MagneticField > magfield
Definition: DetId.h:17
PTrajectoryStateOnDet const & startingState() const
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
void CRackTrajectoryBuilder::updateTrajectory ( Trajectory traj,
const TM tm,
const TransientTrackingRecHit hit 
) const
private

Friends And Related Function Documentation

friend class CompareDetByTraj
friend

Definition at line 137 of file CRackTrajectoryBuilder.h.

Member Data Documentation

double CRackTrajectoryBuilder::chi2cut
private

Definition at line 239 of file CRackTrajectoryBuilder.h.

bool CRackTrajectoryBuilder::debug_info
private

Definition at line 234 of file CRackTrajectoryBuilder.h.

bool CRackTrajectoryBuilder::fastPropagation
private

Definition at line 235 of file CRackTrajectoryBuilder.h.

std::string CRackTrajectoryBuilder::geometry
private
TransientTrackingRecHit::RecHitContainer CRackTrajectoryBuilder::hits
private

Definition at line 242 of file CRackTrajectoryBuilder.h.

edm::ESHandle<MagneticField> CRackTrajectoryBuilder::magfield
private

Definition at line 218 of file CRackTrajectoryBuilder.h.

const TransientTrackingRecHitBuilder* CRackTrajectoryBuilder::RHBuilder
private

Definition at line 229 of file CRackTrajectoryBuilder.h.

bool CRackTrajectoryBuilder::seed_plus
private

Definition at line 243 of file CRackTrajectoryBuilder.h.

std::string CRackTrajectoryBuilder::theBuilderName
private

Definition at line 245 of file CRackTrajectoryBuilder.h.

Chi2MeasurementEstimator* CRackTrajectoryBuilder::theEstimator
private

Definition at line 228 of file CRackTrajectoryBuilder.h.

const KFTrajectoryFitter* CRackTrajectoryBuilder::theFitter
private

Definition at line 231 of file CRackTrajectoryBuilder.h.

int CRackTrajectoryBuilder::theMinHits
private

Definition at line 238 of file CRackTrajectoryBuilder.h.

PropagatorWithMaterial* CRackTrajectoryBuilder::thePropagator
private

Definition at line 221 of file CRackTrajectoryBuilder.h.

PropagatorWithMaterial* CRackTrajectoryBuilder::thePropagatorOp
private

Definition at line 222 of file CRackTrajectoryBuilder.h.

const KFTrajectorySmoother* CRackTrajectoryBuilder::theSmoother
private

Definition at line 230 of file CRackTrajectoryBuilder.h.

KFUpdator* CRackTrajectoryBuilder::theUpdator
private

Definition at line 227 of file CRackTrajectoryBuilder.h.

edm::ESHandle<TrackerGeometry> CRackTrajectoryBuilder::tracker
private

Definition at line 219 of file CRackTrajectoryBuilder.h.

std::vector<Trajectory> CRackTrajectoryBuilder::trajFit
private

Definition at line 240 of file CRackTrajectoryBuilder.h.

bool CRackTrajectoryBuilder::useMatchedHits
private

Definition at line 236 of file CRackTrajectoryBuilder.h.