CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
PFRecoTauDiscriminationAgainstElectronMVA3 Class Reference
Inheritance diagram for PFRecoTauDiscriminationAgainstElectronMVA3:
TauDiscriminationProducerBase< TauType, TauDiscriminator > edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

void beginEvent (const edm::Event &, const edm::EventSetup &)
 
double discriminate (const PFTauRef &)
 
void endEvent (edm::Event &)
 
 PFRecoTauDiscriminationAgainstElectronMVA3 (const edm::ParameterSet &iConfig)
 
 ~PFRecoTauDiscriminationAgainstElectronMVA3 ()
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
virtual double discriminate (const TauRef &tau)=0
 
void produce (edm::Event &, const edm::EventSetup &)
 
 TauDiscriminationProducerBase (const edm::ParameterSet &iConfig)
 
 TauDiscriminationProducerBase ()
 
virtual ~TauDiscriminationProducerBase ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Member Functions

bool isInEcalCrack (double) const
 
std::string readZippedFile (const std::string &fileName)
 

Private Attributes

std::auto_ptr< PFTauDiscriminatorcategory_output_
 
edm::Handle
< reco::GsfElectronCollection
gsfElectrons_
 
edm::FileInPath inputFileName1prongNoEleMatchWgWgsfBL_
 
edm::FileInPath inputFileName1prongNoEleMatchWgWgsfEC_
 
edm::FileInPath inputFileName1prongNoEleMatchWgWOgsfBL_
 
edm::FileInPath inputFileName1prongNoEleMatchWgWOgsfEC_
 
edm::FileInPath inputFileName1prongNoEleMatchWOgWgsfBL_
 
edm::FileInPath inputFileName1prongNoEleMatchWOgWgsfEC_
 
edm::FileInPath inputFileName1prongNoEleMatchWOgWOgsfBL_
 
edm::FileInPath inputFileName1prongNoEleMatchWOgWOgsfEC_
 
edm::FileInPath inputFileName1prongWgWgsfBL_
 
edm::FileInPath inputFileName1prongWgWgsfEC_
 
edm::FileInPath inputFileName1prongWgWOgsfBL_
 
edm::FileInPath inputFileName1prongWgWOgsfEC_
 
edm::FileInPath inputFileName1prongWOgWgsfBL_
 
edm::FileInPath inputFileName1prongWOgWgsfEC_
 
edm::FileInPath inputFileName1prongWOgWOgsfBL_
 
edm::FileInPath inputFileName1prongWOgWOgsfEC_
 
std::string method_
 
double minMVA1prongNoEleMatchWgWgsfBL_
 
double minMVA1prongNoEleMatchWgWgsfEC_
 
double minMVA1prongNoEleMatchWgWOgsfBL_
 
double minMVA1prongNoEleMatchWgWOgsfEC_
 
double minMVA1prongNoEleMatchWOgWgsfBL_
 
double minMVA1prongNoEleMatchWOgWgsfEC_
 
double minMVA1prongNoEleMatchWOgWOgsfBL_
 
double minMVA1prongNoEleMatchWOgWOgsfEC_
 
double minMVA1prongWgWgsfBL_
 
double minMVA1prongWgWgsfEC_
 
double minMVA1prongWgWOgsfBL_
 
double minMVA1prongWgWOgsfEC_
 
double minMVA1prongWOgWgsfBL_
 
double minMVA1prongWOgWgsfEC_
 
double minMVA1prongWOgWOgsfBL_
 
double minMVA1prongWOgWOgsfEC_
 
double minMVA3prongMatch_
 
double minMVA3prongNoMatch_
 
std::string moduleLabel_
 
AntiElectronIDMVA3mva_
 
bool returnMVA_
 
edm::InputTag srcGsfElectrons_
 
size_t tauIndex_
 
edm::Handle< TauCollectiontaus_
 

Additional Inherited Members

- Public Types inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
typedef std::vector< TauType > TauCollection
 
typedef edm::Ref< TauCollectionTauRef
 
typedef edm::RefProd
< TauCollection
TauRefProd
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 
- Protected Attributes inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator >
double prediscriminantFailValue_
 
edm::InputTag TauProducer_
 

Detailed Description

Definition at line 23 of file PFRecoTauDiscriminationAgainstElectronMVA3.cc.

Constructor & Destructor Documentation

PFRecoTauDiscriminationAgainstElectronMVA3::PFRecoTauDiscriminationAgainstElectronMVA3 ( const edm::ParameterSet iConfig)
inlineexplicit

