Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:58:13

0001 /*
0002  *  See header file for a description of this class.
0003  *
0004  *  \author S. Goy Lopez, CIEMAT 
0005  *  \author S. Folgueras, U. Oviedo
0006  */
0007 #include "DQMOffline/Muon/interface/MuonKinVsEtaAnalyzer.h"
0008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0009 
0010 #include "DQMServices/Core/interface/DQMStore.h"
0011 
0012 #include <string>
0013 #include <TMath.h>
0014 using namespace std;
0015 using namespace edm;
0016 
0017 //#define DEBUG
0018 
0019 MuonKinVsEtaAnalyzer::MuonKinVsEtaAnalyzer(const edm::ParameterSet& pSet) {
0020   LogTrace(metname) << "[MuonKinVsEtaAnalyzer] Parameters initialization";
0021 
0022   parameters = pSet;
0023 
0024   theMuonCollectionLabel_ = consumes<edm::View<reco::Muon> >(parameters.getParameter<edm::InputTag>("MuonCollection"));
0025   theVertexLabel_ = consumes<reco::VertexCollection>(parameters.getParameter<edm::InputTag>("VertexLabel"));
0026 
0027   theBeamSpotLabel_ = mayConsume<reco::BeamSpot>(parameters.getParameter<edm::InputTag>("BeamSpotLabel"));
0028 
0029   // Parameters
0030   etaBin = parameters.getParameter<int>("etaBin");
0031   etaMin = parameters.getParameter<double>("etaMin");
0032   etaMax = parameters.getParameter<double>("etaMax");
0033 
0034   phiBin = parameters.getParameter<int>("phiBin");
0035   phiMin = parameters.getParameter<double>("phiMin");
0036   phiMax = parameters.getParameter<double>("phiMax");
0037 
0038   pBin = parameters.getParameter<int>("pBin");
0039   pMin = parameters.getParameter<double>("pMin");
0040   pMax = parameters.getParameter<double>("pMax");
0041 
0042   ptBin = parameters.getParameter<int>("ptBin");
0043   ptMin = parameters.getParameter<double>("ptMin");
0044   ptMax = parameters.getParameter<double>("ptMax");
0045 
0046   chiBin = parameters.getParameter<int>("chiBin");
0047   chiMin = parameters.getParameter<double>("chiMin");
0048   chiMax = parameters.getParameter<double>("chiMax");
0049   chiprobMin = parameters.getParameter<double>("chiprobMin");
0050   chiprobMax = parameters.getParameter<double>("chiprobMax");
0051 
0052   etaBMin = parameters.getParameter<double>("etaBMin");
0053   etaBMax = parameters.getParameter<double>("etaBMax");
0054   etaECMin = parameters.getParameter<double>("etaECMin");
0055   etaECMax = parameters.getParameter<double>("etaECMax");
0056   etaOvlpMin = parameters.getParameter<double>("etaOvlpMin");
0057   etaOvlpMax = parameters.getParameter<double>("etaOvlpMax");
0058 
0059   theFolder = parameters.getParameter<string>("folder");
0060 }
0061 MuonKinVsEtaAnalyzer::~MuonKinVsEtaAnalyzer() {}
0062 
0063 void MuonKinVsEtaAnalyzer::bookHistograms(DQMStore::IBooker& ibooker,
0064                                           edm::Run const& /*iRun*/,
0065                                           edm::EventSetup const& /*iSetup*/) {
0066   ibooker.cd();
0067   ibooker.setCurrentFolder(theFolder);
0068 
0069   std::string EtaName;
0070   for (unsigned int iEtaRegion = 0; iEtaRegion < 4; iEtaRegion++) {
0071     if (iEtaRegion == 0)
0072       EtaName = "Barrel";
0073     if (iEtaRegion == 1)
0074       EtaName = "EndCap";
0075     if (iEtaRegion == 2)
0076       EtaName = "Overlap";
0077     if (iEtaRegion == 3)
0078       EtaName = "";
0079 
0080     // monitoring of eta parameter
0081     etaGlbTrack.push_back(ibooker.book1D("GlbMuon_eta_" + EtaName, "#eta_{GLB} " + EtaName, etaBin, etaMin, etaMax));
0082     etaTrack.push_back(ibooker.book1D("TkMuon_eta_" + EtaName, "#eta_{TK} " + EtaName, etaBin, etaMin, etaMax));
0083     etaStaTrack.push_back(ibooker.book1D("StaMuon_eta_" + EtaName, "#eta_{STA} " + EtaName, etaBin, etaMin, etaMax));
0084     etaTightTrack.push_back(
0085         ibooker.book1D("TightMuon_eta_" + EtaName, "#eta_{Tight} " + EtaName, etaBin, etaMin, etaMax));
0086     etaLooseTrack.push_back(
0087         ibooker.book1D("LooseMuon_eta_" + EtaName, "#eta_{Loose} " + EtaName, etaBin, etaMin, etaMax));
0088     etaMediumTrack.push_back(
0089         ibooker.book1D("MediumMuon_eta_" + EtaName, "#eta_{Medium} " + EtaName, etaBin, etaMin, etaMax));
0090     etaSoftTrack.push_back(ibooker.book1D("SoftMuon_eta_" + EtaName, "#eta_{Soft} " + EtaName, etaBin, etaMin, etaMax));
0091     etaHighPtTrack.push_back(
0092         ibooker.book1D("HighPtMuon_eta_" + EtaName, "#eta_{HighPt} " + EtaName, etaBin, etaMin, etaMax));
0093 
0094     // monitoring of phi paramater
0095     phiGlbTrack.push_back(
0096         ibooker.book1D("GlbMuon_phi_" + EtaName, "#phi_{GLB} " + EtaName + "(rad)", phiBin, phiMin, phiMax));
0097     phiTrack.push_back(
0098         ibooker.book1D("TkMuon_phi_" + EtaName, "#phi_{TK}" + EtaName + "(rad)", phiBin, phiMin, phiMax));
0099     phiStaTrack.push_back(
0100         ibooker.book1D("StaMuon_phi_" + EtaName, "#phi_{STA}" + EtaName + " (rad)", phiBin, phiMin, phiMax));
0101     phiTightTrack.push_back(
0102         ibooker.book1D("TightMuon_phi_" + EtaName, "#phi_{Tight}_" + EtaName, phiBin, phiMin, phiMax));
0103     phiLooseTrack.push_back(
0104         ibooker.book1D("LooseMuon_phi_" + EtaName, "#phi_{Loose}_" + EtaName, phiBin, phiMin, phiMax));
0105     phiMediumTrack.push_back(
0106         ibooker.book1D("MediumMuon_phi_" + EtaName, "#phi_{Medium}_" + EtaName, phiBin, phiMin, phiMax));
0107     phiSoftTrack.push_back(ibooker.book1D("SoftMuon_phi_" + EtaName, "#phi_{Soft}_" + EtaName, phiBin, phiMin, phiMax));
0108     phiHighPtTrack.push_back(
0109         ibooker.book1D("HighPtMuon_phi_" + EtaName, "#phi_{HighPt}_" + EtaName, phiBin, phiMin, phiMax));
0110 
0111     // monitoring of the momentum
0112     pGlbTrack.push_back(ibooker.book1D("GlbMuon_p_" + EtaName, "p_{GLB} " + EtaName, pBin, pMin, pMax));
0113     pTrack.push_back(ibooker.book1D("TkMuon_p" + EtaName, "p_{TK} " + EtaName, pBin, pMin, pMax));
0114     pStaTrack.push_back(ibooker.book1D("StaMuon_p" + EtaName, "p_{STA} " + EtaName, pBin, pMin, pMax));
0115     pTightTrack.push_back(ibooker.book1D("TightMuon_p_" + EtaName, "p_{Tight} " + EtaName, pBin, pMin, pMax));
0116     pLooseTrack.push_back(ibooker.book1D("LooseMuon_p_" + EtaName, "p_{Loose} " + EtaName, pBin, pMin, pMax));
0117     pMediumTrack.push_back(ibooker.book1D("MediumMuon_p_" + EtaName, "p_{Medium} " + EtaName, pBin, pMin, pMax));
0118     pSoftTrack.push_back(ibooker.book1D("SoftMuon_p_" + EtaName, "p_{Soft} " + EtaName, pBin, pMin, pMax));
0119     pHighPtTrack.push_back(ibooker.book1D("HighPtMuon_p_" + EtaName, "p_{HighPt} " + EtaName, pBin, pMin, pMax));
0120 
0121     // monitoring of the transverse momentum
0122     ptGlbTrack.push_back(ibooker.book1D("GlbMuon_pt_" + EtaName, "pt_{GLB} " + EtaName, ptBin, ptMin, ptMax));
0123     ptTrack.push_back(ibooker.book1D("TkMuon_pt_" + EtaName, "pt_{TK} " + EtaName, ptBin, ptMin, ptMax));
0124     ptStaTrack.push_back(ibooker.book1D("StaMuon_pt_" + EtaName, "pt_{STA} " + EtaName, ptBin, ptMin, pMax));
0125     ptTightTrack.push_back(ibooker.book1D("TightMuon_pt_" + EtaName, "pt_{Tight} " + EtaName, ptBin, ptMin, ptMax));
0126     ptLooseTrack.push_back(ibooker.book1D("LooseMuon_pt_" + EtaName, "pt_{Loose} " + EtaName, ptBin, ptMin, ptMax));
0127     ptMediumTrack.push_back(ibooker.book1D("MediumMuon_pt_" + EtaName, "pt_{Medium} " + EtaName, ptBin, ptMin, ptMax));
0128     ptSoftTrack.push_back(ibooker.book1D("SoftMuon_pt_" + EtaName, "pt_{Soft} " + EtaName, ptBin, ptMin, ptMax));
0129     ptHighPtTrack.push_back(ibooker.book1D("HighPtMuon_pt_" + EtaName, "pt_{HighPt} " + EtaName, ptBin, ptMin, ptMax));
0130 
0131     // monitoring chi2 and Prob.Chi2
0132     chi2GlbTrack.push_back(
0133         ibooker.book1D("GlbMuon_chi2_" + EtaName, "#chi^{2}_{GLB} " + EtaName, chiBin, chiMin, chiMax));
0134     chi2probGlbTrack.push_back(ibooker.book1D(
0135         "GlbMuon_chi2prob_" + EtaName, "#chi^{2}_{GLB} prob." + EtaName, chiBin, chiprobMin, chiprobMax));
0136     chi2Track.push_back(ibooker.book1D("TkMuon_chi2_" + EtaName, "#chi^{2}_{TK} " + EtaName, chiBin, chiMin, chiMax));
0137     chi2probTrack.push_back(
0138         ibooker.book1D("TkMuon_chi2prob_" + EtaName, "#chi^{2}_{TK} prob." + EtaName, chiBin, chiprobMin, chiprobMax));
0139     chi2StaTrack.push_back(
0140         ibooker.book1D("StaMuon_chi2_" + EtaName, "#chi^{2}_{STA} " + EtaName, chiBin, chiMin, chiMax));
0141     chi2probStaTrack.push_back(ibooker.book1D(
0142         "StaMuon_chi2prob_" + EtaName, "#chi^{2}_{STA} prob." + EtaName, chiBin, chiprobMin, chiprobMax));
0143     chi2TightTrack.push_back(
0144         ibooker.book1D("TightMuon_chi2_" + EtaName, "#chi^{2}_{Tight} " + EtaName, chiBin, chiMin, chiMax));
0145     chi2probTightTrack.push_back(ibooker.book1D(
0146         "TightMuon_chi2prob_" + EtaName, "#chi^{2}_{Tight} prob." + EtaName, chiBin, chiprobMin, chiprobMax));
0147     chi2LooseTrack.push_back(
0148         ibooker.book1D("LooseMuon_chi2_" + EtaName, "#chi^{2}_{Loose} " + EtaName, chiBin, chiMin, chiMax));
0149     chi2MediumTrack.push_back(
0150         ibooker.book1D("MediumMuon_chi2_" + EtaName, "#chi^{2}_{Medium} " + EtaName, chiBin, chiMin, chiMax));
0151     chi2probLooseTrack.push_back(ibooker.book1D(
0152         "LooseMuon_chi2prob_" + EtaName, "#chi^{2}_{Loose} prob." + EtaName, chiBin, chiprobMin, chiprobMax));
0153     chi2probMediumTrack.push_back(ibooker.book1D(
0154         "MediumMuon_chi2prob_" + EtaName, "#chi^{2}_{Medium} prob." + EtaName, chiBin, chiprobMin, chiprobMax));
0155     chi2SoftTrack.push_back(
0156         ibooker.book1D("SoftMuon_chi2_" + EtaName, "#chi^{2}_{Soft} " + EtaName, chiBin, chiMin, chiMax));
0157     chi2probSoftTrack.push_back(ibooker.book1D(
0158         "SoftMuon_chi2prob_" + EtaName, "#chi^{2}_{Soft} prob." + EtaName, chiBin, chiprobMin, chiprobMax));
0159     chi2HighPtTrack.push_back(
0160         ibooker.book1D("HighPtMuon_chi2_" + EtaName, "#chi^{2}_{HighPt} " + EtaName, chiBin, chiMin, chiMax));
0161     chi2probHighPtTrack.push_back(ibooker.book1D(
0162         "HighPtMuon_chi2prob_" + EtaName, "#chi^{2}_{HighPt} prob." + EtaName, chiBin, chiprobMin, chiprobMax));
0163   }
0164 }
0165 void MuonKinVsEtaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
0166   LogTrace(metname) << "[MuonKinVsEtaAnalyzer] Analyze the mu in different eta regions";
0167 
0168   edm::Handle<edm::View<reco::Muon> > muons;
0169   iEvent.getByToken(theMuonCollectionLabel_, muons);
0170 
0171   // =================================================================================
0172   // Look for the Primary Vertex (and use the BeamSpot instead, if you can't find it):
0173   reco::Vertex::Point posVtx;
0174   reco::Vertex::Error errVtx;
0175   unsigned int theIndexOfThePrimaryVertex = 999.;
0176 
0177   edm::Handle<reco::VertexCollection> vertex;
0178   iEvent.getByToken(theVertexLabel_, vertex);
0179   if (vertex.isValid()) {
0180     for (unsigned int ind = 0; ind < vertex->size(); ++ind) {
0181       if ((*vertex)[ind].isValid() && !((*vertex)[ind].isFake())) {
0182         theIndexOfThePrimaryVertex = ind;
0183         break;
0184       }
0185     }
0186   }
0187 
0188   if (theIndexOfThePrimaryVertex < 100) {
0189     posVtx = ((*vertex)[theIndexOfThePrimaryVertex]).position();
0190     errVtx = ((*vertex)[theIndexOfThePrimaryVertex]).error();
0191   } else {
0192     LogInfo("RecoMuonValidator") << "reco::PrimaryVertex not found, use BeamSpot position instead\n";
0193 
0194     edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
0195     iEvent.getByToken(theBeamSpotLabel_, recoBeamSpotHandle);
0196     reco::BeamSpot bs = *recoBeamSpotHandle;
0197 
0198     posVtx = bs.position();
0199     errVtx(0, 0) = bs.BeamWidthX();
0200     errVtx(1, 1) = bs.BeamWidthY();
0201     errVtx(2, 2) = bs.sigmaZ();
0202   }
0203 
0204   const reco::Vertex vtx(posVtx, errVtx);
0205   // ==========================================================
0206 
0207 #ifdef DEBUG
0208   cout << "[MuonKinVsEtaAnalyzer]: Analyze the mu in different eta regions" << endl;
0209 #endif
0210   if (!muons.isValid())
0211     return;
0212 
0213   for (edm::View<reco::Muon>::const_iterator muon = muons->begin(); muon != muons->end(); ++muon) {
0214     for (unsigned int iEtaRegion = 0; iEtaRegion < 4; iEtaRegion++) {
0215       if (iEtaRegion == 0) {
0216         EtaCutMin = etaBMin;
0217         EtaCutMax = etaBMax;
0218       }
0219       if (iEtaRegion == 1) {
0220         EtaCutMin = etaECMin;
0221         EtaCutMax = etaECMax;
0222       }
0223       if (iEtaRegion == 2) {
0224         EtaCutMin = etaOvlpMin;
0225         EtaCutMax = etaOvlpMax;
0226       }
0227       if (iEtaRegion == 3) {
0228         EtaCutMin = etaBMin;
0229         EtaCutMax = etaECMax;
0230       }
0231 
0232       if (muon->isGlobalMuon()) {
0233 #ifdef DEBUG
0234         cout << "[MuonKinVsEtaAnalyzer]: The mu is global... Filling the histos" << endl;
0235 #endif
0236         LogTrace(metname) << "[MuonKinVsEtaAnalyzer] The mu is global - filling the histos";
0237         reco::TrackRef recoCombinedGlbTrack = muon->combinedMuon();
0238         // get the track combinig the information from both the glb fit"
0239         if (fabs(recoCombinedGlbTrack->eta()) > EtaCutMin && fabs(recoCombinedGlbTrack->eta()) < EtaCutMax) {
0240           etaGlbTrack[iEtaRegion]->Fill(recoCombinedGlbTrack->eta());
0241           phiGlbTrack[iEtaRegion]->Fill(recoCombinedGlbTrack->phi());
0242           pGlbTrack[iEtaRegion]->Fill(recoCombinedGlbTrack->p());
0243           ptGlbTrack[iEtaRegion]->Fill(recoCombinedGlbTrack->pt());
0244           chi2GlbTrack[iEtaRegion]->Fill(recoCombinedGlbTrack->normalizedChi2());
0245           chi2probGlbTrack[iEtaRegion]->Fill(TMath::Prob(recoCombinedGlbTrack->chi2(), recoCombinedGlbTrack->ndof()));
0246         }
0247       }
0248 
0249       if (muon->isTrackerMuon()) {
0250 #ifdef DEBUG
0251         cout << "[MuonKinVsEtaAnalyzer]: The mu is tracker... Filling the histos" << endl;
0252 #endif
0253         LogTrace(metname) << "[MuonKinVsEtaAnalyzer] The mu is tracker - filling the histos";
0254         // get the track using only the tracker data
0255         reco::TrackRef recoTrack = muon->track();
0256         if (fabs(recoTrack->eta()) > EtaCutMin && fabs(recoTrack->eta()) < EtaCutMax) {
0257           etaTrack[iEtaRegion]->Fill(recoTrack->eta());
0258           phiTrack[iEtaRegion]->Fill(recoTrack->phi());
0259           pTrack[iEtaRegion]->Fill(recoTrack->p());
0260           ptTrack[iEtaRegion]->Fill(recoTrack->pt());
0261           chi2Track[iEtaRegion]->Fill(recoTrack->normalizedChi2());
0262           chi2probTrack[iEtaRegion]->Fill(TMath::Prob(recoTrack->chi2(), recoTrack->ndof()));
0263         }
0264       }
0265 
0266       if (muon->isStandAloneMuon()) {
0267 #ifdef DEBUG
0268         cout << "[MuonKinVsEtaAnalyzer]: The mu is standlone... Filling the histos" << endl;
0269 #endif
0270         LogTrace(metname) << "[MuonKinVsEtaAnalyzer] The mu is standalone - filling the histos";
0271         // get the track using only the mu spectrometer data
0272         reco::TrackRef recoStaTrack = muon->standAloneMuon();
0273         if (fabs(recoStaTrack->eta()) > EtaCutMin && fabs(recoStaTrack->eta()) < EtaCutMax) {
0274           etaStaTrack[iEtaRegion]->Fill(recoStaTrack->eta());
0275           phiStaTrack[iEtaRegion]->Fill(recoStaTrack->phi());
0276           pStaTrack[iEtaRegion]->Fill(recoStaTrack->p());
0277           ptStaTrack[iEtaRegion]->Fill(recoStaTrack->pt());
0278           chi2StaTrack[iEtaRegion]->Fill(recoStaTrack->normalizedChi2());
0279           chi2probStaTrack[iEtaRegion]->Fill(TMath::Prob(recoStaTrack->chi2(), recoStaTrack->ndof()));
0280         }
0281       }
0282 
0283       if (muon::isTightMuon(*muon, vtx)) {
0284 #ifdef DEBUG
0285         cout << "[MuonKinVsEtaAnalyzer]: The mu is tight... Filling the histos" << endl;
0286 #endif
0287         LogTrace(metname) << "[MuonKinVsEtaAnalyzer] The mu is Tight - filling the histos";
0288         reco::TrackRef recoTightTrack = muon->combinedMuon();
0289         if (fabs(recoTightTrack->eta()) > EtaCutMin && fabs(recoTightTrack->eta()) < EtaCutMax) {
0290           etaTightTrack[iEtaRegion]->Fill(recoTightTrack->eta());
0291           phiTightTrack[iEtaRegion]->Fill(recoTightTrack->phi());
0292           pTightTrack[iEtaRegion]->Fill(recoTightTrack->p());
0293           ptTightTrack[iEtaRegion]->Fill(recoTightTrack->pt());
0294           chi2TightTrack[iEtaRegion]->Fill(recoTightTrack->normalizedChi2());
0295           chi2probTightTrack[iEtaRegion]->Fill(TMath::Prob(recoTightTrack->chi2(), recoTightTrack->ndof()));
0296         }
0297       }
0298 
0299       if (muon::isLooseMuon(*muon)) {
0300 #ifdef DEBUG
0301         cout << "[MuonKinVsEtaAnalyzer]: The mu is Loose... Filling the histos" << endl;
0302 #endif
0303         LogTrace(metname) << "[MuonKinVsEtaAnalyzer] The mu is Loose - filling the histos";
0304         reco::TrackRef recoLooseTrack;
0305 
0306         if (muon->isGlobalMuon())
0307           recoLooseTrack = muon->combinedMuon();
0308         else
0309           recoLooseTrack = muon->track();
0310 
0311         if (fabs(recoLooseTrack->eta()) > EtaCutMin && fabs(recoLooseTrack->eta()) < EtaCutMax) {
0312           etaLooseTrack[iEtaRegion]->Fill(recoLooseTrack->eta());
0313           phiLooseTrack[iEtaRegion]->Fill(recoLooseTrack->phi());
0314           pLooseTrack[iEtaRegion]->Fill(recoLooseTrack->p());
0315           ptLooseTrack[iEtaRegion]->Fill(recoLooseTrack->pt());
0316           chi2LooseTrack[iEtaRegion]->Fill(recoLooseTrack->normalizedChi2());
0317           chi2probLooseTrack[iEtaRegion]->Fill(TMath::Prob(recoLooseTrack->chi2(), recoLooseTrack->ndof()));
0318         }
0319       }
0320 
0321       if (muon::isMediumMuon(*muon)) {
0322 #ifdef DEBUG
0323         cout << "[MuonKinVsEtaAnalyzer]: The mu is Medium... Filling the histos" << endl;
0324 #endif
0325         LogTrace(metname) << "[MuonKinVsEtaAnalyzer] The mu is Medium - filling the histos";
0326         reco::TrackRef recoMediumTrack;
0327 
0328         if (muon->isGlobalMuon())
0329           recoMediumTrack = muon->combinedMuon();
0330         else
0331           recoMediumTrack = muon->track();
0332 
0333         if (fabs(recoMediumTrack->eta()) > EtaCutMin && fabs(recoMediumTrack->eta()) < EtaCutMax) {
0334           etaMediumTrack[iEtaRegion]->Fill(recoMediumTrack->eta());
0335           phiMediumTrack[iEtaRegion]->Fill(recoMediumTrack->phi());
0336           pMediumTrack[iEtaRegion]->Fill(recoMediumTrack->p());
0337           ptMediumTrack[iEtaRegion]->Fill(recoMediumTrack->pt());
0338           chi2MediumTrack[iEtaRegion]->Fill(recoMediumTrack->normalizedChi2());
0339           chi2probMediumTrack[iEtaRegion]->Fill(TMath::Prob(recoMediumTrack->chi2(), recoMediumTrack->ndof()));
0340         }
0341       }
0342 
0343       if (muon::isSoftMuon(*muon, vtx)) {
0344 #ifdef DEBUG
0345         cout << "[MuonKinVsEtaAnalyzer]: The mu is Soft... Filling the histos" << endl;
0346 #endif
0347         LogTrace(metname) << "[MuonKinVsEtaAnalyzer] The mu is Soft - filling the histos";
0348         reco::TrackRef recoSoftTrack = muon->track();
0349         if (fabs(recoSoftTrack->eta()) > EtaCutMin && fabs(recoSoftTrack->eta()) < EtaCutMax) {
0350           etaSoftTrack[iEtaRegion]->Fill(recoSoftTrack->eta());
0351           phiSoftTrack[iEtaRegion]->Fill(recoSoftTrack->phi());
0352           pSoftTrack[iEtaRegion]->Fill(recoSoftTrack->p());
0353           ptSoftTrack[iEtaRegion]->Fill(recoSoftTrack->pt());
0354           chi2SoftTrack[iEtaRegion]->Fill(recoSoftTrack->normalizedChi2());
0355           chi2probSoftTrack[iEtaRegion]->Fill(TMath::Prob(recoSoftTrack->chi2(), recoSoftTrack->ndof()));
0356         }
0357       }
0358 
0359       if (muon::isHighPtMuon(*muon, vtx)) {
0360 #ifdef DEBUG
0361         cout << "[MuonKinVsEtaAnalyzer]: The mu is HighPt... Filling the histos" << endl;
0362 #endif
0363         LogTrace(metname) << "[MuonKinVsEtaAnalyzer] The mu is HightPt - filling the histos";
0364         reco::TrackRef recoHighPtTrack = muon->combinedMuon();
0365         if (fabs(recoHighPtTrack->eta()) > EtaCutMin && fabs(recoHighPtTrack->eta()) < EtaCutMax) {
0366           etaHighPtTrack[iEtaRegion]->Fill(recoHighPtTrack->eta());
0367           phiHighPtTrack[iEtaRegion]->Fill(recoHighPtTrack->phi());
0368           pHighPtTrack[iEtaRegion]->Fill(recoHighPtTrack->p());
0369           ptHighPtTrack[iEtaRegion]->Fill(recoHighPtTrack->pt());
0370           chi2HighPtTrack[iEtaRegion]->Fill(recoHighPtTrack->normalizedChi2());
0371           chi2probHighPtTrack[iEtaRegion]->Fill(TMath::Prob(recoHighPtTrack->chi2(), recoHighPtTrack->ndof()));
0372         }
0373       }
0374     }  //end iEtaRegions
0375   }    //end recoMu iteration
0376 }