1 #ifndef HitPixelLayersTrackSelection_h
2 #define HitPixelLayersTrackSelection_h
27 typedef std::vector<const TrackingParticle*>
container;
35 ptMin_(iConfig.getParameter<double>(
"ptMin")),
36 minRapidity_(iConfig.getParameter<double>(
"minRapidity")),
37 maxRapidity_(iConfig.getParameter<double>(
"maxRapidity")),
38 tip_(iConfig.getParameter<double>(
"tip")),
39 lip_(iConfig.getParameter<double>(
"lip")),
40 minHit_(iConfig.getParameter<int>(
"minHit")),
41 signalOnly_(iConfig.getParameter<bool>(
"signalOnly")),
45 pdgId_(iConfig.getParameter< std::vector<int> >(
"pdgId"))
66 if (
signalOnly_ && !(tpr->eventId().bunchCrossing()==0 && tpr->eventId().event()==0) )
continue;
73 unsigned int idSize =
pdgId_.size();
74 if (idSize==0) testId =
true;
75 else for (
unsigned int it=0;it!=idSize;++it){
76 if (tpr->pdgId()==
pdgId_[it]) testId =
true;
80 if ( tpr->numberOfTrackerLayers() >=
minHit_ &&
83 sqrt(tpr->vertex().perp2()) <=
tip_ &&
84 fabs(tpr->vertex().z()) <=
lip_ &&
98 std::vector<bool> hitpattern(5,
false);
100 #warning "This file has been modified just to get it to compile without any regard as to whether it still functions as intended"
101 #ifdef REMOVED_JUST_TO_GET_IT_TO_COMPILE__THIS_CODE_NEEDS_TO_BE_CHECKED
102 for(std::vector<PSimHit>::const_iterator simHit = simTrack->pSimHit_begin();simHit!= simTrack->pSimHit_end();simHit++){
105 uint32_t
detid =
id.det();
106 uint32_t subdet =
id.subdetId();
110 hitpattern[tTopo->
pxbLayer(
id)-1]=
true;
112 hitpattern[tTopo->
pxfDisk(
id)+2]=
true;
124 if( (hitpattern[0] && hitpattern[1] && hitpattern[2]) ||
125 (hitpattern[0] && hitpattern[1] && hitpattern[3]) ||
126 (hitpattern[0] && hitpattern[3] && hitpattern[4]) )
std::vector< TrackingParticle > TrackingParticleCollection
unsigned int pxfDisk(const DetId &id) const
std::vector< bool > pixelHitPattern(const TrackingParticleRef &simTrack, const TrackerTopology *tTopo)
std::vector< const TrackingParticle * > container
HitPixelLayersTPSelector(const edm::ParameterSet &iConfig)
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_
unsigned int pxbLayer(const DetId &id) const
container::const_iterator const_iterator
T const * product() const
T const * product() const
bool goodHitPattern(const std::vector< bool > &hitpattern)
Monte Carlo truth information used for tracking validation.
const_iterator begin() const