CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/PhysicsTools/SelectorUtils/interface/SimpleCutBasedElectronIDSelectionFunctor.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_PatUtils_interface_SimpleCutBasedElectronIDSelectionFunctor_h
00002 #define PhysicsTools_PatUtils_interface_SimpleCutBasedElectronIDSelectionFunctor_h
00003 
00004 #include "DataFormats/PatCandidates/interface/Electron.h"
00005 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00006 
00007 #include "PhysicsTools/SelectorUtils/interface/Selector.h"
00008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00009 
00010 #include "FWCore/Utilities/interface/InputTag.h"
00011 
00012 /*
00013 ___________________________________________________________________________________
00014 
00015 Description:
00016 ^^^^^^^^^^^^
00017     This is a class that implements the Simple Cut Based Electron 
00018     Identification cuts.  A more detailed description of the cuts
00019     and the tuning method can be found on this twiki:
00020     
00021     https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID
00022 
00023     For more information on how to calculate the magnetic field
00024     look here:
00025 
00026     https://twiki.cern.ch/twiki/bin/viewauth/CMS/ConversionBackgroundRejection
00027 ___________________________________________________________________________________
00028 
00029 How to use:
00030 ^^^^^^^^^^^
00031     From CMSSW39 onwards you can simply define an instance of this class:
00032 
00033       SimpleCutBasedElectronIDSelectionFunctor patSele95
00034       (SimpleCutBasedElectronIDSelectionFunctor::relIso95);
00035 
00036     and get the decision with the following method:
00037       pat::Electron *myElec = .....;
00038       bool pass = patSele90(*myElec);
00039 
00040     The various options are listed in the enumeration Version_t. There
00041     is also the option to enter as a constructor argument a PSet
00042     with your favorite cuts.
00043 ___________________________________________________________________________________
00044 
00045     Contacts: Nikolaos Rompotis and Chris Seez
00046     Nikolaos dot Rompotis at Cern dot ch
00047     Chris    dot Seez     at Cern dot ch
00048 
00049     Author:    Nikolaos Rompotis
00050                many thanks to Sal Rappoccio
00051     Imperial College London
00052     7 June 2010, first commit for CMSSW_3_6_1_patchX
00053     11July 2010, implementing the ICHEP Egamma recommendation for 
00054                  removing the Delta Eta cut in the endcaps
00055     30Sept 2010, simplification of conversion rejection in CMSSW39X
00056 ___________________________________________________________________________________
00057 
00058 */
00059 
00060 
00061 class SimpleCutBasedElectronIDSelectionFunctor : public Selector<pat::Electron>  {
00062 
00063  public: // interface  
00064   
00065   enum Version_t { relIso95=0, cIso95,  relIso90, cIso90, relIso85, cIso85, 
00066                    relIso80, cIso80,  relIso70, cIso70, relIso60, cIso60, NONE };
00067   
00068   SimpleCutBasedElectronIDSelectionFunctor() {}
00069   
00070   // initialize it by inserting directly the cut values in a parameter set
00071   SimpleCutBasedElectronIDSelectionFunctor(edm::ParameterSet const & parameters)
00072     {
00073       // get the cuts from the PS
00074       initialize( parameters.getParameter<Double_t>("trackIso_EB"), 
00075                   parameters.getParameter<Double_t>("ecalIso_EB"), 
00076                   parameters.getParameter<Double_t>("hcalIso_EB"), 
00077                   parameters.getParameter<Double_t>("sihih_EB"), 
00078                   parameters.getParameter<Double_t>("dphi_EB"), 
00079                   parameters.getParameter<Double_t>("deta_EB"), 
00080                   parameters.getParameter<Double_t>("hoe_EB"), 
00081                   parameters.getParameter<Double_t>("cIso_EB"), 
00082                   parameters.getParameter<Double_t>("trackIso_EE"), 
00083                   parameters.getParameter<Double_t>("ecalIso_EE"), 
00084                   parameters.getParameter<Double_t>("hcalIso_EE"), 
00085                   parameters.getParameter<Double_t>("sihih_EE"), 
00086                   parameters.getParameter<Double_t>("dphi_EE"), 
00087                   parameters.getParameter<Double_t>("deta_EE"), 
00088                   parameters.getParameter<Double_t>("hoe_EE"), 
00089                   parameters.getParameter<Double_t>("cIso_EE"), 
00090                   parameters.getParameter<Int_t>("conversionRejection"), 
00091                   parameters.getParameter<Int_t>("maxNumberOfExpectedMissingHits"));
00092       retInternal_ = getBitTemplate();
00093     }
00094   // initialize it by using only the version name
00095   SimpleCutBasedElectronIDSelectionFunctor(Version_t  version)
00096     {
00097       if (version == NONE) {
00098         std::cout << "SimpleCutBasedElectronIDSelectionFunctor: If you want to use version NONE "
00099                   << "then you have also to provide the selection cuts by yourself " << std::endl;
00100         std::cout << "SimpleCutBasedElectronIDSelectionFunctor: ID Version is changed to 80cIso "
00101                   << std::endl;
00102         version = cIso80;
00103       }
00104       initialize(version);
00105       retInternal_ = getBitTemplate();
00106     }
00107 
00108   void initialize( Version_t version ) 
00109   {
00110     version_ = version;
00111     // push back the variables
00112     push_back("trackIso_EB");
00113     push_back("ecalIso_EB" );
00114     push_back("hcalIso_EB" );
00115     push_back("sihih_EB"   );
00116     push_back("dphi_EB"    );
00117     push_back("deta_EB"    );
00118     push_back("hoe_EB"     );
00119     push_back("cIso_EB"    );
00120     
00121     push_back("trackIso_EE");
00122     push_back("ecalIso_EE" );
00123     push_back("hcalIso_EE" );
00124     push_back("sihih_EE"   );
00125     push_back("dphi_EE"    );
00126     push_back("deta_EE"    );
00127     push_back("hoe_EE"     );
00128     push_back("cIso_EE"    );
00129     
00130     push_back("conversionRejection"            );
00131     push_back("maxNumberOfExpectedMissingHits" );
00132     
00133     
00134     
00135     
00136     if (version_ == relIso95) {
00137       set("trackIso_EB", 1.5e-01);
00138       set("ecalIso_EB",  2.0e+00);
00139       set("hcalIso_EB",  1.2e-01);
00140       set("sihih_EB",    1.0e-02);
00141       set("dphi_EB",     8.0e-01);
00142       set("deta_EB",     7.0e-03);
00143       set("hoe_EB",      1.5e-01);
00144       set("cIso_EB",     10000. );
00145       
00146       set("trackIso_EE", 8.0e-02);
00147       set("ecalIso_EE",  6.0e-02);
00148       set("hcalIso_EE",  5.0e-02);
00149       set("sihih_EE",    3.0e-02);
00150       set("dphi_EE",     7.0e-01);
00151       set("deta_EE",     1.0e-02);
00152       set("hoe_EE",      7.0e-02);
00153       set("cIso_EE",     10000. );
00154       
00155       set("conversionRejection",            0);
00156       set("maxNumberOfExpectedMissingHits", 1);
00157 
00158     }
00159     else if (version_ == cIso95) {
00160       set("trackIso_EB", 100000.);
00161       set("ecalIso_EB",  100000.);
00162       set("hcalIso_EB",  100000.);
00163       set("sihih_EB",    1.0e-02);
00164       set("dphi_EB",     8.0e-01);
00165       set("deta_EB",     7.0e-03);
00166       set("hoe_EB",      1.5e-01);
00167       set("cIso_EB",     1.5e-01);
00168                                                                       
00169       set("trackIso_EE", 100000.);
00170       set("ecalIso_EE",  100000.);
00171       set("hcalIso_EE",  100000.);
00172       set("sihih_EE",    3.0e-02);
00173       set("dphi_EE",     7.0e-01);
00174       set("deta_EE",     1.0e-02);
00175       set("hoe_EE",      7.0e-02);
00176       set("cIso_EE",     1.0e-01);
00177       
00178       set("conversionRejection",            0);
00179       set("maxNumberOfExpectedMissingHits", 1);
00180       
00181     }
00182     else if (version_ == relIso90) {
00183       set("trackIso_EB", 1.2e-01);
00184       set("ecalIso_EB",  9.0e-02);
00185       set("hcalIso_EB",  1.0e-01);
00186       set("sihih_EB",    1.0e-02);
00187       set("dphi_EB",     8.0e-01);
00188       set("deta_EB",     7.0e-03);
00189       set("hoe_EB",      1.2e-01);
00190       set("cIso_EB",     10000. );
00191 
00192       set("trackIso_EE", 5.0e-02);
00193       set("ecalIso_EE",  6.0e-02);
00194       set("hcalIso_EE",  3.0e-02);
00195       set("sihih_EE",    3.0e-02);
00196       set("dphi_EE",     7.0e-01);
00197       set("deta_EE",     9.0e-03);
00198       set("hoe_EE",      5.0e-02);
00199       set("cIso_EE",     10000. );
00200       
00201       set("conversionRejection",            1);
00202       set("maxNumberOfExpectedMissingHits", 1);
00203     }
00204     else if (version_ == cIso90) {
00205       set("trackIso_EB", 100000.);
00206       set("ecalIso_EB",  100000.);
00207       set("hcalIso_EB",  100000.);
00208       set("sihih_EB",    1.0e-02);
00209       set("dphi_EB",     8.0e-01);
00210       set("deta_EB",     7.0e-03);
00211       set("hoe_EB",      1.2e-01);
00212       set("cIso_EB",     1.0e-01);
00213 
00214       set("trackIso_EE", 100000.);
00215       set("ecalIso_EE",  100000.);
00216       set("hcalIso_EE",  100000.);
00217       set("sihih_EE",    3.0e-02);
00218       set("dphi_EE",     7.0e-01);
00219       set("deta_EE",     9.0e-03);
00220       set("hoe_EE",      5.0e-02);
00221       set("cIso_EE",     7.0e-02);
00222       
00223       set("conversionRejection",            1);
00224       set("maxNumberOfExpectedMissingHits", 1);
00225     }
00226     else if (version_ == relIso85) {
00227       set("trackIso_EB", 9.0e-02);
00228       set("ecalIso_EB",  8.0e-02);
00229       set("hcalIso_EB",  1.0e-01);
00230       set("sihih_EB",    1.0e-02);
00231       set("dphi_EB",     6.0e-02);
00232       set("deta_EB",     6.0e-03);
00233       set("hoe_EB",      4.0e-02);
00234       set("cIso_EB",     10000. );
00235 
00236       set("trackIso_EE", 5.0e-02);
00237       set("ecalIso_EE",  5.0e-02);
00238       set("hcalIso_EE",  2.5e-02);
00239       set("sihih_EE",    3.0e-02);
00240       set("dphi_EE",     4.0e-02);
00241       set("deta_EE",     7.0e-03);
00242       set("hoe_EE",      2.5e-02);
00243       set("cIso_EE",     10000. );
00244       
00245       set("conversionRejection",            1);
00246       set("maxNumberOfExpectedMissingHits", 1);
00247     }
00248     else if (version_ == cIso85) {
00249       set("trackIso_EB", 100000.);
00250       set("ecalIso_EB",  100000.);
00251       set("hcalIso_EB",  100000.);
00252       set("sihih_EB",    1.0e-02);
00253       set("dphi_EB",     6.0e-02);
00254       set("deta_EB",     6.0e-03);
00255       set("hoe_EB",      4.0e-02);
00256       set("cIso_EB",     9.0e-02);
00257 
00258       set("trackIso_EE", 100000.);
00259       set("ecalIso_EE",  100000.);
00260       set("hcalIso_EE",  100000.);
00261       set("sihih_EE",    3.0e-02);
00262       set("dphi_EE",     4.0e-02);
00263       set("deta_EE",     7.0e-03);
00264       set("hoe_EE",      2.5e-02);
00265       set("cIso_EE",     6.0e-02);
00266       
00267       set("conversionRejection",            1);
00268       set("maxNumberOfExpectedMissingHits", 1);
00269     }
00270     else if (version_ == relIso80) {
00271       set("trackIso_EB", 9.0e-02);
00272       set("ecalIso_EB",  7.0e-02);
00273       set("hcalIso_EB",  1.0e-01);
00274       set("sihih_EB",    1.0e-02);
00275       set("dphi_EB",     6.0e-02);
00276       set("deta_EB",     4.0e-03);
00277       set("hoe_EB",      4.0e-02);
00278       set("cIso_EB",     100000.);
00279 
00280       set("trackIso_EE", 4.0e-02);
00281       set("ecalIso_EE",  5.0e-02);
00282       set("hcalIso_EE",  2.5e-02);
00283       set("sihih_EE",    3.0e-02);
00284       set("dphi_EE",     3.0e-02);
00285       set("deta_EE",     7.0e-03);
00286       set("hoe_EE",      2.5e-02);
00287       set("cIso_EE",     100000.);
00288       
00289       set("conversionRejection",            1);
00290       set("maxNumberOfExpectedMissingHits", 0);
00291     }
00292     else if (version_ == cIso80) {
00293       set("trackIso_EB", 100000.);
00294       set("ecalIso_EB",  100000.);
00295       set("hcalIso_EB",  100000.);
00296       set("sihih_EB",    1.0e-02);
00297       set("dphi_EB",     6.0e-02);
00298       set("deta_EB",     4.0e-03);
00299       set("hoe_EB",      4.0e-02);
00300       set("cIso_EB",     7.0e-02);
00301 
00302       set("trackIso_EE", 100000.);
00303       set("ecalIso_EE",  100000.);
00304       set("hcalIso_EE",  100000.);
00305       set("sihih_EE",    3.0e-02);
00306       set("dphi_EE",     3.0e-02);
00307       set("deta_EE",     7.0e-03);
00308       set("hoe_EE",      2.5e-02);
00309       set("cIso_EE",     6.0e-02);
00310       
00311       set("conversionRejection",            1);
00312       set("maxNumberOfExpectedMissingHits", 0);
00313     }
00314     else if (version_ == relIso70) {
00315       set("trackIso_EB", 5.0e-02);
00316       set("ecalIso_EB",  6.0e-02);
00317       set("hcalIso_EB",  3.0e-02);
00318       set("sihih_EB",    1.0e-02);
00319       set("dphi_EB",     3.0e-02);
00320       set("deta_EB",     4.0e-03);
00321       set("hoe_EB",      2.5e-02);
00322       set("cIso_EB",     100000.);
00323 
00324       set("trackIso_EE", 2.5e-02);
00325       set("ecalIso_EE",  2.5e-02);
00326       set("hcalIso_EE",  2.0e-02);
00327       set("sihih_EE",    3.0e-02);
00328       set("dphi_EE",     2.0e-02);
00329       set("deta_EE",     5.0e-03);
00330       set("hoe_EE",      2.5e-02);
00331       set("cIso_EE",     100000.);
00332       
00333       set("conversionRejection",            1);
00334       set("maxNumberOfExpectedMissingHits", 0);
00335     }
00336     else if (version_ == cIso70) {
00337       set("trackIso_EB", 100000.);
00338       set("ecalIso_EB",  100000.);
00339       set("hcalIso_EB",  100000.);
00340       set("sihih_EB",    1.0e-02);
00341       set("dphi_EB",     3.0e-02);
00342       set("deta_EB",     4.0e-03);
00343       set("hoe_EB",      2.5e-02);
00344       set("cIso_EB",     4.0e-02);
00345 
00346       set("trackIso_EE", 100000.);
00347       set("ecalIso_EE",  100000.);
00348       set("hcalIso_EE",  100000.);
00349       set("sihih_EE",    3.0e-02);
00350       set("dphi_EE",     2.0e-02);
00351       set("deta_EE",     5.0e-03);
00352       set("hoe_EE",      2.5e-02);
00353       set("cIso_EE",     3.0e-02);
00354       
00355       set("conversionRejection",            1);
00356       set("maxNumberOfExpectedMissingHits", 0);
00357     }
00358     else if (version_ == relIso60) {
00359       set("trackIso_EB", 4.0e-02);
00360       set("ecalIso_EB",  4.0e-02);
00361       set("hcalIso_EB",  3.0e-02);
00362       set("sihih_EB",    1.0e-02);
00363       set("dphi_EB",     2.5e-02);
00364       set("deta_EB",     4.0e-03);
00365       set("hoe_EB",      2.5e-02);
00366       set("cIso_EB",     100000.);
00367 
00368       set("trackIso_EE", 2.5e-02);
00369       set("ecalIso_EE",  2.0e-02);
00370       set("hcalIso_EE",  2.0e-02);
00371       set("sihih_EE",    3.0e-02);
00372       set("dphi_EE",     2.0e-02);
00373       set("deta_EE",     5.0e-03);
00374       set("hoe_EE",      2.5e-02);
00375       set("cIso_EE",     100000.);
00376       
00377       set("conversionRejection",            1);
00378       set("maxNumberOfExpectedMissingHits", 0);
00379     }
00380     else if (version_ == cIso60) {
00381       set("trackIso_EB", 100000.);
00382       set("ecalIso_EB",  100000.);
00383       set("hcalIso_EB",  100000.);
00384       set("sihih_EB",    1.0e-02);
00385       set("dphi_EB",     2.5e-02);
00386       set("deta_EB",     4.0e-03);
00387       set("hoe_EB",      2.5e-02);
00388       set("cIso_EB",     3.0e-02);
00389 
00390       set("trackIso_EE", 100000.);
00391       set("ecalIso_EE",  100000.);
00392       set("hcalIso_EE",  100000.);
00393       set("sihih_EE",    3.0e-02);
00394       set("dphi_EE",     2.0e-02);
00395       set("deta_EE",     5.0e-03);
00396       set("hoe_EE",      2.5e-02);
00397       set("cIso_EE",     2.0e-02);
00398       
00399       set("conversionRejection",            1);
00400       set("maxNumberOfExpectedMissingHits", 0);
00401     }
00402   }
00403 
00404   void initialize(Double_t trackIso_EB, Double_t ecalIso_EB, Double_t hcalIso_EB,
00405                   Double_t sihih_EB, Double_t  dphi_EB, Double_t deta_EB, Double_t hoe_EB,
00406                   Double_t cIso_EB,
00407                   Double_t trackIso_EE, Double_t ecalIso_EE, Double_t hcalIso_EE,
00408                   Double_t sihih_EE, Double_t  dphi_EE, Double_t deta_EE, Double_t hoe_EE,
00409                   Double_t cIso_EE, Int_t conversionRejection, 
00410                   Int_t maxNumberOfExpectedMissingHits)
00411   {
00412     version_ = NONE;
00413     push_back("trackIso_EB");
00414     push_back("ecalIso_EB" );
00415     push_back("hcalIso_EB" );
00416     push_back("sihih_EB"   );
00417     push_back("dphi_EB"    );
00418     push_back("deta_EB"    );
00419     push_back("hoe_EB"     );
00420     push_back("cIso_EB"    );
00421     
00422     push_back("trackIso_EE");
00423     push_back("ecalIso_EE" );
00424     push_back("hcalIso_EE" );
00425     push_back("sihih_EE"   );
00426     push_back("dphi_EE"    );
00427     push_back("deta_EE"    );
00428     push_back("hoe_EE"     );
00429     push_back("cIso_EE"    );
00430     
00431     push_back("conversionRejection"            );
00432     push_back("maxNumberOfExpectedMissingHits" );
00433     
00434    
00435     set("trackIso_EB", trackIso_EB);
00436     set("ecalIso_EB",  ecalIso_EB);
00437     set("hcalIso_EB",  hcalIso_EB);
00438     set("sihih_EB",    sihih_EB);
00439     set("dphi_EB",     dphi_EB);
00440     set("deta_EB",     deta_EB);
00441     set("hoe_EB",      hoe_EB);
00442     set("cIso_EB",     cIso_EB);
00443     
00444     set("trackIso_EE", trackIso_EE);
00445     set("ecalIso_EE",  ecalIso_EE);
00446     set("hcalIso_EE",  hcalIso_EE);
00447     set("sihih_EE",    sihih_EE);
00448     set("dphi_EE",     dphi_EE);
00449     set("deta_EE",     deta_EE);
00450     set("hoe_EE",      hoe_EE);
00451     set("cIso_EE",     cIso_EE);
00452     
00453     set("conversionRejection",            conversionRejection);
00454     set("maxNumberOfExpectedMissingHits", maxNumberOfExpectedMissingHits);
00455     
00456   }
00457 
00458   bool operator()( const pat::Electron & electron, pat::strbitset & ret ) 
00459   {
00460     // for the time being only Spring10 variable definition
00461     return spring10Variables(electron, ret);
00462   }
00463   using Selector<pat::Electron>::operator();
00464   // function with the Spring10 variable definitions
00465   bool spring10Variables( const pat::Electron & electron, pat::strbitset & ret) 
00466   {
00467     ret.set(false);
00468     //
00469     Double_t eleET = electron.p4().Pt();
00470     Double_t trackIso = electron.dr03TkSumPt()/eleET;
00471     Double_t ecalIso = electron.dr03EcalRecHitSumEt()/eleET;
00472     Double_t hcalIso = electron.dr03HcalTowerSumEt()/eleET;
00473     Double_t sihih   = electron.sigmaIetaIeta();
00474     Double_t Dphi    = electron.deltaPhiSuperClusterTrackAtVtx();
00475     Double_t Deta    = electron.deltaEtaSuperClusterTrackAtVtx();
00476     Double_t HoE     = electron.hadronicOverEm();
00477     Double_t cIso    = 0;
00478     if (electron.isEB()) { cIso = 
00479         ( electron.dr03TkSumPt() + std::max(0.,electron.dr03EcalRecHitSumEt() -1.) 
00480           + electron.dr03HcalTowerSumEt() ) / eleET;
00481     }
00482     else {
00483       cIso = ( electron.dr03TkSumPt()+electron.dr03EcalRecHitSumEt()+
00484                electron.dr03HcalTowerSumEt()  ) / eleET;
00485     }
00486     Int_t innerHits = electron.gsfTrack()->trackerExpectedHitsInner().numberOfHits();
00487     // in 39 conversion rejection variables are accessible from Gsf electron
00488     Double_t dist = electron.convDist(); // default value is -9999 if conversion partner not found
00489     Double_t dcot = electron.convDcot(); // default value is -9999 if conversion partner not found
00490     Bool_t isConv = fabs(dist) < 0.02 && fabs(dcot) < 0.02;
00491     // now apply the cuts
00492     if (electron.isEB()) { // BARREL case
00493       // check the EB cuts
00494       if ( trackIso   <  cut("trackIso_EB", double()) || ignoreCut("trackIso_EB")) passCut(ret, "trackIso_EB");
00495       if ( ecalIso    <  cut("ecalIso_EB",  double()) || ignoreCut("ecalIso_EB") ) passCut(ret, "ecalIso_EB");
00496       if ( hcalIso    <  cut("hcalIso_EB",  double()) || ignoreCut("hcalIso_EB") ) passCut(ret, "hcalIso_EB");
00497       if ( sihih      <  cut("sihih_EB",    double()) || ignoreCut("sihih_EB")   ) passCut(ret, "sihih_EB");
00498       if ( fabs(Dphi) <  cut("dphi_EB",     double()) || ignoreCut("dphi_EB")    ) passCut(ret, "dphi_EB");
00499       if ( fabs(Deta) <  cut("deta_EB",     double()) || ignoreCut("deta_EB")    ) passCut(ret, "deta_EB");
00500       if ( HoE        <  cut("hoe_EB",      double()) || ignoreCut("hoe_EB")     ) passCut(ret, "hoe_EB");
00501       if ( cIso       <  cut("cIso_EB",     double()) || ignoreCut("cIso_EB")    ) passCut(ret, "cIso_EB");
00502       // pass all the EE cuts
00503       passCut(ret, "trackIso_EE");      
00504       passCut(ret, "ecalIso_EE");       
00505       passCut(ret, "hcalIso_EE");       
00506       passCut(ret, "sihih_EE"); 
00507       passCut(ret, "dphi_EE");  
00508       passCut(ret, "deta_EE");  
00509       passCut(ret, "hoe_EE");   
00510       passCut(ret, "cIso_EE");     
00511     } else {  // ENDCAPS case
00512       // check the EE cuts
00513       if ( trackIso   <  cut("trackIso_EE", double()) || ignoreCut("trackIso_EE")) passCut(ret, "trackIso_EE");
00514       if ( ecalIso    <  cut("ecalIso_EE",  double()) || ignoreCut("ecalIso_EE") ) passCut(ret, "ecalIso_EE");
00515       if ( hcalIso    <  cut("hcalIso_EE",  double()) || ignoreCut("hcalIso_EE") ) passCut(ret, "hcalIso_EE");
00516       if ( sihih      <  cut("sihih_EE",    double()) || ignoreCut("sihih_EE")   ) passCut(ret, "sihih_EE");
00517       if ( fabs(Dphi) <  cut("dphi_EE",     double()) || ignoreCut("dphi_EE")    ) passCut(ret, "dphi_EE");
00518       if ( fabs(Deta) <  cut("deta_EE",     double()) || ignoreCut("deta_EE")    ) passCut(ret, "deta_EE");
00519       if ( HoE        <  cut("hoe_EE",      double()) || ignoreCut("hoe_EE")     ) passCut(ret, "hoe_EE");
00520       if ( cIso       <  cut("cIso_EE",     double()) || ignoreCut("cIso_EE")    ) passCut(ret, "cIso_EE");     
00521       // pass all the EB cuts
00522       passCut(ret, "trackIso_EB");      
00523       passCut(ret, "ecalIso_EB");       
00524       passCut(ret, "hcalIso_EB");       
00525       passCut(ret, "sihih_EB"); 
00526       passCut(ret, "dphi_EB");  
00527       passCut(ret, "deta_EB");  
00528       passCut(ret, "hoe_EB");   
00529       passCut(ret, "cIso_EB");     
00530     }
00531 
00532     // conversion rejection common for EB and EE
00533     if ( innerHits  <=  cut("maxNumberOfExpectedMissingHits", int())) 
00534       passCut(ret, "maxNumberOfExpectedMissingHits");    
00535     if ( 0==cut("conversionRejection", int()) || isConv==false)
00536       passCut(ret, "conversionRejection");
00537     setIgnored(ret);   
00538     return (bool)ret;
00539   }
00540 
00541 
00542 
00543  private: // member variables
00544   // version of the cuts  
00545   Version_t version_;
00546 };
00547 
00548 
00549 #endif