Definition at line 26 of file PFRecoTauDiscriminationAgainstElectronMVA3.cc.

References edm::FileInPath::fullPath(), and edm::ParameterSet::getParameter().

28  moduleLabel_(iConfig.getParameter<std::string>("@module_label")),
29  mva_(0),
31  {
32  //std::cout << "<PFRecoTauDiscriminationAgainstElectronMVA3::PFRecoTauDiscriminationAgainstElectronMVA3>:" << std::endl;
33  //std::cout << " moduleLabel = " << moduleLabel_ << std::endl;
34 
35  method_ = iConfig.getParameter<std::string>("method");
36  inputFileName1prongNoEleMatchWOgWOgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongNoEleMatchWOgWOgsfBL");
37  inputFileName1prongNoEleMatchWOgWgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongNoEleMatchWOgWgsfBL");
38  inputFileName1prongNoEleMatchWgWOgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongNoEleMatchWgWOgsfBL");
39  inputFileName1prongNoEleMatchWgWgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongNoEleMatchWgWgsfBL");
40  inputFileName1prongWOgWOgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongWOgWOgsfBL");
41  inputFileName1prongWOgWgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongWOgWgsfBL");
42  inputFileName1prongWgWOgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongWgWOgsfBL");
43  inputFileName1prongWgWgsfBL_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongWgWgsfBL");
44  inputFileName1prongNoEleMatchWOgWOgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongNoEleMatchWOgWOgsfEC");
45  inputFileName1prongNoEleMatchWOgWgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongNoEleMatchWOgWgsfEC");
46  inputFileName1prongNoEleMatchWgWOgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongNoEleMatchWgWOgsfEC");
47  inputFileName1prongNoEleMatchWgWgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongNoEleMatchWgWgsfEC");
48  inputFileName1prongWOgWOgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongWOgWOgsfEC");
49  inputFileName1prongWOgWgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongWOgWgsfEC");
50  inputFileName1prongWgWOgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongWgWOgsfEC");
51  inputFileName1prongWgWgsfEC_ = iConfig.getParameter<edm::FileInPath>("inputFileName1prongWgWgsfEC");
52 
53  returnMVA_ = iConfig.getParameter<bool>("returnMVA");
54  minMVA1prongNoEleMatchWOgWOgsfBL_ = iConfig.getParameter<double>("minMVA1prongNoEleMatchWOgWOgsfBL");
55  minMVA1prongNoEleMatchWOgWgsfBL_ = iConfig.getParameter<double>("minMVA1prongNoEleMatchWOgWgsfBL");
56  minMVA1prongNoEleMatchWgWOgsfBL_ = iConfig.getParameter<double>("minMVA1prongNoEleMatchWgWOgsfBL");
57  minMVA1prongNoEleMatchWgWgsfBL_ = iConfig.getParameter<double>("minMVA1prongNoEleMatchWgWgsfBL");
58  minMVA1prongWOgWOgsfBL_ = iConfig.getParameter<double>("minMVA1prongWOgWOgsfBL");
59  minMVA1prongWOgWgsfBL_ = iConfig.getParameter<double>("minMVA1prongWOgWgsfBL");
60  minMVA1prongWgWOgsfBL_ = iConfig.getParameter<double>("minMVA1prongWgWOgsfBL");
61  minMVA1prongWgWgsfBL_ = iConfig.getParameter<double>("minMVA1prongWgWgsfBL");
62  minMVA1prongNoEleMatchWOgWOgsfEC_ = iConfig.getParameter<double>("minMVA1prongNoEleMatchWOgWOgsfEC");
63  minMVA1prongNoEleMatchWOgWgsfEC_ = iConfig.getParameter<double>("minMVA1prongNoEleMatchWOgWgsfEC");
64  minMVA1prongNoEleMatchWgWOgsfEC_ = iConfig.getParameter<double>("minMVA1prongNoEleMatchWgWOgsfEC");
65  minMVA1prongNoEleMatchWgWgsfEC_ = iConfig.getParameter<double>("minMVA1prongNoEleMatchWgWgsfEC");
66  minMVA1prongWOgWOgsfEC_ = iConfig.getParameter<double>("minMVA1prongWOgWOgsfEC");
67  minMVA1prongWOgWgsfEC_ = iConfig.getParameter<double>("minMVA1prongWOgWgsfEC");
68  minMVA1prongWgWOgsfEC_ = iConfig.getParameter<double>("minMVA1prongWgWOgsfEC");
69  minMVA1prongWgWgsfEC_ = iConfig.getParameter<double>("minMVA1prongWgWgsfEC");
70  minMVA3prongMatch_ = iConfig.getParameter<double>("minMVA3prongMatch");
71  minMVA3prongNoMatch_ = iConfig.getParameter<double>("minMVA3prongNoMatch");
72 
73  srcGsfElectrons_ = iConfig.getParameter<edm::InputTag>("srcGsfElectrons");
74 
75  mva_ = new AntiElectronIDMVA3();
76  // CV: working version of file compression not implemented yet
77 // mva_->Initialize_from_string(method_,
78 // readZippedFile(inputFileName1prongNoEleMatchWOgWOgsfBL_.fullPath()),
79 // readZippedFile(inputFileName1prongNoEleMatchWOgWgsfBL_.fullPath()),
80 // readZippedFile(inputFileName1prongNoEleMatchWgWOgsfBL_.fullPath()),
81 // readZippedFile(inputFileName1prongNoEleMatchWgWgsfBL_.fullPath()),
82 // readZippedFile(inputFileName1prongWOgWOgsfBL_.fullPath()),
83 // readZippedFile(inputFileName1prongWOgWgsfBL_.fullPath()),
84 // readZippedFile(inputFileName1prongWgWOgsfBL_.fullPath()),
85 // readZippedFile(inputFileName1prongWgWgsfBL_.fullPath()),
86 // readZippedFile(inputFileName1prongNoEleMatchWOgWOgsfEC_.fullPath()),
87 // readZippedFile(inputFileName1prongNoEleMatchWOgWgsfEC_.fullPath()),
88 // readZippedFile(inputFileName1prongNoEleMatchWgWOgsfEC_.fullPath()),
89 // readZippedFile(inputFileName1prongNoEleMatchWgWgsfEC_.fullPath()),
90 // readZippedFile(inputFileName1prongWOgWOgsfEC_.fullPath()),
91 // readZippedFile(inputFileName1prongWOgWgsfEC_.fullPath()),
92 // readZippedFile(inputFileName1prongWgWOgsfEC_.fullPath()),
93 // readZippedFile(inputFileName1prongWgWgsfEC_.fullPath()));
94  mva_->Initialize_from_file(method_,
95  inputFileName1prongNoEleMatchWOgWOgsfBL_.fullPath(),
96  inputFileName1prongNoEleMatchWOgWgsfBL_.fullPath(),
97  inputFileName1prongNoEleMatchWgWOgsfBL_.fullPath(),
98  inputFileName1prongNoEleMatchWgWgsfBL_.fullPath(),
99  inputFileName1prongWOgWOgsfBL_.fullPath(),
100  inputFileName1prongWOgWgsfBL_.fullPath(),
101  inputFileName1prongWgWOgsfBL_.fullPath(),
102  inputFileName1prongWgWgsfBL_.fullPath(),
103  inputFileName1prongNoEleMatchWOgWOgsfEC_.fullPath(),
104  inputFileName1prongNoEleMatchWOgWgsfEC_.fullPath(),
105  inputFileName1prongNoEleMatchWgWOgsfEC_.fullPath(),
106  inputFileName1prongNoEleMatchWgWgsfEC_.fullPath(),
107  inputFileName1prongWOgWOgsfEC_.fullPath(),
108  inputFileName1prongWOgWgsfEC_.fullPath(),
109  inputFileName1prongWgWOgsfEC_.fullPath(),
110  inputFileName1prongWgWgsfEC_.fullPath());
111 
112  // add category index
113  if ( returnMVA_ ) {
114  produces<PFTauDiscriminator>("category");
115  }
116  }
T getParameter(std::string const &) const
TauDiscriminationProducerBase< reco::PFTau, reco::PFTauDiscriminator > PFTauDiscriminationProducerBase
std::string fullPath() const
Definition: FileInPath.cc:171
PFRecoTauDiscriminationAgainstElectronMVA3::~PFRecoTauDiscriminationAgainstElectronMVA3 ( )
inline

