211 double workingPoint = 1.;
213 bool isGsfElectronMatched =
false;
218 if( (*thePFTauRef).leadPFChargedHadrCand().isNonnull()) {
219 for ( reco::GsfElectronCollection::const_iterator theGsfElectron =
gsfElectrons_->begin();
221 if ( theGsfElectron->pt() > 10. ) {
222 double deltaREleTau =
deltaR(theGsfElectron->p4(), thePFTauRef->p4());
224 if ( deltaREleTau < 0.3 ) {
225 double mva_match =
mva_->
MVAValue(*thePFTauRef, *theGsfElectron);
226 double workingPoint_match = 0.;
227 size_t numSignalPFGammaCands = thePFTauRef->signalPFGammaCands().size();
228 bool hasGsfTrack = thePFTauRef->leadPFChargedHadrCand()->gsfTrackRef().
isNonnull();
230 if ( thePFTauRef->signalPFChargedHadrCands().size() == 1 ) {
232 Float_t TauEtaAtEcalEntrance = -99.;
233 float sumEtaTimesEnergy = 0;
235 for(
unsigned int j = 0 ;
j < ((*thePFTauRef).signalPFCands()).
size() ;
j++){
237 sumEtaTimesEnergy += pfcandidate->positionAtECALEntrance().eta()*pfcandidate->energy();
238 sumEnergy += pfcandidate->energy();
240 if(sumEnergy>0)TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
256 double mvaCut = 999.;
257 if ( TMath::Abs(thePFTauRef->eta()) < 1.5 ) {
258 if ( numSignalPFGammaCands == 0 && !hasGsfTrack ) {
261 }
else if ( numSignalPFGammaCands == 0 && hasGsfTrack ) {
264 }
else if ( numSignalPFGammaCands >= 1 && !hasGsfTrack ) {
267 }
else if ( numSignalPFGammaCands >= 1 && hasGsfTrack ) {
272 if ( numSignalPFGammaCands == 0 && !hasGsfTrack ) {
275 }
else if ( numSignalPFGammaCands == 0 && hasGsfTrack ) {
278 }
else if ( numSignalPFGammaCands >= 1 && !hasGsfTrack ) {
281 }
else if ( numSignalPFGammaCands >= 1 && hasGsfTrack ) {
286 workingPoint_match = (mva_match > mvaCut);
293 workingPoint =
TMath::Min(workingPoint, workingPoint_match);
294 isGsfElectronMatched =
true;
299 if ( !isGsfElectronMatched ) {
301 size_t numSignalPFGammaCands = thePFTauRef->signalPFGammaCands().size();
302 bool hasGsfTrack = thePFTauRef->leadPFChargedHadrCand()->gsfTrackRef().
isNonnull();
303 if ( thePFTauRef->signalPFChargedHadrCands().size() == 1 ) {
305 Float_t TauEtaAtEcalEntrance = -99.;
306 float sumEtaTimesEnergy = 0;
308 for(
unsigned int j = 0 ;
j < ((*thePFTauRef).signalPFCands()).
size() ;
j++){
310 sumEtaTimesEnergy += pfcandidate->positionAtECALEntrance().eta()*pfcandidate->energy();
311 sumEnergy += pfcandidate->energy();
313 if(sumEnergy>0)TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
329 double mvaCut = 999.;
330 if ( TMath::Abs(thePFTauRef->eta()) < 1.5 ) {
331 if ( numSignalPFGammaCands == 0 && !hasGsfTrack ) {
334 }
else if ( numSignalPFGammaCands == 0 && hasGsfTrack ) {
337 }
else if ( numSignalPFGammaCands >= 1 && !hasGsfTrack ) {
340 }
else if ( numSignalPFGammaCands >= 1 && hasGsfTrack ) {
345 if ( numSignalPFGammaCands == 0 && !hasGsfTrack ) {
348 }
else if ( numSignalPFGammaCands == 0 && hasGsfTrack ) {
351 }
else if ( numSignalPFGammaCands >= 1 && !hasGsfTrack ) {
354 }
else if ( numSignalPFGammaCands >= 1 && hasGsfTrack ) {
359 workingPoint = (mva > mvaCut);
double minMVA3prongMatch_
double minMVA1prongNoEleMatchWOgWgsfBL_
double minMVA1prongWOgWgsfEC_
std::auto_ptr< PFTauDiscriminator > category_output_
bool isInEcalCrack(double) const
double minMVA3prongNoMatch_
double minMVA1prongNoEleMatchWOgWOgsfEC_
double minMVA1prongNoEleMatchWOgWOgsfBL_
double minMVA1prongWgWOgsfEC_
double minMVA1prongNoEleMatchWOgWgsfEC_
bool isNonnull() const
Checks for non-null.
double minMVA1prongWOgWOgsfBL_
double minMVA1prongNoEleMatchWgWgsfEC_
edm::Handle< reco::GsfElectronCollection > gsfElectrons_
double minMVA1prongWgWgsfBL_
double deltaR(double eta1, double eta2, double phi1, double phi2)
double minMVA1prongWOgWgsfBL_
double minMVA1prongWgWgsfEC_
double minMVA1prongWOgWOgsfEC_
double minMVA1prongNoEleMatchWgWgsfBL_
double minMVA1prongNoEleMatchWgWOgsfBL_
AntiElectronIDMVA3 * mva_
double minMVA1prongWgWOgsfBL_
double MVAValue(Float_t TauEtaAtEcalEntrance, Float_t TauPt, Float_t TaudCrackEta, Float_t TaudCrackPhi, Float_t TauEmFraction, Float_t TauSignalPFGammaCands, Float_t TauLeadPFChargedHadrHoP, Float_t TauLeadPFChargedHadrEoP, Float_t TauVisMass, Float_t TauHadrMva, const std::vector< Float_t > &GammasdEta, const std::vector< Float_t > &GammasdPhi, const std::vector< Float_t > &GammasPt, Float_t TauKFNumHits, Float_t TauGSFNumHits, Float_t TauGSFChi2, Float_t TauGSFTrackResol, Float_t TauGSFTracklnPt, Float_t TauGSFTrackEta, Float_t TauPhi, Float_t TauSignalPFChargedCands, Float_t TauHasGsf, Float_t ElecEta, Float_t ElecPhi, Float_t ElecPt, Float_t ElecEe, Float_t ElecEgamma, Float_t ElecPin, Float_t ElecPout, Float_t ElecFbrem, Float_t ElecChi2GSF, Float_t ElecGSFNumHits, Float_t ElecGSFTrackResol, Float_t ElecGSFTracklnPt, Float_t ElecGSFTrackEta)
tuple size
Write out results.
double minMVA1prongNoEleMatchWgWOgsfEC_