diff --git a/[refs] b/[refs] index dccb6483619fb..68191960f3679 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 82f76fd1a3f5d9423d7c163d852a0c36647fc4ea -"refs/heads/CMSSW_7_1_X": e929ed58ddc1844afbd4610abae63a8d8cb5f927 +"refs/heads/CMSSW_7_1_X": e9986d07fc7a4b9dbd6c56eb3bef3e46d9465221 diff --git a/trunk/MuonAnalysis/MomentumScaleCalibration/test/Macros/Plot_mass.C b/trunk/MuonAnalysis/MomentumScaleCalibration/test/Macros/Plot_mass.C index 235b67e38d182..db38c4473d72a 100644 --- a/trunk/MuonAnalysis/MomentumScaleCalibration/test/Macros/Plot_mass.C +++ b/trunk/MuonAnalysis/MomentumScaleCalibration/test/Macros/Plot_mass.C @@ -37,10 +37,10 @@ void drawMasses(const double ResMass, const double ResHalfWidth, histos & h) // Set a consistent binning int massXbins = h.mass->GetNbinsX(); int massProbXbins = h.massProb->GetNbinsX(); - if( massXbins > massProbXbins && h.mass->GetNbinsX() % h.massProb->GetNbinsX() != 0 ) { + if( massXbins > massProbXbins && massXbins % massProbXbins != 0 ) { cout << "Warning: number of bins are not multiples: massXbins = " << massXbins << ", massProbXbins = " << massProbXbins << endl; } - else if( h.mass->GetNbinsX() % h.massProb->GetNbinsX() != 0 ) { + else if( massProbXbins % massXbins != 0 ) { cout << "Warning: number of bins are not multiples: massXbins = " << massXbins << ", massProbXbins = " << massProbXbins << endl; } if( massProbXbins > massXbins ) { @@ -51,17 +51,26 @@ void drawMasses(const double ResMass, const double ResHalfWidth, histos & h) cout << "massXbins("< " << "massProbXbins("<Rebin(massXbins/massProbXbins); } + h.mass->SetAxisRange(ResMass - ResHalfWidth, ResMass + ResHalfWidth); double normFactor = (h.mass->Integral())/(h.massProb->Integral()); - h.massProb->SetNormFactor(normFactor); h.massProb->SetAxisRange(ResMass - ResHalfWidth, ResMass + ResHalfWidth); h.massProb->SetLineColor(kBlue); + h.massProb->SetNormFactor(normFactor); h.mass->SetMarkerColor(kRed); cout << (h.massProb->GetMaximum())*normFactor << endl; cout << h.mass->GetMaximum() << endl; // ATTENTION: put so that the maximum is correct // if( (h.massProb->GetMaximum())*normFactor > h.mass->GetMaximum() ) h.massProb->DrawCopy(); - h.mass->DrawCopy("PE"); - h.massProb->DrawCopy("SAMEHISTO"); + cout << "(h.massProb->GetMaximum())*normFactor = " << (h.massProb->GetMaximum())*normFactor << endl; + cout << "h.mass->GetMaximum() = " << h.mass->GetMaximum() << endl; + if( (h.massProb->GetMaximum())*normFactor > h.mass->GetMaximum() ) { + h.massProb->DrawCopy("PE"); + h.mass->DrawCopy("SAMEHISTO"); + } + else { + h.mass->DrawCopy("PE"); + h.massProb->DrawCopy("SAMEHISTO"); + } } /// Helper function to draw likelihood histograms diff --git a/trunk/MuonAnalysis/MomentumScaleCalibration/test/Macros/ResolDraw.cc b/trunk/MuonAnalysis/MomentumScaleCalibration/test/Macros/ResolDraw.cc index b69979f066c1c..b19b79e13ed49 100644 --- a/trunk/MuonAnalysis/MomentumScaleCalibration/test/Macros/ResolDraw.cc +++ b/trunk/MuonAnalysis/MomentumScaleCalibration/test/Macros/ResolDraw.cc @@ -45,7 +45,7 @@ TList *FileList; TFile *Target; void draw( TDirectory *target, TList *sourcelist, const bool doHalfEta ); -void Draw(const bool doHalfEta = false) { +void ResolDraw(const bool doHalfEta = false) { // in an interactive ROOT session, edit the file names // Target and FileList, then // root > .L hadd.C