CMS 3D CMS Logo

EcalPedOffset.h
Go to the documentation of this file.
1 #ifndef CalibCalorimetry_EcalPedestalOffsets_EcalPedOffset_H
2 #define CalibCalorimetry_EcalPedestalOffsets_EcalPedOffset_H
3 
12 #include <map>
13 #include <string>
14 
19 
24 
27 
28 class EcalPedOffset : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
29 public:
32 
34  ~EcalPedOffset() override;
35 
37  void analyze(edm::Event const &event, edm::EventSetup const &eventSetup) override;
38 
40  void beginRun(edm::Run const &, edm::EventSetup const &eventSetup) override;
41 
43  void endRun(edm::Run const &, edm::EventSetup const &) override;
44 
46  void endJob(void) override;
47 
50 
52  void writeDb();
53 
55  void makePlots();
56 
57 private:
59 
61  void readDACs(const edm::Handle<EBDigiCollection> &pDigis, const std::map<int, int> &DACvalues);
62  void readDACs(const edm::Handle<EEDigiCollection> &pDigis, const std::map<int, int> &DACvalues);
63 
67 
72 
74 
75  std::map<int, TPedValues *> m_pedValues;
76  std::map<int, TPedResult *> m_pedResult;
77 
78  int m_DACmin;
79  int m_DACmax;
80  double m_RMSmax;
81  int m_bestPed;
82 
96  // used to retrieve the run_iov
99  int m_run;
100 
109 };
110 
111 #endif
double m_maxChi2OverNDFAllowed_
max chi2/ndf allowed for linearity test
std::string m_dbHostName
database host name
Definition: EcalPedOffset.h:84
const edm::InputTag m_barrelDigiCollection
secondary name given to collection of digis
Definition: EcalPedOffset.h:64
std::string m_dbName
database name
Definition: EcalPedOffset.h:86
std::string intToString(int num)
const edm::EDGetTokenT< EcalRawDataCollection > m_rawDataToken
Definition: EcalPedOffset.h:68
const edm::InputTag m_endcapDigiCollection
secondary name given to collection of digis
Definition: EcalPedOffset.h:65
~EcalPedOffset() override
Destructor.
void endRun(edm::Run const &, edm::EventSetup const &) override
EndRun.
std::string m_xmlFile
name of the xml file to be saved
Definition: EcalPedOffset.h:73
double m_minSlopeAllowed_
min slope (in magnitude) allowed for linearity test
std::string m_dbPassword
database user password
Definition: EcalPedOffset.h:90
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > m_mappingToken
Definition: EcalPedOffset.h:71
std::string m_plotting
the root file where to store the detail plots
Transient container Store all the pedestal values depending on the gain and pedestal offset $Date: $R...
void endJob(void) override
EndJob.
int m_dbHostPort
database
Definition: EcalPedOffset.h:92
std::string m_dbUserName
database user name
Definition: EcalPedOffset.h:88
void writeDb()
WriteDB.
void readDACs(const edm::Handle< EBDigiCollection > &pDigis, const std::map< int, int > &DACvalues)
void makePlots()
create the plots of the DAC pedestal trend
const edm::InputTag m_headerCollection
name of module/plugin/producer making headers
Definition: EcalPedOffset.h:66
bool m_create_moniov
Definition: EcalPedOffset.h:95
void beginRun(edm::Run const &, edm::EventSetup const &eventSetup) override
BeginRun.
std::map< int, TPedResult * > m_pedResult
Definition: EcalPedOffset.h:76
void writeXMLFiles(std::string fileName)
write the results into xml format
calculate the best DAC value to obtain a pedestal = 200
Definition: EcalPedOffset.h:28
const edm::EDGetTokenT< EEDigiCollection > m_eeDigiToken
Definition: EcalPedOffset.h:70
EcalPedOffset(const edm::ParameterSet &ps)
Constructor.
int m_run
run number
Definition: EcalPedOffset.h:99
std::map< int, TPedValues * > m_pedValues
Definition: EcalPedOffset.h:75
const EcalElectronicsMapping * ecalElectronicsMap_
Definition: EcalPedOffset.h:58
Transient container right DAC values for each crystal and each gain $Date: $Revision: ...
std::string m_location
Definition: EcalPedOffset.h:97
double m_maxSlopeAllowed_
max slope (in magnitude) allowed for linearity test
Definition: event.py:1
Definition: Run.h:45
void analyze(edm::Event const &event, edm::EventSetup const &eventSetup) override
! Analyze
const edm::EDGetTokenT< EBDigiCollection > m_ebDigiToken
Definition: EcalPedOffset.h:69