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

◆ PairTrackingRecHitTsos

Definition at line 134 of file CRackTrajectoryBuilder.h.

◆ TM

Definition at line 126 of file CRackTrajectoryBuilder.h.

◆ TrackingRecHitIterator

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

Definition at line 128 of file CRackTrajectoryBuilder.h.

◆ TrackingRecHitRange

Definition at line 130 of file CRackTrajectoryBuilder.h.

◆ TrackingRecHitRangeIterator

Definition at line 131 of file CRackTrajectoryBuilder.h.

◆ TSOS

Definition at line 125 of file CRackTrajectoryBuilder.h.

Constructor & Destructor Documentation

◆ CRackTrajectoryBuilder()

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

Definition at line 30 of file CRackTrajectoryBuilder.cc.

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 }

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

◆ ~CRackTrajectoryBuilder()

CRackTrajectoryBuilder::~CRackTrajectoryBuilder ( )

Definition at line 46 of file CRackTrajectoryBuilder.cc.

46  {
47  // delete theInitialState;
48 }

Member Function Documentation

◆ AddHit()

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.

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 }

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().

◆ createStartingTrajectory()

Trajectory CRackTrajectoryBuilder::createStartingTrajectory ( const TrajectorySeed seed) const

Definition at line 214 of file CRackTrajectoryBuilder.cc.

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 }

References mps_fire::i, eostools::move(), mps_fire::result, and SurveyInfoScenario_cff::seed.

◆ hitBuilder()

const TransientTrackingRecHitBuilder* CRackTrajectoryBuilder::hitBuilder ( ) const
inline

Definition at line 192 of file CRackTrajectoryBuilder.h.

192 { return RHBuilder; }

References RHBuilder.

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

◆ init()

void CRackTrajectoryBuilder::init ( const edm::EventSetup es,
bool  seedplus 
)

Definition at line 50 of file CRackTrajectoryBuilder.cc.

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 }

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

◆ innerState()

std::pair< TrajectoryStateOnSurface, const GeomDet * > CRackTrajectoryBuilder::innerState ( const Trajectory traj) const
private

Definition at line 794 of file CRackTrajectoryBuilder.cc.

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 }

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

◆ isDifferentStripReHit2D()

bool CRackTrajectoryBuilder::isDifferentStripReHit2D ( const SiStripRecHit2D hitA,
const SiStripRecHit2D hitB 
)
private

Definition at line 777 of file CRackTrajectoryBuilder.cc.

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 }

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

◆ qualityFilter()

bool CRackTrajectoryBuilder::qualityFilter ( const Trajectory traj)
private

Definition at line 754 of file CRackTrajectoryBuilder.cc.

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 }

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

◆ run()

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.

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 }

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().

◆ seedMeasurements()

std::vector< TrajectoryMeasurement > CRackTrajectoryBuilder::seedMeasurements ( const TrajectorySeed seed) const
private

Definition at line 222 of file CRackTrajectoryBuilder.cc.

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 }

References rpcPointValidation_cfi::recHit, mps_fire::result, SurveyInfoScenario_cff::seed, GeomDet::surface(), and TrackInfoProducer_cfi::updatedState.

◆ SortHits()

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.

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 }

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(), DetId::rawId(), alignCSCRings::s, SurveyInfoScenario_cff::seed, SiStripMatchedRecHit2D::stereoHit(), PbPb_ZMuSkimMuonDPG_cff::tracker, TrajectoryMeasurement::updatedState(), PV3DBase< T, PVType, FrameType >::y(), multiplicitycorr_cfi::yMax, and photonAnalyzer_cfi::yMin.

◆ startingTSOS()

TrajectoryStateOnSurface CRackTrajectoryBuilder::startingTSOS ( const TrajectorySeed seed) const
private

Definition at line 468 of file CRackTrajectoryBuilder.cc.

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 }

References volumeBasedMagneticField_160812_cfi::magfield, SurveyInfoScenario_cff::seed, and trajectoryStateTransform::transientState().

◆ updateTrajectory()

void CRackTrajectoryBuilder::updateTrajectory ( Trajectory traj,
const TM tm,
const TransientTrackingRecHit hit 
) const
private

Friends And Related Function Documentation

◆ CompareDetByTraj

friend class CompareDetByTraj
friend

Definition at line 137 of file CRackTrajectoryBuilder.h.

Member Data Documentation

◆ chi2cut

double CRackTrajectoryBuilder::chi2cut
private

Definition at line 239 of file CRackTrajectoryBuilder.h.

◆ debug_info

bool CRackTrajectoryBuilder::debug_info
private

Definition at line 234 of file CRackTrajectoryBuilder.h.

