CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Public Attributes | Private Attributes
PhotonMVAEstimatorRun2Spring15NonTrig Class Reference

#include <PhotonMVAEstimatorRun2Spring15NonTrig.h>

Inheritance diagram for PhotonMVAEstimatorRun2Spring15NonTrig:
AnyMVAEstimatorRun2Base

Classes

struct  AllVariables
 

Public Types

enum  mvaCategories { UNDEFINED = -1, CAT_EB = 0, CAT_EE = 1 }
 

Public Member Functions

void constrainMVAVariables (AllVariables &) const
 
std::vector< float > fillMVAVariables (const edm::Ptr< reco::Candidate > &particle, const edm::Event &iEvent) const override
 
int findCategory (const edm::Ptr< reco::Candidate > &particle) const override
 
const std::string & getName () const final
 
int getNCategories () const override
 
const std::string & getTag () const final
 
bool isEndcapCategory (int category) const
 
float mvaValue (const edm::Ptr< reco::Candidate > &particle, const edm::Event &) const override
 
 PhotonMVAEstimatorRun2Spring15NonTrig (const edm::ParameterSet &conf)
 
void setConsumes (edm::ConsumesCollector &&) const override
 
 ~PhotonMVAEstimatorRun2Spring15NonTrig () override
 
- Public Member Functions inherited from AnyMVAEstimatorRun2Base
 AnyMVAEstimatorRun2Base (const edm::ParameterSet &conf)
 
virtual void getEventContent (const edm::Event &iEvent) const final
 
template<typename... Args>
std::vector< float > packMVAVariables (const Args...args) const
 
virtual ~AnyMVAEstimatorRun2Base ()
 

Public Attributes

const int nCategories = 2
 
- Public Attributes inherited from AnyMVAEstimatorRun2Base
const edm::ParameterSet _conf
 

Private Attributes

AllVariables _allMVAVars
 
const edm::InputTag _esEffSigmaRRMapLabel
 
const edm::InputTag _full5x5E1x3MapLabel
 
const edm::InputTag _full5x5E2x2MapLabel
 
const edm::InputTag _full5x5E2x5MaxMapLabel
 
const edm::InputTag _full5x5E5x5MapLabel
 
const edm::InputTag _full5x5SigmaIEtaIEtaMapLabel
 
const edm::InputTag _full5x5SigmaIEtaIPhiMapLabel
 
std::vector< std::unique_ptr< const GBRForest > > _gbrForests
 
const std::string _MethodName
 
const std::string _name = "PhotonMVAEstimatorRun2Spring15NonTrig"
 
const edm::InputTag _phoChargedIsolationLabel
 
const edm::InputTag _phoPhotonIsolationLabel
 
const edm::InputTag _phoWorstChargedIsolationLabel
 
const edm::InputTag _rhoLabel
 
std::string _tag
 
const bool _useValueMaps
 

Detailed Description

Definition at line 21 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

PhotonMVAEstimatorRun2Spring15NonTrig::PhotonMVAEstimatorRun2Spring15NonTrig ( const edm::ParameterSet conf)

Definition at line 7 of file PhotonMVAEstimatorRun2Spring15NonTrig.cc.

References _gbrForests, _tag, GBRForestTools::createGBRForest(), Exception, edm::ParameterSet::getParameter(), mps_fire::i, nCategories, AlCaHLTBitMon_QueryRunRegistry::string, electrons_cff::weightFile, mvaElectronID_Fall17_iso_V1_cff::weightFileNames, and ~PhotonMVAEstimatorRun2Spring15NonTrig().

