CMS 3D CMS Logo

EcalChannelStatusHandler.h
Go to the documentation of this file.
1 #ifndef ECAL_CHANNELSTATUS_HANDLER_H
2 #define ECAL_CHANNELSTATUS_HANDLER_H
3 
4 #include <typeinfo>
5 #include <vector>
6 #include <string>
7 #include <map>
8 #include <sstream>
9 #include <iostream>
10 #include <fstream>
11 #include <cmath>
12 #include <ctime>
13 #include "TTree.h"
14 #include "TFile.h"
15 
18 
29 
32 
37 
46 
50 
54 
57 
58 #include "TProfile2D.h"
59 
60 namespace edm {
61  class ParameterSet;
62  class Event;
63  class EventSetup;
64 } // namespace edm
65 
66 namespace popcon {
67 
68  class EcalChannelStatusHandler : public popcon::PopConSourceHandler<EcalChannelStatus> {
69  public:
71  ~EcalChannelStatusHandler() override;
72 
73  void getNewObjects() override;
75 
76  std::string id() const override { return m_name; }
78 
79  // checks on pedestals
86 
87  // check which laser sectors are on
88  void nBadLaserModules(std::map<EcalLogicID, MonLaserBlueDat> dataset_mon);
89 
90  // to mask channels reading from pedestal
91  void pedOnlineMasking();
92  void pedMasking();
93  void laserMasking();
94  void physicsMasking();
95 
96  // to read the daq configuration
97  void daqOut(const RunIOV &myRun);
98 
99  // real analysis
100  void pedAnalysis(std::map<EcalLogicID, MonPedestalsDat> dataset_mon,
101  std::map<EcalLogicID, MonCrystalConsistencyDat> wrongGain_mon);
102  void laserAnalysis(std::map<EcalLogicID, MonLaserBlueDat> dataset_mon);
103  void cosmicsAnalysis(std::map<EcalLogicID, MonPedestalsOnlineDat> pedestalO_mon,
104  std::map<EcalLogicID, MonCrystalConsistencyDat> wrongGain_mon,
105  std::map<EcalLogicID, MonLaserBlueDat> laser_mon,
106  std::map<EcalLogicID, MonOccupancyDat> occupancy_mon);
107 
108  private:
109  unsigned int m_firstRun;
110  unsigned int m_lastRun;
111 
120 
121  bool isGoodLaserEBSm[36][2];
122  bool isGoodLaserEESm[18][2];
123  bool isEBRef1[36][2];
124  bool isEBRef2[36][2];
125  bool isEERef1[18][2];
126  bool isEERef2[18][2];
127 
130 
131  std::ofstream *ResFileEB;
132  std::ofstream *ResFileEE;
133  std::ofstream *ResFileNewEB;
134  std::ofstream *ResFileNewEE;
135  std::ofstream *daqFile;
136  std::ofstream *daqFile2;
137 
138  std::map<DetId, float> maskedOnlinePedEB, maskedOnlinePedEE;
139  std::map<DetId, float> maskedPedEB, maskedPedEE;
140  std::map<DetId, float> maskedLaserEB, maskedLaserEE;
141  std::map<DetId, float> maskedPhysicsEB, maskedPhysicsEE;
142 
143  TProfile2D *newBadEB_;
144  TProfile2D *newBadEEP_;
145  TProfile2D *newBadEEM_;
146  };
147 } // namespace popcon
148 #endif
float checkPedestalValueGain12(EcalPedestals::Item *item)
std::map< DetId, float > maskedOnlinePedEE
void cosmicsAnalysis(std::map< EcalLogicID, MonPedestalsOnlineDat > pedestalO_mon, std::map< EcalLogicID, MonCrystalConsistencyDat > wrongGain_mon, std::map< EcalLogicID, MonLaserBlueDat > laser_mon, std::map< EcalLogicID, MonOccupancyDat > occupancy_mon)
float checkPedestalValueGain6(EcalPedestals::Item *item)
EcalChannelStatusHandler(edm::ParameterSet const &)
float checkPedestalRMSGain12(EcalPedestals::Item *item)
void nBadLaserModules(std::map< EcalLogicID, MonLaserBlueDat > dataset_mon)
float checkPedestalRMSGain6(EcalPedestals::Item *item)
float checkPedestalValueGain1(EcalPedestals::Item *item)
std::map< DetId, float > maskedOnlinePedEB
HLT enums.
void laserAnalysis(std::map< EcalLogicID, MonLaserBlueDat > dataset_mon)
float checkPedestalRMSGain1(EcalPedestals::Item *item)
Definition: RunIOV.h:13
void setElectronicsMap(const EcalElectronicsMapping *)
void pedAnalysis(std::map< EcalLogicID, MonPedestalsDat > dataset_mon, std::map< EcalLogicID, MonCrystalConsistencyDat > wrongGain_mon)