◆ fastPropagation

bool CRackTrajectoryBuilder::fastPropagation
private

Definition at line 235 of file CRackTrajectoryBuilder.h.

◆ geometry

std::string CRackTrajectoryBuilder::geometry
private

Definition at line 244 of file CRackTrajectoryBuilder.h.

◆ hits

TransientTrackingRecHit::RecHitContainer CRackTrajectoryBuilder::hits
private

Definition at line 242 of file CRackTrajectoryBuilder.h.

◆ magfield

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

Definition at line 218 of file CRackTrajectoryBuilder.h.

◆ RHBuilder

const TransientTrackingRecHitBuilder* CRackTrajectoryBuilder::RHBuilder
private

Definition at line 229 of file CRackTrajectoryBuilder.h.

Referenced by hitBuilder().

◆ seed_plus

bool CRackTrajectoryBuilder::seed_plus
private

Definition at line 243 of file CRackTrajectoryBuilder.h.

◆ theBuilderName

std::string CRackTrajectoryBuilder::theBuilderName
private

Definition at line 245 of file CRackTrajectoryBuilder.h.

◆ theEstimator

Chi2MeasurementEstimator* CRackTrajectoryBuilder::theEstimator
private

Definition at line 228 of file CRackTrajectoryBuilder.h.

◆ theFitter

const KFTrajectoryFitter* CRackTrajectoryBuilder::theFitter
private

Definition at line 231 of file CRackTrajectoryBuilder.h.

◆ theMinHits

int CRackTrajectoryBuilder::theMinHits
private

Definition at line 238 of file CRackTrajectoryBuilder.h.

◆ thePropagator

PropagatorWithMaterial* CRackTrajectoryBuilder::thePropagator
private

Definition at line 221 of file CRackTrajectoryBuilder.h.

◆ thePropagatorOp

PropagatorWithMaterial* CRackTrajectoryBuilder::thePropagatorOp
private

Definition at line 222 of file CRackTrajectoryBuilder.h.

◆ theSmoother

const KFTrajectorySmoother* CRackTrajectoryBuilder::theSmoother
private

Definition at line 230 of file CRackTrajectoryBuilder.h.

◆ theUpdator

KFUpdator* CRackTrajectoryBuilder::theUpdator
private

Definition at line 227 of file CRackTrajectoryBuilder.h.

◆ tracker

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

Definition at line 219 of file CRackTrajectoryBuilder.h.

◆ trajFit

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

Definition at line 240 of file CRackTrajectoryBuilder.h.

◆ useMatchedHits

bool CRackTrajectoryBuilder::useMatchedHits
private

Definition at line 236 of file CRackTrajectoryBuilder.h.

TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
CRackTrajectoryBuilder::seed_plus
bool seed_plus
Definition: CRackTrajectoryBuilder.h:243
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CRackTrajectoryBuilder::tracker
edm::ESHandle< TrackerGeometry > tracker
Definition: CRackTrajectoryBuilder.h:219
KFUpdator::update
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
Definition: KFUpdator.cc:177
mps_fire.i
i
Definition: mps_fire.py:355
GeomDet
Definition: GeomDet.h:27
CRackTrajectoryBuilder::debug_info
bool debug_info
Definition: CRackTrajectoryBuilder.h:234
hcaldqm::flag::State
State
Definition: Flag.h:13
PropagatorWithMaterial::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
PropagatorWithMaterial::magneticField
const MagneticField * magneticField() const override
Definition: PropagatorWithMaterial.h:84
Trajectory::chiSquared
float chiSquared() const
Definition: Trajectory.h:241
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
Trajectory::direction
PropagationDirection const & direction() const
Definition: Trajectory.cc:133
TrajectorySeed::range
std::pair< const_iterator, const_iterator > range
Definition: TrajectorySeed.h:21
CRackTrajectoryBuilder::isDifferentStripReHit2D
bool isDifferentStripReHit2D(const SiStripRecHit2D &hitA, const SiStripRecHit2D &hitB)
Definition: CRackTrajectoryBuilder.cc:777
CRackTrajectoryBuilder::createStartingTrajectory
Trajectory createStartingTrajectory(const TrajectorySeed &seed) const
Definition: CRackTrajectoryBuilder.cc:214
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
gather_cfg.cout
cout
Definition: gather_cfg.py:144
geometry
Definition: geometry.py:1
StripSubdetector
Definition: StripSubdetector.h:12
edm::LogInfo
Definition: MessageLogger.h:254
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
CRackTrajectoryBuilder::startingTSOS
TSOS startingTSOS(const TrajectorySeed &seed) const
Definition: CRackTrajectoryBuilder.cc:468
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:231
oppositeToMomentum
Definition: PropagationDirection.h:4
TrajectorySeed::const_iterator
recHitContainer::const_iterator const_iterator
Definition: TrajectorySeed.h:20
CRackTrajectoryBuilder::thePropagator
PropagatorWithMaterial * thePropagator
Definition: CRackTrajectoryBuilder.h:221
TrajectoryMeasurement::updatedState
TrajectoryStateOnSurface const & updatedState() const
Definition: TrajectoryMeasurement.h:184
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
photonAnalyzer_cfi.yMin
yMin
Definition: photonAnalyzer_cfi.py:86
LocalTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: LocalTrajectoryError.h:60
TrackingRecHit::RecHitPointer
std::shared_ptr< TrackingRecHit const > RecHitPointer
Definition: TrackingRecHit.h:24
Trajectory::foundHits
int foundHits() const
Definition: Trajectory.h:206
TransientTrackingRecHitBuilder::build
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
CompareHitY_plus
Definition: CosmicTrajectoryBuilder.h:58
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
CRackTrajectoryBuilder::seedMeasurements
std::vector< TrajectoryMeasurement > seedMeasurements(const TrajectorySeed &seed) const
Definition: CRackTrajectoryBuilder.cc:222
CRackTrajectoryBuilder::useMatchedHits
bool useMatchedHits
Definition: CRackTrajectoryBuilder.h:236
CRackTrajectoryBuilder::init
void init(const edm::EventSetup &es, bool)
Definition: CRackTrajectoryBuilder.cc:50
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
groupFilesInBlocks.reverse
reverse
Definition: groupFilesInBlocks.py:131
TrajectorySmoother::trajectories
virtual TrajectoryContainer trajectories(const Trajectory &traj) const
Definition: TrajectorySmoother.h:18
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
CRackTrajectoryBuilder::TM
TrajectoryMeasurement TM
Definition: CRackTrajectoryBuilder.h:126
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
CRackTrajectoryBuilder::theFitter
const KFTrajectoryFitter * theFitter
Definition: CRackTrajectoryBuilder.h:231
DetId
Definition: DetId.h:17
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
alignCSCRings.s
s
Definition: alignCSCRings.py:92
PropagatorWithMaterial
Definition: PropagatorWithMaterial.h:25
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
CRackTrajectoryBuilder::fastPropagation
bool fastPropagation
Definition: CRackTrajectoryBuilder.h:235
Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator
Chi2MeasurementEstimator
Definition: Chi2MeasurementEstimator_cfi.py:5
edm::ESHandle< TransientTrackingRecHitBuilder >
SiStripMatchedRecHit2D::stereoHit
SiStripRecHit2D stereoHit() const
Definition: SiStripMatchedRecHit2D.h:25
CRackTrajectoryBuilder::chi2cut
double chi2cut
Definition: CRackTrajectoryBuilder.h:239
CRackTrajectoryBuilder::AddHit
void AddHit(Trajectory &traj, const std::vector< const TrackingRecHit * > &Hits, Propagator *currPropagator)
Definition: CRackTrajectoryBuilder.cc:475
Point3DBase< float, GlobalTag >
multiplicitycorr_cfi.yMax
yMax
Definition: multiplicitycorr_cfi.py:6
nhits
Definition: HIMultiTrackSelector.h:42
BasicSingleTrajectoryState
Definition: BasicSingleTrajectoryState.h:10
CRackTrajectoryBuilder::SortHits
std::vector< const TrackingRecHit * > SortHits(const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const SiPixelRecHitCollection &collpixel, const TrajectorySeed &seed, const bool bAddSeedHits)
Definition: CRackTrajectoryBuilder.cc:243
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition: MessageLogger.h:141
TrajectoryStateOnSurface::localParameters
const LocalTrajectoryParameters & localParameters() const
Definition: TrajectoryStateOnSurface.h:73
LocalTrajectoryError
Definition: LocalTrajectoryError.h:20
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
iseed
int iseed
Definition: AMPTWrapper.h:134
CRackTrajectoryBuilder::theUpdator
KFUpdator * theUpdator
Definition: CRackTrajectoryBuilder.h:227
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
Trajectory::lastMeasurement
TrajectoryMeasurement const & lastMeasurement() const
Definition: Trajectory.h:150
CRackTrajectoryBuilder::RHBuilder
const TransientTrackingRecHitBuilder * RHBuilder
Definition: CRackTrajectoryBuilder.h:229
BaseTrackerRecHit::localPosition
LocalPoint localPosition() const final
Definition: BaseTrackerRecHit.h:54
State
State
Definition: RPixErrorChecker.h:15
SiStripMatchedRecHit2D::monoHit
SiStripRecHit2D monoHit() const
Definition: SiStripMatchedRecHit2D.h:26
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
trajectoryStateTransform::transientState
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
Definition: TrajectoryStateTransform.cc:35
CRackTrajectoryBuilder::CompareDetByTraj
friend class CompareDetByTraj
Definition: CRackTrajectoryBuilder.h:137
CRackTrajectoryBuilder::TrackingRecHitRangeIterator
std::vector< TrackingRecHitRange >::iterator TrackingRecHitRangeIterator
Definition: CRackTrajectoryBuilder.h:131
Propagator::propagate
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
get
#define get
Trajectory::push
void push(const TrajectoryMeasurement &tm)
Definition: Trajectory.cc:50
CRackTrajectoryBuilder::magfield
edm::ESHandle< MagneticField > magfield
Definition: CRackTrajectoryBuilder.h:218
Trajectory::measurements
DataContainer const & measurements() const
Definition: Trajectory.h:178
CRackTrajectoryBuilder::innerState
std::pair< TrajectoryStateOnSurface, const GeomDet * > innerState(const Trajectory &traj) const
Definition: CRackTrajectoryBuilder.cc:794
TrackingRecHit
Definition: TrackingRecHit.h:21
TrajectoryMeasurement::recHit
ConstRecHitPointer const & recHit() const
Definition: TrajectoryMeasurement.h:190
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CRackTrajectoryBuilder::theSmoother
const KFTrajectorySmoother * theSmoother
Definition: CRackTrajectoryBuilder.h:230
Trajectory::recHits
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
eostools.move
def move(src, dest)
Definition: eostools.py:511
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
Trajectory::firstMeasurement
TrajectoryMeasurement const & firstMeasurement() const
Definition: Trajectory.h:166
CRackTrajectoryBuilder::qualityFilter
bool qualityFilter(const Trajectory &traj)
Definition: CRackTrajectoryBuilder.cc:754
edmNew::DetSetVector::data
data_type const * data(size_t cell) const
Definition: DetSetVectorNew.h:602
CRackTrajectoryBuilder::theEstimator
Chi2MeasurementEstimator * theEstimator
Definition: CRackTrajectoryBuilder.h:228
gen::C
C
Definition: PomwigHadronizer.cc:76
SiStripMatchedRecHit2D
Definition: SiStripMatchedRecHit2D.h:8
TrackInfoProducer_cfi.updatedState
updatedState
Definition: TrackInfoProducer_cfi.py:6
Trajectory
Definition: Trajectory.h:38
KFTrajectorySmoother
Definition: KFTrajectorySmoother.h:20
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
CRackTrajectoryBuilder::theMinHits
int theMinHits
Definition: CRackTrajectoryBuilder.h:238
CRackTrajectoryBuilder::theBuilderName
std::string theBuilderName
Definition: CRackTrajectoryBuilder.h:245
Trajectory::seed
TrajectorySeed const & seed() const
Access to the seed used to reconstruct the Trajectory.
Definition: Trajectory.h:263
TrajectorySeed
Definition: TrajectorySeed.h:17
CRackTrajectoryBuilder::trajFit
std::vector< Trajectory > trajFit
Definition: CRackTrajectoryBuilder.h:240
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition: TrajectoryStateOnSurface.h:78
mps_fire.result
result
Definition: mps_fire.py:303
CompareHitY
Definition: CosmicTrajectoryBuilder.h:44
PTrajectoryStateOnDet
Definition: PTrajectoryStateOnDet.h:10
TrajectoryStateOnSurface::localError
const LocalTrajectoryError & localError() const
Definition: TrajectoryStateOnSurface.h:77
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
TrajectoryMeasurement
Definition: TrajectoryMeasurement.h:25
CRackTrajectoryBuilder::hits
TransientTrackingRecHit::RecHitContainer hits
Definition: CRackTrajectoryBuilder.h:242
alongMomentum
Definition: PropagationDirection.h:4
KFUpdator
Definition: KFUpdator.h:32
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
SurveyInfoScenario_cff.seed
seed
Definition: SurveyInfoScenario_cff.py:295
hit
Definition: SiStripHitEffFromCalibTree.cc:88
CRackTrajectoryBuilder::TrackingRecHitIterator
std::vector< const TrackingRecHit * >::iterator TrackingRecHitIterator
Definition: CRackTrajectoryBuilder.h:128
edm::OwnVector< TrackingRecHit >
CRackTrajectoryBuilder::thePropagatorOp
PropagatorWithMaterial * thePropagatorOp
Definition: CRackTrajectoryBuilder.h:222