7  :
9  _MethodName("BDTG method"),
10  _useValueMaps(conf.getParameter<bool>("useValueMaps")),
11  _full5x5SigmaIEtaIEtaMapLabel(conf.getParameter<edm::InputTag>("full5x5SigmaIEtaIEtaMap")),
12  _full5x5SigmaIEtaIPhiMapLabel(conf.getParameter<edm::InputTag>("full5x5SigmaIEtaIPhiMap")),
13  _full5x5E1x3MapLabel(conf.getParameter<edm::InputTag>("full5x5E1x3Map")),
14  _full5x5E2x2MapLabel(conf.getParameter<edm::InputTag>("full5x5E2x2Map")),
15  _full5x5E2x5MaxMapLabel(conf.getParameter<edm::InputTag>("full5x5E2x5MaxMap")),
16  _full5x5E5x5MapLabel(conf.getParameter<edm::InputTag>("full5x5E5x5Map")),
17  _esEffSigmaRRMapLabel(conf.getParameter<edm::InputTag>("esEffSigmaRRMap")),
18  _phoChargedIsolationLabel(conf.getParameter<edm::InputTag>("phoChargedIsolation")),
19  _phoPhotonIsolationLabel(conf.getParameter<edm::InputTag>("phoPhotonIsolation")),
20  _phoWorstChargedIsolationLabel(conf.getParameter<edm::InputTag>("phoWorstChargedIsolation")),
22 {
23 
24  //
25  // Construct the MVA estimators
26  //
27  _tag = conf.getParameter<std::string>("mvaTag");
28 
29  const std::vector <std::string> weightFileNames
30  = conf.getParameter<std::vector<std::string> >("weightFileNames");
31 
32  if( (int)(weightFileNames.size()) != nCategories )
33  throw cms::Exception("MVA config failure: ")
34  << "wrong number of weightfiles" << std::endl;
35 
36  _gbrForests.clear();
37  // The method name is just a key to retrieve this method later, it is not
38  // a control parameter for a reader (the full definition of the MVA type and
39  // everything else comes from the xml weight files).
40 
41  // Create a TMVA reader object for each category
42  for(int i=0; i<nCategories; i++){
43 
44  // Use unique_ptr so that all readers are properly cleaned up
45  // when the vector clear() is called in the destructor
46 
47  edm::FileInPath weightFile( weightFileNames[i] );
49  }
50 
51 }
T getParameter(std::string const &) const
AnyMVAEstimatorRun2Base(const edm::ParameterSet &conf)
static std::unique_ptr< const GBRForest > createGBRForest(const std::string &weightFile)
std::vector< std::unique_ptr< const GBRForest > > _gbrForests
PhotonMVAEstimatorRun2Spring15NonTrig::~PhotonMVAEstimatorRun2Spring15NonTrig ( )
override

Definition at line 54 of file PhotonMVAEstimatorRun2Spring15NonTrig.cc.

References mvaValue().

Referenced by PhotonMVAEstimatorRun2Spring15NonTrig().

54  {
55 }

Member Function Documentation

void PhotonMVAEstimatorRun2Spring15NonTrig::constrainMVAVariables ( AllVariables ) const

Definition at line 312 of file PhotonMVAEstimatorRun2Spring15NonTrig.cc.

Referenced by fillMVAVariables(), and getTag().

312  {
313 
314  // Check that variables do not have crazy values
315 
316  // This function is currently empty as this specific MVA was not
317  // developed with restricting variables to specific physical ranges.
318  return;
319 
320 }
std::vector< float > PhotonMVAEstimatorRun2Spring15NonTrig::fillMVAVariables ( const edm::Ptr< reco::Candidate > &  particle,
const edm::Event iEvent 
) const
overridevirtual

Implements AnyMVAEstimatorRun2Base.

Definition at line 140 of file PhotonMVAEstimatorRun2Spring15NonTrig.cc.

