CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/L1Trigger/L1ExtraFromDigis/interface/L1ExtraParticleMapProd.h

Go to the documentation of this file.
00001 #ifndef L1ExtraFromDigis_L1ExtraParticleMapProd_h
00002 #define L1ExtraFromDigis_L1ExtraParticleMapProd_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     L1ExtraFromDigis
00006 // Class  :     L1ExtraParticleMapProd
00007 // 
00012 //
00013 // Original Author:  
00014 //         Created:  Tue Oct 17 00:14:00 EDT 2006
00015 // $Id: L1ExtraParticleMapProd.h,v 1.11 2010/02/11 00:12:49 wmtan Exp $
00016 //
00017 
00018 // system include files
00019 
00020 // user include files
00021 #include "FWCore/Framework/interface/Frameworkfwd.h"
00022 #include "FWCore/Framework/interface/EDProducer.h"
00023 #include "FWCore/Framework/interface/Event.h"
00024 #include "FWCore/Framework/interface/EventSetup.h"
00025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00026 #include "FWCore/Utilities/interface/InputTag.h"
00027 
00028 #include "DataFormats/L1Trigger/interface/L1EmParticle.h"
00029 #include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h"
00030 #include "DataFormats/L1Trigger/interface/L1JetParticle.h"
00031 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
00032 #include "DataFormats/L1Trigger/interface/L1MuonParticle.h"
00033 #include "DataFormats/L1Trigger/interface/L1ParticleMap.h"
00034 #include "DataFormats/L1Trigger/interface/L1ParticleMapFwd.h"
00035 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"
00036 
00037 // forward declarations
00038 
00039 class L1ExtraParticleMapProd : public edm::EDProducer {
00040    public:
00041       explicit L1ExtraParticleMapProd(const edm::ParameterSet&);
00042       ~L1ExtraParticleMapProd();
00043 
00044 
00045       virtual void produce(edm::Event&, const edm::EventSetup&);
00046    private:
00047 
00048       // Adds Refs to the objects in handle to the outputRefs vector.
00049       template< class TCollection >
00050       void addToVectorRefs(
00051          const edm::Handle< TCollection >& handle,               // input
00052          std::vector< edm::Ref< TCollection > >& vectorRefs ) ;  // output
00053 
00054       template< class TCollection >
00055       void evaluateSingleObjectTrigger(
00056          const std::vector< edm::Ref< TCollection > >& inputRefs, // input
00057          const double& etThreshold,                               // input
00058          bool& decision,                                          // output
00059          std::vector< edm::Ref< TCollection > >& outputRefs ) ;   // output
00060 
00061       template< class TCollection >
00062       void evaluateDoubleSameObjectTrigger(
00063          const std::vector< edm::Ref< TCollection > >& inputRefs, // input
00064          const double& etThreshold,                               // input
00065          bool& decision,                                          // output
00066          std::vector< edm::Ref< TCollection > >& outputRefs,      // output
00067          l1extra::L1ParticleMap::L1IndexComboVector& combos,      // output
00068          bool combinedWithGlobalObject = false ) ; // if true, add entry for
00069                                              // HT or MET to particle combos
00070 
00071       template< class TCollection >
00072       void evaluateTripleSameObjectTrigger(
00073          const std::vector< edm::Ref< TCollection > >& inputRefs, // input
00074          const double& etThreshold,                               // input
00075          bool& decision,                                          // output
00076          std::vector< edm::Ref< TCollection > >& outputRefs,      // output
00077          l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;   // output
00078 
00079       template< class TCollection1, class TCollection2 >
00080       void evaluateDoublePlusSingleObjectTrigger(
00081          const std::vector< edm::Ref< TCollection1 > >& inputRefs1, // input
00082          const std::vector< edm::Ref< TCollection2 > >& inputRefs2, // input
00083          const double& etThreshold1,                                // input
00084          const double& etThreshold2,                                // input
00085          bool& decision,                                            // output
00086          std::vector< edm::Ref< TCollection1 > >& outputRefs1,      // output
00087          std::vector< edm::Ref< TCollection2 > >& outputRefs2,      // output
00088          l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;     // output
00089 
00090       template< class TCollection >
00091       void evaluateQuadSameObjectTrigger(
00092          const std::vector< edm::Ref< TCollection > >& inputRefs, // input
00093          const double& etThreshold,                               // input
00094          bool& decision,                                          // output
00095          std::vector< edm::Ref< TCollection > >& outputRefs,      // output
00096          l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;   // output
00097 
00098       template< class TCollection1, class TCollection2 >
00099       void evaluateDoubleDifferentObjectTrigger(
00100          const std::vector< edm::Ref< TCollection1 > >& inputRefs1, // input
00101          const std::vector< edm::Ref< TCollection2 > >& inputRefs2, // input
00102          const double& etThreshold1,                                // input
00103          const double& etThreshold2,                                // input
00104          bool& decision,                                            // output
00105          std::vector< edm::Ref< TCollection1 > >& outputRefs1,      // output
00106          std::vector< edm::Ref< TCollection2 > >& outputRefs2,      // output
00107          l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;     // output
00108 
00109       template< class TCollection >
00110       void evaluateDoubleDifferentObjectSameTypeTrigger(
00111          const std::vector< edm::Ref< TCollection > >& inputRefs1, // input
00112          const std::vector< edm::Ref< TCollection > >& inputRefs2, // input
00113          const double& etThreshold1,                               // input
00114          const double& etThreshold2,                               // input
00115          bool& decision,                                           // output
00116          std::vector< edm::Ref< TCollection > >& outputRefs,       // output
00117          l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;    // output
00118 
00119       void evaluateDoubleDifferentCaloObjectTrigger(
00120          const l1extra::L1EmParticleVectorRef& inputRefs1,          // input
00121          const l1extra::L1JetParticleVectorRef& inputRefs2,         // input
00122          const double& etThreshold1,                                // input
00123          const double& etThreshold2,                                // input
00124          bool& decision,                                            // output
00125          l1extra::L1EmParticleVectorRef& outputRefs1,               // output
00126          l1extra::L1JetParticleVectorRef& outputRefs2,              // output
00127          l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;     // output
00128 
00129       void evaluateJetGapJetTrigger(
00130          const l1extra::L1JetParticleVectorRef& inputRefs,          // input
00131          const double& etThreshold,                                 // input
00132          bool& decision,                                            // output
00133          l1extra::L1JetParticleVectorRef& outputRefs,               // output
00134          l1extra::L1ParticleMap::L1IndexComboVector& combos );      // output
00135 
00136        void evaluateForwardRapidityGap(
00137           const l1extra::L1JetParticleVectorRef& inputRefs,         // input
00138           const double& etThreshold,                                // input
00139           bool& decision );                                         // output
00140 
00141        void evaluateDoubleExclusiveIsoEG(
00142           const l1extra::L1EmParticleVectorRef& inputRefs1,         // input
00143           const l1extra::L1JetParticleVectorRef& inputRefs2,        // input
00144           const double& etThreshold1,                               // input
00145           const double& etThreshold2,                               // input
00146           bool& decision,                                           // output
00147           l1extra::L1EmParticleVectorRef& outputRefs1,              // output
00148           l1extra::L1ParticleMap::L1IndexComboVector& combos );     // output
00149 
00150       // ----------member data ---------------------------
00151       edm::InputTag muonSource_ ;
00152       edm::InputTag isoEmSource_ ;
00153       edm::InputTag nonIsoEmSource_ ;
00154       edm::InputTag cenJetSource_ ;
00155       edm::InputTag forJetSource_ ;
00156       edm::InputTag tauJetSource_ ;
00157       edm::InputTag etMissSource_ ;
00158       edm::InputTag htMissSource_ ;
00159 
00160       double singleThresholds_[ l1extra::L1ParticleMap::kNumOfL1TriggerTypes ];
00161       int prescales_[ l1extra::L1ParticleMap::kNumOfL1TriggerTypes ] ;
00162       int prescaleCounters_[
00163          l1extra::L1ParticleMap::kNumOfL1TriggerTypes ] ;
00164       std::pair< double, double >
00165          doubleThresholds_[ l1extra::L1ParticleMap::kNumOfL1TriggerTypes ] ;
00166 };
00167 
00168 #endif