Definition at line 124 of file PFRecoTauDiscriminationAgainstElectronMVA3.cc.

125  {
126  delete mva_;
127  }

Member Function Documentation

void PFRecoTauDiscriminationAgainstElectronMVA3::beginEvent ( const edm::Event evt,
const edm::EventSetup es 
)
virtual

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 198 of file PFRecoTauDiscriminationAgainstElectronMVA3.cc.

References edm::Event::getByLabel().

199 {
200  if ( returnMVA_ ) {
203  tauIndex_ = 0;
204  }
206 }
edm::RefProd< TauCollection > TauRefProd
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
double PFRecoTauDiscriminationAgainstElectronMVA3::discriminate ( const PFTauRef thePFTauRef)

Definition at line 208 of file PFRecoTauDiscriminationAgainstElectronMVA3.cc.

References asciidump::at, python.rootplot.argparse::category, reco::deltaR(), edm::Ref< C, T, F >::isNonnull(), j, siStripFEDMonitor_P5_cff::Min, and findQualityFiles::size.

209 {
210  double mva = 1.;
211  double workingPoint = 1.;
212  double category = -1.;
213  bool isGsfElectronMatched = false;
214 
215  //float deltaRTestigo = 9.9;
216  //float mvaCutTestigo = 999;
217 
218  if( (*thePFTauRef).leadPFChargedHadrCand().isNonnull()) {
219  for ( reco::GsfElectronCollection::const_iterator theGsfElectron = gsfElectrons_->begin();
220  theGsfElectron != gsfElectrons_->end(); ++theGsfElectron ) {
221  if ( theGsfElectron->pt() > 10. ) { // CV: only take electrons above some minimal energy/Pt into account...
222  double deltaREleTau = deltaR(theGsfElectron->p4(), thePFTauRef->p4());
223  //deltaRTestigo = deltaREleTau;
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();
229 
230  if ( thePFTauRef->signalPFChargedHadrCands().size() == 1 ) {
232  Float_t TauEtaAtEcalEntrance = -99.;
233  float sumEtaTimesEnergy = 0;
234  float sumEnergy = 0;
235  for(unsigned int j = 0 ; j < ((*thePFTauRef).signalPFCands()).size() ; j++){
236  reco::PFCandidateRef pfcandidate = ((*thePFTauRef).signalPFCands()).at(j);
237  sumEtaTimesEnergy += pfcandidate->positionAtECALEntrance().eta()*pfcandidate->energy();
238  sumEnergy += pfcandidate->energy();
239  }
240  if(sumEnergy>0)TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
241 
242  if (isInEcalCrack(TauEtaAtEcalEntrance)){
243  if ( returnMVA_ ) {
244  // add category index
245  category_output_->setValue(tauIndex_, category);
246  ++tauIndex_;
247  // return MVA output value
248  return -99;
249  } else {
250  //return Workingpoint 0
251  return 0;
252  }
253  }
255 
256  double mvaCut = 999.;
257  if ( TMath::Abs(thePFTauRef->eta()) < 1.5 ) { // Barrel
258  if ( numSignalPFGammaCands == 0 && !hasGsfTrack ) {
259  category = 4.;
260  mvaCut = minMVA1prongWOgWOgsfBL_;
261  } else if ( numSignalPFGammaCands == 0 && hasGsfTrack ) {
262  category = 5.;
263  mvaCut = minMVA1prongWOgWgsfBL_;
264  } else if ( numSignalPFGammaCands >= 1 && !hasGsfTrack ) {
265  category = 6.;
266  mvaCut = minMVA1prongWgWOgsfBL_;
267  } else if ( numSignalPFGammaCands >= 1 && hasGsfTrack ) {
268  category = 7.;
269  mvaCut = minMVA1prongWgWgsfBL_;
270  }
271  } else { // Endcap
272  if ( numSignalPFGammaCands == 0 && !hasGsfTrack ) {
273  category = 12.;
274  mvaCut = minMVA1prongWOgWOgsfEC_;
275  } else if ( numSignalPFGammaCands == 0 && hasGsfTrack ) {
276  category = 13.;
277  mvaCut = minMVA1prongWOgWgsfEC_;
278  } else if ( numSignalPFGammaCands >= 1 && !hasGsfTrack ) {
279  category = 14.;
280  mvaCut = minMVA1prongWgWOgsfEC_;
281  } else if ( numSignalPFGammaCands >= 1 && hasGsfTrack ) {
282  category = 15.;
283  mvaCut = minMVA1prongWgWgsfEC_;
284  }
285  }
286  workingPoint_match = (mva_match > mvaCut);
287  //mvaCutTestigo = mvaCut;
288  } else {
289  category = 16.;
290  workingPoint_match = (mva_match > minMVA3prongMatch_);
291  }
292  mva = TMath::Min(mva, mva_match);
293  workingPoint = TMath::Min(workingPoint, workingPoint_match);
294  isGsfElectronMatched = true;
295  }//deltaR<0.3
296  }//electron pt>10
297  }//loop electrons
298 
299  if ( !isGsfElectronMatched ) {
300  mva = mva_->MVAValue(*thePFTauRef);
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;
307  float sumEnergy = 0;
308  for(unsigned int j = 0 ; j < ((*thePFTauRef).signalPFCands()).size() ; j++){
309  reco::PFCandidateRef pfcandidate = ((*thePFTauRef).signalPFCands()).at(j);
310  sumEtaTimesEnergy += pfcandidate->positionAtECALEntrance().eta()*pfcandidate->energy();
311  sumEnergy += pfcandidate->energy();
312  }
313  if(sumEnergy>0)TauEtaAtEcalEntrance = sumEtaTimesEnergy/sumEnergy;
314 
315  if (isInEcalCrack(TauEtaAtEcalEntrance)){
316  if ( returnMVA_ ) {
317  // add category index
318  category_output_->setValue(tauIndex_, category);
319  ++tauIndex_;
320  // return MVA output value
321  return -99;
322  } else {
323  //return Workingpoint 0
324  return 0;
325  }
326  }
328 
329  double mvaCut = 999.;
330  if ( TMath::Abs(thePFTauRef->eta()) < 1.5 ) { // Barrel
331  if ( numSignalPFGammaCands == 0 && !hasGsfTrack ) {
332  category = 0.;
334  } else if ( numSignalPFGammaCands == 0 && hasGsfTrack ) {
335  category = 1.;
337  } else if ( numSignalPFGammaCands >= 1 && !hasGsfTrack ) {
338  category = 2.;
340  } else if ( numSignalPFGammaCands >= 1 && hasGsfTrack ) {
341  category = 3.;
343  }
344  } else { // Endcap
345  if ( numSignalPFGammaCands == 0 && !hasGsfTrack ) {
346  category = 8.;
348  } else if ( numSignalPFGammaCands == 0 && hasGsfTrack ) {
349  category = 9.;
351  } else if ( numSignalPFGammaCands >= 1 && !hasGsfTrack ) {
352  category = 10.;
354  } else if ( numSignalPFGammaCands >= 1 && hasGsfTrack ) {
355  category = 11.;
357  }
358  }
359  workingPoint = (mva > mvaCut);
360  //mvaCutTestigo = mvaCut;
361  } else {
362  category = 17.;
363  workingPoint = (mva > minMVA3prongNoMatch_);
364  }
365  }
366  }
367 
368  // std::cout<<" Taus : "<<TauProducer_<<std::endl;
369  // std::cout << "<PFRecoTauDiscriminationAgainstElectronMVA3::discriminate>:" << std::endl;
370  // std::cout << " tau: Pt = " << thePFTauRef->pt() << ", eta = " << thePFTauRef->eta() << ", phi = " << thePFTauRef->phi() << std::endl;
371  // std::cout << " mva = " << mva << " mvaCut = " << mvaCutTestigo <<" isGsfElectronMatched = "<<isGsfElectronMatched<< std::endl;
372  // std::cout << " category = " << category << " : workingPoint = " << workingPoint << std::endl;
373  // std::cout << " deltaREleTau = " << deltaRTestigo << std::endl;
374  // std::cout << " charged hadron in tau : "<<(*thePFTauRef).leadPFChargedHadrCand().isNonnull()<< std::endl;
375  // std::cout << " Prongs in tau : "<<thePFTauRef->signalPFChargedHadrCands().size()<< std::endl;
376 
377  if ( returnMVA_ ) {
378  // add category index
379  category_output_->setValue(tauIndex_, category);
380  ++tauIndex_;
381  // return MVA output value
382  return mva;
383  } else {
384  return workingPoint;
385  }
386 }
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
int j
Definition: DBlmapReader.cc:9
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
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.
list at
Definition: asciidump.py:428
void PFRecoTauDiscriminationAgainstElectronMVA3::endEvent ( edm::Event evt)
virtual

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator >.

