Go to the documentation of this file.00001 #ifndef DTDigiTask_H
00002 #define DTDigiTask_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "FWCore/Framework/interface/Frameworkfwd.h"
00014 #include <FWCore/Framework/interface/EDAnalyzer.h>
00015 #include <DataFormats/Common/interface/Handle.h>
00016 #include <FWCore/Framework/interface/ESHandle.h>
00017 #include <FWCore/Framework/interface/Event.h>
00018 #include <FWCore/Framework/interface/MakerMacros.h>
00019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00020
00021 #include "CondFormats/DTObjects/interface/DTReadOutMapping.h"
00022
00023 #include "DataFormats/LTCDigi/interface/LTCDigi.h"
00024
00025 #include <FWCore/Framework/interface/LuminosityBlock.h>
00026 #include "FWCore/Utilities/interface/InputTag.h"
00027
00028 #include <memory>
00029 #include <iostream>
00030 #include <fstream>
00031 #include <string>
00032 #include <vector>
00033 #include <map>
00034
00035 class DTGeometry;
00036 class DTSuperLayerId;
00037 class DTLayerId;
00038 class DTChamberId;
00039 class DTTtrig;
00040 class DTT0;
00041
00042 class DQMStore;
00043 class MonitorElement;
00044
00045 class DTDigiTask: public edm::EDAnalyzer{
00046
00047 public:
00048
00050 DTDigiTask(const edm::ParameterSet& ps);
00051
00053 virtual ~DTDigiTask();
00054
00055 protected:
00056
00058 void beginJob();
00059
00060 void beginRun(const edm::Run&, const edm::EventSetup&);
00061
00063 void bookHistos(const DTSuperLayerId& dtSL, std::string folder, std::string histoTag);
00064 void bookHistos(const DTChamberId& dtCh, std::string folder, std::string histoTag);
00065 void bookHistos(const int wheelId, std::string folder, std::string histoTag);
00066
00068 void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00069 void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& setup);
00070
00072 void channelsMap(const DTChamberId& dtCh, std::string histoTag);
00073
00075 void analyze(const edm::Event& e, const edm::EventSetup& c);
00076
00078 void endJob();
00079
00081 std::string triggerSource();
00082
00083 private:
00084
00085 std::string topFolder() const;
00086
00087 int nevents;
00088
00090 int tMax;
00091 int maxTDCHits;
00092
00094 float tTrig;
00095 float tTrigRMS;
00096 float kFactor;
00097
00098
00099
00100
00101 std::map<DTChamberId,int> hitMap;
00102 std::set<DTChamberId> syncNoisyChambers;
00103 int syncNumTot;
00104 int syncNum;
00105
00106 edm::Handle<LTCDigiCollection> ltcdigis;
00107
00108 DQMStore* dbe;
00109
00110 edm::ESHandle<DTGeometry> muonGeom;
00111 edm::ESHandle<DTReadOutMapping> mapping;
00112
00113 edm::ESHandle<DTTtrig> tTrigMap;
00114 edm::ESHandle<DTT0> t0Map;
00115
00116 std::map<std::string, std::map<uint32_t, MonitorElement*> > digiHistos;
00117 std::map<std::string, std::map<int, MonitorElement*> > wheelHistos;
00118
00119
00120
00121
00122 edm::InputTag dtDigiLabel;
00123
00124 edm::InputTag ltcDigiCollectionTag;
00125
00126
00127 bool readTTrigDB;
00128
00129 bool subtractT0;
00130
00131 int defaultTmax;
00132
00133
00134 bool doStaticBooking;
00135
00136 bool isLocalRun;
00137
00138 int resetCycle;
00139
00140 bool checkNoisyChannels;
00141
00142 int defaultTTrig;
00143
00144 int inTimeHitsLowerBound;
00145 int inTimeHitsUpperBound;
00146 int timeBoxGranularity;
00147 int maxTDCCounts;
00148 bool doAllHitsOccupancies;
00149 bool doNoiseOccupancies;
00150 bool doInTimeOccupancies;
00151
00152 bool tpMode;
00153 bool lookForSyncNoise;
00154 bool filterSyncNoise;
00155
00156 bool doLayerTimeBoxes;
00157
00158 std::map<DTChamberId, int> nSynchNoiseEvents;
00159 MonitorElement* nEventMonitor;
00160
00161
00162 };
00163
00164 #endif