CMS 3D CMS Logo

SiStripCorrelateNoise.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiStripCorrelateNoise
4 // Class: SiStripCorrelateNoise
5 //
14 //
15 // Original Author: Domenico GIORDANO
16 // Created: Mon Aug 10 10:42:04 CEST 2009
17 //
18 //
19 
20 // system include files
21 #include <memory>
22 
23 // user include files
30 
33 
35 
39 
40 #include "TFile.h"
41 #include "TH1F.h"
42 #include "TH2F.h"
43 
44 //
45 // class decleration
46 //
47 
48 class TrackerTopology;
50 public:
51  explicit SiStripCorrelateNoise(const edm::ParameterSet &);
52  ~SiStripCorrelateNoise() override;
53 
54 private:
55  void beginRun(const edm::Run &run, const edm::EventSetup &es) override;
56  void analyze(const edm::Event &, const edm::EventSetup &) override{};
57  void endJob() override;
58 
59  void DoPlots();
60  void DoAnalysis(const edm::EventSetup &, const SiStripNoises &, SiStripNoises &);
61  void getHistos(const uint32_t &detid, const TrackerTopology *tTopo, std::vector<TH1F *> &histos);
62  TH1F *getHisto(const long unsigned int &index);
63 
64  unsigned long long getNoiseCache(const edm::EventSetup &eSetup) {
65  return eSetup.get<SiStripNoisesRcd>().cacheIdentifier();
66  }
67  unsigned long long getGainCache(const edm::EventSetup &eSetup) {
68  return eSetup.get<SiStripApvGainRcd>().cacheIdentifier();
69  }
70  void checkGainCache(const edm::EventSetup &es);
71  float getMeanNoise(const SiStripNoises::Range &noiseRange, const uint32_t &first, const uint32_t &range);
72 
73  float getGainRatio(const uint32_t &detid, const uint16_t &apv);
74 
75  // ----------member data ---------------------------
76 
77  struct Data {
78  uint32_t detid;
79  std::vector<float> values;
80  };
81 
85 
86  uint32_t theRun;
88 
90  bool equalGain;
91 
92  TFile *file;
93  std::vector<TH1F *> vTH1;
94 
96 
97  unsigned long long cacheID_noise;
98  unsigned long long cacheID_gain;
99 };
TH1F * getHisto(const long unsigned int &index)
unsigned long long cacheID_noise
void getHistos(const uint32_t &detid, const TrackerTopology *tTopo, std::vector< TH1F * > &histos)
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
float getMeanNoise(const SiStripNoises::Range &noiseRange, const uint32_t &first, const uint32_t &range)
void DoAnalysis(const edm::EventSetup &, const SiStripNoises &, SiStripNoises &)
edm::ESHandle< SiStripApvGain > gainHandle_
float getGainRatio(const uint32_t &detid, const uint16_t &apv)
unsigned long long getNoiseCache(const edm::EventSetup &eSetup)
edm::ESHandle< SiStripNoises > noiseHandle_
unsigned long long cacheID_gain
std::vector< TH1F * > vTH1
unsigned long long getGainCache(const edm::EventSetup &eSetup)
T get() const
Definition: EventSetup.h:71
SiStripCorrelateNoise(const edm::ParameterSet &)
void checkGainCache(const edm::EventSetup &es)
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:50
void analyze(const edm::Event &, const edm::EventSetup &) override
SiStripDetInfoFileReader * fr
Definition: Run.h:45