Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:24

0001 // system include files
0002 #include <memory>
0003 #include <string>
0004 #include <iostream>
0005 #include <map>
0006 
0007 // user include files
0008 #include "FWCore/Framework/interface/Frameworkfwd.h"
0009 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/Framework/interface/MakerMacros.h"
0012 #include "FWCore/Framework/interface/EventSetup.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "FWCore/Utilities/interface/ESGetToken.h"
0015 
0016 #include "DataFormats/DetId/interface/DetId.h"
0017 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0018 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0019 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
0020 
0021 #include "TTree.h"
0022 
0023 namespace cms {
0024   class MinBias : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0025   public:
0026     explicit MinBias(const edm::ParameterSet&);
0027 
0028     void analyze(const edm::Event&, const edm::EventSetup&) override;
0029     void beginJob() override;
0030     void beginRun(edm::Run const&, edm::EventSetup const&) override;
0031     void endRun(edm::Run const&, edm::EventSetup const&) override;
0032     void endJob() override;
0033 
0034   private:
0035     // ----------member data ---------------------------
0036     // names of modules, producing object collections
0037 
0038     std::string hbheLabel_, hoLabel_, hfLabel_;
0039     edm::EDGetTokenT<HBHERecHitCollection> hbheToken_;
0040     edm::EDGetTokenT<HORecHitCollection> hoToken_;
0041     edm::EDGetTokenT<HFRecHitCollection> hfToken_;
0042     edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeometryESToken_;
0043     // stuff for histogramms
0044     bool allowMissingInputs_;
0045     //
0046     //   TH1D*       hCalo1[8000], *hCalo2;
0047     TTree* myTree_;
0048     //
0049     int mydet, mysubd, depth, iphi, ieta;
0050     float phi, eta;
0051     float mom1, mom2, mom3, mom4, occup;
0052     const CaloGeometry* geo_;
0053     // counters
0054     std::map<DetId, double> theFillDetMap0_;
0055     std::map<DetId, double> theFillDetMap1_;
0056     std::map<DetId, double> theFillDetMap2_;
0057     std::map<DetId, double> theFillDetMap3_;
0058     std::map<DetId, double> theFillDetMap4_;
0059   };
0060 }  // namespace cms