Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-31 23:14:20

0001 #ifndef GlobalHitsProdHistStripper_h
0002 #define GlobalHitsProdHistStripper_h
0003 
0004 /** \class GlobalHitsProdHistStripper
0005  *
0006  *  Class to fill dqm monitor elements from existing EDM file
0007  *
0008  *  \author M. Strang SUNY-Buffalo
0009  */
0010 
0011 // framework & common header files
0012 #include "DataFormats/Common/interface/Handle.h"
0013 #include "DataFormats/Provenance/interface/Provenance.h"
0014 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0015 #include "FWCore/Framework/interface/ESHandle.h"
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/Framework/interface/EventSetup.h"
0018 #include "FWCore/Framework/interface/Frameworkfwd.h"
0019 #include "FWCore/Framework/interface/MakerMacros.h"
0020 #include "FWCore/Framework/interface/Run.h"
0021 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0023 
0024 // DQM services
0025 #include "DQMServices/Core/interface/DQMStore.h"
0026 #include "FWCore/ServiceRegistry/interface/Service.h"
0027 
0028 // helper files
0029 //#include <CLHEP/Vector/LorentzVector.h>
0030 #include "CLHEP/Units/GlobalSystemOfUnits.h"
0031 #include "DataFormats/Math/interface/LorentzVector.h"
0032 
0033 #include <cstdlib>
0034 #include <iostream>
0035 #include <memory>
0036 #include <string>
0037 #include <vector>
0038 
0039 #include "TString.h"
0040 
0041 class GlobalHitsProdHistStripper : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0042 public:
0043   typedef dqm::legacy::DQMStore DQMStore;
0044   typedef dqm::legacy::MonitorElement MonitorElement;
0045 
0046   // typedef std::vector<float> FloatVector;
0047 
0048   explicit GlobalHitsProdHistStripper(const edm::ParameterSet &);
0049   ~GlobalHitsProdHistStripper() override;
0050   void beginJob(void) override;
0051   void endJob() override;
0052   void analyze(const edm::Event &, const edm::EventSetup &) override;
0053   void beginRun(const edm::Run &, const edm::EventSetup &) override;
0054   void endRun(const edm::Run &, const edm::EventSetup &) override;
0055 
0056 private:
0057   //  parameter information
0058   std::string fName;
0059   int verbosity;
0060   int frequency;
0061   int vtxunit;
0062   bool getAllProvenances;
0063   bool printProvenanceInfo;
0064 
0065   DQMStore *dbe;
0066   std::string outputfile;
0067   bool doOutput;
0068 
0069   std::map<std::string, MonitorElement *> monitorElements;
0070 
0071   std::vector<MonitorElement *> me;
0072 
0073   // G4MC info
0074   MonitorElement *meMCRGP[2];
0075   MonitorElement *meMCG4Vtx[2];
0076   MonitorElement *meGeantVtxX[2];
0077   MonitorElement *meGeantVtxY[2];
0078   MonitorElement *meGeantVtxZ[2];
0079   MonitorElement *meMCG4Trk[2];
0080   MonitorElement *meGeantTrkPt;
0081   MonitorElement *meGeantTrkE;
0082 
0083   // Electromagnetic info
0084   // ECal info
0085   MonitorElement *meCaloEcal[2];
0086   MonitorElement *meCaloEcalE[2];
0087   MonitorElement *meCaloEcalToF[2];
0088   MonitorElement *meCaloEcalPhi;
0089   MonitorElement *meCaloEcalEta;
0090 
0091   // Preshower info
0092   MonitorElement *meCaloPreSh[2];
0093   MonitorElement *meCaloPreShE[2];
0094   MonitorElement *meCaloPreShToF[2];
0095   MonitorElement *meCaloPreShPhi;
0096   MonitorElement *meCaloPreShEta;
0097 
0098   // Hadronic info
0099   // HCal info
0100   MonitorElement *meCaloHcal[2];
0101   MonitorElement *meCaloHcalE[2];
0102   MonitorElement *meCaloHcalToF[2];
0103   MonitorElement *meCaloHcalPhi;
0104   MonitorElement *meCaloHcalEta;
0105 
0106   // Tracker info
0107   // Pixel info
0108   // int nPxlBrlHits;
0109   // int nPxlFwdHits;
0110   // int nPxlHits;
0111   MonitorElement *meTrackerPx[2];
0112   MonitorElement *meTrackerPxPhi;
0113   MonitorElement *meTrackerPxEta;
0114   MonitorElement *meTrackerPxBToF;
0115   MonitorElement *meTrackerPxBR;
0116   MonitorElement *meTrackerPxFToF;
0117   MonitorElement *meTrackerPxFZ;
0118 
0119   // Strip info
0120   // int nSiHits;
0121   // int nSiBrlHits;
0122   // int nSiFwdHits;
0123   MonitorElement *meTrackerSi[2];
0124   MonitorElement *meTrackerSiPhi;
0125   MonitorElement *meTrackerSiEta;
0126   MonitorElement *meTrackerSiBToF;
0127   MonitorElement *meTrackerSiBR;
0128   MonitorElement *meTrackerSiFToF;
0129   MonitorElement *meTrackerSiFZ;
0130 
0131   // Muon info
0132   MonitorElement *meMuon[2];
0133   MonitorElement *meMuonPhi;
0134   MonitorElement *meMuonEta;
0135   // int nMuonHits;
0136 
0137   // DT info
0138   // int nMuonDtHits;
0139   MonitorElement *meMuonDtToF[2];
0140   MonitorElement *meMuonDtR;
0141 
0142   // CSC info
0143   // int nMuonCscHits;
0144   MonitorElement *meMuonCscToF[2];
0145   MonitorElement *meMuonCscZ;
0146 
0147   // RPC info
0148   // int nMuonRpcBrlHits;
0149   // int nMuonRpcFwdHits;
0150   MonitorElement *meMuonRpcFToF[2];
0151   MonitorElement *meMuonRpcFZ;
0152   MonitorElement *meMuonRpcBToF[2];
0153   MonitorElement *meMuonRpcBR;
0154 
0155   // private statistics information
0156   unsigned int count;
0157 
0158 };  // end class declaration
0159 
0160 #endif