References _esEffSigmaRRMapLabel, _full5x5E1x3MapLabel, _full5x5E2x2MapLabel, _full5x5E2x5MaxMapLabel, _full5x5E5x5MapLabel, _full5x5SigmaIEtaIEtaMapLabel, _full5x5SigmaIEtaIPhiMapLabel, _phoChargedIsolationLabel, _phoPhotonIsolationLabel, _phoWorstChargedIsolationLabel, _rhoLabel, _useValueMaps, constrainMVAVariables(), reco::Photon::ShowerShape::e1x3, heepElectronID_HEEPV50_CSA14_25ns_cff::e2x5, heepElectronID_HEEPV50_CSA14_25ns_cff::e5x5, mvaPhotonID_PHYS14_PU20bx25_nonTrig_V1_cff::esEffSigmaRRMap, reco::LeafCandidate::eta(), Exception, findCategory(), reco::Photon::full5x5_showerShapeVariables(), mvaPhotonID_PHYS14_PU20bx25_nonTrig_V1_cff::full5x5E1x3Map, mvaPhotonID_PHYS14_PU20bx25_nonTrig_V1_cff::full5x5E2x2Map, mvaPhotonID_PHYS14_PU20bx25_nonTrig_V1_cff::full5x5E2x5MaxMap, mvaPhotonID_PHYS14_PU20bx25_nonTrig_V1_cff::full5x5E5x5Map, cutBasedElectronID_CSA14_50ns_V1_cff::full5x5SigmaIEtaIEtaMap, mvaPhotonID_PHYS14_PU20bx25_nonTrig_V1_cff::full5x5SigmaIEtaIPhiMap, edm::Event::getByLabel(), isEndcapCategory(), edm::Ptr< T >::isNull(), edm::HandleBase::isValid(), SiStripPI::max, eostools::move(), AnyMVAEstimatorRun2Base::packMVAVariables(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), reco::Photon::r9(), rho, reco::Photon::superCluster(), PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varChIsoRaw, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varE1x3overE5x5, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varE2x2overE5x5, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varE2x5overE5x5, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varESEffSigmaRR, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varESEnOverRawE, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varEta, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varPhi, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varPhoIsoRaw, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varPt, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varR9, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varRawE, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varRho, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varSCEta, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varSCEtaWidth, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varSCPhiWidth, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varSieie, PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varSieip, and PhotonMVAEstimatorRun2Spring15NonTrig::AllVariables::varWorstChRaw.

Referenced by getTag(), and mvaValue().

