1 #ifndef RecoSelectors_CosmicTrackingParticleSelector_h
2 #define RecoSelectors_CosmicTrackingParticleSelector_h
39 typedef std::vector<const TrackingParticle *>
container;
45 double tip,
double lip,
int minHit,
bool chargedOnly,
46 std::vector<int>
pdgId = std::vector<int>()) :
52 ptMin_(cfg.getParameter<double>(
"ptMin")),
55 tip_(cfg.getParameter<double>(
"tip")),
56 lip_(cfg.getParameter<double>(
"lip")),
57 minHit_(cfg.getParameter<int>(
"minHit")),
59 pdgId_(cfg.getParameter<std::vector<int> >(
"pdgId")) { }
66 for( TrackingParticleCollection::const_iterator itp = c->begin();
67 itp != c->end(); ++ itp )
108 std::pair<TrackingParticleRef, TrackPSimHitRef> clusterTPpairWithDummyTP(tpr,
TrackPSimHitRef());
112 for(
auto ip = range.first; ip != range.second; ++ip) {
114 const GeomDet* tmpDet = tracker->idToDet(
DetId(it->detUnitId()) ) ;
132 if(!tsAtClosestApproach.
isValid()){
133 std::cout <<
"WARNING: tsAtClosestApproach is not valid" << std::endl;
141 tpr->numberOfTrackerLayers() >=
minHit_ &&
145 fabs(vertex.
z()) <=
lip_
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
std::vector< TrackingParticle > TrackingParticleCollection
static bool simHitTPAssociationListGreater(SimHitTPPair i, SimHitTPPair j)
void select(const edm::Handle< collection > &c, const edm::Event &event, const edm::EventSetup &setup)
const Plane & surface() const
The nominal surface of the GeomDet.
std::vector< int > pdgId_
bool operator()(const TrackingParticleRef tpr, const reco::BeamSpot *bs, const edm::Event &iEvent, const edm::EventSetup &iSetup) const
CosmicTrackingParticleSelector(double ptMin, double minRapidity, double maxRapidity, double tip, double lip, int minHit, bool chargedOnly, std::vector< int > pdgId=std::vector< int >())
CosmicTrackingParticleSelector(const edm::ParameterSet &cfg)
const_iterator begin() const
std::vector< const TrackingParticle * > container
void initEvent(edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitsTPAssocToSet) const
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
edm::Handle< SimHitTPAssociationProducer::SimHitTPAssociationList > simHitsTPAssoc
GlobalVector momentum() const
FTS const & trackStateAtPCA() const
GlobalPoint position() const
const_iterator end() const
T const * product() const
TrackingParticleCollection collection
CosmicTrackingParticleSelector()
container::const_iterator const_iterator
T const * product() const
edm::Ref< edm::PSimHitContainer > TrackPSimHitRef
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::Ref< TrackingParticleCollection > TrackingParticleRef