CMS 3D CMS Logo

SiStripGainCosmicCalculator.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiStripChannelGain_SiStripGainCosmicCalculator_h
2 #define CalibTracker_SiStripChannelGain_SiStripGainCosmicCalculator_h
3 // -*- C++ -*-
4 // Package: SiStripApvGainCalculator
5 // Class: SiStripApvGainCalculator
10 // Original Author: Dorian Kcira, Pierre Rodeghiero
11 // Created: Mon Nov 20 10:04:31 CET 2006
14 #include <vector>
15 #include "TF1.h"
16 #include "TH1F.h"
17 #include "TObjArray.h"
18 #include "TFile.h"
19 #include "TString.h"
20 #include <fstream>
21 #include <sstream>
22 #include <memory>
23 
27 
31 
32 class SiStripGainCosmicCalculator : public ConditionDBWriter<SiStripApvGain> {
33 public:
36 
37 private:
38  void algoAnalyze(const edm::Event&, const edm::EventSetup&) override;
39  void algoBeginJob(const edm::EventSetup&) override;
40  void algoEndJob() override;
41  std::unique_ptr<SiStripApvGain> getNewObject() override;
42 
43 private:
44  std::pair<double, double> getPeakOfLandau(TH1F* inputHisto);
45  double moduleWidth(const uint32_t detid);
46  double moduleThickness(const uint32_t detid);
47 
48 private:
51  //
52  TObjArray* HlistAPVPairs;
53  TObjArray* HlistOtherHistos;
56  std::map<uint32_t, double> thickness_map; // map of detector id to respective thickness
57  std::vector<uint32_t> SelectedDetIds;
58  std::vector<uint32_t> detModulesToBeExcluded;
59  unsigned int MinNrEntries;
62  TString outputFileName;
64 
68  const TrackerTopology* tTopo_ = nullptr;
70  const TrackerGeometry* tkGeom_ = nullptr;
71 };
72 #endif
std::vector< uint32_t > SelectedDetIds
const SiStripDetCabling * siStripDetCabling_
double moduleThickness(const uint32_t detid)
void algoBeginJob(const edm::EventSetup &) override
std::pair< double, double > getPeakOfLandau(TH1F *inputHisto)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
SiStripGainCosmicCalculator(const edm::ParameterSet &)
std::map< uint32_t, double > thickness_map
std::unique_ptr< SiStripApvGain > getNewObject() override
std::vector< uint32_t > detModulesToBeExcluded
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
double moduleWidth(const uint32_t detid)
void algoAnalyze(const edm::Event &, const edm::EventSetup &) override