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
SiStripGainCosmicCalculator::tTopo_
const TrackerTopology * tTopo_
Definition: SiStripGainCosmicCalculator.h:68
TrackerGeometry.h
SiStripGainCosmicCalculator::tkGeomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
Definition: SiStripGainCosmicCalculator.h:67
SiStripGainCosmicCalculator::algoEndJob
void algoEndJob() override
Definition: SiStripGainCosmicCalculator.cc:68
SiStripGainCosmicCalculator::getNewObject
std::unique_ptr< SiStripApvGain > getNewObject() override
Definition: SiStripGainCosmicCalculator.cc:287
SiStripGainCosmicCalculator::detCablingToken_
edm::ESGetToken< SiStripDetCabling, SiStripDetCablingRcd > detCablingToken_
Definition: SiStripGainCosmicCalculator.h:66
SiStripGainCosmicCalculator::tkGeom_
const TrackerGeometry * tkGeom_
Definition: SiStripGainCosmicCalculator.h:70
TrackerTopology
Definition: TrackerTopology.h:16
SiStripGainCosmicCalculator
Definition: SiStripGainCosmicCalculator.h:32
SiStripGainCosmicCalculator::algoBeginJob
void algoBeginJob(const edm::EventSetup &) override
Definition: SiStripGainCosmicCalculator.cc:70
SiStripGainCosmicCalculator::thickness_map
std::map< uint32_t, double > thickness_map
Definition: SiStripGainCosmicCalculator.h:56
SiStripGainCosmicCalculator::HlistAPVPairs
TObjArray * HlistAPVPairs
Definition: SiStripGainCosmicCalculator.h:52
SiStripGainCosmicCalculator::ExpectedChargeDeposition
double ExpectedChargeDeposition
Definition: SiStripGainCosmicCalculator.h:55
SiStripGainCosmicCalculator::printdebug_
bool printdebug_
Definition: SiStripGainCosmicCalculator.h:63
SiStripGainCosmicCalculator::total_nr_of_events
uint32_t total_nr_of_events
Definition: SiStripGainCosmicCalculator.h:54
SiStripGainCosmicCalculator::moduleThickness
double moduleThickness(const uint32_t detid)
Definition: SiStripGainCosmicCalculator.cc:274
SiStripGainCosmicCalculator::tTopoToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: SiStripGainCosmicCalculator.h:65
TrackerTopology.h
SiStripGainCosmicCalculator::getPeakOfLandau
std::pair< double, double > getPeakOfLandau(TH1F *inputHisto)
Definition: SiStripGainCosmicCalculator.cc:213
SiStripDetCabling.h
TrackerTopologyRcd.h
ConditionDBWriter
Definition: ConditionDBWriter.h:149
SiStripGainCosmicCalculator::SiStripGainCosmicCalculator
SiStripGainCosmicCalculator(const edm::ParameterSet &)
Definition: SiStripGainCosmicCalculator.cc:30
SiStripDetCabling
Definition: SiStripDetCabling.h:21
SiStripApvGain.h
SiStripGainCosmicCalculator::MinNrEntries
unsigned int MinNrEntries
Definition: SiStripGainCosmicCalculator.h:59
TrackerDigiGeometryRecord.h
SiStripGainCosmicCalculator::TrackLabel
std::string TrackLabel
Definition: SiStripGainCosmicCalculator.h:50
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripGainCosmicCalculator::~SiStripGainCosmicCalculator
~SiStripGainCosmicCalculator() override
Definition: SiStripGainCosmicCalculator.cc:64
edm::EventSetup
Definition: EventSetup.h:58
SiStripGainCosmicCalculator::SelectedDetIds
std::vector< uint32_t > SelectedDetIds
Definition: SiStripGainCosmicCalculator.h:57
SiStripGainCosmicCalculator::detModulesToBeExcluded
std::vector< uint32_t > detModulesToBeExcluded
Definition: SiStripGainCosmicCalculator.h:58
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ConditionDBWriter.h
SiStripGainCosmicCalculator::outputHistogramsInRootFile
bool outputHistogramsInRootFile
Definition: SiStripGainCosmicCalculator.h:61
SiStripGainCosmicCalculator::MaxChi2OverNDF
double MaxChi2OverNDF
Definition: SiStripGainCosmicCalculator.h:60
SiStripGainCosmicCalculator::TrackProducer
std::string TrackProducer
Definition: SiStripGainCosmicCalculator.h:49
SiStripGainCosmicCalculator::algoAnalyze
void algoAnalyze(const edm::Event &, const edm::EventSetup &) override
Definition: SiStripGainCosmicCalculator.cc:145
SiStripGainCosmicCalculator::siStripDetCabling_
const SiStripDetCabling * siStripDetCabling_
Definition: SiStripGainCosmicCalculator.h:69
SiStripGainCosmicCalculator::outputFileName
TString outputFileName
Definition: SiStripGainCosmicCalculator.h:62
SiStripDetCablingRcd.h
edm::Event
Definition: Event.h:73
SiStripGainCosmicCalculator::moduleWidth
double moduleWidth(const uint32_t detid)
Definition: SiStripGainCosmicCalculator.cc:261
SiStripGainCosmicCalculator::HlistOtherHistos
TObjArray * HlistOtherHistos
Definition: SiStripGainCosmicCalculator.h:53
TrackerGeometry
Definition: TrackerGeometry.h:14