18 qualityCuts_(iConfig.getParameter<edm::
ParameterSet>(
"qualityCuts"))
20 includeTracks_ = iConfig.
getParameter<
bool>(
"ApplyDiscriminationByTrackerIsolation");
21 includeGammas_ = iConfig.
getParameter<
bool>(
"ApplyDiscriminationByECALIsolation");
23 applyOccupancyCut_ = iConfig.
getParameter<
bool>(
"applyOccupancyCut");
24 maximumOccupancy_ = iConfig.
getParameter<uint32_t>(
"maximumOccupancy");
26 applySumPtCut_ = iConfig.
getParameter<
bool>(
"applySumPtCut");
27 maximumSumPt_ = iConfig.
getParameter<
double>(
"maximumSumPtCut");
29 applyRelativeSumPtCut_ = iConfig.
getParameter<
bool>(
"applyRelativeSumPtCut");
30 maximumRelativeSumPt_ = iConfig.
getParameter<
double>(
"relativeSumPtCut");
38 double discriminate(
const PFTauRef& pfTau);
67 event.getByLabel(pvProducer_, primaryVertices);
70 if( primaryVertices->size() )
72 currentPV_ = *(primaryVertices->begin());
75 const double smearedPVsigmaY = 0.0015;
76 const double smearedPVsigmaX = 0.0015;
77 const double smearedPVsigmaZ = 0.005;
79 SimPVError(0,0) = smearedPVsigmaX*smearedPVsigmaX;
80 SimPVError(1,1) = smearedPVsigmaY*smearedPVsigmaY;
81 SimPVError(2,2) = smearedPVsigmaZ*smearedPVsigmaZ;
85 currentPV_ =
Vertex(blankVertex, SimPVError,1,1,1);
92 std::vector<LeafCandidate> isoObjects;
96 qualityCuts_.isolationChargedObjects(*pfTau, currentPV_, isoObjects);
101 qualityCuts_.isolationGammaObjects(*pfTau, isoObjects);
104 bool failsOccupancyCut =
false;
105 bool failsSumPtCut =
false;
106 bool failsRelativeSumPtCut =
false;
109 failsOccupancyCut = ( isoObjects.size() > maximumOccupancy_ );
112 if( applySumPtCut_ || applyRelativeSumPtCut_ )
115 for(std::vector<LeafCandidate>::const_iterator iIsoObject = isoObjects.begin();
116 iIsoObject != isoObjects.end();
119 totalP4 += iIsoObject->p4();
122 failsSumPtCut = ( totalP4.pt() > maximumSumPt_ );
125 failsRelativeSumPtCut = ( ( pfTau->pt() > 0 ? totalP4.pt()/pfTau->pt() : 0 ) > maximumRelativeSumPt_ );
128 bool fails = ( applyOccupancyCut_ && failsOccupancyCut ) ||
129 ( applySumPtCut_ && failsSumPtCut ) ||
130 ( applyRelativeSumPtCut_ && failsRelativeSumPtCut ) ;
132 return ( fails ? 0. : 1. );
T getParameter(std::string const &) const
PFRecoTauDiscriminationByIsolation(const edm::ParameterSet &iConfig)
~PFRecoTauDiscriminationByIsolation()
math::Error< dimension >::type Error
covariance error matrix (3x3)
double maximumRelativeSumPt_
bool applyRelativeSumPtCut_
PFTauQualityCutWrapper qualityCuts_
math::XYZPoint Point
point in the space
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
void beginEvent(const edm::Event &evt, const edm::EventSetup &evtSetup)
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
uint32_t maximumOccupancy_
double discriminate(const PFTauRef &pfTau)
edm::InputTag pvProducer_
math::XYZTLorentzVector LorentzVector
Lorentz vector.