1 #ifndef HitPixelLayersTrackSelection_h
2 #define HitPixelLayersTrackSelection_h
28 typedef std::vector<const TrackingParticle*>
container;
36 ptMin_(iConfig.getParameter<double>(
"ptMin")),
37 minRapidity_(iConfig.getParameter<double>(
"minRapidity")),
38 maxRapidity_(iConfig.getParameter<double>(
"maxRapidity")),
39 tip_(iConfig.getParameter<double>(
"tip")),
40 lip_(iConfig.getParameter<double>(
"lip")),
41 minHit_(iConfig.getParameter<int>(
"minHit")),
42 signalOnly_(iConfig.getParameter<bool>(
"signalOnly")),
46 pdgId_(iConfig.getParameter< std::vector<int> >(
"pdgId"))
67 if (
signalOnly_ && !(tpr->eventId().bunchCrossing()==0 && tpr->eventId().event()==0) )
continue;
74 unsigned int idSize =
pdgId_.size();
75 if (idSize==0) testId =
true;
76 else for (
unsigned int it=0;it!=idSize;++it){
77 if (tpr->pdgId()==
pdgId_[it]) testId =
true;
81 if ( tpr->numberOfTrackerLayers() >=
minHit_ &&
84 sqrt(tpr->vertex().perp2()) <=
tip_ &&
85 fabs(tpr->vertex().z()) <=
lip_ &&
99 std::vector<bool> hitpattern(5,
false);
108 if( (hitpattern[0] && hitpattern[1] && hitpattern[2]) ||
109 (hitpattern[0] && hitpattern[1] && hitpattern[3]) ||
110 (hitpattern[0] && hitpattern[3] && hitpattern[4]) )
std::vector< TrackingParticle > TrackingParticleCollection
std::vector< bool > pixelHitPattern(const TrackingParticleRef &simTrack, const TrackerTopology *tTopo)
std::vector< const TrackingParticle * > container
const_iterator end() const
TrackingParticleCollection collection
void select(const edm::Handle< collection > &TPCH, const edm::Event &iEvent, const edm::EventSetup &iSetup)
std::vector< int > pdgId_
container::const_iterator const_iterator
T const * product() const
T const * product() const
bool goodHitPattern(const std::vector< bool > &hitpattern)
HitPixelLayersTPSelector(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
Monte Carlo truth information used for tracking validation.
const_iterator begin() const