140  {
141 
142  //
143  // Declare all value maps corresponding to the above tokens
144  //
152  //
153  edm::Handle<edm::ValueMap<float> > phoChargedIsolationMap;
154  edm::Handle<edm::ValueMap<float> > phoPhotonIsolationMap;
155  edm::Handle<edm::ValueMap<float> > phoWorstChargedIsolationMap;
156 
157  // Rho will be pulled from the event content
159 
160  // Get the full5x5 and ES maps
161  if( _useValueMaps ) {
162  iEvent.getByLabel(_full5x5SigmaIEtaIEtaMapLabel, full5x5SigmaIEtaIEtaMap);
163  iEvent.getByLabel(_full5x5SigmaIEtaIPhiMapLabel, full5x5SigmaIEtaIPhiMap);
164  iEvent.getByLabel(_full5x5E1x3MapLabel, full5x5E1x3Map);
165  iEvent.getByLabel(_full5x5E2x2MapLabel, full5x5E2x2Map);
166  iEvent.getByLabel(_full5x5E2x5MaxMapLabel, full5x5E2x5MaxMap);
167  iEvent.getByLabel(_full5x5E5x5MapLabel, full5x5E5x5Map);
168  iEvent.getByLabel(_esEffSigmaRRMapLabel, esEffSigmaRRMap);
169  }
170 
171  // Get the isolation maps
172  iEvent.getByLabel(_phoChargedIsolationLabel, phoChargedIsolationMap);
173  iEvent.getByLabel(_phoPhotonIsolationLabel, phoPhotonIsolationMap);
174  iEvent.getByLabel(_phoWorstChargedIsolationLabel, phoWorstChargedIsolationMap);
175 
176  // Get rho
177  iEvent.getByLabel(_rhoLabel,rho);
178 
179  // Make sure everything is retrieved successfully
180  if(! ( ( !_useValueMaps || ( full5x5SigmaIEtaIEtaMap.isValid()
181  && full5x5SigmaIEtaIPhiMap.isValid()
182  && full5x5E1x3Map.isValid()
183  && full5x5E2x2Map.isValid()
184  && full5x5E2x5MaxMap.isValid()
185  && full5x5E5x5Map.isValid()
186  && esEffSigmaRRMap.isValid() ) )
187  && phoChargedIsolationMap.isValid()
188  && phoPhotonIsolationMap.isValid()
189  && phoWorstChargedIsolationMap.isValid()
190  && rho.isValid() ) )
191  throw cms::Exception("MVA failure: ")
192  << "Failed to retrieve event content needed for this MVA"
193  << std::endl
194  << "Check python MVA configuration file and make sure all needed"
195  << std::endl
196  << "producers are running upstream" << std::endl;
197 
198  // Try to cast the particle into a reco particle.
199  // This should work for both reco and pat.
200  const edm::Ptr<reco::Photon> phoRecoPtr(particle);
201  if( phoRecoPtr.isNull() )
202  throw cms::Exception("MVA failure: ")
203  << " given particle is expected to be reco::Photon or pat::Photon," << std::endl
204  << " but appears to be neither" << std::endl;
205 
206  // Both pat and reco particles have exactly the same accessors.
207  auto superCluster = phoRecoPtr->superCluster();
208  // Full 5x5 cluster shapes. We could take some of this directly from
209  // the photon object, but some of these are not available.
210  float e1x3 = std::numeric_limits<float>::max();
211  float e2x2 = std::numeric_limits<float>::max();
214  float full5x5_sigmaIetaIeta = std::numeric_limits<float>::max();
215  float full5x5_sigmaIetaIphi = std::numeric_limits<float>::max();
216  float effSigmaRR = std::numeric_limits<float>::max();
217 
218  AllVariables allMVAVars;
219 
220  if( _useValueMaps ) { //(before 752)
221  // in principle, in the photon object as well
222  // not in the photon object
223  e1x3 = (*full5x5E1x3Map )[ phoRecoPtr ];
224  e2x2 = (*full5x5E2x2Map )[ phoRecoPtr ];
225  e2x5 = (*full5x5E2x5MaxMap)[ phoRecoPtr ];
226  e5x5 = (*full5x5E5x5Map )[ phoRecoPtr ];
227  full5x5_sigmaIetaIeta = (*full5x5SigmaIEtaIEtaMap)[ phoRecoPtr ];
228  full5x5_sigmaIetaIphi = (*full5x5SigmaIEtaIPhiMap)[ phoRecoPtr ];
229  effSigmaRR = (*esEffSigmaRRMap)[ phoRecoPtr ];
230  } else {
231  // from 753
232  const auto& full5x5_pss = phoRecoPtr->full5x5_showerShapeVariables();
233  e1x3 = full5x5_pss.e1x3;
234  e2x2 = full5x5_pss.e2x2;
235  e2x5 = full5x5_pss.e2x5Max;
236  e5x5 = full5x5_pss.e5x5;
237  full5x5_sigmaIetaIeta = full5x5_pss.sigmaIetaIeta;
238  full5x5_sigmaIetaIphi = full5x5_pss.sigmaIetaIphi;
239  effSigmaRR = full5x5_pss.effSigmaRR;
240  }
241 
242  allMVAVars.varPhi = phoRecoPtr->phi();
243  allMVAVars.varR9 = phoRecoPtr->r9() ;
244  allMVAVars.varSieie = full5x5_sigmaIetaIeta;
245  allMVAVars.varSieip = full5x5_sigmaIetaIphi;
246  allMVAVars.varE1x3overE5x5 = e1x3/e5x5;
247  allMVAVars.varE2x2overE5x5 = e2x2/e5x5;
248  allMVAVars.varE2x5overE5x5 = e2x5/e5x5;
249  allMVAVars.varSCEta = superCluster->eta();
250  allMVAVars.varRawE = superCluster->rawEnergy();
251  allMVAVars.varSCEtaWidth = superCluster->etaWidth();
252  allMVAVars.varSCPhiWidth = superCluster->phiWidth();
253  allMVAVars.varESEnOverRawE = superCluster->preshowerEnergy() / superCluster->rawEnergy();
254  allMVAVars.varESEffSigmaRR = effSigmaRR;
255  allMVAVars.varRho = *rho;
256  allMVAVars.varPhoIsoRaw = (*phoPhotonIsolationMap)[phoRecoPtr];
257  allMVAVars.varChIsoRaw = (*phoChargedIsolationMap)[phoRecoPtr];
258  allMVAVars.varWorstChRaw = (*phoWorstChargedIsolationMap)[phoRecoPtr];
259  // Declare spectator vars
260  allMVAVars.varPt = phoRecoPtr->pt();
261  allMVAVars.varEta = phoRecoPtr->eta();
262 
263  constrainMVAVariables(allMVAVars);
264 
265  std::vector<float> vars;
266  if( isEndcapCategory( findCategory( particle ) ) ) {
267  vars = std::move( packMVAVariables(allMVAVars.varPhi,
268  allMVAVars.varR9,
269  allMVAVars.varSieie,
270  allMVAVars.varSieip,
271  allMVAVars.varE1x3overE5x5,
272  allMVAVars.varE2x2overE5x5,
273  allMVAVars.varE2x5overE5x5,
274  allMVAVars.varSCEta,
275  allMVAVars.varRawE,
276  allMVAVars.varSCEtaWidth,
277  allMVAVars.varSCPhiWidth,
278  allMVAVars.varESEnOverRawE,
279  allMVAVars.varESEffSigmaRR,
280  allMVAVars.varRho,
281  allMVAVars.varPhoIsoRaw,
282  allMVAVars.varChIsoRaw,
283  allMVAVars.varWorstChRaw,
284  // Declare spectator vars
285  allMVAVars.varPt,
286  allMVAVars.varEta)
287  );
288  } else {
289  vars = std::move( packMVAVariables(allMVAVars.varPhi,
290  allMVAVars.varR9,
291  allMVAVars.varSieie,
292  allMVAVars.varSieip,
293  allMVAVars.varE1x3overE5x5,
294  allMVAVars.varE2x2overE5x5,
295  allMVAVars.varE2x5overE5x5,
296  allMVAVars.varSCEta,
297  allMVAVars.varRawE,
298  allMVAVars.varSCEtaWidth,
299  allMVAVars.varSCPhiWidth,
300  allMVAVars.varRho,
301  allMVAVars.varPhoIsoRaw,
302  allMVAVars.varChIsoRaw,
303  allMVAVars.varWorstChRaw,
304  // Declare spectator vars
305  allMVAVars.varPt,
306  allMVAVars.varEta)
307  );
308  }
309  return vars;
310 }
std::vector< float > packMVAVariables(const Args...args) const
bool isValid() const
Definition: HandleBase.h:74
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:464
int findCategory(const edm::Ptr< reco::Candidate > &particle) const override
def move(src, dest)
Definition: eostools.py:510
int PhotonMVAEstimatorRun2Spring15NonTrig::findCategory ( const edm::Ptr< reco::Candidate > &  particle) const
overridevirtual

