57 updator, propagatorAlong,propagatorOpposite,
58 estimator, RecHitBuilder, measurementTracker,filter),
59 theUpdator(updator),thePropagatorAlong(propagatorAlong),
60 thePropagatorOpposite(propagatorOpposite),theEstimator(estimator),
61 theTTRHBuilder(RecHitBuilder),theMeasurementTracker(measurementTracker),
63 theForwardPropagator(0), theBackwardPropagator(0)
80 cout<<
" HICTrajectoryBuilder::contructor "<<endl;
101 cout<<
" HICTrajectoryBuilder::trajectories start with seed"<<endl;
107 cout<<
" HICTrajectoryBuilder::trajectories starting trajectories created "<<endl;
109 if(startingTraj.
empty()) {
111 cout<<
" Problem with starting trajectory "<<endl;
121 cout<<
" HICTrajectoryBuilder::trajectories candidates found "<<result.size()<<endl;
131 cout<<
" HICTrajectoryBuilder::createStartingTrajectory "<<seed.
direction()<<endl;
140 std::cout<<
" Size of seed "<<seedMeas.size()<<endl;
142 if ( !seedMeas.empty()) {
144 std::cout<<
" TempTrajectory "<<std::endl;
146 for (std::vector<TM>::const_iterator
i=seedMeas.begin();
i!=seedMeas.end();
i++){
164 candidates.push_back( startingTraj);
167 cout<<
" HICTrajectoryBuilder::limitedCandidates "<<candidates.size()<<endl;
181 while ( !candidates.empty()) {
183 cout<<
" HICTrajectoryBuilder::limitedCandidates::cycle "<<candidates.size()<<endl;
187 for (TempTrajectoryContainer::iterator traj=candidates.begin();
188 traj!=candidates.end(); traj++) {
190 cout<<
" Before findCompatibleMeasurements "<<endl;
194 cout<<
" After findCompatibleMeasurements "<<meas.size()<<endl;
199 cout<<
": Measurements empty : "<<endl;
205 cout<<
" : Update trajectoris : "<<endl;
207 for( std::vector<TM>::const_iterator itm = meas.begin();
208 itm != meas.end(); itm++) {
214 newCand.push_back(newTraj);
216 cout<<
": toBeContinued : increase "<<newCand.size()<<
" maximal size "<<
theMaxCand<<endl;
221 cout<<
": good TM : to be stored :"<<endl;
230 cout<<
": bad TM : to be stored :"<<endl;
242 if(numtraj > 4)
break;
244 if(numtraj > 4)
break;
245 candidates.swap(newCand);
249 std::cout<<
" qualityFilter::Number of trajectories "<<numtraj<<std::endl;
260 std::vector<TrajectoryMeasurement>
263 std::vector<TrajectoryMeasurement>
result;
271 for(std::vector<TrajectoryMeasurement>::iterator imh = start.begin(); imh != start.end(); imh++)
274 cout<<
" HICTrajectoryBuilder::seedMeasurements::RecHit "<<endl;
276 result.push_back(*imh);
285 cout <<
"qualityFilter called for trajectory with "
286 << traj.
foundHits() <<
" found hits and Chi2 = "
297 for( Trajectory::DataContainer::const_iterator itm = tms.begin(); itm != tms.end(); itm++) {
302 cout<<
" Number of pixels "<<ipix<<endl;
305 if(ipix < 1)
return false;
328 cout<<
" Take recHits for reFit "<<endl;
338 for(Trajectory::ConstRecHitContainer::const_iterator it=recHitsForReFit.end()-1; it!=recHitsForReFit.begin()-1; it--){
340 if((*it)->isValid()) {
342 newRecHitsForReFit.push_back(*it);
352 cout<<
" Take firstTSOS "<<firstTSOS.
isValid()<<endl;
366 cout<<
" fit Trajectory "<<endl;
383 cout<<
" take inertsos "<<endl;
393 cout<<
" closest to Beam "<<endl;
406 cout<<
" check vertex constraints "<<endl;
410 if(v.
perp() > 0.1 )
return false;
422 result.push_back( traj);
430 std::cout<<
"HICTrajectoryBuilder::updateTrajectory::start"<<std::endl;
443 double chi2rz,chi2rf;
445 if ( hit->isValid()) {
452 double dfi2 = hit->globalPosition().phi() - lasthit->globalPosition().phi();
463 predictedState = tsos;
486 std::cout<<
" updateTrajectory::failed after update "<<accept<<std::endl;
505 int consecLostHit = 0;
510 if (itm->recHit()->isValid())
break;
527 std::vector<TrajectoryMeasurement>
537 vector<const DetLayer*> nl =
540 std::cout<<
" Number of layers "<<nl.size()<<std::endl;
543 if (nl.empty())
return result;
548 std::cout<<
"findCompatibleMeasurements Point 0 "<<seedLayerCode<<std::endl;
554 std::cout<<
"findCompatibleMeasurements Point 1 "<<currentLayerCode<<std::endl;
556 for (vector<const DetLayer*>::iterator il = nl.begin();
557 il != nl.end(); il++) {
560 getDetectorCode((*il));
562 std::cout<<
"findCompatibleMeasurements Point 2 "<<nextLayerCode<<std::endl;
567 if(
abs(seedLayerCode) > 100 &&
abs(seedLayerCode) < 108 )
575 if( nextLayerCode == 0 )
continue;
581 if( currentLayerCode == 101 && nextLayerCode < 100 ) {
585 std::cout<<
" findCompatibleMeasurements Point 3 "<<nextLayerCode<<std::endl;
596 std::cout<<
" findCompatibleMeasurements::current state : "<<
597 " charge "<< currentState.freeTrajectoryState()->parameters().charge()<<
598 " pt "<<currentState.freeTrajectoryState()->parameters().momentum().perp()<<
599 " pz "<<currentState.freeTrajectoryState()->parameters().momentum().z()<<
600 " r "<<currentState.freeTrajectoryState()->parameters().position().perp()<<
601 " phi "<<currentState.freeTrajectoryState()->parameters().position().phi()<<
602 " z "<<currentState.freeTrajectoryState()->parameters().position().z()<<
647 std::cout<<
" findCompatibleMeasurements Point 6 "<<theCut[0]<<
" "<<theCut[1]<<std::endl;
657 std::cout<<
" findCompatibleMeasurements Point 8 "<<theCut[0]<<
" "<<theCut[1]<<
" Size of candidates "<<tmp0.size()<<std::endl;
660 for( vector<TM>::iterator itm = tmp0.begin(); itm != tmp0.end(); itm++ )
669 if(!(*hit).isValid()) {
671 cout<<
" findCompatibleMeasurements::hit is not valid "<<endl;
678 <<
" Number of TM "<< numtmp<<
679 " valid updated state "<< updateState.
isValid()<<
" Predicted state is valid "
693 std::cout<<
" findCompatibleMeasurements::start corrector "<<std::endl;
697 std::cout<<
" findCompatibleMeasurements::corrector::initialized "<<std::endl;
703 std::cout<<
" findCompatibleMeasurements::end corrector "<<std::endl;
708 std::cout<<
" Accept the corrected state "<<numtmp<<
" Hit Valid "<<(*hit).isValid()<<std::endl;
710 predictedState = predictedState0;
715 std::cout<<
" findCompatibleMeasurements::end corrector::hit valid "<<std::endl;
722 std::cout<<
" findCompatibleMeasurements::failed after the first step "<<numtmp<<std::endl;
728 std::cout<<
" findCompatibleMeasurements::estimate at the first step is ok "<<numtmp<<std::endl;
731 tmp.push_back(
TM(predictedState, updateState, hit, tm.
estimate(), tm.
layer()));
733 std::cout<<
" findCompatibleMeasurements::fill estimate "<<numtmp<<std::endl;
743 std::cout<<
" findCompatibleMeasurements::Add TM to collection::Predicted state is valid "<<predictedState.
isValid()<<
" Hit is valid "<<(*hit).isValid()<<std::endl;
745 if( predictedState.
isValid() && (*hit).isValid() ) tmp.push_back(*itm);
751 std::cout<<
" findCompatibleMeasurements::point 9 "<<std::endl;
754 if ( result.empty() ) result = tmp;
757 result.insert( result.end(), tmp.begin(), tmp.end());
764 if ( result.size() > 1) {
768 std::cout<<
" findCompatibleMeasurements::point 10 "<<std::endl;
PropagationDirection direction() const
math::Error< dimension >::type CovarianceMatrix
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
const_iterator rend() const
edm::ESHandle< Propagator > thePropagatorTrack
bool qualityFilter(const TempTrajectory &traj) const
static bool lost(const TransientTrackingRecHit &hit)
bool empty() const
True if trajectory has no measurements.
virtual Location location() const =0
Which part of the detector (barrel, endcap)
const GlobalTrajectoryParameters & parameters() const
const MeasurementTracker * theMeasurementTracker
FreeTrajectoryState * freeTrajectoryState(bool withErrors=true) const
const CurvilinearTrajectoryError & curvilinearError() const
std::vector< TempTrajectory > TempTrajectoryContainer
const DataContainer & measurements() const
virtual std::vector< const DetLayer * > nextLayers(NavigationDirection direction) const
Geom::Phi< T > phi() const
GlobalPoint globalPosition() const
bool toBeContinued(const TempTrajectory &traj) const
ConstRecHitPointer recHit() const
math::XYZPoint Point
point in the space
virtual void chooseCuts(int &i)
int foundHits() const
obsolete name, use measurements() instead.
bool theAlwaysUseInvalidHits
TrackCharge charge() const
virtual std::vector< double > setCuts(Trajectory &traj, const DetLayer *theCurrentLayer)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
const MagneticField * magneticField() const
const Chi2MeasurementEstimatorBase * theEstimator
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
ConstRecHitContainer recHits(bool splitting=false) const
const TrajectoryMeasurement & lastMeasurement() const
PropagationDirection const & direction() const
edm::ESHandle< GlobalTrackingGeometry > globTkGeomHandle
PropagationDirection direction() const
DataContainer const & measurements() const
virtual TrajectoryContainer trajectories(const TrajectorySeed &seed) const
trajectories building starting from a seed
std::vector< TrajectoryMeasurement > findCompatibleMeasurements(const TempTrajectory &traj) const
std::vector< TrajectoryMeasurement > DataContainer
FreeTrajectoryState * freeState(bool withErrors=true) const
Trajectory toTrajectory() const
Convert to a standard Trajectory.
const MagneticField * getField()
std::vector< Trajectory > TrajectoryContainer
TrajectoryMeasurement const & lastMeasurement() const
const LayerMeasurements * theLayerMeasurements
GlobalVector momentum() const
bool theIntermediateCleaning
const DetLayer * layer() const
TrajectoryStateOnSurface updatedState() const
TrajectoryStateOnSurface predictedState() const
virtual void setSign(int &i)
HICTrajectoryBuilder(const edm::ParameterSet &conf, const edm::EventSetup &es, const TrajectoryStateUpdator *updator, const Propagator *propagatorAlong, const Propagator *propagatorOpposite, const Chi2MeasurementEstimatorBase *estimator, const TransientTrackingRecHitBuilder *RecHitBuilder, const MeasurementTracker *measurementTracker, const TrajectoryFilter *filter)
cms::HICConst * theHICConst
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
const Propagator * theForwardPropagator
GlobalVector momentum() const
double chiSquared() const
Value of the raw Chi2 of the trajectory, not normalised to the N.D.F.
FTS const & trackStateAtPCA() const
GlobalPoint position() const
void limitedCandidates(TempTrajectory &startingTraj, TrajectoryContainer &result) const
GlobalPoint position() const
TrajectoryMeasurement const & firstMeasurement() const
tuple filter
USE THIS FOR SKIMMED TRACKS process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter2) OTHERWISE USE THIS.
XYZPointD XYZPoint
point in space with cartesian internal representation
int theMinimumNumberOfHits
void addToResult(TempTrajectory &traj, TrajectoryContainer &result) const
TrajectoryStateOnSurface correct(FreeTrajectoryState &rh, FreeTrajectoryState &ftsnew, const GeomDet *plane) const
std::vector< TrajectoryMeasurement > seedMeasurements(const TrajectorySeed &seed) const
virtual void setEvent(const edm::Event &event) const
set Event for the internal MeasurementTracker data member
std::vector< std::vector< double > > tmp
GlobalVector globalMomentum() const
bool updateTrajectory(TempTrajectory &traj, const TM &tm) const
const Surface & surface() const
const Propagator * theBackwardPropagator
edm::ESHandle< TrajectorySmoother > theSmootherTrack
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
edm::ESHandle< TrajectoryFitter > theFitterTrack
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
cms::HICConst * getHICConst()
TrajectoryStateOnSurface update(const Trajectory &mt, const TrajectoryStateOnSurface &, const TrajectoryMeasurement &, const DetLayer *, double &, double &) const
TrackCharge charge() const
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
std::vector< TrajectoryMeasurement > measurements() const
void push(const TrajectoryMeasurement &tm)