00001 #ifndef HLTMUON_H
00002 #define HLTMUON_H
00003
00004 #include "TH1.h"
00005 #include "TH2.h"
00006 #include "TFile.h"
00007 #include "TNamed.h"
00008 #include <vector>
00009 #include <map>
00010 #include "TROOT.h"
00011 #include "TChain.h"
00012
00013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00014 #include "FWCore/Framework/interface/Event.h"
00015 #include "FWCore/Framework/interface/EventSetup.h"
00016 #include "FWCore/Framework/interface/ESHandle.h"
00017 #include "DataFormats/Common/interface/Handle.h"
00018 #include "DataFormats/MuonReco/interface/Muon.h"
00019 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00020 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
00021 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00022 #include "DataFormats/Candidate/interface/Candidate.h"
00023 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00024
00025 #include "DataFormats/TrackReco/interface/Track.h"
00026 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00027 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
00028 #include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
00029 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
00030 #include "DataFormats/RecoCandidate/interface/IsoDepositFwd.h"
00031
00032 #include "DataFormats/MuonSeed/interface/L3MuonTrajectorySeed.h"
00033 #include "DataFormats/MuonSeed/interface/L3MuonTrajectorySeedCollection.h"
00034 #include "DataFormats/MuonSeed/interface/L2MuonTrajectorySeed.h"
00035 #include "DataFormats/MuonSeed/interface/L2MuonTrajectorySeedCollection.h"
00036 #include "DataFormats/L1Trigger/interface/L1MuonParticle.h"
00037 #include "DataFormats/L1Trigger/interface/L1MuonParticleFwd.h"
00038 #include "DataFormats/VertexReco/interface/Vertex.h"
00039 #include "DataFormats/VertexReco/interface/VertexFwd.h"
00040
00041 #include "HLTrigger/HLTanalyzers/interface/JetUtil.h"
00042 #include "HLTrigger/HLTanalyzers/interface/CaloTowerBoundries.h"
00043
00044 #include "DataFormats/METReco/interface/CaloMETCollection.h"
00045
00046 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
00047 #include "DataFormats/Math/interface/Point3D.h"
00048
00049 #include "TrackingTools/PatternTools/interface/ClosestApproachInRPhi.h"
00050 #include "DataFormats/Common/interface/RefToBase.h"
00051 #include "DataFormats/Math/interface/Error.h"
00052 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00053 #include "MagneticField/Engine/interface/MagneticField.h"
00054
00055 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00056 #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h"
00057 #include "TMath.h"
00058 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00059
00060
00061 typedef std::vector<std::string> MyStrings;
00062
00069 class HLTMuon {
00070 public:
00071 HLTMuon();
00072
00073 void setup(const edm::ParameterSet& pSet, TTree* tree);
00074
00076 void analyze(const edm::Handle<reco::MuonCollection> & muon,
00077 const edm::Handle<reco::PFCandidateCollection> & pfmuon,
00078 const edm::Handle<l1extra::L1MuonParticleCollection> & mucands1,
00079 const edm::Handle<reco::RecoChargedCandidateCollection> & mucands2,
00080 const edm::Handle<edm::ValueMap<bool> > & isoMap2,
00081 const edm::Handle<reco::RecoChargedCandidateCollection> & mucands3,
00082 const edm::Handle<edm::ValueMap<bool> > & isoMap3,
00083 const edm::Handle<edm::ValueMap<bool> > & isoTrk10Map3,
00084 const edm::Handle<reco::RecoChargedCandidateCollection> & oniaPixelCands,
00085 const edm::Handle<reco::RecoChargedCandidateCollection> & oniaTrackCands,
00086 const edm::Handle<reco::VertexCollection> & dimuvtxcands3,
00087 const edm::Handle<reco::RecoChargedCandidateCollection> & munovtxcands2,
00088 const edm::Handle<reco::MuonCollection> & trkmucands,
00089
00090 const edm::ESHandle<MagneticField> & theMagField,
00091 const edm::Handle<reco::BeamSpot> & recoBeamSpotHandle,
00092 TTree* tree);
00093
00094
00095 private:
00096
00097 int validChambers(const reco::TrackRef & track);
00098
00099
00100 float *muonpt, *muonphi, *muoneta, *muonet, *muone, *muonchi2NDF, *muoncharge,
00101 *muonTrkIsoR03, *muonECalIsoR03, *muonHCalIsoR03, *muonD0;
00102 float *pfmuonpt, *pfmuonphi, *pfmuoneta, *pfmuonet, *pfmuone, *pfmuoncharge;
00103 int *muontype, *muonNValidTrkHits, *muonNValidMuonHits;
00104 float *muonl2pt, *muonl2eta, *muonl2phi, *muonl2dr, *muonl2drsign, *muonl2dz, *muonl2vtxz;
00105 float *muonl3pt, *muonl3eta, *muonl3phi, *muonl3dr, *muonl3dz, *muonl3vtxz, *muonl3normchi2;
00106 float *muonl3globalpt, *muonl3globaleta, *muonl3globalphi, *muonl3globaldr, *muonl3globaldrsign, *muonl3globaldz, *muonl3globalvtxz;
00107 float *muonl2novtxpt, *muonl2novtxeta, *muonl2novtxphi, *muonl2novtxdr, *muonl2novtxdrsign, *muonl2novtxdz;
00108 float *muonl2pterr, *muonl3pterr, *muonl2novtxpterr;
00109 int nmuon, nmu2cand, nmu3cand, nmu2novtxcand, ntrackermuoncand, npfmuon;
00110 int *muonl2chg, *muonl2iso, *muonl2nhits, *muonl2nchambers, *muonl2nstat, *muonl2ndtcscstat, *muonl3chg, *muonl3iso, *muonl32idx, *muonl3nhits, *muonl21idx, *muonl2novtxchg, *muonl2novtxiso, *muonl2novtx1idx, *muonl2novtxnhits, *muonl2novtxnchambers, *muonl2novtxnstat, *muonl2novtxndtcscstat, *muonl3global2idx, *muonl3globalchg;
00111 int *muonl3npixelhits, *muonl3ntrackerhits, *muonl3nmuonhits, *muonl3trk10iso;
00112 float *trackermuonpt, *trackermuonphi, *trackermuoneta;
00113 int *trackermuonchg, *trackermuonnhits;
00114
00115
00116 int nOniaPixelCand, nOniaTrackCand;
00117 float *oniaPixelpt, *oniaPixeleta, *oniaPixelphi, *oniaPixeldr, *oniaPixeldz, *oniaPixelNormChi2;
00118 float *oniaTrackpt, *oniaTracketa, *oniaTrackphi, *oniaTrackdr, *oniaTrackdz, *oniaTrackNormChi2;
00119 int *oniaPixelchg, *oniaTrackchg, *oniaPixelHits, *oniaTrackHits;
00120 int nDiMu,nDiMuVtx;
00121 float *dimudca;
00122 int *dimu1st,*dimu2nd,*dimuvtx1st,*dimuvtx2nd;
00123 float *dimuvtxchi2,*dimuvtxr,*dimuvtxrsig,*dimuvtxroversig,*dimuvtxcosalpha;
00124 float *dimuvtxmu2dipmax, *dimuvtxmu2dipmin, *dimuvtxmu2dipsigmax, *dimuvtxmu2dipsigmin;
00125
00126
00127
00128 bool _Monte,_Debug;
00129
00130 int evtCounter;
00131
00132 static float etaBarrel() { return 1.4; }
00133
00134 };
00135
00136 #endif