1 #ifndef RecoSelectors_CosmicTrackingParticleSelector_h
2 #define RecoSelectors_CosmicTrackingParticleSelector_h
40 typedef std::vector<const TrackingParticle *>
container;
46 double tip,
double lip,
int minHit,
bool chargedOnly,
47 const std::vector<int>&
pdgId = std::vector<int>()) :
53 ptMin_(cfg.getParameter<double>(
"ptMin")),
56 tip_(cfg.getParameter<double>(
"tip")),
57 lip_(cfg.getParameter<double>(
"lip")),
58 minHit_(cfg.getParameter<int>(
"minHit")),
60 pdgId_(cfg.getParameter<std::vector<int> >(
"pdgId")),
68 for( TrackingParticleCollection::const_iterator itp = c->begin();
69 itp != c->end(); ++ itp )
110 std::pair<TrackingParticleRef, TrackPSimHitRef> clusterTPpairWithDummyTP(tpr,
TrackPSimHitRef());
114 for(
auto ip = range.first; ip != range.second; ++ip) {
116 const GeomDet* tmpDet = tracker->idToDet(
DetId(it->detUnitId()) ) ;
134 if(!tsAtClosestApproach.
isValid()){
135 std::cout <<
"WARNING: tsAtClosestApproach is not valid" << std::endl;
143 tpr->numberOfTrackerLayers() >=
minHit_ &&
147 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)
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
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(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
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
CosmicTrackingParticleSelector(double ptMin, double minRapidity, double maxRapidity, double tip, double lip, int minHit, bool chargedOnly, const std::vector< int > &pdgId=std::vector< int >())
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::Ref< TrackingParticleCollection > TrackingParticleRef