00001
00002
00003
00004
00005
00006
00007 #include <memory>
00008
00009
00010 #include "FWCore/Framework/interface/Frameworkfwd.h"
00011 #include "FWCore/Framework/interface/EDAnalyzer.h"
00012 #include "FWCore/Framework/interface/Event.h"
00013 #include "FWCore/Framework/interface/MakerMacros.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 #include "FWCore/ParameterSet/interface/InputTag.h"
00016 #include "DataFormats/JetReco/interface/CaloJet.h"
00017 #include "DataFormats/TauReco/interface/L2TauInfoAssociation.h"
00018 #include "DataFormats/L1Trigger/interface/L1JetParticle.h"
00019 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
00020 #include "DataFormats/Math/interface/LorentzVector.h"
00021 #include <string>
00022 #include <TTree.h>
00023 #include <TFile.h>
00024
00025 typedef math::XYZTLorentzVectorD LV;
00026 typedef std::vector<LV> LVColl;
00027
00028
00029
00030
00031 struct MatchElementL2 {
00032 bool matched;
00033 double deltar;
00034 double mcEta;
00035 double mcEt;
00036 };
00037
00038
00039 class L2TauAnalyzer : public edm::EDAnalyzer {
00040 public:
00041 explicit L2TauAnalyzer(const edm::ParameterSet&);
00042 ~L2TauAnalyzer();
00043
00044 private:
00045 virtual void beginJob(const edm::EventSetup&) ;
00046 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00047 virtual void endJob() ;
00048
00049 edm::InputTag l2TauInfoAssoc_;
00050 edm::InputTag l1Taus_;
00051 edm::InputTag l1Jets_;
00052 std::string rootFile_;
00053 bool IsSignal_;
00054 edm::InputTag mcColl_;
00055
00056 double matchDR_;
00057
00058 int cl_Nclusters;
00059 float ecalIsol_Et,towerIsol_Et,cl_etaRMS,cl_phiRMS,cl_drRMS,MCeta,MCet,seedTowerEt,JetEt,JetEta,L1et,L1eta;
00060 TFile *l2file;
00061 TTree *l2tree;
00062
00063 MatchElementL2 match(const reco::Jet&,const LVColl&);
00064 MatchElementL2 match(const reco::Jet&,const l1extra::L1JetParticleCollection&);
00065
00066 };
00067
00068