CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/Validation/GlobalHits/interface/GlobalHitsHistogrammer.h

Go to the documentation of this file.
00001 #ifndef GlobalHitsHistogrammer_h
00002 #define GlobalHitsHistogrammer_h
00003 
00013 // framework & common header files
00014 #include "FWCore/Framework/interface/EDAnalyzer.h"
00015 #include "FWCore/Framework/interface/Frameworkfwd.h"
00016 #include "FWCore/Framework/interface/Event.h"
00017 #include "FWCore/Framework/interface/EventSetup.h"
00018 #include "DataFormats/Common/interface/Handle.h"
00019 #include "FWCore/Framework/interface/ESHandle.h"
00020 #include "DataFormats/Provenance/interface/Provenance.h"
00021 #include "FWCore/Framework/interface/MakerMacros.h"
00022 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00023 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00024 //#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00025 //#include "DataFormats/DetId/interface/DetId.h"
00026 
00027 //DQM services
00028 #include "DQMServices/Core/interface/DQMStore.h"
00029 #include "FWCore/ServiceRegistry/interface/Service.h"
00030 
00031 // tracker info
00032 //#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00033 //#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00034 //#include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
00035 //#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
00036 
00037 // muon info
00038 //#include "Geometry/Records/interface/MuonGeometryRecord.h"
00039 //#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
00040 //#include "Geometry/DTGeometry/interface/DTGeometry.h"
00041 //#include "Geometry/RPCGeometry/interface/RPCGeometry.h"
00042 //#include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
00043 //#include "DataFormats/MuonDetId/interface/RPCDetId.h"
00044 //#include "DataFormats/MuonDetId/interface/DTWireId.h"
00045 
00046 // calorimeter info
00047 //#include "Geometry/Records/interface/IdealGeometryRecord.h"
00048 //#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00049 //#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00050 //#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
00051 //#include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
00052 //#include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
00053 
00054 // data in edm::event
00055 //#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
00056 //#include "SimDataFormats/Vertex/interface/SimVertexContainer.h"
00057 //#include "SimDataFormats/Track/interface/SimTrackContainer.h"
00058 //#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
00059 //#include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
00060 #include "SimDataFormats/ValidationFormats/interface/PValidationFormats.h"
00061 
00062 // helper files
00063 //#include <CLHEP/Vector/LorentzVector.h>
00064 #include "DataFormats/Math/interface/LorentzVector.h"
00065 #include "CLHEP/Units/GlobalSystemOfUnits.h"
00066 
00067 #include <iostream>
00068 #include <stdlib.h>
00069 #include <string>
00070 #include <memory>
00071 #include <vector>
00072 
00073 #include "TString.h"
00074 #include "DQMServices/Core/interface/MonitorElement.h"
00075 
00076 class GlobalHitsHistogrammer : public edm::EDAnalyzer
00077 {
00078   
00079  public:
00080 
00081   //typedef std::vector<float> FloatVector;
00082 
00083   explicit GlobalHitsHistogrammer(const edm::ParameterSet&);
00084   virtual ~GlobalHitsHistogrammer();
00085   virtual void beginJob( void );
00086   virtual void endJob();  
00087   virtual void analyze(const edm::Event&, const edm::EventSetup&);
00088   
00089  private:
00090 
00091   //  parameter information
00092   std::string fName;
00093   int verbosity;
00094   int frequency;
00095   int vtxunit;
00096   std::string label;
00097   bool getAllProvenances;
00098   bool printProvenanceInfo;
00099 
00100   DQMStore *dbe;
00101   std::string outputfile;
00102   bool doOutput;
00103 
00104   edm::InputTag GlobalHitSrc_;
00105 
00106   // G4MC info
00107   MonitorElement *meMCRGP[2];
00108   MonitorElement *meMCG4Vtx[2];
00109   MonitorElement *meGeantVtxX[2];
00110   MonitorElement *meGeantVtxY[2];  
00111   MonitorElement *meGeantVtxZ[2];  
00112   MonitorElement *meMCG4Trk[2];
00113   MonitorElement *meGeantTrkPt;
00114   MonitorElement *meGeantTrkE; 
00115 
00116   // Electromagnetic info
00117   // ECal info
00118   MonitorElement *meCaloEcal[2];
00119   MonitorElement *meCaloEcalE[2];
00120   MonitorElement *meCaloEcalToF[2];
00121   MonitorElement *meCaloEcalPhi;
00122   MonitorElement *meCaloEcalEta;  
00123 
00124   // Preshower info
00125   MonitorElement *meCaloPreSh[2];
00126   MonitorElement *meCaloPreShE[2];
00127   MonitorElement *meCaloPreShToF[2];
00128   MonitorElement *meCaloPreShPhi;
00129   MonitorElement *meCaloPreShEta;
00130 
00131   // Hadronic info
00132   // HCal info
00133   MonitorElement *meCaloHcal[2];
00134   MonitorElement *meCaloHcalE[2];
00135   MonitorElement *meCaloHcalToF[2];
00136   MonitorElement *meCaloHcalPhi;
00137   MonitorElement *meCaloHcalEta;  
00138 
00139   // Tracker info
00140   // Pixel info
00141   int nPxlBrlHits;
00142   int nPxlFwdHits;
00143   int nPxlHits;
00144   MonitorElement *meTrackerPx[2];
00145   MonitorElement *meTrackerPxPhi;
00146   MonitorElement *meTrackerPxEta;
00147   MonitorElement *meTrackerPxBToF;
00148   MonitorElement *meTrackerPxBR;
00149   MonitorElement *meTrackerPxFToF;
00150   MonitorElement *meTrackerPxFZ;
00151 
00152   // Strip info
00153   int nSiHits;
00154   int nSiBrlHits;
00155   int nSiFwdHits;
00156   MonitorElement *meTrackerSi[2];
00157   MonitorElement *meTrackerSiPhi;
00158   MonitorElement *meTrackerSiEta;
00159   MonitorElement *meTrackerSiBToF;
00160   MonitorElement *meTrackerSiBR;
00161   MonitorElement *meTrackerSiFToF;
00162   MonitorElement *meTrackerSiFZ;
00163 
00164   // Muon info
00165   MonitorElement *meMuon[2];
00166   MonitorElement *meMuonPhi;
00167   MonitorElement *meMuonEta;
00168   int nMuonHits;
00169 
00170   // DT info
00171   int nMuonDtHits;
00172   MonitorElement *meMuonDtToF[2];
00173   MonitorElement *meMuonDtR;
00174 
00175   // CSC info
00176   int nMuonCscHits;
00177   MonitorElement *meMuonCscToF[2];
00178   MonitorElement *meMuonCscZ;
00179 
00180   // RPC info
00181   int nMuonRpcBrlHits;
00182   int nMuonRpcFwdHits;
00183   MonitorElement *meMuonRpcFToF[2];
00184   MonitorElement *meMuonRpcFZ;
00185   MonitorElement *meMuonRpcBToF[2];
00186   MonitorElement *meMuonRpcBR;
00187 
00188   // private statistics information
00189   unsigned int count;
00190 
00191 }; // end class declaration
00192   
00193 #endif
00194 
00195