Implements AnyMVAEstimatorRun2Base.

Definition at line 100 of file PhotonMVAEstimatorRun2Spring15NonTrig.cc.

References funct::abs(), CAT_EB, CAT_EE, mvaElectronID_Fall17_iso_V1_cff::ebeeSplit, PVValHelper::eta, isEndcapCategory(), edm::Ptr< T >::isNull(), reco::Photon::superCluster(), and UNDEFINED.

Referenced by fillMVAVariables(), getTag(), and mvaValue().

100  {
101 
102  // Try to cast the particle into a reco particle.
103  // This should work for both reco and pat.
104  const edm::Ptr<reco::Photon> phoRecoPtr = ( edm::Ptr<reco::Photon> )particle;
105  if( phoRecoPtr.isNull() )
106  throw cms::Exception("MVA failure: ")
107  << " given particle is expected to be reco::Photon or pat::Photon," << std::endl
108  << " but appears to be neither" << std::endl;
109 
110  float eta = phoRecoPtr->superCluster()->eta();
111 
112  //
113  // Determine the category
114  //
115  int iCategory = UNDEFINED;
116  const float ebeeSplit = 1.479; // division between barrel and endcap
117 
118  if ( std::abs(eta) < ebeeSplit)
119  iCategory = CAT_EB;
120 
121  if (std::abs(eta) >= ebeeSplit)
122  iCategory = CAT_EE;
123 
124  return iCategory;
125 }
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
bool isNull() const
Checks for null.
Definition: Ptr.h:164
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const std::string& PhotonMVAEstimatorRun2Spring15NonTrig::getName ( void  ) const
inlinefinalvirtual

