CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/L1Trigger/L1ExtraFromDigis/src/L1ExtraParticleMapProd.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    L1ExtraParticleMapProd
00004 // Class:      L1ExtraParticleMapProd
00005 // 
00008 //
00009 // Original Author:  Werner Sun
00010 //         Created:  Mon Oct 16 23:19:38 EDT 2006
00011 // $Id: L1ExtraParticleMapProd.cc,v 1.30 2009/05/27 11:12:11 fabiocos Exp $
00012 //
00013 //
00014 
00015 
00016 // system include files
00017 #include <memory>
00018 
00019 // user include files
00020 #include "L1Trigger/L1ExtraFromDigis/interface/L1ExtraParticleMapProd.h"
00021 
00022 //#include "FWCore/Framework/interface/MakerMacros.h"
00023 
00024 #include "DataFormats/Common/interface/Handle.h"
00025 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00026 
00027 #include "CLHEP/Random/RandFlat.h"
00028 
00029 static const int kDefault = -1 ;
00030 
00031 //
00032 // constants, enums and typedefs
00033 //
00034 
00035 //
00036 // static data member definitions
00037 //
00038 
00039 //
00040 // constructors and destructor
00041 //
00042 L1ExtraParticleMapProd::L1ExtraParticleMapProd(
00043    const edm::ParameterSet& iConfig)
00044    : muonSource_( iConfig.getParameter< edm::InputTag >(
00045       "muonSource" ) ),
00046      isoEmSource_( iConfig.getParameter< edm::InputTag >(
00047         "isolatedEmSource" ) ),
00048      nonIsoEmSource_( iConfig.getParameter< edm::InputTag >(
00049         "nonIsolatedEmSource" ) ),
00050      cenJetSource_( iConfig.getParameter< edm::InputTag >(
00051         "centralJetSource" ) ),
00052      forJetSource_( iConfig.getParameter< edm::InputTag >(
00053         "forwardJetSource" ) ),
00054      tauJetSource_( iConfig.getParameter< edm::InputTag >(
00055         "tauJetSource" ) ),
00056      etMissSource_( iConfig.getParameter< edm::InputTag >(
00057         "etMissSource" ) ),
00058      htMissSource_( iConfig.getParameter< edm::InputTag >(
00059         "htMissSource" ) )
00060 {
00061    using namespace l1extra ;
00062 
00063    //register your products
00064    produces< L1ParticleMapCollection >() ;
00065    produces< L1GlobalTriggerReadoutRecord >(); 
00066 
00067    //now do what ever other initialization is needed
00068    for( int i = 0 ; i < L1ParticleMap::kNumOfL1TriggerTypes ; ++i )
00069    {
00070       singleThresholds_[ i ] = 0. ;
00071       doubleThresholds_[ i ].first = 0. ;
00072       doubleThresholds_[ i ].second = 0. ;
00073       prescaleCounters_[ i ] = 1 ;
00074       prescales_[ i ] = 1 ;
00075    }
00076 
00077    // Single object triggers, 5 thresholds each
00078 
00079    singleThresholds_[ L1ParticleMap::kSingleMu3 ] =
00080       iConfig.getParameter< double >( "L1_SingleMu3_thresh" ) ;
00081    prescales_[ L1ParticleMap::kSingleMu3 ] =
00082       iConfig.getParameter< int >( "L1_SingleMu3_prescale" ) ;
00083    singleThresholds_[ L1ParticleMap::kSingleMu5 ] =
00084       iConfig.getParameter< double >( "L1_SingleMu5_thresh" ) ;
00085    prescales_[ L1ParticleMap::kSingleMu5 ] =
00086       iConfig.getParameter< int >( "L1_SingleMu5_prescale" ) ;
00087    singleThresholds_[ L1ParticleMap::kSingleMu7 ] =
00088       iConfig.getParameter< double >( "L1_SingleMu7_thresh" ) ;
00089    prescales_[ L1ParticleMap::kSingleMu7 ] =
00090       iConfig.getParameter< int >( "L1_SingleMu7_prescale" ) ;
00091    singleThresholds_[ L1ParticleMap::kSingleMu10 ] =
00092       iConfig.getParameter< double >( "L1_SingleMu10_thresh" ) ;
00093    prescales_[ L1ParticleMap::kSingleMu10 ] =
00094       iConfig.getParameter< int >( "L1_SingleMu10_prescale" ) ;
00095    singleThresholds_[ L1ParticleMap::kSingleMu14 ] =
00096       iConfig.getParameter< double >( "L1_SingleMu14_thresh" ) ;
00097    prescales_[ L1ParticleMap::kSingleMu14 ] =
00098       iConfig.getParameter< int >( "L1_SingleMu14_prescale" ) ;
00099    singleThresholds_[ L1ParticleMap::kSingleMu20 ] =
00100       iConfig.getParameter< double >( "L1_SingleMu20_thresh" ) ;
00101    prescales_[ L1ParticleMap::kSingleMu20 ] =
00102       iConfig.getParameter< int >( "L1_SingleMu20_prescale" ) ;
00103    singleThresholds_[ L1ParticleMap::kSingleMu25 ] =
00104       iConfig.getParameter< double >( "L1_SingleMu25_thresh" ) ;
00105    prescales_[ L1ParticleMap::kSingleMu25 ] =
00106       iConfig.getParameter< int >( "L1_SingleMu25_prescale" ) ;
00107 
00108    singleThresholds_[ L1ParticleMap::kSingleIsoEG5 ] =
00109       iConfig.getParameter< double >( "L1_SingleIsoEG5_thresh" ) ;
00110    prescales_[ L1ParticleMap::kSingleIsoEG5 ] =
00111       iConfig.getParameter< int >( "L1_SingleIsoEG5_prescale" ) ;
00112    singleThresholds_[ L1ParticleMap::kSingleIsoEG8 ] =
00113       iConfig.getParameter< double >( "L1_SingleIsoEG8_thresh" ) ;
00114    prescales_[ L1ParticleMap::kSingleIsoEG8 ] =
00115       iConfig.getParameter< int >( "L1_SingleIsoEG8_prescale" ) ;
00116    singleThresholds_[ L1ParticleMap::kSingleIsoEG10 ] =
00117       iConfig.getParameter< double >( "L1_SingleIsoEG10_thresh" ) ;
00118    prescales_[ L1ParticleMap::kSingleIsoEG10 ] =
00119       iConfig.getParameter< int >( "L1_SingleIsoEG10_prescale" ) ;
00120    singleThresholds_[ L1ParticleMap::kSingleIsoEG12 ] =
00121       iConfig.getParameter< double >( "L1_SingleIsoEG12_thresh" ) ;
00122    prescales_[ L1ParticleMap::kSingleIsoEG12 ] =
00123       iConfig.getParameter< int >( "L1_SingleIsoEG12_prescale" ) ;
00124    singleThresholds_[ L1ParticleMap::kSingleIsoEG15 ] =
00125       iConfig.getParameter< double >( "L1_SingleIsoEG15_thresh" ) ;
00126    prescales_[ L1ParticleMap::kSingleIsoEG15 ] =
00127       iConfig.getParameter< int >( "L1_SingleIsoEG15_prescale" ) ;
00128    singleThresholds_[ L1ParticleMap::kSingleIsoEG20 ] =
00129       iConfig.getParameter< double >( "L1_SingleIsoEG20_thresh" ) ;
00130    prescales_[ L1ParticleMap::kSingleIsoEG20 ] =
00131       iConfig.getParameter< int >( "L1_SingleIsoEG20_prescale" ) ;
00132    singleThresholds_[ L1ParticleMap::kSingleIsoEG25 ] =
00133       iConfig.getParameter< double >( "L1_SingleIsoEG25_thresh" ) ;
00134    prescales_[ L1ParticleMap::kSingleIsoEG25 ] =
00135       iConfig.getParameter< int >( "L1_SingleIsoEG25_prescale" ) ;
00136 
00137    singleThresholds_[ L1ParticleMap::kSingleEG5 ] =
00138       iConfig.getParameter< double >( "L1_SingleEG5_thresh" ) ;
00139    prescales_[ L1ParticleMap::kSingleEG5 ] =
00140       iConfig.getParameter< int >( "L1_SingleEG5_prescale" ) ;
00141    singleThresholds_[ L1ParticleMap::kSingleEG8 ] =
00142       iConfig.getParameter< double >( "L1_SingleEG8_thresh" ) ;
00143    prescales_[ L1ParticleMap::kSingleEG8 ] =
00144       iConfig.getParameter< int >( "L1_SingleEG8_prescale" ) ;
00145    singleThresholds_[ L1ParticleMap::kSingleEG10 ] =
00146       iConfig.getParameter< double >( "L1_SingleEG10_thresh" ) ;
00147    prescales_[ L1ParticleMap::kSingleEG10 ] =
00148       iConfig.getParameter< int >( "L1_SingleEG10_prescale" ) ;
00149    singleThresholds_[ L1ParticleMap::kSingleEG12 ] =
00150       iConfig.getParameter< double >( "L1_SingleEG12_thresh" ) ;
00151    prescales_[ L1ParticleMap::kSingleEG12 ] =
00152       iConfig.getParameter< int >( "L1_SingleEG12_prescale" ) ;
00153    singleThresholds_[ L1ParticleMap::kSingleEG15 ] =
00154       iConfig.getParameter< double >( "L1_SingleEG15_thresh" ) ;
00155    prescales_[ L1ParticleMap::kSingleEG15 ] =
00156       iConfig.getParameter< int >( "L1_SingleEG15_prescale" ) ;
00157    singleThresholds_[ L1ParticleMap::kSingleEG20 ] =
00158       iConfig.getParameter< double >( "L1_SingleEG20_thresh" ) ;
00159    prescales_[ L1ParticleMap::kSingleEG20 ] =
00160       iConfig.getParameter< int >( "L1_SingleEG20_prescale" ) ;
00161    singleThresholds_[ L1ParticleMap::kSingleEG25 ] =
00162       iConfig.getParameter< double >( "L1_SingleEG25_thresh" ) ;
00163    prescales_[ L1ParticleMap::kSingleEG25 ] =
00164       iConfig.getParameter< int >( "L1_SingleEG25_prescale" ) ;
00165 
00166    singleThresholds_[ L1ParticleMap::kSingleJet15 ] =
00167       iConfig.getParameter< double >( "L1_SingleJet15_thresh" ) ;
00168    prescales_[ L1ParticleMap::kSingleJet15 ] =
00169       iConfig.getParameter< int >( "L1_SingleJet15_prescale" ) ;
00170    singleThresholds_[ L1ParticleMap::kSingleJet20 ] =
00171       iConfig.getParameter< double >( "L1_SingleJet20_thresh" ) ;
00172    prescales_[ L1ParticleMap::kSingleJet20 ] =
00173       iConfig.getParameter< int >( "L1_SingleJet20_prescale" ) ;
00174    singleThresholds_[ L1ParticleMap::kSingleJet30 ] =
00175       iConfig.getParameter< double >( "L1_SingleJet30_thresh" ) ;
00176    prescales_[ L1ParticleMap::kSingleJet30 ] =
00177       iConfig.getParameter< int >( "L1_SingleJet30_prescale" ) ;
00178    singleThresholds_[ L1ParticleMap::kSingleJet50 ] =
00179       iConfig.getParameter< double >( "L1_SingleJet50_thresh" ) ;
00180    prescales_[ L1ParticleMap::kSingleJet50 ] =
00181       iConfig.getParameter< int >( "L1_SingleJet50_prescale" ) ;
00182    singleThresholds_[ L1ParticleMap::kSingleJet70 ] =
00183       iConfig.getParameter< double >( "L1_SingleJet70_thresh" ) ;
00184    prescales_[ L1ParticleMap::kSingleJet70 ] =
00185       iConfig.getParameter< int >( "L1_SingleJet70_prescale" ) ;
00186    singleThresholds_[ L1ParticleMap::kSingleJet100 ] =
00187       iConfig.getParameter< double >( "L1_SingleJet100_thresh" ) ;
00188    prescales_[ L1ParticleMap::kSingleJet100 ] =
00189       iConfig.getParameter< int >( "L1_SingleJet100_prescale" ) ;
00190    singleThresholds_[ L1ParticleMap::kSingleJet150 ] =
00191       iConfig.getParameter< double >( "L1_SingleJet150_thresh" ) ;
00192    prescales_[ L1ParticleMap::kSingleJet150 ] =
00193       iConfig.getParameter< int >( "L1_SingleJet150_prescale" ) ;
00194    singleThresholds_[ L1ParticleMap::kSingleJet200 ] =
00195       iConfig.getParameter< double >( "L1_SingleJet200_thresh" ) ;
00196    prescales_[ L1ParticleMap::kSingleJet200 ] =
00197       iConfig.getParameter< int >( "L1_SingleJet200_prescale" ) ;
00198 
00199    singleThresholds_[ L1ParticleMap::kSingleTauJet10 ] =
00200       iConfig.getParameter< double >( "L1_SingleTauJet10_thresh" ) ;
00201    prescales_[ L1ParticleMap::kSingleTauJet10 ] =
00202       iConfig.getParameter< int >( "L1_SingleTauJet10_prescale" ) ;
00203    singleThresholds_[ L1ParticleMap::kSingleTauJet20 ] =
00204       iConfig.getParameter< double >( "L1_SingleTauJet20_thresh" ) ;
00205    prescales_[ L1ParticleMap::kSingleTauJet20 ] =
00206       iConfig.getParameter< int >( "L1_SingleTauJet20_prescale" ) ;
00207    singleThresholds_[ L1ParticleMap::kSingleTauJet30 ] =
00208       iConfig.getParameter< double >( "L1_SingleTauJet30_thresh" ) ;
00209    prescales_[ L1ParticleMap::kSingleTauJet30 ] =
00210       iConfig.getParameter< int >( "L1_SingleTauJet30_prescale" ) ;
00211    singleThresholds_[ L1ParticleMap::kSingleTauJet35 ] =
00212       iConfig.getParameter< double >( "L1_SingleTauJet35_thresh" ) ;
00213    prescales_[ L1ParticleMap::kSingleTauJet35 ] =
00214       iConfig.getParameter< int >( "L1_SingleTauJet35_prescale" ) ;
00215    singleThresholds_[ L1ParticleMap::kSingleTauJet40 ] =
00216       iConfig.getParameter< double >( "L1_SingleTauJet40_thresh" ) ;
00217    prescales_[ L1ParticleMap::kSingleTauJet40 ] =
00218       iConfig.getParameter< int >( "L1_SingleTauJet40_prescale" ) ;
00219    singleThresholds_[ L1ParticleMap::kSingleTauJet60 ] =
00220       iConfig.getParameter< double >( "L1_SingleTauJet60_thresh" ) ;
00221    prescales_[ L1ParticleMap::kSingleTauJet60 ] =
00222       iConfig.getParameter< int >( "L1_SingleTauJet60_prescale" ) ;
00223    singleThresholds_[ L1ParticleMap::kSingleTauJet80 ] =
00224       iConfig.getParameter< double >( "L1_SingleTauJet80_thresh" ) ;
00225    prescales_[ L1ParticleMap::kSingleTauJet80 ] =
00226       iConfig.getParameter< int >( "L1_SingleTauJet80_prescale" ) ;
00227    singleThresholds_[ L1ParticleMap::kSingleTauJet100 ] =
00228       iConfig.getParameter< double >( "L1_SingleTauJet100_thresh" ) ;
00229    prescales_[ L1ParticleMap::kSingleTauJet100 ] =
00230       iConfig.getParameter< int >( "L1_SingleTauJet100_prescale" ) ;
00231 
00232    singleThresholds_[ L1ParticleMap::kHTT100 ] =
00233       iConfig.getParameter< double >( "L1_HTT100_thresh" ) ;
00234    prescales_[ L1ParticleMap::kHTT100 ] =
00235       iConfig.getParameter< int >( "L1_HTT100_prescale" ) ;
00236    singleThresholds_[ L1ParticleMap::kHTT200 ] =
00237       iConfig.getParameter< double >( "L1_HTT200_thresh" ) ;
00238    prescales_[ L1ParticleMap::kHTT200 ] =
00239       iConfig.getParameter< int >( "L1_HTT200_prescale" ) ;
00240    singleThresholds_[ L1ParticleMap::kHTT250 ] =
00241       iConfig.getParameter< double >( "L1_HTT250_thresh" ) ;
00242    prescales_[ L1ParticleMap::kHTT250 ] =
00243       iConfig.getParameter< int >( "L1_HTT250_prescale" ) ;
00244    singleThresholds_[ L1ParticleMap::kHTT300 ] =
00245       iConfig.getParameter< double >( "L1_HTT300_thresh" ) ;
00246    prescales_[ L1ParticleMap::kHTT300 ] =
00247       iConfig.getParameter< int >( "L1_HTT300_prescale" ) ;
00248    singleThresholds_[ L1ParticleMap::kHTT400 ] =
00249       iConfig.getParameter< double >( "L1_HTT400_thresh" ) ;
00250    prescales_[ L1ParticleMap::kHTT400 ] =
00251       iConfig.getParameter< int >( "L1_HTT400_prescale" ) ;
00252    singleThresholds_[ L1ParticleMap::kHTT500 ] =
00253       iConfig.getParameter< double >( "L1_HTT500_thresh" ) ;
00254    prescales_[ L1ParticleMap::kHTT500 ] =
00255       iConfig.getParameter< int >( "L1_HTT500_prescale" ) ;
00256 
00257    singleThresholds_[ L1ParticleMap::kETM10 ] =
00258       iConfig.getParameter< double >( "L1_ETM10_thresh" ) ;
00259    prescales_[ L1ParticleMap::kETM10 ] =
00260       iConfig.getParameter< int >( "L1_ETM10_prescale" ) ;
00261    singleThresholds_[ L1ParticleMap::kETM15 ] =
00262       iConfig.getParameter< double >( "L1_ETM15_thresh" ) ;
00263    prescales_[ L1ParticleMap::kETM15 ] =
00264       iConfig.getParameter< int >( "L1_ETM15_prescale" ) ;
00265    singleThresholds_[ L1ParticleMap::kETM20 ] =
00266       iConfig.getParameter< double >( "L1_ETM20_thresh" ) ;
00267    prescales_[ L1ParticleMap::kETM20 ] =
00268       iConfig.getParameter< int >( "L1_ETM20_prescale" ) ;
00269    singleThresholds_[ L1ParticleMap::kETM30 ] =
00270       iConfig.getParameter< double >( "L1_ETM30_thresh" ) ;
00271    prescales_[ L1ParticleMap::kETM30 ] =
00272       iConfig.getParameter< int >( "L1_ETM30_prescale" ) ;
00273    singleThresholds_[ L1ParticleMap::kETM40 ] =
00274       iConfig.getParameter< double >( "L1_ETM40_thresh" ) ;
00275    prescales_[ L1ParticleMap::kETM40 ] =
00276       iConfig.getParameter< int >( "L1_ETM40_prescale" ) ;
00277    singleThresholds_[ L1ParticleMap::kETM50 ] =
00278       iConfig.getParameter< double >( "L1_ETM50_thresh" ) ;
00279    prescales_[ L1ParticleMap::kETM50 ] =
00280       iConfig.getParameter< int >( "L1_ETM50_prescale" ) ;
00281    singleThresholds_[ L1ParticleMap::kETM60 ] =
00282       iConfig.getParameter< double >( "L1_ETM60_thresh" ) ;
00283    prescales_[ L1ParticleMap::kETM60 ] =
00284       iConfig.getParameter< int >( "L1_ETM60_prescale" ) ;
00285 
00286    singleThresholds_[ L1ParticleMap::kETT60 ] =
00287       iConfig.getParameter< double >( "L1_ETT60_thresh" ) ;
00288    prescales_[ L1ParticleMap::kETT60 ] =
00289       iConfig.getParameter< int >( "L1_ETT60_prescale" ) ;
00290 
00291    // AA triggers
00292 
00293    singleThresholds_[ L1ParticleMap::kDoubleMu3 ] =
00294       iConfig.getParameter< double >( "L1_DoubleMu3_thresh" ) ;
00295    prescales_[ L1ParticleMap::kDoubleMu3 ] =
00296       iConfig.getParameter< int >( "L1_DoubleMu3_prescale" ) ;
00297 
00298    singleThresholds_[ L1ParticleMap::kDoubleIsoEG8 ] =
00299       iConfig.getParameter< double >( "L1_DoubleIsoEG8_thresh" ) ;
00300    prescales_[ L1ParticleMap::kDoubleIsoEG8 ] =
00301       iConfig.getParameter< int >( "L1_DoubleIsoEG8_prescale" ) ;
00302    singleThresholds_[ L1ParticleMap::kDoubleIsoEG10 ] =
00303       iConfig.getParameter< double >( "L1_DoubleIsoEG10_thresh" ) ;
00304    prescales_[ L1ParticleMap::kDoubleIsoEG10 ] =
00305       iConfig.getParameter< int >( "L1_DoubleIsoEG10_prescale" ) ;
00306 
00307    singleThresholds_[ L1ParticleMap::kDoubleEG5 ] =
00308       iConfig.getParameter< double >( "L1_DoubleEG5_thresh" ) ;
00309    prescales_[ L1ParticleMap::kDoubleEG5 ] =
00310       iConfig.getParameter< int >( "L1_DoubleEG5_prescale" ) ;
00311    singleThresholds_[ L1ParticleMap::kDoubleEG10 ] =
00312       iConfig.getParameter< double >( "L1_DoubleEG10_thresh" ) ;
00313    prescales_[ L1ParticleMap::kDoubleEG10 ] =
00314       iConfig.getParameter< int >( "L1_DoubleEG10_prescale" ) ;
00315    singleThresholds_[ L1ParticleMap::kDoubleEG15 ] =
00316       iConfig.getParameter< double >( "L1_DoubleEG15_thresh" ) ;
00317    prescales_[ L1ParticleMap::kDoubleEG15 ] =
00318       iConfig.getParameter< int >( "L1_DoubleEG15_prescale" ) ;
00319 
00320    singleThresholds_[ L1ParticleMap::kDoubleJet70 ] =
00321       iConfig.getParameter< double >( "L1_DoubleJet70_thresh" ) ;
00322    prescales_[ L1ParticleMap::kDoubleJet70 ] =
00323       iConfig.getParameter< int >( "L1_DoubleJet70_prescale" ) ;
00324    singleThresholds_[ L1ParticleMap::kDoubleJet100 ] =
00325       iConfig.getParameter< double >( "L1_DoubleJet100_thresh" ) ;
00326    prescales_[ L1ParticleMap::kDoubleJet100 ] =
00327       iConfig.getParameter< int >( "L1_DoubleJet100_prescale" ) ;
00328 
00329    singleThresholds_[ L1ParticleMap::kDoubleTauJet20 ] =
00330       iConfig.getParameter< double >( "L1_DoubleTauJet20_thresh" ) ;
00331    prescales_[ L1ParticleMap::kDoubleTauJet20 ] =
00332       iConfig.getParameter< int >( "L1_DoubleTauJet20_prescale" ) ;
00333    singleThresholds_[ L1ParticleMap::kDoubleTauJet30 ] =
00334       iConfig.getParameter< double >( "L1_DoubleTauJet30_thresh" ) ;
00335    prescales_[ L1ParticleMap::kDoubleTauJet30 ] =
00336       iConfig.getParameter< int >( "L1_DoubleTauJet30_prescale" ) ;
00337    singleThresholds_[ L1ParticleMap::kDoubleTauJet35 ] =
00338       iConfig.getParameter< double >( "L1_DoubleTauJet35_thresh" ) ;
00339    prescales_[ L1ParticleMap::kDoubleTauJet35 ] =
00340       iConfig.getParameter< int >( "L1_DoubleTauJet35_prescale" ) ;
00341    singleThresholds_[ L1ParticleMap::kDoubleTauJet40 ] =
00342       iConfig.getParameter< double >( "L1_DoubleTauJet40_thresh" ) ;
00343    prescales_[ L1ParticleMap::kDoubleTauJet40 ] =
00344       iConfig.getParameter< int >( "L1_DoubleTauJet40_prescale" ) ;
00345 
00346    // AB triggers
00347 
00348    doubleThresholds_[ L1ParticleMap::kMu3_IsoEG5 ].first =
00349       iConfig.getParameter< double >( "L1_Mu3_IsoEG5_thresh1" ) ;
00350    doubleThresholds_[ L1ParticleMap::kMu3_IsoEG5 ].second =
00351       iConfig.getParameter< double >( "L1_Mu3_IsoEG5_thresh2" ) ;
00352    prescales_[ L1ParticleMap::kMu3_IsoEG5 ] =
00353       iConfig.getParameter< int >( "L1_Mu3_IsoEG5_prescale" ) ;
00354    doubleThresholds_[ L1ParticleMap::kMu5_IsoEG10 ].first =
00355       iConfig.getParameter< double >( "L1_Mu5_IsoEG10_thresh1" ) ;
00356    doubleThresholds_[ L1ParticleMap::kMu5_IsoEG10 ].second =
00357       iConfig.getParameter< double >( "L1_Mu5_IsoEG10_thresh2" ) ;
00358    prescales_[ L1ParticleMap::kMu5_IsoEG10 ] =
00359       iConfig.getParameter< int >( "L1_Mu5_IsoEG10_prescale" ) ;
00360 
00361    doubleThresholds_[ L1ParticleMap::kMu3_EG12 ].first =
00362       iConfig.getParameter< double >( "L1_Mu3_EG12_thresh1" ) ;
00363    doubleThresholds_[ L1ParticleMap::kMu3_EG12 ].second =
00364       iConfig.getParameter< double >( "L1_Mu3_EG12_thresh2" ) ;
00365    prescales_[ L1ParticleMap::kMu3_EG12 ] =
00366       iConfig.getParameter< int >( "L1_Mu3_EG12_prescale" ) ;
00367 
00368    doubleThresholds_[ L1ParticleMap::kMu3_Jet15 ].first =
00369       iConfig.getParameter< double >( "L1_Mu3_Jet15_thresh1" ) ;
00370    doubleThresholds_[ L1ParticleMap::kMu3_Jet15 ].second =
00371       iConfig.getParameter< double >( "L1_Mu3_Jet15_thresh2" ) ;
00372    prescales_[ L1ParticleMap::kMu3_Jet15 ] =
00373       iConfig.getParameter< int >( "L1_Mu3_Jet15_prescale" ) ;
00374    doubleThresholds_[ L1ParticleMap::kMu5_Jet15 ].first =
00375       iConfig.getParameter< double >( "L1_Mu5_Jet15_thresh1" ) ;
00376    doubleThresholds_[ L1ParticleMap::kMu5_Jet15 ].second =
00377       iConfig.getParameter< double >( "L1_Mu5_Jet15_thresh2" ) ;
00378    prescales_[ L1ParticleMap::kMu5_Jet15 ] =
00379       iConfig.getParameter< int >( "L1_Mu5_Jet15_prescale" ) ;
00380    doubleThresholds_[ L1ParticleMap::kMu3_Jet70 ].first =
00381       iConfig.getParameter< double >( "L1_Mu3_Jet70_thresh1" ) ;
00382    doubleThresholds_[ L1ParticleMap::kMu3_Jet70 ].second =
00383       iConfig.getParameter< double >( "L1_Mu3_Jet70_thresh2" ) ;
00384    prescales_[ L1ParticleMap::kMu3_Jet70 ] =
00385       iConfig.getParameter< int >( "L1_Mu3_Jet70_prescale" ) ;
00386    doubleThresholds_[ L1ParticleMap::kMu5_Jet20 ].first =
00387       iConfig.getParameter< double >( "L1_Mu5_Jet20_thresh1" ) ;
00388    doubleThresholds_[ L1ParticleMap::kMu5_Jet20 ].second =
00389       iConfig.getParameter< double >( "L1_Mu5_Jet20_thresh2" ) ;
00390    prescales_[ L1ParticleMap::kMu5_Jet20 ] =
00391       iConfig.getParameter< int >( "L1_Mu5_Jet20_prescale" ) ;
00392 
00393    doubleThresholds_[ L1ParticleMap::kMu5_TauJet20 ].first =
00394       iConfig.getParameter< double >( "L1_Mu5_TauJet20_thresh1" ) ;
00395    doubleThresholds_[ L1ParticleMap::kMu5_TauJet20 ].second =
00396       iConfig.getParameter< double >( "L1_Mu5_TauJet20_thresh2" ) ;
00397    prescales_[ L1ParticleMap::kMu5_TauJet20 ] =
00398       iConfig.getParameter< int >( "L1_Mu5_TauJet20_prescale" ) ;
00399    doubleThresholds_[ L1ParticleMap::kMu5_TauJet30 ].first =
00400       iConfig.getParameter< double >( "L1_Mu5_TauJet30_thresh1" ) ;
00401    doubleThresholds_[ L1ParticleMap::kMu5_TauJet30 ].second =
00402       iConfig.getParameter< double >( "L1_Mu5_TauJet30_thresh2" ) ;
00403    prescales_[ L1ParticleMap::kMu5_TauJet30 ] =
00404       iConfig.getParameter< int >( "L1_Mu5_TauJet30_prescale" ) ;
00405 
00406    doubleThresholds_[ L1ParticleMap::kIsoEG10_EG10 ].first =
00407       iConfig.getParameter< double >( "L1_IsoEG10_EG10_thresh1" ) ;
00408    doubleThresholds_[ L1ParticleMap::kIsoEG10_EG10 ].second =
00409       iConfig.getParameter< double >( "L1_IsoEG10_EG10_thresh2" ) ;
00410    prescales_[ L1ParticleMap::kIsoEG10_EG10 ] =
00411       iConfig.getParameter< int >( "L1_IsoEG10_EG10_prescale" ) ;
00412 
00413    doubleThresholds_[ L1ParticleMap::kIsoEG10_Jet15 ].first =
00414       iConfig.getParameter< double >( "L1_IsoEG10_Jet15_thresh1" ) ;
00415    doubleThresholds_[ L1ParticleMap::kIsoEG10_Jet15 ].second =
00416       iConfig.getParameter< double >( "L1_IsoEG10_Jet15_thresh2" ) ;
00417    prescales_[ L1ParticleMap::kIsoEG10_Jet15 ] =
00418       iConfig.getParameter< int >( "L1_IsoEG10_Jet15_prescale" ) ;
00419    doubleThresholds_[ L1ParticleMap::kIsoEG10_Jet30 ].first =
00420       iConfig.getParameter< double >( "L1_IsoEG10_Jet30_thresh1" ) ;
00421    doubleThresholds_[ L1ParticleMap::kIsoEG10_Jet30 ].second =
00422       iConfig.getParameter< double >( "L1_IsoEG10_Jet30_thresh2" ) ;
00423    prescales_[ L1ParticleMap::kIsoEG10_Jet30 ] =
00424       iConfig.getParameter< int >( "L1_IsoEG10_Jet30_prescale" ) ;
00425    doubleThresholds_[ L1ParticleMap::kIsoEG10_Jet20 ].first =
00426       iConfig.getParameter< double >( "L1_IsoEG10_Jet20_thresh1" ) ;
00427    doubleThresholds_[ L1ParticleMap::kIsoEG10_Jet20 ].second =
00428       iConfig.getParameter< double >( "L1_IsoEG10_Jet20_thresh2" ) ;
00429    prescales_[ L1ParticleMap::kIsoEG10_Jet20 ] =
00430       iConfig.getParameter< int >( "L1_IsoEG10_Jet20_prescale" ) ;
00431    doubleThresholds_[ L1ParticleMap::kIsoEG10_Jet70 ].first =
00432       iConfig.getParameter< double >( "L1_IsoEG10_Jet70_thresh1" ) ;
00433    doubleThresholds_[ L1ParticleMap::kIsoEG10_Jet70 ].second =
00434       iConfig.getParameter< double >( "L1_IsoEG10_Jet70_thresh2" ) ;
00435    prescales_[ L1ParticleMap::kIsoEG10_Jet70 ] =
00436       iConfig.getParameter< int >( "L1_IsoEG10_Jet70_prescale" ) ;
00437 
00438    doubleThresholds_[ L1ParticleMap::kIsoEG10_TauJet20 ].first =
00439       iConfig.getParameter< double >( "L1_IsoEG10_TauJet20_thresh1" ) ;
00440    doubleThresholds_[ L1ParticleMap::kIsoEG10_TauJet20 ].second =
00441       iConfig.getParameter< double >( "L1_IsoEG10_TauJet20_thresh2" ) ;
00442    prescales_[ L1ParticleMap::kIsoEG10_TauJet20 ] =
00443       iConfig.getParameter< int >( "L1_IsoEG10_TauJet20_prescale" ) ;
00444    doubleThresholds_[ L1ParticleMap::kIsoEG10_TauJet30 ].first =
00445       iConfig.getParameter< double >( "L1_IsoEG10_TauJet30_thresh1" ) ;
00446    doubleThresholds_[ L1ParticleMap::kIsoEG10_TauJet30 ].second =
00447       iConfig.getParameter< double >( "L1_IsoEG10_TauJet30_thresh2" ) ;
00448    prescales_[ L1ParticleMap::kIsoEG10_TauJet30 ] =
00449       iConfig.getParameter< int >( "L1_IsoEG10_TauJet30_prescale" ) ;
00450 
00451    doubleThresholds_[ L1ParticleMap::kEG10_Jet15 ].first =
00452       iConfig.getParameter< double >( "L1_EG10_Jet15_thresh1" ) ;
00453    doubleThresholds_[ L1ParticleMap::kEG10_Jet15 ].second =
00454       iConfig.getParameter< double >( "L1_EG10_Jet15_thresh2" ) ;
00455    prescales_[ L1ParticleMap::kEG10_Jet15 ] =
00456       iConfig.getParameter< int >( "L1_EG10_Jet15_prescale" ) ;
00457    doubleThresholds_[ L1ParticleMap::kEG12_Jet20 ].first =
00458       iConfig.getParameter< double >( "L1_EG12_Jet20_thresh1" ) ;
00459    doubleThresholds_[ L1ParticleMap::kEG12_Jet20 ].second =
00460       iConfig.getParameter< double >( "L1_EG12_Jet20_thresh2" ) ;
00461    prescales_[ L1ParticleMap::kEG12_Jet20 ] =
00462       iConfig.getParameter< int >( "L1_EG12_Jet20_prescale" ) ;
00463    doubleThresholds_[ L1ParticleMap::kEG12_Jet70 ].first =
00464       iConfig.getParameter< double >( "L1_EG12_Jet70_thresh1" ) ;
00465    doubleThresholds_[ L1ParticleMap::kEG12_Jet70 ].second =
00466       iConfig.getParameter< double >( "L1_EG12_Jet70_thresh2" ) ;
00467    prescales_[ L1ParticleMap::kEG12_Jet70 ] =
00468       iConfig.getParameter< int >( "L1_EG12_Jet70_prescale" ) ;
00469 
00470    doubleThresholds_[ L1ParticleMap::kEG12_TauJet40 ].first =
00471       iConfig.getParameter< double >( "L1_EG12_TauJet40_thresh1" ) ;
00472    doubleThresholds_[ L1ParticleMap::kEG12_TauJet40 ].second =
00473       iConfig.getParameter< double >( "L1_EG12_TauJet40_thresh2" ) ;
00474    prescales_[ L1ParticleMap::kEG12_TauJet40 ] =
00475       iConfig.getParameter< int >( "L1_EG12_TauJet40_prescale" ) ;
00476 
00477    doubleThresholds_[ L1ParticleMap::kJet70_TauJet40 ].first =
00478       iConfig.getParameter< double >( "L1_Jet70_TauJet40_thresh1" ) ;
00479    doubleThresholds_[ L1ParticleMap::kJet70_TauJet40 ].second =
00480       iConfig.getParameter< double >( "L1_Jet70_TauJet40_thresh2" ) ;
00481    prescales_[ L1ParticleMap::kJet70_TauJet40 ] =
00482       iConfig.getParameter< int >( "L1_Jet70_TauJet40_prescale" ) ;
00483 
00484    doubleThresholds_[ L1ParticleMap::kMu3_HTT200 ].first =
00485       iConfig.getParameter< double >( "L1_Mu3_HTT200_thresh1" ) ;
00486    doubleThresholds_[ L1ParticleMap::kMu3_HTT200 ].second =
00487       iConfig.getParameter< double >( "L1_Mu3_HTT200_thresh2" ) ;
00488    prescales_[ L1ParticleMap::kMu3_HTT200 ] =
00489       iConfig.getParameter< int >( "L1_Mu3_HTT200_prescale" ) ;
00490    doubleThresholds_[ L1ParticleMap::kIsoEG10_HTT200 ].first =
00491       iConfig.getParameter< double >( "L1_IsoEG10_HTT200_thresh1" ) ;
00492    doubleThresholds_[ L1ParticleMap::kIsoEG10_HTT200 ].second =
00493       iConfig.getParameter< double >( "L1_IsoEG10_HTT200_thresh2" ) ;
00494    prescales_[ L1ParticleMap::kIsoEG10_HTT200 ] =
00495       iConfig.getParameter< int >( "L1_IsoEG10_HTT200_prescale" ) ;
00496    doubleThresholds_[ L1ParticleMap::kEG12_HTT200 ].first =
00497       iConfig.getParameter< double >( "L1_EG12_HTT200_thresh1" ) ;
00498    doubleThresholds_[ L1ParticleMap::kEG12_HTT200 ].second =
00499       iConfig.getParameter< double >( "L1_EG12_HTT200_thresh2" ) ;
00500    prescales_[ L1ParticleMap::kEG12_HTT200 ] =
00501       iConfig.getParameter< int >( "L1_EG12_HTT200_prescale" ) ;
00502    doubleThresholds_[ L1ParticleMap::kJet70_HTT200 ].first =
00503       iConfig.getParameter< double >( "L1_Jet70_HTT200_thresh1" ) ;
00504    doubleThresholds_[ L1ParticleMap::kJet70_HTT200 ].second =
00505       iConfig.getParameter< double >( "L1_Jet70_HTT200_thresh2" ) ;
00506    prescales_[ L1ParticleMap::kJet70_HTT200 ] =
00507       iConfig.getParameter< int >( "L1_Jet70_HTT200_prescale" ) ;
00508    doubleThresholds_[ L1ParticleMap::kTauJet40_HTT200 ].first =
00509       iConfig.getParameter< double >( "L1_TauJet40_HTT200_thresh1" ) ;
00510    doubleThresholds_[ L1ParticleMap::kTauJet40_HTT200 ].second =
00511       iConfig.getParameter< double >( "L1_TauJet40_HTT200_thresh2" ) ;
00512    prescales_[ L1ParticleMap::kTauJet40_HTT200 ] =
00513       iConfig.getParameter< int >( "L1_TauJet40_HTT200_prescale" ) ;
00514 
00515    doubleThresholds_[ L1ParticleMap::kMu3_ETM30 ].first =
00516       iConfig.getParameter< double >( "L1_Mu3_ETM30_thresh1" ) ;
00517    doubleThresholds_[ L1ParticleMap::kMu3_ETM30 ].second =
00518       iConfig.getParameter< double >( "L1_Mu3_ETM30_thresh2" ) ;
00519    prescales_[ L1ParticleMap::kMu3_ETM30 ] =
00520       iConfig.getParameter< int >( "L1_Mu3_ETM30_prescale" ) ;
00521    doubleThresholds_[ L1ParticleMap::kIsoEG10_ETM30 ].first =
00522       iConfig.getParameter< double >( "L1_IsoEG10_ETM30_thresh1" ) ;
00523    doubleThresholds_[ L1ParticleMap::kIsoEG10_ETM30 ].second =
00524       iConfig.getParameter< double >( "L1_IsoEG10_ETM30_thresh2" ) ;
00525    prescales_[ L1ParticleMap::kIsoEG10_ETM30 ] =
00526       iConfig.getParameter< int >( "L1_IsoEG10_ETM30_prescale" ) ;
00527    doubleThresholds_[ L1ParticleMap::kEG12_ETM30 ].first =
00528       iConfig.getParameter< double >( "L1_EG12_ETM30_thresh1" ) ;
00529    doubleThresholds_[ L1ParticleMap::kEG12_ETM30 ].second =
00530       iConfig.getParameter< double >( "L1_EG12_ETM30_thresh2" ) ;
00531    prescales_[ L1ParticleMap::kEG12_ETM30 ] =
00532       iConfig.getParameter< int >( "L1_EG12_ETM30_prescale" ) ;
00533    doubleThresholds_[ L1ParticleMap::kJet70_ETM40 ].first =
00534       iConfig.getParameter< double >( "L1_Jet70_ETM40_thresh1" ) ;
00535    doubleThresholds_[ L1ParticleMap::kJet70_ETM40 ].second =
00536       iConfig.getParameter< double >( "L1_Jet70_ETM40_thresh2" ) ;
00537    prescales_[ L1ParticleMap::kJet70_ETM40 ] =
00538       iConfig.getParameter< int >( "L1_Jet70_ETM40_prescale" ) ;
00539 
00540    doubleThresholds_[ L1ParticleMap::kTauJet20_ETM20 ].first =
00541       iConfig.getParameter< double >( "L1_TauJet20_ETM20_thresh1" ) ;
00542    doubleThresholds_[ L1ParticleMap::kTauJet20_ETM20 ].second =
00543       iConfig.getParameter< double >( "L1_TauJet20_ETM20_thresh2" ) ;
00544    prescales_[ L1ParticleMap::kTauJet20_ETM20 ] =
00545       iConfig.getParameter< int >( "L1_TauJet20_ETM20_prescale" ) ;
00546    doubleThresholds_[ L1ParticleMap::kTauJet30_ETM30 ].first =
00547       iConfig.getParameter< double >( "L1_TauJet30_ETM30_thresh1" ) ;
00548    doubleThresholds_[ L1ParticleMap::kTauJet30_ETM30 ].second =
00549       iConfig.getParameter< double >( "L1_TauJet30_ETM30_thresh2" ) ;
00550    prescales_[ L1ParticleMap::kTauJet30_ETM30 ] =
00551       iConfig.getParameter< int >( "L1_TauJet30_ETM30_prescale" ) ;
00552    doubleThresholds_[ L1ParticleMap::kTauJet30_ETM40 ].first =
00553       iConfig.getParameter< double >( "L1_TauJet30_ETM40_thresh1" ) ;
00554    doubleThresholds_[ L1ParticleMap::kTauJet30_ETM40 ].second =
00555       iConfig.getParameter< double >( "L1_TauJet30_ETM40_thresh2" ) ;
00556    prescales_[ L1ParticleMap::kTauJet30_ETM40 ] =
00557       iConfig.getParameter< int >( "L1_TauJet30_ETM40_prescale" ) ;
00558 
00559    doubleThresholds_[ L1ParticleMap::kHTT100_ETM30 ].first =
00560       iConfig.getParameter< double >( "L1_HTT100_ETM30_thresh1" ) ;
00561    doubleThresholds_[ L1ParticleMap::kHTT100_ETM30 ].second =
00562       iConfig.getParameter< double >( "L1_HTT100_ETM30_thresh2" ) ;
00563    prescales_[ L1ParticleMap::kHTT100_ETM30 ] =
00564       iConfig.getParameter< int >( "L1_HTT100_ETM30_prescale" ) ;
00565 
00566    // AAA triggers
00567 
00568    singleThresholds_[ L1ParticleMap::kTripleMu3 ] =
00569       iConfig.getParameter< double >( "L1_TripleMu3_thresh" ) ;
00570    prescales_[ L1ParticleMap::kTripleMu3 ] =
00571       iConfig.getParameter< int >( "L1_TripleMu3_prescale" ) ;
00572    singleThresholds_[ L1ParticleMap::kTripleIsoEG5 ] =
00573       iConfig.getParameter< double >( "L1_TripleIsoEG5_thresh" ) ;
00574    prescales_[ L1ParticleMap::kTripleIsoEG5 ] =
00575       iConfig.getParameter< int >( "L1_TripleIsoEG5_prescale" ) ;
00576    singleThresholds_[ L1ParticleMap::kTripleEG10 ] =
00577       iConfig.getParameter< double >( "L1_TripleEG10_thresh" ) ;
00578    prescales_[ L1ParticleMap::kTripleEG10 ] =
00579       iConfig.getParameter< int >( "L1_TripleEG10_prescale" ) ;
00580    singleThresholds_[ L1ParticleMap::kTripleJet50 ] =
00581       iConfig.getParameter< double >( "L1_TripleJet50_thresh" ) ;
00582    prescales_[ L1ParticleMap::kTripleJet50 ] =
00583       iConfig.getParameter< int >( "L1_TripleJet50_prescale" ) ;
00584    singleThresholds_[ L1ParticleMap::kTripleTauJet40 ] =
00585       iConfig.getParameter< double >( "L1_TripleTauJet40_thresh" ) ;
00586    prescales_[ L1ParticleMap::kTripleTauJet40 ] =
00587       iConfig.getParameter< int >( "L1_TripleTauJet40_prescale" ) ;
00588 
00589    // AAB triggers
00590 
00591    doubleThresholds_[ L1ParticleMap::kDoubleMu3_IsoEG5 ].first =
00592       iConfig.getParameter< double >( "L1_DoubleMu3_IsoEG5_thresh1" ) ;
00593    doubleThresholds_[ L1ParticleMap::kDoubleMu3_IsoEG5 ].second =
00594       iConfig.getParameter< double >( "L1_DoubleMu3_IsoEG5_thresh2" ) ;
00595    prescales_[ L1ParticleMap::kDoubleMu3_IsoEG5 ] =
00596       iConfig.getParameter< int >( "L1_DoubleMu3_IsoEG5_prescale" ) ;
00597    doubleThresholds_[ L1ParticleMap::kDoubleMu3_EG10 ].first =
00598       iConfig.getParameter< double >( "L1_DoubleMu3_EG10_thresh1" ) ;
00599    doubleThresholds_[ L1ParticleMap::kDoubleMu3_EG10 ].second =
00600       iConfig.getParameter< double >( "L1_DoubleMu3_EG10_thresh2" ) ;
00601    prescales_[ L1ParticleMap::kDoubleMu3_EG10 ] =
00602       iConfig.getParameter< int >( "L1_DoubleMu3_EG10_prescale" ) ;
00603    doubleThresholds_[ L1ParticleMap::kDoubleIsoEG5_Mu3 ].first =
00604       iConfig.getParameter< double >( "L1_DoubleIsoEG5_Mu3_thresh1" ) ;
00605    doubleThresholds_[ L1ParticleMap::kDoubleIsoEG5_Mu3 ].second =
00606       iConfig.getParameter< double >( "L1_DoubleIsoEG5_Mu3_thresh2" ) ;
00607    prescales_[ L1ParticleMap::kDoubleIsoEG5_Mu3 ] =
00608       iConfig.getParameter< int >( "L1_DoubleIsoEG5_Mu3_prescale" ) ;
00609    doubleThresholds_[ L1ParticleMap::kDoubleEG10_Mu3 ].first =
00610       iConfig.getParameter< double >( "L1_DoubleEG10_Mu3_thresh1" ) ;
00611    doubleThresholds_[ L1ParticleMap::kDoubleEG10_Mu3 ].second =
00612       iConfig.getParameter< double >( "L1_DoubleEG10_Mu3_thresh2" ) ;
00613    prescales_[ L1ParticleMap::kDoubleEG10_Mu3 ] =
00614       iConfig.getParameter< int >( "L1_DoubleEG10_Mu3_prescale" ) ;
00615 
00616    doubleThresholds_[ L1ParticleMap::kDoubleMu3_HTT200 ].first =
00617       iConfig.getParameter< double >( "L1_DoubleMu3_HTT200_thresh1" ) ;
00618    doubleThresholds_[ L1ParticleMap::kDoubleMu3_HTT200 ].second =
00619       iConfig.getParameter< double >( "L1_DoubleMu3_HTT200_thresh2" ) ;
00620    prescales_[ L1ParticleMap::kDoubleMu3_HTT200 ] =
00621       iConfig.getParameter< int >( "L1_DoubleMu3_HTT200_prescale" ) ;
00622    doubleThresholds_[ L1ParticleMap::kDoubleIsoEG5_HTT200 ].first =
00623       iConfig.getParameter< double >( "L1_DoubleIsoEG5_HTT200_thresh1" ) ;
00624    doubleThresholds_[ L1ParticleMap::kDoubleIsoEG5_HTT200 ].second =
00625       iConfig.getParameter< double >( "L1_DoubleIsoEG5_HTT200_thresh2" ) ;
00626    prescales_[ L1ParticleMap::kDoubleIsoEG5_HTT200 ] =
00627       iConfig.getParameter< int >( "L1_DoubleIsoEG5_HTT200_prescale" ) ;
00628    doubleThresholds_[ L1ParticleMap::kDoubleEG10_HTT200 ].first =
00629       iConfig.getParameter< double >( "L1_DoubleEG10_HTT200_thresh1" ) ;
00630    doubleThresholds_[ L1ParticleMap::kDoubleEG10_HTT200 ].second =
00631       iConfig.getParameter< double >( "L1_DoubleEG10_HTT200_thresh2" ) ;
00632    prescales_[ L1ParticleMap::kDoubleEG10_HTT200 ] =
00633       iConfig.getParameter< int >( "L1_DoubleEG10_HTT200_prescale" ) ;
00634    doubleThresholds_[ L1ParticleMap::kDoubleJet50_HTT200 ].first =
00635       iConfig.getParameter< double >( "L1_DoubleJet50_HTT200_thresh1" ) ;
00636    doubleThresholds_[ L1ParticleMap::kDoubleJet50_HTT200 ].second =
00637       iConfig.getParameter< double >( "L1_DoubleJet50_HTT200_thresh2" ) ;
00638    prescales_[ L1ParticleMap::kDoubleJet50_HTT200 ] =
00639       iConfig.getParameter< int >( "L1_DoubleJet50_HTT200_prescale" ) ;
00640    doubleThresholds_[ L1ParticleMap::kDoubleTauJet40_HTT200 ].first =
00641       iConfig.getParameter< double >( "L1_DoubleTauJet40_HTT200_thresh1" ) ;
00642    doubleThresholds_[ L1ParticleMap::kDoubleTauJet40_HTT200 ].second =
00643       iConfig.getParameter< double >( "L1_DoubleTauJet40_HTT200_thresh2" ) ;
00644    prescales_[ L1ParticleMap::kDoubleTauJet40_HTT200 ] =
00645       iConfig.getParameter< int >( "L1_DoubleTauJet40_HTT200_prescale" ) ;
00646 
00647    doubleThresholds_[ L1ParticleMap::kDoubleMu3_ETM20 ].first =
00648       iConfig.getParameter< double >( "L1_DoubleMu3_ETM20_thresh1" ) ;
00649    doubleThresholds_[ L1ParticleMap::kDoubleMu3_ETM20 ].second =
00650       iConfig.getParameter< double >( "L1_DoubleMu3_ETM20_thresh2" ) ;
00651    prescales_[ L1ParticleMap::kDoubleMu3_ETM20 ] =
00652       iConfig.getParameter< int >( "L1_DoubleMu3_ETM20_prescale" ) ;
00653    doubleThresholds_[ L1ParticleMap::kDoubleIsoEG5_ETM20 ].first =
00654       iConfig.getParameter< double >( "L1_DoubleIsoEG5_ETM20_thresh1" ) ;
00655    doubleThresholds_[ L1ParticleMap::kDoubleIsoEG5_ETM20 ].second =
00656       iConfig.getParameter< double >( "L1_DoubleIsoEG5_ETM20_thresh2" ) ;
00657    prescales_[ L1ParticleMap::kDoubleIsoEG5_ETM20 ] =
00658       iConfig.getParameter< int >( "L1_DoubleIsoEG5_ETM20_prescale" ) ;
00659    doubleThresholds_[ L1ParticleMap::kDoubleEG10_ETM20 ].first =
00660       iConfig.getParameter< double >( "L1_DoubleEG10_ETM20_thresh1" ) ;
00661    doubleThresholds_[ L1ParticleMap::kDoubleEG10_ETM20 ].second =
00662       iConfig.getParameter< double >( "L1_DoubleEG10_ETM20_thresh2" ) ;
00663    prescales_[ L1ParticleMap::kDoubleEG10_ETM20 ] =
00664       iConfig.getParameter< int >( "L1_DoubleEG10_ETM20_prescale" ) ;
00665    doubleThresholds_[ L1ParticleMap::kDoubleJet50_ETM20 ].first =
00666       iConfig.getParameter< double >( "L1_DoubleJet50_ETM20_thresh1" ) ;
00667    doubleThresholds_[ L1ParticleMap::kDoubleJet50_ETM20 ].second =
00668       iConfig.getParameter< double >( "L1_DoubleJet50_ETM20_thresh2" ) ;
00669    prescales_[ L1ParticleMap::kDoubleJet50_ETM20 ] =
00670       iConfig.getParameter< int >( "L1_DoubleJet50_ETM20_prescale" ) ;
00671    doubleThresholds_[ L1ParticleMap::kDoubleTauJet40_ETM20 ].first =
00672       iConfig.getParameter< double >( "L1_DoubleTauJet40_ETM20_thresh1" ) ;
00673    doubleThresholds_[ L1ParticleMap::kDoubleTauJet40_ETM20 ].second =
00674       iConfig.getParameter< double >( "L1_DoubleTauJet40_ETM20_thresh2" ) ;
00675    prescales_[ L1ParticleMap::kDoubleTauJet40_ETM20 ] =
00676       iConfig.getParameter< int >( "L1_DoubleTauJet40_ETM20_prescale" ) ;
00677 
00678    singleThresholds_[ L1ParticleMap::kQuadJet30 ] =
00679       iConfig.getParameter< double >( "L1_QuadJet30_thresh" ) ;
00680    prescales_[ L1ParticleMap::kQuadJet30 ] =
00681       iConfig.getParameter< int >( "L1_QuadJet30_prescale" ) ;
00682 
00683    // Diffractive triggers
00684    doubleThresholds_[ L1ParticleMap::kExclusiveDoubleIsoEG4 ].first =
00685         iConfig.getParameter< double >( "L1_ExclusiveDoubleIsoEG4_thresh1" );
00686    doubleThresholds_[ L1ParticleMap::kExclusiveDoubleIsoEG4 ].second =
00687         iConfig.getParameter< double >( "L1_ExclusiveDoubleIsoEG4_thresh2" ); // for jet rejection
00688    prescales_[ L1ParticleMap::kExclusiveDoubleIsoEG4 ] =
00689         iConfig.getParameter< int >( "L1_ExclusiveDoubleIsoEG4_prescale" ) ;
00690    singleThresholds_[ L1ParticleMap::kExclusiveDoubleJet60 ] =
00691         iConfig.getParameter< double >( "L1_ExclusiveDoubleJet60_thresh"  ); 
00692    prescales_[ L1ParticleMap::kExclusiveDoubleJet60 ] =
00693         iConfig.getParameter< int >( "L1_ExclusiveDoubleJet60_prescale" ) ;
00694    singleThresholds_[ L1ParticleMap::kExclusiveJet25_Gap_Jet25 ] =
00695         iConfig.getParameter< double >( "L1_ExclusiveJet25_Gap_Jet25_thresh" );
00696    prescales_[ L1ParticleMap::kExclusiveJet25_Gap_Jet25 ] =
00697       iConfig.getParameter< int >( "L1_ExclusiveJet25_Gap_Jet25_prescale" ) ;
00698    doubleThresholds_[ L1ParticleMap::kIsoEG10_Jet20_ForJet10 ].first =
00699       iConfig.getParameter< double >( "L1_IsoEG10_Jet20_ForJet10_thresh1" ) ;
00700    doubleThresholds_[ L1ParticleMap::kIsoEG10_Jet20_ForJet10 ].second =
00701       iConfig.getParameter< double >( "L1_IsoEG10_Jet20_ForJet10_thresh2" ) ;
00702    singleThresholds_[ L1ParticleMap::kIsoEG10_Jet20_ForJet10 ] =
00703       iConfig.getParameter< double >( "L1_IsoEG10_Jet20_ForJet10_thresh3" ) ;
00704    prescales_[ L1ParticleMap::kIsoEG10_Jet20_ForJet10 ] =
00705       iConfig.getParameter< int >( "L1_IsoEG10_Jet20_ForJet10_prescale" ) ;
00706 
00707    prescales_[ L1ParticleMap::kMinBias_HTT10 ] =
00708       iConfig.getParameter< int >( "L1_MinBias_HTT10_prescale" ) ;
00709    prescales_[ L1ParticleMap::kZeroBias ] =
00710       iConfig.getParameter< int >( "L1_ZeroBias_prescale" ) ;
00711 
00712 //    // Print trigger table in Twiki table format.
00713 //    std::cout << "|  *Trigger Index*  |  *Trigger Name*  |  *E<sub>T</sub> Threshold (!GeV)*  |  *Prescale*  |"
00714 //           << std::endl ;
00715 
00716 //    for( int i = 0 ; i < L1ParticleMap::kNumOfL1TriggerTypes ; ++i )
00717 //    {
00718 //       std::cout
00719 //       << "|  "
00720 //       << i
00721 //       << "  |  " ;
00722 //       if( prescales_[ i ] == 999999999 ) std::cout << "<strike>" ;
00723 //       std::cout
00724 //       << L1ParticleMap::triggerName( ( L1ParticleMap::L1TriggerType ) i ) ;
00725 //       if( prescales_[ i ] == 999999999 ) std::cout << "</strike>" ;
00726 //       std::cout << "  |  " ;
00727 
00728 //       if( singleThresholds_[ i ] > 0 )
00729 //       {
00730 //       if( doubleThresholds_[ i ].first > 0 )
00731 //       {
00732 //          std::cout << doubleThresholds_[ i ].first << ", "
00733 //                    << doubleThresholds_[ i ].second << ", " ;
00734 //       }
00735 
00736 //       std::cout << singleThresholds_[ i ] ;
00737 //       }
00738 //       else if( doubleThresholds_[ i ].first > 0 )
00739 //       {
00740 //       std::cout << doubleThresholds_[ i ].first << ", "
00741 //                 << doubleThresholds_[ i ].second ;
00742 //       }
00743 //       else
00744 //       {
00745 //       std::cout << "---" ;
00746 //       }
00747 
00748 //       std::cout << "  |  " ;
00749 //       if( prescales_[ i ] != 999999999 ) std::cout << prescales_[ i ] ;
00750 //       std::cout << "  |"
00751 //              << std::endl ;
00752 //    }
00753 }
00754 
00755 
00756 L1ExtraParticleMapProd::~L1ExtraParticleMapProd()
00757 {
00758    // do anything here that needs to be done at desctruction time
00759    // (e.g. close files, deallocate resources etc.)
00760 }
00761 
00762 
00763 //
00764 // member functions
00765 //
00766 
00767 // ------------ method called to produce the data  ------------
00768 void
00769 L1ExtraParticleMapProd::produce(edm::Event& iEvent,
00770                                 const edm::EventSetup& iSetup)
00771 {
00772    using namespace edm;
00773    using namespace std;
00774    using namespace reco;
00775    using namespace l1extra ;
00776 
00777 
00778    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00779    // ~~~~~~~~ Get L1Extra particles ~~~~~~~~
00780    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00781 
00782    Handle< L1EmParticleCollection > isoEmHandle ;
00783    iEvent.getByLabel( isoEmSource_, isoEmHandle ) ;
00784 
00785    Handle< L1EmParticleCollection > nonIsoEmHandle ;
00786    iEvent.getByLabel( nonIsoEmSource_, nonIsoEmHandle ) ;
00787 
00788    Handle< L1JetParticleCollection > cenJetHandle ;
00789    iEvent.getByLabel( cenJetSource_, cenJetHandle ) ;
00790 
00791    Handle< L1JetParticleCollection > forJetHandle ;
00792    iEvent.getByLabel( forJetSource_, forJetHandle ) ;
00793 
00794    Handle< L1JetParticleCollection > tauJetHandle ;
00795    iEvent.getByLabel( tauJetSource_, tauJetHandle ) ;
00796 
00797    Handle< L1MuonParticleCollection > muHandle ;
00798    iEvent.getByLabel( muonSource_, muHandle ) ;
00799 
00800    Handle< L1EtMissParticle > metHandle ;
00801    iEvent.getByLabel( etMissSource_, metHandle ) ;
00802 
00803    Handle< L1EtMissParticle > mhtHandle ;
00804    iEvent.getByLabel( htMissSource_, mhtHandle ) ;
00805 
00806    double met = metHandle->etMiss() ;
00807    double ht = mhtHandle->etTotal() ;
00808    double ett = metHandle->etTotal() ;
00809 
00810    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00811    // ~~~ Evaluate trigger conditions and make a L1ParticleMapCollection. ~~~
00812    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00813 
00814    // First, form the input vector<Ref>s that will be needed.
00815    L1EmParticleVectorRef inputIsoEmRefs ;
00816    addToVectorRefs( isoEmHandle, inputIsoEmRefs ) ;
00817 
00818    L1EmParticleVectorRef inputRelaxedEmRefs ;
00819    addToVectorRefs( isoEmHandle, inputRelaxedEmRefs ) ;
00820    addToVectorRefs( nonIsoEmHandle, inputRelaxedEmRefs ) ;
00821 
00822    L1JetParticleVectorRef inputTauRefs ;
00823    addToVectorRefs( tauJetHandle, inputTauRefs ) ;
00824 
00825    L1JetParticleVectorRef inputJetRefs ;
00826    addToVectorRefs( forJetHandle, inputJetRefs ) ;
00827    addToVectorRefs( cenJetHandle, inputJetRefs ) ;
00828    addToVectorRefs( tauJetHandle, inputJetRefs ) ;
00829 
00830    L1JetParticleVectorRef inputForJetRefs ;
00831    addToVectorRefs( forJetHandle, inputForJetRefs ) ;
00832 
00833    L1JetParticleVectorRef inputCenJetTauJetRefs ;
00834    addToVectorRefs( cenJetHandle, inputCenJetTauJetRefs ) ;
00835    addToVectorRefs( tauJetHandle, inputCenJetTauJetRefs ) ;
00836 
00837    L1MuonParticleVectorRef inputMuonRefsSingle ;
00838    L1MuonParticleVectorRef inputMuonRefsDouble ;
00839    L1MuonParticleCollection::const_iterator muItr = muHandle->begin() ;
00840    L1MuonParticleCollection::const_iterator muEnd = muHandle->end() ;
00841 
00842    for( size_t i = 0 ; muItr != muEnd ; ++muItr, ++i )
00843    {
00844       if( !muItr->gmtMuonCand().empty() )
00845       {
00846          unsigned int qual = muItr->gmtMuonCand().quality() ;
00847 
00848          if( qual == 4 ||
00849              qual == 5 ||
00850              qual == 6 ||
00851              qual == 7 )
00852          {
00853             inputMuonRefsSingle.push_back(
00854                edm::Ref< L1MuonParticleCollection >( muHandle, i ) ) ;
00855          }
00856 
00857          if( qual == 3 ||
00858              qual == 5 ||
00859              qual == 6 ||
00860              qual == 7 )
00861          {
00862             inputMuonRefsDouble.push_back(
00863                edm::Ref< L1MuonParticleCollection >( muHandle, i ) ) ;
00864          }
00865       }
00866    }
00867 
00868    auto_ptr< L1ParticleMapCollection > mapColl( new L1ParticleMapCollection ) ;
00869    bool globalDecision = false ;
00870    std::vector< bool > decisionWord ;
00871 
00872    for( int itrig = 0 ; itrig < L1ParticleMap::kNumOfL1TriggerTypes; ++itrig )
00873    {
00874       bool decision = false ;
00875       std::vector< L1ParticleMap::L1ObjectType > objectTypes ;
00876       L1EmParticleVectorRef outputEmRefsTmp ;
00877       L1JetParticleVectorRef outputJetRefsTmp ;
00878       L1MuonParticleVectorRef outputMuonRefsTmp ;
00879       L1EtMissParticleRefProd metRefTmp ;
00880       L1ParticleMap::L1IndexComboVector combosTmp ; // unfilled for single objs
00881 
00882       if( itrig == L1ParticleMap::kSingleMu3 ||
00883           itrig == L1ParticleMap::kSingleMu5 ||
00884           itrig == L1ParticleMap::kSingleMu7 ||
00885           itrig == L1ParticleMap::kSingleMu10 ||
00886           itrig == L1ParticleMap::kSingleMu14 ||
00887           itrig == L1ParticleMap::kSingleMu20 ||
00888           itrig == L1ParticleMap::kSingleMu25 )
00889       {
00890          objectTypes.push_back( L1ParticleMap::kMuon ) ;
00891 
00892          evaluateSingleObjectTrigger( inputMuonRefsSingle,
00893                                       singleThresholds_[ itrig ],
00894                                       decision,
00895                                       outputMuonRefsTmp ) ;
00896       }
00897       else if( itrig == L1ParticleMap::kSingleIsoEG5 ||
00898                itrig == L1ParticleMap::kSingleIsoEG8 ||
00899                itrig == L1ParticleMap::kSingleIsoEG10 ||
00900                itrig == L1ParticleMap::kSingleIsoEG12 ||
00901                itrig == L1ParticleMap::kSingleIsoEG15 ||
00902                itrig == L1ParticleMap::kSingleIsoEG20 ||
00903                itrig == L1ParticleMap::kSingleIsoEG25 )
00904       {
00905          objectTypes.push_back( L1ParticleMap::kEM ) ;
00906 
00907          evaluateSingleObjectTrigger( inputIsoEmRefs,
00908                                       singleThresholds_[ itrig ],
00909                                       decision,
00910                                       outputEmRefsTmp ) ;
00911       }
00912       else if( itrig == L1ParticleMap::kSingleEG5 ||
00913                itrig == L1ParticleMap::kSingleEG8 ||
00914                itrig == L1ParticleMap::kSingleEG10 ||
00915                itrig == L1ParticleMap::kSingleEG12 ||
00916                itrig == L1ParticleMap::kSingleEG15 ||
00917                itrig == L1ParticleMap::kSingleEG20 ||
00918                itrig == L1ParticleMap::kSingleEG25 )
00919       {
00920          objectTypes.push_back( L1ParticleMap::kEM ) ;
00921 
00922          evaluateSingleObjectTrigger( inputRelaxedEmRefs,
00923                                       singleThresholds_[ itrig ],
00924                                       decision,
00925                                       outputEmRefsTmp ) ;
00926       }
00927       else if( itrig == L1ParticleMap::kSingleJet15 ||
00928                itrig == L1ParticleMap::kSingleJet20 ||
00929                itrig == L1ParticleMap::kSingleJet30 ||
00930                itrig == L1ParticleMap::kSingleJet50 ||
00931                itrig == L1ParticleMap::kSingleJet70 ||
00932                itrig == L1ParticleMap::kSingleJet100 ||
00933                itrig == L1ParticleMap::kSingleJet150 ||
00934                itrig == L1ParticleMap::kSingleJet200 )
00935       {
00936          objectTypes.push_back( L1ParticleMap::kJet ) ;
00937 
00938          evaluateSingleObjectTrigger( inputJetRefs,
00939                                       singleThresholds_[ itrig ],
00940                                       decision,
00941                                       outputJetRefsTmp ) ;
00942       }
00943       else if( itrig == L1ParticleMap::kSingleTauJet10 ||
00944                itrig == L1ParticleMap::kSingleTauJet20 ||
00945                itrig == L1ParticleMap::kSingleTauJet30 ||
00946                itrig == L1ParticleMap::kSingleTauJet35 ||
00947                itrig == L1ParticleMap::kSingleTauJet40 ||
00948                itrig == L1ParticleMap::kSingleTauJet60 ||
00949                itrig == L1ParticleMap::kSingleTauJet80 ||
00950                itrig == L1ParticleMap::kSingleTauJet100 )
00951       {
00952          objectTypes.push_back( L1ParticleMap::kJet ) ;
00953 
00954          evaluateSingleObjectTrigger( inputTauRefs,
00955                                       singleThresholds_[ itrig ],
00956                                       decision,
00957                                       outputJetRefsTmp ) ;
00958       }
00959       else if( itrig == L1ParticleMap::kHTT100 ||
00960                itrig == L1ParticleMap::kHTT200 ||
00961                itrig == L1ParticleMap::kHTT250 ||
00962                itrig == L1ParticleMap::kHTT300 ||
00963                itrig == L1ParticleMap::kHTT400 ||
00964                itrig == L1ParticleMap::kHTT500 )
00965       {
00966          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
00967 
00968          if( ht >= singleThresholds_[ itrig ] )
00969          {
00970             decision = true ;
00971             metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
00972          }
00973       }
00974       else if( itrig == L1ParticleMap::kETM10 ||
00975                itrig == L1ParticleMap::kETM15 ||
00976                itrig == L1ParticleMap::kETM20 ||
00977                itrig == L1ParticleMap::kETM30 ||
00978                itrig == L1ParticleMap::kETM40 ||
00979                itrig == L1ParticleMap::kETM50 ||
00980                itrig == L1ParticleMap::kETM60 )
00981       {
00982          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
00983 
00984          if( met >= singleThresholds_[ itrig ] )
00985          {
00986             decision = true ;
00987             metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
00988          }
00989       }
00990       else if( itrig == L1ParticleMap::kETT60 )
00991       {
00992          objectTypes.push_back( L1ParticleMap::kEtTotal ) ;
00993 
00994          if( ett >= singleThresholds_[ itrig ] )
00995          {
00996             decision = true ;
00997             metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
00998          }
00999       }
01000       else if( itrig == L1ParticleMap::kDoubleMu3 )
01001       {
01002          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01003          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01004 
01005          evaluateDoubleSameObjectTrigger( inputMuonRefsDouble,
01006                                           singleThresholds_[ itrig ],
01007                                           decision,
01008                                           outputMuonRefsTmp,
01009                                           combosTmp ) ;
01010       }
01011       else if( itrig == L1ParticleMap::kDoubleIsoEG8 ||
01012                itrig == L1ParticleMap::kDoubleIsoEG10 )
01013       {
01014          objectTypes.push_back( L1ParticleMap::kEM ) ;
01015          objectTypes.push_back( L1ParticleMap::kEM ) ;
01016 
01017          evaluateDoubleSameObjectTrigger( inputIsoEmRefs,
01018                                           singleThresholds_[ itrig ],
01019                                           decision,
01020                                           outputEmRefsTmp,
01021                                           combosTmp ) ;
01022       }
01023       else if( itrig == L1ParticleMap::kDoubleEG5 ||
01024                itrig == L1ParticleMap::kDoubleEG10 ||
01025                itrig == L1ParticleMap::kDoubleEG15 )
01026       {
01027          objectTypes.push_back( L1ParticleMap::kEM ) ;
01028          objectTypes.push_back( L1ParticleMap::kEM ) ;
01029 
01030          evaluateDoubleSameObjectTrigger( inputRelaxedEmRefs,
01031                                           singleThresholds_[ itrig ],
01032                                           decision,
01033                                           outputEmRefsTmp,
01034                                           combosTmp ) ;
01035       }
01036       else if( itrig == L1ParticleMap::kDoubleJet70 ||
01037                itrig == L1ParticleMap::kDoubleJet100 )
01038       {
01039          objectTypes.push_back( L1ParticleMap::kJet ) ;
01040          objectTypes.push_back( L1ParticleMap::kJet ) ;
01041 
01042          evaluateDoubleSameObjectTrigger( inputJetRefs,
01043                                           singleThresholds_[ itrig ],
01044                                           decision,
01045                                           outputJetRefsTmp,
01046                                           combosTmp ) ;
01047       }
01048       else if( itrig == L1ParticleMap::kDoubleTauJet20 ||
01049                itrig == L1ParticleMap::kDoubleTauJet30 ||
01050                itrig == L1ParticleMap::kDoubleTauJet35 ||
01051                itrig == L1ParticleMap::kDoubleTauJet40 )
01052       {
01053          objectTypes.push_back( L1ParticleMap::kJet ) ;
01054          objectTypes.push_back( L1ParticleMap::kJet ) ;
01055 
01056          evaluateDoubleSameObjectTrigger( inputTauRefs,
01057                                           singleThresholds_[ itrig ],
01058                                           decision,
01059                                           outputJetRefsTmp,
01060                                           combosTmp ) ;
01061       }
01062       else if( itrig == L1ParticleMap::kMu3_IsoEG5 ||
01063                itrig == L1ParticleMap::kMu5_IsoEG10 )
01064       {
01065          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01066          objectTypes.push_back( L1ParticleMap::kEM ) ;
01067 
01068          evaluateDoubleDifferentObjectTrigger(
01069             inputMuonRefsSingle,
01070             inputIsoEmRefs,
01071             doubleThresholds_[ itrig ].first,
01072             doubleThresholds_[ itrig ].second,
01073             decision,
01074             outputMuonRefsTmp,
01075             outputEmRefsTmp,
01076             combosTmp ) ;
01077       }
01078       else if( itrig == L1ParticleMap::kMu3_EG12 )
01079       {
01080          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01081          objectTypes.push_back( L1ParticleMap::kEM ) ;
01082 
01083          evaluateDoubleDifferentObjectTrigger(
01084             inputMuonRefsSingle,
01085             inputRelaxedEmRefs,
01086             doubleThresholds_[ itrig ].first,
01087             doubleThresholds_[ itrig ].second,
01088             decision,
01089             outputMuonRefsTmp,
01090             outputEmRefsTmp,
01091             combosTmp ) ;
01092       }
01093       else if( itrig == L1ParticleMap::kMu3_Jet15 ||
01094                itrig == L1ParticleMap::kMu5_Jet15 ||
01095                itrig == L1ParticleMap::kMu3_Jet70 ||
01096                itrig == L1ParticleMap::kMu5_Jet20 )
01097       {
01098          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01099          objectTypes.push_back( L1ParticleMap::kJet ) ;
01100 
01101          evaluateDoubleDifferentObjectTrigger(
01102             inputMuonRefsSingle,
01103             inputJetRefs,
01104             doubleThresholds_[ itrig ].first,
01105             doubleThresholds_[ itrig ].second,
01106             decision,
01107             outputMuonRefsTmp,
01108             outputJetRefsTmp,
01109             combosTmp ) ;
01110       }
01111       else if( itrig == L1ParticleMap::kMu5_TauJet20 ||
01112                itrig == L1ParticleMap::kMu5_TauJet30 )
01113       {
01114          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01115          objectTypes.push_back( L1ParticleMap::kJet ) ;
01116 
01117          evaluateDoubleDifferentObjectTrigger(
01118             inputMuonRefsSingle,
01119             inputTauRefs,
01120             doubleThresholds_[ itrig ].first,
01121             doubleThresholds_[ itrig ].second,
01122             decision,
01123             outputMuonRefsTmp,
01124             outputJetRefsTmp,
01125             combosTmp ) ;
01126       }
01127       else if( itrig == L1ParticleMap::kIsoEG10_EG10 )
01128       {
01129          objectTypes.push_back( L1ParticleMap::kEM ) ;
01130          objectTypes.push_back( L1ParticleMap::kEM ) ;
01131 
01132          evaluateDoubleDifferentObjectSameTypeTrigger(
01133             inputIsoEmRefs,
01134             inputRelaxedEmRefs,
01135             doubleThresholds_[ itrig ].first,
01136             doubleThresholds_[ itrig ].second,
01137             decision,
01138             outputEmRefsTmp,
01139             combosTmp ) ;
01140       }
01141       else if( itrig == L1ParticleMap::kIsoEG10_Jet15 ||
01142                itrig == L1ParticleMap::kIsoEG10_Jet30 ||
01143                itrig == L1ParticleMap::kIsoEG10_Jet20 ||
01144                itrig == L1ParticleMap::kIsoEG10_Jet70 )
01145       {
01146          objectTypes.push_back( L1ParticleMap::kEM ) ;
01147          objectTypes.push_back( L1ParticleMap::kJet ) ;
01148 
01149          evaluateDoubleDifferentCaloObjectTrigger(
01150             inputIsoEmRefs,
01151             inputJetRefs,
01152             doubleThresholds_[ itrig ].first,
01153             doubleThresholds_[ itrig ].second,
01154             decision,
01155             outputEmRefsTmp,
01156             outputJetRefsTmp,
01157             combosTmp ) ;
01158       }
01159       else if( itrig == L1ParticleMap::kIsoEG10_TauJet20 ||
01160                itrig == L1ParticleMap::kIsoEG10_TauJet30 )
01161       {
01162          objectTypes.push_back( L1ParticleMap::kEM ) ;
01163          objectTypes.push_back( L1ParticleMap::kJet ) ;
01164 
01165          evaluateDoubleDifferentCaloObjectTrigger(
01166             inputIsoEmRefs,
01167             inputTauRefs,
01168             doubleThresholds_[ itrig ].first,
01169             doubleThresholds_[ itrig ].second,
01170             decision,
01171             outputEmRefsTmp,
01172             outputJetRefsTmp,
01173             combosTmp ) ;
01174       }
01175       else if( itrig == L1ParticleMap::kEG10_Jet15 ||
01176                itrig == L1ParticleMap::kEG12_Jet20 ||
01177                itrig == L1ParticleMap::kEG12_Jet70 )
01178       {
01179          objectTypes.push_back( L1ParticleMap::kEM ) ;
01180          objectTypes.push_back( L1ParticleMap::kJet ) ;
01181 
01182          evaluateDoubleDifferentCaloObjectTrigger(
01183             inputRelaxedEmRefs,
01184             inputJetRefs,
01185             doubleThresholds_[ itrig ].first,
01186             doubleThresholds_[ itrig ].second,
01187             decision,
01188             outputEmRefsTmp,
01189             outputJetRefsTmp,
01190             combosTmp ) ;
01191       }
01192       else if( itrig == L1ParticleMap::kEG12_TauJet40 )
01193       {
01194          objectTypes.push_back( L1ParticleMap::kEM ) ;
01195          objectTypes.push_back( L1ParticleMap::kJet ) ;
01196 
01197          evaluateDoubleDifferentCaloObjectTrigger(
01198             inputRelaxedEmRefs,
01199             inputTauRefs,
01200             doubleThresholds_[ itrig ].first,
01201             doubleThresholds_[ itrig ].second,
01202             decision,
01203             outputEmRefsTmp,
01204             outputJetRefsTmp,
01205             combosTmp ) ;
01206       }
01207       else if( itrig == L1ParticleMap::kJet70_TauJet40 )
01208       {
01209          objectTypes.push_back( L1ParticleMap::kJet ) ;
01210          objectTypes.push_back( L1ParticleMap::kJet ) ;
01211 
01212          evaluateDoubleDifferentObjectSameTypeTrigger(
01213             inputJetRefs,
01214             inputTauRefs,
01215             doubleThresholds_[ itrig ].first,
01216             doubleThresholds_[ itrig ].second,
01217             decision,
01218             outputJetRefsTmp,
01219             combosTmp ) ;
01220       }
01221       else if( itrig == L1ParticleMap::kMu3_HTT200 )
01222       {
01223          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01224          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01225 
01226          if( ht >= doubleThresholds_[ itrig ].second )
01227          {
01228             evaluateSingleObjectTrigger( inputMuonRefsSingle,
01229                                          doubleThresholds_[ itrig ].first,
01230                                          decision,
01231                                          outputMuonRefsTmp ) ;
01232 
01233             if( decision )
01234             {
01235                metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01236             }
01237          }
01238       }
01239       else if( itrig == L1ParticleMap::kIsoEG10_HTT200 )
01240       {
01241          objectTypes.push_back( L1ParticleMap::kEM ) ;
01242          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01243 
01244          if( ht >= doubleThresholds_[ itrig ].second )
01245          {
01246             evaluateSingleObjectTrigger( inputIsoEmRefs,
01247                                          doubleThresholds_[ itrig ].first,
01248                                          decision,
01249                                          outputEmRefsTmp ) ;
01250 
01251             if( decision )
01252             {
01253                metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01254             }
01255          }
01256       }
01257       else if( itrig == L1ParticleMap::kEG12_HTT200 )
01258       {
01259          objectTypes.push_back( L1ParticleMap::kEM ) ;
01260          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01261 
01262          if( ht >= doubleThresholds_[ itrig ].second )
01263          {
01264             evaluateSingleObjectTrigger( inputRelaxedEmRefs,
01265                                          doubleThresholds_[ itrig ].first,
01266                                          decision,
01267                                          outputEmRefsTmp ) ;
01268 
01269             if( decision )
01270             {
01271                metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01272             }
01273          }
01274       }
01275       else if( itrig == L1ParticleMap::kJet70_HTT200 )
01276       {
01277          objectTypes.push_back( L1ParticleMap::kJet ) ;
01278          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01279 
01280          if( ht >= doubleThresholds_[ itrig ].second )
01281          {
01282             evaluateSingleObjectTrigger( inputJetRefs,
01283                                          doubleThresholds_[ itrig ].first,
01284                                          decision,
01285                                          outputJetRefsTmp ) ;
01286 
01287             if( decision )
01288             {
01289                metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01290             }
01291          }
01292       }
01293       else if( itrig == L1ParticleMap::kTauJet40_HTT200 )
01294       {
01295          objectTypes.push_back( L1ParticleMap::kJet ) ;
01296          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01297 
01298          if( ht >= doubleThresholds_[ itrig ].second )
01299          {
01300             evaluateSingleObjectTrigger( inputTauRefs,
01301                                          doubleThresholds_[ itrig ].first,
01302                                          decision,
01303                                          outputJetRefsTmp ) ;
01304 
01305             if( decision )
01306             {
01307                metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01308             }
01309          }
01310       }
01311       else if( itrig == L1ParticleMap::kMu3_ETM30 )
01312       {
01313          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01314          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01315 
01316          if( met >= doubleThresholds_[ itrig ].second )
01317          {
01318             evaluateSingleObjectTrigger( inputMuonRefsSingle,
01319                                          doubleThresholds_[ itrig ].first,
01320                                          decision,
01321                                          outputMuonRefsTmp ) ;
01322 
01323             if( decision )
01324             {
01325                metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01326             }
01327          }
01328       }
01329       else if( itrig == L1ParticleMap::kIsoEG10_ETM30 )
01330       {
01331          objectTypes.push_back( L1ParticleMap::kEM ) ;
01332          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01333 
01334          if( met >= doubleThresholds_[ itrig ].second )
01335          {
01336             evaluateSingleObjectTrigger( inputIsoEmRefs,
01337                                          doubleThresholds_[ itrig ].first,
01338                                          decision,
01339                                          outputEmRefsTmp ) ;
01340 
01341             if( decision )
01342             {
01343                metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01344             }
01345          }
01346       }
01347       else if( itrig == L1ParticleMap::kEG12_ETM30 )
01348       {
01349          objectTypes.push_back( L1ParticleMap::kEM ) ;
01350          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01351 
01352          if( met >= doubleThresholds_[ itrig ].second )
01353          {
01354             evaluateSingleObjectTrigger( inputRelaxedEmRefs,
01355                                          doubleThresholds_[ itrig ].first,
01356                                          decision,
01357                                          outputEmRefsTmp ) ;
01358 
01359             if( decision )
01360             {
01361                metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01362             }
01363          }
01364       }
01365       else if( itrig == L1ParticleMap::kJet70_ETM40 )
01366       {
01367          objectTypes.push_back( L1ParticleMap::kJet ) ;
01368          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01369 
01370          if( met >= doubleThresholds_[ itrig ].second )
01371          {
01372             evaluateSingleObjectTrigger( inputJetRefs,
01373                                          doubleThresholds_[ itrig ].first,
01374                                          decision,
01375                                          outputJetRefsTmp ) ;
01376 
01377             if( decision )
01378             {
01379                metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01380             }
01381          }
01382       }
01383       else if( itrig == L1ParticleMap::kTauJet20_ETM20 ||
01384                itrig == L1ParticleMap::kTauJet30_ETM30 ||
01385                itrig == L1ParticleMap::kTauJet30_ETM40 )
01386       {
01387          objectTypes.push_back( L1ParticleMap::kJet ) ;
01388          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01389 
01390          if( met >= doubleThresholds_[ itrig ].second )
01391          {
01392             evaluateSingleObjectTrigger( inputTauRefs,
01393                                          doubleThresholds_[ itrig ].first,
01394                                          decision,
01395                                          outputJetRefsTmp ) ;
01396 
01397             if( decision )
01398             {
01399                metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01400             }
01401          }
01402       }
01403       else if( itrig == L1ParticleMap::kHTT100_ETM30 )
01404       {
01405          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01406          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01407 
01408          if( ht >= doubleThresholds_[ itrig ].first &&
01409              met >= doubleThresholds_[ itrig ].second )
01410          {
01411             decision = true ;
01412             metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01413          }
01414       }
01415       else if( itrig == L1ParticleMap::kTripleMu3 )
01416       {
01417          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01418          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01419          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01420 
01421          evaluateTripleSameObjectTrigger( inputMuonRefsDouble,
01422                                           singleThresholds_[ itrig ],
01423                                           decision,
01424                                           outputMuonRefsTmp,
01425                                           combosTmp ) ;
01426       }
01427       else if( itrig == L1ParticleMap::kTripleIsoEG5 )
01428       {
01429          objectTypes.push_back( L1ParticleMap::kEM ) ;
01430          objectTypes.push_back( L1ParticleMap::kEM ) ;
01431          objectTypes.push_back( L1ParticleMap::kEM ) ;
01432 
01433          evaluateTripleSameObjectTrigger( inputIsoEmRefs,
01434                                           singleThresholds_[ itrig ],
01435                                           decision,
01436                                           outputEmRefsTmp,
01437                                           combosTmp ) ;
01438       }
01439       else if( itrig == L1ParticleMap::kTripleEG10 )
01440       {
01441          objectTypes.push_back( L1ParticleMap::kEM ) ;
01442          objectTypes.push_back( L1ParticleMap::kEM ) ;
01443          objectTypes.push_back( L1ParticleMap::kEM ) ;
01444 
01445          evaluateTripleSameObjectTrigger( inputRelaxedEmRefs,
01446                                           singleThresholds_[ itrig ],
01447                                           decision,
01448                                           outputEmRefsTmp,
01449                                           combosTmp ) ;
01450       }
01451       else if( itrig == L1ParticleMap::kTripleJet50 )
01452       {
01453          objectTypes.push_back( L1ParticleMap::kJet ) ;
01454          objectTypes.push_back( L1ParticleMap::kJet ) ;
01455          objectTypes.push_back( L1ParticleMap::kJet ) ;
01456 
01457          evaluateTripleSameObjectTrigger( inputJetRefs,
01458                                           singleThresholds_[ itrig ],
01459                                           decision,
01460                                           outputJetRefsTmp,
01461                                           combosTmp ) ;
01462       }
01463       else if( itrig == L1ParticleMap::kTripleTauJet40 )
01464       {
01465          objectTypes.push_back( L1ParticleMap::kJet ) ;
01466          objectTypes.push_back( L1ParticleMap::kJet ) ;
01467          objectTypes.push_back( L1ParticleMap::kJet ) ;
01468 
01469          evaluateTripleSameObjectTrigger( inputTauRefs,
01470                                           singleThresholds_[ itrig ],
01471                                           decision,
01472                                           outputJetRefsTmp,
01473                                           combosTmp ) ;
01474       }
01475       else if( itrig == L1ParticleMap::kDoubleMu3_IsoEG5 )
01476       {
01477          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01478          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01479          objectTypes.push_back( L1ParticleMap::kEM ) ;
01480 
01481          evaluateDoublePlusSingleObjectTrigger(
01482             inputMuonRefsDouble,
01483             inputIsoEmRefs,
01484             doubleThresholds_[ itrig ].first,
01485             doubleThresholds_[ itrig ].second,
01486             decision,
01487             outputMuonRefsTmp,
01488             outputEmRefsTmp,
01489             combosTmp ) ;
01490       }
01491       else if( itrig == L1ParticleMap::kDoubleMu3_EG10 )
01492       {
01493          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01494          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01495          objectTypes.push_back( L1ParticleMap::kEM ) ;
01496 
01497          evaluateDoublePlusSingleObjectTrigger(
01498             inputMuonRefsDouble,
01499             inputRelaxedEmRefs,
01500             doubleThresholds_[ itrig ].first,
01501             doubleThresholds_[ itrig ].second,
01502             decision,
01503             outputMuonRefsTmp,
01504             outputEmRefsTmp,
01505             combosTmp ) ;
01506       }
01507       else if( itrig == L1ParticleMap::kDoubleIsoEG5_Mu3 )
01508       {
01509          objectTypes.push_back( L1ParticleMap::kEM ) ;
01510          objectTypes.push_back( L1ParticleMap::kEM ) ;
01511          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01512 
01513          evaluateDoublePlusSingleObjectTrigger(
01514             inputIsoEmRefs,
01515             inputMuonRefsSingle,
01516             doubleThresholds_[ itrig ].first,
01517             doubleThresholds_[ itrig ].second,
01518             decision,
01519             outputEmRefsTmp,
01520             outputMuonRefsTmp,
01521             combosTmp ) ;
01522       }
01523       else if( itrig == L1ParticleMap::kDoubleEG10_Mu3 )
01524       {
01525          objectTypes.push_back( L1ParticleMap::kEM ) ;
01526          objectTypes.push_back( L1ParticleMap::kEM ) ;
01527          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01528 
01529          evaluateDoublePlusSingleObjectTrigger(
01530             inputRelaxedEmRefs,
01531             inputMuonRefsSingle,
01532             doubleThresholds_[ itrig ].first,
01533             doubleThresholds_[ itrig ].second,
01534             decision,
01535             outputEmRefsTmp,
01536             outputMuonRefsTmp,
01537             combosTmp ) ;
01538       }
01539       else if( itrig == L1ParticleMap::kDoubleMu3_HTT200 )
01540       {
01541          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01542          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01543          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01544 
01545          if( ht >= doubleThresholds_[ itrig ].second )
01546          {
01547             evaluateDoubleSameObjectTrigger( inputMuonRefsDouble,
01548                                              doubleThresholds_[ itrig ].first,
01549                                              decision,
01550                                              outputMuonRefsTmp,
01551                                              combosTmp,
01552                                              true ) ;
01553 
01554             if( decision )
01555             {
01556                metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01557             }
01558          }
01559       }
01560       else if( itrig == L1ParticleMap::kDoubleIsoEG5_HTT200 )
01561       {
01562          objectTypes.push_back( L1ParticleMap::kEM ) ;
01563          objectTypes.push_back( L1ParticleMap::kEM ) ;
01564          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01565 
01566          if( ht >= doubleThresholds_[ itrig ].second )
01567          {
01568             evaluateDoubleSameObjectTrigger( inputIsoEmRefs,
01569                                              doubleThresholds_[ itrig ].first,
01570                                              decision,
01571                                              outputEmRefsTmp,
01572                                              combosTmp,
01573                                              true ) ;
01574 
01575             if( decision )
01576             {
01577                metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01578             }
01579          }
01580       }
01581       else if( itrig == L1ParticleMap::kDoubleEG10_HTT200 )
01582       {
01583          objectTypes.push_back( L1ParticleMap::kEM ) ;
01584          objectTypes.push_back( L1ParticleMap::kEM ) ;
01585          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01586 
01587          if( ht >= doubleThresholds_[ itrig ].second )
01588          {
01589             evaluateDoubleSameObjectTrigger( inputRelaxedEmRefs,
01590                                              doubleThresholds_[ itrig ].first,
01591                                              decision,
01592                                              outputEmRefsTmp,
01593                                              combosTmp,
01594                                              true ) ;
01595 
01596             if( decision )
01597             {
01598                metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01599             }
01600          }
01601       }
01602       else if( itrig == L1ParticleMap::kDoubleJet50_HTT200 )
01603       {
01604          objectTypes.push_back( L1ParticleMap::kJet ) ;
01605          objectTypes.push_back( L1ParticleMap::kJet ) ;
01606          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01607 
01608          if( ht >= doubleThresholds_[ itrig ].second )
01609          {
01610             evaluateDoubleSameObjectTrigger( inputJetRefs,
01611                                              doubleThresholds_[ itrig ].first,
01612                                              decision,
01613                                              outputJetRefsTmp,
01614                                              combosTmp,
01615                                              true ) ;
01616 
01617             if( decision )
01618             {
01619                metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01620             }
01621          }
01622       }
01623       else if( itrig == L1ParticleMap::kDoubleTauJet40_HTT200 )
01624       {
01625          objectTypes.push_back( L1ParticleMap::kJet ) ;
01626          objectTypes.push_back( L1ParticleMap::kJet ) ;
01627          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01628 
01629          if( ht >= doubleThresholds_[ itrig ].second )
01630          {
01631             evaluateDoubleSameObjectTrigger( inputTauRefs,
01632                                              doubleThresholds_[ itrig ].first,
01633                                              decision,
01634                                              outputJetRefsTmp,
01635                                              combosTmp,
01636                                              true ) ;
01637 
01638             if( decision )
01639             {
01640                metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01641             }
01642          }
01643       }
01644       else if( itrig == L1ParticleMap::kDoubleMu3_ETM20 )
01645       {
01646          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01647          objectTypes.push_back( L1ParticleMap::kMuon ) ;
01648          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01649 
01650          if( met >= doubleThresholds_[ itrig ].second )
01651          {
01652             evaluateDoubleSameObjectTrigger( inputMuonRefsDouble,
01653                                              doubleThresholds_[ itrig ].first,
01654                                              decision,
01655                                              outputMuonRefsTmp,
01656                                              combosTmp,
01657                                              true ) ;
01658 
01659             if( decision )
01660             {
01661                metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01662             }
01663          }
01664       }
01665       else if( itrig == L1ParticleMap::kDoubleIsoEG5_ETM20 )
01666       {
01667          objectTypes.push_back( L1ParticleMap::kEM ) ;
01668          objectTypes.push_back( L1ParticleMap::kEM ) ;
01669          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01670 
01671          if( met >= doubleThresholds_[ itrig ].second )
01672          {
01673             evaluateDoubleSameObjectTrigger( inputIsoEmRefs,
01674                                              doubleThresholds_[ itrig ].first,
01675                                              decision,
01676                                              outputEmRefsTmp,
01677                                              combosTmp,
01678                                              true ) ;
01679 
01680             if( decision )
01681             {
01682                metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01683             }
01684          }
01685       }
01686       else if( itrig == L1ParticleMap::kDoubleEG10_ETM20 )
01687       {
01688          objectTypes.push_back( L1ParticleMap::kEM ) ;
01689          objectTypes.push_back( L1ParticleMap::kEM ) ;
01690          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01691 
01692          if( met >= doubleThresholds_[ itrig ].second )
01693          {
01694             evaluateDoubleSameObjectTrigger( inputRelaxedEmRefs,
01695                                              doubleThresholds_[ itrig ].first,
01696                                              decision,
01697                                              outputEmRefsTmp,
01698                                              combosTmp,
01699                                              true ) ;
01700 
01701             if( decision )
01702             {
01703                metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01704             }
01705          }
01706       }
01707       else if( itrig == L1ParticleMap::kDoubleJet50_ETM20 )
01708       {
01709          objectTypes.push_back( L1ParticleMap::kJet ) ;
01710          objectTypes.push_back( L1ParticleMap::kJet ) ;
01711          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01712 
01713          if( met >= doubleThresholds_[ itrig ].second )
01714          {
01715             evaluateDoubleSameObjectTrigger( inputJetRefs,
01716                                              doubleThresholds_[ itrig ].first,
01717                                              decision,
01718                                              outputJetRefsTmp,
01719                                              combosTmp,
01720                                              true ) ;
01721 
01722             if( decision )
01723             {
01724                metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01725             }
01726          }
01727       }
01728       else if( itrig == L1ParticleMap::kDoubleTauJet40_ETM20 )
01729       {
01730          objectTypes.push_back( L1ParticleMap::kJet ) ;
01731          objectTypes.push_back( L1ParticleMap::kJet ) ;
01732          objectTypes.push_back( L1ParticleMap::kEtMiss ) ;
01733 
01734          if( met >= doubleThresholds_[ itrig ].second )
01735          {
01736             evaluateDoubleSameObjectTrigger( inputTauRefs,
01737                                              doubleThresholds_[ itrig ].first,
01738                                              decision,
01739                                              outputJetRefsTmp,
01740                                              combosTmp,
01741                                              true ) ;
01742 
01743             if( decision )
01744             {
01745                metRefTmp = L1EtMissParticleRefProd( metHandle ) ;
01746             }
01747          }
01748       }
01749       else if( itrig == L1ParticleMap::kQuadJet30 )
01750       {
01751          objectTypes.push_back( L1ParticleMap::kJet ) ;
01752          objectTypes.push_back( L1ParticleMap::kJet ) ;
01753          objectTypes.push_back( L1ParticleMap::kJet ) ;
01754          objectTypes.push_back( L1ParticleMap::kJet ) ;
01755 
01756          evaluateQuadSameObjectTrigger( inputJetRefs,
01757                                         singleThresholds_[ itrig ],
01758                                         decision,
01759                                         outputJetRefsTmp,
01760                                         combosTmp ) ;
01761       }
01762       else if( itrig == L1ParticleMap::kExclusiveDoubleIsoEG4 )
01763       {
01764          objectTypes.push_back( L1ParticleMap::kEM ) ;
01765          objectTypes.push_back( L1ParticleMap::kEM ) ;
01766 
01767          evaluateDoubleExclusiveIsoEG(inputIsoEmRefs,
01768                                       inputJetRefs,
01769                                       doubleThresholds_[ itrig ].first,
01770                                       doubleThresholds_[ itrig ].second,
01771                                       decision,
01772                                       outputEmRefsTmp,
01773                                       combosTmp);
01774 
01775       }
01776       else if( itrig == L1ParticleMap::kExclusiveDoubleJet60 )
01777       {
01778          objectTypes.push_back( L1ParticleMap::kJet ) ;
01779          objectTypes.push_back( L1ParticleMap::kJet ) ;
01780 
01781          if( inputJetRefs.size() == 2 )
01782          {
01783             evaluateDoubleSameObjectTrigger( inputJetRefs,
01784                                              singleThresholds_[ itrig ],
01785                                              decision,
01786                                              outputJetRefsTmp,
01787                                              combosTmp ) ;
01788          }
01789       }
01790       else if( itrig == L1ParticleMap::kExclusiveJet25_Gap_Jet25 )
01791       {
01792          objectTypes.push_back( L1ParticleMap::kJet ) ;
01793          objectTypes.push_back( L1ParticleMap::kJet ) ;
01794 
01795          if( inputJetRefs.size() == 2 )
01796          {
01797             evaluateJetGapJetTrigger( inputForJetRefs,  
01798                                       singleThresholds_[ itrig ],
01799                                       decision,
01800                                       outputJetRefsTmp,
01801                                       combosTmp ) ;
01802          }
01803       }
01804       else if( itrig == L1ParticleMap::kIsoEG10_Jet20_ForJet10  )
01805       {
01806          objectTypes.push_back( L1ParticleMap::kEM ) ;
01807          objectTypes.push_back( L1ParticleMap::kJet ) ;
01808 
01809          evaluateForwardRapidityGap(inputForJetRefs,
01810                                     singleThresholds_[ itrig ],
01811                                     decision);
01812 
01813          if(decision){
01814            decision = false;
01815            evaluateDoubleDifferentCaloObjectTrigger(
01816               inputIsoEmRefs,
01817               inputCenJetTauJetRefs,
01818               doubleThresholds_[ itrig ].first,
01819               doubleThresholds_[ itrig ].second,
01820               decision,
01821               outputEmRefsTmp,
01822               outputJetRefsTmp,
01823               combosTmp );
01824          }
01825       }
01826       else if( itrig == L1ParticleMap::kMinBias_HTT10 )
01827       {
01828          objectTypes.push_back( L1ParticleMap::kEtHad ) ;
01829 
01830          if( ht >= 10. )
01831          {
01832             decision = true ;
01833             metRefTmp = L1EtMissParticleRefProd( mhtHandle ) ;
01834          }
01835       }
01836       else if( itrig == L1ParticleMap::kZeroBias )
01837       {
01838          decision = true ;
01839       }
01840 
01841       L1EmParticleVectorRef outputEmRefs ;
01842       L1JetParticleVectorRef outputJetRefs ;
01843       L1MuonParticleVectorRef outputMuonRefs ;
01844       L1EtMissParticleRefProd metRef ;
01845       L1ParticleMap::L1IndexComboVector combos ; // unfilled for single objs
01846 
01847       if( decision )
01848       {
01849 //       if( prescaleCounters_[ itrig ] % prescales_[ itrig ] )
01850 
01851          double rand = CLHEP::RandFlat::shoot() * ( double ) prescales_[ itrig ] ;
01852          if( rand > 1. )
01853          {
01854             decision = false ;
01855          }
01856          else
01857          {
01858             outputEmRefs = outputEmRefsTmp ;
01859             outputJetRefs = outputJetRefsTmp ;
01860             outputMuonRefs = outputMuonRefsTmp ;
01861             metRef = metRefTmp ;
01862             combos = combosTmp ;
01863          }
01864 
01865          ++prescaleCounters_[ itrig ] ;
01866       }
01867 
01868       // Construct a L1ParticleMap and add it to the collection.
01869       mapColl->push_back( L1ParticleMap(
01870          ( L1ParticleMap::L1TriggerType ) itrig,
01871          decision,
01872          objectTypes,
01873          outputEmRefs,
01874          outputJetRefs,
01875          outputMuonRefs,
01876          metRef,
01877          combos ) ) ;
01878 
01879       globalDecision = globalDecision || decision ;
01880       decisionWord.push_back( decision ) ;
01881    }
01882 
01883    // Put the L1ParticleMapCollection into the event.
01884    iEvent.put( mapColl ) ;
01885 
01886    // Make a L1GlobalTriggerReadoutRecord and put it into the event.
01887    auto_ptr< L1GlobalTriggerReadoutRecord > gtRecord(
01888       new L1GlobalTriggerReadoutRecord() ) ;
01889    gtRecord->setDecision( globalDecision ) ;
01890    gtRecord->setDecisionWord( decisionWord ) ;
01891    iEvent.put( gtRecord ) ;
01892 
01893    return ;
01894 }
01895 
01896 
01897 template< class TCollection >
01898 void
01899 L1ExtraParticleMapProd::addToVectorRefs(
01900    const edm::Handle< TCollection >& handle,                // input
01901    std::vector< edm::Ref< TCollection > >& vectorRefs )     // output
01902 {
01903    for( size_t i = 0 ; i < handle->size() ; ++i )
01904    {
01905       vectorRefs.push_back( edm::Ref< TCollection >( handle, i ) ) ;
01906    }
01907 }
01908 
01909 template< class TCollection >
01910 void
01911 L1ExtraParticleMapProd::evaluateSingleObjectTrigger(
01912    const std::vector< edm::Ref< TCollection > >& inputRefs, // input
01913    const double& etThreshold,                               // input
01914    bool& decision,                                          // output
01915    std::vector< edm::Ref< TCollection > >& outputRefs )     // output
01916 {
01917    for( size_t i = 0 ; i < inputRefs.size() ; ++i )
01918    {
01919       if( inputRefs[ i ].get()->et() >= etThreshold )
01920       {
01921          decision = true ;
01922          outputRefs.push_back( inputRefs[ i ] ) ;
01923       }
01924    }
01925 }
01926 
01927 template< class TCollection >
01928 void
01929 L1ExtraParticleMapProd::evaluateDoubleSameObjectTrigger(
01930    const std::vector< edm::Ref< TCollection > >& inputRefs, // input
01931    const double& etThreshold,                               // input
01932    bool& decision,                                          // output
01933    std::vector< edm::Ref< TCollection > >& outputRefs,      // output
01934    l1extra::L1ParticleMap::L1IndexComboVector& combos,      // output
01935    bool combinedWithGlobalObject )                          // input
01936 {
01937    // Use i+1 < inputRefs.size() instead of i < inputRefs.size()-1
01938    // because i is unsigned, and if size() is 0, then RHS undefined.
01939    for( size_t i = 0 ; i+1 < inputRefs.size() ; ++i )
01940    {
01941       const edm::Ref< TCollection >& refi = inputRefs[ i ] ;
01942       if( refi.get()->et() >= etThreshold )
01943       {
01944          for( size_t j = i+1 ; j < inputRefs.size() ; ++j )
01945          {
01946             const edm::Ref< TCollection >& refj = inputRefs[ j ] ;
01947             if( refj.get()->et() >= etThreshold )
01948             {
01949                decision = true ;
01950 
01951                // If the two objects are already in the list, find
01952                // their indices.
01953                int iInList = kDefault ;
01954                int jInList = kDefault ;
01955                for( size_t iout = 0 ; iout < outputRefs.size() ; ++iout )
01956                {
01957                   if( refi == outputRefs[ iout ] )
01958                   {
01959                      iInList = iout ;
01960                   }
01961 
01962                   if( refj == outputRefs[ iout ] )
01963                   {
01964                      jInList = iout ;
01965                   }
01966                }
01967 
01968                // If either object is not in the list, add it, and
01969                // record its index.
01970                if( iInList == kDefault )
01971                {
01972                   iInList = outputRefs.size() ;
01973                   outputRefs.push_back( refi ) ;
01974                }
01975                      
01976                if( jInList == kDefault )
01977                {
01978                   jInList = outputRefs.size() ;
01979                   outputRefs.push_back( refj ) ;
01980                }
01981 
01982                // Record this object combination.
01983                l1extra::L1ParticleMap::L1IndexCombo combo ;
01984                combo.push_back( iInList ) ;
01985                combo.push_back( jInList ) ;
01986                if( combinedWithGlobalObject ) combo.push_back( 0 ) ;
01987                combos.push_back( combo ) ;
01988             }
01989          }
01990       }
01991    }
01992 }
01993 
01994 
01995 template< class TCollection >
01996 void
01997 L1ExtraParticleMapProd::evaluateTripleSameObjectTrigger(
01998    const std::vector< edm::Ref< TCollection > >& inputRefs, // input
01999    const double& etThreshold,                               // input
02000    bool& decision,                                          // output
02001    std::vector< edm::Ref< TCollection > >& outputRefs,      // output
02002    l1extra::L1ParticleMap::L1IndexComboVector& combos )     // output
02003 {
02004    // Use i+2 < inputRefs.size() instead of i < inputRefs.size()-2
02005    // because i is unsigned, and if size() is 0, then RHS undefined.
02006    for( size_t i = 0 ; i+2 < inputRefs.size() ; ++i )
02007    {
02008       const edm::Ref< TCollection >& refi = inputRefs[ i ] ;
02009       if( refi.get()->et() >= etThreshold )
02010       {
02011          for( size_t j = i+1 ; j+1 < inputRefs.size() ; ++j )
02012          {
02013             const edm::Ref< TCollection >& refj = inputRefs[ j ] ;
02014             if( refj.get()->et() >= etThreshold )
02015             {
02016                for( size_t k = j+1 ; k < inputRefs.size() ; ++k )
02017                {
02018                   const edm::Ref< TCollection >& refk = inputRefs[ k ] ;
02019                   if( refk.get()->et() >= etThreshold )
02020                   {
02021                      decision = true ;
02022 
02023                      // If the three objects are already in the list, find
02024                      // their indices.
02025                      int iInList = kDefault ;
02026                      int jInList = kDefault ;
02027                      int kInList = kDefault ;
02028                      for( size_t iout = 0 ; iout < outputRefs.size() ; ++iout )
02029                      {
02030                         if( refi == outputRefs[ iout ] )
02031                         {
02032                            iInList = iout ;
02033                         }
02034 
02035                         if( refj == outputRefs[ iout ] )
02036                         {
02037                            jInList = iout ;
02038                         }
02039 
02040                         if( refk == outputRefs[ iout ] )
02041                         {
02042                            kInList = iout ;
02043                         }
02044                      }
02045 
02046                      // If any object is not in the list, add it, and
02047                      // record its index.
02048                      if( iInList == kDefault )
02049                      {
02050                         iInList = outputRefs.size() ;
02051                         outputRefs.push_back( refi );
02052                      }
02053                      
02054                      if( jInList == kDefault )
02055                      {
02056                         jInList = outputRefs.size() ;
02057                         outputRefs.push_back( refj );
02058                      }
02059 
02060                      if( kInList == kDefault )
02061                      {
02062                         kInList = outputRefs.size() ;
02063                         outputRefs.push_back( refk );
02064                      }
02065 
02066                      // Record this object combination.
02067                      l1extra::L1ParticleMap::L1IndexCombo combo ;
02068                      combo.push_back( iInList ) ;
02069                      combo.push_back( jInList ) ;
02070                      combo.push_back( kInList ) ;
02071                      combos.push_back( combo ) ;
02072                   }
02073                }
02074             }
02075          }
02076       }
02077    }
02078 }
02079 
02080 
02081 template< class TCollection1, class TCollection2 >
02082 void
02083 L1ExtraParticleMapProd::evaluateDoublePlusSingleObjectTrigger(
02084    const std::vector< edm::Ref< TCollection1 > >& inputRefs1, // input
02085    const std::vector< edm::Ref< TCollection2 > >& inputRefs2, // input
02086    const double& etThreshold1,                                // input
02087    const double& etThreshold2,                                // input
02088    bool& decision,                                            // output
02089    std::vector< edm::Ref< TCollection1 > >& outputRefs1,      // output
02090    std::vector< edm::Ref< TCollection2 > >& outputRefs2,      // output
02091    l1extra::L1ParticleMap::L1IndexComboVector& combos )       // output
02092 {
02093    // Use i+1 < inputRefs.size() instead of i < inputRefs.size()-1
02094    // because i is unsigned, and if size() is 0, then RHS undefined.
02095    for( size_t i = 0 ; i+1 < inputRefs1.size() ; ++i )
02096    {
02097       const edm::Ref< TCollection1 >& refi = inputRefs1[ i ] ;
02098       if( refi.get()->et() >= etThreshold1 )
02099       {
02100          for( size_t j = i+1 ; j < inputRefs1.size() ; ++j )
02101          {
02102             const edm::Ref< TCollection1 >& refj = inputRefs1[ j ] ;
02103             if( refj.get()->et() >= etThreshold1 )
02104             {
02105                for( size_t k = 0 ; k < inputRefs2.size() ; ++k )
02106                {
02107                   const edm::Ref< TCollection2 >& refk = inputRefs2[ k ] ;
02108                   if( refk.get()->et() >= etThreshold2 )
02109                   {
02110                      decision = true ;
02111 
02112                      // If the three objects are already in the list, find
02113                      // their indices.
02114                      int iInList = kDefault ;
02115                      int jInList = kDefault ;
02116 
02117                      for( size_t iout = 0 ;
02118                           iout < outputRefs1.size() ; ++iout )
02119                      {
02120                         if( refi == outputRefs1[ iout ] )
02121                         {
02122                            iInList = iout ;
02123                         }
02124 
02125                         if( refj == outputRefs1[ iout ] )
02126                         {
02127                            jInList = iout ;
02128                         }
02129                      }
02130 
02131                      int kInList = kDefault ;
02132                      for( size_t kout = 0 ;
02133                           kout < outputRefs2.size() ; ++kout )
02134                      {
02135                         if( refk == outputRefs2[ kout ] )
02136                         {
02137                            kInList = kout ;
02138                         }
02139                      }
02140 
02141                      // If any object is not in the list, add it, and
02142                      // record its index.
02143                      if( iInList == kDefault )
02144                      {
02145                         iInList = outputRefs1.size() ;
02146                         outputRefs1.push_back( refi );
02147                      }
02148                      
02149                      if( jInList == kDefault )
02150                      {
02151                         jInList = outputRefs1.size() ;
02152                         outputRefs1.push_back( refj );
02153                      }
02154 
02155                      if( kInList == kDefault )
02156                      {
02157                         kInList = outputRefs2.size() ;
02158                         outputRefs2.push_back( refk );
02159                      }
02160 
02161                      // Record this object combination.
02162                      l1extra::L1ParticleMap::L1IndexCombo combo ;
02163                      combo.push_back( iInList ) ;
02164                      combo.push_back( jInList ) ;
02165                      combo.push_back( kInList ) ;
02166                      combos.push_back( combo ) ;
02167                   }
02168                }
02169             }
02170          }
02171       }
02172    }
02173 }
02174 
02175 
02176 template< class TCollection >
02177 void
02178 L1ExtraParticleMapProd::evaluateQuadSameObjectTrigger(
02179    const std::vector< edm::Ref< TCollection > >& inputRefs, // input
02180    const double& etThreshold,                               // input
02181    bool& decision,                                          // output
02182    std::vector< edm::Ref< TCollection > >& outputRefs,      // output
02183    l1extra::L1ParticleMap::L1IndexComboVector& combos )     // output
02184 {
02185    // Use i+3 < inputRefs.size() instead of i < inputRefs.size()-3
02186    // because i is unsigned, and if size() is 0, then RHS undefined.
02187    for( size_t i = 0 ; i+3 < inputRefs.size() ; ++i )
02188    {
02189       const edm::Ref< TCollection >& refi = inputRefs[ i ] ;
02190       if( refi.get()->et() >= etThreshold )
02191       {
02192          for( size_t j = i+1 ; j+2 < inputRefs.size() ; ++j )
02193          {
02194             const edm::Ref< TCollection >& refj = inputRefs[ j ] ;
02195             if( refj.get()->et() >= etThreshold )
02196             {
02197                for( size_t k = j+1 ; k+1 < inputRefs.size() ; ++k )
02198                {
02199                   const edm::Ref< TCollection >& refk = inputRefs[ k ] ;
02200                   if( refk.get()->et() >= etThreshold )
02201                   {
02202                      for( size_t p = k+1 ; p < inputRefs.size() ; ++p )
02203                      {
02204                         const edm::Ref< TCollection >& refp = inputRefs[ p ] ;
02205                         if( refp.get()->et() >= etThreshold )
02206                         {
02207                            decision = true ;
02208 
02209                            // If the objects are already in the list, find
02210                            // their indices.
02211                            int iInList = kDefault ;
02212                            int jInList = kDefault ;
02213                            int kInList = kDefault ;
02214                            int pInList = kDefault ;
02215                            for( size_t iout = 0 ;
02216                                 iout < outputRefs.size() ; ++iout )
02217                            {
02218                               if( refi == outputRefs[ iout ] )
02219                               {
02220                                  iInList = iout ;
02221                               }
02222 
02223                               if( refj == outputRefs[ iout ] )
02224                               {
02225                                  jInList = iout ;
02226                               }
02227 
02228                               if( refk == outputRefs[ iout ] )
02229                               {
02230                                  kInList = iout ;
02231                               }
02232 
02233                               if( refp == outputRefs[ iout ] )
02234                               {
02235                                  pInList = iout ;
02236                               }
02237                            }
02238 
02239                            // If any object is not in the list, add it, and
02240                            // record its index.
02241                            if( iInList == kDefault )
02242                            {
02243                               iInList = outputRefs.size() ;
02244                               outputRefs.push_back( refi ) ;
02245                            }
02246                      
02247                            if( jInList == kDefault )
02248                            {
02249                               jInList = outputRefs.size() ;
02250                               outputRefs.push_back( refj ) ;
02251                            }
02252 
02253                            if( kInList == kDefault )
02254                            {
02255                               kInList = outputRefs.size() ;
02256                               outputRefs.push_back( refk ) ;
02257                            }
02258 
02259                            if( pInList == kDefault )
02260                            {
02261                               pInList = outputRefs.size() ;
02262                               outputRefs.push_back( refp ) ;
02263                            }
02264 
02265                            // Record this object combination.
02266                            l1extra::L1ParticleMap::L1IndexCombo combo ;
02267                            combo.push_back( iInList ) ;
02268                            combo.push_back( jInList ) ;
02269                            combo.push_back( kInList ) ;
02270                            combo.push_back( pInList ) ;
02271                            combos.push_back( combo ) ;
02272                         }
02273                      }
02274                   }
02275                }
02276             }
02277          }
02278       }
02279    }
02280 }
02281 
02282 
02283 template< class TCollection1, class TCollection2 >
02284 void
02285 L1ExtraParticleMapProd::evaluateDoubleDifferentObjectTrigger(
02286    const std::vector< edm::Ref< TCollection1 > >& inputRefs1, // input
02287    const std::vector< edm::Ref< TCollection2 > >& inputRefs2, // input
02288    const double& etThreshold1,                                // input
02289    const double& etThreshold2,                                // input
02290    bool& decision,                                            // output
02291    std::vector< edm::Ref< TCollection1 > >& outputRefs1,      // output
02292    std::vector< edm::Ref< TCollection2 > >& outputRefs2,      // output
02293    l1extra::L1ParticleMap::L1IndexComboVector& combos )       // output
02294 {
02295    for( size_t i = 0 ; i < inputRefs1.size() ; ++i )
02296    {
02297       const edm::Ref< TCollection1 >& refi = inputRefs1[ i ] ;
02298       if( refi.get()->et() >= etThreshold1 )
02299       {
02300          for( size_t j = 0 ; j < inputRefs2.size() ; ++j )
02301          {
02302             const edm::Ref< TCollection2 >& refj = inputRefs2[ j ] ;
02303 
02304             if( refj.get()->et() >= etThreshold2 )
02305             {
02306                decision = true ;
02307 
02308                // If the two objects are already in their respective lists,
02309                // find their indices.
02310                int iInList = kDefault ;
02311                for( size_t iout = 0 ; iout < outputRefs1.size() ; ++iout )
02312                {
02313                   if( refi == outputRefs1[ iout ] )
02314                   {
02315                      iInList = iout ;
02316                   }
02317                }
02318 
02319                int jInList = kDefault ;
02320                for( size_t jout = 0 ; jout < outputRefs2.size() ; ++jout )
02321                {
02322                   if( refj == outputRefs2[ jout ] )
02323                   {
02324                      jInList = jout ;
02325                   }
02326                }
02327 
02328                // If either object is not in the list, add it, and
02329                // record its index.
02330                if( iInList == kDefault )
02331                {
02332                   iInList = outputRefs1.size() ;
02333                   outputRefs1.push_back( refi ) ;
02334                }
02335                      
02336                if( jInList == kDefault )
02337                {
02338                   jInList = outputRefs2.size() ;
02339                   outputRefs2.push_back( refj ) ;
02340                }
02341 
02342                // Record this object combination.
02343                l1extra::L1ParticleMap::L1IndexCombo combo ;
02344                combo.push_back( iInList ) ;
02345                combo.push_back( jInList ) ;
02346                combos.push_back( combo ) ;
02347             }
02348          }
02349       }
02350    }
02351 }
02352 
02353 
02354 template< class TCollection >
02355 void
02356 L1ExtraParticleMapProd::evaluateDoubleDifferentObjectSameTypeTrigger(
02357    const std::vector< edm::Ref< TCollection > >& inputRefs1, // input
02358    const std::vector< edm::Ref< TCollection > >& inputRefs2, // input
02359    const double& etThreshold1,                               // input
02360    const double& etThreshold2,                               // input
02361    bool& decision,                                           // output
02362    std::vector< edm::Ref< TCollection > >& outputRefs,       // output
02363    l1extra::L1ParticleMap::L1IndexComboVector& combos )      // output
02364 {
02365    for( size_t i = 0 ; i < inputRefs1.size() ; ++i )
02366    {
02367       const edm::Ref< TCollection >& refi = inputRefs1[ i ] ;
02368       if( refi.get()->et() >= etThreshold1 )
02369       {
02370          for( size_t j = 0 ; j < inputRefs2.size() ; ++j )
02371          {
02372             const edm::Ref< TCollection >& refj = inputRefs2[ j ] ;
02373 
02374             if( refj.get()->et() >= etThreshold2 &&
02375                 refi != refj )
02376             {
02377                decision = true ;
02378 
02379                // If the two objects are already in their respective lists,
02380                // find their indices.
02381                int iInList = kDefault ;
02382                for( size_t iout = 0 ; iout < outputRefs.size() ; ++iout )
02383                {
02384                   if( refi == outputRefs[ iout ] )
02385                   {
02386                      iInList = iout ;
02387                   }
02388                }
02389 
02390                int jInList = kDefault ;
02391                for( size_t jout = 0 ; jout < outputRefs.size() ; ++jout )
02392                {
02393                   if( refj == outputRefs[ jout ] )
02394                   {
02395                      jInList = jout ;
02396                   }
02397                }
02398 
02399                // If either object is not in the list, add it, and
02400                // record its index.
02401                if( iInList == kDefault )
02402                {
02403                   iInList = outputRefs.size() ;
02404                   outputRefs.push_back( refi ) ;
02405                }
02406                      
02407                if( jInList == kDefault )
02408                {
02409                   jInList = outputRefs.size() ;
02410                   outputRefs.push_back( refj ) ;
02411                }
02412 
02413                // Record this object combination.
02414                l1extra::L1ParticleMap::L1IndexCombo combo ;
02415                combo.push_back( iInList ) ;
02416                combo.push_back( jInList ) ;
02417                combos.push_back( combo ) ;
02418             }
02419          }
02420       }
02421    }
02422 }
02423 
02424 void
02425 L1ExtraParticleMapProd::evaluateDoubleDifferentCaloObjectTrigger(
02426    const l1extra::L1EmParticleVectorRef& inputRefs1,         // input
02427    const l1extra::L1JetParticleVectorRef& inputRefs2,        // input
02428    const double& etThreshold1,                                // input
02429    const double& etThreshold2,                                // input
02430    bool& decision,                                            // output
02431    l1extra::L1EmParticleVectorRef& outputRefs1,               // output
02432    l1extra::L1JetParticleVectorRef& outputRefs2,              // output
02433    l1extra::L1ParticleMap::L1IndexComboVector& combos )       // output
02434 {
02435    for( size_t i = 0 ; i < inputRefs1.size() ; ++i )
02436    {
02437       const l1extra::L1EmParticleRef& refi = inputRefs1[ i ] ;
02438       if( refi.get()->et() >= etThreshold1 )
02439       {
02440          for( size_t j = 0 ; j < inputRefs2.size() ; ++j )
02441          {
02442             const l1extra::L1JetParticleRef& refj = inputRefs2[ j ] ;
02443 
02444             // Check for identical region only if both HW objects are non-null.
02445             if( refj.get()->et() >= etThreshold2 &&
02446                 ( refi.get()->gctEmCand() == 0 ||
02447                   refj.get()->gctJetCand() == 0 ||
02448                   refi.get()->gctEmCand()->regionId() !=
02449                   refj.get()->gctJetCand()->regionId() ) )
02450             {
02451                decision = true ;
02452 
02453                // If the two objects are already in their respective lists,
02454                // find their indices.
02455                int iInList = kDefault ;
02456                for( size_t iout = 0 ; iout < outputRefs1.size() ; ++iout )
02457                {
02458                   if( refi == outputRefs1[ iout ] )
02459                   {
02460                      iInList = iout ;
02461                   }
02462                }
02463 
02464                int jInList = kDefault ;
02465                for( size_t jout = 0 ; jout < outputRefs2.size() ; ++jout )
02466                {
02467                   if( refj == outputRefs2[ jout ] )
02468                   {
02469                      jInList = jout ;
02470                   }
02471                }
02472 
02473                // If either object is not in the list, add it, and
02474                // record its index.
02475                if( iInList == kDefault )
02476                {
02477                   iInList = outputRefs1.size() ;
02478                   outputRefs1.push_back( refi ) ;
02479                }
02480                      
02481                if( jInList == kDefault )
02482                {
02483                   jInList = outputRefs2.size() ;
02484                   outputRefs2.push_back( refj ) ;
02485                }
02486 
02487                // Record this object combination.
02488                l1extra::L1ParticleMap::L1IndexCombo combo ;
02489                combo.push_back( iInList ) ;
02490                combo.push_back( jInList ) ;
02491                combos.push_back( combo ) ;
02492             }
02493          }
02494       }
02495    }
02496 }
02497 
02498 // ok if both objects are above the threshold and are in opposite hemispheres
02499 void L1ExtraParticleMapProd::evaluateJetGapJetTrigger(
02500    const l1extra::L1JetParticleVectorRef& inputRefs,        // input
02501    const double& etThreshold,                               // input
02502    bool& decision,                                          // output
02503    l1extra::L1JetParticleVectorRef& outputRefs,             // output
02504    l1extra::L1ParticleMap::L1IndexComboVector& combos )     // output
02505 {
02506    // Use i+1 < inputRefs.size() instead of i < inputRefs.size()-1
02507    // because i is unsigned, and if size() is 0, then RHS undefined.
02508    for( size_t i = 0 ; i+1 < inputRefs.size() ; ++i )
02509    {
02510       const l1extra::L1JetParticleRef& refi = inputRefs[ i ] ;
02511       if( refi.get()->et() >= etThreshold )
02512       {
02513          for( size_t j = i+1 ; j < inputRefs.size() ; ++j )
02514          {
02515             const l1extra::L1JetParticleRef& refj = inputRefs[ j ] ;
02516             if( ( refj.get()->et() >= etThreshold ) &&
02517                 ( ( ( refi.get()->eta() < 0. ) && ( refj.get()->eta() > 0. ) )
02518                   ||
02519                   ( ( refi.get()->eta() > 0. ) && ( refj.get()->eta() < 0. ) )
02520                   )
02521                 )
02522             {
02523                decision = true ;
02524 
02525                // If the two objects are already in the list, find
02526                // their indices.
02527                int iInList = kDefault ;
02528                int jInList = kDefault ;
02529                for( size_t iout = 0 ; iout < outputRefs.size() ; ++iout )
02530                {
02531                   if( refi == outputRefs[ iout ] )
02532                   {
02533                      iInList = iout ;
02534                   }
02535 
02536                   if( refj == outputRefs[ iout ] )
02537                   {
02538                      jInList = iout ;
02539                   }
02540                }
02541 
02542                // If either object is not in the list, add it, and
02543                // record its index.
02544                if( iInList == kDefault )
02545                {
02546                   iInList = outputRefs.size() ;
02547                   outputRefs.push_back( refi ) ;
02548                }
02549 
02550                if( jInList == kDefault )
02551                {
02552                   jInList = outputRefs.size() ;
02553                   outputRefs.push_back( refj ) ;
02554                }
02555 
02556                // Record this object combination.
02557                l1extra::L1ParticleMap::L1IndexCombo combo ;
02558                combo.push_back( iInList ) ;
02559                combo.push_back( jInList ) ;
02560                combos.push_back( combo ) ;
02561             }
02562          }
02563       }
02564    }
02565 }
02566 
02567 
02568 // veto if both forward regions see some jet with e_T > threshold
02569 void
02570 L1ExtraParticleMapProd::evaluateForwardRapidityGap(
02571    const l1extra::L1JetParticleVectorRef& inputRefs,        // input
02572    const double& etThreshold,                               // input
02573    bool& decision                                           // output
02574    )
02575 {
02576    decision = true;
02577 
02578    // search for forward pair
02579    for( size_t k = 0 ; k+1 < inputRefs.size() ; ++k )
02580    {
02581       const l1extra::L1JetParticleRef& refk = inputRefs[ k ] ;
02582       double etak = refk.get()->eta();
02583       if( ( refk.get()->type() == l1extra::L1JetParticle::kForward ) &&
02584           ( refk.get()->et()   >= etThreshold ) )
02585       {
02586           for( size_t l = k+1 ; l < inputRefs.size() ; ++l )
02587           {
02588              const l1extra::L1JetParticleRef& refl = inputRefs[ l ] ;
02589              double etal = refl.get()->eta();
02590              if( (refl.get()->type()==l1extra::L1JetParticle::kForward) &&
02591                  (refl.get()->et()  >= etThreshold    ) &&
02592                  ((etak>0 && etal<0) || (etak<0 && etal>0))    )
02593              {
02594                  decision = false ;
02595                  return ;// no need for going further -- for a faster algorithm
02596              }
02597           }
02598       }
02599    }
02600 }
02601 
02602 void
02603 L1ExtraParticleMapProd::evaluateDoubleExclusiveIsoEG(
02604    const l1extra::L1EmParticleVectorRef& inputRefs1,         // input
02605    const l1extra::L1JetParticleVectorRef& inputRefs2,        // input
02606    const double& etThreshold1,                                // input
02607    const double& etThreshold2,                                // input
02608    bool& decision,                                            // output
02609    l1extra::L1EmParticleVectorRef& outputRefs1,               // output
02610    l1extra::L1ParticleMap::L1IndexComboVector& combos )       // output
02611 {
02612    if ( inputRefs1.size() ==2 )
02613       {  // 2 iso EG
02614          decision=true;
02615          if (inputRefs2.size()>0)
02616             {   // should veto if there are jets, with pt>thresh
02617                for( size_t j = 0 ; j < inputRefs2.size() ; ++j )
02618                   {
02619                      if(inputRefs2[j].get()->gctJetCand()->regionId() ==
02620                         inputRefs1[0].get()->gctEmCand()->regionId())continue;
02621                      if(inputRefs2[j].get()->gctJetCand()->regionId() ==
02622                         inputRefs1[1].get()->gctEmCand()->regionId())continue;
02623                      if(inputRefs2[j].get()->et( )> etThreshold2  ) {
02624                        decision=false; break; }
02625                      // break : for a faster algorithm
02626                   }
02627             }
02628          if(decision)
02629            {   // threshold evaluation for the Exclusive double isoEG
02630               decision = false;
02631               evaluateDoubleSameObjectTrigger( inputRefs1,
02632                                                etThreshold1,
02633                                                decision,
02634                                                outputRefs1,
02635                                                combos ) ;
02636            }
02637       }
02638 }
02639 
02640 
02641 //define this as a plug-in
02642 //DEFINE_FWK_MODULE(L1ExtraParticleMapProd);