1 #ifndef RecoSelectors_CosmicTrackingParticleSelector_h 2 #define RecoSelectors_CosmicTrackingParticleSelector_h 42 typedef std::vector<const TrackingParticle*>
container;
54 const std::vector<int>&
pdgId = std::vector<int>())
65 :
ptMin_(cfg.getParameter<double>(
"ptMin")),
68 tip_(cfg.getParameter<double>(
"tip")),
69 lip_(cfg.getParameter<double>(
"lip")),
79 for (TrackingParticleCollection::const_iterator itp = c->begin(); itp != c->end(); ++itp)
126 <<
"TOT Number of PSimHits = " << tpr->numberOfHits()
127 <<
", Number of Tracker PSimHits = " << tpr->numberOfTrackerHits() <<
"\n";
130 edm::LogError(
"CosmicTrackingParticleSelector") <<
"Invalid handle!";
133 std::pair<TrackingParticleRef, TrackPSimHitRef> clusterTPpairWithDummyTP(
138 clusterTPpairWithDummyTP,
140 for (
auto ip =
range.first; ip !=
range.second; ++ip) {
146 <<
"***WARNING: PSimHit " << ii <<
", no GeomDet for: " << it->detUnitId() <<
". Skipping it.";
149 det =
DetId(it->detUnitId()).det();
150 subdet =
DetId(it->detUnitId()).subdetId();
158 <<
"PSimHit " << ii <<
", Detector = " << det <<
", subdet = " << subdet <<
"\t Radius = " << gp.
perp()
159 <<
", z = " << gp.
z() <<
"\t pt = " << gv.
perp() <<
", pz = " << gv.
z();
161 <<
"\t trackId = " << it->trackId() <<
", particleType = " << it->particleType()
162 <<
", processType = " << it->processType();
165 if (it->processType() != 0)
177 <<
"FINAL State at InnerMost Hit: Radius = " << finalGP.
perp() <<
", z = " << finalGP.
z()
178 <<
", pt = " << finalGV.
perp() <<
", pz = " << finalGV.
z();
187 if (!tsAtClosestApproach.
isValid()) {
189 <<
"*** WARNING in CosmicTrackingParticleSelector: tsAtClosestApproach is not valid." 197 <<
"FINAL State extrapolated at PCA: Radius = " << vertex.
perp() <<
", z = " << vertex.
z()
198 <<
", pt = " << momentum.
perp() <<
", pz = " << momentum.
z() <<
"\n";
202 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
std::vector< const TrackingParticle * > container
CosmicTrackingParticleSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
const_iterator begin() const
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
const GeomDet * idToDet(DetId) const override
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 >())
T const * product() const
edm::Ref< TrackingParticleCollection > TrackingParticleRef