Implements AnyMVAEstimatorRun2Base.

Definition at line 71 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

References _name.

Referenced by plotting.Plot::draw().

int PhotonMVAEstimatorRun2Spring15NonTrig::getNCategories ( ) const
inlineoverridevirtual
const std::string& PhotonMVAEstimatorRun2Spring15NonTrig::getTag ( void  ) const
inlinefinalvirtual
bool PhotonMVAEstimatorRun2Spring15NonTrig::isEndcapCategory ( int  category) const

Definition at line 128 of file PhotonMVAEstimatorRun2Spring15NonTrig.cc.

References CAT_EE, and GeomDetEnumerators::isEndcap().

Referenced by fillMVAVariables(), findCategory(), getNCategories(), and mvaValue().

128  {
129 
130  // For this specific MVA the function is trivial, but kept for possible
131  // future evolution to an MVA with more categories in eta
132  bool isEndcap = false;
133  if( category == CAT_EE )
134  isEndcap = true;
135 
136  return isEndcap;
137 }
bool isEndcap(GeomDetEnumerators::SubDetector m)
float PhotonMVAEstimatorRun2Spring15NonTrig::mvaValue ( const edm::Ptr< reco::Candidate > &  particle,
const edm::Event iEvent 
) const
overridevirtual

Implements AnyMVAEstimatorRun2Base.

Definition at line 58 of file PhotonMVAEstimatorRun2Spring15NonTrig.cc.

References _gbrForests, debug, fillMVAVariables(), findCategory(), isEndcapCategory(), eostools::move(), and mps_fire::result.

Referenced by ~PhotonMVAEstimatorRun2Spring15NonTrig().

