From 58404acf873b5df6a2dd30c072adbe3085feff11 Mon Sep 17 00:00:00 2001 From: usarica Date: Mon, 31 Aug 2015 20:44:52 +0200 Subject: [PATCH 01/34] Merge Zmumutool --- .../TkAlAllInOneTool/zMuMuValidation.py | 7 +- .../zMuMuValidationTemplates.py | 26 +- .../OfflineValidation/test/zmumuValidate.ini | 127 +++ .../test/Macros/RooFit/FitSlices.cc | 8 +- .../test/Macros/RooFit/MultiHistoOverlap_Z.C | 805 +++++++++--------- .../test/Macros/RooFit/tdrstyle.C | 2 +- 6 files changed, 567 insertions(+), 408 deletions(-) create mode 100644 Alignment/OfflineValidation/test/zmumuValidate.ini diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py index 29aad20e4b3cf..8714a4fc8a9a9 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py @@ -42,12 +42,15 @@ def createCrabCfg(self, path): return GenericValidationData.createCrabCfg(self, path, self.crabCfgBaseName) def getRepMap(self, alignment = None): + if alignment == None: + alignment = self.alignmentToValidate repMap = GenericValidationData.getRepMap(self, alignment) repMap.update({ "nEvents": self.general["maxevents"], -# "outputFile": "zmumuHisto.root" "outputFile": ("0_zmumuHisto.root" ",genSimRecoPlots.root" - ",FitParameters.txt") + ",FitParameters.txt"), + "eosdir": os.path.join(self.general["eosdir"], "%s/%s/%s" % (self.outputBaseName, self.name, alignment.name)), + "plotsdir": ".oO[datadir]Oo./%s/%s/%s/plots" % (self.outputBaseName, self.name, alignment.name), }) return repMap diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py index ffc92ef89ed93..5efb9e10455fa 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py @@ -14,8 +14,8 @@ .oO[datasetDefinition]Oo. # process.load("Alignment.OfflineValidation..oO[dataset]Oo._cff") -process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") -process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi") +#process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") +#process.load("Geometry.CommonDetUnit.globalTrackingGeometry_cfi") process.load("RecoMuon.DetLayers.muonDetLayerGeometry_cfi") process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi") process.load("RecoMuon.TrackingTools.MuonServiceProxy_cff") @@ -218,7 +218,6 @@ cwd=`pwd` cd .oO[CMSSW_BASE]Oo./src -# export SCRAM_ARCH=slc5_amd64_gcc462 export SCRAM_ARCH=.oO[SCRAM_ARCH]Oo. eval `scram runtime -sh` cd $cwd @@ -244,11 +243,6 @@ ls -lh . -source /afs/cern.ch/sw/lcg/external/gcc/4.8.1/x86_64-slc6/setup.sh -source /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.10/x86_64-slc6-gcc48-opt/root/bin/thisroot.sh - -# cd .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit -# ln -fs .oO[workdir]Oo./0_zmumuHisto.root . cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc . cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/Legend.h . cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitMassSlices.cc . @@ -257,26 +251,24 @@ cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc . cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitMass1D.cc . -root -q -b "CompareBiasZValidation.cc+(\\\"\\\")" - - -# mv BiasCheck.root .oO[workdir]Oo. +root -q -b -ls "CompareBiasZValidation.cc+(\\\"\\\")" -# cd .oO[workdir]Oo. cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C . cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlap_.oO[resonance]Oo..C . -# ln -fs /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/TMP_EM/ZMuMu/data/MC/BiasCheck_DYToMuMu_Summer11_TkAlZMuMu_IDEAL.root ./BiasCheck_Reference.root + if [[ .oO[zmumureference]Oo. == *store* ]]; then cmsStage -f .oO[zmumureference]Oo. BiasCheck_Reference.root; else ln -fs .oO[zmumureference]Oo. ./BiasCheck_Reference.root; fi -root -q -b MultiHistoOverlap_.oO[resonance]Oo..C +root -q -b -l MultiHistoOverlap_.oO[resonance]Oo..C -cmsMkdir /store/caf/user/$USER/.oO[eosdir]Oo. +cmsMkdir /store/caf/user/$USER/.oO[eosdir]Oo./plots/ for RootOutputFile in $(ls *root ) do cmsStage -f ${RootOutputFile} /store/caf/user/$USER/.oO[eosdir]Oo./ done +mkdir -p .oO[plotsdir]Oo. for PngOutputFile in $(ls *png ); do - rfcp ${PngOutputFile} .oO[datadir]Oo. + cmsStage -f ${PngOutputFile} /store/caf/user/$USER/.oO[eosdir]Oo./plots/ + rfcp ${PngOutputFile} .oO[plotsdir]Oo. done diff --git a/Alignment/OfflineValidation/test/zmumuValidate.ini b/Alignment/OfflineValidation/test/zmumuValidate.ini new file mode 100644 index 0000000000000..182549f165f72 --- /dev/null +++ b/Alignment/OfflineValidation/test/zmumuValidate.ini @@ -0,0 +1,127 @@ +############################################################################### +# general settings applying to all validations +# - one can override `jobmode` in the individual validation's section +[general] +jobmode = lxBatch, -q cmscaf1nd +#datadir = /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/data/commonValidation/results/$USER/TkAlWeek2012/laEffect +# if you want your root files stored in a subdirectory on eos, put it here: +# eosdir = Test +# if you want your logs to be stored somewhere else, put it here: +# logdir = /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/data/commonValidation/results/$USER/log + + +############################################################################### +# configuration of several alignments + +[alignment:alignment_defgt] +title=alignment_{Default GT} +globaltag = GR_P_V56 +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +color = 633 +style = 1 + +[alignment:alignment_hp1394] +title=alignment_hp1394 +globaltag = GR_P_V56 +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/cayou/CMSSW_7_4_6_patch5/src/Alignment/HIPAlignmentAlgorithm/hp1394/alignments_iter20.db, Alignments +condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +color = 633 +style = 1 + +[alignment:alignment_mp1819] +title=alignment_mp1819 +globaltag = GR_P_V56 +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1819/jobData/jobm/alignments_MP.db, Alignments +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1819/jobData/jobm/alignments_MP.db, Deformations +condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +color = 633 +style = 1 + +[alignment:alignment_mp1820] +title=alignment_mp1820 +globaltag = GR_P_V56 +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1820/jobData/jobm/alignments_MP.db, Alignments +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1820/jobData/jobm/alignments_MP.db, Deformations +condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +color = 633 +style = 1 + +[alignment:alignment_0] +title=alignment_{0} +globaltag = FT_R_53_V6C::All +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1183/jobData/jobm/alignments_MP.db, Alignments +condition TrackerAlignmentErrorExtendedRcd = zeroAPE +# `zeroAPE` is a shorthand for the following commented line +# condition TrackerAlignmentErrorExtendedRcd = frontier://FrontierProd/CMS_COND_31X_FROM21X, TrackerIdealGeometryErrors210_mc +condition SiStripConfObjectRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1025/SiStripShiftAndCrosstalk_GR10_v2_offline_BPCorrected.db,SiStripShiftAndCrosstalk_GR10_v2_offline_BPCorrected +condition SiStripLorentzAngleRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1025/SiStripLorentzAngleDeco_GR10_v1_offline_BPCorrected.db,SiStripLorentzAngleDeco_GR10_v1_offline_BPCorrected, deconvolution +condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_COND_31X_PIXEL,SiPixelTemplateDBObject_38T_v4_mc +color = 419 +style = 2 + +[alignment:alignment_1] +title=alignment_{1} +globaltag = GR_P_V56 +#condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1206/jobData/jobm/alignments_MP.db, Alignments +#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_COND_31X_PIXEL,SiPixelTemplateDBObject_38T_v4_mc +color = 633 +style = 1 + +[alignment:mp1260baseline] +globaltag = FT_R_53_V6C::All +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1260/jobData/jobm/alignments_MP.db, Alignments +condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1260/jobData/jobm/alignments_MP.db, Deformations +color = 600 +style = 2 + +[alignment:mp1260m1] +globaltag = FT_R_53_V6C::All +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1260/jobData/jobm1/alignments_MP.db, Alignments +condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1260/jobData/jobm1/alignments_MP.db, Deformations +color = 4 +style = 1 + + +############################################################################### +# configuration of individual validations + +[zmumu:zmumu_test] +etamaxneg = 2.4 +etaminneg = -2.4 +etamaxpos = 2.4 +etaminpos = -2.4 +maxevents = -1 +firstRun=251604 +lastRun=251642 +#cmssw = /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/data/commonValidation/CMSSW_5_3_4_patch2 +dataset = /DoubleMuon/Run2015B-TkAlZMuMu-PromptReco-v1/ALCARECO + +[zmumu:Run2015B_ALCARECO_251604-251642] +etamaxneg = 2.4 +etaminneg = -2.4 +etamaxpos = 2.4 +etaminpos = -2.4 +maxevents = -1 +firstRun=251604 +lastRun=251642 +dataset = /DoubleMuon/Run2015B-TkAlZMuMu-PromptReco-v1/ALCARECO + + +############################################################################### +# configure which validation to run on which alignment + +[validation] +#compare Tracker: mp1260m1 1, mp1260baseline +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_defgt +zmumu Run2015B_ALCARECO_251604-251642 : alignment_hp1394 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1819 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1820 diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitSlices.cc b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitSlices.cc index 59f4226699b31..66e807e31645d 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitSlices.cc +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitSlices.cc @@ -4,6 +4,8 @@ #include "FitXslices.cc" #include "TFile.h" #include "TH1F.h" +#include "TH2F.h" +#include "TH3F.h" #include "TROOT.h" /** @@ -83,8 +85,8 @@ class FitSlices // std::cout<< "number of bins in z (and tempHisto) --> "< twoDprojection; for(unsigned int z=1;zGetZaxis()->SetRange(z,z); - TH2*tempHisto= (TH2*)histo3D->Project3D("xy"); + TAxis* ax_tmp = const_cast(histo3D->GetZaxis());ax_tmp->SetRange(z, z); + TH2* tempHisto= (TH2*)histo3D->Project3D("xy"); std::stringstream ss; ss << z; tempHisto->SetName(TString(tempHisto->GetName())+ss.str()); @@ -93,7 +95,7 @@ class FitSlices twoDprojection.insert(std::make_pair(z,tempHisto)); } unsigned int xbins, ybins; - TH3* rebinned3D= new TH3(TString(histo3D->GetName())+"_rebinned",histo3D->GetTitle(), + TH3* rebinned3D = (TH3*) new TH3F(TString(histo3D->GetName())+"_rebinned",histo3D->GetTitle(), xbins,histo3D->GetXaxis()->GetXmin(),histo3D->GetXaxis()->GetXmax(), ybins,histo3D->GetYaxis()->GetXmin(),histo3D->GetYaxis()->GetXmax(), zbins,histo3D->GetZaxis()->GetXmin(),histo3D->GetZaxis()->GetXmax() ); diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlap_Z.C b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlap_Z.C index 9ef1ab30714c0..8be3e5eae9d25 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlap_Z.C +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlap_Z.C @@ -1,387 +1,422 @@ -{ +#include "TROOT.h" +#include "TH1F.h" +#include "TH1D.h" +#include "TF1.h" +#include "TMath.h" +#include "TNtuple.h" +#include "TLegend.h" +#include "TCanvas.h" +#include "TCutG.h" +#include "TFile.h" +#include "TString.h" +#include "TH2.h" +#include "TPad.h" +#include "TPaveText.h" +#include "tdrstyle.C" + + +using namespace ROOT::Math; + +void MultiHistoOverlap_Z(bool switchONfitEta = false, bool switchONfit = false){ gROOT->Reset(); - - #include "TH1F.h" - #include "TNtuple.h" - #include "TLegend.h" - #include "TCanvas.h" - #include "TCutG.h" - #include "TFile.h" - #include "TH2.h" - #include "TPad.h" - //#include "MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C" - - using namespace ROOT::Math; - - // gSystem->Load("libRooFit"); - // using namespace RooFit; - // preamble - TPaveText *cmsprel = new TPaveText(0.19, 0.95, 0.95, 0.99, "NDC"); - cmsprel->SetTextSize(0.03); - cmsprel->SetTextFont(42); - cmsprel->SetFillColor(0); - cmsprel->SetBorderSize(0); - cmsprel->SetMargin(0.01); - cmsprel->SetTextAlign(12); // align left - TString text = "CMS Preliminary 2012"; - cmsprel->AddText(0.01,0.5,text); - TString text2 = "#sqrt{s} = 8 TeV Run2012A TkAlZMuMu |#eta_{#mu}|<2.4"; - cmsprel->AddText(0.4, 0.6, text2); - - TFile *file1 = new TFile("./BiasCheck.root"); - TFile *file2 = new TFile("./BiasCheck_Reference.root"); - - bool switchONfit= false; - bool switchONfitEta= false; - - gROOT->LoadMacro("MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C"); - setTDRStyle(); - - TCanvas* c0 = new TCanvas("c0", "c0",50, 20, 800,600); - TCanvas* c1 = new TCanvas("c1", "c1",50, 20, 800,600); - TCanvas* c2 = new TCanvas("c2", "c2",50, 20, 800,600); - TCanvas* c3 = new TCanvas("c3", "c3",50, 20, 800,600); - TCanvas* c4 = new TCanvas("c4", "c4",50, 20, 800,600); - TCanvas* c5 = new TCanvas("c5", "c5",50, 20, 800,600); - TCanvas* c6 = new TCanvas("c6", "c6",50, 20, 800,600); - - - leg = new TLegend(0.65,0.8,0.93,0.9); // upper right - leg->SetBorderSize(1); - leg->SetFillColor(0); - leg->SetTextFont(42); - - //----------------- CANVAS C0 --------------// - c0->SetFillColor(0); - c0->cd(); - -// Mass VS muon phi plus ------------------------------- - histo1=(TH1D*)file1->Get("MassVsPhiPlus/allHistos/meanHisto"); - histo1->SetLineColor(1); - histo1->SetMarkerColor(1); - histo1->SetMarkerStyle(20); //r.c. - histo1->SetMarkerSize(1.5); - histo1->GetXaxis()->SetTitle("positive muon #phi (rad) "); - histo1->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); - histo1->GetYaxis()->SetRangeUser(89.5,92.0); - histo1->GetXaxis()->SetRangeUser(-3.14,3.14); - histo1->Draw(); - leg->AddEntry(histo1,"this validation","L"); - //--- fit ---------------------------------------------- - TF1 * f1 = new TF1("cosinusoidal1", "[0]+[1]*cos(x+[2])", -3.14, 3.14); - f1->SetParameter(0, 90.5); - f1->SetParameter(1, 1.); - f1->SetParameter(2, 1.); - f1->SetLineColor(1); - if (switchONfit){ - histo1->Fit(f1,"R","same", -3.14, 3.14); - f1->Draw("same"); - } - - //---- 2------------------------------- - histo2=(TH1D*)file2->Get("MassVsPhiPlus/allHistos/meanHisto"); - histo2->SetLineColor(2); - histo2->SetMarkerColor(2); - histo2->Draw("same"); - leg->AddEntry(histo2,"reference","L"); - //--- fit ---------------------------------------------- - TF1 * f2 = new TF1("cosinusoidal2", "[0]+[1]*cos(x+[2])", -3.14, 3.14); - f2->SetParameter(0, 90.5); - f2->SetParameter(1, 1.); - f2->SetParameter(2, 1.); - f2->SetLineColor(2); - if (switchONfit){ - histo2->Fit(f2,"R","same", -3.14, 3.14); - f2->Draw("same"); - } - - - cmsprel->Draw("same"); - leg->Draw("same"); - - c0->SaveAs("MassVsPhiPlus_ALL.png"); - - //----------------- CANVAS C1 --------------// - c1->SetFillColor(0); - c1->cd(); - -// Mass VS muon phi minus ------------------------------- - histo1=(TH1D*)file1->Get("MassVsPhiMinus/allHistos/meanHisto"); - histo1->SetLineColor(1); - histo1->SetMarkerColor(1); - histo1->SetMarkerStyle(20); //r.c. - histo1->SetMarkerSize(1.5); //r.c. - histo1->GetXaxis()->SetTitle("negative muon #phi"); - histo1->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); - histo1->GetYaxis()->SetRangeUser(89.5,92.0); - histo1->GetXaxis()->SetRangeUser(-3.14,3.14); - histo1->Draw(); - //--- fit ---------------------------------------------- - f1 = new TF1("cosinusoidal1", "[0]+[1]*cos(x+[2])", -3.14, 3.14); - f1->SetParameter(0, 90.5); - f1->SetParameter(1, 1.); - f1->SetParameter(2, 1.); - f1->SetLineColor(1); - if (switchONfit){ - histo1->Fit(f1,"R","same", -3.14, 3.14); - f1->Draw("same"); - } - - - //---- 2------------------------------- - histo2=(TH1D*)file2->Get("MassVsPhiMinus/allHistos/meanHisto"); - histo2->SetLineColor(2); - histo2->SetMarkerColor(2); - histo2->Draw("same"); - //--- fit ---------------------------------------------- - f2 = new TF1("cosinusoidal2", "[0]+[1]*cos(x+[2])", -3.14, 3.14); - f2->SetParameter(0, 90.5); - f2->SetParameter(1, 1.); - f2->SetParameter(2, 1.); - f2->SetLineColor(2); - if (switchONfit){ - histo2->Fit(f2,"R","same", -3.14, 3.14); - f2->Draw("same"); - } - - cmsprel->Draw("same"); - leg->Draw("same"); - - c1->SaveAs("MassVsPhiMinus_ALL.png"); - - //----------------- CANVAS C2 --------------// - c2->SetFillColor(0); - c2->cd(); - -// Mass VS muon eta plus ------------------------------- - histo1=(TH1D*)file1->Get("MassVsEtaPlus/allHistos/meanHisto"); - histo1->SetLineColor(1); - histo1->SetMarkerColor(1); - histo1->SetMarkerStyle(20); //r.c. - histo1->SetMarkerSize(1.5); //r.c. - histo1->GetXaxis()->SetTitle("positive muon #eta"); - histo1->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); - histo1->GetYaxis()->SetRangeUser(89.5,92.0); - histo1->GetXaxis()->SetRangeUser(-2.6,2.6); - histo1->Draw(); - //--- fit ---------------------------------------------- - f1 = new TF1("linear1", "[0]+[1]*x", -2.6, 2.6); - f1->SetParameter(0, 90.5); - f1->SetParameter(1, 1.); - f1->SetLineColor(1); - if (switchONfitEta){ - histo1->Fit(f1,"R","same", -2.6, 2.6); - f1->Draw("same"); - } - - - //---- 2------------------------------- - histo2=(TH1D*)file2->Get("MassVsEtaPlus/allHistos/meanHisto"); - histo2->SetLineColor(2); - histo2->SetMarkerColor(2); - histo2->Draw("same"); - //--- fit ---------------------------------------------- - f2 = new TF1("linear2", "[0]+[1]*x", -2.6, 2.6); - f2->SetParameter(0, 90.5); - f2->SetParameter(1, 1.); - f2->SetLineColor(2); - if (switchONfitEta){ - histo2->Fit(f2,"R","same", -2.6, 2.6); - f2->Draw("same"); - } - - cmsprel->Draw("same"); - leg->Draw("same"); - - c2->SaveAs("MassVsEtaPlus_ALL.png"); - - //----------------- CANVAS C3 --------------// - c3->SetFillColor(0); - c3->cd(); - -// Mass VS muon eta minus ------------------------------- - histo1=(TH1D*)file1->Get("MassVsEtaMinus/allHistos/meanHisto"); - histo1->SetLineColor(1); - histo1->SetMarkerColor(1); - histo1->SetMarkerStyle(20); - histo1->SetMarkerSize(1.5); - histo1->GetXaxis()->SetTitle("negative muon #eta"); - histo1->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); - histo1->GetYaxis()->SetRangeUser(89.5,92.0); - histo1->GetXaxis()->SetRangeUser(-2.6,2.6); - histo1->Draw(); - //--- fit ---------------------------------------------- - f1 = new TF1("linear1", "[0]+[1]*x", -2.6, 2.6); - f1->SetParameter(0, 0.); - f1->SetParameter(1, 0.); - f1->SetLineColor(1); - if (switchONfitEta){ - histo1->Fit(f1,"R","same", -2.6, 2.6); - f1->Draw("same"); - } - - - //---- 2------------------------------- - histo2=(TH1D*)file2->Get("MassVsEtaMinus/allHistos/meanHisto"); - histo2->SetLineColor(2); - histo2->SetMarkerColor(2); - histo2->Draw("same"); - //--- fit ---------------------------------------------- - f2 = new TF1("linear2", "[0]+[1]*x", -2.6, 2.6); - f2->SetParameter(0, 0.); - f2->SetParameter(1, 0.); - f2->SetLineColor(2); - if (switchONfitEta){ - histo2->Fit(f2,"R","same", -2.6, 2.6); - f2->Draw("same"); - } - - cmsprel->Draw("same"); - leg->Draw("same"); - - c3->SaveAs("MassVsEtaMinus_ALL.png"); - - //----------------- CANVAS C4 --------------// - c4->SetFillColor(0); - c4->cd(); - -// Mass VS muon eta plus - eta minus ------------------------------- - histo1=(TH1D*)file1->Get("MassVsEtaPlusMinusDiff/allHistos/meanHisto"); - histo1->SetLineColor(1); - histo1->SetMarkerColor(1); - histo1->SetMarkerStyle(20); - histo1->SetMarkerSize(1.5); - histo1->GetXaxis()->SetTitle("#eta pos - #eta neg"); - histo1->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); - histo1->GetYaxis()->SetRangeUser(89.5,92.0); - histo1->GetXaxis()->SetRangeUser(-3.2,3.2); - histo1->Draw(); - //--- fit ---------------------------------------------- - f1 = new TF1("linear1", "[0]+[1]*x", -3.2, 3.2); - f1->SetParameter(0, 0.); - f1->SetParameter(1, 0.); - f1->SetLineColor(1); - if (switchONfitEta){ - histo1->Fit(f1,"R","same", -3.2, 3.2); - f1->Draw("same"); - } - - - //---- 2------------------------------- - histo2=(TH1D*)file2->Get("MassVsEtaPlusMinusDiff/allHistos/meanHisto"); - histo2->SetLineColor(2); - histo2->SetMarkerColor(2); - histo2->Draw("same"); - //--- fit ---------------------------------------------- - f2 = new TF1("linear1", "[0]+[1]*x", -3.2, 3.2); - f2->SetParameter(0, 0.); - f2->SetParameter(1, 0.); - f2->SetLineColor(2); - if (switchONfitEta){ - histo2->Fit(f2,"R","same", -3.2, 3.2); - f2->Draw("same"); - } - - cmsprel->Draw("same"); - leg->Draw("same"); - - c4->SaveAs("MassVsDeltaEta_ALL.png"); - - - //----------------- CANVAS C5 --------------// - c5->SetFillColor(0); - c5->cd(); - -// Mass VS muon cos(theta_CS) ------------------------------- - histo1=(TH1D*)file1->Get("MassVsCosThetaCS/allHistos/meanHisto"); - histo1->SetLineColor(1); - histo1->SetMarkerColor(1); - histo1->SetMarkerStyle(20); - histo1->SetMarkerSize(1.5); - histo1->GetXaxis()->SetTitle("cos#theta_{CS}"); - histo1->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); - histo1->GetYaxis()->SetRangeUser(89.5,92); - histo1->GetXaxis()->SetRangeUser(-1.1,1.1); - histo1->Draw(); - //--- fit ---------------------------------------------- - f1 = new TF1("cosinusoidal1", "[0]+[1]*cos(x+[2])", -1.1, 1.1); - f1->SetParameter(0, 90.5); - f1->SetParameter(1, 1.); - f1->SetParameter(2, 1.); - f1->SetLineColor(6); - if (switchONfit){ - histo1->Fit(f1,"R","same", -1.1, 1.1); - f1->Draw("same"); - } - - - //---- 2------------------------------- - histo2=(TH1D*)file2->Get("MassVsCosThetaCS/allHistos/meanHisto"); - histo2->SetLineColor(2); - histo2->SetMarkerColor(2); - histo2->Draw("same"); - //--- fit ---------------------------------------------- - f2 = new TF1("cosinusoidal2", "[0]+[1]*cos(x+[2])", -1.1, 1.1); - f2->SetParameter(0, 90.5); - f2->SetParameter(1, 1.); - f2->SetParameter(2, 1.); - f2->SetLineColor(2); - if (switchONfit){ - histo2->Fit(f2,"R","same", -1.1, 1.1); - f2->Draw("same"); - } - - cmsprel->Draw("same"); - leg->Draw("same"); - - c5->SaveAs("MassVsCosThetaCS_ALL.png"); - - //----------------- CANVAS C6 --------------// - c6->SetFillColor(0); - c6->cd(); - -// Mass VS muon cos(theta_CS) ------------------------------- - histo1=(TH1D*)file1->Get("MassVsPhiCS/allHistos/meanHisto"); - histo1->SetLineColor(1); - histo1->SetMarkerColor(1); - histo1->SetMarkerStyle(20); - histo1->SetMarkerSize(1.5); - histo1->GetXaxis()->SetTitle("#phi_{CS}"); - histo1->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); - histo1->GetYaxis()->SetRangeUser(89.5,92); - histo1->GetXaxis()->SetRangeUser(-3.14,3.14); - histo1->Draw(); - //--- fit ---------------------------------------------- - f1 = new TF1("cosinusoidal1", "[0]+[1]*cos(x+[2])", -3.14, 3.14); - f1->SetParameter(0, 90.5); - f1->SetParameter(1, 1.); - f1->SetParameter(2, 1.); - f1->SetLineColor(6); - if (switchONfit){ - histo1->Fit(f1,"R","same", -3.14, 3.14); - f1->Draw("same"); - } - - - //---- 2------------------------------- - histo2=(TH1D*)file2->Get("MassVsPhiCS/allHistos/meanHisto"); - histo2->SetLineColor(2); - histo2->SetMarkerColor(2); - histo2->Draw("same"); - //--- fit ---------------------------------------------- - f2 = new TF1("cosinusoidal2", "[0]+[1]*cos(x+[2])", -3.14, 3.14); - f2->SetParameter(0, 90.5); - f2->SetParameter(1, 1.); - f2->SetParameter(2, 1.); - f2->SetLineColor(2); - if (switchONfit){ - histo2->Fit(f2,"R","same", -3.14, 3.14); - f2->Draw("same"); - } - - cmsprel->Draw("same"); - leg->Draw("same"); - - c6->SaveAs("MassVsPhiCS_ALL.png"); - + setTDRStyle(); + + TString strValidation_label = "Run 2015B (251604-251642)"; + TString strReference_label = "DY 2012 Ideal"; + + // preamble + TPaveText *cmsPlotTitle = new TPaveText(0.15, 0.93, 0.85, 1, "brNDC"); + cmsPlotTitle->SetBorderSize(0); + cmsPlotTitle->SetFillStyle(0); + cmsPlotTitle->SetTextAlign(12); + cmsPlotTitle->SetTextFont(42); + cmsPlotTitle->SetTextSize(0.045); + TText* text = cmsPlotTitle->AddText(0.025, 0.45, "#font[61]{CMS}"); + text->SetTextSize(0.044); + text = cmsPlotTitle->AddText(0.165, 0.42, "#font[52]{Preliminary}"); + text->SetTextSize(0.0315); + TString cErgTev = "#font[42]{ TkAl Z#rightarrow#mu#mu (|#eta_{#mu}|<2.4) 13 TeV}"; + text = cmsPlotTitle->AddText(0.537, 0.40, cErgTev); + text->SetTextSize(0.0315); + + TFile* file[2]; + file[0] = new TFile("./BiasCheck.root", "read"); + file[1] = new TFile("./BiasCheck_Reference.root", "read"); + + int pIndex; + TH1D* histo[2][7]; + TF1* hfit[2][7]; + TCanvas* c[7]; + for (int i=0; i<7; i++){ + TString cname = Form("c%i", i); + c[i] = new TCanvas(cname, cname, 8, 30, 800, 800); + gStyle->SetOptStat(0); + c[i]->SetFillColor(0); + c[i]->SetBorderMode(0); + c[i]->SetBorderSize(2); + c[i]->SetTickx(1); + c[i]->SetTicky(1); + c[i]->SetLeftMargin(0.17); + c[i]->SetRightMargin(0.05); + c[i]->SetTopMargin(0.07); + c[i]->SetBottomMargin(0.13); + c[i]->SetFrameFillStyle(0); + c[i]->SetFrameBorderMode(0); + c[i]->SetFrameFillStyle(0); + c[i]->SetFrameBorderMode(0); + } + + float lxmin = 0.22, lxwidth = 0.38; + float lymax = 0.9, lywidth = 0.15; + float lxmax = lxmin + lxwidth; + float lymin = lymax - lywidth; + TLegend* leg = new TLegend(lxmin, lymin, lxmax, lymax); + leg->SetBorderSize(0); + leg->SetTextFont(42); + leg->SetTextSize(0.04); + leg->SetLineColor(1); + leg->SetLineStyle(1); + leg->SetLineWidth(1); + leg->SetFillColor(0); + leg->SetFillStyle(0); + + //----------------- CANVAS C0 --------------// + pIndex=0; + c[pIndex]->cd(); + + TString histoName[7] ={ + "MassVsPhiPlus/allHistos/meanHisto", + "MassVsPhiMinus/allHistos/meanHisto", + "MassVsEtaPlus/allHistos/meanHisto", + "MassVsEtaMinus/allHistos/meanHisto", + "MassVsEtaPlusMinusDiff/allHistos/meanHisto", + "MassVsCosThetaCS/allHistos/meanHisto", + "MassVsPhiCS/allHistos/meanHisto" + }; + double minmax_plot[7][2]={ { 0 } }; + for (int iP=0; iP<7; iP++){ + double absMin=9e9; + double absMax = -9e9; + for (int f=0; f<2; f++){ + histo[f][iP]=(TH1D*)file[f]->Get(histoName[iP]); + + histo[f][iP]->SetTitle(""); + histo[f][iP]->GetXaxis()->SetLabelFont(42); + histo[f][iP]->GetXaxis()->SetLabelOffset(0.007); + histo[f][iP]->GetXaxis()->SetLabelSize(0.04); + histo[f][iP]->GetXaxis()->SetTitleSize(0.06); + histo[f][iP]->GetXaxis()->SetTitleOffset(0.9); + histo[f][iP]->GetXaxis()->SetTitleFont(42); + histo[f][iP]->GetYaxis()->SetNdivisions(505); + histo[f][iP]->GetYaxis()->SetLabelFont(42); + histo[f][iP]->GetYaxis()->SetLabelOffset(0.007); + histo[f][iP]->GetYaxis()->SetLabelSize(0.04); + histo[f][iP]->GetYaxis()->SetTitleSize(0.06); + histo[f][iP]->GetYaxis()->SetTitleOffset(1.2); + histo[f][iP]->GetYaxis()->SetTitleFont(42); + + histo[f][iP]->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); + histo[f][iP]->SetLineWidth(1); + histo[f][iP]->SetMarkerSize(1.2); + if (f==0){ + histo[f][iP]->SetLineColor(kBlack); + histo[f][iP]->SetMarkerColor(kBlack); + histo[f][iP]->SetMarkerStyle(20); + } + else{ + histo[f][iP]->SetLineColor(kRed); + histo[f][iP]->SetMarkerColor(kRed); + histo[f][iP]->SetMarkerStyle(1); + } + for (int bin=1; bin<=histo[f][iP]->GetNbinsX(); bin++){ + double bincontent = histo[f][iP]->GetBinContent(bin); + double binerror = histo[f][iP]->GetBinError(bin); + if (binerror==0 && bincontent==0) continue; + absMin = min(absMin, bincontent - binerror); + absMax = max(absMax, bincontent + binerror); + } + } + minmax_plot[iP][0] = absMin/1.1; + minmax_plot[iP][1] = absMax*1.1; + for (int f=0; f<2; f++) histo[f][iP]->GetYaxis()->SetRangeUser(minmax_plot[iP][0], minmax_plot[iP][1]); + } + + // Mass VS muon phi plus ------------------------------- + histo[0][pIndex]->GetXaxis()->SetTitle("#phi_{#mu+}"); + histo[0][pIndex]->GetXaxis()->SetRangeUser(-TMath::Pi(), TMath::Pi()); + histo[0][pIndex]->Draw(); + leg->AddEntry(histo[0][pIndex], strValidation_label, "l"); + //--- fit ---------------------------------------------- + hfit[0][pIndex] = new TF1("cosinusoidal1", "[0]+[1]*cos(x+[2])", -TMath::Pi(), TMath::Pi()); + hfit[0][pIndex]->SetParameter(0, 90.5); + hfit[0][pIndex]->SetParameter(1, 1.); + hfit[0][pIndex]->SetParameter(2, 1.); + hfit[0][pIndex]->SetLineColor(1); + if (switchONfit){ + histo[0][pIndex]->Fit(hfit[0][pIndex], "R", "same", -TMath::Pi(), TMath::Pi()); + hfit[0][pIndex]->Draw("same"); + } + + //---- 2------------------------------- + histo[1][pIndex]->Draw("same"); + leg->AddEntry(histo[1][pIndex], strReference_label, "l"); + //--- fit ---------------------------------------------- + hfit[1][pIndex] = new TF1("cosinusoidal2", "[0]+[1]*cos(x+[2])", -TMath::Pi(), TMath::Pi()); + hfit[1][pIndex]->SetParameter(0, 90.5); + hfit[1][pIndex]->SetParameter(1, 1.); + hfit[1][pIndex]->SetParameter(2, 1.); + hfit[1][pIndex]->SetLineColor(2); + if (switchONfit){ + histo[1][pIndex]->Fit(hfit[1][pIndex], "R", "same", -TMath::Pi(), TMath::Pi()); + hfit[1][pIndex]->Draw("same"); + } + + leg->Draw("same"); + cmsPlotTitle->Draw("same"); + c[pIndex]->RedrawAxis(); + c[pIndex]->Modified(); + c[pIndex]->Update(); + c[pIndex]->SaveAs("MassVsPhiPlus_ALL.png"); + + //----------------- CANVAS C1 --------------// + pIndex=1; + c[pIndex]->cd(); + + // Mass VS muon phi minus ------------------------------- + histo[0][pIndex]->GetXaxis()->SetTitle("#phi_{#mu-}"); + histo[0][pIndex]->GetXaxis()->SetRangeUser(-TMath::Pi(), TMath::Pi()); + histo[0][pIndex]->Draw(); + //--- fit ---------------------------------------------- + hfit[0][pIndex] = new TF1("cosinusoidal1", "[0]+[1]*cos(x+[2])", -TMath::Pi(), TMath::Pi()); + hfit[0][pIndex]->SetParameter(0, 90.5); + hfit[0][pIndex]->SetParameter(1, 1.); + hfit[0][pIndex]->SetParameter(2, 1.); + hfit[0][pIndex]->SetLineColor(1); + if (switchONfit){ + histo[0][pIndex]->Fit(hfit[0][pIndex], "R", "same", -TMath::Pi(), TMath::Pi()); + hfit[0][pIndex]->Draw("same"); + } + + + //---- 2------------------------------- + histo[1][pIndex]->Draw("same"); + //--- fit ---------------------------------------------- + hfit[1][pIndex] = new TF1("cosinusoidal2", "[0]+[1]*cos(x+[2])", -TMath::Pi(), TMath::Pi()); + hfit[1][pIndex]->SetParameter(0, 90.5); + hfit[1][pIndex]->SetParameter(1, 1.); + hfit[1][pIndex]->SetParameter(2, 1.); + hfit[1][pIndex]->SetLineColor(2); + if (switchONfit){ + histo[1][pIndex]->Fit(hfit[1][pIndex], "R", "same", -TMath::Pi(), TMath::Pi()); + hfit[1][pIndex]->Draw("same"); + } + + leg->Draw("same"); + cmsPlotTitle->Draw("same"); + c[pIndex]->RedrawAxis(); + c[pIndex]->Modified(); + c[pIndex]->Update(); + c[pIndex]->SaveAs("MassVsPhiMinus_ALL.png"); + + //----------------- CANVAS C2 --------------// + pIndex=2; + c[pIndex]->cd(); + + // Mass VS muon eta plus ------------------------------- + histo[0][pIndex]->GetXaxis()->SetTitle("#eta_{#mu+}"); + histo[0][pIndex]->GetXaxis()->SetRangeUser(-2.6, 2.6); + histo[0][pIndex]->Draw(); + //--- fit ---------------------------------------------- + hfit[0][pIndex] = new TF1("linear1", "[0]+[1]*x", -2.6, 2.6); + hfit[0][pIndex]->SetParameter(0, 90.5); + hfit[0][pIndex]->SetParameter(1, 1.); + hfit[0][pIndex]->SetLineColor(1); + if (switchONfitEta){ + histo[0][pIndex]->Fit(hfit[0][pIndex], "R", "same", -2.6, 2.6); + hfit[0][pIndex]->Draw("same"); + } + + + //---- 2------------------------------- + histo[1][pIndex]->Draw("same"); + //--- fit ---------------------------------------------- + hfit[1][pIndex] = new TF1("linear2", "[0]+[1]*x", -2.6, 2.6); + hfit[1][pIndex]->SetParameter(0, 90.5); + hfit[1][pIndex]->SetParameter(1, 1.); + hfit[1][pIndex]->SetLineColor(2); + if (switchONfitEta){ + histo[1][pIndex]->Fit(hfit[1][pIndex], "R", "same", -2.6, 2.6); + hfit[1][pIndex]->Draw("same"); + } + + leg->Draw("same"); + cmsPlotTitle->Draw("same"); + c[pIndex]->RedrawAxis(); + c[pIndex]->Modified(); + c[pIndex]->Update(); + c[pIndex]->SaveAs("MassVsEtaPlus_ALL.png"); + + //----------------- CANVAS C3 --------------// + pIndex=3; + c[pIndex]->cd(); + + // Mass VS muon eta minus ------------------------------- + histo[0][pIndex]->GetXaxis()->SetTitle("#eta_{#mu-}"); + histo[0][pIndex]->GetXaxis()->SetRangeUser(-2.6, 2.6); + histo[0][pIndex]->Draw(); + //--- fit ---------------------------------------------- + hfit[0][pIndex] = new TF1("linear1", "[0]+[1]*x", -2.6, 2.6); + hfit[0][pIndex]->SetParameter(0, 0.); + hfit[0][pIndex]->SetParameter(1, 0.); + hfit[0][pIndex]->SetLineColor(1); + if (switchONfitEta){ + histo[0][pIndex]->Fit(hfit[0][pIndex], "R", "same", -2.6, 2.6); + hfit[0][pIndex]->Draw("same"); + } + + + //---- 2------------------------------- + histo[1][pIndex]->Draw("same"); + //--- fit ---------------------------------------------- + hfit[1][pIndex] = new TF1("linear2", "[0]+[1]*x", -2.6, 2.6); + hfit[1][pIndex]->SetParameter(0, 0.); + hfit[1][pIndex]->SetParameter(1, 0.); + hfit[1][pIndex]->SetLineColor(2); + if (switchONfitEta){ + histo[1][pIndex]->Fit(hfit[1][pIndex], "R", "same", -2.6, 2.6); + hfit[1][pIndex]->Draw("same"); + } + + leg->Draw("same"); + cmsPlotTitle->Draw("same"); + c[pIndex]->RedrawAxis(); + c[pIndex]->Modified(); + c[pIndex]->Update(); + c[pIndex]->SaveAs("MassVsEtaMinus_ALL.png"); + + //----------------- CANVAS C4 --------------// + pIndex=4; + c[pIndex]->cd(); + + // Mass VS muon eta plus - eta minus ------------------------------- + histo[0][pIndex]->GetXaxis()->SetTitle("#eta_{#mu+} - #eta_{#mu-}"); + histo[0][pIndex]->GetXaxis()->SetRangeUser(-3.2, 3.2); + histo[0][pIndex]->Draw(); + //--- fit ---------------------------------------------- + hfit[0][pIndex] = new TF1("linear1", "[0]+[1]*x", -3.2, 3.2); + hfit[0][pIndex]->SetParameter(0, 0.); + hfit[0][pIndex]->SetParameter(1, 0.); + hfit[0][pIndex]->SetLineColor(1); + if (switchONfitEta){ + histo[0][pIndex]->Fit(hfit[0][pIndex], "R", "same", -3.2, 3.2); + hfit[0][pIndex]->Draw("same"); + } + + + //---- 2------------------------------- + histo[1][pIndex]->Draw("same"); + //--- fit ---------------------------------------------- + hfit[1][pIndex] = new TF1("linear1", "[0]+[1]*x", -3.2, 3.2); + hfit[1][pIndex]->SetParameter(0, 0.); + hfit[1][pIndex]->SetParameter(1, 0.); + hfit[1][pIndex]->SetLineColor(2); + if (switchONfitEta){ + histo[1][pIndex]->Fit(hfit[1][pIndex], "R", "same", -3.2, 3.2); + hfit[1][pIndex]->Draw("same"); + } + + leg->Draw("same"); + cmsPlotTitle->Draw("same"); + c[pIndex]->RedrawAxis(); + c[pIndex]->Modified(); + c[pIndex]->Update(); + c[pIndex]->SaveAs("MassVsDeltaEta_ALL.png"); + + + //----------------- CANVAS C5 --------------// + pIndex=5; + c[pIndex]->cd(); + + // Mass VS muon cos(theta_CS) ------------------------------- + histo[0][pIndex]->GetXaxis()->SetTitle("cos #theta_{CS}"); + histo[0][pIndex]->GetXaxis()->SetRangeUser(-1.1, 1.1); + histo[0][pIndex]->Draw(); + //--- fit ---------------------------------------------- + hfit[0][pIndex] = new TF1("cosinusoidal1", "[0]+[1]*cos(x+[2])", -1.1, 1.1); + hfit[0][pIndex]->SetParameter(0, 90.5); + hfit[0][pIndex]->SetParameter(1, 1.); + hfit[0][pIndex]->SetParameter(2, 1.); + hfit[0][pIndex]->SetLineColor(6); + if (switchONfit){ + histo[0][pIndex]->Fit(hfit[0][pIndex], "R", "same", -1.1, 1.1); + hfit[0][pIndex]->Draw("same"); + } + + + //---- 2------------------------------- + histo[1][pIndex]->Draw("same"); + //--- fit ---------------------------------------------- + hfit[1][pIndex] = new TF1("cosinusoidal2", "[0]+[1]*cos(x+[2])", -1.1, 1.1); + hfit[1][pIndex]->SetParameter(0, 90.5); + hfit[1][pIndex]->SetParameter(1, 1.); + hfit[1][pIndex]->SetParameter(2, 1.); + hfit[1][pIndex]->SetLineColor(2); + if (switchONfit){ + histo[1][pIndex]->Fit(hfit[1][pIndex], "R", "same", -1.1, 1.1); + hfit[1][pIndex]->Draw("same"); + } + + leg->Draw("same"); + cmsPlotTitle->Draw("same"); + c[pIndex]->RedrawAxis(); + c[pIndex]->Modified(); + c[pIndex]->Update(); + c[pIndex]->SaveAs("MassVsCosThetaCS_ALL.png"); + + //----------------- CANVAS C6 --------------// + pIndex=6; + c[pIndex]->cd(); + + // Mass VS muon cos(theta_CS) ------------------------------- + histo[0][pIndex]->GetXaxis()->SetTitle("#phi_{CS}"); + histo[0][pIndex]->GetXaxis()->SetRangeUser(-TMath::Pi(), TMath::Pi()); + histo[0][pIndex]->Draw(); + //--- fit ---------------------------------------------- + hfit[0][pIndex] = new TF1("cosinusoidal1", "[0]+[1]*cos(x+[2])", -TMath::Pi(), TMath::Pi()); + hfit[0][pIndex]->SetParameter(0, 90.5); + hfit[0][pIndex]->SetParameter(1, 1.); + hfit[0][pIndex]->SetParameter(2, 1.); + hfit[0][pIndex]->SetLineColor(6); + if (switchONfit){ + histo[0][pIndex]->Fit(hfit[0][pIndex], "R", "same", -TMath::Pi(), TMath::Pi()); + hfit[0][pIndex]->Draw("same"); + } + + + //---- 2------------------------------- + histo[1][pIndex]->Draw("same"); + //--- fit ---------------------------------------------- + hfit[1][pIndex] = new TF1("cosinusoidal2", "[0]+[1]*cos(x+[2])", -TMath::Pi(), TMath::Pi()); + hfit[1][pIndex]->SetParameter(0, 90.5); + hfit[1][pIndex]->SetParameter(1, 1.); + hfit[1][pIndex]->SetParameter(2, 1.); + hfit[1][pIndex]->SetLineColor(2); + if (switchONfit){ + histo[1][pIndex]->Fit(hfit[1][pIndex], "R", "same", -TMath::Pi(), TMath::Pi()); + hfit[1][pIndex]->Draw("same"); + } + + leg->Draw("same"); + cmsPlotTitle->Draw("same"); + c[pIndex]->RedrawAxis(); + c[pIndex]->Modified(); + c[pIndex]->Update(); + c[pIndex]->SaveAs("MassVsPhiCS_ALL.png"); + + for (int i=0; i<7; i++){ + c[i]->Close(); + for (int j=0; j<2; j++) delete hfit[j][i]; + } + delete leg; + for(int f=1;f>=0;f--) file[f]->Close(); } diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C index 7df9f132d7a32..5798bd26991ff 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C @@ -1,7 +1,7 @@ #include "TStyle.h" // tdrGrid: Turns the grid lines on (true) or off (false) -extern TStyle* tdrStyle; +TStyle* tdrStyle; void tdrGrid(bool gridOn) { tdrStyle->SetPadGridX(gridOn); From b7e9777c8503c6b614927981ae37847ac8ef2c22 Mon Sep 17 00:00:00 2001 From: usarica Date: Thu, 3 Sep 2015 03:59:44 +0200 Subject: [PATCH 02/34] Fix contingency of fits in different slices --- .../TkAlAllInOneTool/zMuMuValidation.py | 1 + .../zMuMuValidationTemplates.py | 5 +- .../test/Macros/RooFit/FitSlices.cc | 101 +++--- .../test/Macros/RooFit/FitWithRooFit.cc | 249 +++++++++------ .../test/Macros/RooFit/FitXslices.cc | 255 ++++++++------- .../Macros/RooFit/MultiHistoOverlapAll_Z.C | 298 ++++++++++++++++++ 6 files changed, 633 insertions(+), 276 deletions(-) create mode 100644 MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py index 8714a4fc8a9a9..6567201d585a1 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py @@ -51,6 +51,7 @@ def getRepMap(self, alignment = None): ",genSimRecoPlots.root" ",FitParameters.txt"), "eosdir": os.path.join(self.general["eosdir"], "%s/%s/%s" % (self.outputBaseName, self.name, alignment.name)), + "workingdir": ".oO[datadir]Oo./%s/%s/%s" % (self.outputBaseName, self.name, alignment.name), "plotsdir": ".oO[datadir]Oo./%s/%s/%s/plots" % (self.outputBaseName, self.name, alignment.name), }) return repMap diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py index 5efb9e10455fa..de7da5eb6400a 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py @@ -223,7 +223,7 @@ cd $cwd rfmkdir -p .oO[datadir]Oo. - +rfmkdir -p .oO[workingdir]Oo. rfmkdir -p .oO[logdir]Oo. rm -f .oO[logdir]Oo./*.stdout rm -f .oO[logdir]Oo./*.stderr @@ -251,7 +251,7 @@ cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc . cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitMass1D.cc . -root -q -b -ls "CompareBiasZValidation.cc+(\\\"\\\")" +root -q -b -l "CompareBiasZValidation.cc+(\\\"\\\")" cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C . cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlap_.oO[resonance]Oo..C . @@ -263,6 +263,7 @@ for RootOutputFile in $(ls *root ) do cmsStage -f ${RootOutputFile} /store/caf/user/$USER/.oO[eosdir]Oo./ + rfcp ${RootOutputFile} .oO[workingdir]Oo. done mkdir -p .oO[plotsdir]Oo. diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitSlices.cc b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitSlices.cc index 66e807e31645d..029db7d8dc411 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitSlices.cc +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitSlices.cc @@ -26,41 +26,40 @@ class FitSlices // const TString & histoBaseName = "hRecBestResVSMu", const TString & histoBaseTitle = "MassVs") = 0; void fitSlice(const TString & histoName, const TString & dirName, - const double & xMean, const double & xMin, const double & xMax, - const double & sigma, const double & sigmaMin, const double & sigmaMax, - const TString & signalType, const TString & backgroundType, - TFile * inputFile, TDirectory * outputFile) + const double & xMean, const double & xMin, const double & xMax, + const double & sigma, const double & sigmaMin, const double & sigmaMax, + const TString & signalType, const TString & backgroundType, + TFile * inputFile, TDirectory * outputFile) { FitXslices fitXslices; fitXslices.fitter()->useChi2_ = useChi2; - fitXslices.fitter()->initMean( xMean, xMin, xMax ); - fitXslices.fitter()->initSigma( sigma, sigmaMin, sigmaMax ); - fitXslices.fitter()->initSigma2( sigma2, sigma2Min, sigma2Max ); + fitXslices.fitter()->initMean(xMean, xMin, xMax); + fitXslices.fitter()->initSigma(sigma, sigmaMin, sigmaMax); + fitXslices.fitter()->initSigma2(sigma2, sigma2Min, sigma2Max); fitXslices.fitter()->initAlpha(1.5, 0.05, 10.); fitXslices.fitter()->initN(1, 0.01, 100.); fitXslices.fitter()->initFGCB(0.4, 0., 1.); std::cout << "Fit slices: initialization complete" << std::endl; - + //r.c. patch -------------- if (histoName=="hRecBestResVSMu_MassVSEtaPhiPlus" || histoName=="hRecBestResVSMu_MassVSEtaPhiMinus" || - histoName=="hRecBestResVSMu_MassVSPhiPlusPhiMinus" || histoName=="hRecBestResVSMu_MassVSEtaPlusEtaMinus" - ) - { - TH3* histoPt3 = (TH3*)inputFile->FindObjectAny(histoName); - outputFile->mkdir(dirName); - outputFile->cd(dirName); + histoName=="hRecBestResVSMu_MassVSPhiPlusPhiMinus" || histoName=="hRecBestResVSMu_MassVSEtaPlusEtaMinus") + { + TH3* histoPt3 = (TH3*)inputFile->FindObjectAny(histoName); + outputFile->mkdir(dirName); + outputFile->cd(dirName); - // histoPt3 = rebin3D(histoPt3); - fitXslices(histoPt3, xMin, xMax, signalType, backgroundType, rebinZ); + // histoPt3 = rebin3D(histoPt3); + fitXslices(histoPt3, xMin, xMax, signalType, backgroundType, rebinZ); - // histoPt3->RebinX(rebinX); - // histoPt3->RebinY(rebinX); - // histoPt3->RebinY(rebinY); - // (histoPt3->DoProject2D())->RebinX(rebinX); - // (histoPt3->DoProject2D())->RebinY(rebinY); - } + // histoPt3->RebinX(rebinX); + // histoPt3->RebinY(rebinX); + // histoPt3->RebinY(rebinY); + // (histoPt3->DoProject2D())->RebinX(rebinX); + // (histoPt3->DoProject2D())->RebinY(rebinY); + } else { TH2* histoPt2 = (TH2*)inputFile->FindObjectAny(histoName); histoPt2->RebinX(rebinX); @@ -70,9 +69,8 @@ class FitSlices outputFile->mkdir(dirName); outputFile->cd(dirName); fitXslices(histoPt2, xMin, xMax, signalType, backgroundType, rebinZ); - } - - } + } + } unsigned int rebinX; unsigned int rebinY; unsigned int rebinZ; @@ -84,46 +82,45 @@ class FitSlices unsigned int zbins=histo3D->GetNbinsZ(); // std::cout<< "number of bins in z (and tempHisto) --> "< twoDprojection; - for(unsigned int z=1;z(histo3D->GetZaxis());ax_tmp->SetRange(z, z); + for (unsigned int z=1; z(histo3D->GetZaxis()); ax_tmp->SetRange(z, z); TH2* tempHisto= (TH2*)histo3D->Project3D("xy"); std::stringstream ss; ss << z; tempHisto->SetName(TString(tempHisto->GetName())+ss.str()); tempHisto->RebinX(rebinX); tempHisto->RebinY(rebinY); - twoDprojection.insert(std::make_pair(z,tempHisto)); + twoDprojection.insert(std::make_pair(z, tempHisto)); } unsigned int xbins, ybins; - TH3* rebinned3D = (TH3*) new TH3F(TString(histo3D->GetName())+"_rebinned",histo3D->GetTitle(), - xbins,histo3D->GetXaxis()->GetXmin(),histo3D->GetXaxis()->GetXmax(), - ybins,histo3D->GetYaxis()->GetXmin(),histo3D->GetYaxis()->GetXmax(), - zbins,histo3D->GetZaxis()->GetXmin(),histo3D->GetZaxis()->GetXmax() ); - if(twoDprojection.size()!=0) + TH3* rebinned3D = (TH3*) new TH3F(TString(histo3D->GetName())+"_rebinned", histo3D->GetTitle(), + xbins, histo3D->GetXaxis()->GetXmin(), histo3D->GetXaxis()->GetXmax(), + ybins, histo3D->GetYaxis()->GetXmin(), histo3D->GetYaxis()->GetXmax(), + zbins, histo3D->GetZaxis()->GetXmin(), histo3D->GetZaxis()->GetXmax()); + if (twoDprojection.size()!=0) + { + xbins=twoDprojection[1]->GetNbinsX(); + ybins=twoDprojection[1]->GetNbinsY(); + //std::cout<< "number of bins in x --> "< "<GetNbinsX(); - ybins=twoDprojection[1]->GetNbinsY(); - //std::cout<< "number of bins in x --> "< "< "< "<Fill(x,y,twoDprojection[z]->GetBinContent(x,y)); - } - - } + for (unsigned int y=1; y "< "<Fill(x, y, twoDprojection[z]->GetBinContent(x, y)); + } + + } - } } + } return rebinned3D; } - }; #endif diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc index 26334e6285146..a4582089ed2cb 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc @@ -56,11 +56,14 @@ class FitWithRooFit public: FitWithRooFit() : - useChi2_(false), mean_(0), mean2_(0), mean3_(0), sigma_(0), sigma2_(0), sigma3_(0), gamma_(0), gaussFrac_(0), gaussFrac2_(0), + useChi2_(false), + mean_(0), mean2_(0), mean3_(0), + sigma_(0), sigma2_(0), sigma3_(0), + gamma_(0), gaussFrac_(0), gaussFrac2_(0), expCoeffa0_(0), expCoeffa1_(0), expCoeffa2_(0), fsig_(0), - a0_(0), a1_(0), a2_(0), a3_(0), a4_(0), a5_(0), a6_(0), alpha_(0), n_(0), fGCB_(0) - { - } + a0_(0), a1_(0), a2_(0), a3_(0), a4_(0), a5_(0), a6_(0), + alpha_(0), n_(0), fGCB_(0) + {} // Import TH1 histogram into a RooDataHist rooPair importTH1(TH1 * histo, const double & inputXmin, const double & inputXmax) @@ -85,7 +88,7 @@ class FitWithRooFit RooDataHist * dh = imported.second; // Make plot of binned dataset showing Poisson error bars (RooFit default) - RooPlot* frame = x.frame(RooFit::Title("Imported TH1 with Poisson error bars")) ; + RooPlot* frame = x.frame(RooFit::Title("Imported TH1 with Poisson error bars")); frame->SetName(TString(histo->GetName())+"_frame"); dh->plotOn(frame); @@ -97,13 +100,9 @@ class FitWithRooFit // Fit the composite model // ----------------------- // Fit with likelihood - if( !useChi2_ ) { - if( sumW2Error ) { - model->fitTo(*dh, RooFit::Save(), RooFit::SumW2Error(kTRUE)); - } - else { - model->fitTo(*dh); - } + if (!useChi2_) { + if (sumW2Error) model->fitTo(*dh, RooFit::Save(), RooFit::SumW2Error(kTRUE)); + else model->fitTo(*dh); } // Fit with chi^2 else { @@ -128,8 +127,8 @@ class FitWithRooFit // If histogram has custom error (i.e. its contents is does not originate from a Poisson process // but e.g. is a sum of weighted events) you can data with symmetric 'sum-of-weights' error instead // (same error bars as shown by ROOT) - RooPlot* frame2 = x.frame(RooFit::Title("Imported TH1 with internal errors")) ; - dh->plotOn(frame2,RooFit::DataError(RooAbsData::SumW2)) ; + RooPlot* frame2 = x.frame(RooFit::Title("Imported TH1 with internal errors")); + dh->plotOn(frame2, RooFit::DataError(RooAbsData::SumW2)); model->plotOn(frame2); model->plotOn(frame2, RooFit::Components(backgroundType), RooFit::LineColor(kRed)); model->paramOn(frame2, RooFit::Label("fit result"), RooFit::Format("NEU", RooFit::AutoPrecision(2))); @@ -159,240 +158,262 @@ class FitWithRooFit { if( mean_ != 0 ) delete mean_; mean_ = new RooRealVar(name, title, value, min, max); + initVal_mean = value; } - void initMean2(const double & value, const double & min, const double & max, const TString & name = "mean2", const TString & title = "mean2") { if( mean2_ != 0 ) delete mean2_; mean2_ = new RooRealVar(name, title, value, min, max); + initVal_mean2 = value; } - void initMean3(const double & value, const double & min, const double & max, const TString & name = "mean3", const TString & title = "mean3") { if( mean3_ != 0 ) delete mean3_; mean3_ = new RooRealVar(name, title, value, min, max); + initVal_mean3 = value; } - - void initSigma(const double & value, const double & min, const double & max, const TString & name = "sigma", const TString & title = "sigma") { if( sigma_ != 0 ) delete sigma_; sigma_ = new RooRealVar(name, title, value, min, max); + initVal_sigma = value; } - void initSigma2(const double & value, const double & min, const double & max, const TString & name = "sigma2", const TString & title = "sigma2") { if( sigma2_ != 0 ) delete sigma2_; sigma2_ = new RooRealVar(name, title, value, min, max); + initVal_sigma2 = value; } - - void initSigma3(const double & value, const double & min, const double & max, const TString & name = "sigma3", const TString & title = "sigma3") { if( sigma3_ != 0 ) delete sigma3_; sigma3_ = new RooRealVar(name, title, value, min, max); + initVal_sigma3 = value; } - void initGamma(const double & value, const double & min, const double & max, const TString & name = "gamma", const TString & title = "gamma") { if( gamma_ != 0 ) delete gamma_; gamma_ = new RooRealVar(name, title, value, min, max); + initVal_gamma = value; } - void initGaussFrac(const double & value, const double & min, const double & max, const TString & name = "GaussFrac", const TString & title = "GaussFrac") { if( gaussFrac_ != 0 ) delete gaussFrac_; gaussFrac_ = new RooRealVar(name, title, value, min, max); + initVal_gaussFrac = value; } - void initGaussFrac2(const double & value, const double & min, const double & max, const TString & name = "GaussFrac2", const TString & title = "GaussFrac2") { if( gaussFrac2_ != 0 ) delete gaussFrac2_; gaussFrac2_ = new RooRealVar(name, title, value, min, max); + initVal_gaussFrac2 = value; } - void initExpCoeffA0(const double & value, const double & min, const double & max, const TString & name = "expCoeffa0", const TString & title = "expCoeffa0") { if( expCoeffa0_ != 0 ) delete expCoeffa0_; expCoeffa0_ = new RooRealVar(name, title, value, min, max); + initVal_expCoeffa0 = value; } void initExpCoeffA1(const double & value, const double & min, const double & max, const TString & name = "expCoeffa1", const TString & title = "expCoeffa1") { if( expCoeffa1_ != 0 ) delete expCoeffa1_; expCoeffa1_ = new RooRealVar(name, title, value, min, max); + initVal_expCoeffa1 = value; } void initExpCoeffA2(const double & value, const double & min, const double & max, const TString & name = "expCoeffa2", const TString & title = "expCoeffa2") { if( expCoeffa2_ != 0 ) delete expCoeffa2_; expCoeffa2_ = new RooRealVar(name, title, value, min, max); + initVal_expCoeffa2 = value; } - void initFsig(const double & value, const double & min, const double & max, const TString & name = "fsig", const TString & title = "signal fraction") { if( fsig_ != 0 ) delete fsig_; fsig_ = new RooRealVar(name, title, value, min, max); + initVal_fsig = value; } - void initA0(const double & value, const double & min, const double & max, const TString & name = "a0", const TString & title = "a0") { if( a0_ != 0 ) delete a0_; a0_ = new RooRealVar(name, title, value, min, max); + initVal_a0 = value; } - void initA1(const double & value, const double & min, const double & max, const TString & name = "a1", const TString & title = "a1") { if( a1_ != 0 ) delete a1_; a1_ = new RooRealVar(name, title, value, min, max); + initVal_a1 = value; } - void initA2(const double & value, const double & min, const double & max, const TString & name = "a2", const TString & title = "a2") { if( a2_ != 0 ) delete a2_; a2_ = new RooRealVar(name, title, value, min, max); + initVal_a2 = value; } - void initA3(const double & value, const double & min, const double & max, const TString & name = "a3", const TString & title = "a3") { if( a3_ != 0 ) delete a3_; a3_ = new RooRealVar(name, title, value, min, max); + initVal_a3 = value; } - void initA4(const double & value, const double & min, const double & max, const TString & name = "a4", const TString & title = "a4") { if( a4_ != 0 ) delete a4_; a4_ = new RooRealVar(name, title, value, min, max); + initVal_a4 = value; } - void initA5(const double & value, const double & min, const double & max, const TString & name = "a5", const TString & title = "a5") { if( a5_ != 0 ) delete a5_; a5_ = new RooRealVar(name, title, value, min, max); + initVal_a5 = value; } - void initA6(const double & value, const double & min, const double & max, const TString & name = "a6", const TString & title = "a6") { if( a6_ != 0 ) delete a6_; a6_ = new RooRealVar(name, title, value, min, max); + initVal_a6 = value; } - void initAlpha(const double & value, const double & min, const double & max, const TString & name = "alpha", const TString & title = "alpha") { if( alpha_ != 0 ) delete alpha_; alpha_ = new RooRealVar(name, title, value, min, max); + initVal_alpha = value; } - void initN(const double & value, const double & min, const double & max, const TString & name = "n", const TString & title = "n") { if( n_ != 0 ) delete n_; n_ = new RooRealVar(name, title, value, min, max); + initVal_n = value; } - void initFGCB(const double & value, const double & min, const double & max, const TString & name = "fGCB", const TString & title = "fGCB") { if( fGCB_ != 0 ) delete fGCB_; fGCB_ = new RooRealVar(name, title, value, min, max); - } - - inline RooRealVar * mean() + initVal_fGCB = value; + } + + void reinitializeParameters(){ + if (mean_!=0) mean_->setVal(initVal_mean); + if (mean2_!=0) mean2_->setVal(initVal_mean2); + if (mean3_!=0) mean3_->setVal(initVal_mean3); + if (sigma_!=0) sigma_->setVal(initVal_sigma); + if (sigma2_!=0) sigma2_->setVal(initVal_sigma2); + if (sigma3_!=0) sigma3_->setVal(initVal_sigma3); + if (gamma_!=0) gamma_->setVal(initVal_gamma); + if (gaussFrac_!=0) gaussFrac_->setVal(initVal_gaussFrac); + if (gaussFrac2_!=0) gaussFrac2_->setVal(initVal_gaussFrac2); + if (expCoeffa0_!=0) expCoeffa0_->setVal(initVal_expCoeffa0); + if (expCoeffa1_!=0) expCoeffa1_->setVal(initVal_expCoeffa1); + if (expCoeffa2_!=0) expCoeffa2_->setVal(initVal_expCoeffa2); + if (fsig_!=0) fsig_->setVal(initVal_fsig); + if (a0_!=0) a0_->setVal(initVal_a0); + if (a1_!=0) a1_->setVal(initVal_a1); + if (a2_!=0) a2_->setVal(initVal_a2); + if (a3_!=0) a3_->setVal(initVal_a3); + if (a4_!=0) a4_->setVal(initVal_a4); + if (a5_!=0) a5_->setVal(initVal_a5); + if (a6_!=0) a6_->setVal(initVal_a6); + if (alpha_!=0) alpha_->setVal(initVal_alpha); + if (n_!=0) n_->setVal(initVal_n); + if (fGCB_!=0) fGCB_->setVal(initVal_fGCB); + } + + inline RooRealVar* mean() { return mean_; } - - inline RooRealVar * mean2() + inline RooRealVar* mean2() { return mean2_; } - - inline RooRealVar * mean3() + inline RooRealVar* mean3() { return mean3_; } - - inline RooRealVar * sigma() + inline RooRealVar* sigma() { return sigma_; } - - inline RooRealVar * sigma2() + inline RooRealVar* sigma2() { return sigma2_; } - - inline RooRealVar * gamma() + inline RooRealVar* sigma3() + { + return sigma3_; + } + inline RooRealVar* gamma() { return gamma_; } - - inline RooRealVar * expCoeffa0() + inline RooRealVar* gaussFrac() + { + return gaussFrac_; + } + inline RooRealVar* gaussFrac2() + { + return gaussFrac2_; + } + inline RooRealVar* expCoeffa0() { return expCoeffa0_; } - inline RooRealVar * expCoeffa1() + inline RooRealVar* expCoeffa1() { return expCoeffa1_; } - inline RooRealVar * expCoeffa2() + inline RooRealVar* expCoeffa2() { return expCoeffa2_; } - - inline RooRealVar * fsig() + inline RooRealVar* fsig() { return fsig_; } - - inline RooRealVar * a0() + inline RooRealVar* a0() { return a0_; } - - inline RooRealVar * a1() + inline RooRealVar* a1() { return a1_; } - - inline RooRealVar * a2() + inline RooRealVar* a2() { return a2_; } - - inline RooRealVar * a3() + inline RooRealVar* a3() { return a3_; } - - inline RooRealVar * a4() + inline RooRealVar* a4() { return a4_; } - - inline RooRealVar * a5() + inline RooRealVar* a5() { return a5_; } - - inline RooRealVar * a6() + inline RooRealVar* a6() { return a6_; } - - inline RooRealVar * alpha() + inline RooRealVar* alpha() { return alpha_; } - - inline RooRealVar * n() + inline RooRealVar* n() { return n_; } - - inline RooRealVar * fGCB() + inline RooRealVar* fGCB() { return fGCB_; } /// Build the model for the specified signal type - RooAbsPdf * buildSignalModel(RooRealVar * x, const TString & signalType) + RooAbsPdf * buildSignalModel(RooRealVar* x, const TString & signalType) { RooAbsPdf * signal = 0; if( signalType == "gaussian" ) { @@ -517,7 +538,7 @@ class FitWithRooFit } /// Build the model for the specified background type - RooAbsPdf * buildBackgroundModel(RooRealVar * x, const TString & backgroundType) + RooAbsPdf * buildBackgroundModel(RooRealVar* x, const TString & backgroundType) { RooAbsPdf * background = 0; if( backgroundType == "exponential" ) { @@ -576,7 +597,7 @@ class FitWithRooFit } /// Build the model to fit - RooAbsPdf * buildModel(RooRealVar * x, const TString & signalType, const TString & backgroundType) + RooAbsPdf * buildModel(RooRealVar* x, const TString & signalType, const TString & backgroundType) { RooAbsPdf * model = 0; @@ -608,29 +629,55 @@ class FitWithRooFit protected: // Declare all variables - RooRealVar * mean_; - RooRealVar * mean2_; - RooRealVar * mean3_; - RooRealVar * sigma_; - RooRealVar * sigma2_; - RooRealVar * sigma3_; - RooRealVar * gamma_; - RooRealVar * gaussFrac_; - RooRealVar * gaussFrac2_; - RooRealVar * expCoeffa0_; - RooRealVar * expCoeffa1_; - RooRealVar * expCoeffa2_; - RooRealVar * fsig_; - RooRealVar * a0_; - RooRealVar * a1_; - RooRealVar * a2_; - RooRealVar * a3_; - RooRealVar * a4_; - RooRealVar * a5_; - RooRealVar * a6_; - RooRealVar * alpha_; - RooRealVar * n_; - RooRealVar * fGCB_; + RooRealVar* mean_; + RooRealVar* mean2_; + RooRealVar* mean3_; + RooRealVar* sigma_; + RooRealVar* sigma2_; + RooRealVar* sigma3_; + RooRealVar* gamma_; + RooRealVar* gaussFrac_; + RooRealVar* gaussFrac2_; + RooRealVar* expCoeffa0_; + RooRealVar* expCoeffa1_; + RooRealVar* expCoeffa2_; + RooRealVar* fsig_; + RooRealVar* a0_; + RooRealVar* a1_; + RooRealVar* a2_; + RooRealVar* a3_; + RooRealVar* a4_; + RooRealVar* a5_; + RooRealVar* a6_; + RooRealVar* alpha_; + RooRealVar* n_; + RooRealVar* fGCB_; + + // Initial values + double initVal_mean; + double initVal_mean2; + double initVal_mean3; + double initVal_sigma; + double initVal_sigma2; + double initVal_sigma3; + double initVal_gamma; + double initVal_gaussFrac; + double initVal_gaussFrac2; + double initVal_expCoeffa0; + double initVal_expCoeffa1; + double initVal_expCoeffa2; + double initVal_fsig; + double initVal_a0; + double initVal_a1; + double initVal_a2; + double initVal_a3; + double initVal_a4; + double initVal_a5; + double initVal_a6; + double initVal_alpha; + double initVal_n; + double initVal_fGCB; + }; #endif diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitXslices.cc b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitXslices.cc index 8456054dda576..e198af0acf4b5 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitXslices.cc +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitXslices.cc @@ -76,52 +76,52 @@ class FitXslices gDirectory->cd("allHistos"); gStyle->SetPalette(1); - // Loop on all X bins, project on Y and fit the resulting TH1 + // Loop on all X bins, project on Y and fit the resulting TH1 TString name = histo->GetName(); unsigned int binsX = histo->GetNbinsX(); // The canvas for the results of the fit (the mean values for the gaussians +- errors) - TCanvas * meanCanvas = new TCanvas("meanCanvas", "meanCanvas", 1000, 800); - TH1D * meanHisto = new TH1D("meanHisto", "meanHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); + TCanvas* meanCanvas = new TCanvas("meanCanvas", "meanCanvas", 1000, 800); + TH1D* meanHisto = new TH1D("meanHisto", "meanHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); - TCanvas * sigmaCanvas = new TCanvas("sigmaCanvas", "sigmaCanvas", 1000, 800); - TH1D * sigmaHisto = new TH1D("sigmaHisto", "sigmaHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); + TCanvas* sigmaCanvas = new TCanvas("sigmaCanvas", "sigmaCanvas", 1000, 800); + TH1D* sigmaHisto = new TH1D("sigmaHisto", "sigmaHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); - TCanvas * backgroundCanvas = new TCanvas("backgroundCanvas", "backgroundCanvas", 1000, 800); - TH1D * backgroundHisto = new TH1D("backgroundHisto", "backgroundHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); + TCanvas* backgroundCanvas = new TCanvas("backgroundCanvas", "backgroundCanvas", 1000, 800); + TH1D* backgroundHisto = new TH1D("backgroundHisto", "backgroundHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); - TCanvas * backgroundCanvas2 = new TCanvas("backgroundCanvas2", "backgroundCanvas2", 1000, 800); - TH1D * backgroundHisto2 = new TH1D("backgroundHisto2", "exp a1", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); + TCanvas* backgroundCanvas2 = new TCanvas("backgroundCanvas2", "backgroundCanvas2", 1000, 800); + TH1D* backgroundHisto2 = new TH1D("backgroundHisto2", "exp a1", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); - TCanvas * backgroundCanvas3 = new TCanvas("backgroundCanvas3", "backgroundCanvas3", 1000, 800); - TH1D * backgroundHisto3 = new TH1D("backgroundHisto3", "exp a2", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); + TCanvas* backgroundCanvas3 = new TCanvas("backgroundCanvas3", "backgroundCanvas3", 1000, 800); + TH1D* backgroundHisto3 = new TH1D("backgroundHisto3", "exp a2", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); - TCanvas * signalFractionCanvas = new TCanvas("signalFractionCanvas", "signalFractionCanvas", 1000, 800); - TH1D * signalFractionHisto = new TH1D("signalFractionHisto", "signalFractionHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); + TCanvas* signalFractionCanvas = new TCanvas("signalFractionCanvas", "signalFractionCanvas", 1000, 800); + TH1D* signalFractionHisto = new TH1D("signalFractionHisto", "signalFractionHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); - TCanvas * probChi2Canvas = new TCanvas("probChi2Canvas", "probChi2Canvas", 1000, 800); - TH1D * probChi2Histo = new TH1D("probChi2Histo", "probChi2Histo", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); + TCanvas* probChi2Canvas = new TCanvas("probChi2Canvas", "probChi2Canvas", 1000, 800); + TH1D* probChi2Histo = new TH1D("probChi2Histo", "probChi2Histo", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax()); // Store all the non-empty slices std::map< unsigned int, TH1 *> slices; - for( unsigned int x=1; x<=binsX; ++x ) { + for (unsigned int x=1; x<=binsX; ++x) { std::stringstream ss; ss << x; - TH1 * sliceHisto = histo->ProjectionY(name+ss.str(), x, x); - if( sliceHisto->GetEntries() != 0 ) { - // std::cout << "filling for x = " << x << endl; - slices.insert(std::make_pair(x, sliceHisto)); - sliceHisto->Rebin(rebinY); + TH1* sliceHisto = histo->ProjectionY(name+ss.str(), x, x); + if (sliceHisto->GetEntries() != 0) { + // std::cout << "filling for x = " << x << endl; + slices.insert(std::make_pair(x, sliceHisto)); + sliceHisto->Rebin(rebinY); } } // Create the canvas for all the fits - TCanvas * fitsCanvas = new TCanvas("fitsCanvas", "fits canvas", 1000, 800); + TCanvas* fitsCanvas = new TCanvas("fitsCanvas", "fits canvas", 1000, 800); // cout << "slices.size = " << slices.size() << endl; unsigned int x = sqrt(slices.size()); unsigned int y = x; - if( x*y < slices.size() ) { + if (x*y < slices.size()) { x += 1; y += 1; } @@ -130,57 +130,56 @@ class FitXslices // Loop on the saved slices and fit std::map::iterator it = slices.begin(); unsigned int i=1; - for( ; it != slices.end(); ++it, ++i ) { + for (; it != slices.end(); ++it, ++i) { fitsCanvas->cd(i); fitter_.fit(it->second, signalType, backgroundType, xMin, xMax); // fitsCanvas->GetPad(i)->SetLogy(); // FIXME: prob(chi2) needs to be computed properly inside FitWithRooFit.cc // probChi2Histo->SetBinContent(it->first, mean->getVal()); - RooRealVar * mean = fitter_.mean(); - + RooRealVar* mean = fitter_.mean(); + meanHisto->SetBinContent(it->first, mean->getVal()); meanHisto->SetBinError(it->first, mean->getError()); - RooRealVar * sigma = fitter_.sigma(); + RooRealVar* sigma = fitter_.sigma(); sigmaHisto->SetBinContent(it->first, sigma->getVal()); sigmaHisto->SetBinError(it->first, sigma->getError()); - + std::cout << "backgroundType = " << backgroundType << std::endl; - if( backgroundType == "exponential" ) { - RooRealVar * expCoeff = fitter_.expCoeffa1(); - backgroundHisto->SetBinContent(it->first, expCoeff->getVal()); - backgroundHisto->SetBinError(it->first, expCoeff->getError()); - + if (backgroundType == "exponential") { + RooRealVar* expCoeff = fitter_.expCoeffa1(); + backgroundHisto->SetBinContent(it->first, expCoeff->getVal()); + backgroundHisto->SetBinError(it->first, expCoeff->getError()); } - else if( backgroundType == "exponentialpol" ) { - RooRealVar * expCoeffa0 = fitter_.expCoeffa0(); - backgroundHisto->SetBinContent(it->first, expCoeffa0->getVal()); - backgroundHisto->SetBinError(it->first, expCoeffa0->getError()); - - RooRealVar * expCoeffa1 = fitter_.expCoeffa1(); - backgroundHisto2->SetBinContent(it->first, expCoeffa1->getVal()); - backgroundHisto2->SetBinError(it->first, expCoeffa1->getError()); - - RooRealVar * expCoeffa2 = fitter_.expCoeffa2(); - backgroundHisto3->SetBinContent(it->first, expCoeffa2->getVal()); - backgroundHisto3->SetBinError(it->first, expCoeffa2->getError()); + else if (backgroundType == "exponentialpol") { + RooRealVar* expCoeffa0 = fitter_.expCoeffa0(); + backgroundHisto->SetBinContent(it->first, expCoeffa0->getVal()); + backgroundHisto->SetBinError(it->first, expCoeffa0->getError()); + + RooRealVar* expCoeffa1 = fitter_.expCoeffa1(); + backgroundHisto2->SetBinContent(it->first, expCoeffa1->getVal()); + backgroundHisto2->SetBinError(it->first, expCoeffa1->getError()); + + RooRealVar* expCoeffa2 = fitter_.expCoeffa2(); + backgroundHisto3->SetBinContent(it->first, expCoeffa2->getVal()); + backgroundHisto3->SetBinError(it->first, expCoeffa2->getError()); } - else if( backgroundType == "linear" ) { - RooRealVar * linearTerm = fitter_.a1(); - backgroundHisto->SetBinContent(it->first, linearTerm->getVal()); - backgroundHisto->SetBinError(it->first, linearTerm->getError()); - - RooRealVar * constant = fitter_.a0(); - backgroundHisto2->SetBinContent(it->first, constant->getVal()); - backgroundHisto2->SetBinError(it->first, constant->getError()); + else if (backgroundType == "linear") { + RooRealVar* linearTerm = fitter_.a1(); + backgroundHisto->SetBinContent(it->first, linearTerm->getVal()); + backgroundHisto->SetBinError(it->first, linearTerm->getError()); + + RooRealVar* constant = fitter_.a0(); + backgroundHisto2->SetBinContent(it->first, constant->getVal()); + backgroundHisto2->SetBinError(it->first, constant->getError()); } - RooRealVar * fsig = fitter_.fsig(); - signalFractionHisto->SetBinContent(it->first, fsig->getVal()); - signalFractionHisto->SetBinError(it->first, fsig->getError()); - + RooRealVar* fsig = fitter_.fsig(); + signalFractionHisto->SetBinContent(it->first, fsig->getVal()); + signalFractionHisto->SetBinError(it->first, fsig->getError()); + fitter_.reinitializeParameters(); } // Go back to the main dir before saving the canvases gDirectory->GetMotherDir()->cd(); @@ -190,11 +189,11 @@ class FitXslices sigmaHisto->Draw(); backgroundCanvas->cd(); backgroundHisto->Draw(); - if( backgroundType == "linear" ) { + if (backgroundType == "linear") { backgroundCanvas2->cd(); backgroundHisto2->Draw(); } - if( backgroundType == "exponentialpol" ) { + if (backgroundType == "exponentialpol") { backgroundCanvas2->cd(); backgroundHisto2->Draw(); backgroundCanvas3->cd(); @@ -210,12 +209,19 @@ class FitXslices sigmaCanvas->Write(); backgroundCanvas->Write(); signalFractionCanvas->Write(); - if( backgroundType == "linear" ) { + if (backgroundType == "linear") { backgroundCanvas2->Write(); } probChi2Canvas->Write(); - // fitSlices(slices, xMin, xMax, signalType, backgroundType, false); ///DEVO PASSARGLI xMin, xMax e il resto.... + fitsCanvas->Close(); + probChi2Canvas->Close(); + signalFractionCanvas->Close(); + backgroundCanvas3->Close(); + backgroundCanvas2->Close(); + backgroundCanvas->Close(); + sigmaCanvas->Close(); + meanCanvas->Close(); } void operator()(TH3 * histo, const double & xMin, const double & xMax, const TString & signalType, const TString & backgroundType, unsigned int rebinZ) @@ -224,7 +230,7 @@ class FitXslices gDirectory->mkdir("allHistos"); gDirectory->cd("allHistos"); - // Loop on all X bins, project on Y and fit the resulting TH2 + // Loop on all X bins, project on Y and fit the resulting TH2 TString name = histo->GetName(); unsigned int binsX = histo->GetNbinsX(); unsigned int binsY = histo->GetNbinsY(); @@ -233,46 +239,46 @@ class FitXslices // std::cout<< "number of bins in y --> "<GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax(), binsY, histo->GetYaxis()->GetXmin(), histo->GetYaxis()->GetXmax()); - TCanvas * errorMeanCanvas = new TCanvas("errorMeanCanvas", "errorMeanCanvas", 1000, 800); + TCanvas* errorMeanCanvas = new TCanvas("errorMeanCanvas", "errorMeanCanvas", 1000, 800); TH2D * errorMeanHisto = new TH2D("errorMeanHisto", "errorMeanHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax(), binsY, histo->GetYaxis()->GetXmin(), histo->GetYaxis()->GetXmax()); - TCanvas * sigmaCanvas = new TCanvas("sigmaCanvas", "sigmaCanvas", 1000, 800); - TH2D * sigmaHisto = new TH2D("sigmaHisto", "sigmaHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax(),binsY, histo->GetYaxis()->GetXmin(), histo->GetYaxis()->GetXmax()); + TCanvas* sigmaCanvas = new TCanvas("sigmaCanvas", "sigmaCanvas", 1000, 800); + TH2D * sigmaHisto = new TH2D("sigmaHisto", "sigmaHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax(), binsY, histo->GetYaxis()->GetXmin(), histo->GetYaxis()->GetXmax()); - TCanvas * backgroundCanvas = new TCanvas("backgroundCanvas", "backgroundCanvas", 1000, 800); + TCanvas* backgroundCanvas = new TCanvas("backgroundCanvas", "backgroundCanvas", 1000, 800); TH2D * backgroundHisto = new TH2D("backgroundHisto", "backgroundHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax(), binsY, histo->GetYaxis()->GetXmin(), histo->GetYaxis()->GetXmax()); - TCanvas * backgroundCanvas2 = new TCanvas("backgroundCanvas2", "backgroundCanvas2", 1000, 800); + TCanvas* backgroundCanvas2 = new TCanvas("backgroundCanvas2", "backgroundCanvas2", 1000, 800); TH2D * backgroundHisto2 = new TH2D("backgroundHisto2", "a1", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax(), binsY, histo->GetYaxis()->GetXmin(), histo->GetYaxis()->GetXmax()); - TCanvas * backgroundCanvas3 = new TCanvas("backgroundCanvas3", "backgroundCanvas3", 1000, 800); + TCanvas* backgroundCanvas3 = new TCanvas("backgroundCanvas3", "backgroundCanvas3", 1000, 800); TH2D * backgroundHisto3 = new TH2D("backgroundHisto3", "a2", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax(), binsY, histo->GetYaxis()->GetXmin(), histo->GetYaxis()->GetXmax()); - TCanvas * signalFractionCanvas = new TCanvas("signalFractionCanvas", "signalFractionCanvas", 1000, 800); + TCanvas* signalFractionCanvas = new TCanvas("signalFractionCanvas", "signalFractionCanvas", 1000, 800); TH2D * signalFractionHisto = new TH2D("signalFractionHisto", "signalFractionHisto", binsX, histo->GetXaxis()->GetXmin(), histo->GetXaxis()->GetXmax(), binsY, histo->GetYaxis()->GetXmin(), histo->GetYaxis()->GetXmax()); // Store all the non-empty slices std::map slices; - for( unsigned int x=1; x<=binsX; ++x ) { - for( unsigned int y=1; y<=binsY; ++y ) { - std::stringstream ss; - ss << x << "_" << y; - TH1 * sliceHisto = histo->ProjectionZ(name+ss.str(), x, x, y, y); - if( sliceHisto->GetEntries() != 0 ) { - sliceHisto->Rebin(rebinZ); - // std::cout << "filling for x = " << x << endl; - slices.insert(std::make_pair(x+(binsX+1)*y, sliceHisto)); - } + for (unsigned int x=1; x<=binsX; ++x) { + for (unsigned int y=1; y<=binsY; ++y) { + std::stringstream ss; + ss << x << "_" << y; + TH1* sliceHisto = histo->ProjectionZ(name+ss.str(), x, x, y, y); + if (sliceHisto->GetEntries() != 0) { + sliceHisto->Rebin(rebinZ); + // std::cout << "filling for x = " << x << endl; + slices.insert(std::make_pair(x+(binsX+1)*y, sliceHisto)); + } } } - // Create the canvas for all the fits - TCanvas * fitsCanvas = new TCanvas("fitsCanvas", "fits canvas", 1000, 800); + // Create the canvas for all the fits + TCanvas* fitsCanvas = new TCanvas("fitsCanvas", "canvas of all fits", 1000, 800); // cout << "slices.size = " << slices.size() << endl; unsigned int x = sqrt(slices.size()); unsigned int y = x; - if( x*y < slices.size() ) { + if (x*y < slices.size()) { x += 1; y += 1; } @@ -281,12 +287,12 @@ class FitXslices // Loop on the saved slices and fit std::map::iterator it = slices.begin(); unsigned int i=1; - for( ; it != slices.end(); ++it, ++i ) { + for (; it != slices.end(); ++it, ++i) { fitsCanvas->cd(i); fitter_.fit(it->second, signalType, backgroundType, xMin, xMax); - - RooRealVar * mean = fitter_.mean(); + + RooRealVar* mean = fitter_.mean(); meanHisto->SetBinContent(it->first%(binsX+1), int(it->first/(binsX+1)), mean->getVal()); errorMeanHisto->SetBinContent(it->first%(binsX+1), int(it->first/(binsX+1)), mean->getError()); // meanHisto->SetBinError(it->first%binsX, int(it->first/binsX), mean->getError()); @@ -294,65 +300,65 @@ class FitXslices //std::cout<< " it->first%(binsX+1) --> "<first%(binsX+1)<first/(binsX+1) --> "<first/(binsX+1))<SetBinContent(it->first%binsX, int(it->first/binsX), sigma->getVal()); sigmaHisto->SetBinError(it->first%binsX, int(it->first/binsX), sigma->getError()); - + std::cout << "backgroundType = " << backgroundType << std::endl; - if( backgroundType == "exponential" ) { - RooRealVar * expCoeff = fitter_.expCoeffa1(); - backgroundHisto->SetBinContent(it->first%binsX, int(it->first/binsX), expCoeff->getVal()); - backgroundHisto->SetBinError(it->first%binsX, int(it->first/binsX), expCoeff->getError()); + if (backgroundType == "exponential") { + RooRealVar* expCoeff = fitter_.expCoeffa1(); + backgroundHisto->SetBinContent(it->first%binsX, int(it->first/binsX), expCoeff->getVal()); + backgroundHisto->SetBinError(it->first%binsX, int(it->first/binsX), expCoeff->getError()); } - else if( backgroundType == "exponentialpol" ) { - RooRealVar * expCoeffa0 = fitter_.expCoeffa0(); - backgroundHisto->SetBinContent(it->first%binsX, int(it->first/binsX), expCoeffa0->getVal()); - backgroundHisto->SetBinError(it->first%binsX, int(it->first/binsX), expCoeffa0->getError()); - - RooRealVar * expCoeffa1= fitter_.expCoeffa1(); - backgroundHisto2->SetBinContent(it->first%binsX, int(it->first/binsX), expCoeffa1->getVal()); - backgroundHisto2->SetBinError(it->first%binsX, int(it->first/binsX), expCoeffa1->getError()); - - RooRealVar * expCoeffa2= fitter_.expCoeffa2(); - backgroundHisto3->SetBinContent(it->first%binsX, int(it->first/binsX), expCoeffa2->getVal()); - backgroundHisto3->SetBinError(it->first%binsX, int(it->first/binsX), expCoeffa2->getError()); + else if (backgroundType == "exponentialpol") { + RooRealVar* expCoeffa0 = fitter_.expCoeffa0(); + backgroundHisto->SetBinContent(it->first%binsX, int(it->first/binsX), expCoeffa0->getVal()); + backgroundHisto->SetBinError(it->first%binsX, int(it->first/binsX), expCoeffa0->getError()); + + RooRealVar* expCoeffa1= fitter_.expCoeffa1(); + backgroundHisto2->SetBinContent(it->first%binsX, int(it->first/binsX), expCoeffa1->getVal()); + backgroundHisto2->SetBinError(it->first%binsX, int(it->first/binsX), expCoeffa1->getError()); + + RooRealVar* expCoeffa2= fitter_.expCoeffa2(); + backgroundHisto3->SetBinContent(it->first%binsX, int(it->first/binsX), expCoeffa2->getVal()); + backgroundHisto3->SetBinError(it->first%binsX, int(it->first/binsX), expCoeffa2->getError()); } - else if( backgroundType == "linear" ) { - RooRealVar * linearTerm = fitter_.a1(); - backgroundHisto->SetBinContent(it->first%binsX, int(it->first/binsX), linearTerm->getVal()); - backgroundHisto->SetBinError(it->first%binsX, int(it->first/binsX), linearTerm->getError()); - - RooRealVar * constant = fitter_.a0(); - backgroundHisto2->SetBinContent(it->first%binsX, int(it->first/binsX), constant->getVal()); - backgroundHisto2->SetBinError(it->first%binsX, int(it->first/binsX), constant->getError()); + else if (backgroundType == "linear") { + RooRealVar* linearTerm = fitter_.a1(); + backgroundHisto->SetBinContent(it->first%binsX, int(it->first/binsX), linearTerm->getVal()); + backgroundHisto->SetBinError(it->first%binsX, int(it->first/binsX), linearTerm->getError()); + + RooRealVar* constant = fitter_.a0(); + backgroundHisto2->SetBinContent(it->first%binsX, int(it->first/binsX), constant->getVal()); + backgroundHisto2->SetBinError(it->first%binsX, int(it->first/binsX), constant->getError()); } - - RooRealVar * fsig = fitter_.fsig(); + RooRealVar* fsig = fitter_.fsig(); signalFractionHisto->SetBinContent(it->first%binsX, int(it->first/binsX), fsig->getVal()); signalFractionHisto->SetBinError(it->first%binsX, int(it->first/binsX), fsig->getError()); + fitter_.reinitializeParameters(); } // Go back to the main dir before saving the canvases gDirectory->GetMotherDir()->cd(); meanCanvas->cd(); - meanHisto->GetXaxis()->SetRangeUser(-3.14,3.14); - meanHisto->GetYaxis()->SetRangeUser(-2.5,2.5); + meanHisto->GetXaxis()->SetRangeUser(-3.14, 3.14); + meanHisto->GetYaxis()->SetRangeUser(-2.5, 2.5); meanHisto->GetXaxis()->SetTitle("#phi (rad)"); meanHisto->GetYaxis()->SetTitle("#eta"); meanHisto->Draw("COLZ"); sigmaCanvas->cd(); - sigmaHisto->GetXaxis()->SetRangeUser(-3.14,3.14); - sigmaHisto->GetYaxis()->SetRangeUser(-2.5,2.5); + sigmaHisto->GetXaxis()->SetRangeUser(-3.14, 3.14); + sigmaHisto->GetYaxis()->SetRangeUser(-2.5, 2.5); sigmaHisto->GetXaxis()->SetTitle("#phi (rad)"); sigmaHisto->GetYaxis()->SetTitle("#eta"); sigmaHisto->Draw("COLZ"); backgroundCanvas->cd(); backgroundHisto->Draw("COLZ"); - if( backgroundType == "linear" ) { + if (backgroundType == "linear") { backgroundCanvas2->cd(); backgroundHisto2->Draw("COLZ"); } @@ -364,11 +370,18 @@ class FitXslices sigmaCanvas->Write(); backgroundCanvas->Write(); signalFractionCanvas->Write(); - if( backgroundType == "linear" ) { + if (backgroundType == "linear") { backgroundCanvas2->Write(); } - // fitSlices(slices, xMin, xMax, signalType, backgroundType, true); + fitsCanvas->Close(); + signalFractionCanvas->Close(); + backgroundCanvas3->Close(); + backgroundCanvas2->Close(); + backgroundCanvas->Close(); + sigmaCanvas->Close(); + errorMeanCanvas->Close(); + meanCanvas->Close(); } protected: diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C new file mode 100644 index 0000000000000..9bcf4b535c381 --- /dev/null +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C @@ -0,0 +1,298 @@ +#include +#include +#include "TROOT.h" +#include "TH1F.h" +#include "TH1D.h" +#include "TF1.h" +#include "TMath.h" +#include "TNtuple.h" +#include "TLegend.h" +#include "TCanvas.h" +#include "TCutG.h" +#include "TFile.h" +#include "TString.h" +#include "TH2.h" +#include "TPad.h" +#include "TPaveText.h" +#include "tdrstyle.C" + + +using namespace ROOT::Math; + +void splitOption(string rawoption, string& wish, string& value, char delimiter){ + size_t posEq = rawoption.find(delimiter); + if (posEq!=string::npos){ + wish=rawoption; + value=rawoption.substr(posEq+1); + wish.erase(wish.begin()+posEq, wish.end()); + } + else{ + wish=""; + value=rawoption; + } +} +void splitOptionRecursive(string rawoption, vector& splitoptions, char delimiter){ + string suboption=rawoption, result=rawoption; + string remnant; + while (result!=""){ + splitOption(suboption, result, remnant, delimiter); + if (result!="") splitoptions.push_back(result); + suboption = remnant; + } + if (remnant!="") splitoptions.push_back(remnant); +} +void MultiHistoOverlapAll_Z(string files, string labels, bool switchONfitEta = false, bool switchONfit = false){ + gROOT->Reset(); + setTDRStyle(); + + vector strValidation_file; + vector strValidation_label; + splitOptionRecursive(files, strValidation_file, ','); + splitOptionRecursive(labels, strValidation_label, ','); + int nfiles = strValidation_file.size(); + int nlabels = strValidation_label.size(); + if (nlabels!=nfiles){ + cout << "nlabels!=nfiles" << endl; + return; + } + + TPaveText *cmsPlotTitle = new TPaveText(0.15, 0.93, 0.85, 1, "brNDC"); + cmsPlotTitle->SetBorderSize(0); + cmsPlotTitle->SetFillStyle(0); + cmsPlotTitle->SetTextAlign(12); + cmsPlotTitle->SetTextFont(42); + cmsPlotTitle->SetTextSize(0.045); + TText* text = cmsPlotTitle->AddText(0.025, 0.45, "#font[61]{CMS}"); + text->SetTextSize(0.044); + text = cmsPlotTitle->AddText(0.165, 0.42, "#font[52]{Preliminary}"); + text->SetTextSize(0.0315); + TString cErgTev = "#font[42]{ TkAl Z#rightarrow#mu#mu (|#eta_{#mu}|<2.4) 13 TeV}"; + text = cmsPlotTitle->AddText(0.537, 0.40, cErgTev); + text->SetTextSize(0.0315); + + TH1D** histo[7]; + TF1** hfit[7]; + TFile** file = new TFile*[nfiles]; + for (int c=0; c<7; c++){ + histo[c] = new TH1D*[nfiles]; + hfit[c] = new TF1*[nfiles]; + } + + for (int f=0; fSetOptStat(0); + c[i]->SetFillColor(0); + c[i]->SetBorderMode(0); + c[i]->SetBorderSize(2); + c[i]->SetTickx(1); + c[i]->SetTicky(1); + c[i]->SetLeftMargin(0.17); + c[i]->SetRightMargin(0.05); + c[i]->SetTopMargin(0.07); + c[i]->SetBottomMargin(0.13); + c[i]->SetFrameFillStyle(0); + c[i]->SetFrameBorderMode(0); + c[i]->SetFrameFillStyle(0); + c[i]->SetFrameBorderMode(0); + } + + float lxmin = 0.22, lxwidth = 0.38; + float lymax = 0.9, lywidth = 0.15*nfiles/3; + float lxmax = lxmin + lxwidth; + float lymin = lymax - lywidth; + TLegend* leg = new TLegend(lxmin, lymin, lxmax, lymax); + leg->SetBorderSize(0); + leg->SetTextFont(42); + leg->SetTextSize(0.04); + leg->SetLineColor(1); + leg->SetLineStyle(1); + leg->SetLineWidth(1); + leg->SetFillColor(0); + leg->SetFillStyle(0); + + //----------------- CANVAS C0 --------------// + pIndex=0; + c[pIndex]->cd(); + + TString histoName[7] ={ + "MassVsPhiPlus/allHistos/meanHisto", + "MassVsPhiMinus/allHistos/meanHisto", + "MassVsEtaPlus/allHistos/meanHisto", + "MassVsEtaMinus/allHistos/meanHisto", + "MassVsEtaPlusMinusDiff/allHistos/meanHisto", + "MassVsCosThetaCS/allHistos/meanHisto", + "MassVsPhiCS/allHistos/meanHisto" + }; + TString xtitle[7] ={ + "#phi_{#mu+}", + "#phi_{#mu-}", + "#eta_{#mu+}", + "#eta_{#mu-}", + "#eta_{#mu+} - #eta_{#mu-}", + "cos #theta_{CS}", + "#phi_{CS}" + }; + TString plotname[7] ={ + "MassVsPhiPlus_ALL", + "MassVsPhiMinus_ALL", + "MassVsEtaPlus_ALL", + "MassVsEtaMinus_ALL", + "MassVsDeltaEta_ALL", + "MassVsCosThetaCS_ALL", + "MassVsPhiCS_ALL" + }; + TString fitFormula[7]={ + "[0]+[1]*cos(x+[2])", + "[0]+[1]*cos(x+[2])", + "[0]+[1]*x", + "[0]+[1]*x", + "[0]+[1]*x", + "[0]+[1]*cos(x+[2])", + "[0]+[1]*cos(x+[2])" + }; + double plot_xmax[7]={ + TMath::Pi(), + TMath::Pi(), + 2.4, + 2.4, + 4.8, + 1, + TMath::Pi() + }; + + for (int iP=0; iP<7; iP++){ + double absMin=9e9; + double absMax = -9e9; + for (int f=0; fGet(histoName[iP]); + + histo[iP][f]->SetTitle(""); + histo[iP][f]->GetXaxis()->SetLabelFont(42); + histo[iP][f]->GetXaxis()->SetLabelOffset(0.007); + histo[iP][f]->GetXaxis()->SetLabelSize(0.04); + histo[iP][f]->GetXaxis()->SetTitleSize(0.06); + histo[iP][f]->GetXaxis()->SetTitleOffset(0.9); + histo[iP][f]->GetXaxis()->SetTitleFont(42); + histo[iP][f]->GetYaxis()->SetNdivisions(505); + histo[iP][f]->GetYaxis()->SetLabelFont(42); + histo[iP][f]->GetYaxis()->SetLabelOffset(0.007); + histo[iP][f]->GetYaxis()->SetLabelSize(0.04); + histo[iP][f]->GetYaxis()->SetTitleSize(0.06); + histo[iP][f]->GetYaxis()->SetTitleOffset(1.2); + histo[iP][f]->GetYaxis()->SetTitleFont(42); + + histo[iP][f]->GetYaxis()->SetTitle("M_{#mu#mu} (GeV)"); + histo[iP][f]->SetLineWidth(1); + histo[iP][f]->SetMarkerSize(1.2); + + if (strValidation_label.at(f).find("reference")!=string::npos || strValidation_label.at(f).find("Reference")!=string::npos) histo[iP][f]->SetMarkerStyle(1); + else histo[iP][f]->SetMarkerStyle(20); + + if (f==0){ + histo[iP][f]->SetLineColor(kBlack); + histo[iP][f]->SetMarkerColor(kBlack); + } + else if (f==(nfiles-1)){ + histo[iP][f]->SetLineColor(kViolet); + histo[iP][f]->SetMarkerColor(kViolet); + } + else if (f==1){ + histo[iP][f]->SetLineColor(kBlue); + histo[iP][f]->SetMarkerColor(kBlue); + } + else if (f==2){ + histo[iP][f]->SetLineColor(kRed); + histo[iP][f]->SetMarkerColor(kRed); + } + else if (f==3){ + histo[iP][f]->SetLineColor(kGreen+2); + histo[iP][f]->SetMarkerColor(kGreen+2); + } + else if (f==4){ + histo[iP][f]->SetLineColor(kOrange+3); + histo[iP][f]->SetMarkerColor(kOrange+3); + } + else if (f==5){ + histo[iP][f]->SetLineColor(kGreen); + histo[iP][f]->SetMarkerColor(kGreen); + } + else if (f==6){ + histo[iP][f]->SetLineColor(kYellow); + histo[iP][f]->SetMarkerColor(kYellow); + } + else if (f==7){ + histo[iP][f]->SetLineColor(kPink+9); + histo[iP][f]->SetMarkerColor(kPink+9); + } + else if (f==8){ + histo[iP][f]->SetLineColor(kCyan); + histo[iP][f]->SetMarkerColor(kCyan); + } + else if (f==9){ + histo[iP][f]->SetLineColor(kGreen+3); + histo[iP][f]->SetMarkerColor(kGreen+3); + } + for (int bin=1; bin<=histo[iP][f]->GetNbinsX(); bin++){ + double bincontent = histo[iP][f]->GetBinContent(bin); + double binerror = histo[iP][f]->GetBinError(bin); + if (binerror==0 && bincontent==0) continue; + absMin = min(absMin, bincontent - binerror); + absMax = max(absMax, bincontent + binerror); + } + + if (iP==0) leg->AddEntry(histo[iP][f], (strValidation_label.at(f)).c_str(), "lp"); + } + minmax_plot[iP][0] = absMin/1.1; + minmax_plot[iP][1] = absMax*1.1; + for (int f=0; f<2; f++) histo[iP][f]->GetYaxis()->SetRangeUser(minmax_plot[iP][0], minmax_plot[iP][1]); + } + + for (int pIndex=0; pIndex<7; pIndex++){ + for (int f=0; fcd(); + histo[pIndex][f]->GetXaxis()->SetTitle(xtitle[pIndex]); + histo[pIndex][f]->GetXaxis()->SetRangeUser(-plot_xmax[pIndex], plot_xmax[pIndex]); + if (f==0) histo[pIndex][f]->Draw(); + else histo[pIndex][f]->Draw("same"); + + hfit[pIndex][f] = new TF1(Form("fit_%i_%i", pIndex, f), fitFormula[pIndex], -plot_xmax[pIndex], plot_xmax[pIndex]); + hfit[pIndex][f]->SetParameter(0, 90.5); + hfit[pIndex][f]->SetParameter(1, 0); + if (fitFormula[pIndex].Contains("[2]")) hfit[pIndex][f]->SetParameter(2, 0); + hfit[pIndex][f]->SetLineColor(1); + if (switchONfit){ + histo[pIndex][f]->Fit(hfit[pIndex][f], "R", "same", -plot_xmax[pIndex], plot_xmax[pIndex]); + hfit[pIndex][f]->Draw("same"); + } + } + leg->Draw("same"); + cmsPlotTitle->Draw("same"); + c[pIndex]->RedrawAxis(); + c[pIndex]->Modified(); + c[pIndex]->Update(); + c[pIndex]->SaveAs(Form("%s%s", plotname[pIndex].Data(), ".png")); + c[pIndex]->SaveAs(Form("%s%s", plotname[pIndex].Data(), ".pdf")); + + for (int f=0; fClose(); + } + + delete leg; + for(int f=nfiles-1;f>=0;f--) file[f]->Close(); + + delete[] file; + for (int c=0; c<7; c++){ + delete[] hfit[c]; + delete[] histo[c]; + } +} From b8863785b8e2e052cb7af12ee1bfad2f9fa2d016 Mon Sep 17 00:00:00 2001 From: usarica Date: Thu, 3 Sep 2015 21:40:10 +0200 Subject: [PATCH 03/34] Latest additions for plotting, bkg model --- .../zMuMuValidationTemplates.py | 2 +- .../Macros/RooFit/CompareBiasZValidation.cc | 7 +++-- .../Macros/RooFit/MultiHistoOverlapAll_Z.C | 29 +++++++++++++++---- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py index de7da5eb6400a..9b19c145473ae 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py @@ -251,7 +251,7 @@ cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc . cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitMass1D.cc . -root -q -b -l "CompareBiasZValidation.cc+(\\\"\\\")" +root -q -b -l "CompareBiasZValidation.cc+()" cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C . cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlap_.oO[resonance]Oo..C . diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc index a9de423073b4d..2c9942152bd73 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc @@ -13,7 +13,7 @@ class CompareBiasZValidation { public: - CompareBiasZValidation(const TString& leg) + CompareBiasZValidation(const int rebinXphi = 4, const int rebinXetadiff = 2, const int rebinXeta = 2, const int rebinXpt = 8) { @@ -36,7 +36,10 @@ class CompareBiasZValidation fitter.sigma2 = 1.; double Mmin(75), Mmax(105); - fitter.fit(inputFileName, outputFileName, "breitWignerTimesCB", "exponentialpol", 91, Mmin, Mmax, 2, 0.1, 10); + fitter.fit( + inputFileName, outputFileName, "breitWignerTimesCB", "exponentialpol", 91, Mmin, Mmax, 2, 0.1, 10, + rebinXphi, rebinXetadiff, rebinXeta, rebinXpt + ); FitMass1D fitMass1D; //fitMass1D.rebinX = 10; diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C index 9bcf4b535c381..13fe611a7b691 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C @@ -167,8 +167,13 @@ void MultiHistoOverlapAll_Z(string files, string labels, bool switchONfitEta = f }; for (int iP=0; iP<7; iP++){ - double absMin=9e9; + double absMin = 9e9; double absMax = -9e9; + double rangeMaxReduction = 0.02; + + double avgM = 0; + double sigmaM = 0; + for (int f=0; fGet(histoName[iP]); @@ -238,18 +243,32 @@ void MultiHistoOverlapAll_Z(string files, string labels, bool switchONfitEta = f histo[iP][f]->SetLineColor(kGreen+3); histo[iP][f]->SetMarkerColor(kGreen+3); } + + if (iP==0) leg->AddEntry(histo[iP][f], (strValidation_label.at(f)).c_str(), "lp"); + for (int bin=1; bin<=histo[iP][f]->GetNbinsX(); bin++){ double bincontent = histo[iP][f]->GetBinContent(bin); double binerror = histo[iP][f]->GetBinError(bin); if (binerror==0 && bincontent==0) continue; absMin = min(absMin, bincontent - binerror); absMax = max(absMax, bincontent + binerror); + avgM += bincontent/pow(binerror, 2); + sigmaM += 1./pow(binerror, 2); } - - if (iP==0) leg->AddEntry(histo[iP][f], (strValidation_label.at(f)).c_str(), "lp"); } - minmax_plot[iP][0] = absMin/1.1; - minmax_plot[iP][1] = absMax*1.1; + avgM /= sigmaM; + sigmaM = sqrt(1./sigmaM); + for (int f=0; fGetNbinsX(); bin++){ + double bincontent = histo[iP][f]->GetBinContent(bin); + double binerror = histo[iP][f]->GetBinError(bin); + if (binerror==0 && bincontent==0) continue; + if ((bincontent + binerror)>1.05*avgM) rangeMaxReduction = 0; + } + } + + minmax_plot[iP][0] = absMin/1.01; + minmax_plot[iP][1] = absMax*(1.05-rangeMaxReduction); for (int f=0; f<2; f++) histo[iP][f]->GetYaxis()->SetRangeUser(minmax_plot[iP][0], minmax_plot[iP][1]); } From 021fc1cc29f1e03b3728899b265d22709672fe48 Mon Sep 17 00:00:00 2001 From: usarica Date: Fri, 4 Sep 2015 03:53:44 +0200 Subject: [PATCH 04/34] Improve plotting scripts furter for range --- .../test/Macros/RooFit/CompareBiasZValidation.cc | 2 +- .../test/Macros/RooFit/MultiHistoOverlapAll_Z.C | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc index 2c9942152bd73..6485dd6e88f0f 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/CompareBiasZValidation.cc @@ -37,7 +37,7 @@ class CompareBiasZValidation double Mmin(75), Mmax(105); fitter.fit( - inputFileName, outputFileName, "breitWignerTimesCB", "exponentialpol", 91, Mmin, Mmax, 2, 0.1, 10, + inputFileName, outputFileName, "breitWignerTimesCB", "exponential", 91, Mmin, Mmax, 2, 0.1, 10, rebinXphi, rebinXetadiff, rebinXeta, rebinXpt ); diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C index 13fe611a7b691..1fdb20c252fb8 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlapAll_Z.C @@ -166,10 +166,19 @@ void MultiHistoOverlapAll_Z(string files, string labels, bool switchONfitEta = f TMath::Pi() }; + // Magic numbers + int nfileslimit = 4; + double rangeFactor[2]={ 1.01, 1.05 }; + double dampingFactor = 0; + double deviationThreshold = 1.04; + if (nfiles>nfileslimit) dampingFactor = 0.07/nfileslimit*(nfiles-nfileslimit); + for (int iP=0; iP<7; iP++){ double absMin = 9e9; double absMax = -9e9; double rangeMaxReduction = 0.02; + if (nfiles>nfileslimit) rangeMaxReduction = rangeMaxReduction*nfileslimit/nfiles; + double dampingFactorEff = dampingFactor; double avgM = 0; double sigmaM = 0; @@ -263,12 +272,13 @@ void MultiHistoOverlapAll_Z(string files, string labels, bool switchONfitEta = f double bincontent = histo[iP][f]->GetBinContent(bin); double binerror = histo[iP][f]->GetBinError(bin); if (binerror==0 && bincontent==0) continue; - if ((bincontent + binerror)>1.05*avgM) rangeMaxReduction = 0; + if ((bincontent + binerror)>deviationThreshold*avgM) rangeMaxReduction = 0; } } + if (nfiles>nfileslimit && rangeMaxReduction!=0) dampingFactorEff = dampingFactorEff*0.7; - minmax_plot[iP][0] = absMin/1.01; - minmax_plot[iP][1] = absMax*(1.05-rangeMaxReduction); + minmax_plot[iP][0] = absMin/rangeFactor[0]; + minmax_plot[iP][1] = absMax*(rangeFactor[1]+dampingFactorEff-rangeMaxReduction); for (int f=0; f<2; f++) histo[iP][f]->GetYaxis()->SetRangeUser(minmax_plot[iP][0], minmax_plot[iP][1]); } From caf68c48b388b1684fe002e015567790e82d37f7 Mon Sep 17 00:00:00 2001 From: usarica Date: Tue, 8 Sep 2015 16:51:55 +0200 Subject: [PATCH 05/34] Example file for Zmumu --- .../OfflineValidation/test/zmumuValidate.ini | 195 +++++++++++++----- 1 file changed, 148 insertions(+), 47 deletions(-) diff --git a/Alignment/OfflineValidation/test/zmumuValidate.ini b/Alignment/OfflineValidation/test/zmumuValidate.ini index 182549f165f72..6f46617a5d2eb 100644 --- a/Alignment/OfflineValidation/test/zmumuValidate.ini +++ b/Alignment/OfflineValidation/test/zmumuValidate.ini @@ -13,6 +13,7 @@ jobmode = lxBatch, -q cmscaf1nd ############################################################################### # configuration of several alignments + [alignment:alignment_defgt] title=alignment_{Default GT} globaltag = GR_P_V56 @@ -21,90 +22,180 @@ condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStri color = 633 style = 1 +[alignment:alignment_PCL] +title=alignment_PCL +globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/work/c/chmartin/public/pp3.8T_2015_Alignment/Local_DB/TkAlignment.db,testTag +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/xiaomeng/Inflate/CMSSW_7_4_0_pre6/src/Alignment/HIPAlignmentAlgorithm/MP1700_sd.db,Deformations_mp +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 +color = 633 +style = 1 + [alignment:alignment_hp1394] title=alignment_hp1394 globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/cayou/CMSSW_7_4_6_patch5/src/Alignment/HIPAlignmentAlgorithm/hp1394/alignments_iter20.db, Alignments -condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/xiaomeng/Inflate/CMSSW_7_4_0_pre6/src/Alignment/HIPAlignmentAlgorithm/MP1700_sd.db,Deformations_mp condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 +color = 633 +style = 1 + +[alignment:alignment_hp1398] +title=alignment_hp1398 +globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/cayou/CMSSW_7_4_6_patch5/src/Alignment/HIPAlignmentAlgorithm/hp1398_2/alignments_iter15.db, Alignments +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/xiaomeng/Inflate/CMSSW_7_4_0_pre6/src/Alignment/HIPAlignmentAlgorithm/MP1700_sd.db,Deformations_mp +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 +color = 633 +style = 1 + +[alignment:alignment_hp1400] +title=alignment_hp1400 +globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/cayou/CMSSW_7_4_6_patch5/src/Alignment/HIPAlignmentAlgorithm/hp1400/alignments_iter20.db, Alignments +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/xiaomeng/Inflate/CMSSW_7_4_0_pre6/src/Alignment/HIPAlignmentAlgorithm/MP1700_sd.db,Deformations_mp +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 +color = 633 +style = 1 + +[alignment:alignment_hp1401] +title=alignment_hp1401 +globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/cayou/CMSSW_7_4_6_patch5/src/Alignment/HIPAlignmentAlgorithm/hp1401/alignments_iter30.db, Alignments +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/xiaomeng/Inflate/CMSSW_7_4_0_pre6/src/Alignment/HIPAlignmentAlgorithm/MP1700_sd.db,Deformations_mp +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 color = 633 style = 1 [alignment:alignment_mp1819] title=alignment_mp1819 globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1819/jobData/jobm/alignments_MP.db, Alignments condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1819/jobData/jobm/alignments_MP.db, Deformations -condition TrackerAlignmentErrorExtendedRcd = zeroAPE condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 color = 633 style = 1 [alignment:alignment_mp1820] title=alignment_mp1820 globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1820/jobData/jobm/alignments_MP.db, Alignments condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1820/jobData/jobm/alignments_MP.db, Deformations -condition TrackerAlignmentErrorExtendedRcd = zeroAPE condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 +color = 633 +style = 1 + +[alignment:alignment_mp1823p4] +title=alignment_mp1823p4 +globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1823/jobData/jobm4/alignments_MP.db, Alignments +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1823/jobData/jobm4/alignments_MP.db, Deformations +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 color = 633 style = 1 -[alignment:alignment_0] -title=alignment_{0} -globaltag = FT_R_53_V6C::All -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1183/jobData/jobm/alignments_MP.db, Alignments -condition TrackerAlignmentErrorExtendedRcd = zeroAPE -# `zeroAPE` is a shorthand for the following commented line -# condition TrackerAlignmentErrorExtendedRcd = frontier://FrontierProd/CMS_COND_31X_FROM21X, TrackerIdealGeometryErrors210_mc -condition SiStripConfObjectRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1025/SiStripShiftAndCrosstalk_GR10_v2_offline_BPCorrected.db,SiStripShiftAndCrosstalk_GR10_v2_offline_BPCorrected -condition SiStripLorentzAngleRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1025/SiStripLorentzAngleDeco_GR10_v1_offline_BPCorrected.db,SiStripLorentzAngleDeco_GR10_v1_offline_BPCorrected, deconvolution -condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_COND_31X_PIXEL,SiPixelTemplateDBObject_38T_v4_mc -color = 419 -style = 2 - -[alignment:alignment_1] -title=alignment_{1} +[alignment:alignment_mp1826p2] +title=alignment_mp1826p2 globaltag = GR_P_V56 -#condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1206/jobData/jobm/alignments_MP.db, Alignments -#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_COND_31X_PIXEL,SiPixelTemplateDBObject_38T_v4_mc +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1826/jobData/jobm2/alignments_MP.db, Alignments +#condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1826/jobData/jobm2/alignments_MP.db, Deformations +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 color = 633 style = 1 -[alignment:mp1260baseline] -globaltag = FT_R_53_V6C::All -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1260/jobData/jobm/alignments_MP.db, Alignments -condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1260/jobData/jobm/alignments_MP.db, Deformations -color = 600 -style = 2 - -[alignment:mp1260m1] -globaltag = FT_R_53_V6C::All -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1260/jobData/jobm1/alignments_MP.db, Alignments -condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1260/jobData/jobm1/alignments_MP.db, Deformations -color = 4 +# No Zmumu +[alignment:alignment_mp1826p1] +title=alignment_mp1826p1 +globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1826/jobData/jobm1/alignments_MP.db, Alignments +condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1826/jobData/jobm1/alignments_MP.db, Deformations +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 +color = 633 +style = 1 + +[alignment:alignment_mp1834p0] +title=alignment_mp1834p0 +globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1834/jobData/jobm/alignments_MP.db, Alignments +#condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1834/jobData/jobm/alignments_MP.db, Deformations +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 +color = 633 +style = 1 + +# No Zmumu +[alignment:alignment_mp1834p1] +title=alignment_mp1834p1 +globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1834/jobData/jobm1/alignments_MP.db, Alignments +#condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1834/jobData/jobm1/alignments_MP.db, Deformations +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 +color = 633 style = 1 ############################################################################### # configuration of individual validations -[zmumu:zmumu_test] -etamaxneg = 2.4 -etaminneg = -2.4 -etamaxpos = 2.4 -etaminpos = -2.4 -maxevents = -1 -firstRun=251604 -lastRun=251642 -#cmssw = /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/data/commonValidation/CMSSW_5_3_4_patch2 -dataset = /DoubleMuon/Run2015B-TkAlZMuMu-PromptReco-v1/ALCARECO - [zmumu:Run2015B_ALCARECO_251604-251642] etamaxneg = 2.4 etaminneg = -2.4 @@ -120,8 +211,18 @@ dataset = /DoubleMuon/Run2015B-TkAlZMuMu-PromptReco-v1/ALCARECO # configure which validation to run on which alignment [validation] -#compare Tracker: mp1260m1 1, mp1260baseline #zmumu Run2015B_ALCARECO_251604-251642 : alignment_defgt -zmumu Run2015B_ALCARECO_251604-251642 : alignment_hp1394 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_PCL +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_hp1394 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_hp1398 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_hp1400 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_hp1401 #zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1819 #zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1820 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1823p4 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1826p1 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1826p2 +zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1834p0 +zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1834p1 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1835p0 +#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1835p1 From 62bc6a946cea0e19ba5f163a43cb749052025a60 Mon Sep 17 00:00:00 2001 From: Heshy Roskes Date: Fri, 4 Sep 2015 12:02:45 +0200 Subject: [PATCH 06/34] - don't delete the validation job directory - random number in geometry comparison filename is no longer necessary because the run number is part of the name --- .../TkAlAllInOneTool/geometryComparison.py | 15 +++++---------- .../scripts/validateAlignments.py | 19 +------------------ 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py index 4fd9db01f7c66..ff69e90769477 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py @@ -11,7 +11,7 @@ class GeometryComparison(GenericValidation): Object representing a geometry comparison job. """ def __init__( self, valName, alignment, referenceAlignment, - config, copyImages = True, randomWorkdirPart = None): + config, copyImages = True): """ Constructor of the GeometryComparison class. @@ -24,9 +24,6 @@ def __init__( self, valName, alignment, referenceAlignment, configuration of the validations - `copyImages`: Boolean which indicates whether png- and pdf-files should be copied back from the batch farm - - `randomWorkDirPart`: If this option is ommitted a random number is - generated to create unique path names for the - individual validation instances. """ defaults = { "3DSubdetector1":"1", @@ -37,8 +34,6 @@ def __init__( self, valName, alignment, referenceAlignment, GenericValidation.__init__(self, valName, alignment, config, "compare", addDefaults=defaults, addMandatories = mandatories) - if not randomWorkdirPart == None: - self.randomWorkdirPart = randomWorkdirPart self.referenceAlignment = referenceAlignment referenceName = "IDEAL" if not self.referenceAlignment == "IDEAL": @@ -82,14 +77,14 @@ def getRepMap(self, alignment = None): def createConfiguration(self, path ): # self.__compares repMap = self.getRepMap() - cfgFileName = "TkAlCompareToNTuple.%s.%s_cfg.py"%( - self.alignmentToValidate.name, self.randomWorkdirPart) + cfgFileName = "TkAlCompareToNTuple.%s_cfg.py"%( + self.alignmentToValidate.name) cfgs = {cfgFileName: configTemplates.intoNTuplesTemplate} repMaps = {cfgFileName: repMap} if not self.referenceAlignment == "IDEAL": referenceRepMap = self.getRepMap( self.referenceAlignment ) - cfgFileName = "TkAlCompareToNTuple.%s.%s_cfg.py"%( - self.referenceAlignment.name, self.randomWorkdirPart ) + cfgFileName = "TkAlCompareToNTuple.%s_cfg.py"%( + self.referenceAlignment.name ) cfgs[cfgFileName] = configTemplates.intoNTuplesTemplate repMaps[cfgFileName] = referenceRepMap diff --git a/Alignment/OfflineValidation/scripts/validateAlignments.py b/Alignment/OfflineValidation/scripts/validateAlignments.py index 4d47da58ff235..28568a80646f5 100755 --- a/Alignment/OfflineValidation/scripts/validateAlignments.py +++ b/Alignment/OfflineValidation/scripts/validateAlignments.py @@ -109,22 +109,10 @@ def __getValidation( self, valType, name, alignments, config, options ): secondAlign = Alignment( secondAlignName, self.__config, secondRun ) secondAlignName = secondAlign.name - # check if alignment was already compared previously - try: - randomWorkdirPart = \ - globalDictionaries.alignRandDict[firstAlignName] - except KeyError: - randomWorkdirPart = None validation = GeometryComparison( name, firstAlign, secondAlign, self.__config, - self.__commandLineOptions.getImages, - randomWorkdirPart ) - globalDictionaries.alignRandDict[firstAlignName] = \ - validation.randomWorkdirPart - if not secondAlignName == "IDEAL": - globalDictionaries.alignRandDict[secondAlignName] = \ - validation.randomWorkdirPart + self.__commandLineOptions.getImages) elif valType == "offline": validation = OfflineValidation( name, Alignment( alignments.strip(), self.__config ), self.__config ) @@ -506,11 +494,6 @@ def main(argv = None): config.set("general","logdir",os.path.join(general["logdir"],options.Name) ) config.set("general","eosdir",os.path.join("AlignmentValidation", general["eosdir"], options.Name) ) - # clean up of log directory to avoid cluttering with files with different - # random numbers for geometry comparison - if os.path.isdir( outPath ): - shutil.rmtree( outPath ) - if not os.path.exists( outPath ): os.makedirs( outPath ) elif not os.path.isdir( outPath ): From 4e38868212653d065981be811ef5f52bf1ae161b Mon Sep 17 00:00:00 2001 From: Heshy Roskes Date: Tue, 8 Sep 2015 17:18:23 +0200 Subject: [PATCH 07/34] Easier kind of preexistingvalidation, just put * in front --- .../python/TkAlAllInOneTool/preexistingValidation.py | 3 ++- .../OfflineValidation/scripts/validateAlignments.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/preexistingValidation.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/preexistingValidation.py index cb270eabcd3a0..f2a7ceda5ac03 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/preexistingValidation.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/preexistingValidation.py @@ -42,6 +42,7 @@ def __init__(self, valName, config, valType, config.checkInput("preexisting"+valType+":"+self.name, knownSimpleOptions = knownOpts, ignoreOptions = ignoreOpts) + self.jobmode = None def getRepMap(self): result = self.general @@ -74,7 +75,7 @@ def getCompareStrings( self, requestId = None, plain = False ): def createFiles(self, *args, **kwargs): raise AllInOneError("Shouldn't be here...") def createConfiguration(self, *args, **kwargs): - raise AllInOneError("Shouldn't be here...") + pass def createScript(self, *args, **kwargs): raise AllInOneError("Shouldn't be here...") def createCrabCfg(self, *args, **kwargs): diff --git a/Alignment/OfflineValidation/scripts/validateAlignments.py b/Alignment/OfflineValidation/scripts/validateAlignments.py index 28568a80646f5..03a6d7f97590e 100755 --- a/Alignment/OfflineValidation/scripts/validateAlignments.py +++ b/Alignment/OfflineValidation/scripts/validateAlignments.py @@ -67,6 +67,11 @@ def __init__( self, validation, config, options ): self.__valName = valString[1] self.__commandLineOptions = options self.__config = config + self.__preexisting = ("preexisting" in self.__valType) + if self.__valType[0] == "*": + self.__valType = self.__valType[1:] + self.__preexisting = True + # workaround for intermediate parallel version if self.__valType == "offlineParallel": print ("offlineParallel and offline are now the same. To run an offline parallel validation,\n" @@ -136,13 +141,14 @@ def __getValidation( self, valType, name, alignments, config, options ): Alignment( alignments.strip(), self.__config ), self.__config ) else: raise AllInOneError, "Unknown validation mode '%s'"%valType - self.preexisting = ("preexisting" in valType) return validation def __createJob( self, jobMode, outpath ): """This private method creates the needed files for the validation job. """ self.validation.createConfiguration( outpath ) + if self.__preexisting: + return self.__scripts = sum([addIndex(script, self.validation.NJobs) for script in self.validation.createScript( outpath )], []) if jobMode.split( ',' )[0] == "crab": self.validation.createCrabCfg( outpath ) @@ -150,13 +156,11 @@ def __createJob( self, jobMode, outpath ): def createJob(self): """This is the method called to create the job files.""" - if self.preexisting: - return self.__createJob( self.validation.jobmode, os.path.abspath( self.__commandLineOptions.Name) ) def runJob( self ): - if self.preexisting: + if self.__preexisting: log = "> " + self.validation.name + " is already validated." print log return log From fce6e5bc8eb54a7d10f9fd5685f5763562752342 Mon Sep 17 00:00:00 2001 From: Heshy Roskes Date: Tue, 8 Sep 2015 17:19:13 +0200 Subject: [PATCH 08/34] Surface deformations by default for preexisting offline --- .../python/TkAlAllInOneTool/preexistingValidation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/preexistingValidation.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/preexistingValidation.py index f2a7ceda5ac03..7f8001c763dd8 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/preexistingValidation.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/preexistingValidation.py @@ -89,7 +89,7 @@ def __init__(self, valName, config, "DMRMinimum":"30", "DMROptions":"", "OfflineTreeBaseDir":"TrackHitFilter", - "SurfaceShapes":"none" + "SurfaceShapes":"coarse", } defaults.update(addDefaults) PreexistingValidation.__init__(self, valName, config, "offline", From 3dd9eb0947df0b529a722d2beaa31abbe0bbac43 Mon Sep 17 00:00:00 2001 From: usarica Date: Thu, 10 Sep 2015 14:59:42 +0200 Subject: [PATCH 09/34] Compatibility with #10477 --- .../zMuMuValidationTemplates.py | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py index 9b19c145473ae..b642fe37f82eb 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py @@ -23,11 +23,11 @@ ########### standard includes ############################## process.load("Configuration.StandardSequences..oO[magneticField]Oo._cff") process.load("Configuration.StandardSequences.Reconstruction_cff") -process.load("Configuration.Geometry.GeometryDB_cff") +process.load("Configuration.Geometry.GeometryRecoDB_cff") ########### DATABASE conditions ############################ -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") process.GlobalTag.globaltag = ".oO[GlobalTag]Oo." .oO[condLoad]Oo. @@ -114,10 +114,14 @@ parSmear = cms.vdouble(), ### taken from J/Psi ######################### - ResolFitType = cms.int32(14), - parResol = cms.vdouble(0.007,0.015, -0.00077, 0.0063, 0.0018, 0.0164), - parResolFix = cms.vint32(0, 0, 0,0, 0,0), - parResolOrder = cms.vint32(0, 0, 0, 0, 0, 0), +# ResolFitType = cms.int32(14), +# parResol = cms.vdouble(0.007,0.015, -0.00077, 0.0063, 0.0018, 0.0164), +# parResolFix = cms.vint32(0, 0, 0,0, 0,0), +# parResolOrder = cms.vint32(0, 0, 0, 0, 0, 0), + ResolFitType = cms.int32(0), + parResol = cms.vdouble(0), + parResolFix = cms.vint32(0), + parResolOrder = cms.vint32(0), # -------------------- # @@ -125,10 +129,14 @@ # -------------------- # # ----------------------------------------------------------------------------------- - ScaleFitType = cms.int32(18), - parScaleOrder = cms.vint32(0, 0, 0, 0), - parScaleFix = cms.vint32(0, 0, 0, 0), - parScale = cms.vdouble(1, 1, 1, 1), +# ScaleFitType = cms.int32(18), +# parScaleOrder = cms.vint32(0, 0, 0, 0), +# parScaleFix = cms.vint32(0, 0, 0, 0), +# parScale = cms.vdouble(1, 1, 1, 1), + ScaleFitType = cms.int32(0), + parScaleOrder = cms.vint32(0), + parScaleFix = cms.vint32(0), + parScale = cms.vdouble(0), From 2e550beae8cdd239454eec98d3806f5a66d22551 Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 29 Jul 2015 02:53:11 +0200 Subject: [PATCH 10/34] merge SLHC updates for CaloTowers (cherry-pick and resolve conflicts) --- CondTools/Geometry/plugins/calowriters.cc | 154 ++++++++ DataFormats/CaloTowers/interface/CaloTower.h | 27 +- .../CaloTowers/interface/CaloTowerDetId.h | 27 -- DataFormats/CaloTowers/src/CaloTower.cc | 26 +- DataFormats/CaloTowers/src/CaloTowerDetId.cc | 50 --- DataFormats/CaloTowers/src/classes_def.xml | 3 +- .../CaloTowerConstituentsMapBuilder.cc | 124 ++++-- .../plugins/CaloTowerConstituentsMapBuilder.h | 2 + .../CaloEventSetup/python/CaloGeometry_cff.py | 1 + Geometry/CaloGeometry/src/CaloGenericDetId.cc | 116 +++--- .../interface/CaloTowerConstituentsMap.h | 6 +- .../interface/CaloTowerTopology.h | 41 +- .../src/CaloTowerConstituentsMap.cc | 60 +-- .../CaloTopology/src/CaloTowerTopology.cc | 156 ++++++-- Geometry/CaloTopology/src/ES_Topologies.cc | 2 + Geometry/CaloTopology/test/BuildFile.xml | 3 +- .../test/CaloTowerTopologyTester.cc | 83 ++++ .../test/python/testCaloTowerTopology_cfg.py | 52 +++ .../python/testCaloTowerTopology_cfg_dump.py | 222 +++++++++++ .../EcalTBHodoscopeGeometryLoaderFromDDD.cc | 4 +- .../interface/CaloTowerTopologyEP.h | 44 +++ .../python/CaloTowerTopology_cfi.py | 3 + .../src/CaloTowerHardcodeGeometryEP.cc | 20 +- .../HcalEventSetup/src/CaloTowerTopologyEP.cc | 70 ++++ Geometry/HcalEventSetup/src/SealModule.cc | 4 + Geometry/HcalEventSetup/src/moduleDB.cc | 370 ++++++++++++------ .../interface/CaloTowerGeometry.h | 25 +- .../CaloTowerHardcodeGeometryLoader.h | 4 +- .../HcalTowerAlgo/src/CaloTowerGeometry.cc | 75 ++-- .../src/CaloTowerHardcodeGeometryLoader.cc | 20 +- .../HLTanalyzers/interface/HLTAnalyzer.h | 2 + HLTrigger/HLTanalyzers/interface/HLTJets.h | 2 + HLTrigger/HLTanalyzers/src/HLTAnalyzer.cc | 4 + HLTrigger/HLTanalyzers/src/HLTJets.cc | 13 +- .../JetMET/src/HLTHcalTowerNoiseCleaner.cc | 10 +- .../interface/CaloTowersCreationAlgo.h | 17 +- .../python/calotowermaker_cfi.py | 5 +- .../python/calotowerremaker_cfi.py | 3 +- .../src/CaloTowersCreationAlgo.cc | 192 +++++---- .../src/CaloTowersCreator.cc | 12 +- .../src/CaloTowersReCreator.cc | 12 +- .../src/CaloTowersReCreator.h | 1 + .../CaloTowersCreator/test/BuildFile.xml | 0 .../test/CaloTowerCreatorTest.cpp | 117 ------ .../PFClusterProducer/src/Navigators.cc | 5 +- .../RecoTau/interface/CaloRecoTauAlgorithm.h | 2 +- .../RecoTau/src/CaloRecoTauAlgorithm.cc | 7 +- .../EcalTestBeam/interface/HodoscopeDetId.h | 6 +- .../EcalTestBeam/src/HodoscopeDetId.cc | 8 +- 49 files changed, 1550 insertions(+), 662 deletions(-) create mode 100644 Geometry/CaloTopology/test/CaloTowerTopologyTester.cc create mode 100644 Geometry/CaloTopology/test/python/testCaloTowerTopology_cfg.py create mode 100644 Geometry/CaloTopology/test/python/testCaloTowerTopology_cfg_dump.py create mode 100644 Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h create mode 100644 Geometry/HcalEventSetup/python/CaloTowerTopology_cfi.py create mode 100644 Geometry/HcalEventSetup/src/CaloTowerTopologyEP.cc delete mode 100644 RecoLocalCalo/CaloTowersCreator/test/BuildFile.xml delete mode 100644 RecoLocalCalo/CaloTowersCreator/test/CaloTowerCreatorTest.cpp diff --git a/CondTools/Geometry/plugins/calowriters.cc b/CondTools/Geometry/plugins/calowriters.cc index 90fa9254b6c6e..0edd5dd68a2ea 100644 --- a/CondTools/Geometry/plugins/calowriters.cc +++ b/CondTools/Geometry/plugins/calowriters.cc @@ -166,6 +166,160 @@ CaloGeometryDBEP::produceAligned( const type return ptr ; } + +template<> +CaloGeometryDBEP::PtrType +CaloGeometryDBEP::produceAligned( const typename CaloTowerGeometry::AlignedRecord& iRecord ) { + + const Alignments* alignPtr ( 0 ) ; + const Alignments* globalPtr ( 0 ) ; + if( m_applyAlignment ) { // get ptr if necessary + edm::ESHandle< Alignments > alignments ; + iRecord.getRecord< typename CaloTowerGeometry::AlignmentRecord >().get( alignments ) ; + + assert( alignments.isValid() && // require valid alignments and expected sizet + ( alignments->m_align.size() == CaloTowerGeometry::numberOfAlignments() ) ) ; + alignPtr = alignments.product() ; + + edm::ESHandle< Alignments > globals ; + iRecord.getRecord().get( globals ) ; + + assert( globals.isValid() ) ; + globalPtr = globals.product() ; + } + + TrVec tvec ; + DimVec dvec ; + IVec ivec ; + IVec dins ; + + if( CaloGeometryDBWriter::writeFlag() ) { + edm::ESHandle pG ; + iRecord.get( CaloTowerGeometry::producerTag() + std::string("_master"), pG ) ; + + const CaloSubdetectorGeometry* pGptr ( pG.product() ) ; + + pGptr->getSummary( tvec, ivec, dvec, dins ) ; + + CaloGeometryDBWriter::writeIndexed( tvec, dvec, ivec, dins, CaloTowerGeometry::dbString() ) ; + } else { + edm::ESHandle pG ; + iRecord.getRecord().get( pG ) ; + + tvec = pG->getTranslation() ; + dvec = pG->getDimension() ; + ivec = pG->getIndexes() ; + dins = pG->getDenseIndices(); + } +//********************************************************************************************* + + edm::ESHandle caloTopology; + iRecord.getRecord().get( caloTopology ); + + + CaloTowerGeometry* ctg=new CaloTowerGeometry( &*caloTopology ); + + const unsigned int nTrParm ( tvec.size()/ctg->numberOfCellsForCorners() ) ; + + assert( dvec.size() == ctg->numberOfShapes() * CaloTowerGeometry::k_NumberOfParametersPerShape ) ; + + + PtrType ptr ( ctg ) ; + + ptr->fillDefaultNamedParameters() ; + + ptr->allocateCorners( ctg->numberOfCellsForCorners() ) ; + + ptr->allocatePar( dvec.size() , + CaloTowerGeometry::k_NumberOfParametersPerShape ) ; + + for( unsigned int i ( 0 ) ; i < dins.size() ; ++i ) { + const unsigned int nPerShape ( ctg->numberOfParametersPerShape() ) ; + DimVec dims ; + dims.reserve( nPerShape ) ; + + const unsigned int indx ( ivec.size()==1 ? 0 : i ) ; + + DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ; + + for( unsigned int j ( 0 ) ; j != nPerShape ; ++j ) { + dims.push_back( *dsrc ) ; + ++dsrc ; + } + + const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims, + ptr->parMgr(), + ptr->parVecVec() )); + + + const DetId id ( caloTopology->detIdFromDenseIndex(dins[i]) ) ; + + const unsigned int iGlob ( 0 == globalPtr ? 0 : + ctg->alignmentTransformIndexGlobal( id ) ) ; + + assert( 0 == globalPtr || iGlob < globalPtr->m_align.size() ) ; + + const AlignTransform* gt ( 0 == globalPtr ? 0 : &globalPtr->m_align[ iGlob ] ) ; + + assert( 0 == gt || iGlob == ctg->alignmentTransformIndexGlobal( DetId( gt->rawId() ) ) ) ; + + const unsigned int iLoc ( 0 == alignPtr ? 0 : + ctg->alignmentTransformIndexLocal( id ) ) ; + + assert( 0 == alignPtr || iLoc < alignPtr->m_align.size() ) ; + + const AlignTransform* at ( 0 == alignPtr ? 0 : + &alignPtr->m_align[ iLoc ] ) ; + + assert( 0 == at || ( ctg->alignmentTransformIndexLocal( DetId( at->rawId() ) ) == iLoc ) ) ; + + const CaloGenericDetId gId ( id ) ; + + Pt3D lRef ; + Pt3DVec lc ( 8, Pt3D(0,0,0) ) ; + ctg->localCorners( lc, &dims.front(), dins[i], lRef ) ; + + const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ; // ctr rear face in local + const Pt3D lCor ( lc[0] ) ; + + //----------------------------------- create transform from 6 numbers --- + const unsigned int jj ( i*nTrParm ) ; + Tr3D tr ; + const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ; + const ROOT::Math::EulerAngles ea ( + 6==nTrParm ? + ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) : + ROOT::Math::EulerAngles() ) ; + const ROOT::Math::Transform3D rt ( ea, tl ) ; + double xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz; + rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ; + tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz, + yx, yy, yz, + zx, zy, zz ), + CLHEP::Hep3Vector(dx,dy,dz) ); + + // now prepend alignment(s) for final transform + const Tr3D atr ( 0 == at ? tr : + ( 0 == gt ? at->transform()*tr : + at->transform()*gt->transform()*tr ) ) ; + //--------------------------------- done making transform --------------- + + const Pt3D gRef ( atr*lRef ) ; + const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ; + const Pt3D gBck ( atr*lBck ) ; + const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ; + const Pt3D gCor ( atr*lCor ) ; + const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ; + + assert( caloTopology->denseIndex(id) == dins[i] ); + + ptr->newCell( fCtr, fBck, fCor, myParm, id ) ; + } + + ptr->initializeParms() ; // initializations; must happen after cells filled + + return ptr ; +} template class CaloGeometryDBEP< EcalBarrelGeometry , CaloGeometryDBWriter> ; template class CaloGeometryDBEP< EcalEndcapGeometry , CaloGeometryDBWriter> ; diff --git a/DataFormats/CaloTowers/interface/CaloTower.h b/DataFormats/CaloTowers/interface/CaloTower.h index 89ec0a0b6315a..dc3dbed78d1e3 100644 --- a/DataFormats/CaloTowers/interface/CaloTower.h +++ b/DataFormats/CaloTowers/interface/CaloTower.h @@ -67,6 +67,15 @@ class CaloTower : public reco::LeafCandidate { void setEcalTime(int t) { ecalTime_ = t; }; void setHcalTime(int t) { hcalTime_ = t; }; + void setHcalLimits(int firstHB, int lastHB, + int firstHE, int lastHE, + int firstHF, int lastHF, + int firstHO, int lastHO) { + firstHBRing_ = firstHB; lastHBRing_ = lastHB; + firstHERing_ = firstHE; lastHERing_ = lastHE; + firstHFRing_ = firstHF; lastHFRing_ = lastHF; + firstHORing_ = firstHO; lastHORing_ = lastHO; + } // set CaloTower status based on the number of // bad/recovered/problematic cells in ECAL and HCAL @@ -93,12 +102,12 @@ class CaloTower : public reco::LeafCandidate { // energy in HO ("outerEnergy")is not included in "hadEnergy" double emEnergy() const { return emE_ ; } double hadEnergy() const { return hadE_ ; } - double outerEnergy() const { return (id_.ietaAbs()<16)? outerE_ : 0.0; } + double outerEnergy() const { return (id_.ietaAbs()<=lastHORing_)? outerE_ : 0.0; } // transverse energies wrt to vtx (0,0,0) double emEt() const { return emE_ * sin( theta() ); } double hadEt() const { return hadE_ * sin( theta() ); } - double outerEt() const { return (id_.ietaAbs()<16)? outerE_ * sin( theta() ) : 0.0; } + double outerEt() const { return (id_.ietaAbs()<=lastHORing_)? outerE_ * sin( theta() ) : 0.0; } // preserve the inherited default accessors where applicable @@ -117,7 +126,7 @@ class CaloTower : public reco::LeafCandidate { double emEt(double vtxZ) const { return emE_ * sin(p4(vtxZ).theta()); } double hadEt(double vtxZ) const { return hadE_ * sin(p4(vtxZ).theta()); } - double outerEt(double vtxZ) const { return (id_.ietaAbs()<16)? outerE_ * sin(p4(vtxZ).theta()) : 0.0; } + double outerEt(double vtxZ) const { return (id_.ietaAbs()<=lastHORing_)? outerE_ * sin(p4(vtxZ).theta()) : 0.0; } // recalculated wrt vertex provided as 3D point @@ -127,7 +136,7 @@ class CaloTower : public reco::LeafCandidate { double emEt(const Point& v) const { return emE_ * sin(p4(v).theta()); } double hadEt(const Point& v) const { return hadE_ * sin(p4(v).theta()); } - double outerEt(const Point& v) const { return (id_.ietaAbs()<16)? outerE_ * sin(p4(v).theta()) : 0.0; } + double outerEt(const Point& v) const { return (id_.ietaAbs()<=lastHORing_)? outerE_ * sin(p4(v).theta()) : 0.0; } double hottestCellE() const { return hottestCellE_; } @@ -148,8 +157,8 @@ class CaloTower : public reco::LeafCandidate { int hadLv11() const { return hadLvl1_; } // energy contained in depths>1 in the HE for 18<|iEta|<29 - double hadEnergyHeOuterLayer() const { return (id_.ietaAbs()<18 || id_.ietaAbs()>29)? 0 : outerE_; } - double hadEnergyHeInnerLayer() const { return (id_.ietaAbs()<18 || id_.ietaAbs()>29)? 0 : hadE_ - outerE_; } + double hadEnergyHeOuterLayer() const { return (id_.ietaAbs()<=firstHERing_+1 || id_.ietaAbs()>lastHERing_)? 0 : outerE_; } + double hadEnergyHeInnerLayer() const { return (id_.ietaAbs()<=firstHERing_+1 || id_.ietaAbs()>lastHERing_)? 0 : hadE_ - outerE_; } // energy in the tower by HCAL subdetector // This is trivial except for tower 16 @@ -198,6 +207,12 @@ class CaloTower : public reco::LeafCandidate { GlobalPoint emPosition_; GlobalPoint hadPosition_; + //hcal limits in CT continuous ieta (from CaloTowerTopology) + int firstHBRing_, lastHBRing_; + int firstHERing_, lastHERing_; + int firstHFRing_, lastHFRing_; + int firstHORing_, lastHORing_; + // time int ecalTime_; int hcalTime_; diff --git a/DataFormats/CaloTowers/interface/CaloTowerDetId.h b/DataFormats/CaloTowers/interface/CaloTowerDetId.h index dd99658582ad5..9b9136f841c29 100644 --- a/DataFormats/CaloTowers/interface/CaloTowerDetId.h +++ b/DataFormats/CaloTowers/interface/CaloTowerDetId.h @@ -33,33 +33,6 @@ class CaloTowerDetId : public DetId { static const int SubdetId = 1; - static bool validDetId( int ie , int ip ) ; - - uint32_t denseIndex() const ; - - static CaloTowerDetId detIdFromDenseIndex( uint32_t din ) ; - - static bool validDenseIndex( uint32_t din ) { return ( din < kSizeForDenseIndexing ) ; } - - enum { kMaxIEta = 41 , - kMaxIPhi = 72 , - kBarNPhi = kMaxIPhi , - kEndNPhi = kMaxIPhi/2 , - kForNPhi = kMaxIPhi/4 , - kBarIEta = 20 , - kEndIEta = 39 , - kForIEta = kMaxIEta , - kBarNEta = kBarIEta , - kEndNEta = kEndIEta - kBarNEta , - kForNEta = kForIEta - kEndIEta , - kBarNTot = kBarNPhi*kBarNEta , - kEndNTot = kEndNPhi*kEndNEta , - kForNTot = kForNPhi*kForNEta , - kAllNTot = kBarNTot + kEndNTot + kForNTot , - kNIndex = 2*kAllNTot } ; - - enum { kSizeForDenseIndexing = kNIndex } ; - }; std::ostream& operator<<(std::ostream&, const CaloTowerDetId& id); diff --git a/DataFormats/CaloTowers/src/CaloTower.cc b/DataFormats/CaloTowers/src/CaloTower.cc index d9a6d05a3bf26..f5630138e07e0 100644 --- a/DataFormats/CaloTowers/src/CaloTower.cc +++ b/DataFormats/CaloTowers/src/CaloTower.cc @@ -66,7 +66,7 @@ math::PtEtaPhiMLorentzVector CaloTower::hadP4(double vtxZ) const { // note: for now we use the same position for HO as for the other detectors double hcalTot; - if (abs(ieta())<16) hcalTot = (energy() - emE_); + if (abs(ieta())<=lastHORing_) hcalTot = (energy() - emE_); else hcalTot = hadE_; if (hcalTot>0) { @@ -102,7 +102,7 @@ math::PtEtaPhiMLorentzVector CaloTower::hadP4(const Point& v) const { // note: for now we use the same position for HO as for the other detectors double hcalTot; - if (abs(ieta())<16) hcalTot = (energy() - emE_); + if (abs(ieta())<=lastHORing_) hcalTot = (energy() - emE_); else hcalTot = hadE_; if (hcalTot>0) { @@ -128,7 +128,7 @@ math::PtEtaPhiMLorentzVector CaloTower::emP4(const Point& v) const { math::PtEtaPhiMLorentzVector CaloTower::p4(double vtxZ) const { - if (abs(ieta())<=29) { + if (abs(ieta())<=lastHERing_) { return (emP4(vtxZ)+hadP4(vtxZ)); } // em and had energy in HF are defined in a special way @@ -141,7 +141,7 @@ math::PtEtaPhiMLorentzVector CaloTower::p4(double vtxZ) const { math::PtEtaPhiMLorentzVector CaloTower::p4(const Point& v) const { - if (abs(ieta())<=29) { + if (abs(ieta())<=lastHERing_) { return emP4(v)+hadP4(v); } // em and had energy in HF are defined in a special way @@ -155,7 +155,7 @@ math::PtEtaPhiMLorentzVector CaloTower::p4(const Point& v) const { math::PtEtaPhiMLorentzVector CaloTower::p4_HO(const Point& v) const { - if (ietaAbs()>15 || outerE_<0) return math::PtEtaPhiMLorentzVector(0,0,0,0); + if (ietaAbs()>lastHORing_ || outerE_<0) return math::PtEtaPhiMLorentzVector(0,0,0,0); GlobalPoint p(v.x(), v.y(), v.z()); math::XYZVector dir = math::XYZVector(hadPosition_ - p); @@ -169,7 +169,7 @@ math::PtEtaPhiMLorentzVector CaloTower::p4_HO(double vtxZ) const { math::PtEtaPhiMLorentzVector CaloTower::p4_HO() const { - if (ietaAbs()>15 || outerE_<0) return math::PtEtaPhiMLorentzVector(0.0,0.0,0.0,0.0); + if (ietaAbs()>lastHORing_ || outerE_<0) return math::PtEtaPhiMLorentzVector(0.0,0.0,0.0,0.0); return math::PtEtaPhiMLorentzVector(outerE_ * sin(hadPosition_.theta()), hadPosition_.eta(), hadPosition_.phi(), 0.0); } @@ -180,7 +180,7 @@ void CaloTower::addConstituents( const std::vector& ids ) { } int CaloTower::numCrystals() const { - if (id_.ietaAbs()>29) return 0; + if (id_.ietaAbs()>lastHERing_) return 0; int nC = 0; std::vector::const_iterator it = constituents_.begin(); @@ -220,19 +220,19 @@ void CaloTower::setCaloTowerStatus(unsigned int numBadHcalChan,unsigned int numB // needed by JetMET cleanup in AOD. double CaloTower::energyInHB() const { - if (id_.ietaAbs()<16) return hadE_; - else if (id_.ietaAbs()==16) return hadE_-outerE_; + if (id_.ietaAbs()16 && id_.ietaAbs()<30) return hadE_; - else if (id_.ietaAbs()==16) return outerE_; + if (id_.ietaAbs()>firstHERing_ && id_.ietaAbs()<=lastHERing_) return hadE_; + else if (id_.ietaAbs()==firstHERing_) return outerE_; else return 0.0; } double CaloTower::energyInHF() const { - if (id_.ietaAbs()>29) return energy(); + if (id_.ietaAbs()>=firstHFRing_) return energy(); else return 0.0; } @@ -242,7 +242,7 @@ double CaloTower::energyInHF() const { // when HO was not used double CaloTower::energyInHO() const { - if (id_.ietaAbs()>15) return 0.0; + if (id_.ietaAbs()>lastHORing_) return 0.0; else return (energy() - hadE_ -emE_); } diff --git a/DataFormats/CaloTowers/src/CaloTowerDetId.cc b/DataFormats/CaloTowers/src/CaloTowerDetId.cc index 40070404b6ee8..4c97b528958f8 100644 --- a/DataFormats/CaloTowers/src/CaloTowerDetId.cc +++ b/DataFormats/CaloTowers/src/CaloTowerDetId.cc @@ -33,56 +33,6 @@ CaloTowerDetId& CaloTowerDetId::operator=(const DetId& gen) { int CaloTowerDetId::iphi() const { int retval=id_&0x7F; return retval; -} - -bool -CaloTowerDetId::validDetId( int ie , int ip ) -{ - const int ia ( abs( ie ) ) ; - return ( ( ia >= 1 ) && - ( ip >= 1 ) && - ( ia <= kMaxIEta ) && - ( ip <= kMaxIPhi ) && - ( ( ( ia <= kBarIEta ) && - ( ip <= kBarNPhi ) ) || - ( ( ia > kBarIEta ) && - ( ia <= kEndIEta ) && - ( (ip-1)%2 == 0 ) ) || - ( ( ia > kEndIEta ) && - ( ia <= kForIEta ) && - ( (ip-3)%4 == 0 ) ) ) ) ; -} - -uint32_t -CaloTowerDetId::denseIndex() const -{ - const uint32_t ie ( ietaAbs() ) ; - const uint32_t ip ( iphi() - 1 ) ; - - return ( ( 0 > zside() ? 0 : kAllNTot ) + - ( ( kBarIEta >= ie ? ( ie - 1 )*kBarNPhi + ip : - ( kEndIEta >= ie ? kBarNTot + ( ie - 1 - kBarIEta )*kEndNPhi + ip/2 : - kBarNTot + kEndNTot + ( ie - 1 - kEndIEta )*kForNPhi + ip/4 ) ) ) ) ; -} - -CaloTowerDetId -CaloTowerDetId::detIdFromDenseIndex( uint32_t din ) -{ - const int iz ( din < kAllNTot ? -1 : 1 ) ; - din %= kAllNTot ; - const uint32_t ie ( ( kBarNTot + kEndNTot ) - 1 < din ? - kEndIEta + ( din - kBarNTot - kEndNTot )/kForNPhi + 1 : - ( kBarNTot - 1 < din ? - kBarIEta + ( din - kBarNTot )/kEndNPhi + 1 : - din/kBarNPhi + 1 ) ) ; - - const uint32_t ip ( ( kBarNTot + kEndNTot ) - 1 < din ? - ( ( din - kBarNTot - kEndNTot )%kForNPhi )*4 + 3 : - ( kBarNTot - 1 < din ? - ( ( din - kBarNTot )%kEndNPhi )*2 + 1 : - din%kBarNPhi + 1 ) ) ; - - return ( validDenseIndex( din ) ? CaloTowerDetId( iz*ie, ip ) : CaloTowerDetId() ) ; } std::ostream& operator<<(std::ostream& s, const CaloTowerDetId& id) { diff --git a/DataFormats/CaloTowers/src/classes_def.xml b/DataFormats/CaloTowers/src/classes_def.xml index 02e7a83f66097..f9b6a0d5812c4 100644 --- a/DataFormats/CaloTowers/src/classes_def.xml +++ b/DataFormats/CaloTowers/src/classes_def.xml @@ -3,7 +3,8 @@ - + + diff --git a/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.cc b/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.cc index 32b87ca81003a..b86e8a86b1fa2 100644 --- a/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.cc +++ b/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.cc @@ -18,6 +18,12 @@ #include "Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.h" #include "Geometry/CaloTopology/interface/HcalTopology.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" +#include "Geometry/Records/interface/CaloGeometryRecord.h" +#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" +#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h" +#include "DataFormats/EcalDetId/interface/EEDetId.h" +#include "DataFormats/HcalDetId/interface/HcalDetId.h" #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" #include @@ -27,19 +33,16 @@ // constructors and destructor // CaloTowerConstituentsMapBuilder::CaloTowerConstituentsMapBuilder(const edm::ParameterSet& iConfig) : - mapFile_(iConfig.getUntrackedParameter("MapFile","")) -{ - //the following line is needed to tell the framework what - // data is being produced - setWhatProduced(this); + mapFile_(iConfig.getUntrackedParameter("MapFile","")) { + //the following line is needed to tell the framework what + // data is being produced + setWhatProduced(this); - //now do what ever other initialization is needed +//now do what ever other initialization is needed } -CaloTowerConstituentsMapBuilder::~CaloTowerConstituentsMapBuilder() -{ -} +CaloTowerConstituentsMapBuilder::~CaloTowerConstituentsMapBuilder() {} // @@ -58,47 +61,82 @@ CaloTowerConstituentsMapBuilder::fillDescriptions(edm::ConfigurationDescriptions CaloTowerConstituentsMapBuilder::ReturnType CaloTowerConstituentsMapBuilder::produce(const HcalRecNumberingRecord& iRecord) { - edm::ESHandle topology ; - iRecord.get( topology ) ; + edm::ESHandle hcaltopo; + iRecord.get(hcaltopo); + + edm::ESHandle cttopo; + iRecord.get(cttopo); - std::auto_ptr prod( new CaloTowerConstituentsMap( &*topology )); + std::auto_ptr prod( new CaloTowerConstituentsMap( &*hcaltopo, &*cttopo )); - prod->useStandardHB(true); - prod->useStandardHE(true); - prod->useStandardHF(true); - prod->useStandardHO(true); - prod->useStandardEB(true); +//std::auto_ptr prod( new CaloTowerConstituentsMap( &*hcaltopo )); - if (!mapFile_.empty()) { - parseTextMap(mapFile_,*prod); - } - prod->sort(); + //keep geometry pointer as member for alternate EE->HE mapping + edm::ESHandle pG; + iRecord.get(pG); + const CaloGeometry* geometry = pG.product(); - return prod; + prod->useStandardHB(true); + prod->useStandardHE(true); + prod->useStandardHF(true); + prod->useStandardHO(true); + prod->useStandardEB(true); + + if (!mapFile_.empty()) { + parseTextMap(mapFile_,*prod); + } else { + assignEEtoHE(geometry, *prod, &*cttopo); + } + prod->sort(); + + return prod; } void -CaloTowerConstituentsMapBuilder::parseTextMap( const std::string& filename, CaloTowerConstituentsMap& theMap ) -{ - edm::FileInPath eff( filename ); +CaloTowerConstituentsMapBuilder::parseTextMap( const std::string& filename, CaloTowerConstituentsMap& theMap ) { + + edm::FileInPath eff( filename ); + + gzFile gzed = gzopen( eff.fullPath().c_str(), "rb" ); + + while( !gzeof( gzed )) { + char line[1024]; + int ieta, iphi, rawid; + if( 0 != gzgets( gzed, line, 1023 )) { + if( index( line, '#' ) != 0 )*( index( line, '#' )) = 0; + int ct = sscanf( line, "%i %d %d", &rawid, &ieta, &iphi ); + if( ct == 3 ) { + DetId detid( rawid ); + CaloTowerDetId tid( ieta, iphi ); + theMap.assign( detid, tid ); + } + } + } + gzclose( gzed ); +} - gzFile gzed = gzopen( eff.fullPath().c_str(), "rb" ); +//algorithm to assign EE cells to HE towers if no text map is provided +void CaloTowerConstituentsMapBuilder::assignEEtoHE(const CaloGeometry* geometry, CaloTowerConstituentsMap& theMap, const CaloTowerTopology * cttopo){ + //get EE and HE geometries + const CaloSubdetectorGeometry* geomEE ( geometry->getSubdetectorGeometry( DetId::Ecal, EcalEndcap ) ); + if(geomEE==NULL) return; // if no EE is defined don't know where it is used + + const CaloSubdetectorGeometry* geomHE ( geometry->getSubdetectorGeometry( DetId::Hcal, HcalEndcap ) ); + + //get list of EE detids + const std::vector& vec(geomEE->getValidDetIds()); + //loop over EE detids + for(std::vector::const_iterator detId_itr =vec.begin(); + detId_itr != vec.end(); detId_itr++){ + //get detid position + const CaloCellGeometry* cellGeometry = geomEE->getGeometry(*detId_itr); + const GlobalPoint gp ( cellGeometry->getPosition() ) ; - while( !gzeof( gzed )) - { - char line[1024]; - int ieta, iphi, rawid; - if( 0 != gzgets( gzed, line, 1023 )) - { - if( index( line, '#' ) != 0 )*( index( line, '#' )) = 0; - int ct = sscanf( line, "%i %d %d", &rawid, &ieta, &iphi ); - if( ct == 3 ) - { - DetId detid( rawid ); - CaloTowerDetId tid( ieta, iphi ); - theMap.assign( detid, tid ); - } - } - } - gzclose( gzed ); + //find closest HE cell + const HcalDetId closestCell ( geomHE->getClosestCell( gp ) ) ; + + //assign to appropriate CaloTower + CaloTowerDetId tid(cttopo->convertHcaltoCT(closestCell.ietaAbs(),closestCell.subdet())*closestCell.zside(), closestCell.iphi()); + theMap.assign(*detId_itr,tid); + } } diff --git a/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.h b/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.h index 056e8ac9a726e..c7c1b516b5546 100644 --- a/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.h +++ b/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.h @@ -28,6 +28,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "Geometry/Records/interface/HcalRecNumberingRecord.h" #include "Geometry/CaloTopology/interface/CaloTowerConstituentsMap.h" +#include "Geometry/CaloGeometry/interface/CaloGeometry.h" namespace edm { class ConfigurationDescriptions; @@ -49,6 +50,7 @@ class CaloTowerConstituentsMapBuilder : public edm::ESProducer { private: void parseTextMap(const std::string& filename,CaloTowerConstituentsMap& theMap); + void assignEEtoHE(const CaloGeometry* geometry, CaloTowerConstituentsMap& theMap, const CaloTowerTopology * cttopo); std::string mapFile_; }; diff --git a/Geometry/CaloEventSetup/python/CaloGeometry_cff.py b/Geometry/CaloEventSetup/python/CaloGeometry_cff.py index ed5e00fb8f16e..f10a39b27e449 100644 --- a/Geometry/CaloEventSetup/python/CaloGeometry_cff.py +++ b/Geometry/CaloEventSetup/python/CaloGeometry_cff.py @@ -5,5 +5,6 @@ from Geometry.HcalEventSetup.HcalGeometry_cfi import * from Geometry.HcalEventSetup.hcalTopologyIdeal_cfi import * from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import * +from Geometry.HcalEventSetup.CaloTowerTopology_cfi import * from Geometry.ForwardGeometry.ForwardGeometry_cfi import * diff --git a/Geometry/CaloGeometry/src/CaloGenericDetId.cc b/Geometry/CaloGeometry/src/CaloGenericDetId.cc index 02638bae5e61d..d5f37a97b2b36 100644 --- a/Geometry/CaloGeometry/src/CaloGenericDetId.cc +++ b/Geometry/CaloGeometry/src/CaloGenericDetId.cc @@ -9,31 +9,38 @@ CaloGenericDetId::CaloGenericDetId( DetId::Detector iDet , if (det() == DetId::Hcal) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; throw cms::Exception("No support"); - } else { + } + else if(isCaloTower()) { + std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + throw cms::Exception("No support"); + } + else { - id_ = ( isEB() ? EBDetId::detIdFromDenseIndex( iDin ).rawId() : - ( isEE() ? EEDetId::detIdFromDenseIndex( iDin ).rawId() : - ( isES() ? ESDetId::detIdFromDenseIndex( iDin ).rawId() : - ( isZDC() ? HcalZDCDetId::detIdFromDenseIndex( iDin ).rawId() : - ( isCastor() ? HcalCastorDetId::detIdFromDenseIndex( iDin ).rawId() : - ( isCaloTower() ? CaloTowerDetId::detIdFromDenseIndex( iDin ).rawId() : 0 ) ) ) ) ) ); + id_ = ( isEB() ? EBDetId::detIdFromDenseIndex( iDin ).rawId() : + ( isEE() ? EEDetId::detIdFromDenseIndex( iDin ).rawId() : + ( isES() ? ESDetId::detIdFromDenseIndex( iDin ).rawId() : + ( isZDC() ? HcalZDCDetId::detIdFromDenseIndex( iDin ).rawId() : + ( isCastor() ? HcalCastorDetId::detIdFromDenseIndex( iDin ).rawId() : 0 ) ) ) ) ); } } - + uint32_t CaloGenericDetId::denseIndex() const { if (det() == DetId::Hcal) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; throw cms::Exception("No support"); - } + } + else if(isCaloTower()) { + std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + throw cms::Exception("No support"); + } return ( isEB() ? EBDetId( rawId() ).denseIndex() : ( isEE() ? EEDetId( rawId() ).denseIndex() : - ( isES() ? ESDetId( rawId() ).denseIndex() : + ( isES() ? ESDetId( rawId() ).denseIndex() : ( isZDC() ? HcalZDCDetId( rawId() ).denseIndex() : - ( isCastor() ? HcalCastorDetId( rawId() ).denseIndex() : - ( isCaloTower() ? CaloTowerDetId( rawId() ).denseIndex() : ~0 ) ) ) ) ) ) ; + ( isCastor() ? HcalCastorDetId( rawId() ).denseIndex() : ~0 ) ) ) ) ); } uint32_t @@ -42,14 +49,17 @@ CaloGenericDetId::sizeForDenseIndexing() const if (det() == DetId::Hcal) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; throw cms::Exception("No support"); - } + } + else if(isCaloTower()) { + std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + throw cms::Exception("No support"); + } return ( isEB() ? EBDetId::kSizeForDenseIndexing : ( isEE() ? EEDetId::kSizeForDenseIndexing : - ( isES() ? ESDetId::kSizeForDenseIndexing : + ( isES() ? ESDetId::kSizeForDenseIndexing : ( isZDC() ? HcalZDCDetId::kSizeForDenseIndexing : - ( isCastor() ? HcalCastorDetId::kSizeForDenseIndexing : - ( isCaloTower() ? CaloTowerDetId::kSizeForDenseIndexing : 0 ) ) ) ) ) ) ; + ( isCastor() ? HcalCastorDetId::kSizeForDenseIndexing : 0 ) ) ) ) ); } bool @@ -64,41 +74,25 @@ CaloGenericDetId::validDetId() const } else { - if( isEE() ) - { - const EEDetId eeid ( rawId() ) ; - returnValue = EEDetId::validDetId( eeid.ix(), - eeid.iy(), - eeid.zside() ) ; - } - else - { - if( isES() ) - { - const ESDetId esid ( rawId() ) ; - returnValue = ESDetId::validDetId( esid.strip(), - esid.six(), - esid.siy(), - esid.plane(), - esid.zside() ) ; - } - else - { - if (det() == DetId::Hcal) { - std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; - throw cms::Exception("No support"); - - returnValue = false; + if( isEE() ) + { + const EEDetId eeid ( rawId() ) ; + returnValue = EEDetId::validDetId( eeid.ix(), + eeid.iy(), + eeid.zside() ) ; } - else - { - if( isZDC() ) - { - const HcalZDCDetId zdid ( rawId() ) ; - returnValue = HcalZDCDetId::validDetId( zdid.section(), - zdid.channel() ) ; - } - else + else + { + if( isES() ) + { + const ESDetId esid ( rawId() ) ; + returnValue = ESDetId::validDetId( esid.strip(), + esid.six(), + esid.siy(), + esid.plane(), + esid.zside() ) ; + } + else { if( isCastor() ) { @@ -112,15 +106,12 @@ CaloGenericDetId::validDetId() const { if( isCaloTower() ) { - const CaloTowerDetId ctid ( rawId() ) ; - returnValue = CaloTowerDetId::validDetId( ctid.ieta(), - ctid.iphi() ) ; + std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + throw cms::Exception("No support"); } } } - } - } - } + } } return returnValue ; } @@ -130,12 +121,15 @@ std::ostream& operator<<(std::ostream& s, const CaloGenericDetId& id) if (id.det() == DetId::Hcal) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; throw cms::Exception("No support"); - } + } + else if(id.isCaloTower()) { + std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + throw cms::Exception("No support"); + } return ( id.isEB() ? s< east(const DetId& id) const; /** Get the neighbors of the given cell in west direction*/ @@ -27,5 +31,40 @@ class CaloTowerTopology GCC11_FINAL : public CaloSubdetectorTopology { virtual std::vector up(const DetId& id) const; /** Get the neighbors of the given cell in down direction (inward)*/ virtual std::vector down(const DetId& id) const; + + //mimic accessors from HcalTopology, but with continuous ieta + int firstHBRing() const {return firstHBRing_;} + int lastHBRing() const {return lastHBRing_;} + int firstHERing() const {return firstHERing_;} + int lastHERing() const {return lastHERing_;} + int firstHFRing() const {return firstHFRing_;} + int lastHFRing() const {return lastHFRing_;} + int firstHORing() const {return firstHORing_;} + int lastHORing() const {return lastHORing_;} + int firstHEDoublePhiRing() const {return firstHEDoublePhiRing_;} + int firstHEQuadPhiRing() const {return firstHEQuadPhiRing_;} + int firstHFQuadPhiRing() const {return firstHFQuadPhiRing_;} + + //conversion between CaloTowerTopology ieta and HcalTopology ieta + int convertCTtoHcal(int ct_ieta) const; + int convertHcaltoCT(int hcal_ieta, HcalSubdetector subdet) const; + + //dense index functions moved from CaloTowerDetId + uint32_t denseIndex(const DetId& id) const; + CaloTowerDetId detIdFromDenseIndex(uint32_t din) const; + bool validDenseIndex(uint32_t din) const { return ( din < kSizeForDenseIndexing ); } + uint32_t sizeForDenseIndexing() const { return kSizeForDenseIndexing; } + +private: + //member variables + const HcalTopology * hcaltopo; + int firstHBRing_, lastHBRing_; + int firstHERing_, lastHERing_; + int firstHFRing_, lastHFRing_; + int firstHORing_, lastHORing_; + int firstHEDoublePhiRing_, firstHEQuadPhiRing_, firstHFQuadPhiRing_; + int nSinglePhi_, nDoublePhi_, nQuadPhi_; + uint32_t kSizeForDenseIndexing; + }; #endif diff --git a/Geometry/CaloTopology/src/CaloTowerConstituentsMap.cc b/Geometry/CaloTopology/src/CaloTowerConstituentsMap.cc index 199696bc68149..53bec94651ade 100644 --- a/Geometry/CaloTopology/src/CaloTowerConstituentsMap.cc +++ b/Geometry/CaloTopology/src/CaloTowerConstituentsMap.cc @@ -3,6 +3,7 @@ #include "DataFormats/EcalDetId/interface/EBDetId.h" #include "FWCore/Utilities/interface/Exception.h" #include "Geometry/CaloTopology/interface/HcalTopology.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" #include @@ -10,8 +11,9 @@ CaloTowerConstituentsMap::~CaloTowerConstituentsMap() { delete m_reverseItems.load(); m_reverseItems = nullptr; } -CaloTowerConstituentsMap::CaloTowerConstituentsMap(const HcalTopology * topology) : - m_topology(topology), +CaloTowerConstituentsMap::CaloTowerConstituentsMap(const HcalTopology * hcaltopo, const CaloTowerTopology * cttopo) : + m_hcaltopo(hcaltopo), + m_cttopo(cttopo), standardHB_(false), standardHE_(false), standardHF_(false), @@ -27,6 +29,7 @@ CaloTowerDetId CaloTowerConstituentsMap::towerOf(const DetId& id) const { edm::SortedCollection::const_iterator i=m_items.find(id); if (i!=m_items.end()) tid=i->tower; + //use hcaltopo when dealing with hcal detids if (tid.null()) { if (id.det()==DetId::Hcal) { HcalDetId hid(id); @@ -34,10 +37,7 @@ CaloTowerDetId CaloTowerConstituentsMap::towerOf(const DetId& id) const { (hid.subdet()==HcalEndcap && standardHE_ ) || (hid.subdet()==HcalOuter && standardHO_ ) || (hid.subdet()==HcalForward && standardHF_) ) { - if ((hid.subdet()==HcalForward) && hid.ietaAbs()==29) // special handling for tower 29 - tid=CaloTowerDetId(30*hid.zside(),hid.iphi()); - else - tid=CaloTowerDetId(hid.ieta(),hid.iphi()); + tid = CaloTowerDetId(m_cttopo->convertHcaltoCT(hid.ietaAbs(),hid.subdet())*hid.zside(),hid.iphi()); } } else if (id.det()==DetId::Ecal) { EcalSubdetector esd=(EcalSubdetector)id.subdetId(); @@ -87,45 +87,47 @@ std::vector CaloTowerConstituentsMap::constituentsOf(const CaloTowerDetId items.push_back(j->second); // dealing with topo dependency... + //use cttopo when dealing with calotower detids int nd, sd; - + int hcal_ieta = m_cttopo->convertCTtoHcal(id.ietaAbs()); + if (standardHB_) { - if (id.ietaAbs()<=m_topology->lastHBRing()) { - m_topology->depthBinInformation(HcalBarrel,id.ietaAbs(),nd,sd); + if (id.ietaAbs()<=m_cttopo->lastHBRing()) { + m_hcaltopo->depthBinInformation(HcalBarrel,hcal_ieta,nd,sd); for (int i=0; ilastHORing()) { - m_topology->depthBinInformation(HcalOuter,id.ietaAbs(),nd,sd); + if (id.ietaAbs()<=m_cttopo->lastHORing()) { + m_hcaltopo->depthBinInformation(HcalOuter,hcal_ieta,nd,sd); for (int i=0; i=m_topology->firstHERing() && id.ietaAbs()<=m_topology->lastHERing()) { - m_topology->depthBinInformation(HcalEndcap,id.ietaAbs(),nd,sd); + if (id.ietaAbs()>=m_cttopo->firstHERing() && id.ietaAbs()<=m_cttopo->lastHERing()) { + m_hcaltopo->depthBinInformation(HcalEndcap,hcal_ieta,nd,sd); for (int i=0; im_topology->firstHFRing() && id.ietaAbs()<=m_topology->lastHFRing()) { - int ieta=id.ieta(); - m_topology->depthBinInformation(HcalForward,id.ietaAbs(),nd,sd); + if (id.ietaAbs()>=m_cttopo->firstHFRing() && id.ietaAbs()<=m_cttopo->lastHFRing()) { + m_hcaltopo->depthBinInformation(HcalForward,hcal_ieta,nd,sd); for (int i=0; idepthBinInformation(HcalForward,ieta,nd,sd); - for (int i=0; ifirstHFRing()) { + int hcal_ieta2 = hcal_ieta-1; + m_hcaltopo->depthBinInformation(HcalForward,hcal_ieta2,nd,sd); + for (int i=0; i CaloTowerConstituentsMap::constituentsOf(const CaloTowerDetId } for (int ie=etaMin; ie<=etaMax; ie++) for (int ip=hid.crystal_iphi_low(); ip<=hid.crystal_iphi_high(); ip++) - items.push_back(EBDetId(ie,ip)); + items.push_back(EBDetId(ie,ip)); } return items; } diff --git a/Geometry/CaloTopology/src/CaloTowerTopology.cc b/Geometry/CaloTopology/src/CaloTowerTopology.cc index f949d6359f946..0f70f1b9bc1d6 100644 --- a/Geometry/CaloTopology/src/CaloTowerTopology.cc +++ b/Geometry/CaloTopology/src/CaloTowerTopology.cc @@ -1,46 +1,124 @@ #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" #include "Geometry/CaloTopology/interface/CaloTowerTopology.h" +#include + +CaloTowerTopology::CaloTowerTopology(const HcalTopology * topology) : hcaltopo(topology) { + + //get number of towers in each hcal subdet from hcaltopo + int nEtaHB_, nEtaHE_, nEtaHO_, nEtaHF_; + nEtaHB_ = hcaltopo->lastHBRing() - hcaltopo->firstHBRing() + 1; + nEtaHE_ = hcaltopo->lastHERing() - hcaltopo->firstHERing() + 1; + nEtaHO_ = hcaltopo->lastHORing() - hcaltopo->firstHORing() + 1; + nEtaHF_ = hcaltopo->lastHFRing() - hcaltopo->firstHFRing() + 1; + + //setup continuous ieta + firstHBRing_ = 1; + lastHBRing_ = firstHBRing_ + nEtaHB_ - 1; + firstHERing_ = lastHBRing_; //crossover + lastHERing_ = firstHERing_ + nEtaHE_ - 1; + firstHFRing_ = lastHERing_ + 1; //no crossover for CaloTowers; HF crossover cells go in the subsequent non-crossover HF tower + lastHFRing_ = firstHFRing_ + (nEtaHF_ - 1) - 1; //nEtaHF - 1 to account for no crossover + firstHORing_ = 1; + lastHORing_ = firstHORing_ + nEtaHO_ - 1; + + //translate phi segmentation boundaries into continuous ieta + if(hcaltopo->firstHEDoublePhiRing()==999) firstHEDoublePhiRing_ = firstHFRing_; + else firstHEDoublePhiRing_ = firstHERing_ + (hcaltopo->firstHEDoublePhiRing() - hcaltopo->firstHERing()); + firstHEQuadPhiRing_ = firstHERing_ + (hcaltopo->firstHEQuadPhiRing() - hcaltopo->firstHERing()); + firstHFQuadPhiRing_ = firstHFRing_ - 1 + (hcaltopo->firstHFQuadPhiRing() - hcaltopo->firstHFRing()); + + //number of etas per phi segmentation type + int nEtaSinglePhi_, nEtaDoublePhi_, nEtaQuadPhi_; + nEtaSinglePhi_ = firstHEDoublePhiRing_ - firstHBRing_; + nEtaDoublePhi_ = firstHFQuadPhiRing_ - firstHEDoublePhiRing_; + nEtaQuadPhi_ = lastHFRing_ - firstHFQuadPhiRing_ + 1; //include lastHFRing + + //total number of towers per phi segmentation type + nSinglePhi_ = nEtaSinglePhi_*72; + nDoublePhi_ = nEtaDoublePhi_*36; + nQuadPhi_ = nEtaQuadPhi_*18; + + //calculate maximum dense index size + kSizeForDenseIndexing = 2*(nSinglePhi_ + nDoublePhi_ + nQuadPhi_); -static const int DoubleHE = 21; -static const int QuadHF = 40; +} + +//convert CaloTowerTopology ieta to HcalTopology ieta +int CaloTowerTopology::convertCTtoHcal(int ct_ieta) const { + if(ct_ieta <= lastHBRing_) return ct_ieta - firstHBRing_ + hcaltopo->firstHBRing(); + else if(ct_ieta <= lastHERing_) return ct_ieta - firstHERing_ + hcaltopo->firstHERing(); + else if(ct_ieta <= lastHFRing_) return ct_ieta - firstHFRing_ + hcaltopo->firstHFRing() + 1; //account for no HF crossover + else return 0; //if ct_ieta outside range +} + +//convert HcalTopology ieta to CaloTowerTopology ieta +int CaloTowerTopology::convertHcaltoCT(int hcal_ieta, HcalSubdetector subdet) const { + if(subdet == HcalBarrel && hcal_ieta >= hcaltopo->firstHBRing() && hcal_ieta <= hcaltopo->lastHBRing()){ + return hcal_ieta - hcaltopo->firstHBRing() + firstHBRing_; + } + else if(subdet == HcalEndcap && hcal_ieta >= hcaltopo->firstHERing() && hcal_ieta <= hcaltopo->lastHERing()){ + return hcal_ieta - hcaltopo->firstHERing() + firstHERing_; + } + else if(subdet == HcalForward && hcal_ieta >= hcaltopo->firstHFRing() && hcal_ieta <= hcaltopo->lastHFRing()) { + if(hcal_ieta == hcaltopo->firstHFRing()) hcal_ieta++; //account for no HF crossover + return hcal_ieta - hcaltopo->firstHFRing() + firstHFRing_ - 1; + } + else if(subdet == HcalOuter && hcal_ieta >= hcaltopo->firstHORing() && hcal_ieta <= hcaltopo->lastHORing()) { + return hcal_ieta - hcaltopo->firstHORing() + firstHORing_; + } + else return 0; //if hcal_ieta outside range, or unknown subdet +} bool CaloTowerTopology::valid(const DetId& id) const { - CaloTowerDetId tid(id); - bool bad=(tid.ieta()==0 || tid.iphi()<=0 || tid.iphi()>72 || tid.ieta()<-41 || tid.ieta()>41); - return !bad; + assert(id.det()==DetId::Calo && id.subdetId()==CaloTowerDetId::SubdetId); + return validDetId(id); } +bool CaloTowerTopology::validDetId(const CaloTowerDetId& id) const { + int ia = id.ietaAbs(); + int ip = id.iphi(); + + return ( (ia >= firstHBRing_) && (ia <= lastHFRing_) //eta range + && (ip >= 1) && (ip <= 72) //phi range + && ( (ia < firstHEDoublePhiRing_) //72 phi segments + || (ia < firstHFQuadPhiRing_ && (ip-1)%2 == 0) //36 phi segments, numbered 1,3,...,33,35 + || (ia >= firstHFQuadPhiRing_ && (ip-3)%4 == 0) ) //18 phi segments, numbered 71,3,7,11,... + ); +} + +//decreasing ieta std::vector CaloTowerTopology::east(const DetId& id) const { std::vector dd; CaloTowerDetId tid(id); int ieta=tid.ieta(); int iphi=tid.iphi(); - - if (ieta==1) { + + if (ieta==1) { //no ieta=0 ieta=-1; - } else if (ieta==DoubleHE) { + } else if (ieta==firstHEDoublePhiRing_) { //currently double phi, going to single phi (positive eta) -> extra neighbor ieta--; dd.push_back(CaloTowerDetId(ieta,iphi+1)); - } else if (ieta-1==-DoubleHE) { + } else if (ieta-1==-firstHEDoublePhiRing_) { //currently single phi, going to double phi (negative eta) -> change numbering if ((iphi%2)==0) iphi--; ieta--; - } else if (ieta==QuadHF) { + } else if (ieta==firstHFQuadPhiRing_) { //currently quad phi, going to double phi (positive eta) -> extra neighbor ieta--; dd.push_back(CaloTowerDetId(ieta,((iphi+1)%72)+1)); - } else if (ieta-1==-QuadHF) { + } else if (ieta-1==-firstHFQuadPhiRing_) { //currently double phi, going to quad phi (negative eta) -> change numbering if (((iphi-1)%4)==0) { if (iphi==1) iphi=71; else iphi-=2; } ieta--; - } else { + } else { //general case ieta--; } - if (ieta>=-41) dd.push_back(CaloTowerDetId(ieta,iphi)); + if (ieta>=-lastHFRing_) dd.push_back(CaloTowerDetId(ieta,iphi)); return dd; } +//increasing ieta std::vector CaloTowerTopology::west(const DetId& id) const { std::vector dd; CaloTowerDetId tid(id); @@ -48,18 +126,18 @@ std::vector CaloTowerTopology::west(const DetId& id) const { int ieta=tid.ieta(); int iphi=tid.iphi(); - if (ieta==-1) { + if (ieta==-1) { //no ieta=0 ieta=1; - } else if (ieta==-DoubleHE) { + } else if (ieta==-firstHEDoublePhiRing_) { //currently double phi, going to single phi (negative eta) -> extra neighbor ieta++; dd.push_back(CaloTowerDetId(ieta,iphi+1)); - } else if (ieta+1==DoubleHE) { + } else if (ieta+1==firstHEDoublePhiRing_) { //currently single phi, going to double phi (positive eta) -> change numbering if ((iphi%2)==0) iphi--; ieta++; - } else if (ieta==-QuadHF) { + } else if (ieta==-firstHFQuadPhiRing_) { //currently quad phi, going to double phi (negative eta) -> extra neighbor ieta++; - dd.push_back(CaloTowerDetId(ieta,((iphi+1)%72)+1)); - } else if (ieta+1==QuadHF) { + dd.push_back(CaloTowerDetId(ieta,((iphi+1)%72)+1)); + } else if (ieta+1==firstHFQuadPhiRing_) { //currently double phi, going to quad phi (positive eta) -> change numbering if (((iphi-1)%4)==0) { if (iphi==1) iphi=71; else iphi-=2; @@ -69,19 +147,20 @@ std::vector CaloTowerTopology::west(const DetId& id) const { ieta++; } - if (ieta<=41) dd.push_back(CaloTowerDetId(ieta,iphi)); + if (ieta<=lastHFRing_) dd.push_back(CaloTowerDetId(ieta,iphi)); return dd; } +//increasing iphi std::vector CaloTowerTopology::north(const DetId& id) const { CaloTowerDetId tid(id); int iphi_n=tid.iphi()+1; if (iphi_n>72) iphi_n=1; - if (tid.ietaAbs()>=QuadHF) { + if (tid.ietaAbs()>=firstHFQuadPhiRing_) { //18 phi segments, numbered 71,3,7,11,... iphi_n+=3; if (iphi_n>72) iphi_n-=72; - } else if (tid.ietaAbs()>=DoubleHE && (iphi_n%2)==0) { + } else if (tid.ietaAbs()>=firstHEDoublePhiRing_ && (iphi_n%2)==0) { //36 phi segments, numbered 1,3,...,33,35 iphi_n++; if (iphi_n>72) iphi_n-=72; } @@ -91,14 +170,15 @@ std::vector CaloTowerTopology::north(const DetId& id) const { return dd; } +//decreasing iphi std::vector CaloTowerTopology::south(const DetId& id) const { CaloTowerDetId tid(id); int iphi_s=tid.iphi()-1; if (iphi_s==0) iphi_s=72; - if (tid.ietaAbs()>=QuadHF) { + if (tid.ietaAbs()>=firstHFQuadPhiRing_) { //18 phi segments, numbered 71,3,7,11,... iphi_s-=3; if (iphi_s<=0) iphi_s+=72; - } else if (tid.ietaAbs()>=DoubleHE && (iphi_s%2)==0) { + } else if (tid.ietaAbs()>=firstHEDoublePhiRing_ && (iphi_s%2)==0) { //36 phi segments, numbered 1,3,...,33,35 iphi_s--; } @@ -115,3 +195,31 @@ std::vector CaloTowerTopology::down(const DetId& /*id*/) const { return std::vector(); } +uint32_t CaloTowerTopology::denseIndex(const DetId& id) const { + CaloTowerDetId tid(id); + const int ie ( tid.ietaAbs() ); + const int ip ( tid.iphi() - 1 ) ; + + return ( ( 0 > tid.zside() ? 0 : kSizeForDenseIndexing/2 ) + + ( ( firstHEDoublePhiRing_ > ie ? ( ie - 1 )*72 + ip : + ( firstHFQuadPhiRing_ > ie ? nSinglePhi_ + ( ie - firstHEDoublePhiRing_ )*36 + ip/2 : + nSinglePhi_ + nDoublePhi_ + ( ie - firstHFQuadPhiRing_ )*18 + ip/4 ) ) ) ); +} + +CaloTowerDetId CaloTowerTopology::detIdFromDenseIndex( uint32_t din ) const { + const int iz ( din < kSizeForDenseIndexing/2 ? -1 : 1 ) ; + din %= kSizeForDenseIndexing/2 ; + const int ie ( nSinglePhi_ + nDoublePhi_ - 1 < (int)(din) ? + firstHFQuadPhiRing_ + (din - nSinglePhi_ - nDoublePhi_ )/18 : + ( nSinglePhi_ - 1 < (int)din ? + firstHEDoublePhiRing_ + ( din - nSinglePhi_ )/36 : + din/72 + 1 ) ) ; + + const int ip ( nSinglePhi_ + nDoublePhi_ - 1 < (int)(din) ? + ( ( din - nSinglePhi_ - nDoublePhi_ )%18 )*4 + 3 : + ( nSinglePhi_ - 1 < (int)(din) ? + ( ( din - nSinglePhi_ )%36 )*2 + 1 : + din%72 + 1 ) ) ; + + return ( validDenseIndex( din ) ? CaloTowerDetId( iz*ie, ip ) : CaloTowerDetId() ) ; +} diff --git a/Geometry/CaloTopology/src/ES_Topologies.cc b/Geometry/CaloTopology/src/ES_Topologies.cc index 19534ddabe919..519b985a2fd07 100644 --- a/Geometry/CaloTopology/src/ES_Topologies.cc +++ b/Geometry/CaloTopology/src/ES_Topologies.cc @@ -1,8 +1,10 @@ #include "FWCore/Utilities/interface/typelookup.h" #include "Geometry/CaloTopology/interface/HcalTopology.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" #include "Geometry/CaloTopology/interface/CaloTowerConstituentsMap.h" #include "Geometry/CaloTopology/interface/EcalTrigTowerConstituentsMap.h" TYPELOOKUP_DATA_REG(HcalTopology); +TYPELOOKUP_DATA_REG(CaloTowerTopology); TYPELOOKUP_DATA_REG(CaloTowerConstituentsMap); TYPELOOKUP_DATA_REG(EcalTrigTowerConstituentsMap); diff --git a/Geometry/CaloTopology/test/BuildFile.xml b/Geometry/CaloTopology/test/BuildFile.xml index d3731497b1eac..ee878b8e78334 100644 --- a/Geometry/CaloTopology/test/BuildFile.xml +++ b/Geometry/CaloTopology/test/BuildFile.xml @@ -7,4 +7,5 @@ - + + diff --git a/Geometry/CaloTopology/test/CaloTowerTopologyTester.cc b/Geometry/CaloTopology/test/CaloTowerTopologyTester.cc new file mode 100644 index 0000000000000..feb147121dbf6 --- /dev/null +++ b/Geometry/CaloTopology/test/CaloTowerTopologyTester.cc @@ -0,0 +1,83 @@ +#include +#include +#include + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/ESTransientHandle.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/MakerMacros.h" + +#include "DetectorDescription/Core/interface/DDCompactView.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" +#include "Geometry/Records/interface/HcalRecNumberingRecord.h" +#include "Geometry/HcalCommonData/interface/HcalDDDRecConstants.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" +#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" +#include "CoralBase/Exception.h" + +class CaloTowerTopologyTester : public edm::EDAnalyzer { +public: + explicit CaloTowerTopologyTester(const edm::ParameterSet& ); + ~CaloTowerTopologyTester(); + + + virtual void analyze(const edm::Event&, const edm::EventSetup& ); + void doTest(const CaloTowerTopology& topology); + +private: + // ----------member data --------------------------- +}; + +CaloTowerTopologyTester::CaloTowerTopologyTester(const edm::ParameterSet& ) {} + + +CaloTowerTopologyTester::~CaloTowerTopologyTester() {} + +void CaloTowerTopologyTester::analyze(const edm::Event& , + const edm::EventSetup& iSetup ) { + edm::ESHandle topo; + iSetup.get().get(topo); + if (topo.isValid()) doTest(*topo); + else std::cout << "Cannot get a valid CaloTowerTopology Object\n"; +} + +void CaloTowerTopologyTester::doTest(const CaloTowerTopology& topology) { + + for (int ieta=-topology.lastHFRing(); ieta<=topology.lastHFRing(); ieta++) { + for (int iphi=1; iphi<=72; iphi++) { + const CaloTowerDetId id(ieta,iphi); + if (topology.validDetId(id)) { + std::vector idE = topology.east(id); + std::vector idW = topology.west(id); + std::vector idN = topology.north(id); + std::vector idS = topology.south(id); + std::cout << "Neighbours for : Tower " << id << std::endl; + std::cout << " " << idE.size() << " sets along East:"; + for (unsigned int i=0; icornersMgr() == 0 ) ebg->allocateCorners( CaloTowerDetId::kSizeForDenseIndexing ) ; + if( ebg->cornersMgr() == 0 ) ebg->allocateCorners( EBDetId::kSizeForDenseIndexing ) ; if( ebg->parMgr() == 0 ) ebg->allocatePar( 10, 3 ) ; DDFilter* filter = getDDFilter(); diff --git a/Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h b/Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h new file mode 100644 index 0000000000000..c0569d53a2d90 --- /dev/null +++ b/Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h @@ -0,0 +1,44 @@ +#ifndef GEOMETRY_HCALEVENTSETUP_CaloTowerTopologyEP_H +#define GEOMETRY_HCALEVENTSETUP_CaloTowerTopologyEP_H 1 + + +// system include files +#include +#include "boost/shared_ptr.hpp" + +// user include files +#include "FWCore/Framework/interface/ModuleFactory.h" +#include "FWCore/Framework/interface/ESProducer.h" + +#include "FWCore/Framework/interface/ESHandle.h" +#include "Geometry/CaloTopology/interface/HcalTopology.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" +#include "Geometry/Records/interface/HcalRecNumberingRecord.h" +#include "Geometry/Records/interface/IdealGeometryRecord.h" + +namespace edm { + class ConfigurationDescriptions; +} + +// +// class declaration +// + +class CaloTowerTopologyEP : public edm::ESProducer { + +public: + CaloTowerTopologyEP(const edm::ParameterSet&); + ~CaloTowerTopologyEP(); + + typedef boost::shared_ptr ReturnType; + + static void fillDescriptions( edm::ConfigurationDescriptions & descriptions ); + + ReturnType produce(const HcalRecNumberingRecord&); + +private: + // ----------member data --------------------------- + const edm::ParameterSet m_pSet; + +}; +#endif diff --git a/Geometry/HcalEventSetup/python/CaloTowerTopology_cfi.py b/Geometry/HcalEventSetup/python/CaloTowerTopology_cfi.py new file mode 100644 index 0000000000000..caf86161408f4 --- /dev/null +++ b/Geometry/HcalEventSetup/python/CaloTowerTopology_cfi.py @@ -0,0 +1,3 @@ +import FWCore.ParameterSet.Config as cms + +CaloTowerTopologyEP = cms.ESProducer("CaloTowerTopologyEP") diff --git a/Geometry/HcalEventSetup/src/CaloTowerHardcodeGeometryEP.cc b/Geometry/HcalEventSetup/src/CaloTowerHardcodeGeometryEP.cc index 25c3318132b09..a3ccd996ddde5 100644 --- a/Geometry/HcalEventSetup/src/CaloTowerHardcodeGeometryEP.cc +++ b/Geometry/HcalEventSetup/src/CaloTowerHardcodeGeometryEP.cc @@ -18,6 +18,7 @@ #include "Geometry/HcalEventSetup/src/CaloTowerHardcodeGeometryEP.h" #include "Geometry/Records/interface/HcalRecNumberingRecord.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" #include "Geometry/CaloTopology/interface/HcalTopology.h" #include "Geometry/HcalCommonData/interface/HcalDDDRecConstants.h" @@ -32,13 +33,14 @@ // // constructors and destructor // -CaloTowerHardcodeGeometryEP::CaloTowerHardcodeGeometryEP(const edm::ParameterSet& iConfig) { - //the following line is needed to tell the framework what - // data is being produced - setWhatProduced(this, - &CaloTowerHardcodeGeometryEP::produce, - dependsOn( &CaloTowerHardcodeGeometryEP::idealRecordCallBack ), - "TOWER"); +CaloTowerHardcodeGeometryEP::CaloTowerHardcodeGeometryEP(const edm::ParameterSet& iConfig) +{ + //the following line is needed to tell the framework what + // data is being produced + setWhatProduced(this, + &CaloTowerHardcodeGeometryEP::produce, + dependsOn( &CaloTowerHardcodeGeometryEP::idealRecordCallBack ), + "TOWER"); //now do what ever other initialization is needed loader_=new CaloTowerHardcodeGeometryLoader(); /// TODO : allow override of Topology. @@ -57,12 +59,14 @@ CaloTowerHardcodeGeometryEP::~CaloTowerHardcodeGeometryEP() { // ------------ method called to produce the data ------------ CaloTowerHardcodeGeometryEP::ReturnType CaloTowerHardcodeGeometryEP::produce(const CaloTowerGeometryRecord& iRecord) { + edm::ESHandle cttopo; + iRecord.getRecord().get( cttopo ); edm::ESHandle hcaltopo; iRecord.getRecord().get( hcaltopo ); edm::ESHandle pHRNDC; iRecord.getRecord().get( pHRNDC ); - std::auto_ptr pCaloSubdetectorGeometry( loader_->load( &*hcaltopo, &*pHRNDC )); + std::auto_ptr pCaloSubdetectorGeometry( loader_->load( &*cttopo, &*hcaltopo, &*pHRNDC )); return pCaloSubdetectorGeometry ; } diff --git a/Geometry/HcalEventSetup/src/CaloTowerTopologyEP.cc b/Geometry/HcalEventSetup/src/CaloTowerTopologyEP.cc new file mode 100644 index 0000000000000..1dde97cf8b7f7 --- /dev/null +++ b/Geometry/HcalEventSetup/src/CaloTowerTopologyEP.cc @@ -0,0 +1,70 @@ +// -*- C++ -*- +// +// Package: CaloTowerTopologyEP +// Class: CaloTowerTopologyEP +// +/**\class CaloTowerTopologyEP CaloTowerTopologyEP.h tmp/CaloTowerTopologyEP/interface/CaloTowerTopologyEP.h + + Description: + + Implementation: + +*/ +// +// Original Author: Jeremiah Mans +// Created: Mon Oct 3 11:35:27 CDT 2005 +// +// + +#include "Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h" +#include "FWCore/Utilities/interface/Exception.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" + +// +// constants, enums and typedefs +// + +// +// static data member definitions +// + +// +// constructors and destructor +// +CaloTowerTopologyEP::CaloTowerTopologyEP(const edm::ParameterSet& conf) + : m_pSet( conf ) { + // std::cout << "CaloTowerTopologyEP::CaloTowerTopologyEP" << std::endl; + edm::LogInfo("HCAL") << "CaloTowerTopologyEP::CaloTowerTopologyEP"; + setWhatProduced(this); +} + + +CaloTowerTopologyEP::~CaloTowerTopologyEP() { +} + +void CaloTowerTopologyEP::fillDescriptions( edm::ConfigurationDescriptions & descriptions ) { + edm::ParameterSetDescription desc; + descriptions.add( "CaloTowerTopology", desc ); +} + +// +// member functions +// + +// ------------ method called to produce the data ------------ +CaloTowerTopologyEP::ReturnType +CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord) { + edm::ESHandle hcaltopo; + iRecord.get(hcaltopo); + +// std::cout << "CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord)" << std::endl; + edm::LogInfo("HCAL") << "CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord)"; + + ReturnType myTopo(new CaloTowerTopology(&*hcaltopo)); + + return myTopo; +} + + diff --git a/Geometry/HcalEventSetup/src/SealModule.cc b/Geometry/HcalEventSetup/src/SealModule.cc index ff45d31d64825..120836ce0654c 100644 --- a/Geometry/HcalEventSetup/src/SealModule.cc +++ b/Geometry/HcalEventSetup/src/SealModule.cc @@ -2,10 +2,14 @@ #include "Geometry/HcalEventSetup/interface/HcalDDDGeometryEP.h" #include "Geometry/HcalEventSetup/src/CaloTowerHardcodeGeometryEP.h" #include "Geometry/HcalEventSetup/interface/HcalTopologyIdealEP.h" +#include "Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h" +#include "Geometry/HcalEventSetup/interface/HcalDDDGeometryEP.h" #include "Geometry/HcalEventSetup/interface/HcalAlignmentEP.h" //define this as a plug-in DEFINE_FWK_EVENTSETUP_MODULE(HcalHardcodeGeometryEP); DEFINE_FWK_EVENTSETUP_MODULE(HcalDDDGeometryEP); DEFINE_FWK_EVENTSETUP_MODULE(CaloTowerHardcodeGeometryEP); DEFINE_FWK_EVENTSETUP_MODULE(HcalTopologyIdealEP); +DEFINE_FWK_EVENTSETUP_MODULE(CaloTowerTopologyEP); +DEFINE_FWK_EVENTSETUP_MODULE(HcalDDDGeometryEP); DEFINE_FWK_EVENTSETUP_MODULE(HcalAlignmentEP); diff --git a/Geometry/HcalEventSetup/src/moduleDB.cc b/Geometry/HcalEventSetup/src/moduleDB.cc index 063e431fb6b10..79ba4bbdd3af8 100644 --- a/Geometry/HcalEventSetup/src/moduleDB.cc +++ b/Geometry/HcalEventSetup/src/moduleDB.cc @@ -3,56 +3,52 @@ #include "Geometry/CaloEventSetup/interface/CaloGeometryDBEP.h" #include "Geometry/CaloEventSetup/interface/CaloGeometryDBReader.h" +#include "Geometry/Records/interface/HcalRecNumberingRecord.h" template<> CaloGeometryDBEP::PtrType -CaloGeometryDBEP::produceAligned( const typename HcalGeometry::AlignedRecord& iRecord ) -{ - const Alignments* alignPtr ( 0 ) ; - const Alignments* globalPtr ( 0 ) ; - if( m_applyAlignment ) // get ptr if necessary - { - edm::ESHandle< Alignments > alignments ; - iRecord.getRecord< typename HcalGeometry::AlignmentRecord >().get( alignments ) ; - - assert( alignments.isValid() && // require valid alignments and expected size - ( alignments->m_align.size() == HcalGeometry::numberOfAlignments() ) ) ; - alignPtr = alignments.product() ; - - edm::ESHandle< Alignments > globals ; - iRecord.getRecord().get( globals ) ; - - assert( globals.isValid() ) ; - globalPtr = globals.product() ; - } +CaloGeometryDBEP::produceAligned( const typename HcalGeometry::AlignedRecord& iRecord ) { + const Alignments* alignPtr ( 0 ) ; + const Alignments* globalPtr ( 0 ) ; + if( m_applyAlignment ) {// get ptr if necessary + edm::ESHandle< Alignments > alignments ; + iRecord.getRecord< typename HcalGeometry::AlignmentRecord >().get( alignments ) ; + + assert( alignments.isValid() && // require valid alignments and expected size + ( alignments->m_align.size() == HcalGeometry::numberOfAlignments() ) ) ; + alignPtr = alignments.product() ; - TrVec tvec ; - DimVec dvec ; - IVec ivec ; - IVec dins ; + edm::ESHandle< Alignments > globals ; + iRecord.getRecord().get( globals ) ; - if( CaloGeometryDBReader::writeFlag() ) - { - edm::ESHandle pG ; - iRecord.get( HcalGeometry::producerTag() + std::string("_master"), pG ) ; + assert( globals.isValid() ) ; + globalPtr = globals.product() ; + } - const CaloSubdetectorGeometry* pGptr ( pG.product() ) ; + TrVec tvec ; + DimVec dvec ; + IVec ivec ; + IVec dins ; - pGptr->getSummary( tvec, ivec, dvec, dins ) ; + if( CaloGeometryDBReader::writeFlag() ) { + edm::ESHandle pG ; + iRecord.get( HcalGeometry::producerTag() + std::string("_master"), pG ) ; - CaloGeometryDBReader::writeIndexed( tvec, dvec, ivec, dins, HcalGeometry::dbString() ) ; - } - else - { - edm::ESHandle pG ; - iRecord.getRecord().get( pG ) ; - - tvec = pG->getTranslation() ; - dvec = pG->getDimension() ; - ivec = pG->getIndexes() ; - dins = pG->getDenseIndices(); - } - //********************************************************************************************* + const CaloSubdetectorGeometry* pGptr ( pG.product() ) ; + + pGptr->getSummary( tvec, ivec, dvec, dins ) ; + + CaloGeometryDBReader::writeIndexed( tvec, dvec, ivec, dins, HcalGeometry::dbString() ) ; + } else { + edm::ESHandle pG ; + iRecord.getRecord().get( pG ) ; + + tvec = pG->getTranslation() ; + dvec = pG->getDimension() ; + ivec = pG->getIndexes() ; + dins = pG->getDenseIndices(); + } + //********************************************************************************************* edm::ESHandle hcalTopology; @@ -66,103 +62,255 @@ CaloGeometryDBEP::produceAligned( const type assert( dvec.size() <= hcalTopology->getNumberOfShapes() * HcalGeometry::k_NumberOfParametersPerShape ) ; HcalGeometry* hcg=new HcalGeometry( *hcalTopology ); - PtrType ptr ( hcg ); + PtrType ptr ( hcg ); - const unsigned int nTrParm ( tvec.size()/hcalTopology->ncells() ) ; + const unsigned int nTrParm ( tvec.size()/hcalTopology->ncells() ) ; - ptr->fillDefaultNamedParameters() ; + ptr->fillDefaultNamedParameters() ; + + ptr->allocateCorners( hcalTopology->ncells() ); - ptr->allocateCorners( hcalTopology->ncells() ); + ptr->allocatePar( dvec.size() , + HcalGeometry::k_NumberOfParametersPerShape ) ; - ptr->allocatePar( dvec.size() , - HcalGeometry::k_NumberOfParametersPerShape ) ; + for( unsigned int i ( 0 ) ; i < dins.size() ; ++i ) { + const unsigned int nPerShape ( HcalGeometry::k_NumberOfParametersPerShape); + DimVec dims ; + dims.reserve( nPerShape ) ; - for( unsigned int i ( 0 ) ; i < dins.size() ; ++i ) - { - const unsigned int nPerShape ( HcalGeometry::k_NumberOfParametersPerShape ) ; - DimVec dims ; - dims.reserve( nPerShape ) ; + const unsigned int indx ( ivec.size()==1 ? 0 : i ) ; - const unsigned int indx ( ivec.size()==1 ? 0 : i ) ; + DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ; - DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ; - - for( unsigned int j ( 0 ) ; j != nPerShape ; ++j ) - { - dims.push_back( *dsrc ) ; - ++dsrc ; - } + for( unsigned int j ( 0 ) ; j != nPerShape ; ++j ) { + dims.push_back( *dsrc ) ; + ++dsrc ; + } - const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims, - ptr->parMgr(), - ptr->parVecVec() ) ) ; + const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims, + ptr->parMgr(), + ptr->parVecVec() )); - const DetId id ( hcalTopology->denseId2detId(dins[i]) ); + const DetId id ( hcalTopology->denseId2detId(dins[i]) ); - const unsigned int iGlob ( 0 == globalPtr ? 0 : - HcalGeometry::alignmentTransformIndexGlobal( id ) ) ; + const unsigned int iGlob ( 0 == globalPtr ? 0 : + HcalGeometry::alignmentTransformIndexGlobal( id ) ) ; + + assert( 0 == globalPtr || iGlob < globalPtr->m_align.size() ) ; + + const AlignTransform* gt ( 0 == globalPtr ? 0 : &globalPtr->m_align[ iGlob ] ) ; + + assert( 0 == gt || iGlob == HcalGeometry::alignmentTransformIndexGlobal( DetId( gt->rawId() ) ) ) ; + + const unsigned int iLoc ( 0 == alignPtr ? 0 : + HcalGeometry::alignmentTransformIndexLocal( id ) ) ; - assert( 0 == globalPtr || iGlob < globalPtr->m_align.size() ) ; + assert( 0 == alignPtr || iLoc < alignPtr->m_align.size() ) ; - const AlignTransform* gt ( 0 == globalPtr ? 0 : &globalPtr->m_align[ iGlob ] ) ; + const AlignTransform* at ( 0 == alignPtr ? 0 : + &alignPtr->m_align[ iLoc ] ) ; - assert( 0 == gt || iGlob == HcalGeometry::alignmentTransformIndexGlobal( DetId( gt->rawId() ) ) ) ; + assert( 0 == at || ( HcalGeometry::alignmentTransformIndexLocal( DetId( at->rawId() ) ) == iLoc ) ) ; - const unsigned int iLoc ( 0 == alignPtr ? 0 : - HcalGeometry::alignmentTransformIndexLocal( id ) ) ; + Pt3D lRef ; + Pt3DVec lc ( 8, Pt3D(0,0,0) ) ; + hcg->localCorners( lc, &dims.front(), dins[i], lRef ) ; + + const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ; // ctr rear face in local + const Pt3D lCor ( lc[0] ) ; + + //----------------------------------- create transform from 6 numbers --- + const unsigned int jj ( dins[i]*nTrParm ) ; + Tr3D tr ; + const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ; + const ROOT::Math::EulerAngles ea ( + 6==nTrParm ? + ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) : + ROOT::Math::EulerAngles() ) ; + const ROOT::Math::Transform3D rt ( ea, tl ) ; + double xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz; + rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ; + tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz, + yx, yy, yz, + zx, zy, zz ), + CLHEP::Hep3Vector(dx,dy,dz) ); + + // now prepend alignment(s) for final transform + const Tr3D atr ( 0 == at ? tr : + ( 0 == gt ? at->transform()*tr : + at->transform()*gt->transform()*tr ) ) ; + //--------------------------------- done making transform --------------- + + const Pt3D gRef ( atr*lRef ) ; + const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ; + const Pt3D gBck ( atr*lBck ) ; + const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ; + const Pt3D gCor ( atr*lCor ) ; + const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ; + + assert( hcalTopology->detId2denseId(id) == dins[i] ); + + ptr->newCell( fCtr, fBck, fCor, myParm, id ) ; + } + + ptr->initializeParms() ; // initializations; must happen after cells filled + + return ptr ; +} + +template<> +CaloGeometryDBEP::PtrType +CaloGeometryDBEP::produceAligned( const typename CaloTowerGeometry::AlignedRecord& iRecord ) { + + const Alignments* alignPtr ( 0 ) ; + const Alignments* globalPtr ( 0 ) ; + if( m_applyAlignment ) { // get ptr if necessary + edm::ESHandle< Alignments > alignments ; + iRecord.getRecord< typename CaloTowerGeometry::AlignmentRecord >().get( alignments ) ; + + assert( alignments.isValid() && // require valid alignments and expected sizet + ( alignments->m_align.size() == CaloTowerGeometry::numberOfAlignments() ) ) ; + alignPtr = alignments.product() ; + + edm::ESHandle< Alignments > globals ; + iRecord.getRecord().get( globals ) ; + + assert( globals.isValid() ) ; + globalPtr = globals.product() ; + } + + TrVec tvec ; + DimVec dvec ; + IVec ivec ; + IVec dins ; + + if( CaloGeometryDBReader::writeFlag() ) { + edm::ESHandle pG ; + iRecord.get( CaloTowerGeometry::producerTag() + std::string("_master"), pG ) ; + + const CaloSubdetectorGeometry* pGptr ( pG.product() ) ; + + pGptr->getSummary( tvec, ivec, dvec, dins ) ; + + CaloGeometryDBReader::writeIndexed( tvec, dvec, ivec, dins, CaloTowerGeometry::dbString() ) ; + } else { + edm::ESHandle pG ; + iRecord.getRecord().get( pG ) ; - assert( 0 == alignPtr || iLoc < alignPtr->m_align.size() ) ; + tvec = pG->getTranslation() ; + dvec = pG->getDimension() ; + ivec = pG->getIndexes() ; + dins = pG->getDenseIndices(); + } +//********************************************************************************************* - const AlignTransform* at ( 0 == alignPtr ? 0 : - &alignPtr->m_align[ iLoc ] ) ; + edm::ESHandle caloTopology; + iRecord.getRecord().get( caloTopology ); - assert( 0 == at || ( HcalGeometry::alignmentTransformIndexLocal( DetId( at->rawId() ) ) == iLoc ) ) ; - Pt3D lRef ; - Pt3DVec lc ( 8, Pt3D(0,0,0) ) ; - hcg->localCorners( lc, &dims.front(), dins[i], lRef ) ; + CaloTowerGeometry* ctg=new CaloTowerGeometry( &*caloTopology ); - const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ; // ctr rear face in local - const Pt3D lCor ( lc[0] ) ; + const unsigned int nTrParm ( tvec.size()/ctg->numberOfCellsForCorners() ) ; - //----------------------------------- create transform from 6 numbers --- - const unsigned int jj ( dins[i]*nTrParm ) ; - Tr3D tr ; - const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ; - const ROOT::Math::EulerAngles ea ( - 6==nTrParm ? - ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) : - ROOT::Math::EulerAngles() ) ; - const ROOT::Math::Transform3D rt ( ea, tl ) ; - double xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz; - rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ; - tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz, - yx, yy, yz, - zx, zy, zz ), - CLHEP::Hep3Vector(dx,dy,dz) ); + assert( dvec.size() == ctg->numberOfShapes() * CaloTowerGeometry::k_NumberOfParametersPerShape ) ; - // now prepend alignment(s) for final transform - const Tr3D atr ( 0 == at ? tr : - ( 0 == gt ? at->transform()*tr : - at->transform()*gt->transform()*tr ) ) ; - //--------------------------------- done making transform --------------- - const Pt3D gRef ( atr*lRef ) ; - const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ; - const Pt3D gBck ( atr*lBck ) ; - const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ; - const Pt3D gCor ( atr*lCor ) ; - const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ; + PtrType ptr ( ctg ) ; - assert( hcalTopology->detId2denseId(id) == dins[i] ); + ptr->fillDefaultNamedParameters() ; - ptr->newCell( fCtr, fBck, fCor, myParm, id ) ; + ptr->allocateCorners( ctg->numberOfCellsForCorners() ) ; + + ptr->allocatePar( dvec.size() , + CaloTowerGeometry::k_NumberOfParametersPerShape ) ; + + for( unsigned int i ( 0 ) ; i < dins.size() ; ++i ) { + const unsigned int nPerShape ( ctg->numberOfParametersPerShape() ) ; + DimVec dims ; + dims.reserve( nPerShape ) ; + + const unsigned int indx ( ivec.size()==1 ? 0 : i ) ; + + DimVec::const_iterator dsrc ( dvec.begin() + ivec[indx]*nPerShape ) ; + + for( unsigned int j ( 0 ) ; j != nPerShape ; ++j ) { + dims.push_back( *dsrc ) ; + ++dsrc ; } - ptr->initializeParms() ; // initializations; must happen after cells filled + const CCGFloat* myParm ( CaloCellGeometry::getParmPtr( dims, + ptr->parMgr(), + ptr->parVecVec() )); + + + const DetId id ( caloTopology->detIdFromDenseIndex(dins[i]) ) ; + + const unsigned int iGlob ( 0 == globalPtr ? 0 : + ctg->alignmentTransformIndexGlobal( id ) ) ; + + assert( 0 == globalPtr || iGlob < globalPtr->m_align.size() ) ; + + const AlignTransform* gt ( 0 == globalPtr ? 0 : &globalPtr->m_align[ iGlob ] ) ; + + assert( 0 == gt || iGlob == ctg->alignmentTransformIndexGlobal( DetId( gt->rawId() ) ) ) ; + + const unsigned int iLoc ( 0 == alignPtr ? 0 : + ctg->alignmentTransformIndexLocal( id ) ) ; + + assert( 0 == alignPtr || iLoc < alignPtr->m_align.size() ) ; + + const AlignTransform* at ( 0 == alignPtr ? 0 : + &alignPtr->m_align[ iLoc ] ) ; + + assert( 0 == at || ( ctg->alignmentTransformIndexLocal( DetId( at->rawId() ) ) == iLoc ) ) ; + + const CaloGenericDetId gId ( id ) ; + + Pt3D lRef ; + Pt3DVec lc ( 8, Pt3D(0,0,0) ) ; + ctg->localCorners( lc, &dims.front(), dins[i], lRef ) ; + + const Pt3D lBck ( 0.25*(lc[4]+lc[5]+lc[6]+lc[7] ) ) ; // ctr rear face in local + const Pt3D lCor ( lc[0] ) ; + + //----------------------------------- create transform from 6 numbers --- + const unsigned int jj ( i*nTrParm ) ; + Tr3D tr ; + const ROOT::Math::Translation3D tl ( tvec[jj], tvec[jj+1], tvec[jj+2] ) ; + const ROOT::Math::EulerAngles ea ( + 6==nTrParm ? + ROOT::Math::EulerAngles( tvec[jj+3], tvec[jj+4], tvec[jj+5] ) : + ROOT::Math::EulerAngles() ) ; + const ROOT::Math::Transform3D rt ( ea, tl ) ; + double xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz; + rt.GetComponents(xx,xy,xz,dx,yx,yy,yz,dy,zx,zy,zz,dz) ; + tr = Tr3D( CLHEP::HepRep3x3( xx, xy, xz, + yx, yy, yz, + zx, zy, zz ), + CLHEP::Hep3Vector(dx,dy,dz) ); + + // now prepend alignment(s) for final transform + const Tr3D atr ( 0 == at ? tr : + ( 0 == gt ? at->transform()*tr : + at->transform()*gt->transform()*tr ) ) ; + //--------------------------------- done making transform --------------- + + const Pt3D gRef ( atr*lRef ) ; + const GlobalPoint fCtr ( gRef.x(), gRef.y(), gRef.z() ) ; + const Pt3D gBck ( atr*lBck ) ; + const GlobalPoint fBck ( gBck.x(), gBck.y(), gBck.z() ) ; + const Pt3D gCor ( atr*lCor ) ; + const GlobalPoint fCor ( gCor.x(), gCor.y(), gCor.z() ) ; + + assert( caloTopology->denseIndex(id) == dins[i] ); + + ptr->newCell( fCtr, fBck, fCor, myParm, id ) ; + } + + ptr->initializeParms() ; // initializations; must happen after cells filled - return ptr ; + return ptr ; } template class CaloGeometryDBEP< HcalGeometry , CaloGeometryDBReader> ; diff --git a/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h b/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h index 6ce9ffcfefbb1..0bab800546746 100644 --- a/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h +++ b/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h @@ -5,6 +5,7 @@ #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" #include "Geometry/Records/interface/CaloTowerGeometryRecord.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" /** \class CaloTowerGeometry * @@ -27,9 +28,9 @@ class CaloTowerGeometry : public CaloSubdetectorGeometry typedef PCaloTowerRcd PGeometryRecord ; typedef CaloTowerDetId DetIdType ; - enum { k_NumberOfCellsForCorners = CaloTowerDetId::kSizeForDenseIndexing } ; + //enum { k_NumberOfCellsForCorners = CaloTowerDetId::kSizeForDenseIndexing } ; - enum { k_NumberOfShapes = 41 } ; + //enum { k_NumberOfShapes = 41 } ; enum { k_NumberOfParametersPerShape = 5 } ; @@ -37,18 +38,21 @@ class CaloTowerGeometry : public CaloSubdetectorGeometry virtual unsigned int numberOfShapes() const { return k_NumberOfShapes ; } virtual unsigned int numberOfParametersPerShape() const { return k_NumberOfParametersPerShape ; } + virtual unsigned int numberOfCellsForCorners() const { return k_NumberOfCellsForCorners ; } - CaloTowerGeometry(); + CaloTowerGeometry(const CaloTowerTopology *cttopo_); virtual ~CaloTowerGeometry(); static std::string producerTag() { return "TOWER" ; } static unsigned int numberOfAlignments() { return 0 ; } - static unsigned int alignmentTransformIndexLocal( const DetId& id ) ; + //static unsigned int alignmentTransformIndexLocal( const DetId& id ) ; + unsigned int alignmentTransformIndexLocal( const DetId& id ) ; - static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ; + //static unsigned int alignmentTransformIndexGlobal( const DetId& id ) ; + unsigned int alignmentTransformIndexGlobal( const DetId& id ) ; static void localCorners( Pt3DVec& lc , const CCGFloat* pv , @@ -60,12 +64,21 @@ class CaloTowerGeometry : public CaloSubdetectorGeometry const GlobalPoint& f3 , const CCGFloat* parm, const DetId& detId ) ; + + virtual const CaloCellGeometry* getGeometry( const DetId& id ) const { + return cellGeomPtr( cttopo->denseIndex(id) ) ; + } + protected: virtual const CaloCellGeometry* cellGeomPtr( uint32_t index ) const ; + virtual unsigned int indexFor(const DetId& id) const { return cttopo->denseIndex(id); } + virtual unsigned int sizeForDenseIndex(const DetId& id) const { return cttopo->sizeForDenseIndexing(); } private: - + const CaloTowerTopology* cttopo; + int k_NumberOfCellsForCorners; + int k_NumberOfShapes; CellVec m_cellVec ; }; diff --git a/Geometry/HcalTowerAlgo/interface/CaloTowerHardcodeGeometryLoader.h b/Geometry/HcalTowerAlgo/interface/CaloTowerHardcodeGeometryLoader.h index 7302873238c98..76e78f8fc5f5b 100644 --- a/Geometry/HcalTowerAlgo/interface/CaloTowerHardcodeGeometryLoader.h +++ b/Geometry/HcalTowerAlgo/interface/CaloTowerHardcodeGeometryLoader.h @@ -2,6 +2,7 @@ #define GEOMETRY_HCALTOWERALGO_CALOTOWERHARDCODEGEOMETRYLOADER_H 1 #include "Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" #include "Geometry/CaloTopology/interface/HcalTopology.h" #include "Geometry/HcalCommonData/interface/HcalDDDRecConstants.h" #include @@ -13,9 +14,10 @@ */ class CaloTowerHardcodeGeometryLoader { public: - std::auto_ptr load(const HcalTopology *hcaltopo, const HcalDDDRecConstants* hcons); + std::auto_ptr load(const CaloTowerTopology *limits, const HcalTopology *hcaltopo, const HcalDDDRecConstants* hcons); private: void makeCell(int ieta, int iphi, CaloSubdetectorGeometry* geom) const; + const CaloTowerTopology *m_limits; const HcalTopology *m_hcaltopo; const HcalDDDRecConstants *m_hcons; std::vector theHBHEEtaBounds, theHFEtaBounds; diff --git a/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc b/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc index 64f27d388bafe..924c516dfeff0 100644 --- a/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc +++ b/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc @@ -5,51 +5,48 @@ typedef CaloCellGeometry::CCGFloat CCGFloat ; typedef CaloCellGeometry::Pt3D Pt3D ; typedef CaloCellGeometry::Pt3DVec Pt3DVec ; -CaloTowerGeometry::CaloTowerGeometry() : - m_cellVec ( k_NumberOfCellsForCorners ) +CaloTowerGeometry::CaloTowerGeometry(const CaloTowerTopology *cttopo_) : + cttopo(cttopo_), + k_NumberOfCellsForCorners(cttopo->sizeForDenseIndexing()), + k_NumberOfShapes(cttopo->lastHFRing()), + m_cellVec ( k_NumberOfCellsForCorners ) { } -CaloTowerGeometry::~CaloTowerGeometry() -{ -} - - -unsigned int -CaloTowerGeometry::alignmentTransformIndexLocal( const DetId& id ) -{ - const CaloGenericDetId gid ( id ) ; - - assert( gid.isCaloTower() ) ; - - const CaloTowerDetId cid ( id ) ; +CaloTowerGeometry::~CaloTowerGeometry() { } - const unsigned int iea ( cid.ietaAbs() ) ; - const unsigned int ip ( ( cid.iphi() - 1 )/4 ) ; - - const int izoff ( ( cid.zside() + 1 )/2 ) ; - - const unsigned int offset ( izoff*3*18) ; +unsigned int +CaloTowerGeometry::alignmentTransformIndexLocal( const DetId& id ) { + + const CaloGenericDetId gid ( id ) ; + assert( gid.isCaloTower() ) ; + + const CaloTowerDetId cid ( id ) ; + const int iea ( cid.ietaAbs() ) ; + const unsigned int ip ( ( cid.iphi() - 1 )/4 ) ; + const int izoff ( ( cid.zside() + 1 )/2 ) ; + const unsigned int offset ( izoff*3*18) ; + + assert(0); - return ( offset + ip + ( CaloTowerDetId::kEndIEta < iea ? 36 : - ( CaloTowerDetId::kBarIEta < iea ? 18 : 0 ) ) ) ; + return ( offset + ip + + ( cttopo->firstHFQuadPhiRing() <= iea ? 36 : + ( cttopo->firstHEDoublePhiRing() <= iea ? 18 : 0 ) ) ) ; } unsigned int -CaloTowerGeometry::alignmentTransformIndexGlobal( const DetId& id ) -{ - return (unsigned int) DetId::Calo - 1 ; +CaloTowerGeometry::alignmentTransformIndexGlobal( const DetId& id ) { + return (unsigned int) DetId::Calo - 1 ; } void CaloTowerGeometry::localCorners( Pt3DVec& lc , const CCGFloat* pv , unsigned int i , - Pt3D& ref ) -{ - IdealObliquePrism::localCorners( lc, pv, ref ) ; + Pt3D& ref ) { + IdealObliquePrism::localCorners( lc, pv, ref ) ; } void @@ -57,22 +54,22 @@ CaloTowerGeometry::newCell( const GlobalPoint& f1 , const GlobalPoint& f2 , const GlobalPoint& f3 , const CCGFloat* parm , - const DetId& detId ) -{ - const CaloGenericDetId cgid ( detId ) ; + const DetId& detId ) { + const CaloGenericDetId cgid ( detId ) ; - assert( cgid.isCaloTower() ) ; + assert( cgid.isCaloTower() ) ; + + const CaloTowerDetId cid ( detId ) ; - const unsigned int di ( cgid.denseIndex() ) ; + const unsigned int di ( cttopo->denseIndex(cid) ) ; m_cellVec[ di ] = IdealObliquePrism( f1, cornersMgr(), parm ) ; addValidID( detId ) ; } const CaloCellGeometry* -CaloTowerGeometry::cellGeomPtr( uint32_t index ) const -{ - const CaloCellGeometry* cell ( &m_cellVec[ index ] ) ; - return ( m_cellVec.size() < index || - 0 == cell->param() ? 0 : cell ) ; +CaloTowerGeometry::cellGeomPtr( uint32_t index ) const { + const CaloCellGeometry* cell ( &m_cellVec[ index ] ) ; + return ( m_cellVec.size() < index || + 0 == cell->param() ? 0 : cell ) ; } diff --git a/Geometry/HcalTowerAlgo/src/CaloTowerHardcodeGeometryLoader.cc b/Geometry/HcalTowerAlgo/src/CaloTowerHardcodeGeometryLoader.cc index 8cbc8692e5094..27316dc3a8319 100644 --- a/Geometry/HcalTowerAlgo/src/CaloTowerHardcodeGeometryLoader.cc +++ b/Geometry/HcalTowerAlgo/src/CaloTowerHardcodeGeometryLoader.cc @@ -6,8 +6,9 @@ typedef CaloCellGeometry::CCGFloat CCGFloat ; -std::auto_ptr CaloTowerHardcodeGeometryLoader::load(const HcalTopology *hcaltopo, const HcalDDDRecConstants* hcons) { +std::auto_ptr CaloTowerHardcodeGeometryLoader::load(const CaloTowerTopology *limits, const HcalTopology *hcaltopo, const HcalDDDRecConstants* hcons) { + m_limits = limits; m_hcaltopo = hcaltopo; m_hcons = hcons; @@ -15,13 +16,13 @@ std::auto_ptr CaloTowerHardcodeGeometryLoader::load(con theHFEtaBounds = m_hcons->getEtaTableHF(); theHBHEEtaBounds = m_hcons->getEtaTable(); - CaloTowerGeometry* geom=new CaloTowerGeometry(); + CaloTowerGeometry* geom=new CaloTowerGeometry(m_limits); if( 0 == geom->cornersMgr() ) geom->allocateCorners ( - CaloTowerGeometry::k_NumberOfCellsForCorners ) ; + geom->numberOfCellsForCorners() ) ; if( 0 == geom->parMgr() ) geom->allocatePar ( - CaloTowerGeometry::k_NumberOfParametersPerShape*CaloTowerGeometry::k_NumberOfShapes, - CaloTowerGeometry::k_NumberOfParametersPerShape ) ; + geom->numberOfParametersPerShape()*geom->numberOfShapes(), + geom->numberOfParametersPerShape() ) ; int nnn=0; // simple loop @@ -63,10 +64,11 @@ CaloTowerHardcodeGeometryLoader::makeCell( int ieta, const double HFthick = 165; // Tower 17 is the last EB tower - int etaRing=abs(ieta); + //use CT topology to get proper ieta for hcal + int etaRing=m_limits->convertCTtoHcal(abs(ieta)); int sign=(ieta>0)?(1):(-1); double eta1, eta2; - if (abs(ieta)>m_hcaltopo->lastHERing()) { + if (abs(ieta)>m_limits->lastHERing()) { eta1 = theHFEtaBounds[etaRing-m_hcaltopo->firstHFRing()]; eta2 = theHFEtaBounds[etaRing-m_hcaltopo->firstHFRing()+1]; } else { @@ -85,13 +87,13 @@ CaloTowerHardcodeGeometryLoader::makeCell( int ieta, double x,y,z,thickness; bool alongZ=true; - if (abs(ieta)>m_hcaltopo->lastHERing()) { // forward + if (abs(ieta)>m_limits->lastHERing()) { // forward z=HFz; double r=z/sinh(eta); x=r * cos(phi); y=r * sin(phi); thickness=HFthick/tanh(eta); - } else if (abs(ieta)>m_hcaltopo->firstHERing()+1) { // EE-containing + } else if (abs(ieta)>m_limits->firstHERing()+1) { // EE-containing z=EEz; double r=z/sinh(eta); x=r * cos(phi); diff --git a/HLTrigger/HLTanalyzers/interface/HLTAnalyzer.h b/HLTrigger/HLTanalyzers/interface/HLTAnalyzer.h index 23a56a362267b..1b7abfd473912 100644 --- a/HLTrigger/HLTanalyzers/interface/HLTAnalyzer.h +++ b/HLTrigger/HLTanalyzers/interface/HLTAnalyzer.h @@ -19,7 +19,9 @@ #include "FWCore/Framework/interface/ESHandle.h" #include "Geometry/Records/interface/IdealGeometryRecord.h" +#include "Geometry/Records/interface/HcalRecNumberingRecord.h" #include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" #include "CondFormats/DataRecord/interface/L1CaloGeometryRecord.h" diff --git a/HLTrigger/HLTanalyzers/interface/HLTJets.h b/HLTrigger/HLTanalyzers/interface/HLTJets.h index 62245d42e5471..443c501fdd0e6 100644 --- a/HLTrigger/HLTanalyzers/interface/HLTJets.h +++ b/HLTrigger/HLTanalyzers/interface/HLTJets.h @@ -30,6 +30,7 @@ #include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" #include "DataFormats/Candidate/interface/Candidate.h" #include "Geometry/CaloGeometry/interface/CaloGeometry.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" #include "DataFormats/TauReco/interface/HLTTau.h" #include "DataFormats/TauReco/interface/PFTau.h" @@ -101,6 +102,7 @@ class HLTJets { const edm::Handle & caloTowersCleanerUpperR45, const edm::Handle & caloTowersCleanerLowerR45, const edm::Handle & caloTowersCleanerNoR45, + const CaloTowerTopology * cttopo, const edm::Handle & pfmets, double thresholdForSavingTowers, double minPtCH, diff --git a/HLTrigger/HLTanalyzers/src/HLTAnalyzer.cc b/HLTrigger/HLTanalyzers/src/HLTAnalyzer.cc index c7c4a5e872818..6b4f64ba1ca2d 100644 --- a/HLTrigger/HLTanalyzers/src/HLTAnalyzer.cc +++ b/HLTrigger/HLTanalyzers/src/HLTAnalyzer.cc @@ -542,6 +542,9 @@ void HLTAnalyzer::analyze(edm::Event const& iEvent, edm::EventSetup const& iSetu edm::Handle electronHFClusterAssociation; iEvent.getByToken(HFEMClusterShapeAssociationToken_,electronHFClusterAssociation); + edm::ESHandle caloTowerTopology; + iSetup.get().get(caloTowerTopology); + edm::ESHandle theMagField; iSetup.get().get(theMagField); @@ -759,6 +762,7 @@ void HLTAnalyzer::analyze(edm::Event const& iEvent, edm::EventSetup const& iSetu caloTowersCleanerUpperR45, caloTowersCleanerLowerR45, caloTowersCleanerNoR45, + &*caloTowerTopology, recoPFMet, towerThreshold_, _MinPtGammas, diff --git a/HLTrigger/HLTanalyzers/src/HLTJets.cc b/HLTrigger/HLTanalyzers/src/HLTJets.cc index d826267a24399..c7e6c3b21e099 100644 --- a/HLTrigger/HLTanalyzers/src/HLTJets.cc +++ b/HLTrigger/HLTanalyzers/src/HLTJets.cc @@ -426,6 +426,7 @@ void HLTJets::analyze(edm::Event const& iEvent, const edm::Handle & caloTowersCleanerUpperR45, const edm::Handle & caloTowersCleanerLowerR45, const edm::Handle & caloTowersCleanerNoR45, + const CaloTowerTopology * cttopo, const edm::Handle & pfmets, double thresholdForSavingTowers, double minPtCH, @@ -587,19 +588,19 @@ void HLTJets::analyze(edm::Event const& iEvent, if( caloTowersCleanerUpperR45.isValid() ){ towersUpperValid = true; for( CaloTowerCollection::const_iterator tow = caloTowersCleanerUpperR45->begin(); tow != caloTowersCleanerUpperR45->end(); tow++){ - towersUpper.insert(tow->id().denseIndex()); + towersUpper.insert(cttopo->denseIndex(tow->id())); } } if( caloTowersCleanerLowerR45.isValid() ){ towersLowerValid = true; for( CaloTowerCollection::const_iterator tow = caloTowersCleanerLowerR45->begin(); tow != caloTowersCleanerLowerR45->end(); tow++){ - towersLower.insert(tow->id().denseIndex()); + towersLower.insert(cttopo->denseIndex(tow->id())); } } if( caloTowersCleanerNoR45.isValid() ){ towersNoneValid = true; for( CaloTowerCollection::const_iterator tow = caloTowersCleanerNoR45->begin(); tow != caloTowersCleanerNoR45->end(); tow++){ - towersNone.insert(tow->id().denseIndex()); + towersNone.insert(cttopo->denseIndex(tow->id())); } } if (caloTowers.isValid()) { @@ -616,9 +617,9 @@ void HLTJets::analyze(edm::Event const& iEvent, towhd[jtow] = tower->hadEnergy(); towoe[jtow] = tower->outerEnergy(); // noise filters: true = no noise, false = noise - if(towersUpperValid) {if(towersUpper.find(tower->id().denseIndex()) == towersUpper.end()) towR45upper[jtow]=true; else towR45upper[jtow]=false;} - if(towersLowerValid) {if(towersLower.find(tower->id().denseIndex()) == towersLower.end()) towR45lower[jtow]=true; else towR45lower[jtow]=false;} - if(towersNoneValid) {if(towersNone.find(tower->id().denseIndex()) == towersNone.end()) towR45none[jtow]=true; else towR45none[jtow]=false;} + if(towersUpperValid) {if(towersUpper.find(cttopo->denseIndex(tower->id())) == towersUpper.end()) towR45upper[jtow]=true; else towR45upper[jtow]=false;} + if(towersLowerValid) {if(towersLower.find(cttopo->denseIndex(tower->id())) == towersLower.end()) towR45lower[jtow]=true; else towR45lower[jtow]=false;} + if(towersNoneValid) {if(towersNone.find(cttopo->denseIndex(tower->id())) == towersNone.end()) towR45none[jtow]=true; else towR45none[jtow]=false;} jtow++; } } diff --git a/HLTrigger/JetMET/src/HLTHcalTowerNoiseCleaner.cc b/HLTrigger/JetMET/src/HLTHcalTowerNoiseCleaner.cc index 7a1765516b673..9a0935d56afaf 100644 --- a/HLTrigger/JetMET/src/HLTHcalTowerNoiseCleaner.cc +++ b/HLTrigger/JetMET/src/HLTHcalTowerNoiseCleaner.cc @@ -29,6 +29,9 @@ #include "DataFormats/JetReco/interface/Jet.h" #include "DataFormats/JetReco/interface/CaloJet.h" #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" +#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" +#include "Geometry/Records/interface/HcalRecNumberingRecord.h" #include "DataFormats/Math/interface/LorentzVector.h" #include "DataFormats/Math/interface/Point3D.h" @@ -157,6 +160,9 @@ void HLTHcalTowerNoiseCleaner::produce(edm::Event& iEvent, const edm::EventSetup return; } + //get the calotower topology + edm::ESHandle caloTowerTopology; + iSetup.get().get(caloTowerTopology); // get the RBXs produced by RecoMET/METProducers/HcalNoiseInfoProducer edm::Handle rbxs_h; @@ -222,7 +228,7 @@ void HLTHcalTowerNoiseCleaner::produce(edm::Event& iEvent, const edm::EventSetup for( noiseTowersIt = noiseTowers.begin(); noiseTowersIt != noiseTowers.end(); noiseTowersIt++){ edm::Ref > tower_ref = *noiseTowersIt; CaloTowerDetId id = tower_ref->id(); - noisyTowers.insert( id.denseIndex() ); + noisyTowers.insert( caloTowerTopology->denseIndex(id) ); }} } // done with noise loop }//if(severity_>0) @@ -235,7 +241,7 @@ void HLTHcalTowerNoiseCleaner::produce(edm::Event& iEvent, const edm::EventSetup for(inTowersIt = tower_h->begin(); inTowersIt != tower_h->end(); inTowersIt++){ const CaloTower & tower = (*inTowersIt); CaloTowerDetId id = tower.id(); - if(noisyTowers.find( id.denseIndex() ) == noisyTowers.end()){ // the tower is not noisy + if(noisyTowers.find( caloTowerTopology->denseIndex(id) ) == noisyTowers.end()){ // the tower is not noisy OutputTowers->push_back(*inTowersIt); } } diff --git a/RecoLocalCalo/CaloTowersCreator/interface/CaloTowersCreationAlgo.h b/RecoLocalCalo/CaloTowersCreator/interface/CaloTowersCreationAlgo.h index e4e7f860c0c6e..1e3a979efd978 100644 --- a/RecoLocalCalo/CaloTowersCreator/interface/CaloTowersCreationAlgo.h +++ b/RecoLocalCalo/CaloTowersCreator/interface/CaloTowersCreationAlgo.h @@ -27,6 +27,7 @@ #include +class CaloTowerTopology; class HcalTopology; class CaloGeometry; class CaloSubdetectorGeometry; @@ -71,7 +72,8 @@ class CaloTowersCreationAlgo { double momHBDepth, double momHEDepth, double momEBDepth, - double momEEDepth + double momEEDepth, + int hcalPhase=0 ); CaloTowersCreationAlgo(double EBthreshold, double EEthreshold, @@ -101,10 +103,11 @@ class CaloTowersCreationAlgo { double momHBDepth, double momHEDepth, double momEBDepth, - double momEEDepth + double momEEDepth, + int hcalPhase=0 ); - void setGeometry(const CaloTowerConstituentsMap* cttopo, const HcalTopology* htopo, const CaloGeometry* geo); + void setGeometry(const CaloTowerTopology* cttopo, const CaloTowerConstituentsMap* ctmap, const HcalTopology* htopo, const CaloGeometry* geo); // pass the containers of channels status from the event record (stored in DB) // these are called in CaloTowersCreator @@ -270,6 +273,7 @@ class CaloTowersCreationAlgo { double theHOEScale; double theHF1EScale; double theHF2EScale; + const CaloTowerTopology* theTowerTopology; const HcalTopology* theHcalTopology; const CaloGeometry* theGeometry; const CaloTowerConstituentsMap* theTowerConstituentsMap; @@ -334,7 +338,8 @@ class CaloTowersCreationAlgo { HcalDropChMap hcalDropChMap; // Number of bad Ecal channel in each tower - unsigned short ecalBadChs[CaloTowerDetId::kSizeForDenseIndexing]; + //unsigned short ecalBadChs[CaloTowerDetId::kSizeForDenseIndexing]; + std::vector ecalBadChs; // clasification of channels in tower construction: the category definition is // affected by the setting in the configuration file @@ -347,6 +352,10 @@ class CaloTowersCreationAlgo { edm::Handle theEbHandle; edm::Handle theEeHandle; + //store merged depths for tower 28/29 + std::vector mergedDepths; + + int theHcalPhase; }; diff --git a/RecoLocalCalo/CaloTowersCreator/python/calotowermaker_cfi.py b/RecoLocalCalo/CaloTowersCreator/python/calotowermaker_cfi.py index b78e6ebae65fd..509bff7a5ca8c 100644 --- a/RecoLocalCalo/CaloTowersCreator/python/calotowermaker_cfi.py +++ b/RecoLocalCalo/CaloTowersCreator/python/calotowermaker_cfi.py @@ -136,6 +136,9 @@ # flag to allow/disallow missing inputs - AllowMissingInputs = cms.bool(False) + AllowMissingInputs = cms.bool(False), + +# specify hcal upgrade phase - 0, 1, 2 + HcalPhase = cms.int32(0) ) diff --git a/RecoLocalCalo/CaloTowersCreator/python/calotowerremaker_cfi.py b/RecoLocalCalo/CaloTowersCreator/python/calotowerremaker_cfi.py index d8a7f028e0691..a855d87f0fc2e 100644 --- a/RecoLocalCalo/CaloTowersCreator/python/calotowerremaker_cfi.py +++ b/RecoLocalCalo/CaloTowersCreator/python/calotowerremaker_cfi.py @@ -59,7 +59,8 @@ MomHBDepth = cms.double(0.2), MomHEDepth = cms.double(0.4), MomEBDepth = cms.double(0.3), - MomEEDepth = cms.double(0.0) + MomEEDepth = cms.double(0.0), + HcalPhase = cms.int32(0) ) diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreationAlgo.cc b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreationAlgo.cc index 5905ad6f51e6a..ed235a2052f34 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreationAlgo.cc +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreationAlgo.cc @@ -1,11 +1,13 @@ #include "RecoLocalCalo/CaloTowersCreator/interface/CaloTowersCreationAlgo.h" #include "Geometry/CaloTopology/interface/HcalTopology.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" #include "Geometry/CaloTopology/interface/CaloTowerConstituentsMap.h" #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h" #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h" #include "Geometry/CaloGeometry/interface/CaloGeometry.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "Math/Interpolator.h" +#include CaloTowersCreationAlgo::CaloTowersCreationAlgo() : theEBthreshold(-1000.), @@ -64,7 +66,8 @@ CaloTowersCreationAlgo::CaloTowersCreationAlgo() theMomHBDepth(0.), theMomHEDepth(0.), theMomEBDepth(0.), - theMomEEDepth(0.) + theMomEEDepth(0.), + theHcalPhase(0) { } @@ -90,7 +93,8 @@ CaloTowersCreationAlgo::CaloTowersCreationAlgo(double EBthreshold, double EEthre double momHBDepth, double momHEDepth, double momEBDepth, - double momEEDepth) + double momEEDepth, + int hcalPhase) : theEBthreshold(EBthreshold), theEEthreshold(EEthreshold), @@ -144,8 +148,8 @@ CaloTowersCreationAlgo::CaloTowersCreationAlgo(double EBthreshold, double EEthre theMomHBDepth(momHBDepth), theMomHEDepth(momHEDepth), theMomEBDepth(momEBDepth), - theMomEEDepth(momEEDepth) - + theMomEEDepth(momEEDepth), + theHcalPhase(hcalPhase) { } @@ -178,7 +182,8 @@ CaloTowersCreationAlgo::CaloTowersCreationAlgo(double EBthreshold, double EEthre double momHBDepth, double momHEDepth, double momEBDepth, - double momEEDepth) + double momEEDepth, + int hcalPhase) : theEBthreshold(EBthreshold), theEEthreshold(EEthreshold), @@ -232,7 +237,8 @@ CaloTowersCreationAlgo::CaloTowersCreationAlgo(double EBthreshold, double EEthre theMomHBDepth(momHBDepth), theMomHEDepth(momHEDepth), theMomEBDepth(momEBDepth), - theMomEEDepth(momEEDepth) + theMomEEDepth(momEEDepth), + theHcalPhase(hcalPhase) { // static int N = 0; @@ -241,11 +247,40 @@ CaloTowersCreationAlgo::CaloTowersCreationAlgo(double EBthreshold, double EEthre } -void CaloTowersCreationAlgo::setGeometry(const CaloTowerConstituentsMap* ctt, const HcalTopology* topo, const CaloGeometry* geo) { - theTowerConstituentsMap=ctt; - theHcalTopology = topo; +void CaloTowersCreationAlgo::setGeometry(const CaloTowerTopology* cttopo, const CaloTowerConstituentsMap* ctmap, const HcalTopology* htopo, const CaloGeometry* geo) { + theTowerTopology = cttopo; + theTowerConstituentsMap = ctmap; + theHcalTopology = htopo; theGeometry = geo; theTowerGeometry=geo->getSubdetectorGeometry(DetId::Calo,CaloTowerDetId::SubdetId); + + //initialize ecal bad channel map + ecalBadChs.resize(theTowerTopology->sizeForDenseIndexing(),0); + + //store some specific geom info + + //which depths of tower 28/29 are merged? + //the merging starts at layer 5 in phase 0 or phase 1 configurations + if(theHcalPhase==0 || theHcalPhase==1){ + std::vector tower28depths; + int ndepths, startdepth; + theHcalTopology->getDepthSegmentation(theHcalTopology->lastHERing()-1,tower28depths); + theHcalTopology->depthBinInformation(HcalEndcap,theHcalTopology->lastHERing()-1,ndepths,startdepth); + + //keep track of which depths are merged + //layer 5 = index 6 (layers start at -1) + std::vector isMergedDepth(ndepths,true); + for(int i = 0; i < std::min(6,(int)(tower28depths.size())); i++){ + isMergedDepth[tower28depths[i]-startdepth] = false; + } + + //store true merged depths + for(int i = 0; i < ndepths; i++){ + if(isMergedDepth[i]) mergedDepths.push_back(i+startdepth); + } + + } + } void CaloTowersCreationAlgo::begin() { @@ -326,7 +361,7 @@ void CaloTowersCreationAlgo::rescaleTowers(const CaloTowerCollection& ctc, CaloT double weight = 1.0; // HF - if (ctcItr->ietaAbs()>=30) { + if (ctcItr->ietaAbs()>=theTowerTopology->firstHFRing()) { double E_short = 0.5 * newE_had; // from the definitions for HF double E_long = newE_em + 0.5 * newE_had; // // scale @@ -363,7 +398,7 @@ void CaloTowersCreationAlgo::rescaleTowers(const CaloTowerCollection& ctc, CaloT if (HcalDetId(constId).subdet()==HcalOuter) continue; getThresholdAndWeight(constId, threshold, weight); newE_had *= weight; - if (ctcItr->ietaAbs()>16) newE_outer *= weight; + if (ctcItr->ietaAbs()>theTowerTopology->firstHERing()) newE_outer *= weight; break; } @@ -371,7 +406,7 @@ void CaloTowersCreationAlgo::rescaleTowers(const CaloTowerCollection& ctc, CaloT // now make the new tower - double newE_hadTot = (theHOIsUsed && twrId.ietaAbs()<16)? newE_had+newE_outer : newE_had; + double newE_hadTot = (theHOIsUsed && twrId.ietaAbs()<=theTowerTopology->lastHORing())? newE_had+newE_outer : newE_had; GlobalPoint emPoint = ctcItr->emPosition(); GlobalPoint hadPoint = ctcItr->emPosition(); @@ -381,7 +416,7 @@ void CaloTowersCreationAlgo::rescaleTowers(const CaloTowerCollection& ctc, CaloT CaloTower::PolarLorentzVector towerP4; - if (ctcItr->ietaAbs()<30) { + if (ctcItr->ietaAbs()firstHFRing()) { if (newE_em>0) towerP4 += CaloTower::PolarLorentzVector(newE_em*f_em, emPoint.eta(), emPoint.phi(), 0); if (newE_hadTot>0) towerP4 += CaloTower::PolarLorentzVector(newE_hadTot*f_had, hadPoint.eta(), hadPoint.phi(), 0); } @@ -397,6 +432,11 @@ void CaloTowersCreationAlgo::rescaleTowers(const CaloTowerCollection& ctc, CaloT // copy the timings, have to convert back to int, 1 unit = 0.01 ns rescaledTower.setEcalTime( int(ctcItr->ecalTime()*100.0 + 0.5) ); rescaledTower.setHcalTime( int(ctcItr->hcalTime()*100.0 + 0.5) ); + //add topology info + rescaledTower.setHcalLimits(theTowerTopology->firstHBRing(), theTowerTopology->lastHBRing(), + theTowerTopology->firstHERing(), theTowerTopology->lastHERing(), + theTowerTopology->firstHFRing(), theTowerTopology->lastHFRing(), + theTowerTopology->firstHORing(), theTowerTopology->lastHORing() ); std::vector contains; for (unsigned int iConst = 0; iConst < ctcItr->constituentsSize(); ++iConst) { @@ -429,11 +469,13 @@ void CaloTowersCreationAlgo::assignHitHcal(const CaloRecHit * recHit) { double energy = recHit->energy(); // original RecHit energy is used to apply thresholds double e = energy * weight; // energies scaled by user weight: used in energy assignments - // SPECIAL handling of tower 28/depth 3 --> half into tower 28 and half into tower 29 + // SPECIAL handling of tower 28 merged depths --> half into tower 28 and half into tower 29 if (detId.det()==DetId::Hcal && HcalDetId(detId).subdet()==HcalEndcap && - HcalDetId(detId).depth()==3 && - HcalDetId(detId).ietaAbs()==28) { + (theHcalPhase==0 || theHcalPhase==1) && + std::find(mergedDepths.begin(), mergedDepths.end(), HcalDetId(detId).depth())!=mergedDepths.end() && + //HcalDetId(detId).depth()==3 && + HcalDetId(detId).ietaAbs()==theHcalTopology->lastHERing()-1) { ////////////////////////////// unsigned int chStatusForCT = hcalChanStatusForCaloTower(recHit); @@ -612,7 +654,7 @@ void CaloTowersCreationAlgo::assignHitHcal(const CaloRecHit * recHit) { // store energy in highest depth for towers 18-27 (for electron,photon ID in endcap) // also, store energy in HE part of tower 16 (for JetMET cleanup) HcalDetId hcalDetId(detId); - if (hcalDetId.subdet()==HcalEndcap) { + if (hcalDetId.subdet()==HcalEndcap && theHcalPhase==0) { if ( (hcalDetId.depth()==2 && hcalDetId.ietaAbs()>=18 && hcalDetId.ietaAbs()<27) || (hcalDetId.depth()==3 && hcalDetId.ietaAbs()==27) || (hcalDetId.depth()==3 && hcalDetId.ietaAbs()==16) ) { @@ -771,14 +813,14 @@ void CaloTowersCreationAlgo::rescale(const CaloTower * ct) { CaloTowersCreationAlgo::MetaTower & CaloTowersCreationAlgo::find(const CaloTowerDetId & detId) { if (theTowerMap.empty()) { - theTowerMap.resize(CaloTowerDetId::kSizeForDenseIndexing); + theTowerMap.resize(theTowerTopology->sizeForDenseIndexing()); } - auto & mt = theTowerMap[detId.denseIndex()]; + auto & mt = theTowerMap[theTowerTopology->denseIndex(detId)]; if (mt.empty()) { mt.id=detId; - mt.metaConstituents.reserve(detId.ietaAbs()<30 ? 12 : 2); + mt.metaConstituents.reserve(detId.ietaAbs()firstHFRing() ? 12 : 2); ++theTowerMapSize; } @@ -805,7 +847,7 @@ void CaloTowersCreationAlgo::convert(const CaloTowerDetId& id, const MetaTower& // When summing up the energy of the tower these checks are performed in the loops over RecHits std::vector > metaContains=mt.metaConstituents; - if (id.ietaAbs()<=29 && E_emfirstHFRing() && E_em > metaContains_noecal; @@ -814,10 +856,10 @@ void CaloTowersCreationAlgo::convert(const CaloTowerDetId& id, const MetaTower& if (i->first.det()!=DetId::Ecal) metaContains_noecal.push_back(*i); metaContains.swap(metaContains_noecal); } - if (id.ietaAbs()<=29 && E_hadfirstHFRing() && E_hadlastHORing()) E-=E_outer; // not subtracted before, think it should be done E_had=0; E_outer=0; @@ -830,7 +872,7 @@ void CaloTowersCreationAlgo::convert(const CaloTowerDetId& id, const MetaTower& if(metaContains.empty()) return; - double E_had_tot = (theHOIsUsed && id.ietaAbs()<16)? E_had+E_outer : E_had; + double E_had_tot = (theHOIsUsed && id.ietaAbs()<=theTowerTopology->lastHORing())? E_had+E_outer : E_had; // create CaloTower using the selected algorithm @@ -879,7 +921,7 @@ void CaloTowersCreationAlgo::convert(const CaloTowerDetId& id, const MetaTower& case 1 : { // separate 4-vectors for ECAL, HCAL, add to get the 4-vector of the tower (=>tower has mass!) - if (id.ietaAbs()<=29) { + if (id.ietaAbs()firstHFRing()) { Basic3DVectorF emP4; if (E_em>0) { emPoint = emShwrPos(metaContains, momEmDepth, E_em); @@ -927,7 +969,7 @@ void CaloTowersCreationAlgo::convert(const CaloTowerDetId& id, const MetaTower& case 2: { // use ECAL position for the tower (when E_cal>0), else default CaloTower position (massless tower) - if (id.ietaAbs()<=29) { + if (id.ietaAbs()firstHFRing()) { if (E_em>0) emPoint = emShwrLogWeightPos(metaContains, momEmDepth, E_em); else emPoint = theTowerGeometry->getGeometry(id)->getPosition(); towerP4 = emPoint.basicVector().unit(); @@ -975,7 +1017,12 @@ void CaloTowersCreationAlgo::convert(const CaloTowerDetId& id, const MetaTower& float hcalTime = (mt.hadSumEForTime>0)? mt.hadSumTimeTimesE/mt.hadSumEForTime : -9999; caloTower.setEcalTime(compactTime(ecalTime)); caloTower.setHcalTime(compactTime(hcalTime)); - + //add topology info + caloTower.setHcalLimits(theTowerTopology->firstHBRing(), theTowerTopology->lastHBRing(), + theTowerTopology->firstHERing(), theTowerTopology->lastHERing(), + theTowerTopology->firstHFRing(), theTowerTopology->lastHFRing(), + theTowerTopology->firstHORing(), theTowerTopology->lastHORing() ); + // set the CaloTower status word ===================================== // Channels must be counter exclusively in the defined cathegories // "Bad" channels (not used in energy assignment) can be flagged during @@ -1038,14 +1085,14 @@ void CaloTowersCreationAlgo::convert(const CaloTowerDetId& id, const MetaTower& } } - auto numBadEcalChanNew = ecalBadChs[id.denseIndex()]+mt.numBadEcalCells; // - mt.numRecEcalCells + auto numBadEcalChanNew = ecalBadChs[theTowerTopology->denseIndex(id)]+mt.numBadEcalCells; // - mt.numRecEcalCells if (int(numBadEcalChanNew)!=int(numBadEcalChan)) { std::cout << "VI wrong " << ((inEcals[1]==1) ? "EE" : "" ) << id << " " << numBadEcalChanNew << " " << numBadEcalChan << " " << mt.numBadEcalCells << " " << mt.numRecEcalCells << std::endl; } */ - numBadEcalChan = ecalBadChs[id.denseIndex()]+mt.numBadEcalCells; // - mt.numRecEcalCells + numBadEcalChan = ecalBadChs[theTowerTopology->denseIndex(id)]+mt.numBadEcalCells; // - mt.numRecEcalCells //-------------------------------------------------------------------------------------- @@ -1299,47 +1346,37 @@ GlobalPoint CaloTowersCreationAlgo::hadShwrPos(CaloTowerDetId towerId, float fra HcalDetId frontCellId, backCellId; - if (towerId.ietaAbs() <= 14) { - // barrel, one depth only - frontCellId = HcalDetId(HcalBarrel, iEta, iPhi, 1); - backCellId = HcalDetId(HcalBarrel, iEta, iPhi, 1); - } - else if (towerId.ietaAbs() == 15) { - // barrel, two depths - frontCellId = HcalDetId(HcalBarrel, iEta, iPhi, 1); - backCellId = HcalDetId(HcalBarrel, iEta, iPhi, 2); - } - else if (towerId.ietaAbs() == 16) { - // barrel and endcap: two depths HB, one depth HE - frontCellId = HcalDetId(HcalBarrel, iEta, iPhi, 1); - backCellId = HcalDetId(HcalEndcap, iEta, iPhi, 3); // this cell is in endcap! - } - else if (towerId.ietaAbs() == 17) { - // endcap, one depth only - frontCellId = HcalDetId(HcalEndcap, iEta, iPhi, 1); - backCellId = HcalDetId(HcalEndcap, iEta, iPhi, 1); - } - else if (towerId.ietaAbs() >= 18 && towerId.ietaAbs() <= 26) { - // endcap: two depths - frontCellId = HcalDetId(HcalEndcap, iEta, iPhi, 1); - backCellId = HcalDetId(HcalEndcap, iEta, iPhi, 2); - } - else if (towerId.ietaAbs() <= 29) { - // endcap: three depths - frontCellId = HcalDetId(HcalEndcap, iEta, iPhi, 1); - // there is no iEta=29 for depth 3 - if (iEta == 29) iEta = 28; - if (iEta == -29) iEta = -28; - backCellId = HcalDetId(HcalEndcap, iEta, iPhi, 3); - } - else if (towerId.ietaAbs() >= 30) { - // forward, take the goemetry for long fibers - frontCellId = HcalDetId(HcalForward, iEta, iPhi, 1); - backCellId = HcalDetId(HcalForward, iEta, iPhi, 1); + if(towerId.ietaAbs() >= theTowerTopology->firstHFRing()){ + // forward, take the geometry for long fibers + frontCellId = HcalDetId(HcalForward, theTowerTopology->convertCTtoHcal(iEta), iPhi, 1); + backCellId = HcalDetId(HcalForward, theTowerTopology->convertCTtoHcal(iEta), iPhi, 1); } else { - // should not get here - return point; + //use constituents map + std::vector items = theTowerConstituentsMap->constituentsOf(towerId); + int frontDepth = 1000; + int backDepth = -1000; + for(unsigned i = 0; i < items.size(); i++){ + if(items[i].det()!=DetId::Hcal) continue; + HcalDetId hid(items[i]); + if(hid.subdet() == HcalOuter) continue; + + if(hid.depth()backDepth) { backCellId = hid; backDepth = hid.depth(); } + } + + //fix for tower 28/29 - no tower 29 at highest depths + if(towerId.ietaAbs()==theTowerTopology->lastHERing() && (theHcalPhase==0 || theHcalPhase==1)){ + CaloTowerDetId towerId28(towerId.ieta()-towerId.zside(),towerId.iphi()); + std::vector items28 = theTowerConstituentsMap->constituentsOf(towerId28); + for(unsigned i = 0; i < items28.size(); i++){ + if(items28[i].det()!=DetId::Hcal) continue; + HcalDetId hid(items28[i]); + if(hid.subdet() == HcalOuter) continue; + + if(hid.depth()>backDepth) { backCellId = hid; backDepth = hid.depth(); } + } + } } point = hadShwPosFromCells(DetId(frontCellId), DetId(backCellId), fracDepth); @@ -1471,13 +1508,16 @@ void CaloTowersCreationAlgo::makeHcalDropChMap() { hcalDropChMap[twrId] +=1; + HcalDetId hid(*it); + // special case for tower 29: if HCAL hit is in depth 3 add to twr 29 as well - if (HcalDetId(*it).subdet()==HcalEndcap && - HcalDetId(*it).depth()==3 && - HcalDetId(*it).ietaAbs()==28) { + if (hid.subdet()==HcalEndcap && + (theHcalPhase==0 || theHcalPhase==1) && + std::find(mergedDepths.begin(), mergedDepths.end(), hid.depth())!=mergedDepths.end() && + hid.ietaAbs()==theHcalTopology->lastHERing()-1) { - CaloTowerDetId twrId29(twrId.ieta()+twrId.zside(), twrId.iphi()); - hcalDropChMap[twrId29] +=1; + CaloTowerDetId twrId29(twrId.ieta()+twrId.zside(), twrId.iphi()); + hcalDropChMap[twrId29] +=1; } } @@ -1493,11 +1533,11 @@ void CaloTowersCreationAlgo::makeEcalBadChs() { // for ECAL the number of all bad channels is obtained here ----------------------- - for (auto ind=0U; indsizeForDenseIndexing(); ++ind) { auto & numBadEcalChan = ecalBadChs[ind]; numBadEcalChan=0; - auto id = CaloTowerDetId::detIdFromDenseIndex(ind); + auto id = theTowerTopology->detIdFromDenseIndex(ind); // this is utterly slow... (can be optmized if really needed) @@ -1525,7 +1565,7 @@ void CaloTowersCreationAlgo::makeEcalBadChs() { /* int tot=0; - for (auto ind=0U; indsizeForDenseIndexing(); ++ind) { if (ecalBadChs[ind]!=0) ++tot; } std::cout << " | " << tot << std::endl; diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc index 8af833e791474..3038b25d268f2 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc @@ -3,6 +3,7 @@ #include "Geometry/Records/interface/CaloGeometryRecord.h" #include "FWCore/Framework/interface/ESHandle.h" #include "Geometry/CaloTopology/interface/HcalTopology.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" // severity level for ECAL #include "RecoLocalCalo/EcalRecAlgos/interface/EcalSeverityLevelAlgoRcd.h" #include "CommonTools/Utils/interface/StringToEnumValue.h" @@ -62,7 +63,8 @@ CaloTowersCreator::CaloTowersCreator(const edm::ParameterSet& conf) : conf.getParameter("MomHBDepth"), conf.getParameter("MomHEDepth"), conf.getParameter("MomEBDepth"), - conf.getParameter("MomEEDepth") + conf.getParameter("MomEEDepth"), + conf.getParameter("HcalPhase") ), ecalLabels_(conf.getParameter >("ecalInputs")), @@ -132,10 +134,12 @@ void CaloTowersCreator::produce(edm::Event& e, const edm::EventSetup& c) { // get the necessary event setup objects... edm::ESHandle pG; edm::ESHandle htopo; - edm::ESHandle cttopo; + edm::ESHandle cttopo; + edm::ESHandle ctmap; c.get().get(pG); c.get().get(htopo); c.get().get(cttopo); + c.get().get(ctmap); // ECAL channel status map **************************************** edm::ESHandle ecalChStatus; @@ -166,7 +170,7 @@ void CaloTowersCreator::produce(edm::Event& e, const edm::EventSetup& c) { algo_.setHOEScale(HOEScale); algo_.setHF1EScale(HF1EScale); algo_.setHF2EScale(HF2EScale); - algo_.setGeometry(cttopo.product(),htopo.product(),pG.product()); + algo_.setGeometry(cttopo.product(),ctmap.product(),htopo.product(),pG.product()); // for treatment of problematic and anomalous cells @@ -237,7 +241,7 @@ void CaloTowersCreator::produce(edm::Event& e, const edm::EventSetup& c) { if ( (ec_tmp->begin()->detid()).subdetId() == EcalBarrel ) { ebHandle = ec_tmp; } - else if ((ec_tmp->begin()->detid()).subdetId() == EcalEndcap ) { + else if ((ec_tmp->begin()->detid()).subdetId() == EcalEndcap) { eeHandle = ec_tmp; } } diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc index 8aa92fe10912d..7e248a1b5b0d9 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc @@ -36,8 +36,8 @@ CaloTowersReCreator::CaloTowersReCreator(const edm::ParameterSet& conf) : conf.getParameter("MomHBDepth"), conf.getParameter("MomHEDepth"), conf.getParameter("MomEBDepth"), - conf.getParameter("MomEEDepth") - + conf.getParameter("MomEEDepth"), + conf.getParameter("HcalPhase") ), allowMissingInputs_(false) { @@ -60,11 +60,13 @@ void CaloTowersReCreator::produce(edm::Event& e, const edm::EventSetup& c) { // get the necessary event setup objects... edm::ESHandle pG; edm::ESHandle htopo; - edm::ESHandle cttopo; + edm::ESHandle cttopo; + edm::ESHandle ctmap; c.get().get(pG); c.get().get(htopo); c.get().get(cttopo); - + c.get().get(ctmap); + algo_.setEBEScale(EBEScale); algo_.setEEEScale(EEEScale); algo_.setHBEScale(HBEScale); @@ -73,7 +75,7 @@ void CaloTowersReCreator::produce(edm::Event& e, const edm::EventSetup& c) { algo_.setHOEScale(HOEScale); algo_.setHF1EScale(HF1EScale); algo_.setHF2EScale(HF2EScale); - algo_.setGeometry(cttopo.product(),htopo.product(),pG.product()); + algo_.setGeometry(cttopo.product(),ctmap.product(),htopo.product(),pG.product()); algo_.begin(); // clear the internal buffer diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.h b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.h index e7e8cb0a58716..13d1824c82b98 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.h +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.h @@ -9,6 +9,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "Geometry/CaloTopology/interface/HcalTopology.h" +#include "Geometry/CaloTopology/interface/CaloTowerTopology.h" #include "RecoLocalCalo/CaloTowersCreator/interface/CaloTowersCreationAlgo.h" diff --git a/RecoLocalCalo/CaloTowersCreator/test/BuildFile.xml b/RecoLocalCalo/CaloTowersCreator/test/BuildFile.xml deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/RecoLocalCalo/CaloTowersCreator/test/CaloTowerCreatorTest.cpp b/RecoLocalCalo/CaloTowersCreator/test/CaloTowerCreatorTest.cpp deleted file mode 100644 index 4cc14e23ebd18..0000000000000 --- a/RecoLocalCalo/CaloTowersCreator/test/CaloTowerCreatorTest.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* -#include "RecoLocalCalo/CaloTowersCreator/interface/CaloTowersCreationAlgo.h" -#include "Geometry/CaloTopology/interface/HcalTopology.h" -#include "Geometry/CaloTopology/interface/CaloTowerConstituentsMap.h" -#include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h" -#include "Geometry/HcalTowerAlgo/interface/HcalHardcodeGeometryLoader.h" -#include "Geometry/HcalTowerAlgo/interface/CaloTowerHardcodeGeometryLoader.h" -#include "Geometry/CaloGeometry/interface/CaloGeometry.h" -#include "DataFormats/HcalRecHit/interface/HcalRecHitCollections.h" -#include - -int main() { - - HcalTopology topology; - CaloTowerConstituentsMap ct_topo; - ct_topo.useStandardHB(true); - ct_topo.useStandardHE(true); - ct_topo.useStandardHF(true); - ct_topo.useStandardEB(true); - - HcalHardcodeGeometryLoader loader(topology); - std::auto_ptr hcalGeometry = loader.load(); - - CaloGeometry geometry; - geometry.setSubdetGeometry(DetId::Hcal, HcalBarrel, hcalGeometry.get()); - geometry.setSubdetGeometry(DetId::Hcal, HcalEndcap, hcalGeometry.get()); - geometry.setSubdetGeometry(DetId::Hcal, HcalOuter, hcalGeometry.get()); - geometry.setSubdetGeometry(DetId::Hcal, HcalForward, hcalGeometry.get()); - - CaloTowerHardcodeGeometryLoader towerLoader; - std::auto_ptr towerGeometry = towerLoader.load(); - - geometry.setSubdetGeometry(DetId::Calo, 1, towerGeometry.get()); - - CaloTowersCreationAlgo algo; - algo.setGeometry(&ct_topo,&topology, &geometry); - - // make one RecHit, with energy 1 GeV, for - // every cell with a given phi - int magicPhi = 5; - - HBHERecHitCollection hbheHits; - HORecHitCollection hoHits; - HFRecHitCollection hfHits; - - std::vector::const_iterator detItr; - - std::vector hbDets = geometry.getValidDetIds(DetId::Hcal, HcalBarrel); - for(detItr = hbDets.begin(); detItr != hbDets.end(); ++detItr) { - if(HcalDetId(*detItr).iphi() == magicPhi) { - hbheHits.push_back(HBHERecHit(*detItr, 1., 0)); - } - } - - std::vector heDets = geometry.getValidDetIds(DetId::Hcal, HcalEndcap); - for(detItr = heDets.begin(); detItr != heDets.end(); ++detItr) { - if(HcalDetId(*detItr).iphi() == magicPhi) { - hbheHits.push_back(HBHERecHit(*detItr, 1., 0)); - } - } - - std::vector hoDets = geometry.getValidDetIds(DetId::Hcal, HcalOuter); - for(detItr = hoDets.begin(); detItr != hoDets.end(); ++detItr) { - if(HcalDetId(*detItr).iphi() == magicPhi) { - hoHits.push_back(HORecHit(*detItr, 1., 0)); - } - } - - std::vector hfDets = geometry.getValidDetIds(DetId::Hcal, HcalForward); - for(detItr = hfDets.begin(); detItr != hfDets.end(); ++detItr) { - if(HcalDetId(*detItr).iphi() == magicPhi) { - hfHits.push_back(HFRecHit(*detItr, 1., 0)); - } - } - -std::cout << "NUMBER OF HITS " << hbheHits.size() << " " << hoHits.size() << " " << hfHits.size() << std::endl; - // do the actual tower building - CaloTowerCollection collection; - algo.begin(); - algo.process(hbheHits); - algo.process(hoHits); - algo.process(hfHits); - algo.finish(collection); - - - for(CaloTowerCollection::const_iterator towerItr = collection.begin(); - towerItr != collection.end(); ++towerItr) - { - std::cout << towerItr->id().ieta() << " " << towerItr->energy() << " EM " << towerItr->emEnergy() << " HAD " << towerItr->hadEnergy() << std::endl; - } - - std::cout << std::endl << "And now for something completely different..." << std::endl; - - // now make a messed-up one, which uses draconian thresholds on HED, and - // silly weights on HF - CaloTowersCreationAlgo sillyAlgo(0.,0.,0., 0., 0., 10000., - 0.,0.,0., - 1.,1.,1.,1.,1., - 1., 1., 1.1, - 0.,0.,0., true); - sillyAlgo.setGeometry(&ct_topo,&topology, &geometry); - - CaloTowerCollection collection2; - sillyAlgo.begin(); - sillyAlgo.process(hbheHits); - sillyAlgo.process(hoHits); - sillyAlgo.process(hfHits); - sillyAlgo.finish(collection2); - - for(CaloTowerCollection::const_iterator towerItr = collection2.begin(); - towerItr != collection2.end(); ++towerItr) - { - std::cout << towerItr->id().ieta() << " " << towerItr->energy() << " EM " << towerItr->emEnergy() << " HAD " << towerItr->hadEnergy() << std::endl; - } - -} -*/ diff --git a/RecoParticleFlow/PFClusterProducer/src/Navigators.cc b/RecoParticleFlow/PFClusterProducer/src/Navigators.cc index c8b40ccdf79a5..bcb4ded1162ec 100644 --- a/RecoParticleFlow/PFClusterProducer/src/Navigators.cc +++ b/RecoParticleFlow/PFClusterProducer/src/Navigators.cc @@ -118,7 +118,10 @@ class PFRecHitCaloTowerNavigator : public PFRecHitCaloNavigator caloTowerTopology; + iSetup.get().get(caloTowerTopology); + topology_.release(); + topology_.reset(caloTowerTopology.product()); } }; diff --git a/RecoTauTag/RecoTau/interface/CaloRecoTauAlgorithm.h b/RecoTauTag/RecoTau/interface/CaloRecoTauAlgorithm.h index 707973434bcf4..278f72a833da3 100644 --- a/RecoTauTag/RecoTau/interface/CaloRecoTauAlgorithm.h +++ b/RecoTauTag/RecoTau/interface/CaloRecoTauAlgorithm.h @@ -38,7 +38,7 @@ class CaloRecoTauAlgorithm { reco::CaloTau buildCaloTau(edm::Event&,const edm::EventSetup&,const reco::CaloTauTagInfoRef&,const reco::Vertex&); std::vector mySelectedDetId_; private: - std::vector getCaloTowerneighbourDetIds(const CaloSubdetectorGeometry*,CaloTowerDetId); + std::vector getCaloTowerneighbourDetIds(const CaloSubdetectorGeometry*, const CaloTowerTopology&, CaloTowerDetId); const TransientTrackBuilder* TransientTrackBuilder_; const MagneticField* MagneticField_; double LeadTrack_minPt_; diff --git a/RecoTauTag/RecoTau/src/CaloRecoTauAlgorithm.cc b/RecoTauTag/RecoTau/src/CaloRecoTauAlgorithm.cc index 8fcff4deb9a02..d62fa632b8824 100644 --- a/RecoTauTag/RecoTau/src/CaloRecoTauAlgorithm.cc +++ b/RecoTauTag/RecoTau/src/CaloRecoTauAlgorithm.cc @@ -97,10 +97,12 @@ CaloTau CaloRecoTauAlgorithm::buildCaloTau(edm::Event& iEvent,const edm::EventSe edm::ESHandle myCaloGeometry; iSetup.get().get(myCaloGeometry); const CaloSubdetectorGeometry* myCaloSubdetectorGeometry=(*myCaloGeometry).getSubdetectorGeometry(DetId::Calo,CaloTowerDetId::SubdetId); + edm::ESHandle caloTowerTopology; + iSetup.get().get(caloTowerTopology); CaloTowerDetId mypropagleadTrack_closestCaloTowerId((*myCaloSubdetectorGeometry).getClosestCell(GlobalPoint(mypropagleadTrackECALSurfContactPoint.x(), mypropagleadTrackECALSurfContactPoint.y(), mypropagleadTrackECALSurfContactPoint.z()))); - std::vector mypropagleadTrack_closestCaloTowerNeighbourIds=getCaloTowerneighbourDetIds(myCaloSubdetectorGeometry,mypropagleadTrack_closestCaloTowerId); + std::vector mypropagleadTrack_closestCaloTowerNeighbourIds=getCaloTowerneighbourDetIds(myCaloSubdetectorGeometry, *caloTowerTopology, mypropagleadTrack_closestCaloTowerId); for(std::vector::const_iterator iCaloTower=myCaloTowers.begin();iCaloTower!=myCaloTowers.end();iCaloTower++){ CaloTowerDetId iCaloTowerId((**iCaloTower).id()); bool CaloTower_inside3x3matrix=false; @@ -302,8 +304,7 @@ for(EERecHitCollection::const_iterator theRecHit = EERecHits->begin();theRecHit return myCaloTau; } -std::vector CaloRecoTauAlgorithm::getCaloTowerneighbourDetIds(const CaloSubdetectorGeometry* myCaloSubdetectorGeometry,CaloTowerDetId myCaloTowerDetId){ - CaloTowerTopology myCaloTowerTopology; +std::vector CaloRecoTauAlgorithm::getCaloTowerneighbourDetIds(const CaloSubdetectorGeometry* myCaloSubdetectorGeometry, const CaloTowerTopology & myCaloTowerTopology, CaloTowerDetId myCaloTowerDetId){ std::vector myCaloTowerneighbourDetIds; std::vector northDetIds=myCaloTowerTopology.north(myCaloTowerDetId); std::vector westDetIds=myCaloTowerTopology.west(myCaloTowerDetId); diff --git a/SimDataFormats/EcalTestBeam/interface/HodoscopeDetId.h b/SimDataFormats/EcalTestBeam/interface/HodoscopeDetId.h index 65a1f86ae5734..7878bca3a7ea5 100755 --- a/SimDataFormats/EcalTestBeam/interface/HodoscopeDetId.h +++ b/SimDataFormats/EcalTestBeam/interface/HodoscopeDetId.h @@ -5,7 +5,7 @@ #include #include "DataFormats/DetId/interface/DetId.h" #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" -#include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" +#include "DataFormats/EcalDetId/interface/EBDetId.h" /** \class HodoscopeDetId * Hodoscope fiber identifier class for the ECAL TBH4 setup @@ -15,9 +15,9 @@ // bkh June 2011: must be a calo detid type that is recognized by // CaloGenericDetId for use of its denseIndex() fcn. -// Hence choose CaloTowerDetId to inherit from. +// Hence choose EBDetId to inherit from. -class HodoscopeDetId : public CaloTowerDetId +class HodoscopeDetId : public EBDetId { public: diff --git a/SimDataFormats/EcalTestBeam/src/HodoscopeDetId.cc b/SimDataFormats/EcalTestBeam/src/HodoscopeDetId.cc index 431e0649b402a..10db4cfd3cc6d 100755 --- a/SimDataFormats/EcalTestBeam/src/HodoscopeDetId.cc +++ b/SimDataFormats/EcalTestBeam/src/HodoscopeDetId.cc @@ -3,12 +3,12 @@ #include HodoscopeDetId::HodoscopeDetId() : - CaloTowerDetId() + EBDetId() { } HodoscopeDetId::HodoscopeDetId( uint32_t rawid ) : - CaloTowerDetId( rawid ) + EBDetId( rawid ) { } @@ -26,7 +26,7 @@ HodoscopeDetId::fibrId() const HodoscopeDetId::HodoscopeDetId( int iPlane , int iFibr ) - : CaloTowerDetId( iPlane, iFibr ) + : EBDetId( iPlane, iFibr ) { if( !validDetId( iPlane, iFibr ) ) { @@ -36,7 +36,7 @@ HodoscopeDetId::HodoscopeDetId( int iPlane , } HodoscopeDetId::HodoscopeDetId( const DetId& gen ) : - CaloTowerDetId( gen ) + EBDetId( gen ) { if( !validDetId( planeId(), fibrId() ) ) { From 904091e96e0bcde9f4a20dc1b9e0a228b3e8aae4 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 24 Sep 2015 17:50:20 +0200 Subject: [PATCH 11/34] update HLT configs for new parameter in CaloTowersCreator --- .../test/HLTvsRECOstudies/hlt_data.py | 18 ++++++++++------ .../python/HLT_25ns14e33_v1_cff.py | 12 +++++++---- .../python/HLT_25ns14e33_v3_cff.py | 12 +++++++---- .../python/HLT_25ns14e33_v4_cff.py | 12 +++++++---- .../Configuration/python/HLT_25nsLowPU_cff.py | 9 +++++--- .../Configuration/python/HLT_50nsGRun_cff.py | 12 +++++++---- .../python/HLT_50ns_5e33_v1_cff.py | 12 +++++++---- .../python/HLT_50ns_5e33_v3_cff.py | 12 +++++++---- .../Configuration/python/HLT_FULL_cff.py | 12 +++++++---- .../Configuration/python/HLT_GRun_cff.py | 12 +++++++---- .../Configuration/python/HLT_LowPU_cff.py | 9 +++++--- .../Configuration/python/HLT_PIon_cff.py | 6 ++++-- .../test/OnLine_HLT_25ns14e33_v1.py | 12 +++++++---- .../test/OnLine_HLT_25ns14e33_v3.py | 12 +++++++---- .../test/OnLine_HLT_25ns14e33_v4.py | 12 +++++++---- .../test/OnLine_HLT_25nsLowPU.py | 9 +++++--- .../Configuration/test/OnLine_HLT_50nsGRun.py | 12 +++++++---- .../test/OnLine_HLT_50ns_5e33_v1.py | 12 +++++++---- .../test/OnLine_HLT_50ns_5e33_v3.py | 12 +++++++---- .../Configuration/test/OnLine_HLT_FULL.py | 12 +++++++---- .../Configuration/test/OnLine_HLT_GRun.py | 12 +++++++---- .../Configuration/test/OnLine_HLT_LowPU.py | 9 +++++--- .../Configuration/test/OnLine_HLT_PIon.py | 6 ++++-- HLTrigger/HLTanalyzers/python/HLT_FULL_cff.py | 21 ++++++++++++------- 24 files changed, 186 insertions(+), 93 deletions(-) diff --git a/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py b/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py index 3ba2f54df33d1..b4ddcfc713f5c 100644 --- a/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py +++ b/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py @@ -5784,7 +5784,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAntiKT5CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -5925,7 +5926,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAntiKT5CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -9053,7 +9055,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAntiKT5CaloJetsRegional = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -11455,7 +11458,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone5CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -14362,7 +14366,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltKT6CaloJetsForMuons = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 1 ), @@ -22345,7 +22350,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltHcalTowerFilter = cms.EDFilter( "HLTHcalTowerFilter", saveTags = cms.bool( False ), diff --git a/HLTrigger/Configuration/python/HLT_25ns14e33_v1_cff.py b/HLTrigger/Configuration/python/HLT_25ns14e33_v1_cff.py index e89340450d63d..e24eca20284c7 100644 --- a/HLTrigger/Configuration/python/HLT_25ns14e33_v1_cff.py +++ b/HLTrigger/Configuration/python/HLT_25ns14e33_v1_cff.py @@ -2445,7 +2445,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -2611,7 +2612,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -22986,7 +22988,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -45228,7 +45231,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_25ns14e33_v3_cff.py b/HLTrigger/Configuration/python/HLT_25ns14e33_v3_cff.py index 10f484b05ab6c..fb08cef9b7746 100644 --- a/HLTrigger/Configuration/python/HLT_25ns14e33_v3_cff.py +++ b/HLTrigger/Configuration/python/HLT_25ns14e33_v3_cff.py @@ -3337,7 +3337,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3519,7 +3520,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -25058,7 +25060,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48515,7 +48518,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_25ns14e33_v4_cff.py b/HLTrigger/Configuration/python/HLT_25ns14e33_v4_cff.py index 7b6a3fcdf1b3b..d7717f12bf3c3 100644 --- a/HLTrigger/Configuration/python/HLT_25ns14e33_v4_cff.py +++ b/HLTrigger/Configuration/python/HLT_25ns14e33_v4_cff.py @@ -3498,7 +3498,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3680,7 +3681,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -27137,7 +27139,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -49351,7 +49354,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_25nsLowPU_cff.py b/HLTrigger/Configuration/python/HLT_25nsLowPU_cff.py index 90757a35915bd..12409af16c191 100644 --- a/HLTrigger/Configuration/python/HLT_25nsLowPU_cff.py +++ b/HLTrigger/Configuration/python/HLT_25nsLowPU_cff.py @@ -2087,7 +2087,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -2751,7 +2752,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -6776,7 +6778,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltFixedGridRhoFastjetAllCaloForMuons = cms.EDProducer( "FixedGridRhoProducerFastjet", gridSpacing = cms.double( 0.55 ), diff --git a/HLTrigger/Configuration/python/HLT_50nsGRun_cff.py b/HLTrigger/Configuration/python/HLT_50nsGRun_cff.py index a0457eca37f8a..f67b8233d1689 100644 --- a/HLTrigger/Configuration/python/HLT_50nsGRun_cff.py +++ b/HLTrigger/Configuration/python/HLT_50nsGRun_cff.py @@ -3333,7 +3333,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3515,7 +3516,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -24984,7 +24986,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48440,7 +48443,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_50ns_5e33_v1_cff.py b/HLTrigger/Configuration/python/HLT_50ns_5e33_v1_cff.py index 6e7a13211c4e3..4793cae33624b 100644 --- a/HLTrigger/Configuration/python/HLT_50ns_5e33_v1_cff.py +++ b/HLTrigger/Configuration/python/HLT_50ns_5e33_v1_cff.py @@ -2452,7 +2452,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -2618,7 +2619,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -23141,7 +23143,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -45883,7 +45886,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_50ns_5e33_v3_cff.py b/HLTrigger/Configuration/python/HLT_50ns_5e33_v3_cff.py index 0badd3d5f8fd4..5706f9da8259a 100644 --- a/HLTrigger/Configuration/python/HLT_50ns_5e33_v3_cff.py +++ b/HLTrigger/Configuration/python/HLT_50ns_5e33_v3_cff.py @@ -3326,7 +3326,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3508,7 +3509,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -24927,7 +24929,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48363,7 +48366,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_FULL_cff.py b/HLTrigger/Configuration/python/HLT_FULL_cff.py index e0eded5ee231d..413e272ce780f 100644 --- a/HLTrigger/Configuration/python/HLT_FULL_cff.py +++ b/HLTrigger/Configuration/python/HLT_FULL_cff.py @@ -3809,7 +3809,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3991,7 +3992,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -29888,7 +29890,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -53466,7 +53469,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_GRun_cff.py b/HLTrigger/Configuration/python/HLT_GRun_cff.py index 8b8f7ae8e45fe..1e6bab9591586 100644 --- a/HLTrigger/Configuration/python/HLT_GRun_cff.py +++ b/HLTrigger/Configuration/python/HLT_GRun_cff.py @@ -3498,7 +3498,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3680,7 +3681,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -27137,7 +27139,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -49351,7 +49354,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_LowPU_cff.py b/HLTrigger/Configuration/python/HLT_LowPU_cff.py index 2dde55ea7a0c5..afff6cd9532d0 100644 --- a/HLTrigger/Configuration/python/HLT_LowPU_cff.py +++ b/HLTrigger/Configuration/python/HLT_LowPU_cff.py @@ -2062,7 +2062,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -2593,7 +2594,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -6777,7 +6779,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltFixedGridRhoFastjetAllCaloForMuons = cms.EDProducer( "FixedGridRhoProducerFastjet", gridSpacing = cms.double( 0.55 ), diff --git a/HLTrigger/Configuration/python/HLT_PIon_cff.py b/HLTrigger/Configuration/python/HLT_PIon_cff.py index 19d10d80bb908..2c6434c4ae53c 100644 --- a/HLTrigger/Configuration/python/HLT_PIon_cff.py +++ b/HLTrigger/Configuration/python/HLT_PIon_cff.py @@ -2075,7 +2075,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -5353,7 +5354,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) fragment.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v1.py b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v1.py index cf019790a9a05..a1f5c63f33251 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v1.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v1.py @@ -3007,7 +3007,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3173,7 +3174,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -23548,7 +23550,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -45790,7 +45793,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v3.py b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v3.py index 170933f24bf78..e561b818a956a 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v3.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v3.py @@ -3727,7 +3727,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3909,7 +3910,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -25448,7 +25450,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48905,7 +48908,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v4.py b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v4.py index c3e2fd8065b7b..01a0d7ff37d0c 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v4.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v4.py @@ -3888,7 +3888,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -4070,7 +4071,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -27527,7 +27529,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -49741,7 +49744,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_25nsLowPU.py b/HLTrigger/Configuration/test/OnLine_HLT_25nsLowPU.py index df4a77abab6c7..7651b7a859185 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_25nsLowPU.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_25nsLowPU.py @@ -2477,7 +2477,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3141,7 +3142,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -7166,7 +7168,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltFixedGridRhoFastjetAllCaloForMuons = cms.EDProducer( "FixedGridRhoProducerFastjet", gridSpacing = cms.double( 0.55 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_50nsGRun.py b/HLTrigger/Configuration/test/OnLine_HLT_50nsGRun.py index 393f5db73b983..86dbb7639c178 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_50nsGRun.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_50nsGRun.py @@ -3723,7 +3723,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3905,7 +3906,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -25374,7 +25376,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48830,7 +48833,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v1.py b/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v1.py index b9fd76a510589..139d3320d1280 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v1.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v1.py @@ -3014,7 +3014,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3180,7 +3181,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -23703,7 +23705,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -46445,7 +46448,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v3.py b/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v3.py index e550df70e04d4..b1cc89c40d10f 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v3.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v3.py @@ -3716,7 +3716,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3898,7 +3899,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -25317,7 +25319,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48753,7 +48756,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_FULL.py b/HLTrigger/Configuration/test/OnLine_HLT_FULL.py index edb18da874351..872677d6567f3 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_FULL.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_FULL.py @@ -4199,7 +4199,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -4381,7 +4382,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -30278,7 +30280,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -53856,7 +53859,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_GRun.py b/HLTrigger/Configuration/test/OnLine_HLT_GRun.py index dadb4a7a38c7f..78ad6f11c2a4f 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_GRun.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_GRun.py @@ -3888,7 +3888,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -4070,7 +4071,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -27527,7 +27529,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -49741,7 +49744,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_LowPU.py b/HLTrigger/Configuration/test/OnLine_HLT_LowPU.py index ef2d4095dfff6..3b75dbf48ff13 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_LowPU.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_LowPU.py @@ -2452,7 +2452,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -2983,7 +2984,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -7167,7 +7169,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltFixedGridRhoFastjetAllCaloForMuons = cms.EDProducer( "FixedGridRhoProducerFastjet", gridSpacing = cms.double( 0.55 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_PIon.py b/HLTrigger/Configuration/test/OnLine_HLT_PIon.py index b910d961c6532..4908c8203667c 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_PIon.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_PIon.py @@ -2465,7 +2465,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -5743,7 +5744,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) process.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), diff --git a/HLTrigger/HLTanalyzers/python/HLT_FULL_cff.py b/HLTrigger/HLTanalyzers/python/HLT_FULL_cff.py index 1143543b6fa10..2096a33003f98 100644 --- a/HLTrigger/HLTanalyzers/python/HLT_FULL_cff.py +++ b/HLTrigger/HLTanalyzers/python/HLT_FULL_cff.py @@ -4848,7 +4848,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) hltAntiKT5CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -5083,7 +5084,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) hltAntiKT5CaloJetsRegional = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -5552,7 +5554,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) hltAntiKT5CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -10566,7 +10569,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) hltStoppedHSCPIterativeCone5CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -13976,7 +13980,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) hltL2MuonIsolations = cms.EDProducer( "L2MuonIsolationProducer", WriteIsolatorFloat = cms.bool( False ), @@ -20874,7 +20879,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) hltHcalTowerFilter = cms.EDFilter( "HLTHcalTowerFilter", saveTags = cms.bool( False ), @@ -38409,7 +38415,8 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ) + EBGrid = cms.vdouble( ), + HcalPhase = cms.int32(0) ) hltMetForHf = cms.EDProducer( "CaloMETProducer", alias = cms.string( "RawCaloMET" ), From 39503fdef1c94933f2f54cc11e241e42a6b581ae Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 24 Sep 2015 22:23:32 +0200 Subject: [PATCH 12/34] update geom db configs --- Geometry/CaloEventSetup/python/CaloGeometryDBReader_cfi.py | 1 + Geometry/CaloEventSetup/python/CaloGeometryDBWriter_cfi.py | 1 + 2 files changed, 2 insertions(+) diff --git a/Geometry/CaloEventSetup/python/CaloGeometryDBReader_cfi.py b/Geometry/CaloEventSetup/python/CaloGeometryDBReader_cfi.py index 1b2be95f48f74..4c10047785310 100644 --- a/Geometry/CaloEventSetup/python/CaloGeometryDBReader_cfi.py +++ b/Geometry/CaloEventSetup/python/CaloGeometryDBReader_cfi.py @@ -6,5 +6,6 @@ from Geometry.HcalEventSetup.HcalGeometryDBReader_cfi import * from Geometry.HcalEventSetup.CaloTowerGeometryDBReader_cfi import * from Geometry.HcalEventSetup.HcalTopology_cfi import * +from Geometry.HcalEventSetup.CaloTowerTopology_cfi import * from Geometry.ForwardGeometry.ForwardGeometryDBReader_cfi import * diff --git a/Geometry/CaloEventSetup/python/CaloGeometryDBWriter_cfi.py b/Geometry/CaloEventSetup/python/CaloGeometryDBWriter_cfi.py index 8f693cac22669..cf7293f6d8d0b 100644 --- a/Geometry/CaloEventSetup/python/CaloGeometryDBWriter_cfi.py +++ b/Geometry/CaloEventSetup/python/CaloGeometryDBWriter_cfi.py @@ -5,5 +5,6 @@ from Geometry.HcalEventSetup.HcalGeometryDBWriter_cfi import * from Geometry.HcalEventSetup.CaloTowerGeometryDBWriter_cfi import * from Geometry.HcalEventSetup.HcalTopology_cfi import * +from Geometry.HcalEventSetup.CaloTowerTopology_cfi import * from Geometry.ForwardGeometry.ForwardGeometryDBWriter_cfi import * From 98dbf8730d4ad611d2f764abe9e5bd232b209f9b Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 25 Sep 2015 00:07:52 +0200 Subject: [PATCH 13/34] constituents map in calogeometry record --- .../plugins/CaloTowerConstituentsMapBuilder.cc | 6 +++--- .../plugins/CaloTowerConstituentsMapBuilder.h | 4 ++-- .../plugins/EgammaIsoHcalDetIdCollectionProducer.cc | 5 ++--- RecoEgamma/EgammaIsolationAlgos/src/EgammaHadTower.cc | 3 ++- RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc | 2 +- RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc | 2 +- .../HcalRecProducers/src/HBHEIsolatedNoiseReflagger.cc | 4 ++-- .../PFClusterProducer/plugins/PFCTRecHitProducer.cc | 3 +-- 8 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.cc b/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.cc index b86e8a86b1fa2..dd08621799ba2 100644 --- a/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.cc +++ b/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.cc @@ -59,13 +59,13 @@ CaloTowerConstituentsMapBuilder::fillDescriptions(edm::ConfigurationDescriptions // ------------ method called to produce the data ------------ CaloTowerConstituentsMapBuilder::ReturnType -CaloTowerConstituentsMapBuilder::produce(const HcalRecNumberingRecord& iRecord) +CaloTowerConstituentsMapBuilder::produce(const CaloGeometryRecord& iRecord) { edm::ESHandle hcaltopo; - iRecord.get(hcaltopo); + iRecord.getRecord().get(hcaltopo); edm::ESHandle cttopo; - iRecord.get(cttopo); + iRecord.getRecord().get(cttopo); std::auto_ptr prod( new CaloTowerConstituentsMap( &*hcaltopo, &*cttopo )); diff --git a/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.h b/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.h index c7c1b516b5546..c1066eff72532 100644 --- a/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.h +++ b/Geometry/CaloEventSetup/plugins/CaloTowerConstituentsMapBuilder.h @@ -26,7 +26,7 @@ #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "Geometry/Records/interface/HcalRecNumberingRecord.h" +#include "Geometry/Records/interface/CaloGeometryRecord.h" #include "Geometry/CaloTopology/interface/CaloTowerConstituentsMap.h" #include "Geometry/CaloGeometry/interface/CaloGeometry.h" @@ -45,7 +45,7 @@ class CaloTowerConstituentsMapBuilder : public edm::ESProducer { typedef std::auto_ptr ReturnType; - ReturnType produce(const HcalRecNumberingRecord&); + ReturnType produce(const CaloGeometryRecord&); static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); private: diff --git a/RecoEgamma/EgammaIsolationAlgos/plugins/EgammaIsoHcalDetIdCollectionProducer.cc b/RecoEgamma/EgammaIsolationAlgos/plugins/EgammaIsoHcalDetIdCollectionProducer.cc index a8cd23621b662..274e3a1b1e0a7 100644 --- a/RecoEgamma/EgammaIsolationAlgos/plugins/EgammaIsoHcalDetIdCollectionProducer.cc +++ b/RecoEgamma/EgammaIsolationAlgos/plugins/EgammaIsoHcalDetIdCollectionProducer.cc @@ -7,8 +7,7 @@ #include "DataFormats/DetId/interface/DetIdCollection.h" -#include "Geometry/Records/interface/HcalRecNumberingRecord.h" - +#include "Geometry/Records/interface/CaloGeometryRecord.h" EgammaIsoHcalDetIdCollectionProducer::EgammaIsoHcalDetIdCollectionProducer(const edm::ParameterSet& iConfig) { @@ -45,7 +44,7 @@ EgammaIsoHcalDetIdCollectionProducer::EgammaIsoHcalDetIdCollectionProducer(const void EgammaIsoHcalDetIdCollectionProducer::beginRun (edm::Run const& run, const edm::EventSetup & iSetup) { - iSetup.get().get(towerMap_); + iSetup.get().get(towerMap_); // std::cout <<" got geom "< #include EgammaHadTower::EgammaHadTower(const edm::EventSetup &es,HoeMode mode):mode_(mode) { edm::ESHandle ctmaph; - es.get().get(ctmaph); + es.get().get(ctmaph); towerMap_ = &(*ctmaph); NMaxClusters_ = 4; } diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc index 3038b25d268f2..4929285534082 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc @@ -139,7 +139,7 @@ void CaloTowersCreator::produce(edm::Event& e, const edm::EventSetup& c) { c.get().get(pG); c.get().get(htopo); c.get().get(cttopo); - c.get().get(ctmap); + c.get().get(ctmap); // ECAL channel status map **************************************** edm::ESHandle ecalChStatus; diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc index 7e248a1b5b0d9..d208ed4bdff4f 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc @@ -65,7 +65,7 @@ void CaloTowersReCreator::produce(edm::Event& e, const edm::EventSetup& c) { c.get().get(pG); c.get().get(htopo); c.get().get(cttopo); - c.get().get(ctmap); + c.get().get(ctmap); algo_.setEBEScale(EBEScale); algo_.setEEEScale(EEEScale); diff --git a/RecoLocalCalo/HcalRecProducers/src/HBHEIsolatedNoiseReflagger.cc b/RecoLocalCalo/HcalRecProducers/src/HBHEIsolatedNoiseReflagger.cc index 5653a7f70ff3e..3f6069ab5f625 100644 --- a/RecoLocalCalo/HcalRecProducers/src/HBHEIsolatedNoiseReflagger.cc +++ b/RecoLocalCalo/HcalRecProducers/src/HBHEIsolatedNoiseReflagger.cc @@ -9,7 +9,7 @@ Original Author: John Paul Chou (Brown University) #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/EventSetup.h" -#include "Geometry/Records/interface/HcalRecNumberingRecord.h" +#include "Geometry/Records/interface/CaloGeometryRecord.h" #include "DataFormats/JetReco/interface/TrackExtrapolation.h" #include "CondFormats/DataRecord/interface/EcalChannelStatusRcd.h" #include "RecoLocalCalo/HcalRecAlgos/interface/HcalSeverityLevelComputerRcd.h" @@ -95,7 +95,7 @@ HBHEIsolatedNoiseReflagger::produce(edm::Event& iEvent, const edm::EventSetup& e // get the calotower mappings edm::ESHandle ctcm; - evSetup.get().get(ctcm); + evSetup.get().get(ctcm); // get the HB/HE hits edm::Handle hbhehits_h; diff --git a/RecoParticleFlow/PFClusterProducer/plugins/PFCTRecHitProducer.cc b/RecoParticleFlow/PFClusterProducer/plugins/PFCTRecHitProducer.cc index 4ba5714ffbe4a..682c48cdb1b4a 100644 --- a/RecoParticleFlow/PFClusterProducer/plugins/PFCTRecHitProducer.cc +++ b/RecoParticleFlow/PFClusterProducer/plugins/PFCTRecHitProducer.cc @@ -9,7 +9,6 @@ #include "FWCore/Framework/interface/EventSetup.h" #include "CondFormats/DataRecord/interface/HcalChannelQualityRcd.h" #include "CondFormats/DataRecord/interface/EcalChannelStatusRcd.h" -#include "Geometry/Records/interface/HcalRecNumberingRecord.h" #include "DataFormats/ParticleFlowReco/interface/PFRecHit.h" #include "DataFormats/HcalDetId/interface/HcalSubdetector.h" @@ -838,7 +837,7 @@ PFCTRecHitProducer::beginLuminosityBlock(const edm::LuminosityBlock& lumi, theEcalChStatus = ecalChStatus.product(); edm::ESHandle cttopo; - es.get().get(cttopo); + es.get().get(cttopo); theTowerConstituentsMap = cttopo.product(); } From e31a79b2037811fe6c1289f42d1837231a6ae581 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 25 Sep 2015 20:23:05 +0200 Subject: [PATCH 14/34] fix topology test py files --- .../python/testCaloTowerTopology_cfg_dump.py | 222 ------------------ .../{python => }/testCaloTowerTopology_cfg.py | 0 2 files changed, 222 deletions(-) delete mode 100644 Geometry/CaloTopology/test/python/testCaloTowerTopology_cfg_dump.py rename Geometry/CaloTopology/test/{python => }/testCaloTowerTopology_cfg.py (100%) diff --git a/Geometry/CaloTopology/test/python/testCaloTowerTopology_cfg_dump.py b/Geometry/CaloTopology/test/python/testCaloTowerTopology_cfg_dump.py deleted file mode 100644 index bfa072d9f2468..0000000000000 --- a/Geometry/CaloTopology/test/python/testCaloTowerTopology_cfg_dump.py +++ /dev/null @@ -1,222 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -process = cms.Process("PROD") - -process.source = cms.Source("EmptySource") -process.generator = cms.EDProducer("FlatRandomEGunProducer", - PGunParameters = cms.PSet( - PartID = cms.vint32(14), - MaxEta = cms.double(3.5), - MaxPhi = cms.double(3.14159265359), - MinEta = cms.double(-3.5), - MinE = cms.double(9.99), - MinPhi = cms.double(-3.14159265359), - MaxE = cms.double(10.01) - ), - Verbosity = cms.untracked.int32(0), - AddAntiParticle = cms.bool(False), - firstRun = cms.untracked.uint32(1) -) - - -process.randomEngineStateProducer = cms.EDProducer("RandomEngineStateProducer") - - -process.prod = cms.EDAnalyzer("CaloTowerTopologyTester") - - -process.p1 = cms.Path(process.generator+process.prod) - - -process.MessageLogger = cms.Service("MessageLogger", - debugModules = cms.untracked.vstring('*'), - cout = cms.untracked.PSet( - default = cms.untracked.PSet( - limit = cms.untracked.int32(0) - ), - threshold = cms.untracked.string('DEBUG'), - HCalGeom = cms.untracked.PSet( - limit = cms.untracked.int32(0) - ) - ), - categories = cms.untracked.vstring('HCalGeom'), - destinations = cms.untracked.vstring('cout') -) - - -process.RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService", - horeco = cms.PSet( - initialSeed = cms.untracked.uint32(541321), - engineName = cms.untracked.string('TRandom3') - ), - externalLHEProducer = cms.PSet( - initialSeed = cms.untracked.uint32(234567), - engineName = cms.untracked.string('HepJamesRandom') - ), - saveFileName = cms.untracked.string(''), - hbhereco = cms.PSet( - initialSeed = cms.untracked.uint32(541321), - engineName = cms.untracked.string('TRandom3') - ), - simSiStripDigiSimLink = cms.PSet( - initialSeed = cms.untracked.uint32(1234567), - engineName = cms.untracked.string('HepJamesRandom') - ), - paramMuons = cms.PSet( - initialSeed = cms.untracked.uint32(54525), - engineName = cms.untracked.string('TRandom3') - ), - famosPileUp = cms.PSet( - initialSeed = cms.untracked.uint32(918273), - engineName = cms.untracked.string('TRandom3') - ), - simMuonDTDigis = cms.PSet( - initialSeed = cms.untracked.uint32(1234567), - engineName = cms.untracked.string('HepJamesRandom') - ), - siTrackerGaussianSmearingRecHits = cms.PSet( - initialSeed = cms.untracked.uint32(24680), - engineName = cms.untracked.string('TRandom3') - ), - ecalPreshowerRecHit = cms.PSet( - initialSeed = cms.untracked.uint32(6541321), - engineName = cms.untracked.string('TRandom3') - ), - generator = cms.PSet( - initialSeed = cms.untracked.uint32(456789), - engineName = cms.untracked.string('HepJamesRandom') - ), - simMuonRPCDigis = cms.PSet( - initialSeed = cms.untracked.uint32(1234567), - engineName = cms.untracked.string('HepJamesRandom') - ), - hiSignal = cms.PSet( - initialSeed = cms.untracked.uint32(123456789), - engineName = cms.untracked.string('HepJamesRandom') - ), - mixSimCaloHits = cms.PSet( - initialSeed = cms.untracked.uint32(918273), - engineName = cms.untracked.string('TRandom3') - ), - mix = cms.PSet( - initialSeed = cms.untracked.uint32(12345), - engineName = cms.untracked.string('HepJamesRandom') - ), - VtxSmeared = cms.PSet( - initialSeed = cms.untracked.uint32(98765432), - engineName = cms.untracked.string('HepJamesRandom') - ), - LHCTransport = cms.PSet( - initialSeed = cms.untracked.uint32(87654321), - engineName = cms.untracked.string('TRandom3') - ), - ecalRecHit = cms.PSet( - initialSeed = cms.untracked.uint32(654321), - engineName = cms.untracked.string('TRandom3') - ), - mixData = cms.PSet( - initialSeed = cms.untracked.uint32(12345), - engineName = cms.untracked.string('HepJamesRandom') - ), - mixRecoTracks = cms.PSet( - initialSeed = cms.untracked.uint32(918273), - engineName = cms.untracked.string('TRandom3') - ), - hiSignalG4SimHits = cms.PSet( - initialSeed = cms.untracked.uint32(11), - engineName = cms.untracked.string('HepJamesRandom') - ), - famosSimHits = cms.PSet( - initialSeed = cms.untracked.uint32(13579), - engineName = cms.untracked.string('TRandom3') - ), - MuonSimHits = cms.PSet( - initialSeed = cms.untracked.uint32(987346), - engineName = cms.untracked.string('TRandom3') - ), - g4SimHits = cms.PSet( - initialSeed = cms.untracked.uint32(11), - engineName = cms.untracked.string('HepJamesRandom') - ), - hiSignalLHCTransport = cms.PSet( - initialSeed = cms.untracked.uint32(88776655), - engineName = cms.untracked.string('TRandom3') - ), - mixGenPU = cms.PSet( - initialSeed = cms.untracked.uint32(918273), - engineName = cms.untracked.string('TRandom3') - ), - l1ParamMuons = cms.PSet( - initialSeed = cms.untracked.uint32(6453209), - engineName = cms.untracked.string('TRandom3') - ), - simBeamSpotFilter = cms.PSet( - initialSeed = cms.untracked.uint32(87654321), - engineName = cms.untracked.string('HepJamesRandom') - ), - simMuonCSCDigis = cms.PSet( - initialSeed = cms.untracked.uint32(11223344), - engineName = cms.untracked.string('HepJamesRandom') - ), - hfreco = cms.PSet( - initialSeed = cms.untracked.uint32(541321), - engineName = cms.untracked.string('TRandom3') - ) -) - - -process.HcalRecNumberingInitialization = cms.ESProducer("HcalRecNumberingInitialization") - - -process.HcalSimNumberingInitialization = cms.ESProducer("HcalSimNumberingInitialization") - - -process.CaloTowerTopologyIdeal = cms.ESProducer("CaloTowerTopologyEP") - - -process.HepPDTESSource = cms.ESSource("HepPDTESSource", - pdtFileName = cms.FileInPath('SimGeneral/HepPDTESSource/data/particle.tbl') -) - - -process.XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", - geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/materials.xml', - 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', - 'Geometry/CMSCommonData/data/rotations.xml', - 'Geometry/HcalCommonData/data/hcalrotations.xml', - 'Geometry/CMSCommonData/data/normal/cmsextent.xml', - 'Geometry/CMSCommonData/data/cms.xml', - 'Geometry/CMSCommonData/data/cmsMother.xml', - 'Geometry/CMSCommonData/data/caloBase.xml', - 'Geometry/CMSCommonData/data/cmsCalo.xml', - 'Geometry/CMSCommonData/data/muonBase.xml', - 'Geometry/CMSCommonData/data/cmsMuon.xml', - 'Geometry/CMSCommonData/data/mgnt.xml', - 'Geometry/CMSCommonData/data/muonMB.xml', - 'Geometry/CMSCommonData/data/muonMagnet.xml', - 'Geometry/CMSCommonData/data/eta4/etaMax.xml', - 'Geometry/HcalCommonData/data/Phase0/hcalalgo.xml', - 'Geometry/HcalCommonData/data/hcalcablealgo.xml', - 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', - 'Geometry/HcalCommonData/data/Phase0/hcalendcapalgo.xml', - 'Geometry/HcalCommonData/data/hcalouteralgo.xml', - 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', - 'Geometry/HcalCommonData/data/Phase0/hcalSimNumbering.xml', - 'Geometry/HcalCommonData/data/Phase0/hcalRecNumbering.xml', - 'Geometry/ForwardCommonData/data/bundle/forwardshield.xml', - 'Geometry/ForwardCommonData/data/forward.xml', - 'Geometry/HcalSimData/data/CaloUtil.xml', - 'Geometry/HcalCommonData/data/hcalsens.xml', - 'Geometry/HcalSimData/data/hf.xml', - 'Geometry/HcalSimData/data/hfpmt.xml', - 'Geometry/HcalSimData/data/hffibrebundle.xml', - 'Geometry/HcalSimData/data/HcalProdCuts.xml', - 'Geometry/CMSCommonData/data/FieldParameters.xml'), - rootNodeName = cms.string('cms:OCMS') -) - - -process.maxEvents = cms.untracked.PSet( - input = cms.untracked.int32(1) -) - diff --git a/Geometry/CaloTopology/test/python/testCaloTowerTopology_cfg.py b/Geometry/CaloTopology/test/testCaloTowerTopology_cfg.py similarity index 100% rename from Geometry/CaloTopology/test/python/testCaloTowerTopology_cfg.py rename to Geometry/CaloTopology/test/testCaloTowerTopology_cfg.py From 1c73ecb6fd55d71a197a87eabfeda8a5dcc61279 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 25 Sep 2015 21:33:59 +0200 Subject: [PATCH 15/34] Revert "update HLT configs for new parameter in CaloTowersCreator" This reverts commit 0fd545f2c86a94614ce6b3e7d4b468a9e77c0dab. --- .../test/HLTvsRECOstudies/hlt_data.py | 18 ++++++---------- .../python/HLT_25ns14e33_v1_cff.py | 12 ++++------- .../python/HLT_25ns14e33_v3_cff.py | 12 ++++------- .../python/HLT_25ns14e33_v4_cff.py | 12 ++++------- .../Configuration/python/HLT_25nsLowPU_cff.py | 9 +++----- .../Configuration/python/HLT_50nsGRun_cff.py | 12 ++++------- .../python/HLT_50ns_5e33_v1_cff.py | 12 ++++------- .../python/HLT_50ns_5e33_v3_cff.py | 12 ++++------- .../Configuration/python/HLT_FULL_cff.py | 12 ++++------- .../Configuration/python/HLT_GRun_cff.py | 12 ++++------- .../Configuration/python/HLT_LowPU_cff.py | 9 +++----- .../Configuration/python/HLT_PIon_cff.py | 6 ++---- .../test/OnLine_HLT_25ns14e33_v1.py | 12 ++++------- .../test/OnLine_HLT_25ns14e33_v3.py | 12 ++++------- .../test/OnLine_HLT_25ns14e33_v4.py | 12 ++++------- .../test/OnLine_HLT_25nsLowPU.py | 9 +++----- .../Configuration/test/OnLine_HLT_50nsGRun.py | 12 ++++------- .../test/OnLine_HLT_50ns_5e33_v1.py | 12 ++++------- .../test/OnLine_HLT_50ns_5e33_v3.py | 12 ++++------- .../Configuration/test/OnLine_HLT_FULL.py | 12 ++++------- .../Configuration/test/OnLine_HLT_GRun.py | 12 ++++------- .../Configuration/test/OnLine_HLT_LowPU.py | 9 +++----- .../Configuration/test/OnLine_HLT_PIon.py | 6 ++---- HLTrigger/HLTanalyzers/python/HLT_FULL_cff.py | 21 +++++++------------ 24 files changed, 93 insertions(+), 186 deletions(-) diff --git a/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py b/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py index b4ddcfc713f5c..3ba2f54df33d1 100644 --- a/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py +++ b/DQM/DataScouting/test/HLTvsRECOstudies/hlt_data.py @@ -5784,8 +5784,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAntiKT5CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -5926,8 +5925,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAntiKT5CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -9055,8 +9053,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAntiKT5CaloJetsRegional = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -11458,8 +11455,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone5CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -14366,8 +14362,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltKT6CaloJetsForMuons = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 1 ), @@ -22350,8 +22345,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltHcalTowerFilter = cms.EDFilter( "HLTHcalTowerFilter", saveTags = cms.bool( False ), diff --git a/HLTrigger/Configuration/python/HLT_25ns14e33_v1_cff.py b/HLTrigger/Configuration/python/HLT_25ns14e33_v1_cff.py index e24eca20284c7..e89340450d63d 100644 --- a/HLTrigger/Configuration/python/HLT_25ns14e33_v1_cff.py +++ b/HLTrigger/Configuration/python/HLT_25ns14e33_v1_cff.py @@ -2445,8 +2445,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -2612,8 +2611,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -22988,8 +22986,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -45231,8 +45228,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_25ns14e33_v3_cff.py b/HLTrigger/Configuration/python/HLT_25ns14e33_v3_cff.py index fb08cef9b7746..10f484b05ab6c 100644 --- a/HLTrigger/Configuration/python/HLT_25ns14e33_v3_cff.py +++ b/HLTrigger/Configuration/python/HLT_25ns14e33_v3_cff.py @@ -3337,8 +3337,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3520,8 +3519,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -25060,8 +25058,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48518,8 +48515,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_25ns14e33_v4_cff.py b/HLTrigger/Configuration/python/HLT_25ns14e33_v4_cff.py index d7717f12bf3c3..7b6a3fcdf1b3b 100644 --- a/HLTrigger/Configuration/python/HLT_25ns14e33_v4_cff.py +++ b/HLTrigger/Configuration/python/HLT_25ns14e33_v4_cff.py @@ -3498,8 +3498,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3681,8 +3680,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -27139,8 +27137,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -49354,8 +49351,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_25nsLowPU_cff.py b/HLTrigger/Configuration/python/HLT_25nsLowPU_cff.py index 12409af16c191..90757a35915bd 100644 --- a/HLTrigger/Configuration/python/HLT_25nsLowPU_cff.py +++ b/HLTrigger/Configuration/python/HLT_25nsLowPU_cff.py @@ -2087,8 +2087,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -2752,8 +2751,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -6778,8 +6776,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltFixedGridRhoFastjetAllCaloForMuons = cms.EDProducer( "FixedGridRhoProducerFastjet", gridSpacing = cms.double( 0.55 ), diff --git a/HLTrigger/Configuration/python/HLT_50nsGRun_cff.py b/HLTrigger/Configuration/python/HLT_50nsGRun_cff.py index f67b8233d1689..a0457eca37f8a 100644 --- a/HLTrigger/Configuration/python/HLT_50nsGRun_cff.py +++ b/HLTrigger/Configuration/python/HLT_50nsGRun_cff.py @@ -3333,8 +3333,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3516,8 +3515,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -24986,8 +24984,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48443,8 +48440,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_50ns_5e33_v1_cff.py b/HLTrigger/Configuration/python/HLT_50ns_5e33_v1_cff.py index 4793cae33624b..6e7a13211c4e3 100644 --- a/HLTrigger/Configuration/python/HLT_50ns_5e33_v1_cff.py +++ b/HLTrigger/Configuration/python/HLT_50ns_5e33_v1_cff.py @@ -2452,8 +2452,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -2619,8 +2618,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -23143,8 +23141,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -45886,8 +45883,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_50ns_5e33_v3_cff.py b/HLTrigger/Configuration/python/HLT_50ns_5e33_v3_cff.py index 5706f9da8259a..0badd3d5f8fd4 100644 --- a/HLTrigger/Configuration/python/HLT_50ns_5e33_v3_cff.py +++ b/HLTrigger/Configuration/python/HLT_50ns_5e33_v3_cff.py @@ -3326,8 +3326,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3509,8 +3508,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -24929,8 +24927,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48366,8 +48363,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_FULL_cff.py b/HLTrigger/Configuration/python/HLT_FULL_cff.py index 413e272ce780f..e0eded5ee231d 100644 --- a/HLTrigger/Configuration/python/HLT_FULL_cff.py +++ b/HLTrigger/Configuration/python/HLT_FULL_cff.py @@ -3809,8 +3809,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3992,8 +3991,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -29890,8 +29888,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -53469,8 +53466,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_GRun_cff.py b/HLTrigger/Configuration/python/HLT_GRun_cff.py index 1e6bab9591586..8b8f7ae8e45fe 100644 --- a/HLTrigger/Configuration/python/HLT_GRun_cff.py +++ b/HLTrigger/Configuration/python/HLT_GRun_cff.py @@ -3498,8 +3498,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3681,8 +3680,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -27139,8 +27137,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -49354,8 +49351,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/python/HLT_LowPU_cff.py b/HLTrigger/Configuration/python/HLT_LowPU_cff.py index afff6cd9532d0..2dde55ea7a0c5 100644 --- a/HLTrigger/Configuration/python/HLT_LowPU_cff.py +++ b/HLTrigger/Configuration/python/HLT_LowPU_cff.py @@ -2062,8 +2062,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -2594,8 +2593,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -6779,8 +6777,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltFixedGridRhoFastjetAllCaloForMuons = cms.EDProducer( "FixedGridRhoProducerFastjet", gridSpacing = cms.double( 0.55 ), diff --git a/HLTrigger/Configuration/python/HLT_PIon_cff.py b/HLTrigger/Configuration/python/HLT_PIon_cff.py index 2c6434c4ae53c..19d10d80bb908 100644 --- a/HLTrigger/Configuration/python/HLT_PIon_cff.py +++ b/HLTrigger/Configuration/python/HLT_PIon_cff.py @@ -2075,8 +2075,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -5354,8 +5353,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) fragment.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v1.py b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v1.py index a1f5c63f33251..cf019790a9a05 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v1.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v1.py @@ -3007,8 +3007,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3174,8 +3173,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -23550,8 +23548,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -45793,8 +45790,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v3.py b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v3.py index e561b818a956a..170933f24bf78 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v3.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v3.py @@ -3727,8 +3727,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3910,8 +3909,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -25450,8 +25448,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48908,8 +48905,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v4.py b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v4.py index 01a0d7ff37d0c..c3e2fd8065b7b 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v4.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_25ns14e33_v4.py @@ -3888,8 +3888,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -4071,8 +4070,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -27529,8 +27527,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -49744,8 +49741,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_25nsLowPU.py b/HLTrigger/Configuration/test/OnLine_HLT_25nsLowPU.py index 7651b7a859185..df4a77abab6c7 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_25nsLowPU.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_25nsLowPU.py @@ -2477,8 +2477,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3142,8 +3141,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -7168,8 +7166,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltFixedGridRhoFastjetAllCaloForMuons = cms.EDProducer( "FixedGridRhoProducerFastjet", gridSpacing = cms.double( 0.55 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_50nsGRun.py b/HLTrigger/Configuration/test/OnLine_HLT_50nsGRun.py index 86dbb7639c178..393f5db73b983 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_50nsGRun.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_50nsGRun.py @@ -3723,8 +3723,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3906,8 +3905,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -25376,8 +25374,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48833,8 +48830,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v1.py b/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v1.py index 139d3320d1280..b9fd76a510589 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v1.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v1.py @@ -3014,8 +3014,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3181,8 +3180,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -23705,8 +23703,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -46448,8 +46445,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v3.py b/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v3.py index b1cc89c40d10f..e550df70e04d4 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v3.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_50ns_5e33_v3.py @@ -3716,8 +3716,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -3899,8 +3898,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -25319,8 +25317,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -48756,8 +48753,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_FULL.py b/HLTrigger/Configuration/test/OnLine_HLT_FULL.py index 872677d6567f3..edb18da874351 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_FULL.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_FULL.py @@ -4199,8 +4199,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -4382,8 +4381,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -30280,8 +30278,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -53859,8 +53856,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_GRun.py b/HLTrigger/Configuration/test/OnLine_HLT_GRun.py index 78ad6f11c2a4f..dadb4a7a38c7f 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_GRun.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_GRun.py @@ -3888,8 +3888,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -4071,8 +4070,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK8CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -27529,8 +27527,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -49744,8 +49741,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltHtMhtEcal = cms.EDProducer( "HLTCaloTowerHtMhtProducer", minPtTowerHt = cms.double( 1.5 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_LowPU.py b/HLTrigger/Configuration/test/OnLine_HLT_LowPU.py index 3b75dbf48ff13..ef2d4095dfff6 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_LowPU.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_LowPU.py @@ -2452,8 +2452,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltStoppedHSCPIterativeCone4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -2984,8 +2983,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -7169,8 +7167,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltFixedGridRhoFastjetAllCaloForMuons = cms.EDProducer( "FixedGridRhoProducerFastjet", gridSpacing = cms.double( 0.55 ), diff --git a/HLTrigger/Configuration/test/OnLine_HLT_PIon.py b/HLTrigger/Configuration/test/OnLine_HLT_PIon.py index 4908c8203667c..b910d961c6532 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_PIon.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_PIon.py @@ -2465,8 +2465,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK4CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -5744,8 +5743,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) process.hltAK4CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), diff --git a/HLTrigger/HLTanalyzers/python/HLT_FULL_cff.py b/HLTrigger/HLTanalyzers/python/HLT_FULL_cff.py index 2096a33003f98..1143543b6fa10 100644 --- a/HLTrigger/HLTanalyzers/python/HLT_FULL_cff.py +++ b/HLTrigger/HLTanalyzers/python/HLT_FULL_cff.py @@ -4848,8 +4848,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) hltAntiKT5CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -5084,8 +5083,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) hltAntiKT5CaloJetsRegional = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -5554,8 +5552,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) hltAntiKT5CaloJetsPF = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -10569,8 +10566,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) hltStoppedHSCPIterativeCone5CaloJets = cms.EDProducer( "FastjetJetProducer", Active_Area_Repeats = cms.int32( 5 ), @@ -13980,8 +13976,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) hltL2MuonIsolations = cms.EDProducer( "L2MuonIsolationProducer", WriteIsolatorFloat = cms.bool( False ), @@ -20879,8 +20874,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) hltHcalTowerFilter = cms.EDFilter( "HLTHcalTowerFilter", saveTags = cms.bool( False ), @@ -38415,8 +38409,7 @@ MomEBDepth = cms.double( 0.3 ), HBWeight = cms.double( 1.0 ), HOGrid = cms.vdouble( ), - EBGrid = cms.vdouble( ), - HcalPhase = cms.int32(0) + EBGrid = cms.vdouble( ) ) hltMetForHf = cms.EDProducer( "CaloMETProducer", alias = cms.string( "RawCaloMET" ), From 37f8f66d40dff75d4be44b4ab818bdd984a08bd7 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 25 Sep 2015 21:40:28 +0200 Subject: [PATCH 16/34] set default value for CaloTowersCreator HcalPhase param --- RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc | 2 +- RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc index 4929285534082..a106f337cee07 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc @@ -64,7 +64,7 @@ CaloTowersCreator::CaloTowersCreator(const edm::ParameterSet& conf) : conf.getParameter("MomHEDepth"), conf.getParameter("MomEBDepth"), conf.getParameter("MomEEDepth"), - conf.getParameter("HcalPhase") + conf.exists("HcalPhase") ? conf.getParameter("HcalPhase") : 0 ), ecalLabels_(conf.getParameter >("ecalInputs")), diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc index d208ed4bdff4f..20006e465b8d6 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc @@ -37,7 +37,7 @@ CaloTowersReCreator::CaloTowersReCreator(const edm::ParameterSet& conf) : conf.getParameter("MomHEDepth"), conf.getParameter("MomEBDepth"), conf.getParameter("MomEEDepth"), - conf.getParameter("HcalPhase") + conf.exists("HcalPhase") ? conf.getParameter("HcalPhase") : 0 ), allowMissingInputs_(false) { From 5e7734f42ec4e9e6f16c67527cbff29b8a7a8513 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 26 Sep 2015 21:30:07 +0200 Subject: [PATCH 17/34] some rebase and code style fixes --- Geometry/CaloGeometry/src/CaloGenericDetId.cc | 90 ++++++++++--------- .../CaloTopology/src/CaloTowerTopology.cc | 18 ++-- .../test/CaloTowerTopologyTester.cc | 1 - .../interface/CaloTowerTopologyEP.h | 1 - .../HcalEventSetup/src/CaloTowerTopologyEP.cc | 9 +- .../HcalTowerAlgo/src/CaloTowerGeometry.cc | 2 - 6 files changed, 57 insertions(+), 64 deletions(-) diff --git a/Geometry/CaloGeometry/src/CaloGenericDetId.cc b/Geometry/CaloGeometry/src/CaloGenericDetId.cc index d5f37a97b2b36..9b064cdec1abc 100644 --- a/Geometry/CaloGeometry/src/CaloGenericDetId.cc +++ b/Geometry/CaloGeometry/src/CaloGenericDetId.cc @@ -6,7 +6,7 @@ CaloGenericDetId::CaloGenericDetId( DetId::Detector iDet , int iSub , uint32_t iDin ) : DetId( iDet, iSub ) { - if (det() == DetId::Hcal) { + if (isHcal()) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; throw cms::Exception("No support"); } @@ -27,7 +27,7 @@ CaloGenericDetId::CaloGenericDetId( DetId::Detector iDet , uint32_t CaloGenericDetId::denseIndex() const { - if (det() == DetId::Hcal) { + if (isHcal()) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; throw cms::Exception("No support"); } @@ -46,7 +46,7 @@ CaloGenericDetId::denseIndex() const uint32_t CaloGenericDetId::sizeForDenseIndexing() const { - if (det() == DetId::Hcal) { + if (isHcal()) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; throw cms::Exception("No support"); } @@ -72,53 +72,57 @@ CaloGenericDetId::validDetId() const returnValue = EBDetId::validDetId( ebid.ieta(), ebid.iphi() ) ; } - else + else if( isEE() ) { - if( isEE() ) - { - const EEDetId eeid ( rawId() ) ; - returnValue = EEDetId::validDetId( eeid.ix(), - eeid.iy(), - eeid.zside() ) ; - } - else - { - if( isES() ) - { - const ESDetId esid ( rawId() ) ; - returnValue = ESDetId::validDetId( esid.strip(), - esid.six(), - esid.siy(), - esid.plane(), - esid.zside() ) ; - } - else - { - if( isCastor() ) - { - const HcalCastorDetId zdid ( rawId() ) ; - returnValue = HcalCastorDetId::validDetId( zdid.section(), - zdid.zside()>0, - zdid.sector(), - zdid.module() ) ; - } - else - { - if( isCaloTower() ) - { - std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; - throw cms::Exception("No support"); - } - } - } - } + const EEDetId eeid ( rawId() ) ; + returnValue = EEDetId::validDetId( eeid.ix(), + eeid.iy(), + eeid.zside() ) ; } + else if( isES() ) + { + const ESDetId esid ( rawId() ) ; + returnValue = ESDetId::validDetId( esid.strip(), + esid.six(), + esid.siy(), + esid.plane(), + esid.zside() ) ; + } + else if ( isHcal() ) + { + std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; + throw cms::Exception("No support"); + + returnValue = false; + } + else if( isZDC() ) + { + const HcalZDCDetId zdid ( rawId() ) ; + returnValue = HcalZDCDetId::validDetId( zdid.section(), + zdid.channel() ) ; + } + else if( isCastor() ) + { + const HcalCastorDetId zdid ( rawId() ) ; + returnValue = HcalCastorDetId::validDetId( zdid.section(), + zdid.zside()>0, + zdid.sector(), + zdid.module() ) ; + } + else if( isCaloTower() ) + { + std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + throw cms::Exception("No support"); + + returnValue = false; + } + return returnValue ; } std::ostream& operator<<(std::ostream& s, const CaloGenericDetId& id) { - if (id.det() == DetId::Hcal) { + if (id.isHcal()) { std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; throw cms::Exception("No support"); } diff --git a/Geometry/CaloTopology/src/CaloTowerTopology.cc b/Geometry/CaloTopology/src/CaloTowerTopology.cc index 0f70f1b9bc1d6..be155d7684bd9 100644 --- a/Geometry/CaloTopology/src/CaloTowerTopology.cc +++ b/Geometry/CaloTopology/src/CaloTowerTopology.cc @@ -5,21 +5,21 @@ CaloTowerTopology::CaloTowerTopology(const HcalTopology * topology) : hcaltopo(topology) { //get number of towers in each hcal subdet from hcaltopo - int nEtaHB_, nEtaHE_, nEtaHO_, nEtaHF_; - nEtaHB_ = hcaltopo->lastHBRing() - hcaltopo->firstHBRing() + 1; - nEtaHE_ = hcaltopo->lastHERing() - hcaltopo->firstHERing() + 1; - nEtaHO_ = hcaltopo->lastHORing() - hcaltopo->firstHORing() + 1; - nEtaHF_ = hcaltopo->lastHFRing() - hcaltopo->firstHFRing() + 1; + int nEtaHB, nEtaHE, nEtaHO, nEtaHF; + nEtaHB = hcaltopo->lastHBRing() - hcaltopo->firstHBRing() + 1; + nEtaHE = hcaltopo->lastHERing() - hcaltopo->firstHERing() + 1; + nEtaHO = hcaltopo->lastHORing() - hcaltopo->firstHORing() + 1; + nEtaHF = hcaltopo->lastHFRing() - hcaltopo->firstHFRing() + 1; //setup continuous ieta firstHBRing_ = 1; - lastHBRing_ = firstHBRing_ + nEtaHB_ - 1; + lastHBRing_ = firstHBRing_ + nEtaHB - 1; firstHERing_ = lastHBRing_; //crossover - lastHERing_ = firstHERing_ + nEtaHE_ - 1; + lastHERing_ = firstHERing_ + nEtaHE - 1; firstHFRing_ = lastHERing_ + 1; //no crossover for CaloTowers; HF crossover cells go in the subsequent non-crossover HF tower - lastHFRing_ = firstHFRing_ + (nEtaHF_ - 1) - 1; //nEtaHF - 1 to account for no crossover + lastHFRing_ = firstHFRing_ + (nEtaHF - 1) - 1; //nEtaHF - 1 to account for no crossover firstHORing_ = 1; - lastHORing_ = firstHORing_ + nEtaHO_ - 1; + lastHORing_ = firstHORing_ + nEtaHO - 1; //translate phi segmentation boundaries into continuous ieta if(hcaltopo->firstHEDoublePhiRing()==999) firstHEDoublePhiRing_ = firstHFRing_; diff --git a/Geometry/CaloTopology/test/CaloTowerTopologyTester.cc b/Geometry/CaloTopology/test/CaloTowerTopologyTester.cc index feb147121dbf6..ac8674431574b 100644 --- a/Geometry/CaloTopology/test/CaloTowerTopologyTester.cc +++ b/Geometry/CaloTopology/test/CaloTowerTopologyTester.cc @@ -18,7 +18,6 @@ #include "Geometry/HcalCommonData/interface/HcalDDDRecConstants.h" #include "Geometry/CaloTopology/interface/CaloTowerTopology.h" #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" -#include "CoralBase/Exception.h" class CaloTowerTopologyTester : public edm::EDAnalyzer { public: diff --git a/Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h b/Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h index c0569d53a2d90..0441244bd3fcd 100644 --- a/Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h +++ b/Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h @@ -38,7 +38,6 @@ class CaloTowerTopologyEP : public edm::ESProducer { private: // ----------member data --------------------------- - const edm::ParameterSet m_pSet; }; #endif diff --git a/Geometry/HcalEventSetup/src/CaloTowerTopologyEP.cc b/Geometry/HcalEventSetup/src/CaloTowerTopologyEP.cc index 1dde97cf8b7f7..b3d65f659ff8c 100644 --- a/Geometry/HcalEventSetup/src/CaloTowerTopologyEP.cc +++ b/Geometry/HcalEventSetup/src/CaloTowerTopologyEP.cc @@ -10,11 +10,6 @@ Implementation: */ -// -// Original Author: Jeremiah Mans -// Created: Mon Oct 3 11:35:27 CDT 2005 -// -// #include "Geometry/HcalEventSetup/interface/CaloTowerTopologyEP.h" #include "FWCore/Utilities/interface/Exception.h" @@ -34,8 +29,7 @@ // constructors and destructor // CaloTowerTopologyEP::CaloTowerTopologyEP(const edm::ParameterSet& conf) - : m_pSet( conf ) { - // std::cout << "CaloTowerTopologyEP::CaloTowerTopologyEP" << std::endl; +{ edm::LogInfo("HCAL") << "CaloTowerTopologyEP::CaloTowerTopologyEP"; setWhatProduced(this); } @@ -59,7 +53,6 @@ CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord) { edm::ESHandle hcaltopo; iRecord.get(hcaltopo); -// std::cout << "CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord)" << std::endl; edm::LogInfo("HCAL") << "CaloTowerTopologyEP::produce(const HcalRecNumberingRecord& iRecord)"; ReturnType myTopo(new CaloTowerTopology(&*hcaltopo)); diff --git a/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc b/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc index 924c516dfeff0..095c997de1ae3 100644 --- a/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc +++ b/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc @@ -28,8 +28,6 @@ CaloTowerGeometry::alignmentTransformIndexLocal( const DetId& id ) { const unsigned int ip ( ( cid.iphi() - 1 )/4 ) ; const int izoff ( ( cid.zside() + 1 )/2 ) ; const unsigned int offset ( izoff*3*18) ; - - assert(0); return ( offset + ip + ( cttopo->firstHFQuadPhiRing() <= iea ? 36 : From ac6494f6dc19ac6aa725d913ba3700c5c643daf4 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 1 Oct 2015 23:08:20 +0200 Subject: [PATCH 18/34] add m_dins to CaloTowerGeometry --- Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h | 1 + Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h b/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h index 0bab800546746..5d9e043cae375 100644 --- a/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h +++ b/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h @@ -80,6 +80,7 @@ class CaloTowerGeometry : public CaloSubdetectorGeometry int k_NumberOfCellsForCorners; int k_NumberOfShapes; CellVec m_cellVec ; + CaloSubdetectorGeometry::IVec m_dins; }; #endif diff --git a/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc b/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc index 095c997de1ae3..f544e72837e72 100644 --- a/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc +++ b/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc @@ -63,6 +63,7 @@ CaloTowerGeometry::newCell( const GlobalPoint& f1 , m_cellVec[ di ] = IdealObliquePrism( f1, cornersMgr(), parm ) ; addValidID( detId ) ; + m_dins.push_back( di ); } const CaloCellGeometry* From 55a46446bb72df30f467b13c80376188a6191899 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 2 Oct 2015 18:56:44 +0200 Subject: [PATCH 19/34] add getSummary() to CaloTowerGeometry for DB --- .../interface/CaloTowerGeometry.h | 5 ++ .../HcalTowerAlgo/src/CaloTowerGeometry.cc | 74 +++++++++++++++++++ 2 files changed, 79 insertions(+) diff --git a/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h b/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h index 5d9e043cae375..92db040057669 100644 --- a/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h +++ b/Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h @@ -69,6 +69,11 @@ class CaloTowerGeometry : public CaloSubdetectorGeometry return cellGeomPtr( cttopo->denseIndex(id) ) ; } + virtual void getSummary( CaloSubdetectorGeometry::TrVec& trVector, + CaloSubdetectorGeometry::IVec& iVector, + CaloSubdetectorGeometry::DimVec& dimVector, + CaloSubdetectorGeometry::IVec& dinsVector ) const ; + protected: virtual const CaloCellGeometry* cellGeomPtr( uint32_t index ) const ; diff --git a/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc b/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc index f544e72837e72..67705646a2b81 100644 --- a/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc +++ b/Geometry/HcalTowerAlgo/src/CaloTowerGeometry.cc @@ -1,9 +1,13 @@ #include "Geometry/CaloGeometry/interface/CaloGenericDetId.h" #include "Geometry/HcalTowerAlgo/interface/CaloTowerGeometry.h" +#include +#include + typedef CaloCellGeometry::CCGFloat CCGFloat ; typedef CaloCellGeometry::Pt3D Pt3D ; typedef CaloCellGeometry::Pt3DVec Pt3DVec ; +typedef CaloCellGeometry::Tr3D Tr3D ; CaloTowerGeometry::CaloTowerGeometry(const CaloTowerTopology *cttopo_) : cttopo(cttopo_), @@ -72,3 +76,73 @@ CaloTowerGeometry::cellGeomPtr( uint32_t index ) const { return ( m_cellVec.size() < index || 0 == cell->param() ? 0 : cell ) ; } + +void +CaloTowerGeometry::getSummary(CaloSubdetectorGeometry::TrVec& tVec, + CaloSubdetectorGeometry::IVec& iVec, + CaloSubdetectorGeometry::DimVec& dVec, + CaloSubdetectorGeometry::IVec& dinsVec ) const { + tVec.reserve( numberOfCellsForCorners()*numberOfTransformParms() ) ; + iVec.reserve( numberOfShapes()==1 ? 1 : numberOfCellsForCorners() ) ; + dVec.reserve( numberOfShapes()*numberOfParametersPerShape() ) ; + dinsVec.reserve(numberOfCellsForCorners()); + + for (ParVecVec::const_iterator ivv (parVecVec().begin()) ; + ivv != parVecVec().end() ; ++ivv) { + const ParVec& pv ( *ivv ) ; + for (ParVec::const_iterator iv ( pv.begin() ) ; iv != pv.end() ; ++iv) { + dVec.push_back( *iv ) ; + } + } + + for (unsigned int i ( 0 ) ; i < numberOfCellsForCorners() ; ++i) { + Tr3D tr ; + const CaloCellGeometry* ptr ( cellGeomPtr( i ) ) ; + + if (0 != ptr) { + dinsVec.push_back( i ); + + ptr->getTransform( tr, ( Pt3DVec* ) 0 ) ; + + if( Tr3D() == tr ) { // for preshower there is no rotation + const GlobalPoint& gp ( ptr->getPosition() ) ; + tr = HepGeom::Translate3D( gp.x(), gp.y(), gp.z() ) ; + } + + const CLHEP::Hep3Vector tt ( tr.getTranslation() ) ; + tVec.push_back( tt.x() ) ; + tVec.push_back( tt.y() ) ; + tVec.push_back( tt.z() ) ; + if (6 == numberOfTransformParms()) { + const CLHEP::HepRotation rr ( tr.getRotation() ) ; + const ROOT::Math::Transform3D rtr (rr.xx(), rr.xy(), rr.xz(), tt.x(), + rr.yx(), rr.yy(), rr.yz(), tt.y(), + rr.zx(), rr.zy(), rr.zz(), tt.z()); + ROOT::Math::EulerAngles ea ; + rtr.GetRotation( ea ) ; + tVec.push_back( ea.Phi() ) ; + tVec.push_back( ea.Theta() ) ; + tVec.push_back( ea.Psi() ) ; + } + + const CCGFloat* par ( ptr->param() ) ; + + unsigned int ishape ( 9999 ) ; + for( unsigned int ivv ( 0 ) ; ivv != parVecVec().size() ; ++ivv ) { + bool ok ( true ) ; + const CCGFloat* pv ( &(*parVecVec()[ivv].begin() ) ) ; + for( unsigned int k ( 0 ) ; k != numberOfParametersPerShape() ; ++k ) { + ok = ok && ( fabs( par[k] - pv[k] ) < 1.e-6 ) ; + } + if( ok ) { + ishape = ivv ; + break ; + } + } + assert( 9999 != ishape ) ; + + const unsigned int nn (( numberOfShapes()==1) ? (unsigned int)1 : m_dins.size() ) ; + if( iVec.size() < nn ) iVec.push_back( ishape ) ; + } + } +} \ No newline at end of file From a01fb6435c380b84bcee55280dace9c11ef06a74 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 9 Oct 2015 21:10:36 +0200 Subject: [PATCH 20/34] LogError in CaloGenericDetId --- Geometry/CaloGeometry/src/CaloGenericDetId.cc | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Geometry/CaloGeometry/src/CaloGenericDetId.cc b/Geometry/CaloGeometry/src/CaloGenericDetId.cc index 9b064cdec1abc..08a56258334e6 100644 --- a/Geometry/CaloGeometry/src/CaloGenericDetId.cc +++ b/Geometry/CaloGeometry/src/CaloGenericDetId.cc @@ -1,5 +1,6 @@ #include "Geometry/CaloGeometry/interface/CaloGenericDetId.h" #include "FWCore/Utilities/interface/Exception.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include CaloGenericDetId::CaloGenericDetId( DetId::Detector iDet , @@ -7,11 +8,11 @@ CaloGenericDetId::CaloGenericDetId( DetId::Detector iDet , uint32_t iDin ) : DetId( iDet, iSub ) { if (isHcal()) { - std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; + edm::LogError("CaloGenericDetIdError") << "No support for HB/HE/HO/HF in CaloGenericDetId"; throw cms::Exception("No support"); } else if(isCaloTower()) { - std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + edm::LogError("CaloGenericDetIdError") << "No support for CaloTower in CaloGenericDetId"; throw cms::Exception("No support"); } else { @@ -28,11 +29,11 @@ uint32_t CaloGenericDetId::denseIndex() const { if (isHcal()) { - std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; + edm::LogError("CaloGenericDetIdError") << "No support for HB/HE/HO/HF in CaloGenericDetId"; throw cms::Exception("No support"); } else if(isCaloTower()) { - std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + edm::LogError("CaloGenericDetIdError") << "No support for CaloTower in CaloGenericDetId"; throw cms::Exception("No support"); } @@ -47,11 +48,11 @@ uint32_t CaloGenericDetId::sizeForDenseIndexing() const { if (isHcal()) { - std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; + edm::LogError("CaloGenericDetIdError") << "No support for HB/HE/HO/HF in CaloGenericDetId"; throw cms::Exception("No support"); } else if(isCaloTower()) { - std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + edm::LogError("CaloGenericDetIdError") << "No support for CaloTower in CaloGenericDetId"; throw cms::Exception("No support"); } @@ -90,7 +91,7 @@ CaloGenericDetId::validDetId() const } else if ( isHcal() ) { - std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; + edm::LogError("CaloGenericDetIdError") << "No support for HB/HE/HO/HF in CaloGenericDetId"; throw cms::Exception("No support"); returnValue = false; @@ -111,7 +112,7 @@ CaloGenericDetId::validDetId() const } else if( isCaloTower() ) { - std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + edm::LogError("CaloGenericDetIdError") << "No support for CaloTower in CaloGenericDetId"; throw cms::Exception("No support"); returnValue = false; @@ -123,11 +124,11 @@ CaloGenericDetId::validDetId() const std::ostream& operator<<(std::ostream& s, const CaloGenericDetId& id) { if (id.isHcal()) { - std::cerr << "No support for HB/HE/HO/HF in CaloGenericDetId" << std::endl; + edm::LogError("CaloGenericDetIdError") << "No support for HB/HE/HO/HF in CaloGenericDetId"; throw cms::Exception("No support"); } else if(id.isCaloTower()) { - std::cerr << "No support for CaloTower in CaloGenericDetId" << std::endl; + edm::LogError("CaloGenericDetIdError") << "No support for CaloTower in CaloGenericDetId"; throw cms::Exception("No support"); } From 65ffbfc07d4053af81c23b9b97bc59677172c75d Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 9 Oct 2015 23:00:03 +0200 Subject: [PATCH 21/34] simpler method for subdet-dependent methods in CaloTower (comment from slava) --- DataFormats/CaloTowers/BuildFile.xml | 1 + DataFormats/CaloTowers/interface/CaloTower.h | 42 ++++++++++--------- DataFormats/CaloTowers/src/CaloTower.cc | 28 ++++++------- DataFormats/CaloTowers/src/classes_def.xml | 3 +- .../src/CaloTowersCreationAlgo.cc | 20 ++++----- 5 files changed, 50 insertions(+), 44 deletions(-) diff --git a/DataFormats/CaloTowers/BuildFile.xml b/DataFormats/CaloTowers/BuildFile.xml index a1c8e2e436767..4f49628aec36d 100644 --- a/DataFormats/CaloTowers/BuildFile.xml +++ b/DataFormats/CaloTowers/BuildFile.xml @@ -3,6 +3,7 @@ + diff --git a/DataFormats/CaloTowers/interface/CaloTower.h b/DataFormats/CaloTowers/interface/CaloTower.h index dc3dbed78d1e3..73929d031186f 100644 --- a/DataFormats/CaloTowers/interface/CaloTower.h +++ b/DataFormats/CaloTowers/interface/CaloTower.h @@ -5,6 +5,7 @@ #include "DataFormats/DetId/interface/DetId.h" #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" #include "DataFormats/Math/interface/Vector3D.h" +#include "DataFormats/HcalDetId/interface/HcalSubdetector.h" #include "Rtypes.h" #include #include @@ -67,14 +68,19 @@ class CaloTower : public reco::LeafCandidate { void setEcalTime(int t) { ecalTime_ = t; }; void setHcalTime(int t) { hcalTime_ = t; }; - void setHcalLimits(int firstHB, int lastHB, - int firstHE, int lastHE, - int firstHF, int lastHF, - int firstHO, int lastHO) { - firstHBRing_ = firstHB; lastHBRing_ = lastHB; - firstHERing_ = firstHE; lastHERing_ = lastHE; - firstHFRing_ = firstHF; lastHFRing_ = lastHF; - firstHORing_ = firstHO; lastHORing_ = lastHO; + void setHcalSubdet(int lastHB, int lastHE, int lastHF, int lastHO) { + int ct_ieta = ietaAbs(); + if(ct_ieta <= lastHB) subdet_ = HcalBarrel; + else if(ct_ieta <= lastHE) subdet_ = HcalEndcap; + else if(ct_ieta <= lastHF) subdet_ = HcalForward; + + //account for HO separately + if(ct_ieta <= lastHO) inHO_ = true; + else inHO_ = false; + + //account for gap/crossover tower separately + if(ct_ieta == lastHB) inHBHEgap_ = true; + else inHBHEgap_ = false; } // set CaloTower status based on the number of @@ -102,12 +108,12 @@ class CaloTower : public reco::LeafCandidate { // energy in HO ("outerEnergy")is not included in "hadEnergy" double emEnergy() const { return emE_ ; } double hadEnergy() const { return hadE_ ; } - double outerEnergy() const { return (id_.ietaAbs()<=lastHORing_)? outerE_ : 0.0; } + double outerEnergy() const { return (inHO_) ? outerE_ : 0.0; } // transverse energies wrt to vtx (0,0,0) double emEt() const { return emE_ * sin( theta() ); } double hadEt() const { return hadE_ * sin( theta() ); } - double outerEt() const { return (id_.ietaAbs()<=lastHORing_)? outerE_ * sin( theta() ) : 0.0; } + double outerEt() const { return (inHO_) ? outerE_ * sin( theta() ) : 0.0; } // preserve the inherited default accessors where applicable @@ -126,7 +132,7 @@ class CaloTower : public reco::LeafCandidate { double emEt(double vtxZ) const { return emE_ * sin(p4(vtxZ).theta()); } double hadEt(double vtxZ) const { return hadE_ * sin(p4(vtxZ).theta()); } - double outerEt(double vtxZ) const { return (id_.ietaAbs()<=lastHORing_)? outerE_ * sin(p4(vtxZ).theta()) : 0.0; } + double outerEt(double vtxZ) const { return (inHO_) ? outerE_ * sin(p4(vtxZ).theta()) : 0.0; } // recalculated wrt vertex provided as 3D point @@ -136,7 +142,7 @@ class CaloTower : public reco::LeafCandidate { double emEt(const Point& v) const { return emE_ * sin(p4(v).theta()); } double hadEt(const Point& v) const { return hadE_ * sin(p4(v).theta()); } - double outerEt(const Point& v) const { return (id_.ietaAbs()<=lastHORing_)? outerE_ * sin(p4(v).theta()) : 0.0; } + double outerEt(const Point& v) const { return (inHO_) ? outerE_ * sin(p4(v).theta()) : 0.0; } double hottestCellE() const { return hottestCellE_; } @@ -157,8 +163,8 @@ class CaloTower : public reco::LeafCandidate { int hadLv11() const { return hadLvl1_; } // energy contained in depths>1 in the HE for 18<|iEta|<29 - double hadEnergyHeOuterLayer() const { return (id_.ietaAbs()<=firstHERing_+1 || id_.ietaAbs()>lastHERing_)? 0 : outerE_; } - double hadEnergyHeInnerLayer() const { return (id_.ietaAbs()<=firstHERing_+1 || id_.ietaAbs()>lastHERing_)? 0 : hadE_ - outerE_; } + double hadEnergyHeOuterLayer() const { return (subdet_ == HcalEndcap) ? outerE_ : 0; } + double hadEnergyHeInnerLayer() const { return (subdet_ == HcalEndcap) ? hadE_ - outerE_ : 0; } // energy in the tower by HCAL subdetector // This is trivial except for tower 16 @@ -207,11 +213,9 @@ class CaloTower : public reco::LeafCandidate { GlobalPoint emPosition_; GlobalPoint hadPosition_; - //hcal limits in CT continuous ieta (from CaloTowerTopology) - int firstHBRing_, lastHBRing_; - int firstHERing_, lastHERing_; - int firstHFRing_, lastHFRing_; - int firstHORing_, lastHORing_; + //hcal subdetector info + HcalSubdetector subdet_; + bool inHO_, inHBHEgap_; // time int ecalTime_; diff --git a/DataFormats/CaloTowers/src/CaloTower.cc b/DataFormats/CaloTowers/src/CaloTower.cc index f5630138e07e0..f3bcd831ee5de 100644 --- a/DataFormats/CaloTowers/src/CaloTower.cc +++ b/DataFormats/CaloTowers/src/CaloTower.cc @@ -66,7 +66,7 @@ math::PtEtaPhiMLorentzVector CaloTower::hadP4(double vtxZ) const { // note: for now we use the same position for HO as for the other detectors double hcalTot; - if (abs(ieta())<=lastHORing_) hcalTot = (energy() - emE_); + if (inHO_) hcalTot = (energy() - emE_); else hcalTot = hadE_; if (hcalTot>0) { @@ -102,7 +102,7 @@ math::PtEtaPhiMLorentzVector CaloTower::hadP4(const Point& v) const { // note: for now we use the same position for HO as for the other detectors double hcalTot; - if (abs(ieta())<=lastHORing_) hcalTot = (energy() - emE_); + if (inHO_) hcalTot = (energy() - emE_); else hcalTot = hadE_; if (hcalTot>0) { @@ -128,7 +128,7 @@ math::PtEtaPhiMLorentzVector CaloTower::emP4(const Point& v) const { math::PtEtaPhiMLorentzVector CaloTower::p4(double vtxZ) const { - if (abs(ieta())<=lastHERing_) { + if (subdet_==HcalBarrel || subdet_==HcalEndcap) { return (emP4(vtxZ)+hadP4(vtxZ)); } // em and had energy in HF are defined in a special way @@ -141,7 +141,7 @@ math::PtEtaPhiMLorentzVector CaloTower::p4(double vtxZ) const { math::PtEtaPhiMLorentzVector CaloTower::p4(const Point& v) const { - if (abs(ieta())<=lastHERing_) { + if (subdet_==HcalBarrel || subdet_==HcalEndcap) { return emP4(v)+hadP4(v); } // em and had energy in HF are defined in a special way @@ -155,7 +155,7 @@ math::PtEtaPhiMLorentzVector CaloTower::p4(const Point& v) const { math::PtEtaPhiMLorentzVector CaloTower::p4_HO(const Point& v) const { - if (ietaAbs()>lastHORing_ || outerE_<0) return math::PtEtaPhiMLorentzVector(0,0,0,0); + if (!inHO_ || outerE_<0) return math::PtEtaPhiMLorentzVector(0,0,0,0); GlobalPoint p(v.x(), v.y(), v.z()); math::XYZVector dir = math::XYZVector(hadPosition_ - p); @@ -169,7 +169,7 @@ math::PtEtaPhiMLorentzVector CaloTower::p4_HO(double vtxZ) const { math::PtEtaPhiMLorentzVector CaloTower::p4_HO() const { - if (ietaAbs()>lastHORing_ || outerE_<0) return math::PtEtaPhiMLorentzVector(0.0,0.0,0.0,0.0); + if (!inHO_ || outerE_<0) return math::PtEtaPhiMLorentzVector(0.0,0.0,0.0,0.0); return math::PtEtaPhiMLorentzVector(outerE_ * sin(hadPosition_.theta()), hadPosition_.eta(), hadPosition_.phi(), 0.0); } @@ -180,7 +180,7 @@ void CaloTower::addConstituents( const std::vector& ids ) { } int CaloTower::numCrystals() const { - if (id_.ietaAbs()>lastHERing_) return 0; + if (subdet_ == HcalForward) return 0; int nC = 0; std::vector::const_iterator it = constituents_.begin(); @@ -220,19 +220,19 @@ void CaloTower::setCaloTowerStatus(unsigned int numBadHcalChan,unsigned int numB // needed by JetMET cleanup in AOD. double CaloTower::energyInHB() const { - if (id_.ietaAbs()firstHERing_ && id_.ietaAbs()<=lastHERing_) return hadE_; - else if (id_.ietaAbs()==firstHERing_) return outerE_; + if (inHBHEgap_) return outerE_; + else if (subdet_ == HcalEndcap) return hadE_; else return 0.0; } double CaloTower::energyInHF() const { - if (id_.ietaAbs()>=firstHFRing_) return energy(); + if (subdet_ == HcalForward) return energy(); else return 0.0; } @@ -242,8 +242,8 @@ double CaloTower::energyInHF() const { // when HO was not used double CaloTower::energyInHO() const { - if (id_.ietaAbs()>lastHORing_) return 0.0; - else return (energy() - hadE_ -emE_); + if (inHO_) return (energy() - hadE_ -emE_); + else return 0.0; } diff --git a/DataFormats/CaloTowers/src/classes_def.xml b/DataFormats/CaloTowers/src/classes_def.xml index f9b6a0d5812c4..532f5472aa3a6 100644 --- a/DataFormats/CaloTowers/src/classes_def.xml +++ b/DataFormats/CaloTowers/src/classes_def.xml @@ -3,7 +3,8 @@ - + + diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreationAlgo.cc b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreationAlgo.cc index ed235a2052f34..a66df11002442 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreationAlgo.cc +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreationAlgo.cc @@ -433,10 +433,10 @@ void CaloTowersCreationAlgo::rescaleTowers(const CaloTowerCollection& ctc, CaloT rescaledTower.setEcalTime( int(ctcItr->ecalTime()*100.0 + 0.5) ); rescaledTower.setHcalTime( int(ctcItr->hcalTime()*100.0 + 0.5) ); //add topology info - rescaledTower.setHcalLimits(theTowerTopology->firstHBRing(), theTowerTopology->lastHBRing(), - theTowerTopology->firstHERing(), theTowerTopology->lastHERing(), - theTowerTopology->firstHFRing(), theTowerTopology->lastHFRing(), - theTowerTopology->firstHORing(), theTowerTopology->lastHORing() ); + rescaledTower.setHcalSubdet(theTowerTopology->lastHBRing(), + theTowerTopology->lastHERing(), + theTowerTopology->lastHFRing(), + theTowerTopology->lastHORing() ); std::vector contains; for (unsigned int iConst = 0; iConst < ctcItr->constituentsSize(); ++iConst) { @@ -1018,10 +1018,10 @@ void CaloTowersCreationAlgo::convert(const CaloTowerDetId& id, const MetaTower& caloTower.setEcalTime(compactTime(ecalTime)); caloTower.setHcalTime(compactTime(hcalTime)); //add topology info - caloTower.setHcalLimits(theTowerTopology->firstHBRing(), theTowerTopology->lastHBRing(), - theTowerTopology->firstHERing(), theTowerTopology->lastHERing(), - theTowerTopology->firstHFRing(), theTowerTopology->lastHFRing(), - theTowerTopology->firstHORing(), theTowerTopology->lastHORing() ); + caloTower.setHcalSubdet(theTowerTopology->lastHBRing(), + theTowerTopology->lastHERing(), + theTowerTopology->lastHFRing(), + theTowerTopology->lastHORing() ); // set the CaloTower status word ===================================== // Channels must be counter exclusively in the defined cathegories @@ -1348,8 +1348,8 @@ GlobalPoint CaloTowersCreationAlgo::hadShwrPos(CaloTowerDetId towerId, float fra if(towerId.ietaAbs() >= theTowerTopology->firstHFRing()){ // forward, take the geometry for long fibers - frontCellId = HcalDetId(HcalForward, theTowerTopology->convertCTtoHcal(iEta), iPhi, 1); - backCellId = HcalDetId(HcalForward, theTowerTopology->convertCTtoHcal(iEta), iPhi, 1); + frontCellId = HcalDetId(HcalForward, towerId.zside()*theTowerTopology->convertCTtoHcal(abs(iEta)), iPhi, 1); + backCellId = HcalDetId(HcalForward, towerId.zside()*theTowerTopology->convertCTtoHcal(abs(iEta)), iPhi, 1); } else { //use constituents map From 4d227dfaf50ef80314ab7a59f482ee54d23d442e Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 9 Oct 2015 23:54:28 +0200 Subject: [PATCH 22/34] add fillDescriptions for CaloTowersCreator --- .../src/CaloTowersCreator.cc | 72 ++++++++++++++++++- .../CaloTowersCreator/src/CaloTowersCreator.h | 1 + .../src/CaloTowersReCreator.cc | 43 ++++++++++- .../src/CaloTowersReCreator.h | 1 + 4 files changed, 115 insertions(+), 2 deletions(-) diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc index a106f337cee07..557ce2f4b178f 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.cc @@ -64,7 +64,7 @@ CaloTowersCreator::CaloTowersCreator(const edm::ParameterSet& conf) : conf.getParameter("MomHEDepth"), conf.getParameter("MomEBDepth"), conf.getParameter("MomEEDepth"), - conf.exists("HcalPhase") ? conf.getParameter("HcalPhase") : 0 + conf.getParameter("HcalPhase") ), ecalLabels_(conf.getParameter >("ecalInputs")), @@ -293,3 +293,73 @@ void CaloTowersCreator::produce(edm::Event& e, const edm::EventSetup& c) { } +void CaloTowersCreator::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("EBSumThreshold", 0.2); + desc.add("HF2Weight", 1.0); + desc.add("EBWeight", 1.0); + desc.add("EESumThreshold", 0.45); + desc.add("HOThreshold0", 1.1); + desc.add("HOThresholdPlus1", 3.5); + desc.add("HOThresholdMinus1", 3.5); + desc.add("HOThresholdPlus2", 3.5); + desc.add("HOThresholdMinus2", 3.5); + desc.add("HBThreshold", 0.7); + desc.add("HF1Threshold", 0.5); + desc.add("HEDWeight", 1.0); + desc.add("EEWeight", 1.0); + desc.add("HESWeight", 1.0); + desc.add("HF1Weight", 1.0); + desc.add("HOWeight", 1.0); + desc.add("EBThreshold", 0.07); + desc.add("EEThreshold", 0.3); + desc.add("HcalThreshold", -1000.0); + desc.add("HF2Threshold", 0.85); + desc.add("HESThreshold", 0.8); + desc.add("HEDThreshold", 0.8); + desc.add("EcutTower", -1000.0); + desc.add("HBWeight", 1.0); + desc.add("MomHBDepth", 0.2); + desc.add("MomHEDepth", 0.4); + desc.add("MomEBDepth", 0.3); + desc.add("MomEEDepth", 0.0); + desc.add("UseHO", true); + desc.add("UseEtEBTreshold", false); + desc.add("UseSymEBTreshold", true); + desc.add("UseEtEETreshold", false); + desc.add("UseSymEETreshold", true); + desc.add("UseHcalRecoveredHits", true); + desc.add("UseEcalRecoveredHits", false); + desc.add("UseRejectedHitsOnly", false); + desc.add("UseRejectedRecoveredHcalHits", true); + desc.add("UseRejectedRecoveredEcalHits", false); + desc.add("AllowMissingInputs", false); + desc.add >("HBGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add >("EEWeights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("HF2Weights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("HOWeights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("EEGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add >("HBWeights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("HF2Grid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add >("HEDWeights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("HF1Grid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add >("EBWeights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("HF1Weights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("HESGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add >("HESWeights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("HEDGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add >("HOGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add >("EBGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add("hfInput", edm::InputTag("hfreco")); + desc.add("hbheInput", edm::InputTag("hbhereco")); + desc.add("hoInput", edm::InputTag("horeco")); + desc.add >("ecalInputs", {edm::InputTag("ecalRecHit","EcalRecHitsEB"), edm::InputTag("ecalRecHit","EcalRecHitsEE")}); + desc.add("MomConstrMethod", 1); + desc.add("HcalAcceptSeverityLevel", 9); + desc.add >("EcalRecHitSeveritiesToBeExcluded", {"kTime","kWeird","kBad"}); + desc.add("HcalAcceptSeverityLevelForRejectedHit", 9999); + desc.add >("EcalSeveritiesToBeUsedInBadTowers", {}); + desc.add("HcalPhase", 0); + + descriptions.addDefault(desc); +} diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.h b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.h index 107d6cd6997ff..fd5538f41b7ea 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.h +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersCreator.h @@ -27,6 +27,7 @@ class CaloTowersCreator : public edm::stream::EDProducer<> { explicit CaloTowersCreator(const edm::ParameterSet& ps); virtual ~CaloTowersCreator() { } virtual void produce(edm::Event& e, const edm::EventSetup& c); + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); double EBEScale, EEEScale, HBEScale, HESEScale; double HEDEScale, HOEScale, HF1EScale, HF2EScale; diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc index 20006e465b8d6..7e978dfc63814 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.cc @@ -37,7 +37,7 @@ CaloTowersReCreator::CaloTowersReCreator(const edm::ParameterSet& conf) : conf.getParameter("MomHEDepth"), conf.getParameter("MomEBDepth"), conf.getParameter("MomEEDepth"), - conf.exists("HcalPhase") ? conf.getParameter("HcalPhase") : 0 + conf.getParameter("HcalPhase") ), allowMissingInputs_(false) { @@ -104,3 +104,44 @@ void CaloTowersReCreator::produce(edm::Event& e, const edm::EventSetup& c) { } } +void CaloTowersReCreator::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("EBWeight", 1.0); + desc.add("HBEScale", 50.0); + desc.add("HEDWeight", 1.0); + desc.add("EEWeight", 1.0); + desc.add("HF1Weight", 1.0); + desc.add("HOWeight", 1.0); + desc.add("HESWeight", 1.0); + desc.add("HF2Weight", 1.0); + desc.add("HESEScale", 50.0); + desc.add("HEDEScale", 50.0); + desc.add("EBEScale", 50.0); + desc.add("HBWeight", 1.0); + desc.add("EEEScale", 50.0); + desc.add("MomHBDepth", 0.2); + desc.add("MomHEDepth", 0.4); + desc.add("MomEBDepth", 0.3); + desc.add("MomEEDepth", 0.0); + desc.add >("HBGrid", {0.0, 2.0, 4.0, 5.0, 9.0, 20.0, 30.0, 50.0, 100.0, 1000.0}); + desc.add >("EEWeights", {0.51, 1.39, 1.71, 2.37, 2.32, 2.2, 2.1, 1.98, 1.8}); + desc.add >("HF2Weights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("HOWeights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("EEGrid", {2.0, 4.0, 5.0, 9.0, 20.0, 30.0, 50.0, 100.0, 300.0}); + desc.add >("HBWeights", {2.0, 1.86, 1.69, 1.55, 1.37, 1.19, 1.13, 1.11, 1.09, 1.0}); + desc.add >("HF2Grid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add >("HEDWeights", {1.7, 1.57, 1.54, 1.49, 1.41, 1.26, 1.19, 1.15, 1.12, 1.0}); + desc.add >("HF1Grid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add >("EBWeights", {0.86, 1.47, 1.66, 2.01, 1.98, 1.86, 1.83, 1.74, 1.65}); + desc.add >("HF1Weights", {1.0, 1.0, 1.0, 1.0, 1.0}); + desc.add >("HESGrid", {0.0, 2.0, 4.0, 5.0, 9.0, 20.0, 30.0, 50.0, 100.0, 1000.0}); + desc.add >("HESWeights", {1.7, 1.57, 1.54, 1.49, 1.41, 1.26, 1.19, 1.15, 1.12, 1.0}); + desc.add >("HEDGrid", {0.0, 2.0, 4.0, 5.0, 9.0, 20.0, 30.0, 50.0, 100.0, 1000.0}); + desc.add >("HOGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0}); + desc.add >("EBGrid", {2.0, 4.0, 5.0, 9.0, 20.0, 30.0, 50.0, 100.0, 300.0}); + desc.add("caloLabel", edm::InputTag("calotowermaker")); + desc.add("MomConstrMethod", 1); + desc.add("HcalPhase", 0); + + descriptions.addDefault(desc); +} diff --git a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.h b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.h index 13d1824c82b98..122617b6501fc 100644 --- a/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.h +++ b/RecoLocalCalo/CaloTowersCreator/src/CaloTowersReCreator.h @@ -21,6 +21,7 @@ class CaloTowersReCreator : public edm::EDProducer { explicit CaloTowersReCreator(const edm::ParameterSet& ps); virtual ~CaloTowersReCreator() { } virtual void produce(edm::Event& e, const edm::EventSetup& c); + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); double EBEScale, EEEScale, HBEScale, HESEScale; double HEDEScale, HOEScale, HF1EScale, HF2EScale; private: From 8ddab97ac13249e97c93d4ff8273fcbae71a45c0 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 10 Oct 2015 18:36:36 +0200 Subject: [PATCH 23/34] customize HLT for CaloTowerTopology --- HLTrigger/Configuration/python/customizeHLTforCMSSW.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py index 8b1344518fe1f..b52818228639b 100644 --- a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py +++ b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py @@ -175,6 +175,12 @@ def replaceInPSet(pset, moduleLabel): return process +def customiseFor11497(process): + # Take care of CaloTowerTopology + if not hasattr(process,'CaloTowerTopologyEP'): + process.CaloTowerTopologyEP = cms.ESProducer( 'CaloTowerTopologyEP' ) + return process + # CMSSW version specific customizations def customiseHLTforCMSSW(process, menuType="GRun", fastSim=False): import os @@ -185,6 +191,7 @@ def customiseHLTforCMSSW(process, menuType="GRun", fastSim=False): process = customiseFor10353(process) process = customiseFor10911(process) process = customiseFor11183(process) + process = customiseFor11497(process) if cmsswVersion >= "CMSSW_7_5": process = customiseFor10927(process) process = customiseFor9232(process) From 4e926ff1855961676bd4079036f207a6047577a1 Mon Sep 17 00:00:00 2001 From: Martin Grunewald Date: Tue, 13 Oct 2015 17:20:15 +0200 Subject: [PATCH 24/34] Fixup Fake menu for #11497 --- HLTrigger/Configuration/python/HLT_Fake_cff.py | 4 ++-- HLTrigger/Configuration/test/OnLine_HLT_Fake.py | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/HLTrigger/Configuration/python/HLT_Fake_cff.py b/HLTrigger/Configuration/python/HLT_Fake_cff.py index c51173aeef5e5..9cc5cbc678301 100644 --- a/HLTrigger/Configuration/python/HLT_Fake_cff.py +++ b/HLTrigger/Configuration/python/HLT_Fake_cff.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_4_0/Fake/V17 (CMSSW_7_4_10_patch1) +# /dev/CMSSW_7_4_0/Fake/V20 (CMSSW_7_4_15) import FWCore.ParameterSet.Config as cms fragment = cms.ProcessFragment( "HLT" ) fragment.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_4_0/Fake/V17') + tableName = cms.string('/dev/CMSSW_7_4_0/Fake/V20') ) fragment.streams = cms.PSet( A = cms.vstring( 'InitialPD' ) ) diff --git a/HLTrigger/Configuration/test/OnLine_HLT_Fake.py b/HLTrigger/Configuration/test/OnLine_HLT_Fake.py index 84e24d3197b6c..5ced81594a21b 100644 --- a/HLTrigger/Configuration/test/OnLine_HLT_Fake.py +++ b/HLTrigger/Configuration/test/OnLine_HLT_Fake.py @@ -1,11 +1,11 @@ -# /dev/CMSSW_7_4_0/Fake/V17 (CMSSW_7_4_10_patch1) +# /dev/CMSSW_7_4_0/Fake/V20 (CMSSW_7_4_15) import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTFake" ) process.HLTConfigVersion = cms.PSet( - tableName = cms.string('/dev/CMSSW_7_4_0/Fake/V17') + tableName = cms.string('/dev/CMSSW_7_4_0/Fake/V20') ) process.streams = cms.PSet( A = cms.vstring( 'InitialPD' ) ) @@ -40,6 +40,15 @@ process.CastorDbProducer = cms.ESProducer( "CastorDbProducer", appendToDataLabel = cms.string( "" ) ) +process.HcalTopologyIdealEP = cms.ESProducer( "HcalTopologyIdealEP", + Exclude = cms.untracked.string( "" ), + appendToDataLabel = cms.string( "" ), + hcalTopologyConstants = cms.PSet( + maxDepthHE = cms.int32( 3 ), + maxDepthHB = cms.int32( 2 ), + mode = cms.string( "HcalTopologyMode::LHC" ) + ) +) process.FastTimerService = cms.Service( "FastTimerService", dqmPath = cms.untracked.string( "HLT/TimerService" ), From 421aeb211189d9685c99da999ac49dbd4999fa2b Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 13 Oct 2015 20:16:10 +0200 Subject: [PATCH 25/34] clean up CaloTowerHardcodeGeometryLoader --- .../CaloTowerHardcodeGeometryLoader.h | 2 +- .../src/CaloTowerHardcodeGeometryLoader.cc | 36 ++++++------------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/Geometry/HcalTowerAlgo/interface/CaloTowerHardcodeGeometryLoader.h b/Geometry/HcalTowerAlgo/interface/CaloTowerHardcodeGeometryLoader.h index 76e78f8fc5f5b..6f8e2edc4ead1 100644 --- a/Geometry/HcalTowerAlgo/interface/CaloTowerHardcodeGeometryLoader.h +++ b/Geometry/HcalTowerAlgo/interface/CaloTowerHardcodeGeometryLoader.h @@ -16,7 +16,7 @@ class CaloTowerHardcodeGeometryLoader { public: std::auto_ptr load(const CaloTowerTopology *limits, const HcalTopology *hcaltopo, const HcalDDDRecConstants* hcons); private: - void makeCell(int ieta, int iphi, CaloSubdetectorGeometry* geom) const; + void makeCell(uint32_t din, CaloSubdetectorGeometry* geom) const; const CaloTowerTopology *m_limits; const HcalTopology *m_hcaltopo; const HcalDDDRecConstants *m_hcons; diff --git a/Geometry/HcalTowerAlgo/src/CaloTowerHardcodeGeometryLoader.cc b/Geometry/HcalTowerAlgo/src/CaloTowerHardcodeGeometryLoader.cc index 27316dc3a8319..5c8dee5bec289 100644 --- a/Geometry/HcalTowerAlgo/src/CaloTowerHardcodeGeometryLoader.cc +++ b/Geometry/HcalTowerAlgo/src/CaloTowerHardcodeGeometryLoader.cc @@ -24,37 +24,16 @@ std::auto_ptr CaloTowerHardcodeGeometryLoader::load(con geom->numberOfParametersPerShape()*geom->numberOfShapes(), geom->numberOfParametersPerShape() ) ; - int nnn=0; // simple loop - for (int ieta=-m_hcaltopo->lastHFRing(); ieta<=m_hcaltopo->lastHFRing(); ieta++) { - if (ieta==0) continue; // skip not existing eta=0 ring - for (int iphi=1; iphi<=72; iphi++) { - if (abs(ieta)>=m_hcaltopo->firstHFQuadPhiRing() && ((iphi-1)%4)==0) continue; - if (abs(ieta)>=m_hcaltopo->firstHEDoublePhiRing() && ((iphi-1)%2)!=0) continue; - ++nnn; - } + for (uint32_t din = 0; din < m_limits->sizeForDenseIndexing(); ++din) { + makeCell(din, geom); } - if( geom->cornersMgr() == 0 ) geom->allocateCorners( nnn ) ; - if( geom->parMgr() == 0 ) geom->allocatePar( 41, 3 ) ; - - int n=0; - // simple loop - for (int ieta=-m_hcaltopo->lastHFRing(); ieta<=m_hcaltopo->lastHFRing(); ieta++) { - if (ieta==0) continue; // skip not existing eta=0 ring - for (int iphi=1; iphi<=72; iphi++) { - if (abs(ieta)>=m_hcaltopo->firstHFQuadPhiRing() && ((iphi-1)%4)==0) continue; - if (abs(ieta)>=m_hcaltopo->firstHEDoublePhiRing() && ((iphi-1)%2)!=0) continue; - makeCell(ieta,iphi, geom); - n++; - } - } - edm::LogInfo("Geometry") << "CaloTowersHardcodeGeometry made " << n << " towers."; + edm::LogInfo("Geometry") << "CaloTowersHardcodeGeometry made " << m_limits->sizeForDenseIndexing() << " towers."; return std::auto_ptr(geom); } void -CaloTowerHardcodeGeometryLoader::makeCell( int ieta, - int iphi, +CaloTowerHardcodeGeometryLoader::makeCell( uint32_t din, CaloSubdetectorGeometry* geom ) const { const double EBradius = 143.0; // cm const double HOradius = 406.0+1.0; @@ -64,6 +43,11 @@ CaloTowerHardcodeGeometryLoader::makeCell( int ieta, const double HFthick = 165; // Tower 17 is the last EB tower + //use CT topology to get the DetId for this dense index + CaloTowerDetId id = m_limits->detIdFromDenseIndex(din); + int ieta = id.ieta(); + int iphi = id.iphi(); + //use CT topology to get proper ieta for hcal int etaRing=m_limits->convertCTtoHcal(abs(ieta)); int sign=(ieta>0)?(1):(-1); @@ -124,5 +108,5 @@ CaloTowerHardcodeGeometryLoader::makeCell( int ieta, CaloCellGeometry::getParmPtr( hh, geom->parMgr(), geom->parVecVec() ), - CaloTowerDetId( ieta, iphi ) ) ; + id ) ; } From d05559e58f5a4700e9c0df1d158d6fcfd0c4112b Mon Sep 17 00:00:00 2001 From: Salvatore Di Guida Date: Wed, 14 Oct 2015 22:30:53 +0200 Subject: [PATCH 26/34] New Global Tags adding Calo Tower geometries with dense indexes in all scenarios. Run1 ideal simulations: 76X_designRun1_v8: As 76X_mcRun1_design_v5 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, and HCAL reconstruction geometry - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X. Run1 realistic simulations: 76X_mcRun1_realistic_v8: As 76X_mcRun1_realistic_v5 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, and HCAL reconstruction geometry - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X. Run1 heavy ion simulations: 76X_mcRun1_HeavyIon_v8: As 76X_mcRun1_HeavyIon_v5 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, and HCAL reconstruction geometry - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X. Run1 proton lead simulations: 76X_mcRun1_pA_v8: As 76X_mcRun1_pA_v5 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, and HCAL reconstruction geometry - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X. Run2 ideal simulations: 76X_mcRun2_design_v8: As 76X_mcRun2_design_v5 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, and HCAL reconstruction geometry - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X. - updated Jet probability calibration as a result of Spring15 campaign in asymptotic scenario. Run2 startup simulations: 76X_mcRun2_startup_v8: As 76X_mcRun2_startup_v5 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, and HCAL reconstruction geometry - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X. Run2 asymptotic simulations: 76X_mcRun2_asymptotic_v8: As 76X_mcRun2_asymptotic_v5 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, and HCAL reconstruction geometry - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X - updated Jet probability calibration as a result of Spring15 campaign in asymptotic scenario. Run2 HeavyIon simulations: 76X_mcRun2_HeavyIon_v8: As 76X_mcRun2_HeavyIon_v5 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, and HCAL reconstruction geometry - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X - updated RCT parameters for Heavy Ion setup - updated Jet probability calibration as a result of Spring15 campaign in asymptotic scenario. Upgrade 2017 ideal simulations: 76X_upgrade2017_design_v4: As 76X_upgrade2017_design_v1 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, and HCAL reconstruction geometry - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X - updated Jet probability calibration as a result of Spring15 campaign in asymptotic scenario. Run1 HLT data processing: 76X_dataRun1_HLT_frozen_v7: As 76X_dataRun1_HLT_frozen_v4 (snapshot time set to 2015-10-14 17:45:00 UTC) with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, Tracker, HCAL and Castor reconstruction geometry, and L1 RPC Hardware configuration - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X. Run1 offline processing: 76X_dataRun1_v7: As 76X_dataRun1_v4 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, Tracker, HCAL and Castor reconstruction geometry, and L1 RPC Hardware configuration, DQM ref histos, Track probability and Jet probability calibration. - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X. Run2 HLT processing: 76X_dataRun2_HLT_frozen_v6: As 76X_dataRun2_HLT_frozen_v4 (snapshot time set to 2015-10-14 17:45:00 UTC) with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, Tracker, HCAL and Castor reconstruction geometry, and L1 RPC Hardware configuration - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X. Run2 offline processing: 76X_dataRun2_v6: As 76X_dataRun1_v4 with the following changes: - taxonomy changes for DT reconstruction uncertainties, ECAL inter calibration errors, ECAL electronic mapping, Tracker, HCAL and Castor reconstruction geometry, and L1 RPC Hardware configuration, DQM ref histos, Track probability and Jet probability calibration. - updated Calo tower geometry based on more precise Hcal reco geometry, and introducing dense indexes, needed for integrating SLHC digitisation in 76X. --- Configuration/AlCa/python/autoCond.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Configuration/AlCa/python/autoCond.py b/Configuration/AlCa/python/autoCond.py index 0f4cc6a7f6ccf..850c788e395a2 100644 --- a/Configuration/AlCa/python/autoCond.py +++ b/Configuration/AlCa/python/autoCond.py @@ -2,31 +2,31 @@ ### NEW KEYS ### # GlobalTag for MC production with perfectly aligned and calibrated detector for Run1 - 'run1_design' : '76X_mcRun1_design_v7', + 'run1_design' : '76X_mcRun1_design_v8', # GlobalTag for MC production (pp collisions) with realistic alignment and calibrations for Run1 - 'run1_mc' : '76X_mcRun1_realistic_v7', + 'run1_mc' : '76X_mcRun1_realistic_v8', # GlobalTag for MC production (Heavy Ions collisions) with realistic alignment and calibrations for Run1 - 'run1_mc_hi' : '76X_mcRun1_HeavyIon_v7', + 'run1_mc_hi' : '76X_mcRun1_HeavyIon_v8', # GlobalTag for MC production (p-Pb collisions) with realistic alignment and calibrations for Run1 - 'run1_mc_pa' : '76X_mcRun1_pA_v7', + 'run1_mc_pa' : '76X_mcRun1_pA_v8', # GlobalTag for MC production with perfectly aligned and calibrated detector for Run2 - 'run2_design' : '76X_mcRun2_design_v7', + 'run2_design' : '76X_mcRun2_design_v8', # GlobalTag for MC production with pessimistic alignment and calibrations for Run2 - 'run2_mc_50ns' : '76X_mcRun2_startup_v7', + 'run2_mc_50ns' : '76X_mcRun2_startup_v8', #GlobalTag for MC production with optimistic alignment and calibrations for Run2 - 'run2_mc' : '76X_mcRun2_asymptotic_v7', + 'run2_mc' : '76X_mcRun2_asymptotic_v8', # GlobalTag for MC production (Heavy Ions collisions) with optimistic alignment and calibrations for Run2 - 'run2_mc_hi' : '76X_mcRun2_HeavyIon_v7', + 'run2_mc_hi' : '76X_mcRun2_HeavyIon_v8', # GlobalTag for Run1 data reprocessing - 'run1_data' : '76X_dataRun1_v6', + 'run1_data' : '76X_dataRun1_v7', # GlobalTag for Run2 data reprocessing - 'run2_data' : '76X_dataRun2_v6', + 'run2_data' : '76X_dataRun2_v7', # GlobalTag for Run1 HLT: it points to the online GT - 'run1_hlt' : '76X_dataRun1_HLT_frozen_v6', + 'run1_hlt' : '76X_dataRun1_HLT_frozen_v7', # GlobalTag for Run2 HLT: it points to the online GT - 'run2_hlt' : '76X_dataRun2_HLT_frozen_v6', + 'run2_hlt' : '76X_dataRun2_HLT_frozen_v7', # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2017 - 'phase1_2017_design' : '76X_upgrade2017_design_v3', + 'phase1_2017_design' : '76X_upgrade2017_design_v4', # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2019 'phase1_2019_design' : 'DES19_70_V2', # placeholder (GT not meant for standard RelVal) # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase2 From 324a002667e5b6046527a3b6d72711bd50602bed Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Tue, 13 Oct 2015 11:00:01 +0200 Subject: [PATCH 27/34] Fix problems found by static analyzer in DataFormats/Scalers The static analyzer found accidental casting away of const as well as a global array which was not const. Switching to const correct usage had not affect on any other code. --- DataFormats/Scalers/interface/DcsStatus.h | 2 +- DataFormats/Scalers/src/BeamSpotOnline.cc | 4 ++-- DataFormats/Scalers/src/DcsStatus.cc | 6 +++--- DataFormats/Scalers/src/L1TriggerScalers.cc | 4 ++-- DataFormats/Scalers/src/Level1TriggerScalers.cc | 4 ++-- DataFormats/Scalers/src/LumiScalers.cc | 16 ++++++++-------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/DataFormats/Scalers/interface/DcsStatus.h b/DataFormats/Scalers/interface/DcsStatus.h index 8ea9564b2c3d5..2348fb3b04c38 100644 --- a/DataFormats/Scalers/interface/DcsStatus.h +++ b/DataFormats/Scalers/interface/DcsStatus.h @@ -30,7 +30,7 @@ class DcsStatus public: static const int partitionList[]; - static const char * partitionName[]; + static const char * const partitionName[]; enum { diff --git a/DataFormats/Scalers/src/BeamSpotOnline.cc b/DataFormats/Scalers/src/BeamSpotOnline.cc index e3410495e7844..f4b628ddb91b1 100644 --- a/DataFormats/Scalers/src/BeamSpotOnline.cc +++ b/DataFormats/Scalers/src/BeamSpotOnline.cc @@ -37,8 +37,8 @@ BeamSpotOnline::BeamSpotOnline(const unsigned char * rawData) { BeamSpotOnline(); - struct ScalersEventRecordRaw_v4 * raw - = (struct ScalersEventRecordRaw_v4 *)rawData; + struct ScalersEventRecordRaw_v4 const* raw + = reinterpret_cast(rawData); trigType_ = ( raw->header >> 56 ) & 0xFULL; eventID_ = ( raw->header >> 32 ) & 0x00FFFFFFULL; sourceID_ = ( raw->header >> 8 ) & 0x00000FFFULL; diff --git a/DataFormats/Scalers/src/DcsStatus.cc b/DataFormats/Scalers/src/DcsStatus.cc index cac0204a526ae..f91635490ad07 100644 --- a/DataFormats/Scalers/src/DcsStatus.cc +++ b/DataFormats/Scalers/src/DcsStatus.cc @@ -34,7 +34,7 @@ const int DcsStatus::partitionList[DcsStatus::nPartitions] = { ESp , ESm }; -const char * DcsStatus::partitionName[DcsStatus::nPartitions] = { +const char * const DcsStatus::partitionName[DcsStatus::nPartitions] = { "EBp" , "EBm" , "EEp" , @@ -78,8 +78,8 @@ DcsStatus::DcsStatus(const unsigned char * rawData) { DcsStatus(); - struct ScalersEventRecordRaw_v4 * raw - = (struct ScalersEventRecordRaw_v4 *)rawData; + struct ScalersEventRecordRaw_v4 const * raw + = reinterpret_cast(rawData); trigType_ = ( raw->header >> 56 ) & 0xFULL; eventID_ = ( raw->header >> 32 ) & 0x00FFFFFFULL; sourceID_ = ( raw->header >> 8 ) & 0x00000FFFULL; diff --git a/DataFormats/Scalers/src/L1TriggerScalers.cc b/DataFormats/Scalers/src/L1TriggerScalers.cc index dcb469faf25eb..38cb989cdf9d6 100644 --- a/DataFormats/Scalers/src/L1TriggerScalers.cc +++ b/DataFormats/Scalers/src/L1TriggerScalers.cc @@ -44,8 +44,8 @@ L1TriggerScalers::L1TriggerScalers(const unsigned char * rawData) { L1TriggerScalers(); - struct ScalersEventRecordRaw_v1 * raw - = (struct ScalersEventRecordRaw_v1 *)rawData; + struct ScalersEventRecordRaw_v1 const * raw + = reinterpret_cast(rawData); trigType_ = ( raw->header >> 56 ) & 0xFULL; eventID_ = ( raw->header >> 32 ) & 0x00FFFFFFULL; diff --git a/DataFormats/Scalers/src/Level1TriggerScalers.cc b/DataFormats/Scalers/src/Level1TriggerScalers.cc index e92aebebe1d09..dbc8c1a2df631 100644 --- a/DataFormats/Scalers/src/Level1TriggerScalers.cc +++ b/DataFormats/Scalers/src/Level1TriggerScalers.cc @@ -62,8 +62,8 @@ Level1TriggerScalers::Level1TriggerScalers(const unsigned char * rawData) { Level1TriggerScalers(); - struct ScalersEventRecordRaw_v5 * raw - = (struct ScalersEventRecordRaw_v5 *)rawData; + struct ScalersEventRecordRaw_v5 const * raw + = reinterpret_cast(rawData); trigType_ = ( raw->header >> 56 ) & 0xFULL; eventID_ = ( raw->header >> 32 ) & 0x00FFFFFFULL; diff --git a/DataFormats/Scalers/src/LumiScalers.cc b/DataFormats/Scalers/src/LumiScalers.cc index 520d9b2cf0ffa..4ce0bc32dc28e 100644 --- a/DataFormats/Scalers/src/LumiScalers.cc +++ b/DataFormats/Scalers/src/LumiScalers.cc @@ -52,15 +52,15 @@ LumiScalers::LumiScalers(const unsigned char * rawData) { LumiScalers(); - struct ScalersEventRecordRaw_v1 * raw - = (struct ScalersEventRecordRaw_v1 *)rawData; + struct ScalersEventRecordRaw_v1 const* raw + = reinterpret_cast(rawData); trigType_ = ( raw->header >> 56 ) & 0xFULL; eventID_ = ( raw->header >> 32 ) & 0x00FFFFFFULL; sourceID_ = ( raw->header >> 8 ) & 0x00000FFFULL; bunchNumber_ = ( raw->header >> 20 ) & 0xFFFULL; version_ = raw->version; - struct LumiScalersRaw_v1 * lumi = NULL; + struct LumiScalersRaw_v1 const * lumi = NULL; if ( version_ >= 1 ) { @@ -70,8 +70,8 @@ LumiScalers::LumiScalers(const unsigned char * rawData) } else { - struct ScalersEventRecordRaw_v3 * raw3 - = (struct ScalersEventRecordRaw_v3 *)rawData; + struct ScalersEventRecordRaw_v3 const* raw3 + = reinterpret_cast(rawData); lumi = & (raw3->lumi); } collectionTime_.set_tv_sec(static_cast(lumi->collectionTime_sec)); @@ -109,9 +109,9 @@ LumiScalers::LumiScalers(const unsigned char * rawData) if ( version_ >= 7 ) { - struct ScalersEventRecordRaw_v6 * raw6 - = (struct ScalersEventRecordRaw_v6 *)rawData; - float * fspare = (float *) raw6->spare; + struct ScalersEventRecordRaw_v6 const * raw6 + = (struct ScalersEventRecordRaw_v6 const *)rawData; + float const* fspare = reinterpret_cast( raw6->spare); pileup_ = fspare[ScalersRaw::I_SPARE_PILEUP_v7]; pileupRMS_ = fspare[ScalersRaw::I_SPARE_PILEUPRMS_v7]; if ( version_ >= 8 ) From e9a753cead5e9110cf33550f711537dd9e0e3956 Mon Sep 17 00:00:00 2001 From: Heshy Roskes Date: Thu, 15 Oct 2015 16:26:49 +0200 Subject: [PATCH 28/34] Don't use no longer supported cmsLs, cmsStage, cmsMkdir wrapper scripts https://hypernews.cern.ch/HyperNews/CMS/get/tif-alignment/465.html --- .../python/TkAlAllInOneTool/configTemplates.py | 18 +++++++++--------- .../TkAlAllInOneTool/geometryComparison.py | 3 ++- .../python/TkAlAllInOneTool/zMuMuValidation.py | 2 ++ .../zMuMuValidationTemplates.py | 8 ++++---- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py index 8609ebe6affc1..615479a837212 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py @@ -47,12 +47,12 @@ #rfmkdir -p .oO[datadir]Oo. &>! /dev/null #remove possible result file from previous runs -previous_results=$(cmsLs -l /store/caf/user/$USER/.oO[eosdir]Oo. | awk '{print $5}') +previous_results=$(eos ls /store/caf/user/$USER/.oO[eosdir]Oo.) for file in ${previous_results} do if [ ${file} = /store/caf/user/$USER/.oO[eosdir]Oo./.oO[outputFile]Oo. ] then - cmsStage -f ${file} ${file}.bak + xrdcp -f root://eoscms//eos/cms${file} root://eoscms//eos/cms${file}.bak fi done @@ -86,7 +86,7 @@ find . -maxdepth 1 -name "LOGFILE*.oO[alignmentName]Oo.*" -print | xargs -I {} bash -c "rfcp {} .oO[logdir]Oo." #copy root files to eos -cmsMkdir /store/caf/user/$USER/.oO[eosdir]Oo. +eos mkdir -p /store/caf/user/$USER/.oO[eosdir]Oo. if [ .oO[parallelJobs]Oo. -eq 1 ] then root_files=$(ls --color=never -d *.oO[alignmentName]Oo.*.root) @@ -97,7 +97,7 @@ for file in ${root_files} do - cmsStage -f ${file} /store/caf/user/$USER/.oO[eosdir]Oo. + xrdcp -f ${file} root://eoscms//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo. echo ${file} done @@ -134,11 +134,11 @@ ############################################################################### # download root files from eos -root_files=$(cmsLs -l /store/caf/user/$USER/.oO[eosdir]Oo. | awk '{print $5}' \ +root_files=$(eos ls /store/caf/user/$USER/.oO[eosdir]Oo. \ | grep ".root$" | grep -v "result.root$") for file in ${root_files} do - cmsStage -f ${file} . + xrdcp -f root://eoscms//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo./${file} . # echo ${file} done @@ -181,7 +181,7 @@ compareAlignmentsExecution=""" #merge for .oO[validationId]Oo. if it does not exist or is not up-to-date echo -e "\n\nComparing validations" -cmsMkdir /store/caf/user/$USER/.oO[eosdir]Oo./ +eos mkdir -p /store/caf/user/$USER/.oO[eosdir]Oo./ cp .oO[CMSSW_BASE]Oo./src/Alignment/OfflineValidation/scripts/compareFileAges.C . root -x -q -b -l "compareFileAges.C(\\\"root://eoscms.cern.ch//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo./.oO[validationId]Oo._result.root\\\", \\\".oO[compareStringsPlain]Oo.\\\")" comparisonNeeded=${?} @@ -191,10 +191,10 @@ cp .oO[CMSSW_BASE]Oo./src/Alignment/OfflineValidation/scripts/compareAlignments.cc . root -x -q -b -l 'compareAlignments.cc++(\".oO[compareStrings]Oo.\")' mv result.root .oO[validationId]Oo._result.root - cmsStage -f .oO[validationId]Oo._result.root /store/caf/user/$USER/.oO[eosdir]Oo. + xrdcp -f .oO[validationId]Oo._result.root root://eoscms//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo. else echo ".oO[validationId]Oo._result.root is up-to-date, no need to compare again." - cmsStage -f /store/caf/user/$USER/.oO[eosdir]Oo./.oO[validationId]Oo._result.root . + xrdcp -f root://eoscms//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo./.oO[validationId]Oo._result.root . fi """ diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py index ff69e90769477..e3b6f8a507cd1 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/geometryComparison.py @@ -225,8 +225,9 @@ def createScript(self, path): ".oO[name]Oo..root"%name), repMap) resultingFile = os.path.expandvars( resultingFile ) resultingFile = os.path.abspath( resultingFile ) + resultingFile = "root://eoscms//eos/cms" + resultingFile #needs to be AFTER abspath so that it doesn't eat the // repMap["runComparisonScripts"] += \ - ("cmsStage -f OUTPUT_comparison.root %s\n" + ("xrdcp -f OUTPUT_comparison.root %s\n" %resultingFile) self.filesToCompare[ name ] = resultingFile diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py index 6567201d585a1..c56a13c862f71 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidation.py @@ -24,6 +24,8 @@ def __init__(self, valName, alignment, config, GenericValidationData.__init__(self, valName, alignment, config, "zmumu", addDefaults=defaults, addMandatories=mandatories) + if self.general["zmumureference"].startswith("/store"): + self.general["zmumureference"] = "root://eoscms//eos/cms" + self.general["zmumureference"] if self.NJobs > 1: raise AllInOneError("Parallel jobs not implemented for the Z->mumu validation!\n" "Please set parallelJobs = 1.") diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py index b642fe37f82eb..9f8428555e4be 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py @@ -264,19 +264,19 @@ cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/tdrstyle.C . cp .oO[CMSSW_BASE]Oo./src/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/MultiHistoOverlap_.oO[resonance]Oo..C . -if [[ .oO[zmumureference]Oo. == *store* ]]; then cmsStage -f .oO[zmumureference]Oo. BiasCheck_Reference.root; else ln -fs .oO[zmumureference]Oo. ./BiasCheck_Reference.root; fi +if [[ .oO[zmumureference]Oo. == *store* ]]; then xrdcp -f .oO[zmumureference]Oo. BiasCheck_Reference.root; else ln -fs .oO[zmumureference]Oo. ./BiasCheck_Reference.root; fi root -q -b -l MultiHistoOverlap_.oO[resonance]Oo..C -cmsMkdir /store/caf/user/$USER/.oO[eosdir]Oo./plots/ +eos mkdir -p /store/caf/user/$USER/.oO[eosdir]Oo./plots/ for RootOutputFile in $(ls *root ) do - cmsStage -f ${RootOutputFile} /store/caf/user/$USER/.oO[eosdir]Oo./ + xrdcp -f ${RootOutputFile} root://eoscms//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo./ rfcp ${RootOutputFile} .oO[workingdir]Oo. done mkdir -p .oO[plotsdir]Oo. for PngOutputFile in $(ls *png ); do - cmsStage -f ${PngOutputFile} /store/caf/user/$USER/.oO[eosdir]Oo./plots/ + xrdcp -f ${PngOutputFile} root://eoscms//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo./plots/ rfcp ${PngOutputFile} .oO[plotsdir]Oo. done From 6df3f5c260d66004fe5a002672de41e9244a1bc2 Mon Sep 17 00:00:00 2001 From: Heshy Roskes Date: Thu, 15 Oct 2015 17:21:50 +0200 Subject: [PATCH 29/34] aliases don't work outside of interactive shell --- .../TkAlAllInOneTool/configTemplates.py | 21 +++++++++++-------- .../zMuMuValidationTemplates.py | 3 ++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py index 615479a837212..6f473491d4471 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/configTemplates.py @@ -38,16 +38,18 @@ #ulimit -v 3072000 #export STAGE_SVCCLASS=cmscafuser #save path to the LSF batch working directory (/pool/lsf) + export LSFWORKDIR=`pwd -P` echo LSF working directory is $LSFWORKDIR source /afs/cern.ch/cms/caf/setup.sh +eos='/afs/cern.ch/project/eos/installation/cms/bin/eos.select' cd .oO[CMSSW_BASE]Oo./src export SCRAM_ARCH=.oO[SCRAM_ARCH]Oo. eval `scramv1 ru -sh` #rfmkdir -p .oO[datadir]Oo. &>! /dev/null #remove possible result file from previous runs -previous_results=$(eos ls /store/caf/user/$USER/.oO[eosdir]Oo.) +previous_results=$($eos ls /store/caf/user/$USER/.oO[eosdir]Oo.) for file in ${previous_results} do if [ ${file} = /store/caf/user/$USER/.oO[eosdir]Oo./.oO[outputFile]Oo. ] @@ -86,7 +88,7 @@ find . -maxdepth 1 -name "LOGFILE*.oO[alignmentName]Oo.*" -print | xargs -I {} bash -c "rfcp {} .oO[logdir]Oo." #copy root files to eos -eos mkdir -p /store/caf/user/$USER/.oO[eosdir]Oo. +$eos mkdir -p /store/caf/user/$USER/.oO[eosdir]Oo. if [ .oO[parallelJobs]Oo. -eq 1 ] then root_files=$(ls --color=never -d *.oO[alignmentName]Oo.*.root) @@ -114,6 +116,7 @@ ###################################################################### mergeTemplate=""" #!/bin/bash +eos='/afs/cern.ch/project/eos/installation/cms/bin/eos.select' CWD=`pwd -P` cd .oO[CMSSW_BASE]Oo./src export SCRAM_ARCH=.oO[SCRAM_ARCH]Oo. @@ -134,13 +137,13 @@ ############################################################################### # download root files from eos -root_files=$(eos ls /store/caf/user/$USER/.oO[eosdir]Oo. \ +root_files=$($eos ls /store/caf/user/$USER/.oO[eosdir]Oo. \ | grep ".root$" | grep -v "result.root$") -for file in ${root_files} -do - xrdcp -f root://eoscms//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo./${file} . - # echo ${file} -done +#for file in ${root_files} +#do +# xrdcp -f root://eoscms//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo./${file} . +# echo ${file} +#done #run @@ -181,7 +184,7 @@ compareAlignmentsExecution=""" #merge for .oO[validationId]Oo. if it does not exist or is not up-to-date echo -e "\n\nComparing validations" -eos mkdir -p /store/caf/user/$USER/.oO[eosdir]Oo./ +$eos mkdir -p /store/caf/user/$USER/.oO[eosdir]Oo./ cp .oO[CMSSW_BASE]Oo./src/Alignment/OfflineValidation/scripts/compareFileAges.C . root -x -q -b -l "compareFileAges.C(\\\"root://eoscms.cern.ch//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo./.oO[validationId]Oo._result.root\\\", \\\".oO[compareStringsPlain]Oo.\\\")" comparisonNeeded=${?} diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py index 9f8428555e4be..bb7af12fbf4ca 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py @@ -219,6 +219,7 @@ zMuMuScriptTemplate=""" #!/bin/bash source /afs/cern.ch/cms/caf/setup.sh +eos='/afs/cern.ch/project/eos/installation/cms/bin/eos.select' echo ----------------------- echo Job started at `date` @@ -267,7 +268,7 @@ if [[ .oO[zmumureference]Oo. == *store* ]]; then xrdcp -f .oO[zmumureference]Oo. BiasCheck_Reference.root; else ln -fs .oO[zmumureference]Oo. ./BiasCheck_Reference.root; fi root -q -b -l MultiHistoOverlap_.oO[resonance]Oo..C -eos mkdir -p /store/caf/user/$USER/.oO[eosdir]Oo./plots/ +$eos mkdir -p /store/caf/user/$USER/.oO[eosdir]Oo./plots/ for RootOutputFile in $(ls *root ) do xrdcp -f ${RootOutputFile} root://eoscms//eos/cms/store/caf/user/$USER/.oO[eosdir]Oo./ From de4be6fde0301fb9d15623f816c2aa586d5cc1b5 Mon Sep 17 00:00:00 2001 From: Heshy Roskes Date: Thu, 15 Oct 2015 18:22:40 +0200 Subject: [PATCH 30/34] Copy geometry comparison plots by default --- Alignment/OfflineValidation/scripts/validateAlignments.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Alignment/OfflineValidation/scripts/validateAlignments.py b/Alignment/OfflineValidation/scripts/validateAlignments.py index 03a6d7f97590e..ea6bfe9806db3 100755 --- a/Alignment/OfflineValidation/scripts/validateAlignments.py +++ b/Alignment/OfflineValidation/scripts/validateAlignments.py @@ -390,14 +390,14 @@ def main(argv = None): argv = sys.argv[1:] optParser = optparse.OptionParser() optParser.description = """All-in-one Alignment Validation. -This will run various validation procedures either on batch queues or interactviely. +This will run various validation procedures either on batch queues or interactively. If no name is given (-N parameter) a name containing time and date is created automatically. To merge the outcome of all validation procedures run TkAlMerge.sh in your validation's directory. """ optParser.add_option("-n", "--dryRun", dest="dryRun", action="store_true", default=False, help="create all scripts and cfg File but do not start jobs (default=False)") - optParser.add_option( "--getImages", dest="getImages", action="store_true", default=False, - help="get all Images created during the process (default= False)") + optParser.add_option( "--getImages", dest="getImages", action="store_true", default=True, + help="get all Images created during the process (default= True)") defaultConfig = "TkAlConfig.ini" optParser.add_option("-c", "--config", dest="config", default = defaultConfig, help="configuration to use (default TkAlConfig.ini) this can be a comma-seperated list of all .ini file you want to merge", metavar="CONFIG") From 490acde9a07e735d1d830bbad79541486ffa867a Mon Sep 17 00:00:00 2001 From: Heshy Roskes Date: Thu, 15 Oct 2015 21:26:21 +0200 Subject: [PATCH 31/34] Just leave one zmumu example --- .../OfflineValidation/test/testValidate.ini | 26 +- .../OfflineValidation/test/zmumuValidate.ini | 228 ------------------ 2 files changed, 21 insertions(+), 233 deletions(-) delete mode 100644 Alignment/OfflineValidation/test/zmumuValidate.ini diff --git a/Alignment/OfflineValidation/test/testValidate.ini b/Alignment/OfflineValidation/test/testValidate.ini index 42c1c33626168..d500ed15ecd50 100644 --- a/Alignment/OfflineValidation/test/testValidate.ini +++ b/Alignment/OfflineValidation/test/testValidate.ini @@ -50,6 +50,21 @@ condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALC color = 4 style = 1 +[alignment:alignment_mp1834p0] +title=alignment_mp1834p0 +globaltag = GR_P_V56 +#condition TrackerAlignmentErrorExtendedRcd = zeroAPE +condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1834/jobData/jobm/alignments_MP.db, Alignments +#condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1834/jobData/jobm/alignments_MP.db, Deformations +condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution +condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution +condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation +#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation +condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 +color = 633 +style = 1 + + ############################################################################### # configuration of individual validations @@ -85,14 +100,15 @@ levels = "Tracker","DetUnit" dbOutput = false jobmode = interactive -[zmumu:zmumu_test] +[zmumu:Run2015B_ALCARECO_251604-251642] etamaxneg = 2.4 etaminneg = -2.4 etamaxpos = 2.4 etaminpos = -2.4 -maxevents = 1000 -cmssw = /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/data/commonValidation/CMSSW_5_3_4_patch2 -dataset = Dataset_Run2012B_TkAlZMuMu_v1 +maxevents = -1 +firstRun=251604 +lastRun=251642 +dataset = /DoubleMuon/Run2015B-TkAlZMuMu-PromptReco-v1/ALCARECO [split:some_split_validation] maxevents = 1000 @@ -114,7 +130,7 @@ offline validation_IsoMu : alignment_0 offline validation_IsoMu : alignment_1 offlineParallel validation_CRAFT12 : alignment_1 compare Tracker: mp1260m1 1, mp1260baseline -zmumu zmumu_test : alignment_1 +zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1834p0 split some_split_validation : alignment_0 mcValidate some_mc_validation : alignment_0 diff --git a/Alignment/OfflineValidation/test/zmumuValidate.ini b/Alignment/OfflineValidation/test/zmumuValidate.ini deleted file mode 100644 index 6f46617a5d2eb..0000000000000 --- a/Alignment/OfflineValidation/test/zmumuValidate.ini +++ /dev/null @@ -1,228 +0,0 @@ -############################################################################### -# general settings applying to all validations -# - one can override `jobmode` in the individual validation's section -[general] -jobmode = lxBatch, -q cmscaf1nd -#datadir = /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/data/commonValidation/results/$USER/TkAlWeek2012/laEffect -# if you want your root files stored in a subdirectory on eos, put it here: -# eosdir = Test -# if you want your logs to be stored somewhere else, put it here: -# logdir = /afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/data/commonValidation/results/$USER/log - - -############################################################################### -# configuration of several alignments - - -[alignment:alignment_defgt] -title=alignment_{Default GT} -globaltag = GR_P_V56 -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -color = 633 -style = 1 - -[alignment:alignment_PCL] -title=alignment_PCL -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/work/c/chmartin/public/pp3.8T_2015_Alignment/Local_DB/TkAlignment.db,testTag -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/xiaomeng/Inflate/CMSSW_7_4_0_pre6/src/Alignment/HIPAlignmentAlgorithm/MP1700_sd.db,Deformations_mp -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -[alignment:alignment_hp1394] -title=alignment_hp1394 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/cayou/CMSSW_7_4_6_patch5/src/Alignment/HIPAlignmentAlgorithm/hp1394/alignments_iter20.db, Alignments -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/xiaomeng/Inflate/CMSSW_7_4_0_pre6/src/Alignment/HIPAlignmentAlgorithm/MP1700_sd.db,Deformations_mp -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -[alignment:alignment_hp1398] -title=alignment_hp1398 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/cayou/CMSSW_7_4_6_patch5/src/Alignment/HIPAlignmentAlgorithm/hp1398_2/alignments_iter15.db, Alignments -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/xiaomeng/Inflate/CMSSW_7_4_0_pre6/src/Alignment/HIPAlignmentAlgorithm/MP1700_sd.db,Deformations_mp -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -[alignment:alignment_hp1400] -title=alignment_hp1400 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/cayou/CMSSW_7_4_6_patch5/src/Alignment/HIPAlignmentAlgorithm/hp1400/alignments_iter20.db, Alignments -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/xiaomeng/Inflate/CMSSW_7_4_0_pre6/src/Alignment/HIPAlignmentAlgorithm/MP1700_sd.db,Deformations_mp -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -[alignment:alignment_hp1401] -title=alignment_hp1401 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/cayou/CMSSW_7_4_6_patch5/src/Alignment/HIPAlignmentAlgorithm/hp1401/alignments_iter30.db, Alignments -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN2/HIP/xiaomeng/Inflate/CMSSW_7_4_0_pre6/src/Alignment/HIPAlignmentAlgorithm/MP1700_sd.db,Deformations_mp -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -[alignment:alignment_mp1819] -title=alignment_mp1819 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1819/jobData/jobm/alignments_MP.db, Alignments -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1819/jobData/jobm/alignments_MP.db, Deformations -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -[alignment:alignment_mp1820] -title=alignment_mp1820 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1820/jobData/jobm/alignments_MP.db, Alignments -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1820/jobData/jobm/alignments_MP.db, Deformations -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -[alignment:alignment_mp1823p4] -title=alignment_mp1823p4 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1823/jobData/jobm4/alignments_MP.db, Alignments -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1823/jobData/jobm4/alignments_MP.db, Deformations -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -[alignment:alignment_mp1826p2] -title=alignment_mp1826p2 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1826/jobData/jobm2/alignments_MP.db, Alignments -#condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1826/jobData/jobm2/alignments_MP.db, Deformations -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -# No Zmumu -[alignment:alignment_mp1826p1] -title=alignment_mp1826p1 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1826/jobData/jobm1/alignments_MP.db, Alignments -condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1826/jobData/jobm1/alignments_MP.db, Deformations -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -#condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -[alignment:alignment_mp1834p0] -title=alignment_mp1834p0 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1834/jobData/jobm/alignments_MP.db, Alignments -#condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1834/jobData/jobm/alignments_MP.db, Deformations -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - -# No Zmumu -[alignment:alignment_mp1834p1] -title=alignment_mp1834p1 -globaltag = GR_P_V56 -#condition TrackerAlignmentErrorExtendedRcd = zeroAPE -condition TrackerAlignmentRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1834/jobData/jobm1/alignments_MP.db, Alignments -#condition TrackerSurfaceDeformationRcd = sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/MP/MPproduction/mp1834/jobData/jobm1/alignments_MP.db, Deformations -condition SiStripBackPlaneCorrectionRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripBackPlaneCorrection_deco_GR10_v4_offline,deconvolution -condition SiStripLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiStripLorentzAngleDeco_v3_offline,deconvolution -condition SiPixelLorentzAngleRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelLorentzAngle_2015_v2_hltvalidation -#condition SiPixelTemplateDBObjectRcd = frontier://FrontierProd/CMS_CONDITIONS,SiPixelTemplateDBObject_38T_2015_v1_hltvalidation -condition SiPixelTemplateDBObjectRcd = sqlite_file:/afs/cern.ch/user/d/dkotlins/public/CMSSW/DB/310815/SiPixelTemplateDBObject_38T_2015_v3.db,SiPixelTemplateDBObject38Tv10 -color = 633 -style = 1 - - -############################################################################### -# configuration of individual validations - -[zmumu:Run2015B_ALCARECO_251604-251642] -etamaxneg = 2.4 -etaminneg = -2.4 -etamaxpos = 2.4 -etaminpos = -2.4 -maxevents = -1 -firstRun=251604 -lastRun=251642 -dataset = /DoubleMuon/Run2015B-TkAlZMuMu-PromptReco-v1/ALCARECO - - -############################################################################### -# configure which validation to run on which alignment - -[validation] -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_defgt -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_PCL -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_hp1394 -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_hp1398 -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_hp1400 -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_hp1401 -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1819 -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1820 -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1823p4 -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1826p1 -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1826p2 -zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1834p0 -zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1834p1 -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1835p0 -#zmumu Run2015B_ALCARECO_251604-251642 : alignment_mp1835p1 From 65be972a99dc65b70f5333bd8dbddf9d5fa87dbf Mon Sep 17 00:00:00 2001 From: Heshy Roskes Date: Thu, 15 Oct 2015 21:47:30 +0200 Subject: [PATCH 32/34] no need for explicit condDBv2 --- .../python/TkAlAllInOneTool/zMuMuValidationTemplates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py index bb7af12fbf4ca..4287269ee0348 100644 --- a/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py +++ b/Alignment/OfflineValidation/python/TkAlAllInOneTool/zMuMuValidationTemplates.py @@ -27,7 +27,7 @@ ########### DATABASE conditions ############################ -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") process.GlobalTag.globaltag = ".oO[GlobalTag]Oo." .oO[condLoad]Oo. From 09ad09130c78c2b54db04ec38466ed141cf0bf72 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 19 Oct 2015 18:50:21 +0200 Subject: [PATCH 33/34] remove CaloTower transient version number --- DataFormats/CaloTowers/src/classes_def.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/DataFormats/CaloTowers/src/classes_def.xml b/DataFormats/CaloTowers/src/classes_def.xml index 532f5472aa3a6..05e3f6e8143ac 100644 --- a/DataFormats/CaloTowers/src/classes_def.xml +++ b/DataFormats/CaloTowers/src/classes_def.xml @@ -3,9 +3,8 @@ - - - + + From b5d48d82b8033a1e3a2a6d8eb28a6c42c3c0a46c Mon Sep 17 00:00:00 2001 From: Marco Rovere Date: Tue, 20 Oct 2015 00:19:02 +0200 Subject: [PATCH 34/34] Prevent V0 sim2reco candidate to share the same TrackRef --- Validation/RecoVertex/src/V0Validator.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/Validation/RecoVertex/src/V0Validator.cc b/Validation/RecoVertex/src/V0Validator.cc index b610bacf1f45d..0f3162e68528c 100644 --- a/Validation/RecoVertex/src/V0Validator.cc +++ b/Validation/RecoVertex/src/V0Validator.cc @@ -408,6 +408,7 @@ void V0Validator::doEfficiencies( } } if ((candidateEff[0] == 1 && candidateEff[1] == 1) && + (reco_daughter[0].key() != reco_daughter[1].key()) && (reconstructed_V0_couples.find( V0Couple(reco_daughter[0], reco_daughter[1])) != reconstructed_V0_couples.end())) {