Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:35

0001 // -*- C++ -*-
0002 //
0003 // Package:    L1RCTTestAnalyzer
0004 // Class:      L1RCTTestAnalyzer
0005 //
0006 /**\class L1RCTTestAnalyzer L1RCTTestAnalyzer.cc
0007  src/L1RCTTestAnalyzer/src/L1RCTTestAnalyzer.cc
0008 
0009  Description: <one line class summary>
0010 
0011  Implementation:
0012      <Notes on implementation>
0013 */
0014 //
0015 // Original Author:  pts/47
0016 //         Created:  Thu Jul 13 21:38:08 CEST 2006
0017 //
0018 //
0019 
0020 // system include files
0021 #include <iostream>
0022 #include <memory>
0023 // user include files
0024 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0025 #include "FWCore/Framework/interface/Frameworkfwd.h"
0026 
0027 #include "FWCore/Framework/interface/Event.h"
0028 #include "FWCore/Framework/interface/MakerMacros.h"
0029 
0030 #include "CommonTools/UtilAlgos/interface/TFileService.h"
0031 #include "FWCore/ServiceRegistry/interface/Service.h"
0032 
0033 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0034 
0035 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0036 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0037 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
0038 
0039 #include "TH1F.h"
0040 #include "TH2F.h"
0041 #include "TTree.h"
0042 
0043 // // outside of class
0044 // bool compareEmCands(const L1CaloEmCand& cand1, const L1CaloEmCand& cand2)
0045 // {
0046 //   return (cand1.rank() < cand2.rank());
0047 // }
0048 
0049 //
0050 // class declaration
0051 //
0052 
0053 class L1RCTTestAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
0054 public:
0055   explicit L1RCTTestAnalyzer(const edm::ParameterSet &);
0056   ~L1RCTTestAnalyzer() override;
0057 
0058   void analyze(const edm::Event &, const edm::EventSetup &) override;
0059 
0060 private:
0061   static bool compareEmCands(const L1CaloEmCand &cand1, const L1CaloEmCand &cand2);
0062 
0063   // ----------member data ---------------------------
0064   std::string m_HepMCProduct;
0065   bool showEmCands;
0066   bool showRegionSums;
0067   edm::InputTag ecalDigisLabel;
0068   edm::InputTag hcalDigisLabel;
0069   edm::InputTag rctDigisLabel;
0070 
0071   TTree *emTree;
0072   //   float emRank[8];
0073   //   float emIeta[8];
0074   //   float emIphi[8];
0075   //   float emIso[8];
0076   std::vector<int> emRank;
0077   std::vector<int> emIeta;
0078   std::vector<int> emIphi;
0079   std::vector<int> emIso;
0080 
0081   TH1F *h_emRank;
0082   TH1F *h_emRankOutOfTime;
0083   TH1F *h_emIeta;
0084   TH1F *h_emIphi;
0085   TH1F *h_emIso;
0086   TH2F *h_emRankInIetaIphi;
0087   // add isolated/non-iso?
0088   TH2F *h_emIsoInIetaIphi;
0089   TH2F *h_emNonIsoInIetaIphi;
0090   TH1F *h_emCandTimeSample;
0091 
0092   TH1F *h_regionSum;
0093   TH1F *h_regionIeta;
0094   TH1F *h_regionIphi;
0095   TH1F *h_regionMip;
0096   TH2F *h_regionSumInIetaIphi;
0097   // add bits in ieta/iphi?  tau, overflow, mip, quiet, finegrain?
0098   // (is fine grain same thing as mip??)
0099   TH2F *h_regionFGInIetaIphi;
0100 
0101   TH1F *h_towerMip;
0102 
0103   TH1F *h_ecalTimeSample;
0104   TH1F *h_hcalTimeSample;
0105 };
0106 
0107 //
0108 // constants, enums and typedefs
0109 //
0110 
0111 //
0112 // static data member definitions
0113 //