Go to the documentation of this file.00001 #ifndef SiStripMonitorCluster_SiStripMonitorCluster_h
00002 #define SiStripMonitorCluster_SiStripMonitorCluster_h
00003
00004
00005
00009
00010
00011
00012 #include <memory>
00013 #include "FWCore/Framework/interface/Frameworkfwd.h"
00014 #include "FWCore/Framework/interface/EDAnalyzer.h"
00015 #include "FWCore/Framework/interface/Event.h"
00016 #include "FWCore/Framework/interface/MakerMacros.h"
00017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00018 #include "FWCore/Framework/interface/ESHandle.h"
00019 #include "DataFormats/Common/interface/DetSetVector.h"
00020 #include "DQMServices/Core/interface/MonitorElement.h"
00021 #include "DQM/SiStripCommon/interface/TkHistoMap.h"
00022
00023 #include <vector>
00024
00025 class DQMStore;
00026 class SiStripDetCabling;
00027 class SiStripCluster;
00028 class SiStripDCSStatus;
00029
00030 class SiStripMonitorCluster : public edm::EDAnalyzer {
00031 public:
00032 explicit SiStripMonitorCluster(const edm::ParameterSet&);
00033 ~SiStripMonitorCluster();
00034 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00035
00036 virtual void endJob() ;
00037 virtual void beginRun(const edm::Run&, const edm::EventSetup&);
00038
00039 struct ModMEs{
00040
00041 MonitorElement* NumberOfClusters;
00042 MonitorElement* ClusterPosition;
00043 MonitorElement* ClusterDigiPosition;
00044 MonitorElement* ClusterWidth;
00045 MonitorElement* ClusterCharge;
00046 MonitorElement* ClusterNoise;
00047 MonitorElement* ClusterSignalOverNoise;
00048 MonitorElement* ClusterSignalOverNoiseVsPos;
00049 MonitorElement* ModuleLocalOccupancy;
00050 MonitorElement* NrOfClusterizedStrips;
00051 };
00052
00053 struct LayerMEs{
00054 MonitorElement* LayerClusterStoN;
00055 MonitorElement* LayerClusterStoNTrend;
00056 MonitorElement* LayerClusterCharge;
00057 MonitorElement* LayerClusterChargeTrend;
00058 MonitorElement* LayerClusterNoise;
00059 MonitorElement* LayerClusterNoiseTrend;
00060 MonitorElement* LayerClusterWidth;
00061 MonitorElement* LayerClusterWidthTrend;
00062 MonitorElement* LayerLocalOccupancy;
00063 MonitorElement* LayerLocalOccupancyTrend;
00064 MonitorElement* LayerNumberOfClusterProfile;
00065 MonitorElement* LayerClusterWidthProfile;
00066
00067 };
00068
00069 struct SubDetMEs{
00070 int totNClusters;
00071 MonitorElement* SubDetTotClusterTH1;
00072 MonitorElement* SubDetTotClusterProf;
00073 MonitorElement* SubDetClusterApvProf;
00074 MonitorElement* SubDetClusterApvTH2;
00075 MonitorElement* SubDetClusterDBxCycleProf;
00076 MonitorElement* SubDetApvDBxProf2;
00077 };
00078
00079 struct ClusterProperties {
00080 float charge;
00081 float position;
00082 short start;
00083 short width;
00084 float noise;
00085 };
00086
00087 MonitorElement* GlobalApvCycleDBxTH2;
00088 private:
00089
00090 void createMEs(const edm::EventSetup& es);
00091 void createLayerMEs(std::string label, int ndets);
00092 void createModuleMEs(ModMEs& mod_single, uint32_t detid);
00093 void createSubDetMEs(std::string label);
00094
00095 void fillModuleMEs(ModMEs& mod_mes, ClusterProperties& cluster);
00096 void fillLayerMEs(LayerMEs&, ClusterProperties& cluster, float timeinorbit);
00097
00098 void ResetModuleMEs(uint32_t idet);
00099
00100 inline void fillME(MonitorElement* ME,float value1){if (ME!=0)ME->Fill(value1);}
00101 inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);}
00102 inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);}
00103 inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);}
00104 MonitorElement * bookMETrend(const char*, const char*);
00105 MonitorElement* bookME1D(const char* ParameterSetLabel, const char* HistoName);
00106
00107 private:
00108 DQMStore* dqmStore_;
00109 edm::ParameterSet conf_;
00110 std::map<uint32_t, ModMEs> ModuleMEsMap;
00111 std::map<std::string, LayerMEs> LayerMEsMap;
00112 std::map<std::string, std::vector< uint32_t > > LayerDetMap;
00113 std::map<std::string, SubDetMEs> SubDetMEsMap;
00114 std::map<std::string, std::string> SubDetPhasePartMap;
00115
00116
00117 bool show_mechanical_structure_view, show_readout_view, show_control_view, select_all_detectors, reset_each_run;
00118 unsigned long long m_cacheID_;
00119
00120 edm::ESHandle<SiStripDetCabling> SiStripDetCabling_;
00121 std::vector<uint32_t> ModulesToBeExcluded_;
00122
00123 edm::ParameterSet Parameters;
00124
00125
00126 TkHistoMap* tkmapcluster;
00127
00128 int runNb, eventNb;
00129 int firstEvent;
00130
00131 bool layerswitchncluson;
00132 bool layerswitchcluschargeon;
00133 bool layerswitchclusstonon;
00134 bool layerswitchclusstonVsposon;
00135 bool layerswitchclusposon;
00136 bool layerswitchclusdigiposon;
00137 bool layerswitchclusnoiseon;
00138 bool layerswitchcluswidthon;
00139 bool layerswitchlocaloccupancy;
00140 bool layerswitchnrclusterizedstrip;
00141 bool layerswitchnumclusterprofon;
00142 bool layerswitchclusterwidthprofon;
00143
00144 bool moduleswitchncluson;
00145 bool moduleswitchcluschargeon;
00146 bool moduleswitchclusstonon;
00147 bool moduleswitchclusstonVsposon;
00148 bool moduleswitchclusposon;
00149 bool moduleswitchclusdigiposon;
00150 bool moduleswitchclusnoiseon;
00151 bool moduleswitchcluswidthon;
00152 bool moduleswitchlocaloccupancy;
00153 bool moduleswitchnrclusterizedstrip;
00154 bool subdetswitchtotclusprofon;
00155 bool subdetswitchapvcycleprofon;
00156 bool subdetswitchapvcycleth2on;
00157 bool subdetswitchapvcycledbxprof2on;
00158 bool subdetswitchdbxcycleprofon;
00159 bool subdetswitchtotclusth1on;
00160 bool globalswitchapvcycledbxth2on;
00161
00162 bool clustertkhistomapon;
00163 bool createTrendMEs;
00164
00165 bool Mod_On_;
00166
00167 std::string topFolderName_;
00168 std::string qualityLabel_;
00169
00170 edm::InputTag clusterProducer_;
00171 edm::InputTag historyProducer_;
00172 edm::InputTag apvPhaseProducer_;
00173
00174 bool applyClusterQuality_;
00175 double sToNLowerLimit_;
00176 double sToNUpperLimit_;
00177 double widthLowerLimit_;
00178 double widthUpperLimit_;
00179
00180 SiStripDCSStatus* dcsStatus_;
00181 };
00182 #endif