CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Validation/MuonIdentification/interface/MuonIdVal.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    Validation/MuonIdentification
00004 // Class:      MuonIdVal
00005 // 
00006 /*
00007 
00008  Description:  Makes and fills lots of histograms using the various reco::Muon
00009                methods.
00010 
00011 
00012 */
00013 //
00014 // Original Author:  Jacob Ribnik
00015 //         Created:  Wed Apr 18 13:48:08 CDT 2007
00016 // $Id: MuonIdVal.h,v 1.8 2010/08/30 16:53:12 aeverett Exp $
00017 //
00018 //
00019 
00020 #ifndef Validation_MuonIdentification_MuonIdVal_h
00021 #define Validation_MuonIdentification_MuonIdVal_h
00022 
00023 // system include files
00024 #include <string>
00025 
00026 // user include files
00027 #include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h"
00028 #include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
00029 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
00030 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
00031 #include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
00032 #include "DataFormats/MuonReco/interface/Muon.h"
00033 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00034 #include "DataFormats/MuonReco/interface/MuonQuality.h"
00035 #include "DataFormats/MuonReco/interface/MuonSelectors.h"
00036 #include "DataFormats/MuonReco/interface/MuonTime.h"
00037 #include "DataFormats/MuonReco/interface/MuonTimeExtra.h"
00038 #include "DataFormats/MuonReco/interface/MuonTimeExtraMap.h"
00039 #include "DataFormats/MuonReco/interface/MuonCosmicCompatibility.h"
00040 
00041 #include "DQMServices/Core/interface/DQMStore.h"
00042 #include "DQMServices/Core/interface/MonitorElement.h"
00043 
00044 #include "FWCore/Framework/interface/EDAnalyzer.h"
00045 #include "FWCore/Framework/interface/ESHandle.h"
00046 #include "FWCore/Framework/interface/Event.h"
00047 #include "FWCore/Framework/interface/Frameworkfwd.h"
00048 #include "FWCore/Framework/interface/MakerMacros.h"
00049 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00050 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00051 #include "FWCore/ServiceRegistry/interface/Service.h"
00052 
00053 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
00054 #include "Geometry/CSCGeometry/interface/CSCGeometry.h"
00055 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
00056 
00057 
00058 class MuonIdVal : public edm::EDAnalyzer {
00059    public:
00060       explicit MuonIdVal(const edm::ParameterSet&);
00061       ~MuonIdVal();
00062 
00063    private:
00064       virtual void beginJob();
00065       virtual void analyze(const edm::Event&, const edm::EventSetup&);
00066       virtual void endJob();
00067       virtual void Fill(MonitorElement*, float);
00068 
00069       DQMStore* dbe_;
00070 
00071       // ----------member data ---------------------------
00072       edm::InputTag inputMuonCollection_;
00073       edm::InputTag inputDTRecSegment4DCollection_;
00074       edm::InputTag inputCSCSegmentCollection_;
00075       edm::InputTag inputMuonTimeExtraValueMap_;
00076       edm::InputTag inputMuonCosmicCompatibilityValueMap_;
00077       bool useTrackerMuons_;
00078       bool useGlobalMuons_;
00079       bool useTrackerMuonsNotGlobalMuons_;
00080       bool useGlobalMuonsNotTrackerMuons_;
00081       bool makeEnergyPlots_;
00082       bool makeTimePlots_;
00083       bool make2DPlots_;
00084       bool makeAllChamberPlots_;
00085       bool makeCosmicCompatibilityPlots_;
00086       std::string baseFolder_;
00087 
00088       edm::Handle<reco::MuonCollection> muonCollectionH_;
00089       edm::Handle<DTRecSegment4DCollection> dtSegmentCollectionH_;
00090       edm::Handle<CSCSegmentCollection> cscSegmentCollectionH_;
00091       edm::Handle<reco::MuonTimeExtraMap> combinedMuonTimeExtraValueMapH_;
00092       edm::Handle<reco::MuonTimeExtraMap> cscMuonTimeExtraValueMapH_;
00093       edm::Handle<reco::MuonTimeExtraMap> dtMuonTimeExtraValueMapH_;
00094       edm::Handle<edm::ValueMap<reco::MuonCosmicCompatibility> > muonCosmicCompatibilityValueMapH_;
00095       edm::ESHandle<GlobalTrackingGeometry> geometry_;
00096 
00097       // trackerMuon == 0; globalMuon == 1
00098       // energy deposits
00099       MonitorElement* hEnergyEMBarrel[4];
00100       MonitorElement* hEnergyHABarrel[4];
00101       MonitorElement* hEnergyHO[4];
00102       MonitorElement* hEnergyEMEndcap[4];
00103       MonitorElement* hEnergyHAEndcap[4];
00104 
00105       // time information
00106       MonitorElement* hMuonTimeNDOF[4];
00107       MonitorElement* hMuonTimeTimeAtIpInOut[4];
00108       MonitorElement* hMuonTimeTimeAtIpInOutErr[4];
00109       MonitorElement* hMuonTimeTimeAtIpOutIn[4];
00110       MonitorElement* hMuonTimeTimeAtIpOutInErr[4];
00111       MonitorElement* hMuonTimeExtraCombinedNDOF[4];
00112       MonitorElement* hMuonTimeExtraCombinedTimeAtIpInOut[4];
00113       MonitorElement* hMuonTimeExtraCombinedTimeAtIpInOutErr[4];
00114       MonitorElement* hMuonTimeExtraCombinedTimeAtIpOutIn[4];
00115       MonitorElement* hMuonTimeExtraCombinedTimeAtIpOutInErr[4];
00116       MonitorElement* hMuonTimeExtraCSCNDOF[4];
00117       MonitorElement* hMuonTimeExtraCSCTimeAtIpInOut[4];
00118       MonitorElement* hMuonTimeExtraCSCTimeAtIpInOutErr[4];
00119       MonitorElement* hMuonTimeExtraCSCTimeAtIpOutIn[4];
00120       MonitorElement* hMuonTimeExtraCSCTimeAtIpOutInErr[4];
00121       MonitorElement* hMuonTimeExtraDTNDOF[4];
00122       MonitorElement* hMuonTimeExtraDTTimeAtIpInOut[4];
00123       MonitorElement* hMuonTimeExtraDTTimeAtIpInOutErr[4];
00124       MonitorElement* hMuonTimeExtraDTTimeAtIpOutIn[4];
00125       MonitorElement* hMuonTimeExtraDTTimeAtIpOutInErr[4];
00126 
00127       // muonid
00128       MonitorElement* hCaloCompat[4];
00129       MonitorElement* hSegmentCompat[4];
00130       MonitorElement* hCaloSegmentCompat[4];
00131       MonitorElement* hMuonQualityTrkRelChi2[4];
00132       MonitorElement* hMuonQualityStaRelChi2[4];
00133       MonitorElement* hMuonQualityTrkKink[4];
00134       MonitorElement* hGlobalMuonPromptTightBool[4];
00135       MonitorElement* hTMLastStationLooseBool[4];
00136       MonitorElement* hTMLastStationTightBool[4];
00137       MonitorElement* hTM2DCompatibilityLooseBool[4];
00138       MonitorElement* hTM2DCompatibilityTightBool[4];
00139       MonitorElement* hTMOneStationLooseBool[4];
00140       MonitorElement* hTMOneStationTightBool[4];
00141       MonitorElement* hTMLastStationOptimizedLowPtLooseBool[4];
00142       MonitorElement* hTMLastStationOptimizedLowPtTightBool[4];
00143       MonitorElement* hGMTkChiCompatibilityBool[4];
00144       MonitorElement* hGMStaChiCompatibilityBool[4];
00145       MonitorElement* hGMTkKinkTightBool[4];
00146       MonitorElement* hTMLastStationAngLooseBool[4];
00147       MonitorElement* hTMLastStationAngTightBool[4];
00148       MonitorElement* hTMOneStationAngLooseBool[4];
00149       MonitorElement* hTMOneStationAngTightBool[4];
00150       MonitorElement* hTMLastStationOptimizedBarrelLowPtLooseBool[4];
00151       MonitorElement* hTMLastStationOptimizedBarrelLowPtTightBool[4];
00152     
00153       //cosmic compatibilities
00154       MonitorElement* hCombinedCosmicCompat[4];
00155       MonitorElement* hTimeCosmicCompat[4];
00156       MonitorElement* hB2BCosmicCompat[4];
00157       MonitorElement* hOverlapCosmicCompat[4];
00158         
00159       // by station
00160       MonitorElement* hDTPullxPropErr[4][4];
00161       MonitorElement* hDTPulldXdZPropErr[4][4];
00162       MonitorElement* hDTPullyPropErr[4][3];
00163       MonitorElement* hDTPulldYdZPropErr[4][3];
00164       MonitorElement* hDTDistWithSegment[4][4];
00165       MonitorElement* hDTDistWithNoSegment[4][4];
00166       MonitorElement* hDTPullDistWithSegment[4][4];
00167       MonitorElement* hDTPullDistWithNoSegment[4][4];
00168       MonitorElement* hCSCPullxPropErr[4][4];
00169       MonitorElement* hCSCPulldXdZPropErr[4][4];
00170       MonitorElement* hCSCPullyPropErr[4][4];
00171       MonitorElement* hCSCPulldYdZPropErr[4][4];
00172       MonitorElement* hCSCDistWithSegment[4][4];
00173       MonitorElement* hCSCDistWithNoSegment[4][4];
00174       MonitorElement* hCSCPullDistWithSegment[4][4];
00175       MonitorElement* hCSCPullDistWithNoSegment[4][4];
00176 
00177       // by chamber, trackerMuons only
00178       // DT:  [station][wheel][sector]
00179       // CSC: [endcap][station][ring][chamber]
00180       MonitorElement* hDTChamberDx[4][5][14];
00181       MonitorElement* hDTChamberDy[3][5][14];
00182       MonitorElement* hDTChamberEdgeXWithSegment[4][5][14];
00183       MonitorElement* hDTChamberEdgeXWithNoSegment[4][5][14];
00184       MonitorElement* hDTChamberEdgeYWithSegment[4][5][14];
00185       MonitorElement* hDTChamberEdgeYWithNoSegment[4][5][14];
00186       MonitorElement* hCSCChamberDx[2][4][4][36];
00187       MonitorElement* hCSCChamberDy[2][4][4][36];
00188       MonitorElement* hCSCChamberEdgeXWithSegment[2][4][4][36];
00189       MonitorElement* hCSCChamberEdgeXWithNoSegment[2][4][4][36];
00190       MonitorElement* hCSCChamberEdgeYWithSegment[2][4][4][36];
00191       MonitorElement* hCSCChamberEdgeYWithNoSegment[2][4][4][36];
00192 
00193       // segment matching "efficiency"
00194       MonitorElement* hSegmentIsAssociatedRZ;
00195       MonitorElement* hSegmentIsAssociatedXY;
00196       MonitorElement* hSegmentIsNotAssociatedRZ;
00197       MonitorElement* hSegmentIsNotAssociatedXY;
00198       MonitorElement* hSegmentIsBestDrAssociatedRZ;
00199       MonitorElement* hSegmentIsBestDrAssociatedXY;
00200       MonitorElement* hSegmentIsBestDrNotAssociatedRZ;
00201       MonitorElement* hSegmentIsBestDrNotAssociatedXY;
00202 };
00203 
00204 #endif