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 MonitorElement* GlobalCStripVsCpix;
00089 MonitorElement* PixVsStripMultiplicityRegions;
00090 MonitorElement* GlobalMainDiagonalPosition;
00091 MonitorElement* StripNoise2Cycle;
00092 MonitorElement* StripNoise3Cycle;
00093
00094 private:
00095
00096 void createMEs(const edm::EventSetup& es);
00097 void createLayerMEs(std::string label, int ndets);
00098 void createModuleMEs(ModMEs& mod_single, uint32_t detid);
00099 void createSubDetMEs(std::string label);
00100 int FindRegion(int nstrip,int npixel);
00101 void fillModuleMEs(ModMEs& mod_mes, ClusterProperties& cluster);
00102 void fillLayerMEs(LayerMEs&, ClusterProperties& cluster, float timeinorbit);
00103
00104 void ResetModuleMEs(uint32_t idet);
00105
00106 inline void fillME(MonitorElement* ME,float value1){if (ME!=0)ME->Fill(value1);}
00107 inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);}
00108 inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);}
00109 inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);}
00110 MonitorElement * bookMETrend(const char*, const char*);
00111 MonitorElement* bookME1D(const char* ParameterSetLabel, const char* HistoName);
00112
00113 private:
00114 DQMStore* dqmStore_;
00115 edm::ParameterSet conf_;
00116 std::map<uint32_t, ModMEs> ModuleMEsMap;
00117 std::map<std::string, LayerMEs> LayerMEsMap;
00118 std::map<std::string, std::vector< uint32_t > > LayerDetMap;
00119 std::map<std::string, SubDetMEs> SubDetMEsMap;
00120 std::map<std::string, std::string> SubDetPhasePartMap;
00121
00122
00123 bool show_mechanical_structure_view, show_readout_view, show_control_view, select_all_detectors, reset_each_run;
00124 unsigned long long m_cacheID_;
00125
00126 edm::ESHandle<SiStripDetCabling> SiStripDetCabling_;
00127 std::vector<uint32_t> ModulesToBeExcluded_;
00128
00129 edm::ParameterSet Parameters;
00130
00131
00132 TkHistoMap* tkmapcluster;
00133
00134 int runNb, eventNb;
00135 int firstEvent;
00136
00137 bool layerswitchncluson;
00138 bool layerswitchcluschargeon;
00139 bool layerswitchclusstonon;
00140 bool layerswitchclusstonVsposon;
00141 bool layerswitchclusposon;
00142 bool layerswitchclusdigiposon;
00143 bool layerswitchclusnoiseon;
00144 bool layerswitchcluswidthon;
00145 bool layerswitchlocaloccupancy;
00146 bool layerswitchnrclusterizedstrip;
00147 bool layerswitchnumclusterprofon;
00148 bool layerswitchclusterwidthprofon;
00149
00150 bool globalswitchstripnoise2apvcycle;
00151 bool globalswitchstripnoise3apvcycle;
00152 bool globalswitchmaindiagonalposition;
00153
00154 bool moduleswitchncluson;
00155 bool moduleswitchcluschargeon;
00156 bool moduleswitchclusstonon;
00157 bool moduleswitchclusstonVsposon;
00158 bool moduleswitchclusposon;
00159 bool moduleswitchclusdigiposon;
00160 bool moduleswitchclusnoiseon;
00161 bool moduleswitchcluswidthon;
00162 bool moduleswitchlocaloccupancy;
00163 bool moduleswitchnrclusterizedstrip;
00164 bool subdetswitchtotclusprofon;
00165 bool subdetswitchapvcycleprofon;
00166 bool subdetswitchapvcycleth2on;
00167 bool subdetswitchapvcycledbxprof2on;
00168 bool subdetswitchdbxcycleprofon;
00169 bool subdetswitchtotclusth1on;
00170 bool globalswitchapvcycledbxth2on;
00171 bool globalswitchcstripvscpix;
00172 bool globalswitchMultiRegions;
00173 bool clustertkhistomapon;
00174 bool createTrendMEs;
00175
00176 bool Mod_On_;
00177
00178 std::string topFolderName_;
00179 std::string qualityLabel_;
00180
00181 edm::InputTag clusterProducerStrip_;
00182 edm::InputTag clusterProducerPix_;
00183 edm::InputTag historyProducer_;
00184 edm::InputTag apvPhaseProducer_;
00185
00186 bool applyClusterQuality_;
00187 double sToNLowerLimit_;
00188 double sToNUpperLimit_;
00189 double widthLowerLimit_;
00190 double widthUpperLimit_;
00191
00192 double k0;
00193 double q0;
00194 double dk0;
00195 double maxClus;
00196 double minPix;
00197
00198 SiStripDCSStatus* dcsStatus_;
00199 };
00200 #endif