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 <math.h>
12 #include <time.h>
13 #include "TTree.h"
14 #include "TFile.h"
15 
18 
19 
30 
33 
38 
47 
51 
55 
58 
59 
60 #include "TProfile2D.h"
61 
62 namespace edm {
63  class ParameterSet;
64  class Event;
65  class EventSetup;
66 }
67 
68 namespace popcon {
69 
70 
71  class EcalChannelStatusHandler : public popcon::PopConSourceHandler<EcalChannelStatus>
72  {
73 
74  public:
77 
78  void getNewObjects();
80 
81  std::string id() const { return m_name;}
83 
84 
85  // checks on pedestals
86  float checkPedestalValueGain12( EcalPedestals::Item* item);
87  float checkPedestalValueGain6( EcalPedestals::Item* item);
88  float checkPedestalValueGain1( EcalPedestals::Item* item);
89  float checkPedestalRMSGain12( EcalPedestals::Item* item );
90  float checkPedestalRMSGain6( EcalPedestals::Item* item );
91  float checkPedestalRMSGain1( EcalPedestals::Item* item );
92 
93  // check which laser sectors are on
94  void nBadLaserModules( std::map<EcalLogicID, MonLaserBlueDat> dataset_mon );
95 
96  // to mask channels reading from pedestal
97  void pedOnlineMasking();
98  void pedMasking();
99  void laserMasking();
100  void physicsMasking();
101 
102  // to read the daq configuration
103  void daqOut(const RunIOV& myRun);
104 
105  // real analysis
106  void pedAnalysis( std::map<EcalLogicID, MonPedestalsDat> dataset_mon, std::map<EcalLogicID, MonCrystalConsistencyDat> wrongGain_mon );
107  void laserAnalysis( std::map<EcalLogicID, MonLaserBlueDat> dataset_mon );
108  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 );
109 
110  private:
111 
112  unsigned int m_firstRun ;
113  unsigned int m_lastRun ;
114 
123 
124  bool isGoodLaserEBSm[36][2];
125  bool isGoodLaserEESm[18][2];
126  bool isEBRef1[36][2];
127  bool isEBRef2[36][2];
128  bool isEERef1[18][2];
129  bool isEERef2[18][2];
130 
132 
133  std::ofstream *ResFileEB;
134  std::ofstream *ResFileEE;
135  std::ofstream *ResFileNewEB;
136  std::ofstream *ResFileNewEE;
137  std::ofstream *daqFile;
138  std::ofstream *daqFile2;
139 
140  std::map<DetId, float> maskedOnlinePedEB, maskedOnlinePedEE;
141  std::map<DetId, float> maskedPedEB, maskedPedEE;
142  std::map<DetId, float> maskedLaserEB, maskedLaserEE;
143  std::map<DetId, float> maskedPhysicsEB, maskedPhysicsEE;
144 
145  TProfile2D *newBadEB_;
146  TProfile2D *newBadEEP_;
147  TProfile2D *newBadEEM_;
148  };
149 }
150 #endif
151 
EcalCondHandler< EcalChannelStatus, EcalChannelStatusXMLTranslator > EcalChannelStatusHandler
std::map< DetId, float > maskedOnlinePedEE
HLT enums.
void setElectronicsMap(EcalElectronicsMapping const *)
Definition: RunIOV.h:13