58  {
59 
60  const int iCategory = findCategory( particle );
61  const std::vector<float> vars = std::move( fillMVAVariables( particle, iEvent ) );
62 
63  const float result = _gbrForests.at(iCategory)->GetResponse(vars.data()); // The BDT score
64 
65  // DEBUG
66  const bool debug = false;
67  if( debug ){
68  printf("Printout of the photon variable inputs for MVA:\n");
69  printf(" varPhi_ %f\n", vars[0] );
70  printf(" varR9_ %f\n", vars[1] );
71  printf(" varSieie_ %f\n", vars[2] );
72  printf(" varSieip_ %f\n", vars[3] );
73  printf(" varE1x3overE5x5_ %f\n", vars[4] );
74  printf(" varE2x2overE5x5_ %f\n", vars[5] );
75  printf(" varE2x5overE5x5_ %f\n", vars[6] );
76  printf(" varSCEta_ %f\n", vars[7] );
77  printf(" varRawE_ %f\n", vars[8] );
78  printf(" varSCEtaWidth_ %f\n", vars[9] );
79  printf(" varSCPhiWidth_ %f\n", vars[10] );
80  printf(" varRho_ %f\n", vars[11] );
81  printf(" varPhoIsoRaw_ %f\n", vars[12] );
82  printf(" varChIsoRaw_ %f\n", vars[13] );
83  printf(" varWorstChRaw_ %f\n", vars[14] );
84  if( isEndcapCategory( iCategory ) ) {
85  printf(" varESEnOverRawE_ %f\n", vars[15] ); // for endcap MVA only
86  printf(" varESEffSigmaRR_ %f\n", vars[16] ); // for endcap MVA only
87  // The spectators
88  printf(" varPt_ %f\n", vars[17] );
89  printf(" varEta_ %f\n", vars[18] );
90  } else {
91  // The spectators
92  printf(" varPt_ %f\n", vars[15] );
93  printf(" varEta_ %f\n", vars[16] );
94  }
95  }
96 
97  return result;
98 }
#define debug
Definition: HDRShower.cc:19
int findCategory(const edm::Ptr< reco::Candidate > &particle) const override
std::vector< std::unique_ptr< const GBRForest > > _gbrForests
std::vector< float > fillMVAVariables(const edm::Ptr< reco::Candidate > &particle, const edm::Event &iEvent) const override
def move(src, dest)
Definition: eostools.py:510
void PhotonMVAEstimatorRun2Spring15NonTrig::setConsumes ( edm::ConsumesCollector &&  cc) const
overridevirtual

Reimplemented from AnyMVAEstimatorRun2Base.

Definition at line 322 of file PhotonMVAEstimatorRun2Spring15NonTrig.cc.

References _esEffSigmaRRMapLabel, _full5x5E1x3MapLabel, _full5x5E2x2MapLabel, _full5x5E2x5MaxMapLabel, _full5x5E5x5MapLabel, _full5x5SigmaIEtaIEtaMapLabel, _full5x5SigmaIEtaIPhiMapLabel, _phoChargedIsolationLabel, _phoPhotonIsolationLabel, _phoWorstChargedIsolationLabel, _rhoLabel, _useValueMaps, and DEFINE_EDM_PLUGIN.

Referenced by getTag().

322  {
323  if( _useValueMaps ) {
331  }
335  cc.consumes<double>(_rhoLabel);
336 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)

Member Data Documentation

AllVariables PhotonMVAEstimatorRun2Spring15NonTrig::_allMVAVars
private

Definition at line 107 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_esEffSigmaRRMapLabel
private

Definition at line 123 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_full5x5E1x3MapLabel
private

Definition at line 119 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_full5x5E2x2MapLabel
private

Definition at line 120 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_full5x5E2x5MaxMapLabel
private

Definition at line 121 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_full5x5E5x5MapLabel
private

Definition at line 122 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_full5x5SigmaIEtaIEtaMapLabel
private

Definition at line 117 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_full5x5SigmaIEtaIPhiMapLabel
private

Definition at line 118 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

std::vector< std::unique_ptr<const GBRForest> > PhotonMVAEstimatorRun2Spring15NonTrig::_gbrForests
private
const std::string PhotonMVAEstimatorRun2Spring15NonTrig::_MethodName
private

Definition at line 106 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

const std::string PhotonMVAEstimatorRun2Spring15NonTrig::_name = "PhotonMVAEstimatorRun2Spring15NonTrig"
private
const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_phoChargedIsolationLabel
private

Definition at line 125 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_phoPhotonIsolationLabel
private

Definition at line 126 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_phoWorstChargedIsolationLabel
private

Definition at line 127 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

const edm::InputTag PhotonMVAEstimatorRun2Spring15NonTrig::_rhoLabel
private

Definition at line 128 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

std::string PhotonMVAEstimatorRun2Spring15NonTrig::_tag
private
const bool PhotonMVAEstimatorRun2Spring15NonTrig::_useValueMaps
private

Definition at line 116 of file PhotonMVAEstimatorRun2Spring15NonTrig.h.

Referenced by fillMVAVariables(), and setConsumes().

const int PhotonMVAEstimatorRun2Spring15NonTrig::nCategories = 2