Definition at line 388 of file PFRecoTauDiscriminationAgainstElectronMVA3.cc.

References edm::Event::put().

389 {
390  // add all category indices to event
391  if ( returnMVA_ ) {
392  evt.put(category_output_, "category");
393  }
394 }
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
bool PFRecoTauDiscriminationAgainstElectronMVA3::isInEcalCrack ( double  eta) const
private

Definition at line 397 of file PFRecoTauDiscriminationAgainstElectronMVA3.cc.

398 {
399  eta = fabs(eta);
400  return (eta>1.460 && eta<1.558);
401 }
T eta() const
std::string PFRecoTauDiscriminationAgainstElectronMVA3::readZippedFile ( const std::string &  fileName)
inlineprivate

Definition at line 131 of file PFRecoTauDiscriminationAgainstElectronMVA3.cc.

References mergeVDriftHistosByStation::file, and ext::basic_izstreambase< Item_t, Traits_t, Allocator_t >::rdbuf().

132  {
133  //std::cout << "<PFRecoTauDiscriminationAgainstElectronMVA3::readZippedFile>:" << std::endl;
134  //std::cout << " fileName = " << fileName << std::endl;
135  // CV: code adapted from PhysicsTools/MVAComputer/src/MVAComputer.cc
136  std::ifstream file;
137  file.open(fileName.c_str());
138  if ( !file.good() ) throw cms::Exception("InvalidFileState")
139  << "Failed to open MVA file = " << fileName << " !!\n";
140  std::ostringstream buffer_zipped;
141  while ( file.good() ) {
142  buffer_zipped << (char)file.get();
143  }
144  file.close();
145  //std::cout << " buffer (zipped) = " << buffer_zipped.str() << std::endl;
146  ext::izstream gunzip(&file);
147  std::ostringstream buffer_unzipped;
148  buffer_unzipped << gunzip.rdbuf();
149  //std::cout << " buffer (unzipped) = " << buffer_unzipped.str() << std::endl;
150  return buffer_unzipped.str();
151  }

