CMS 3D CMS Logo

DTDigiTask.h

Go to the documentation of this file.
00001 #ifndef DTDigiTask_H
00002 #define DTDigiTask_H
00003 
00004 /*
00005  * \file DTDigiTask.h
00006  *
00007  * $Date: 2008/11/24 09:12:11 $
00008  * $Revision: 1.26 $
00009  * \author M. Zanetti - INFN Padova
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 "DataFormats/LTCDigi/interface/LTCDigi.h"
00022 
00023 #include <FWCore/Framework/interface/LuminosityBlock.h>
00024 #include "FWCore/ParameterSet/interface/InputTag.h"
00025 
00026 #include <memory>
00027 #include <iostream>
00028 #include <fstream>
00029 #include <string>
00030 #include <vector>
00031 #include <map>
00032 
00033 class DTGeometry;
00034 class DTSuperLayerId;
00035 class DTLayerId;
00036 class DTChamberId;
00037 class DTTtrig;
00038 class DTT0;
00039 
00040 class DQMStore;
00041 class MonitorElement;
00042 
00043 class DTDigiTask: public edm::EDAnalyzer{
00044 
00045 public:
00046 
00048   DTDigiTask(const edm::ParameterSet& ps);
00049   
00051   virtual ~DTDigiTask();
00052 
00053 protected:
00054 
00056   void beginJob(const edm::EventSetup& c);
00057 
00058   void beginRun(const edm::Run&, const edm::EventSetup&);
00059 
00061   void bookHistos(const DTSuperLayerId& dtSL, std::string folder, std::string histoTag);
00062   void bookHistos(const DTChamberId& dtCh, std::string folder, std::string histoTag);
00063   void bookHistos(const int wheelId, std::string folder, std::string histoTag);
00064 
00066   void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;
00067 
00069   void analyze(const edm::Event& e, const edm::EventSetup& c);
00070 
00072   void endJob();
00073 
00075   std::string triggerSource();
00076 
00077 private:
00078   
00079   std::string topFolder() const;
00080 
00081   int nevents;
00082 
00084   int tMax;
00085   int maxTDCHits;
00086 
00088   float tTrig;
00089   float tTrigRMS;
00090 
00091   //check for sync noise
00092   //  bool newChamber;
00093   //  DTChamberId chDone;
00094   std::map<DTChamberId,int> hitMap;
00095   std::set<DTChamberId> syncNoisyChambers;
00096   int syncNumTot;
00097   int syncNum;
00098 
00099   edm::Handle<LTCDigiCollection> ltcdigis;
00100 
00101   DQMStore* dbe;
00102 
00103   edm::ESHandle<DTGeometry> muonGeom;
00104 
00105   edm::ESHandle<DTTtrig> tTrigMap;
00106   edm::ESHandle<DTT0> t0Map;
00107 
00108   std::map<std::string, std::map<uint32_t, MonitorElement*> > digiHistos;
00109   std::map<std::string, std::map<int, MonitorElement*> > wheelHistos;
00110 
00111   // Parameters from config file
00112 
00113   // The label to retrieve the digis 
00114   edm::InputTag dtDigiLabel;
00115   // Set to true to read the ttrig from DB (useful to determine in-time and out-of-time hits)
00116   bool readTTrigDB;
00117   // Set to true to subtract t0 from test pulses
00118   bool subtractT0;
00119   // Tmax value (TDC counts)
00120   int defaultTmax;
00121   // Switch from static (all histo at the beginninig of the job) to
00122   // dynamic (book when needed) histo booking
00123   bool doStaticBooking;
00124   // Switch for local/global runs
00125   bool isLocalRun;
00126   // Setting for the reset of the ME after n (= ResetCycle) luminosity sections
00127   int resetCycle;
00128   // Check the DB of noisy channels
00129   bool checkNoisyChannels;
00130   // Default TTrig to be used when not reading the TTrig DB
00131   int defaultTTrig;
00132 
00133   int inTimeHitsLowerBound;
00134   int inTimeHitsUpperBound;
00135   int timeBoxGranularity;
00136   int tdcRescale;
00137   bool doAllHitsOccupancies;
00138   bool doNoiseOccupancies;
00139   bool doInTimeOccupancies;
00140 
00141   bool tpMode;
00142   bool filterSyncNoise;
00143   
00144   std::map<DTChamberId, int> nSynchNoiseEvents;
00145   MonitorElement* nEventMonitor;
00146 
00147 
00148 };
00149 
00150 #endif

Generated on Tue Jun 9 17:32:35 2009 for CMSSW by  doxygen 1.5.4