00001 #ifndef RecoTauTag_FastL1GlobalAlgo_h 00002 #define RecoTauTag_FastL1GlobalAlgo_h 00003 // -*- C++ -*- 00004 // 00005 // Package: L1CaloSim 00006 // Class: FastL1GlobalAlgo 00007 // 00015 // 00016 // Original Author: Chi Nhan Nguyen 00017 // Created: Mon Feb 19 13:25:24 CST 2007 00018 // $Id: FastL1GlobalAlgo.h,v 1.20 2009/03/23 11:41:27 chinhan Exp $ 00019 // 00020 00021 // system include files 00022 #include <memory> 00023 00024 // user include files 00025 #include "FWCore/Framework/interface/Event.h" 00026 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00027 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00028 #include "FWCore/Framework/interface/EventSetup.h" 00029 00030 #include <string> 00031 #include <iostream> 00032 #include <vector> 00033 00034 #include "DataFormats/Math/interface/LorentzVector.h" 00035 #include "DataFormats/Math/interface/LorentzVectorFwd.h" 00036 #include "DataFormats/Math/interface/Point3D.h" 00037 #include "DataFormats/Math/interface/Vector3D.h" 00038 00039 #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" 00040 #include "DataFormats/Candidate/interface/Candidate.h" 00041 #include "DataFormats/Candidate/interface/CandidateFwd.h" 00042 00043 #include "DataFormats/L1Trigger/interface/L1EmParticle.h" 00044 #include "DataFormats/L1Trigger/interface/L1JetParticle.h" 00045 #include "DataFormats/L1Trigger/interface/L1MuonParticle.h" 00046 #include "DataFormats/L1Trigger/interface/L1EtMissParticle.h" 00047 #include "DataFormats/L1Trigger/interface/L1EtMissParticleFwd.h" 00048 #include "DataFormats/L1Trigger/interface/L1ParticleMap.h" 00049 00050 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h" 00051 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h" 00052 00053 #include "FastSimulation/L1CaloTriggerProducer/interface/FastL1Region.h" 00054 #include "FastSimDataFormats/External/interface/FastL1BitInfo.h" 00055 00056 #include "Geometry/CaloTopology/interface/CaloTowerConstituentsMap.h" 00057 #include "DataFormats/Math/interface/Vector3D.h" 00058 00059 // 00060 // constants, enums and typedefs 00061 // 00062 00063 // 00064 // static data member definitions 00065 // 00066 00067 // 00068 // class decleration 00069 // 00070 class FastL1GlobalAlgo { 00071 public: 00072 explicit FastL1GlobalAlgo(const edm::ParameterSet&); 00073 ~FastL1GlobalAlgo(); 00074 00075 void CaloTowersDump(edm::Event const& e); 00076 00077 //l1extra::L1EtMissParticle getMET() const { return m_MET; } 00078 l1extra::L1EtMissParticleCollection getMET() const { return m_METs; } 00079 l1extra::L1JetParticleCollection getTauJets() const { return m_TauJets; } 00080 l1extra::L1JetParticleCollection getCenJets() const { return m_CenJets; } 00081 l1extra::L1JetParticleCollection getForJets() const { return m_ForJets; } 00082 l1extra::L1EmParticleCollection getEgammas() const { return m_Egammas; } 00083 l1extra::L1EmParticleCollection getisoEgammas() const { return m_isoEgammas; } 00084 FastL1BitInfoCollection getBitInfos() { return m_BitInfos; } 00085 00086 void FillBitInfos(); 00087 void InitL1Regions(); 00088 00089 // ------------ Methods using Towers and RecHits ------------ 00090 void FillMET(); // old version 00091 void FillMET(edm::Event const& e); 00092 void FillL1Regions(edm::Event const& e, const edm::EventSetup& c); 00093 void FillJets(const edm::EventSetup& e) { findJets(); }; 00094 void FillEgammas(edm::Event const&); 00095 00096 // ------------ Methods using Trigger Primitives------------ 00097 void FillL1RegionsTP(edm::Event const& e, const edm::EventSetup& c); 00098 void FillEgammasTP(edm::Event const&); 00099 00100 std::vector<FastL1Region> GetCaloRegions(){return m_Regions;}//KP 00101 00102 00103 private: 00104 bool isMaxEtRgn_Window33(int rgnid); 00105 //int isEMCand(CaloTowerDetId cid, l1extra::L1EmParticle p,const edm::Event& e); 00106 int isEMCand(CaloTowerDetId cid, l1extra::L1EmParticle *p,const edm::Event& e); 00107 bool isTauJet(int rgnid); 00108 bool TauIsolation(int rgnid); 00109 00110 void findJets(); 00111 void addJet(int rgnId, bool taubit); 00112 void checkMapping(); 00113 bool greaterEt(const reco::Candidate& a, const reco::Candidate& b); 00114 00115 double hcaletValue(const int ieta,const int compET); 00116 // ----------member data --------------------------- 00117 // output data 00118 //l1extra::L1EtMissParticle m_MET; 00119 l1extra::L1EtMissParticleCollection m_METs; 00120 l1extra::L1JetParticleCollection m_TauJets; 00121 l1extra::L1JetParticleCollection m_CenJets; 00122 l1extra::L1JetParticleCollection m_ForJets; 00123 l1extra::L1EmParticleCollection m_Egammas; 00124 l1extra::L1EmParticleCollection m_isoEgammas; 00125 FastL1BitInfoCollection m_BitInfos; 00126 00127 std::vector<FastL1Region> m_Regions; 00128 FastL1RegionMap* m_RMap; 00129 bool m_DoBitInfo; 00130 00131 bool m_GctIso; 00132 double m_IsolationEt; 00133 00134 L1Config m_L1Config; 00135 double m_hcaluncomp[33][256]; 00136 }; 00137 00138 #endif