Member Data Documentation

std::auto_ptr<PFTauDiscriminator> PFRecoTauDiscriminationAgainstElectronMVA3::category_output_
private
edm::Handle<reco::GsfElectronCollection> PFRecoTauDiscriminationAgainstElectronMVA3::gsfElectrons_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongNoEleMatchWgWgsfBL_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongNoEleMatchWgWgsfEC_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongNoEleMatchWgWOgsfBL_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongNoEleMatchWgWOgsfEC_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongNoEleMatchWOgWgsfBL_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongNoEleMatchWOgWgsfEC_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongNoEleMatchWOgWOgsfBL_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongNoEleMatchWOgWOgsfEC_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongWgWgsfBL_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongWgWgsfEC_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongWgWOgsfBL_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongWgWOgsfEC_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongWOgWgsfBL_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongWOgWgsfEC_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongWOgWOgsfBL_
private
edm::FileInPath PFRecoTauDiscriminationAgainstElectronMVA3::inputFileName1prongWOgWOgsfEC_
private
std::string PFRecoTauDiscriminationAgainstElectronMVA3::method_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongNoEleMatchWgWgsfBL_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongNoEleMatchWgWgsfEC_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongNoEleMatchWgWOgsfBL_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongNoEleMatchWgWOgsfEC_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongNoEleMatchWOgWgsfBL_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongNoEleMatchWOgWgsfEC_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongNoEleMatchWOgWOgsfBL_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongNoEleMatchWOgWOgsfEC_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongWgWgsfBL_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongWgWgsfEC_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongWgWOgsfBL_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongWgWOgsfEC_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongWOgWgsfBL_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongWOgWgsfEC_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongWOgWOgsfBL_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA1prongWOgWOgsfEC_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA3prongMatch_
private
double PFRecoTauDiscriminationAgainstElectronMVA3::minMVA3prongNoMatch_
private
std::string PFRecoTauDiscriminationAgainstElectronMVA3::moduleLabel_
private
AntiElectronIDMVA3* PFRecoTauDiscriminationAgainstElectronMVA3::mva_
private
bool PFRecoTauDiscriminationAgainstElectronMVA3::returnMVA_
private
edm::InputTag PFRecoTauDiscriminationAgainstElectronMVA3::srcGsfElectrons_
private
size_t PFRecoTauDiscriminationAgainstElectronMVA3::tauIndex_
private
edm::Handle<TauCollection> PFRecoTauDiscriminationAgainstElectronMVA3::taus_
private