File indexing completed on 2024-04-06 12:26:15
0001 #ifndef RecoLocalMuon_RPCRecHitReader_H
0002 #define RecoLocalMuon_RPCRecHitReader_H
0003
0004
0005
0006
0007
0008
0009
0010 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0011 #include "FWCore/Framework/interface/ESHandle.h"
0012 #include "FWCore/Framework/interface/Event.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014
0015 #include "DataFormats/Common/interface/Handle.h"
0016 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0017 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0018
0019 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0020 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0021 #include "Geometry/RPCGeometry/interface/RPCRoll.h"
0022
0023 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0024
0025 #include <vector>
0026 #include <map>
0027 #include <string>
0028 #include <iostream>
0029 #include <fstream>
0030 #include <stdio.h>
0031
0032 class TGraph;
0033 class TFile;
0034 class TH1F;
0035 class TH2F;
0036
0037 class RPCRecHit;
0038 class RPCGeometry;
0039 class MuonGeometryRecord;
0040
0041 class RPCRecHitReader : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0042 public:
0043
0044 RPCRecHitReader(const edm::ParameterSet& pset);
0045
0046 void beginRun(const edm::Run&, const edm::EventSetup&) override;
0047 void endRun(const edm::Run&, const edm::EventSetup&) override {}
0048 void endJob() override;
0049
0050
0051 ~RPCRecHitReader() override;
0052
0053
0054
0055
0056 void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override;
0057
0058 unsigned int layerRecHit(RPCRecHit);
0059
0060 private:
0061 edm::ESGetToken<RPCGeometry, MuonGeometryRecord> rpcGeomToken_;
0062 edm::ESGetToken<RPCGeometry, MuonGeometryRecord> rpcGeomBRToken_;
0063 std::string fOutputFileName;
0064 std::string recHitLabel1;
0065 std::string recHitLabel2;
0066
0067 int region;
0068 int wheel;
0069 int sector;
0070 int station;
0071 int layer;
0072 int subsector;
0073
0074 float _phi;
0075
0076 float _trigger;
0077 float _spurious;
0078 float _spuriousPeak;
0079 float _triggerGOOD;
0080 float _efficiencyBAD;
0081 float _efficiencyGOOD;
0082 float _efficiencyBEST;
0083
0084 TFile* fOutputFile;
0085 std::fstream* fout;
0086
0087 TH2F* histoXY;
0088 TH1F* histoSlope;
0089 TH1F* histoChi2;
0090 TH1F* histoRes;
0091 TH1F* histoRes1;
0092 TH1F* histoRes2;
0093 TH1F* histoRes3;
0094 TH1F* histoPool1;
0095 TH1F* histoPool2;
0096 TH1F* histoPool3;
0097
0098 TH1F* histoExpectedOcc;
0099 TH1F* histoRealOcc;
0100 TH1F* histoLocalEff;
0101
0102 float yLayer;
0103
0104 bool _trigRPC1;
0105 bool _trigRPC2;
0106 bool _trigRPC3;
0107 bool _trigRPC4;
0108 bool _trigRPC5;
0109 bool _trigRPC6;
0110
0111 std::vector<bool> _trigConfig;
0112 std::map<int, float> _mapLayer;
0113 const RPCRoll* _rollEff;
0114 };
0115
0116 #endif