00001 #ifndef L1ExtraFromDigis_L1ExtraParticleMapProd_h
00002 #define L1ExtraFromDigis_L1ExtraParticleMapProd_h
00003
00004
00005
00006
00007
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
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
00049 template< class TCollection >
00050 void addToVectorRefs(
00051 const edm::Handle< TCollection >& handle,
00052 std::vector< edm::Ref< TCollection > >& vectorRefs ) ;
00053
00054 template< class TCollection >
00055 void evaluateSingleObjectTrigger(
00056 const std::vector< edm::Ref< TCollection > >& inputRefs,
00057 const double& etThreshold,
00058 bool& decision,
00059 std::vector< edm::Ref< TCollection > >& outputRefs ) ;
00060
00061 template< class TCollection >
00062 void evaluateDoubleSameObjectTrigger(
00063 const std::vector< edm::Ref< TCollection > >& inputRefs,
00064 const double& etThreshold,
00065 bool& decision,
00066 std::vector< edm::Ref< TCollection > >& outputRefs,
00067 l1extra::L1ParticleMap::L1IndexComboVector& combos,
00068 bool combinedWithGlobalObject = false ) ;
00069
00070
00071 template< class TCollection >
00072 void evaluateTripleSameObjectTrigger(
00073 const std::vector< edm::Ref< TCollection > >& inputRefs,
00074 const double& etThreshold,
00075 bool& decision,
00076 std::vector< edm::Ref< TCollection > >& outputRefs,
00077 l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;
00078
00079 template< class TCollection1, class TCollection2 >
00080 void evaluateDoublePlusSingleObjectTrigger(
00081 const std::vector< edm::Ref< TCollection1 > >& inputRefs1,
00082 const std::vector< edm::Ref< TCollection2 > >& inputRefs2,
00083 const double& etThreshold1,
00084 const double& etThreshold2,
00085 bool& decision,
00086 std::vector< edm::Ref< TCollection1 > >& outputRefs1,
00087 std::vector< edm::Ref< TCollection2 > >& outputRefs2,
00088 l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;
00089
00090 template< class TCollection >
00091 void evaluateQuadSameObjectTrigger(
00092 const std::vector< edm::Ref< TCollection > >& inputRefs,
00093 const double& etThreshold,
00094 bool& decision,
00095 std::vector< edm::Ref< TCollection > >& outputRefs,
00096 l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;
00097
00098 template< class TCollection1, class TCollection2 >
00099 void evaluateDoubleDifferentObjectTrigger(
00100 const std::vector< edm::Ref< TCollection1 > >& inputRefs1,
00101 const std::vector< edm::Ref< TCollection2 > >& inputRefs2,
00102 const double& etThreshold1,
00103 const double& etThreshold2,
00104 bool& decision,
00105 std::vector< edm::Ref< TCollection1 > >& outputRefs1,
00106 std::vector< edm::Ref< TCollection2 > >& outputRefs2,
00107 l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;
00108
00109 template< class TCollection >
00110 void evaluateDoubleDifferentObjectSameTypeTrigger(
00111 const std::vector< edm::Ref< TCollection > >& inputRefs1,
00112 const std::vector< edm::Ref< TCollection > >& inputRefs2,
00113 const double& etThreshold1,
00114 const double& etThreshold2,
00115 bool& decision,
00116 std::vector< edm::Ref< TCollection > >& outputRefs,
00117 l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;
00118
00119 void evaluateDoubleDifferentCaloObjectTrigger(
00120 const l1extra::L1EmParticleVectorRef& inputRefs1,
00121 const l1extra::L1JetParticleVectorRef& inputRefs2,
00122 const double& etThreshold1,
00123 const double& etThreshold2,
00124 bool& decision,
00125 l1extra::L1EmParticleVectorRef& outputRefs1,
00126 l1extra::L1JetParticleVectorRef& outputRefs2,
00127 l1extra::L1ParticleMap::L1IndexComboVector& combos ) ;
00128
00129 void evaluateJetGapJetTrigger(
00130 const l1extra::L1JetParticleVectorRef& inputRefs,
00131 const double& etThreshold,
00132 bool& decision,
00133 l1extra::L1JetParticleVectorRef& outputRefs,
00134 l1extra::L1ParticleMap::L1IndexComboVector& combos );
00135
00136 void evaluateForwardRapidityGap(
00137 const l1extra::L1JetParticleVectorRef& inputRefs,
00138 const double& etThreshold,
00139 bool& decision );
00140
00141 void evaluateDoubleExclusiveIsoEG(
00142 const l1extra::L1EmParticleVectorRef& inputRefs1,
00143 const l1extra::L1JetParticleVectorRef& inputRefs2,
00144 const double& etThreshold1,
00145 const double& etThreshold2,
00146 bool& decision,
00147 l1extra::L1EmParticleVectorRef& outputRefs1,
00148 l1extra::L1ParticleMap::L1IndexComboVector& combos );
00149
00150
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