1 #ifndef HitPixelLayersTrackSelection_h 2 #define HitPixelLayersTrackSelection_h 38 ptMin_(iConfig.getParameter<double>(
"ptMin")),
39 minRapidity_(iConfig.getParameter<double>(
"minRapidity")),
40 maxRapidity_(iConfig.getParameter<double>(
"maxRapidity")),
41 tip_(iConfig.getParameter<double>(
"tip")),
42 lip_(iConfig.getParameter<double>(
"lip")),
48 pdgId_(iConfig.getParameter<
std::vector<
int> >(
"pdgId"))
62 const collection & tpc = *(TPCH.
product());
69 if (
signalOnly_ && !(tpr->eventId().bunchCrossing()==0 && tpr->eventId().event()==0) )
continue;
76 unsigned int idSize =
pdgId_.size();
77 if (idSize==0) testId =
true;
78 else for (
unsigned int it=0;it!=idSize;++it){
79 if (tpr->pdgId()==
pdgId_[it]) testId =
true;
83 if ( tpr->numberOfTrackerLayers() >=
minHit_ &&
86 sqrt(tpr->vertex().perp2()) <=
tip_ &&
87 fabs(tpr->vertex().z()) <=
lip_ &&
100 std::vector<bool> hitpattern(5,
false);
109 if( (hitpattern[0] && hitpattern[1] && hitpattern[2]) ||
110 (hitpattern[0] && hitpattern[1] && hitpattern[3]) ||
111 (hitpattern[0] && hitpattern[3] && hitpattern[4]) )
124 const_iterator
end()
const
std::vector< TrackingParticle > TrackingParticleCollection
std::vector< bool > pixelHitPattern(const TrackingParticleRef &simTrack, const TrackerTopology *tTopo)
const_iterator end() const
Termination of iteration.
const_iterator begin() const
Initialize an iterator over the RefVector.
const_iterator end() const
TrackingParticleCollection collection
void select(const edm::Handle< collection > &TPCH, const edm::Event &iEvent, const edm::EventSetup &iSetup)
TrackingParticleRefVector container
std::vector< int > pdgId_
container::const_iterator const_iterator
T const * product() const
void clear()
Clear the vector.
bool goodHitPattern(const std::vector< bool > &hitpattern)
HitPixelLayersTPSelector(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
size_type size() const
Size of the RefVector.
T const * product() const
const_iterator begin() const