CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/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.9 2011/04/12 15:37:54 asvyatko 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 #include "DataFormats/MuonReco/interface/MuonShower.h"
00041 
00042 #include "DQMServices/Core/interface/DQMStore.h"
00043 #include "DQMServices/Core/interface/MonitorElement.h"
00044 
00045 #include "FWCore/Framework/interface/EDAnalyzer.h"
00046 #include "FWCore/Framework/interface/ESHandle.h"
00047 #include "FWCore/Framework/interface/Event.h"
00048 #include "FWCore/Framework/interface/Frameworkfwd.h"
00049 #include "FWCore/Framework/interface/MakerMacros.h"
00050 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00051 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00052 #include "FWCore/ServiceRegistry/interface/Service.h"
00053 
00054 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
00055 #include "Geometry/CSCGeometry/interface/CSCGeometry.h"
00056 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
00057 
00058 
00059 class MuonIdVal : public edm::EDAnalyzer {
00060    public:
00061       explicit MuonIdVal(const edm::ParameterSet&);
00062       ~MuonIdVal();
00063 
00064    private:
00065       virtual void beginJob();
00066       virtual void analyze(const edm::Event&, const edm::EventSetup&);
00067       virtual void endJob();
00068       virtual void Fill(MonitorElement*, float);
00069 
00070       DQMStore* dbe_;
00071 
00072       // ----------member data ---------------------------
00073       edm::InputTag inputMuonCollection_;
00074       edm::InputTag inputDTRecSegment4DCollection_;
00075       edm::InputTag inputCSCSegmentCollection_;
00076       edm::InputTag inputMuonTimeExtraValueMap_;
00077       edm::InputTag inputMuonCosmicCompatibilityValueMap_;
00078       edm::InputTag inputMuonShowerInformationValueMap_;
00079       bool useTrackerMuons_;
00080       bool useGlobalMuons_;
00081       bool useTrackerMuonsNotGlobalMuons_;
00082       bool useGlobalMuonsNotTrackerMuons_;
00083       bool makeEnergyPlots_;
00084       bool makeTimePlots_;
00085       bool make2DPlots_;
00086       bool makeAllChamberPlots_;
00087       bool makeCosmicCompatibilityPlots_;
00088       bool makeShowerInformationPlots_;
00089       std::string baseFolder_;
00090 
00091       edm::Handle<reco::MuonCollection> muonCollectionH_;
00092       edm::Handle<DTRecSegment4DCollection> dtSegmentCollectionH_;
00093       edm::Handle<CSCSegmentCollection> cscSegmentCollectionH_;
00094       edm::Handle<reco::MuonTimeExtraMap> combinedMuonTimeExtraValueMapH_;
00095       edm::Handle<reco::MuonTimeExtraMap> cscMuonTimeExtraValueMapH_;
00096       edm::Handle<reco::MuonTimeExtraMap> dtMuonTimeExtraValueMapH_;
00097       edm::Handle<edm::ValueMap<reco::MuonCosmicCompatibility> > muonCosmicCompatibilityValueMapH_;
00098       edm::Handle<edm::ValueMap<reco::MuonShower> > muonShowerInformationValueMapH_;
00099       edm::ESHandle<GlobalTrackingGeometry> geometry_;
00100 
00101       // trackerMuon == 0; globalMuon == 1
00102       // energy deposits
00103       MonitorElement* hEnergyEMBarrel[4];
00104       MonitorElement* hEnergyHABarrel[4];
00105       MonitorElement* hEnergyHO[4];
00106       MonitorElement* hEnergyEMEndcap[4];
00107       MonitorElement* hEnergyHAEndcap[4];
00108 
00109       // time information
00110       MonitorElement* hMuonTimeNDOF[4];
00111       MonitorElement* hMuonTimeTimeAtIpInOut[4];
00112       MonitorElement* hMuonTimeTimeAtIpInOutErr[4];
00113       MonitorElement* hMuonTimeTimeAtIpOutIn[4];
00114       MonitorElement* hMuonTimeTimeAtIpOutInErr[4];
00115       MonitorElement* hMuonTimeExtraCombinedNDOF[4];
00116       MonitorElement* hMuonTimeExtraCombinedTimeAtIpInOut[4];
00117       MonitorElement* hMuonTimeExtraCombinedTimeAtIpInOutErr[4];
00118       MonitorElement* hMuonTimeExtraCombinedTimeAtIpOutIn[4];
00119       MonitorElement* hMuonTimeExtraCombinedTimeAtIpOutInErr[4];
00120       MonitorElement* hMuonTimeExtraCSCNDOF[4];
00121       MonitorElement* hMuonTimeExtraCSCTimeAtIpInOut[4];
00122       MonitorElement* hMuonTimeExtraCSCTimeAtIpInOutErr[4];
00123       MonitorElement* hMuonTimeExtraCSCTimeAtIpOutIn[4];
00124       MonitorElement* hMuonTimeExtraCSCTimeAtIpOutInErr[4];
00125       MonitorElement* hMuonTimeExtraDTNDOF[4];
00126       MonitorElement* hMuonTimeExtraDTTimeAtIpInOut[4];
00127       MonitorElement* hMuonTimeExtraDTTimeAtIpInOutErr[4];
00128       MonitorElement* hMuonTimeExtraDTTimeAtIpOutIn[4];
00129       MonitorElement* hMuonTimeExtraDTTimeAtIpOutInErr[4];
00130 
00131       // muonid
00132       MonitorElement* hCaloCompat[4];
00133       MonitorElement* hSegmentCompat[4];
00134       MonitorElement* hCaloSegmentCompat[4];
00135       MonitorElement* hMuonQualityTrkRelChi2[4];
00136       MonitorElement* hMuonQualityStaRelChi2[4];
00137       MonitorElement* hMuonQualityTrkKink[4];
00138       MonitorElement* hGlobalMuonPromptTightBool[4];
00139       MonitorElement* hTMLastStationLooseBool[4];
00140       MonitorElement* hTMLastStationTightBool[4];
00141       MonitorElement* hTM2DCompatibilityLooseBool[4];
00142       MonitorElement* hTM2DCompatibilityTightBool[4];
00143       MonitorElement* hTMOneStationLooseBool[4];
00144       MonitorElement* hTMOneStationTightBool[4];
00145       MonitorElement* hTMLastStationOptimizedLowPtLooseBool[4];
00146       MonitorElement* hTMLastStationOptimizedLowPtTightBool[4];
00147       MonitorElement* hGMTkChiCompatibilityBool[4];
00148       MonitorElement* hGMStaChiCompatibilityBool[4];
00149       MonitorElement* hGMTkKinkTightBool[4];
00150       MonitorElement* hTMLastStationAngLooseBool[4];
00151       MonitorElement* hTMLastStationAngTightBool[4];
00152       MonitorElement* hTMOneStationAngLooseBool[4];
00153       MonitorElement* hTMOneStationAngTightBool[4];
00154       MonitorElement* hTMLastStationOptimizedBarrelLowPtLooseBool[4];
00155       MonitorElement* hTMLastStationOptimizedBarrelLowPtTightBool[4];
00156     
00157       //cosmic compatibilities
00158       MonitorElement* hCombinedCosmicCompat[4];
00159       MonitorElement* hTimeCosmicCompat[4];
00160       MonitorElement* hB2BCosmicCompat[4];
00161       MonitorElement* hOverlapCosmicCompat[4];
00162         
00163       // by station
00164 
00165       //shower information
00166       MonitorElement* hMuonShowerSizeT[4][4];
00167       MonitorElement* hMuonShowerDeltaR[4][4];
00168       MonitorElement* hMuonAllHits[4][4];
00169       MonitorElement* hMuonHitsFromSegments[4][4];
00170       MonitorElement* hMuonUncorrelatedHits[4][4];
00171 
00172       MonitorElement* hDTPullxPropErr[4][4];
00173       MonitorElement* hDTPulldXdZPropErr[4][4];
00174       MonitorElement* hDTPullyPropErr[4][3];
00175       MonitorElement* hDTPulldYdZPropErr[4][3];
00176       MonitorElement* hDTDistWithSegment[4][4];
00177       MonitorElement* hDTDistWithNoSegment[4][4];
00178       MonitorElement* hDTPullDistWithSegment[4][4];
00179       MonitorElement* hDTPullDistWithNoSegment[4][4];
00180       MonitorElement* hCSCPullxPropErr[4][4];
00181       MonitorElement* hCSCPulldXdZPropErr[4][4];
00182       MonitorElement* hCSCPullyPropErr[4][4];
00183       MonitorElement* hCSCPulldYdZPropErr[4][4];
00184       MonitorElement* hCSCDistWithSegment[4][4];
00185       MonitorElement* hCSCDistWithNoSegment[4][4];
00186       MonitorElement* hCSCPullDistWithSegment[4][4];
00187       MonitorElement* hCSCPullDistWithNoSegment[4][4];
00188 
00189       // by chamber, trackerMuons only
00190       // DT:  [station][wheel][sector]
00191       // CSC: [endcap][station][ring][chamber]
00192       MonitorElement* hDTChamberDx[4][5][14];
00193       MonitorElement* hDTChamberDy[3][5][14];
00194       MonitorElement* hDTChamberEdgeXWithSegment[4][5][14];
00195       MonitorElement* hDTChamberEdgeXWithNoSegment[4][5][14];
00196       MonitorElement* hDTChamberEdgeYWithSegment[4][5][14];
00197       MonitorElement* hDTChamberEdgeYWithNoSegment[4][5][14];
00198       MonitorElement* hCSCChamberDx[2][4][4][36];
00199       MonitorElement* hCSCChamberDy[2][4][4][36];
00200       MonitorElement* hCSCChamberEdgeXWithSegment[2][4][4][36];
00201       MonitorElement* hCSCChamberEdgeXWithNoSegment[2][4][4][36];
00202       MonitorElement* hCSCChamberEdgeYWithSegment[2][4][4][36];
00203       MonitorElement* hCSCChamberEdgeYWithNoSegment[2][4][4][36];
00204 
00205       // segment matching "efficiency"
00206       MonitorElement* hSegmentIsAssociatedRZ;
00207       MonitorElement* hSegmentIsAssociatedXY;
00208       MonitorElement* hSegmentIsNotAssociatedRZ;
00209       MonitorElement* hSegmentIsNotAssociatedXY;
00210       MonitorElement* hSegmentIsBestDrAssociatedRZ;
00211       MonitorElement* hSegmentIsBestDrAssociatedXY;
00212       MonitorElement* hSegmentIsBestDrNotAssociatedRZ;
00213       MonitorElement* hSegmentIsBestDrNotAssociatedXY;
00214 };
00215 
00216 #endif