CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/PhysicsTools/SelectorUtils/interface/JetIDSelectionFunctor.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_PatUtils_interface_JetIDSelectionFunctor_h
00002 #define PhysicsTools_PatUtils_interface_JetIDSelectionFunctor_h
00003 
00004 
00022 #include "DataFormats/PatCandidates/interface/Jet.h"
00023 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00024 
00025 #include "PhysicsTools/SelectorUtils/interface/Selector.h"
00026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00027 
00028 #include <TMath.h>
00029 class JetIDSelectionFunctor : public Selector<pat::Jet>  {
00030 
00031  public: // interface
00032 
00033   enum Version_t { CRAFT08, PURE09, DQM09, N_VERSIONS };
00034   enum Quality_t { MINIMAL, LOOSE_AOD, LOOSE, TIGHT, N_QUALITY};
00035 
00036   JetIDSelectionFunctor() {}
00037 
00038 
00039   JetIDSelectionFunctor( edm::ParameterSet const & parameters ) {
00040     std::string versionStr = parameters.getParameter<std::string>("version");
00041     std::string qualityStr = parameters.getParameter<std::string>("quality");
00042     Quality_t quality = N_QUALITY;
00043 
00044     if      ( qualityStr == "MINIMAL" )   quality = MINIMAL;
00045     else if ( qualityStr == "LOOSE_AOD" ) quality = LOOSE_AOD;
00046     else if ( qualityStr == "LOOSE" )     quality = LOOSE;
00047     else if ( qualityStr == "TIGHT" )     quality = TIGHT;
00048     else       
00049       throw cms::Exception("InvalidInput") << "Expect quality to be one of MINIMAL, LOOSE_AOD, LOOSE,TIGHT" << std::endl;
00050 
00051 
00052     if ( versionStr == "CRAFT08" ) {
00053       initialize( CRAFT08, quality );
00054     } 
00055     else if ( versionStr == "PURE09" ) {
00056       initialize( PURE09, quality );
00057     }
00058     else if ( versionStr == "DQM09" ) {
00059       initialize( DQM09, quality );
00060     }
00061     else {
00062       throw cms::Exception("InvalidInput") << "Expect version to be one of CRAFT08, PURE09, DQM09" << std::endl;
00063     }
00064   }
00065 
00066   JetIDSelectionFunctor( Version_t version, Quality_t quality ) {
00067     initialize(version, quality);
00068   }
00069 
00070  void initialize( Version_t version, Quality_t quality )
00071   {
00072 
00073     version_ = version;
00074     quality_ = quality;
00075 
00076     push_back("MINIMAL_EMF");
00077 
00078     push_back("LOOSE_AOD_fHPD");
00079     push_back("LOOSE_AOD_N90Hits");
00080     push_back("LOOSE_AOD_EMF");
00081 
00082     push_back("LOOSE_fHPD");
00083     push_back("LOOSE_N90Hits");
00084     push_back("LOOSE_EMF");
00085 
00086     push_back("TIGHT_fHPD");
00087     push_back("TIGHT_EMF");
00088 
00089     push_back("LOOSE_nHit");
00090     push_back("LOOSE_als");
00091     push_back("LOOSE_fls");
00092     push_back("LOOSE_foot");
00093 
00094     push_back("TIGHT_nHit");
00095     push_back("TIGHT_als");
00096     push_back("TIGHT_fls");
00097     push_back("TIGHT_foot");
00098     push_back("widths");
00099     push_back("EF_N90Hits");
00100     push_back("EF_EMF");
00101 
00102 
00103     bool use_09_fwd_id = version_ != CRAFT08; // CRAFT08 predates the 09 forward ID cuts
00104     bool use_dqm_09 = version_ == DQM09 && quality_ != LOOSE_AOD;
00105 
00106     // all appropriate for version and format (AOD complications) are on by default
00107     set( "MINIMAL_EMF" );
00108     set( "LOOSE_AOD_fHPD" );
00109     set( "LOOSE_AOD_N90Hits" );
00110     set( "LOOSE_AOD_EMF", ! use_09_fwd_id ); // except in CRAFT08, this devolves into MINIMAL_EMF
00111     set( "LOOSE_fHPD" );
00112     set( "LOOSE_N90Hits" );
00113     set( "LOOSE_EMF", ! use_09_fwd_id ); // except in CRAFT08, this devolves into MINIMAL_EMF
00114     set( "TIGHT_fHPD" );
00115     set( "TIGHT_EMF" );
00116 
00117     set( "LOOSE_nHit", use_09_fwd_id );
00118     set( "LOOSE_als", use_09_fwd_id );
00119     set( "TIGHT_nHit", use_09_fwd_id );
00120     set( "TIGHT_als", use_09_fwd_id );
00121     set( "widths", use_09_fwd_id );
00122     set( "EF_N90Hits", use_09_fwd_id );
00123     set( "EF_EMF", use_09_fwd_id );
00124 
00125     set( "LOOSE_fls", use_dqm_09 );
00126     set( "LOOSE_foot", use_dqm_09 );
00127     set( "TIGHT_fls", use_dqm_09 );
00128     set( "TIGHT_foot", use_dqm_09 );
00129 
00130 
00131 
00132 
00133     index_MINIMAL_EMF_       = index_type(&bits_, "MINIMAL_EMF");
00134                                                                       
00135     index_LOOSE_AOD_fHPD_    = index_type(&bits_, "LOOSE_AOD_fHPD");
00136     index_LOOSE_AOD_N90Hits_ = index_type(&bits_, "LOOSE_AOD_N90Hits");
00137     index_LOOSE_AOD_EMF_     = index_type(&bits_, "LOOSE_AOD_EMF");
00138                                                                       
00139     index_LOOSE_fHPD_        = index_type(&bits_, "LOOSE_fHPD");
00140     index_LOOSE_N90Hits_     = index_type(&bits_, "LOOSE_N90Hits");
00141     index_LOOSE_EMF_         = index_type(&bits_, "LOOSE_EMF");
00142                                                                       
00143     index_TIGHT_fHPD_        = index_type(&bits_, "TIGHT_fHPD");
00144     index_TIGHT_EMF_         = index_type(&bits_, "TIGHT_EMF");
00145                                                                       
00146     index_LOOSE_nHit_        = index_type(&bits_, "LOOSE_nHit");
00147     index_LOOSE_als_         = index_type(&bits_, "LOOSE_als");
00148     index_LOOSE_fls_         = index_type(&bits_, "LOOSE_fls");
00149     index_LOOSE_foot_        = index_type(&bits_, "LOOSE_foot");
00150                                                                       
00151     index_TIGHT_nHit_        = index_type(&bits_, "TIGHT_nHit");
00152     index_TIGHT_als_         = index_type(&bits_, "TIGHT_als");
00153     index_TIGHT_fls_         = index_type(&bits_, "TIGHT_fls");
00154     index_TIGHT_foot_        = index_type(&bits_, "TIGHT_foot");
00155     index_widths_            = index_type(&bits_, "widths");
00156     index_EF_N90Hits_        = index_type(&bits_, "EF_N90Hits");
00157     index_EF_EMF_            = index_type(&bits_, "EF_EMF");
00158 
00159     // now set the return values for the ignored parts
00160     bool use_loose_aod = false;
00161     bool use_loose = false;
00162     bool use_tight = false;
00163     bool use_tight_09_fwd_id = false;
00164     bool use_loose_09_fwd_id = false;
00165     // if ( quality_ == MINIMAL ) nothing to do...
00166     if ( quality_ == LOOSE ) {
00167       use_loose = true;
00168       if( use_09_fwd_id ) use_loose_09_fwd_id = true;
00169     } 
00170     if ( quality_ == LOOSE_AOD ) {
00171       use_loose_aod = true;
00172       if( use_09_fwd_id ) use_loose_09_fwd_id = true;
00173     }
00174     if ( quality_ == TIGHT ) {
00175       use_tight = true;
00176       if( use_09_fwd_id ) use_tight_09_fwd_id = true;
00177     }
00178 
00179     if( ! use_loose_aod ) {
00180       set("LOOSE_AOD_fHPD", false );
00181       set("LOOSE_AOD_N90Hits", false );
00182       set("LOOSE_AOD_EMF", false );
00183     }
00184 
00185     if( ! ( use_loose || use_tight ) ) { // the CRAFT08 cuts are cumulative
00186       set("LOOSE_N90Hits", false );
00187       set("LOOSE_fHPD", false );
00188       set("LOOSE_EMF", false );
00189     }
00190 
00191     if( ! use_tight ) {
00192       set("TIGHT_fHPD", false );
00193       set("TIGHT_EMF", false );      
00194     }
00195 
00196     if( ! use_loose_09_fwd_id ) { // the FWD09 cuts are not
00197       set( "LOOSE_nHit", false );
00198       set( "LOOSE_als", false );
00199       if( use_dqm_09 ) {
00200         set( "LOOSE_fls", false );
00201         set( "LOOSE_foot", false );
00202       }
00203     } // not using loose 09 fwd ID
00204 
00205     if( ! use_tight_09_fwd_id ) {
00206       set( "TIGHT_nHit", false );
00207       set( "TIGHT_als", false );
00208       set( "widths", false );
00209       set( "EF_N90Hits", false );
00210       set( "EF_EMF", false );
00211       if( use_dqm_09 ) {
00212         set( "TIGHT_fls", false );
00213         set( "TIGHT_foot", false );
00214       }
00215     } // not using tight 09 fwd ID
00216 
00217     retInternal_ = getBitTemplate();
00218   }
00219 
00220   // this functionality should be migrated into JetIDHelper in future releases
00221   unsigned int count_hits( const std::vector<CaloTowerPtr> & towers )
00222   {
00223     unsigned int nHit = 0;
00224     for ( unsigned int iTower = 0; iTower < towers.size() ; ++iTower ) {
00225       const std::vector<DetId>& cellIDs = towers[iTower]->constituents();  // cell == recHit
00226       nHit += cellIDs.size();
00227     }
00228     return nHit;
00229   }
00230 
00231   // 
00232   // Accessor from PAT jets
00233   // 
00234   bool operator()( const pat::Jet & jet, pat::strbitset & ret )  
00235   {
00236     if ( ! jet.isCaloJet() && !jet.isJPTJet() ) {
00237       edm::LogWarning( "NYI" )<<"Criteria for pat::Jet-s other than CaloJets and JPTJets are not yet implemented";
00238       return false;
00239     }
00240     if ( version_ == CRAFT08 ) return craft08Cuts( jet.p4(), jet.emEnergyFraction(), jet.jetID(), ret );
00241     if ( version_ == PURE09 || version_ == DQM09 ) {
00242       unsigned int nHit = count_hits( jet.getCaloConstituents() );
00243       if ( jet.currentJECLevel() == "Uncorrected" ) {
00244         return fwd09Cuts( jet.p4(), jet.emEnergyFraction(), jet.etaetaMoment(), jet.phiphiMoment(), nHit,
00245                           jet.jetID(), ret );
00246       }
00247       else {
00248         return fwd09Cuts( jet.correctedP4("Uncorrected"), jet.emEnergyFraction(), jet.etaetaMoment(), jet.phiphiMoment(), nHit,
00249                           jet.jetID(), ret );
00250       }
00251     }
00252     edm::LogWarning( "BadInput | NYI" )<<"Requested version ("<<version_<<") is unknown";
00253     return false;
00254   }
00255 
00256   // accessor from PAT jets without the ret
00257   using Selector<pat::Jet>::operator();
00258 
00259   // 
00260   // Accessor from *CORRECTED* 4-vector, EMF, and Jet ID. 
00261   // This can be used with reco quantities. 
00262   // 
00263   bool operator()( reco::Candidate::LorentzVector const & correctedP4, 
00264                    double emEnergyFraction, 
00265                    reco::JetID const & jetID,
00266                    pat::strbitset & ret )  
00267   {
00268     if ( version_ == CRAFT08 ) return craft08Cuts( correctedP4, emEnergyFraction, jetID, ret );
00269     edm::LogWarning( "BadInput | NYI" )<<"Requested version ("<<version_
00270                                        <<") is unknown or doesn't match the depreceated interface used";
00271     return false;
00272   }
00274   virtual bool operator()( reco::Candidate::LorentzVector const & correctedP4, 
00275                            double emEnergyFraction, 
00276                            reco::JetID const & jetID )
00277   {
00278     retInternal_.set(false);
00279     operator()(correctedP4,emEnergyFraction, jetID, retInternal_);
00280     setIgnored(retInternal_);
00281     return (bool)retInternal_;
00282   }
00283 
00284   // 
00285   // Accessor from CaloJet and Jet ID. Jets MUST BE corrected for craft08, but uncorrected for later cuts...
00286   // This can be used with reco quantities. 
00287   // 
00288   bool operator()( reco::CaloJet const & jet,
00289                    reco::JetID const & jetID,
00290                    pat::strbitset & ret )  
00291   {
00292     if ( version_ == CRAFT08 ) return craft08Cuts( jet.p4(), jet.emEnergyFraction(), jetID, ret );
00293     if ( version_ == PURE09 || version_ == DQM09 ) {
00294       unsigned int nHit = count_hits( jet.getCaloConstituents() );
00295       return fwd09Cuts( jet.p4(), jet.emEnergyFraction(), jet.etaetaMoment(), jet.phiphiMoment(), nHit,
00296                         jetID, ret );
00297     }
00298     edm::LogWarning( "BadInput | NYI" )<<"Requested version ("<<version_<<") is unknown";
00299     return false;
00300   }
00301 
00303   virtual bool operator()( reco::CaloJet const & jet,
00304                            reco::JetID const & jetID )
00305   {
00306     retInternal_.set(false);
00307     operator()(jet, jetID, retInternal_);
00308     setIgnored(retInternal_);
00309     return (bool)retInternal_;
00310   }
00311   
00312   // 
00313   // cuts based on craft 08 analysis. 
00314   // 
00315   bool craft08Cuts( reco::Candidate::LorentzVector const & correctedP4, 
00316                     double emEnergyFraction,
00317                     reco::JetID const & jetID,
00318                     pat::strbitset & ret) 
00319   {
00320     
00321     ret.set(false);
00322 
00323     // cache some variables
00324     double abs_eta = TMath::Abs( correctedP4.eta() );
00325     double corrPt = correctedP4.pt();
00326     double emf = emEnergyFraction;
00327 
00328     if ( ignoreCut(index_MINIMAL_EMF_) || abs_eta > 2.6 || emf > 0.01 ) passCut( ret, index_MINIMAL_EMF_);
00329             
00330     if ( quality_ == LOOSE_AOD ) {
00331       // loose fhpd cut from aod
00332       if ( ignoreCut(index_LOOSE_AOD_fHPD_)    || jetID.approximatefHPD < 0.98 ) passCut( ret, index_LOOSE_AOD_fHPD_);
00333       // loose n90 hits cut
00334       if ( ignoreCut(index_LOOSE_AOD_N90Hits_) || jetID.hitsInN90 > 1 ) passCut( ret, index_LOOSE_AOD_N90Hits_);
00335       
00336       // loose EMF Cut from aod
00337       bool emf_loose = true;
00338       if( abs_eta <= 2.6 ) { // HBHE
00339         if( emEnergyFraction <= 0.01 ) emf_loose = false;
00340       } else {                // HF
00341         if( emEnergyFraction <= -0.9 ) emf_loose = false;
00342         if( corrPt > 80 && emEnergyFraction >= 1 ) emf_loose = false;
00343       }
00344       if ( ignoreCut(index_LOOSE_AOD_EMF_) || emf_loose ) passCut(ret, index_LOOSE_AOD_EMF_);
00345         
00346     }
00347     else if ( quality_ == LOOSE || quality_ == TIGHT ) {
00348       // loose fhpd cut
00349       if ( ignoreCut(index_LOOSE_fHPD_)    || jetID.fHPD < 0.98 ) passCut( ret, index_LOOSE_fHPD_);
00350       // loose n90 hits cut
00351       if ( ignoreCut(index_LOOSE_N90Hits_) || jetID.n90Hits > 1 ) passCut( ret, index_LOOSE_N90Hits_);
00352 
00353       // loose EMF Cut
00354       bool emf_loose = true;
00355       if( abs_eta <= 2.6 ) { // HBHE
00356         if( emEnergyFraction <= 0.01 ) emf_loose = false;
00357       } else {                // HF
00358         if( emEnergyFraction <= -0.9 ) emf_loose = false;
00359         if( corrPt > 80 && emEnergyFraction >= 1 ) emf_loose = false;
00360       }
00361       if ( ignoreCut(index_LOOSE_EMF_) || emf_loose ) passCut(ret, index_LOOSE_EMF_);
00362  
00363       if ( quality_ == TIGHT ) {
00364         // tight fhpd cut
00365         bool tight_fhpd = true;
00366         if ( corrPt >= 25 && jetID.fHPD >= 0.95 ) tight_fhpd = false; // this was supposed to use raw pT, see AN2009/087 :-(
00367         if ( ignoreCut(index_TIGHT_fHPD_) || tight_fhpd ) passCut(ret, index_TIGHT_fHPD_);
00368         
00369         // tight emf cut
00370         bool tight_emf = true;
00371         if( abs_eta >= 1 && corrPt >= 80 && emEnergyFraction >= 1 ) tight_emf = false; // outside HB      
00372         if( abs_eta >= 2.6 ) { // outside HBHE
00373           if( emEnergyFraction <= -0.3 ) tight_emf = false;
00374           if( abs_eta < 3.25 ) { // HE-HF transition region
00375             if( corrPt >= 50 && emEnergyFraction <= -0.2 ) tight_emf = false;
00376             if( corrPt >= 80 && emEnergyFraction <= -0.1 ) tight_emf = false;   
00377             if( corrPt >= 340 && emEnergyFraction >= 0.95 ) tight_emf = false;
00378           } else { // HF
00379             if( emEnergyFraction >= 0.9 ) tight_emf = false;
00380             if( corrPt >= 50 && emEnergyFraction <= -0.2 ) tight_emf = false;
00381             if( corrPt >= 50 && emEnergyFraction >= 0.8 ) tight_emf = false;
00382             if( corrPt >= 130 && emEnergyFraction <= -0.1 ) tight_emf = false;
00383             if( corrPt >= 130 && emEnergyFraction >= 0.7 ) tight_emf = false;
00384             
00385           } // end if HF
00386         }// end if outside HBHE
00387         if ( ignoreCut(index_TIGHT_EMF_) || tight_emf ) passCut(ret, index_TIGHT_EMF_);
00388       }// end if tight
00389     }// end if loose or tight
00390 
00391     setIgnored( ret );    
00392 
00393     return (bool)ret;
00394   }
00395 
00396   // 
00397   // cuts based on craft 08 analysis + forward jet ID based on 09 data 
00398   // 
00399   bool fwd09Cuts( reco::Candidate::LorentzVector const & rawP4, 
00400                   double emEnergyFraction, double etaWidth, double phiWidth, unsigned int nHit, 
00401                   reco::JetID const & jetID,
00402                   pat::strbitset & ret) 
00403   {
00404     ret.set(false);
00405 
00406     // cache some variables
00407     double abs_eta = TMath::Abs( rawP4.eta() );
00408     double rawPt = rawP4.pt();
00409     double emf = emEnergyFraction;
00410     double fhf = jetID.fLong + jetID.fShort;
00411     double lnpt = ( rawPt > 0 ) ? TMath::Log( rawPt ) : -10;
00412     double lnE = ( rawP4.energy() > 0 ) ? TMath::Log( rawP4.energy() ) : -10;
00413 
00414     bool HB = abs_eta < 1.0;
00415     bool EF = 2.6 <= abs_eta && abs_eta < 3.4 && 0.1 <= fhf && fhf < 0.9;
00416     bool HBHE = abs_eta < 2.6 || ( abs_eta < 3.4 && fhf < 0.1 );
00417     bool HF = 3.4 <= abs_eta  || ( 2.6 <= abs_eta && 0.9 <= fhf );
00418     bool HFa = HF && abs_eta < 3.8;
00419     bool HFb = HF && ! HFa;
00420 
00421     // HBHE cuts as in CRAFT08
00422     // - but using raw pTs
00423     // ========================
00424 
00425     if ( (!HBHE) || ignoreCut(index_MINIMAL_EMF_) || emf > 0.01 ) passCut( ret, index_MINIMAL_EMF_);
00426             
00427     // loose fhpd cut from AOD
00428     if ( (!HBHE) || ignoreCut(index_LOOSE_AOD_fHPD_) || jetID.approximatefHPD < 0.98 ) passCut( ret, index_LOOSE_AOD_fHPD_);
00429     // loose n90 hits cut from AOD
00430     if ( (!HBHE) || ignoreCut(index_LOOSE_AOD_N90Hits_) || jetID.hitsInN90 > 1 ) passCut( ret, index_LOOSE_AOD_N90Hits_);
00431 
00432     // loose fhpd cut
00433     if ( (!HBHE) || ignoreCut(index_LOOSE_fHPD_) || jetID.fHPD < 0.98 ) passCut( ret, index_LOOSE_fHPD_);
00434     // loose n90 hits cut
00435     if ( (!HBHE) || ignoreCut(index_LOOSE_N90Hits_) || jetID.n90Hits > 1 ) passCut( ret, index_LOOSE_N90Hits_);
00436  
00437     // tight fhpd cut
00438     if ( (!HBHE) || ignoreCut(index_TIGHT_fHPD_) || rawPt < 25 || jetID.fHPD < 0.95 ) passCut(ret, index_TIGHT_fHPD_);
00439       
00440     // tight emf cut
00441     if ( (!HBHE) || ignoreCut(index_TIGHT_EMF_) || HB || rawPt < 55 || emf < 1 ) passCut(ret, index_TIGHT_EMF_);
00442 
00443  
00444     // EF - these cuts are only used in "tight", but there's no need for this test here.
00445 
00446     if( (!EF) || ignoreCut( index_EF_N90Hits_ ) 
00447         || jetID.n90Hits > 1 + 1.5 * TMath::Max( 0., lnpt - 1.5 ) ) 
00448       passCut( ret, index_EF_N90Hits_ );
00449 
00450     if( (!EF) || ignoreCut( index_EF_EMF_ ) 
00451         || emf > TMath::Max( -0.9, -0.1 - 0.05 * TMath::Power( TMath::Max( 0., 5 - lnpt ), 2. ) ) )
00452       passCut( ret, index_EF_EMF_ );
00453 
00454     // both EF and HF
00455 
00456     if( ( !( EF || HF ) ) || ignoreCut( index_TIGHT_fls_ )
00457         || ( EF && jetID.fLS < TMath::Min( 0.8, 0.1 + 0.016 * TMath::Power( TMath::Max( 0., 6 - lnpt ), 2.5 ) ) )
00458         || ( HFa && jetID.fLS < TMath::Min( 0.6, 0.05 + 0.045 * TMath::Power( TMath::Max( 0., 7.5 - lnE ), 2.2 ) ) ) 
00459         || ( HFb && jetID.fLS < TMath::Min( 0.1, 0.05 + 0.07 * TMath::Power( TMath::Max( 0., 7.8 - lnE ), 2. ) ) ) )
00460       passCut( ret, index_TIGHT_fls_ );
00461 
00462     if( ( !( EF || HF ) ) || ignoreCut( index_widths_ )
00463         || ( 1E-10 < etaWidth && etaWidth < 0.12 && 
00464              1E-10 < phiWidth && phiWidth < 0.12 ) )
00465       passCut( ret, index_widths_ );
00466 
00467     // HF cuts
00468 
00469     if( (!HF) || ignoreCut( index_LOOSE_nHit_ ) 
00470         || ( HFa && nHit > 1 + 2.4*( lnpt - 1. ) ) 
00471         || ( HFb && nHit > 1 + 3.*( lnpt - 1. ) ) )
00472       passCut( ret, index_LOOSE_nHit_ );
00473 
00474     if( (!HF) || ignoreCut( index_LOOSE_als_ )
00475         || ( emf < 0.6 + 0.05 * TMath::Power( TMath::Max( 0., 9 - lnE ), 1.5 ) &&
00476              emf > -0.2 - 0.041 * TMath::Power( TMath::Max( 0., 7.5 - lnE ), 2.2 ) ) )
00477       passCut( ret, index_LOOSE_als_ ); 
00478       
00479     if( (!HF) || ignoreCut( index_LOOSE_fls_ )
00480         || ( HFa && jetID.fLS < TMath::Min( 0.9, 0.1 + 0.05 * TMath::Power( TMath::Max( 0., 7.5 - lnE ), 2.2 ) ) )
00481         || ( HFb && jetID.fLS < TMath::Min( 0.6, 0.1 + 0.065 * TMath::Power( TMath::Max( 0., 7.5 - lnE ), 2.2 ) ) ) )
00482       passCut( ret, index_LOOSE_fls_ ); 
00483 
00484     if( (!HF) || ignoreCut( index_LOOSE_foot_ )
00485         || jetID.fHFOOT < 0.9 )
00486       passCut( ret, index_LOOSE_foot_ );
00487       
00488     if( (!HF) || ignoreCut( index_TIGHT_nHit_ )
00489         || ( HFa && nHit > 1 + 2.7*( lnpt - 0.8 ) ) 
00490         || ( HFb && nHit > 1 + 3.5*( lnpt - 0.8 ) ) )
00491       passCut( ret, index_TIGHT_nHit_ );
00492 
00493     if( (!HF) || ignoreCut( index_TIGHT_als_ ) 
00494         || ( emf < 0.5 + 0.057 * TMath::Power( TMath::Max( 0., 9 - lnE ), 1.5 ) &&
00495              emf > TMath::Max( -0.6, -0.1 - 0.026 * TMath::Power( TMath::Max( 0., 8 - lnE ), 2.2 ) ) ) )
00496       passCut( ret, index_TIGHT_als_ ); 
00497 
00498     if( (!HF) || ignoreCut( index_TIGHT_foot_ ) 
00499         || jetID.fLS < 0.5 )
00500       passCut( ret, index_TIGHT_foot_ );
00501 
00502     setIgnored( ret );    
00503 
00504     return (bool)ret;
00505   }
00506   
00507  private: // member variables
00508   
00509   Version_t version_;
00510   Quality_t quality_;
00511 
00512   index_type index_MINIMAL_EMF_       ;
00513                             
00514   index_type index_LOOSE_AOD_fHPD_    ;
00515   index_type index_LOOSE_AOD_N90Hits_ ;
00516   index_type index_LOOSE_AOD_EMF_     ;
00517                             
00518   index_type index_LOOSE_fHPD_        ;
00519   index_type index_LOOSE_N90Hits_     ;
00520   index_type index_LOOSE_EMF_         ;
00521                             
00522   index_type index_TIGHT_fHPD_        ;
00523   index_type index_TIGHT_EMF_         ;
00524                             
00525   index_type index_LOOSE_nHit_        ;
00526   index_type index_LOOSE_als_         ;
00527   index_type index_LOOSE_fls_         ;
00528   index_type index_LOOSE_foot_        ;
00529   
00530   index_type index_TIGHT_nHit_        ;
00531   index_type index_TIGHT_als_         ;
00532   index_type index_TIGHT_fls_         ;
00533   index_type index_TIGHT_foot_        ;
00534   index_type index_widths_            ;
00535   index_type index_EF_N90Hits_        ;
00536   index_type index_EF_EMF_            ;
00537   
00538 };
00539 
00540 #endif