Go to the documentation of this file.00001 #ifndef SiStripMonitorMuonHLT_SiStripMonitorMuonHLT_h
00002 #define SiStripMonitorMuonHLT_SiStripMonitorMuonHLT_h
00003
00004
00005
00006 #include <memory>
00007 #include <string>
00008 #include <cmath>
00009
00010
00011 #include "FWCore/Framework/interface/Frameworkfwd.h"
00012 #include "FWCore/Framework/interface/EDAnalyzer.h"
00013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00014 #include "FWCore/Framework/interface/Event.h"
00015 #include "FWCore/Framework/interface/EventSetup.h"
00016 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00017 #include "FWCore/ServiceRegistry/interface/Service.h"
00018 #include "FWCore/Framework/interface/ESHandle.h"
00019 #include "FWCore/Utilities/interface/InputTag.h"
00020 #include "FWCore/Framework/interface/MakerMacros.h"
00021 #include "DQMServices/Core/interface/DQMStore.h"
00022
00023 #include "DataFormats/Common/interface/Handle.h"
00024 #include "DataFormats/Common/interface/LazyGetter.h"
00025 #include "DataFormats/SiStripCluster/interface/SiStripCluster.h"
00026 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
00027 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
00028 #include "DataFormats/TrackReco/interface/Track.h"
00029 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00030
00031 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit1D.h"
00032 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h"
00033 #include "DataFormats/TrackerRecHit2D/interface/ProjectedSiStripRecHit2D.h"
00034
00035 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
00036 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
00037 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00038 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
00039 #include "Geometry/CommonTopologies/interface/StripTopology.h"
00040
00041 #include "TrackingTools/DetLayers/interface/DetLayer.h"
00042
00043 #include "RecoTracker/TransientTrackingRecHit/interface/TSiStripRecHit2DLocalPos.h"
00044
00045 #include "DQM/SiStripCommon/interface/TkHistoMap.h"
00046 #include "DQM/SiStripCommon/interface/SiStripFolderOrganizer.h"
00047
00048 #include "CalibTracker/SiStripCommon/interface/TkDetMap.h"
00049
00050
00051
00052 #include <DataFormats/SiStripDetId/interface/SiStripDetId.h>
00053 #include <DataFormats/SiStripDetId/interface/TECDetId.h>
00054 #include <DataFormats/SiStripDetId/interface/TIDDetId.h>
00055 #include <DataFormats/SiStripDetId/interface/TOBDetId.h>
00056 #include <DataFormats/SiStripDetId/interface/TIBDetId.h>
00057
00058 #include <DataFormats/GeometrySurface/interface/BoundPlane.h>
00059 #include <DataFormats/GeometrySurface/interface/BoundSurface.h>
00060 #include <DataFormats/GeometrySurface/interface/Bounds.h>
00061 #include <DataFormats/GeometrySurface/interface/RectangularPlaneBounds.h>
00062 #include <DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h>
00063
00064 #include <DataFormats/GeometryVector/interface/Point2DBase.h>
00065
00066 #include "TGraph.h"
00067 #include "TFile.h"
00068 #include "TH1F.h"
00069 #include "TMath.h"
00070 #include "Math/GenVector/CylindricalEta3D.h"
00072
00073
00074
00075
00076
00077 class SiStripMonitorMuonHLT : public edm::EDAnalyzer {
00078
00079
00080
00081 struct LayerMEs{
00082 MonitorElement* EtaPhiAllClustersMap;
00083 MonitorElement* EtaDistribAllClustersMap;
00084 MonitorElement* PhiDistribAllClustersMap;
00085 MonitorElement* EtaPhiOnTrackClustersMap;
00086 MonitorElement* EtaDistribOnTrackClustersMap;
00087 MonitorElement* PhiDistribOnTrackClustersMap;
00088 MonitorElement* EtaPhiL3MuTrackClustersMap;
00089 MonitorElement* EtaDistribL3MuTrackClustersMap;
00090 MonitorElement* PhiDistribL3MuTrackClustersMap;
00091 };
00092
00093
00094 public:
00095 explicit SiStripMonitorMuonHLT(const edm::ParameterSet& ps);
00096 ~SiStripMonitorMuonHLT();
00097
00098 private:
00099 virtual void beginRun(const edm::Run& run, const edm::EventSetup& es);
00100 virtual void analyze(const edm::Event&, const edm::EventSetup&);
00101 void analyzeOnTrackClusters( const reco::Track* l3tk, const TrackerGeometry & theTracker, bool isL3MuTrack = true );
00102 virtual void endJob() ;
00103 void createMEs(const edm::EventSetup& es);
00104
00105 float GetEtaWeight(std::string label, GlobalPoint gp);
00106 float GetPhiWeight(std::string label, GlobalPoint gp);
00107 void GeometryFromTrackGeom (std::vector<DetId> Dets,const TrackerGeometry & theTracker,
00108 std::map<std::string,std::vector<float> > & m_PhiStripMod_Eta,std::map<std::string,std::vector<float> > & m_PhiStripMod_Nb);
00109 void Normalizer (std::vector<DetId> Dets,const TrackerGeometry & theTracker);
00110 void PrintNormalization (std::vector<std::string> v_LabelHisto);
00111
00112
00113
00114 edm::ParameterSet parameters_;
00115
00116 DQMStore* dbe_;
00117 std::string monitorName_;
00118 std::string outputFile_;
00119 int counterEvt_;
00120 int nTrig_;
00121 int prescaleEvt_;
00122 bool verbose_;
00123 bool normalize_;
00124 bool printNormalize_;
00125
00126
00127 bool runOnClusters_;
00128 bool runOnMuonCandidates_;
00129 bool runOnTracks_;
00130
00131
00132 edm::InputTag clusterCollectionTag_;
00133 edm::InputTag l3collectionTag_;
00134 edm::InputTag TrackCollectionTag_;
00135
00136 int HistoNumber;
00137 TkDetMap* tkdetmap_;
00138 std::map<std::string, LayerMEs> LayerMEMap;
00139
00140 TkHistoMap* tkmapAllClusters;
00141 TkHistoMap* tkmapOnTrackClusters;
00142 TkHistoMap* tkmapL3MuTrackClusters;
00143
00144
00145
00146 std::map<std::string,std::vector<float> > m_BinPhi ;
00147 std::map<std::string,std::vector<float> > m_BinEta ;
00148 std::map<std::string,std::vector<float> > m_ModNormPhi;
00149 std::map<std::string,std::vector<float> > m_ModNormEta;
00150
00151
00152
00153 };
00154 #endif