CMS 3D CMS Logo

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