CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DQMOffline/JetMET/interface/BeamHaloAnalyzer.h

Go to the documentation of this file.
00001 #ifndef DQMOFFLINE_JETMET_BEAMHALO_ANALYZER_H
00002 #define DQMOFFLINE_JETMET_BEAMHALO_ANALYZER_H (1)
00003 
00004 //authors:  Ronny Remington, University of Florida
00005 //date:  08/01/09
00006 
00007 //Included Classes (semi-alphabetical)
00008 #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h"
00009 #include "DataFormats/Candidate/interface/CandidateFwd.h"
00010 #include "DataFormats/Candidate/interface/Candidate.h"
00011 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
00012 #include "DataFormats/Common/interface/Handle.h"
00013 #include "DataFormats/Common/interface/View.h"
00014 #include "DataFormats/Common/interface/TriggerResults.h"
00015 #include "DataFormats/CSCRecHit/interface/CSCRecHit2D.h"
00016 #include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h"
00017 #include "DataFormats/CSCRecHit/interface/CSCRecHit2DCollection.h"
00018 #include "DataFormats/CSCRecHit/interface/CSCSegment.h"
00019 #include "DataFormats/DetId/interface/DetId.h"
00020 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
00021 #include "DataFormats/DTRecHit/interface/DTRecSegment4D.h"
00022 #include "DataFormats/DTRecHit/interface/DTRecHitCollection.h"
00023 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
00024 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00025 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00026 #include "DataFormats/EcalDetId/interface/ESDetId.h"
00027 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00028 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
00029 #include "DataFormats/EgammaCandidates/interface/Conversion.h"
00030 #include "DataFormats/EgammaCandidates/interface/ConversionFwd.h"
00031 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00032 #include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
00033 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00034 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
00035 #include "DataFormats/GeometrySurface/interface/Cylinder.h"
00036 #include "DataFormats/GeometrySurface/interface/Plane.h"
00037 #include "DataFormats/GeometrySurface/interface/Cone.h"
00038 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00039 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00040 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00041 #include "DataFormats/GeometryVector/interface/LocalVector.h"
00042 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
00043 #include "DataFormats/HcalDetId/interface/HcalDetId.h"
00044 #include "DataFormats/HcalRecHit/interface/HBHERecHit.h"
00045 #include "DataFormats/HcalRecHit/interface/HFRecHit.h"
00046 #include "DataFormats/HcalRecHit/interface/HORecHit.h"
00047 #include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h"
00048 #include "DataFormats/L1CSCTrackFinder/interface/L1CSCTrackCollection.h"
00049 #include "DataFormats/L1CSCTrackFinder/interface/L1CSCStatusDigiCollection.h"
00050 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h"
00051 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutRecord.h"
00052 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutCollection.h"
00053 #include "DataFormats/Math/interface/LorentzVector.h"
00054 
00055 #include "DataFormats/METReco/interface/CSCHaloData.h"
00056 #include "DataFormats/METReco/interface/EcalHaloData.h"
00057 #include "DataFormats/METReco/interface/HcalHaloData.h"
00058 #include "DataFormats/METReco/interface/GlobalHaloData.h"
00059 #include "DataFormats/METReco/interface/BeamHaloSummary.h"
00060 #include "DataFormats/METReco/interface/CaloMET.h"
00061 #include "DataFormats/METReco/interface/CaloMETFwd.h"
00062 #include "DataFormats/METReco/interface/GenMET.h"
00063 #include "DataFormats/METReco/interface/MET.h"
00064 #include "DataFormats/METReco/interface/METFwd.h"
00065 #include "DataFormats/MuonDetId/interface/CSCIndexer.h"
00066 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
00067 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
00068 #include "DataFormats/MuonDetId/interface/DTWireId.h"
00069 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00070 #include "DataFormats/MuonReco/interface/Muon.h"
00071 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
00072 #include "DataFormats/RecoCandidate/interface/IsoDepositFwd.h" 
00073 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h" 
00074 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00075 #include "DataFormats/TrackReco/interface/Track.h"
00076 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
00077 #include "DQMServices/Core/interface/DQMStore.h"
00078 #include "DQMServices/Core/interface/MonitorElement.h"
00079 
00080 #include "FWCore/Framework/interface/Frameworkfwd.h"
00081 #include "FWCore/Framework/interface/EDAnalyzer.h"
00082 #include "FWCore/Framework/interface/Event.h"
00083 #include "FWCore/Framework/interface/MakerMacros.h"
00084 #include "FWCore/Framework/interface/EventSetup.h"
00085 #include "FWCore/Framework/interface/ESHandle.h"
00086 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00087 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00088 #include "FWCore/PluginManager/interface/ModuleDef.h"
00089 
00090 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00091 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00092 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
00093 #include "Geometry/CommonDetUnit/interface/TrackingGeometry.h"
00094 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
00095 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
00096 #include "Geometry/CommonTopologies/interface/PixelTopology.h"
00097 #include "Geometry/CommonTopologies/interface/StripTopology.h"
00098 #include "Geometry/CSCGeometry/interface/CSCGeometry.h"
00099 #include "Geometry/CSCGeometry/interface/CSCChamber.h"
00100 #include "Geometry/CSCGeometry/interface/CSCLayer.h"
00101 #include "Geometry/CSCGeometry/interface/CSCLayerGeometry.h"
00102 #include "Geometry/DTGeometry/interface/DTGeometry.h"
00103 #include "Geometry/DTGeometry/interface/DTLayer.h"
00104 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
00105 #include "Geometry/RPCGeometry/interface/RPCRoll.h"
00106 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
00107 #include "Geometry/Records/interface/CaloGeometryRecord.h"
00108 #include "Geometry/Records/interface/MuonGeometryRecord.h"
00109 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
00110 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00111 
00112 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00113 #include "MagneticField/Engine/interface/MagneticField.h"
00114 
00115 //Root Classes
00116 
00117 #include "TH1F.h"
00118 #include "TH2F.h"
00119 #include "TH1I.h"
00120 #include "TFile.h"
00121 #include "TDirectory.h"
00122 #include "TTree.h"
00123 #include "TStyle.h"
00124 #include "TCanvas.h"
00125 #include "TString.h"
00126 #include "TMath.h"
00127 #include "TLorentzVector.h"
00128 #include "TLegend.h"
00129 
00130 
00131 //Standard C++ classes
00132 #include <iostream>
00133 #include <ostream>
00134 #include <string>
00135 #include <map>
00136 #include <vector>
00137 #include <utility>
00138 #include <ostream>
00139 #include <fstream>
00140 #include <algorithm>
00141 #include <cmath>
00142 #include <memory>
00143 #include <iomanip>
00144 
00145 class BeamHaloAnalyzer: public edm::EDAnalyzer {
00146  public:
00147   explicit BeamHaloAnalyzer(const edm::ParameterSet&);
00148   ~BeamHaloAnalyzer();
00149  
00150  private:
00151 
00152   virtual void beginJob();
00153   virtual void beginRun(const edm::Run&, const edm::EventSetup& iSetup);
00154   virtual void analyze(const edm::Event& , const edm::EventSetup&);
00155   virtual void endJob();
00156   virtual void endRun(const edm::Run&, const edm::EventSetup&){ if (OutputFileName!="") dqm->save(OutputFileName);}
00157 
00158   edm::InputTag IT_L1MuGMTReadout;
00159 
00160   //RecHit Level
00161   edm::InputTag IT_CSCRecHit;
00162   edm::InputTag IT_EBRecHit;
00163   edm::InputTag IT_EERecHit;
00164   edm::InputTag IT_ESRecHit;
00165   edm::InputTag IT_HBHERecHit;
00166   edm::InputTag IT_HORecHit;
00167   edm::InputTag IT_HFRecHit;
00168 
00169   //Higher Level Reco
00170   edm::InputTag IT_CosmicMuon;
00171   edm::InputTag IT_CSCSegment;
00172   edm::InputTag IT_CollisionMuon;
00173   edm::InputTag IT_CollisionStandAloneMuon;
00174   edm::InputTag IT_BeamHaloMuon;
00175   edm::InputTag IT_CosmicStandAloneMuon;
00176   edm::InputTag IT_met;
00177   edm::InputTag IT_CaloTower;
00178   edm::InputTag IT_SuperCluster;
00179   edm::InputTag IT_Photon;
00180 
00181   // Halo Data
00182   edm::InputTag IT_CSCHaloData;
00183   edm::InputTag IT_EcalHaloData;
00184   edm::InputTag IT_HcalHaloData;
00185   edm::InputTag IT_GlobalHaloData;
00186   edm::InputTag IT_BeamHaloSummary;
00187 
00188   //Output File
00189   std::string OutputFileName;
00190   std::string TextFileName;
00191   std::string FolderName;
00192 
00193   ofstream* out;
00194   double DumpMET;
00195 
00196   bool StandardDQM;
00197 
00198   // DAQ Tools
00199   DQMStore* dqm;
00200 
00201   MonitorElement* hEcalHaloData_PhiWedgeMultiplicity;
00202   MonitorElement* hEcalHaloData_PhiWedgeConstituents;
00203   MonitorElement* hEcalHaloData_PhiWedgeZDirectionConfidence;
00204   MonitorElement* hEcalHaloData_SuperClusterShowerShapes;
00205   MonitorElement* hEcalHaloData_SuperClusterEnergy;
00206   MonitorElement* hEcalHaloData_SuperClusterNHits;
00207   
00208   MonitorElement* hEcalHaloData_PhiWedgeEnergy;
00209   MonitorElement* hEcalHaloData_PhiWedgeMinTime;
00210   MonitorElement* hEcalHaloData_PhiWedgeMaxTime;
00211   MonitorElement* hEcalHaloData_PhiWedgeiPhi;
00212   MonitorElement* hEcalHaloData_PhiWedgePlusZDirectionConfidence;
00213   MonitorElement* hEcalHaloData_PhiWedgeMinVsMaxTime;
00214   MonitorElement* hEcalHaloData_SuperClusterPhiVsEta;
00215   
00216   MonitorElement* hHcalHaloData_PhiWedgeMultiplicity;
00217   MonitorElement* hHcalHaloData_PhiWedgeConstituents;
00218   MonitorElement* hHcalHaloData_PhiWedgeZDirectionConfidence;
00219   
00220   MonitorElement* hHcalHaloData_PhiWedgeEnergy;
00221   MonitorElement* hHcalHaloData_PhiWedgeiPhi;
00222   MonitorElement* hHcalHaloData_PhiWedgeMinTime;
00223   MonitorElement* hHcalHaloData_PhiWedgeMaxTime;
00224   MonitorElement* hHcalHaloData_PhiWedgePlusZDirectionConfidence;
00225   MonitorElement* hHcalHaloData_PhiWedgeMinVsMaxTime;
00226 
00227   MonitorElement* hCSCHaloData_TrackMultiplicity;
00228   MonitorElement* hCSCHaloData_TrackMultiplicityMEPlus;
00229   MonitorElement* hCSCHaloData_TrackMultiplicityMEMinus;
00230   MonitorElement* hCSCHaloData_InnerMostTrackHitR;
00231   MonitorElement* hCSCHaloData_InnerMostTrackHitPhi;
00232   MonitorElement* hCSCHaloData_L1HaloTriggersMEPlus;
00233   MonitorElement* hCSCHaloData_L1HaloTriggersMEMinus;
00234   MonitorElement* hCSCHaloData_L1HaloTriggers;
00235   MonitorElement* hCSCHaloData_HLHaloTriggers;
00236   MonitorElement* hCSCHaloData_NOutOfTimeTriggersvsL1HaloExists;
00237   MonitorElement* hCSCHaloData_NOutOfTimeTriggersMEPlus;
00238   MonitorElement* hCSCHaloData_NOutOfTimeTriggersMEMinus;
00239   MonitorElement* hCSCHaloData_NOutOfTimeTriggers;
00240   MonitorElement* hCSCHaloData_NOutOfTimeHits;
00241 
00242   MonitorElement* hCSCHaloData_InnerMostTrackHitXY;
00243   MonitorElement* hCSCHaloData_InnerMostTrackHitRPlusZ;
00244   MonitorElement* hCSCHaloData_InnerMostTrackHitRMinusZ;
00245   MonitorElement* hCSCHaloData_InnerMostTrackHitiPhi;
00246 
00247   MonitorElement* hGlobalHaloData_MExCorrection;
00248   MonitorElement* hGlobalHaloData_MEyCorrection;
00249   MonitorElement* hGlobalHaloData_SumEtCorrection;
00250   MonitorElement* hGlobalHaloData_HaloCorrectedMET;
00251   MonitorElement* hGlobalHaloData_RawMETMinusHaloCorrectedMET;
00252   MonitorElement* hGlobalHaloData_RawMETOverSumEt;
00253   MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeMultiplicity;
00254   MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeEnergy;
00255   MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeConstituents;
00256   MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeiPhi;
00257   MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeMinTime;
00258   MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeMaxTime;
00259   MonitorElement* hGlobalHaloData_MatchedHcalPhiWedgeZDirectionConfidence;
00260   MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeMultiplicity;
00261   MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeEnergy;
00262   MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeConstituents;
00263   MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeiPhi;
00264   MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeMinTime;
00265   MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeMaxTime;
00266   MonitorElement* hGlobalHaloData_MatchedEcalPhiWedgeZDirectionConfidence;
00267 
00268   MonitorElement* hBeamHaloSummary_Id;
00269 
00270   MonitorElement* hBeamHaloSummary_BXN;
00271   MonitorElement* hExtra_InnerMostTrackHitR;
00272   MonitorElement* hExtra_CSCActivityWithMET;
00273   MonitorElement* hExtra_HcalToF;
00274   MonitorElement* hExtra_HcalToF_HaloId;
00275   MonitorElement* hExtra_EcalToF;
00276   MonitorElement* hExtra_EcalToF_HaloId;
00277   MonitorElement* hExtra_CSCTrackInnerOuterDPhi;
00278   MonitorElement* hExtra_CSCTrackInnerOuterDEta;
00279   MonitorElement* hExtra_CSCTrackChi2Ndof;
00280   MonitorElement* hExtra_CSCTrackNHits;
00281   MonitorElement* hExtra_InnerMostTrackHitXY;
00282   MonitorElement* hExtra_InnerMostTrackHitRPlusZ;
00283   MonitorElement* hExtra_InnerMostTrackHitRMinusZ;
00284   MonitorElement* hExtra_InnerMostTrackHitiPhi;
00285   MonitorElement* hExtra_InnerMostTrackHitPhi;
00286   MonitorElement* hExtra_BXN;
00287 };
00288 
00289 #endif