1 #ifndef RecoSelectors_CosmicTrackingParticleSelector_h 2 #define RecoSelectors_CosmicTrackingParticleSelector_h 43 typedef std::vector<const TrackingParticle *>
container;
50 const std::vector<int>&
pdgId = std::vector<int>()) :
56 ptMin_(cfg.getParameter<double>(
"ptMin")),
59 tip_(cfg.getParameter<double>(
"tip")),
60 lip_(cfg.getParameter<double>(
"lip")),
71 for( TrackingParticleCollection::const_iterator itp = c->begin();
72 itp != c->end(); ++ itp )
115 <<
"TOT Number of PSimHits = "<< tpr->numberOfHits() <<
", Number of Tracker PSimHits = "<< tpr->numberOfTrackerHits() <<
"\n";
118 edm::LogError(
"CosmicTrackingParticleSelector") <<
"Invalid handle!";
121 std::pair<TrackingParticleRef, TrackPSimHitRef> clusterTPpairWithDummyTP(tpr,
TrackPSimHitRef());
125 for(
auto ip = range.first; ip != range.second; ++ip) {
131 <<
"***WARNING: PSimHit "<<ii <<
", no GeomDet for: "<<it->detUnitId()<<
". Skipping it.";
134 det =
DetId(it->detUnitId()).det();
135 subdet =
DetId(it->detUnitId()).subdetId();
143 <<
"PSimHit "<<ii<<
", Detector = "<<det<<
", subdet = "<<subdet
144 <<
"\t Radius = "<< gp.
perp() <<
", z = "<< gp.
z()
145 <<
"\t pt = "<< gv.
perp() <<
", pz = "<< gv.
z();
147 <<
"\t trackId = "<<it->trackId()<<
", particleType = "<<it->particleType()<<
", processType = "<<it->processType();
150 if (it->processType()!=0)
continue;
160 <<
"\n"<<
"FINAL State at InnerMost Hit: Radius = "<< finalGP.
perp() <<
", z = "<< finalGP.
z()
161 <<
", pt = "<< finalGV.
perp() <<
", pz = "<< finalGV.
z();
169 if(!tsAtClosestApproach.
isValid()){
171 <<
"*** WARNING in CosmicTrackingParticleSelector: tsAtClosestApproach is not valid." <<
"\n";
180 <<
"FINAL State extrapolated at PCA: Radius = "<< vertex.
perp() <<
", z = "<< vertex.
z()
181 <<
", pt = "<< momentum.
perp() <<
", pz = "<< momentum.
z() <<
"\n";
184 tpr->numberOfTrackerLayers() >=
minHit_ &&
188 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)
def setup(process, global_tag, zero_tesla=False)
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
virtual const GeomDet * idToDet(DetId) 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
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