From 6a2138e2a152709064df402acbd905ddcc107c57 Mon Sep 17 00:00:00 2001 From: Andrea Venturi Date: Sat, 13 Jun 2015 12:06:45 +0200 Subject: [PATCH 1/8] Protect against bunch crossing number = 3564 --- .../interface/DigiBXCorrHistogramMaker.h | 8 ++++---- .../plugins/EventTimeDistribution.cc | 6 +++--- .../src/DigiInvestigatorHistogramMaker.cc | 4 ++-- .../src/DigiLumiCorrHistogramMaker.cc | 2 +- .../src/DigiVertexCorrHistogramMaker.cc | 2 +- .../MultiplicityCorrelatorHistogramMaker.cc | 8 ++++---- .../RecoVertex/bin/PrimaryVertexPlots.cc | 2 +- .../RecoVertex/src/BSvsPVHistogramMaker.cc | 12 ++++++------ .../RecoVertex/src/VertexHistogramMaker.cc | 18 +++++++++--------- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/DPGAnalysis/SiStripTools/interface/DigiBXCorrHistogramMaker.h b/DPGAnalysis/SiStripTools/interface/DigiBXCorrHistogramMaker.h index df1c62e358f43..fe8c154c843ce 100755 --- a/DPGAnalysis/SiStripTools/interface/DigiBXCorrHistogramMaker.h +++ b/DPGAnalysis/SiStripTools/interface/DigiBXCorrHistogramMaker.h @@ -370,10 +370,10 @@ void DigiBXCorrHistogramMaker::fill(const T& he, const std::map& ndi } } - m_ndigivsbx[i]->Fill(he.bx(),digi->second); - if(m_ndigivsbx2D.find(i)!=m_ndigivsbx2D.end()) m_ndigivsbx2D[i]->Fill(he.bx(),digi->second); - if(m_ndigivsbx2Dzoom.find(i)!=m_ndigivsbx2Dzoom.end()) m_ndigivsbx2Dzoom[i]->Fill(he.bx(),digi->second); - if(m_ndigivsbx2Dzoom2.find(i)!=m_ndigivsbx2Dzoom2.end()) m_ndigivsbx2Dzoom2[i]->Fill(he.bx(),digi->second); + m_ndigivsbx[i]->Fill(he.bx()%3564,digi->second); + if(m_ndigivsbx2D.find(i)!=m_ndigivsbx2D.end()) m_ndigivsbx2D[i]->Fill(he.bx()%3564,digi->second); + if(m_ndigivsbx2Dzoom.find(i)!=m_ndigivsbx2Dzoom.end()) m_ndigivsbx2Dzoom[i]->Fill(he.bx()%3564,digi->second); + if(m_ndigivsbx2Dzoom2.find(i)!=m_ndigivsbx2Dzoom2.end()) m_ndigivsbx2Dzoom2[i]->Fill(he.bx()%3564,digi->second); if(he.depth()>0) { diff --git a/DPGAnalysis/SiStripTools/plugins/EventTimeDistribution.cc b/DPGAnalysis/SiStripTools/plugins/EventTimeDistribution.cc index 2c369df1fcfc0..5ef2d5bf0062d 100644 --- a/DPGAnalysis/SiStripTools/plugins/EventTimeDistribution.cc +++ b/DPGAnalysis/SiStripTools/plugins/EventTimeDistribution.cc @@ -187,9 +187,9 @@ EventTimeDistribution::analyze(const edm::Event& iEvent, const edm::EventSetup& (*(*dbxhist))->Fill(he->deltaBX(indices->first,indices->second)); } - (*_bx)->Fill(iEvent.bunchCrossing()); + (*_bx)->Fill(iEvent.bunchCrossing()%3564); (*_orbit)->Fill(iEvent.orbitNumber()); - if(_dbxvsbx && *_dbxvsbx) (*_dbxvsbx)->Fill(iEvent.bunchCrossing(),he->deltaBX()); + if(_dbxvsbx && *_dbxvsbx) (*_dbxvsbx)->Fill(iEvent.bunchCrossing()%3564,he->deltaBX()); if(m_ewhdepth && *m_ewhdepth) (*m_ewhdepth)->Fill(he->depth()); edm::Handle apvphase; @@ -205,7 +205,7 @@ EventTimeDistribution::analyze(const edm::Event& iEvent, const edm::EventSetup& tbx -= thephase; (*_bxincycle)->Fill(tbx%70); if(_dbxvsbxincycle && *_dbxvsbxincycle) (*_dbxvsbxincycle)->Fill(tbx%70,he->deltaBX()); - if(_bxincyclevsbx && *_bxincyclevsbx) (*_bxincyclevsbx)->Fill(iEvent.bunchCrossing(),tbx%70); + if(_bxincyclevsbx && *_bxincyclevsbx) (*_bxincyclevsbx)->Fill(iEvent.bunchCrossing()%3564,tbx%70); if(_orbitvsbxincycle && *_orbitvsbxincycle) (*_orbitvsbxincycle)->Fill(tbx%70,iEvent.orbitNumber()); } diff --git a/DPGAnalysis/SiStripTools/src/DigiInvestigatorHistogramMaker.cc b/DPGAnalysis/SiStripTools/src/DigiInvestigatorHistogramMaker.cc index dd6f419906af3..a2c47c28ee4b7 100644 --- a/DPGAnalysis/SiStripTools/src/DigiInvestigatorHistogramMaker.cc +++ b/DPGAnalysis/SiStripTools/src/DigiInvestigatorHistogramMaker.cc @@ -176,10 +176,10 @@ void DigiInvestigatorHistogramMaker::fill(const edm::Event& iEvent, const std::m _nmult[i]->Fill(digi->second); if(_runHisto) { if(_nmultvsorbrun[i] && *_nmultvsorbrun[i]) (*_nmultvsorbrun[i])->Fill(iEvent.orbitNumber(),digi->second); - if(_nmultvsbxrun[i] && *_nmultvsbxrun[i]) (*_nmultvsbxrun[i])->Fill(iEvent.bunchCrossing(),digi->second); + if(_nmultvsbxrun[i] && *_nmultvsbxrun[i]) (*_nmultvsbxrun[i])->Fill(iEvent.bunchCrossing()%3564,digi->second); } if(_fillHisto) { - if(_nmultvsbxfill[i] && *_nmultvsbxfill[i]) (*_nmultvsbxfill[i])->Fill(iEvent.bunchCrossing(),digi->second); + if(_nmultvsbxfill[i] && *_nmultvsbxfill[i]) (*_nmultvsbxfill[i])->Fill(iEvent.bunchCrossing()%3564,digi->second); } } diff --git a/DPGAnalysis/SiStripTools/src/DigiLumiCorrHistogramMaker.cc b/DPGAnalysis/SiStripTools/src/DigiLumiCorrHistogramMaker.cc index 4bec08e5a4175..3972f300b337b 100644 --- a/DPGAnalysis/SiStripTools/src/DigiLumiCorrHistogramMaker.cc +++ b/DPGAnalysis/SiStripTools/src/DigiLumiCorrHistogramMaker.cc @@ -150,7 +150,7 @@ void DigiLumiCorrHistogramMaker::fill(const edm::Event& iEvent, const std::mapFill(bxlumi,digi->second); m_nmultvslumiprof[i]->Fill(bxlumi,digi->second); - if(m_nmultvslumivsbxprofrun[i] && *m_nmultvslumivsbxprofrun[i]) (*m_nmultvslumivsbxprofrun[i])->Fill(iEvent.bunchCrossing(),bxlumi,digi->second); + if(m_nmultvslumivsbxprofrun[i] && *m_nmultvslumivsbxprofrun[i]) (*m_nmultvslumivsbxprofrun[i])->Fill(iEvent.bunchCrossing()%3564,bxlumi,digi->second); } } diff --git a/DPGAnalysis/SiStripTools/src/DigiVertexCorrHistogramMaker.cc b/DPGAnalysis/SiStripTools/src/DigiVertexCorrHistogramMaker.cc index b145332cd6ead..69a410e2ab7fa 100644 --- a/DPGAnalysis/SiStripTools/src/DigiVertexCorrHistogramMaker.cc +++ b/DPGAnalysis/SiStripTools/src/DigiVertexCorrHistogramMaker.cc @@ -147,7 +147,7 @@ void DigiVertexCorrHistogramMaker::fill(const edm::Event& iEvent, const unsigned m_nmultvsnvtx[i]->Fill(nvtx,digi->second); m_nmultvsnvtxprof[i]->Fill(nvtx,digi->second); - if(m_nmultvsnvtxvsbxprofrun[i] && *m_nmultvsnvtxvsbxprofrun[i]) (*m_nmultvsnvtxvsbxprofrun[i])->Fill(iEvent.bunchCrossing(),nvtx,digi->second); + if(m_nmultvsnvtxvsbxprofrun[i] && *m_nmultvsnvtxvsbxprofrun[i]) (*m_nmultvsnvtxvsbxprofrun[i])->Fill(iEvent.bunchCrossing()%3564,nvtx,digi->second); } diff --git a/DPGAnalysis/SiStripTools/src/MultiplicityCorrelatorHistogramMaker.cc b/DPGAnalysis/SiStripTools/src/MultiplicityCorrelatorHistogramMaker.cc index 2433f9b7487b9..bfc5ff33f93d0 100644 --- a/DPGAnalysis/SiStripTools/src/MultiplicityCorrelatorHistogramMaker.cc +++ b/DPGAnalysis/SiStripTools/src/MultiplicityCorrelatorHistogramMaker.cc @@ -137,10 +137,10 @@ void MultiplicityCorrelatorHistogramMaker::fill(const edm::Event& iEvent, const if(m_yvsxmultrun && *m_yvsxmultrun) (*m_yvsxmultrun)->Fill(xmult,ymult); if(m_atanyoverxrun && *m_atanyoverxrun) (*m_atanyoverxrun)->Fill(atan2(ymult*m_scfact,xmult)); - if(m_atanyoverxvsbxrun && *m_atanyoverxvsbxrun) (*m_atanyoverxvsbxrun)->Fill(bx,atan2(ymult*m_scfact,xmult)); - if(m_atanyoverxvsbxrun2D && *m_atanyoverxvsbxrun2D) (*m_atanyoverxvsbxrun2D)->Fill(bx,atan2(ymult*m_scfact,xmult)); + if(m_atanyoverxvsbxrun && *m_atanyoverxvsbxrun) (*m_atanyoverxvsbxrun)->Fill(bx%3564,atan2(ymult*m_scfact,xmult)); + if(m_atanyoverxvsbxrun2D && *m_atanyoverxvsbxrun2D) (*m_atanyoverxvsbxrun2D)->Fill(bx%3564,atan2(ymult*m_scfact,xmult)); - if(m_yvsxmultprofvsbxrun && *m_yvsxmultprofvsbxrun) (*m_yvsxmultprofvsbxrun)->Fill(bx,xmult,ymult); - if(m_xvsymultprofvsbxrun && *m_xvsymultprofvsbxrun) (*m_xvsymultprofvsbxrun)->Fill(bx,ymult,xmult); + if(m_yvsxmultprofvsbxrun && *m_yvsxmultprofvsbxrun) (*m_yvsxmultprofvsbxrun)->Fill(bx%3564,xmult,ymult); + if(m_xvsymultprofvsbxrun && *m_xvsymultprofvsbxrun) (*m_xvsymultprofvsbxrun)->Fill(bx%3564,ymult,xmult); } diff --git a/Validation/RecoVertex/bin/PrimaryVertexPlots.cc b/Validation/RecoVertex/bin/PrimaryVertexPlots.cc index b980b296769d9..3be5b58fef03b 100644 --- a/Validation/RecoVertex/bin/PrimaryVertexPlots.cc +++ b/Validation/RecoVertex/bin/PrimaryVertexPlots.cc @@ -703,7 +703,7 @@ void PrimaryVertexPlots(const char* fullname,const char* module, const char* pos bool first=true; int mcount=20; int ccount=1; - for(unsigned int bx=1;bx<3564;++bx) { + for(unsigned int bx=0;bx<3564;++bx) { char hname[300]; sprintf(hname,"bx_%d",bx); TH1D* slice = nvtxvsbxvsorb->ProjectionY(hname,bx+1,bx+1); diff --git a/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc b/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc index 0791ecb9e740b..ad4cf44c6362e 100644 --- a/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc +++ b/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc @@ -217,13 +217,13 @@ void BSvsPVHistogramMaker::fill(const unsigned int orbit, const int bx, const re if(_hdeltazvsorbrun && *_hdeltazvsorbrun ) (*_hdeltazvsorbrun)->Fill(orbit,deltaz); } if(_runHistoBXProfile) { - if(_hdeltaxvsbxrun && *_hdeltaxvsbxrun ) (*_hdeltaxvsbxrun)->Fill(bx,deltax); - if(_hdeltayvsbxrun && *_hdeltayvsbxrun ) (*_hdeltayvsbxrun)->Fill(bx,deltay); - if(_hdeltazvsbxrun && *_hdeltazvsbxrun ) (*_hdeltazvsbxrun)->Fill(bx,deltaz); + if(_hdeltaxvsbxrun && *_hdeltaxvsbxrun ) (*_hdeltaxvsbxrun)->Fill(bx%3564,deltax); + if(_hdeltayvsbxrun && *_hdeltayvsbxrun ) (*_hdeltayvsbxrun)->Fill(bx%3564,deltay); + if(_hdeltazvsbxrun && *_hdeltazvsbxrun ) (*_hdeltazvsbxrun)->Fill(bx%3564,deltaz); if(_runHistoBX2D) { - if(_hdeltaxvsbx2drun && *_hdeltaxvsbx2drun ) (*_hdeltaxvsbx2drun)->Fill(bx,deltax); - if(_hdeltayvsbx2drun && *_hdeltayvsbx2drun ) (*_hdeltayvsbx2drun)->Fill(bx,deltay); - if(_hdeltazvsbx2drun && *_hdeltazvsbx2drun ) (*_hdeltazvsbx2drun)->Fill(bx,deltaz); + if(_hdeltaxvsbx2drun && *_hdeltaxvsbx2drun ) (*_hdeltaxvsbx2drun)->Fill(bx%3564,deltax); + if(_hdeltayvsbx2drun && *_hdeltayvsbx2drun ) (*_hdeltayvsbx2drun)->Fill(bx%3564,deltay); + if(_hdeltazvsbx2drun && *_hdeltazvsbx2drun ) (*_hdeltazvsbx2drun)->Fill(bx%3564,deltaz); } } } diff --git a/Validation/RecoVertex/src/VertexHistogramMaker.cc b/Validation/RecoVertex/src/VertexHistogramMaker.cc index fa1e305acaa75..3e81f4426347e 100644 --- a/Validation/RecoVertex/src/VertexHistogramMaker.cc +++ b/Validation/RecoVertex/src/VertexHistogramMaker.cc @@ -284,13 +284,13 @@ void VertexHistogramMaker::fill(const unsigned int orbit, const int bx, const fl if(m_hvtxzvsorbrun && *m_hvtxzvsorbrun ) (*m_hvtxzvsorbrun)->Fill(orbit,vtx->z(),weight); } if(m_runHistoBXProfile) { - if(m_hvtxxvsbxrun && *m_hvtxxvsbxrun ) (*m_hvtxxvsbxrun)->Fill(bx,vtx->x(),weight); - if(m_hvtxyvsbxrun && *m_hvtxyvsbxrun ) (*m_hvtxyvsbxrun)->Fill(bx,vtx->y(),weight); - if(m_hvtxzvsbxrun && *m_hvtxzvsbxrun ) (*m_hvtxzvsbxrun)->Fill(bx,vtx->z(),weight); + if(m_hvtxxvsbxrun && *m_hvtxxvsbxrun ) (*m_hvtxxvsbxrun)->Fill(bx%3564,vtx->x(),weight); + if(m_hvtxyvsbxrun && *m_hvtxyvsbxrun ) (*m_hvtxyvsbxrun)->Fill(bx%3564,vtx->y(),weight); + if(m_hvtxzvsbxrun && *m_hvtxzvsbxrun ) (*m_hvtxzvsbxrun)->Fill(bx%3564,vtx->z(),weight); if(m_runHisto2D) { - if(m_hvtxxvsbx2drun && *m_hvtxxvsbx2drun ) (*m_hvtxxvsbx2drun)->Fill(bx,vtx->x(),weight); - if(m_hvtxyvsbx2drun && *m_hvtxyvsbx2drun ) (*m_hvtxyvsbx2drun)->Fill(bx,vtx->y(),weight); - if(m_hvtxzvsbx2drun && *m_hvtxzvsbx2drun ) (*m_hvtxzvsbx2drun)->Fill(bx,vtx->z(),weight); + if(m_hvtxxvsbx2drun && *m_hvtxxvsbx2drun ) (*m_hvtxxvsbx2drun)->Fill(bx%3564,vtx->x(),weight); + if(m_hvtxyvsbx2drun && *m_hvtxyvsbx2drun ) (*m_hvtxyvsbx2drun)->Fill(bx%3564,vtx->y(),weight); + if(m_hvtxzvsbx2drun && *m_hvtxzvsbx2drun ) (*m_hvtxzvsbx2drun)->Fill(bx%3564,vtx->z(),weight); } } } @@ -335,13 +335,13 @@ void VertexHistogramMaker::fill(const unsigned int orbit, const int bx, const fl if(m_hnvtxvsorbrun && *m_hnvtxvsorbrun ) (*m_hnvtxvsorbrun)->Fill(orbit,ntruevtx,weight); } if(m_runHistoBXProfile) { - if(m_hnvtxvsbxrun && *m_hnvtxvsbxrun ) (*m_hnvtxvsbxrun)->Fill(bx,ntruevtx,weight); + if(m_hnvtxvsbxrun && *m_hnvtxvsbxrun ) (*m_hnvtxvsbxrun)->Fill(bx%3564,ntruevtx,weight); if(m_runHistoBXProfile2D) { - if(m_hnvtxvsbxvslumirun && *m_hnvtxvsbxvslumirun && bxlumi >= 0.) (*m_hnvtxvsbxvslumirun)->Fill(bx,bxlumi,ntruevtx,weight); + if(m_hnvtxvsbxvslumirun && *m_hnvtxvsbxvslumirun && bxlumi >= 0.) (*m_hnvtxvsbxvslumirun)->Fill(bx%3564,bxlumi,ntruevtx,weight); } } if(m_runHisto2D) { - if(m_hnvtxvsbxvsorbrun && *m_hnvtxvsbxvsorbrun ) (*m_hnvtxvsbxvsorbrun)->Fill(bx,orbit,ntruevtx,weight); + if(m_hnvtxvsbxvsorbrun && *m_hnvtxvsbxvsorbrun ) (*m_hnvtxvsbxvsorbrun)->Fill(bx%3564,orbit,ntruevtx,weight); if(m_hnvtxvsorbrun2D && *m_hnvtxvsorbrun2D ) { if(ntruevtx < (*m_hnvtxvsorbrun2D)->GetYaxis()->GetXmax() && ntruevtx > (*m_hnvtxvsorbrun2D)->GetYaxis()->GetXmin()) { (*m_hnvtxvsorbrun2D)->Fill(orbit,ntruevtx,weight); From 3c5144fecf5df46669ffa0c96c918982d3fa0765 Mon Sep 17 00:00:00 2001 From: Andrea Venturi Date: Sat, 13 Jun 2015 12:26:30 +0200 Subject: [PATCH 2/8] Update cfg files to conddb v2 --- Validation/RecoVertex/test/allanalyzer_example_cfg.py | 9 +++++---- Validation/RecoVertex/test/bspvanalyzer_cfg.py | 9 +++++---- Validation/RecoVertex/test/mcverticesanalyzer_cfg.py | 9 +++++---- .../RecoVertex/test/mcverticessimpleanalyzer_cfg.py | 9 +++++---- .../RecoVertex/test/mcverticestriggerbiasanalyzer_cfg.py | 7 ++++--- 5 files changed, 24 insertions(+), 19 deletions(-) diff --git a/Validation/RecoVertex/test/allanalyzer_example_cfg.py b/Validation/RecoVertex/test/allanalyzer_example_cfg.py index c00ad3312345a..00d250e61a64d 100644 --- a/Validation/RecoVertex/test/allanalyzer_example_cfg.py +++ b/Validation/RecoVertex/test/allanalyzer_example_cfg.py @@ -8,11 +8,11 @@ options = VarParsing.VarParsing("analysis") options.register ('globalTag', - "DONOTEXIST::All", + "DONOTEXIST", VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.string, # string, int, or float "GlobalTag") -#options.globalTag = "DONOTEXIST::All" +#options.globalTag = "DONOTEXIST" options.parseArguments() @@ -101,8 +101,9 @@ #----GlobalTag ------------------------ -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") -process.GlobalTag.globaltag = options.globalTag +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") +from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') process.TFileService = cms.Service('TFileService', diff --git a/Validation/RecoVertex/test/bspvanalyzer_cfg.py b/Validation/RecoVertex/test/bspvanalyzer_cfg.py index 19fba10099d5c..fe30b94236ea3 100644 --- a/Validation/RecoVertex/test/bspvanalyzer_cfg.py +++ b/Validation/RecoVertex/test/bspvanalyzer_cfg.py @@ -8,11 +8,11 @@ options = VarParsing.VarParsing() options.register ('globalTag', - "DONOTEXIST::All", + "DONOTEXIST", VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.string, # string, int, or float "GlobalTag") -#options.globalTag = "DONOTEXIST::All" +#options.globalTag = "DONOTEXIST" options.parseArguments() @@ -98,8 +98,9 @@ #----GlobalTag ------------------------ -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") -process.GlobalTag.globaltag = options.globalTag +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") +from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') process.TFileService = cms.Service('TFileService', diff --git a/Validation/RecoVertex/test/mcverticesanalyzer_cfg.py b/Validation/RecoVertex/test/mcverticesanalyzer_cfg.py index 248e7403a5685..3a24d34a1ff2e 100644 --- a/Validation/RecoVertex/test/mcverticesanalyzer_cfg.py +++ b/Validation/RecoVertex/test/mcverticesanalyzer_cfg.py @@ -8,11 +8,11 @@ options = VarParsing.VarParsing("analysis") options.register ('globalTag', - "DONOTEXIST::All", + "DONOTEXIST", VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.string, # string, int, or float "GlobalTag") -#options.globalTag = "DONOTEXIST::All" +#options.globalTag = "DONOTEXIST" options.parseArguments() @@ -166,8 +166,9 @@ #----GlobalTag ------------------------ -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") -process.GlobalTag.globaltag = options.globalTag +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") +from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') process.TFileService = cms.Service('TFileService', diff --git a/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py b/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py index 4e6376e0d947d..89681f77e8bd8 100644 --- a/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py +++ b/Validation/RecoVertex/test/mcverticessimpleanalyzer_cfg.py @@ -8,11 +8,11 @@ options = VarParsing.VarParsing("analysis") options.register ('globalTag', - "DONOTEXIST::All", + "DONOTEXIST", VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.string, # string, int, or float "GlobalTag") -#options.globalTag = "DONOTEXIST::All" +#options.globalTag = "DONOTEXIST" options.parseArguments() @@ -82,8 +82,9 @@ #----GlobalTag ------------------------ -#process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") -#process.GlobalTag.globaltag = options.globalTag +#process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") +#from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +#process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') process.TFileService = cms.Service('TFileService', diff --git a/Validation/RecoVertex/test/mcverticestriggerbiasanalyzer_cfg.py b/Validation/RecoVertex/test/mcverticestriggerbiasanalyzer_cfg.py index 600fc57b20e1d..08440b7a701e9 100644 --- a/Validation/RecoVertex/test/mcverticestriggerbiasanalyzer_cfg.py +++ b/Validation/RecoVertex/test/mcverticestriggerbiasanalyzer_cfg.py @@ -10,7 +10,7 @@ options = VarParsing.VarParsing("analysis") options.register ('globalTag', - "DONOTEXIST::All", + "DONOTEXIST", VarParsing.VarParsing.multiplicity.singleton, # singleton or list VarParsing.VarParsing.varType.string, # string, int, or float "GlobalTag") @@ -112,8 +112,9 @@ #----GlobalTag ------------------------ -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") -process.GlobalTag.globaltag = options.globalTag +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") +from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') process.TFileService = cms.Service('TFileService', fileName = cms.string('mcverticestriggerbias.root') From 7032ed4fc9dfef6ed4e0fc394556158e173fb4ae Mon Sep 17 00:00:00 2001 From: Andrea Venturi Date: Thu, 18 Jun 2015 19:12:42 +0200 Subject: [PATCH 3/8] New analysis to correlate the BPIX ladder positions with the beamspot position --- DPGAnalysis/SiStripTools/bin/BSvsBPIX.cc | 54 +++++++ DPGAnalysis/SiStripTools/bin/BSvsBPIX.h | 8 + .../DPGAnalysisSiStripToolsMacrosLinkDef.h | 2 + ...ccupancyplotsselections_bpixladders_cff.py | 100 +++++++++++++ DPGAnalysis/SiStripTools/test/bsvsbpix_cfg.py | 137 ++++++++++++++++++ .../SiStripTools/test/crab_bsvsbpix.cfg | 124 ++++++++++++++++ 6 files changed, 425 insertions(+) create mode 100644 DPGAnalysis/SiStripTools/bin/BSvsBPIX.cc create mode 100644 DPGAnalysis/SiStripTools/bin/BSvsBPIX.h create mode 100644 DPGAnalysis/SiStripTools/python/occupancyplotsselections_bpixladders_cff.py create mode 100644 DPGAnalysis/SiStripTools/test/bsvsbpix_cfg.py create mode 100644 DPGAnalysis/SiStripTools/test/crab_bsvsbpix.cfg diff --git a/DPGAnalysis/SiStripTools/bin/BSvsBPIX.cc b/DPGAnalysis/SiStripTools/bin/BSvsBPIX.cc new file mode 100644 index 0000000000000..593134596c1fa --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/BSvsBPIX.cc @@ -0,0 +1,54 @@ +#include "DPGAnalysis/SiStripTools/bin/BSvsBPIX.h" +#include "TFile.h" +#include "TH1F.h" +#include "TProfile.h" +#include "TGraphErrors.h" +#include "TCanvas.h" +#include "TDirectory.h" +#include + +void BSvsBPIXPlot(TFile* ff, const char* bsmodule, const char* occumodule, const int run) { + + TGraphErrors* bspos = new TGraphErrors(); + TGraphErrors* bpixpos = new TGraphErrors(); + + if(ff) { + + char bsfolder[200]; + sprintf(bsfolder,"%s/run_%d",bsmodule,run); + if(ff->cd(bsfolder)) { + TH1F* bsx = (TH1F*)gDirectory->Get("bsxrun"); + TH1F* bsy = (TH1F*)gDirectory->Get("bsyrun"); + if(bsx && bsy) { + std::cout << "beam spot position (" + << bsx->GetMean() << "+/-" << bsx->GetMeanError() << "," + << bsy->GetMean() << "+/-" << bsy->GetMeanError() << ")" << std::endl; + bspos->SetPoint(0,bsx->GetMean(),bsy->GetMean()); + bspos->SetPointError(0,bsx->GetMeanError(),bsy->GetMeanError()); + } + } + char occufolder[200]; + sprintf(occufolder,"%s/run_%d",occumodule,run); + if(ff->cd(occufolder)) { + TProfile* xmean = (TProfile*)gDirectory->Get("avex"); + TProfile* ymean = (TProfile*)gDirectory->Get("avey"); + if(xmean && ymean) { + for(int i=1;i<=xmean->GetNbinsX();++i) { + if(xmean->GetBinEntries(i) >0) { + std::cout << "ladder position " << i << " : (" + << xmean->GetBinContent(i) << "+/-" << xmean->GetBinError(i) << "," + << ymean->GetBinContent(i) << "+/-" << ymean->GetBinError(i) << ")" << std::endl; + int point = bpixpos->GetN(); + bpixpos->SetPoint(point,xmean->GetBinContent(i),ymean->GetBinContent(i)); + bpixpos->SetPointError(point,xmean->GetBinError(i),ymean->GetBinError(i)); + } + } + } + + } + } + new TCanvas("bsbpix","bsbpix",500,500); + bpixpos->Draw("ap"); + bspos->Draw("p"); + +} diff --git a/DPGAnalysis/SiStripTools/bin/BSvsBPIX.h b/DPGAnalysis/SiStripTools/bin/BSvsBPIX.h new file mode 100644 index 0000000000000..18ef0a7934822 --- /dev/null +++ b/DPGAnalysis/SiStripTools/bin/BSvsBPIX.h @@ -0,0 +1,8 @@ +#ifndef DPGAnalysis_SiStripTools_BSvsBPIX_h +#define DPGAnalysis_SiStripTools_BSvsBPIX_h + +class TFile; + +void BSvsBPIXPlot(TFile* ff, const char* bsmodule, const char* occumodule, const int run); + +#endif // DPGAnalysis_SiStripTools_BSvsBPIX_h diff --git a/DPGAnalysis/SiStripTools/bin/DPGAnalysisSiStripToolsMacrosLinkDef.h b/DPGAnalysis/SiStripTools/bin/DPGAnalysisSiStripToolsMacrosLinkDef.h index 3934ab069ee96..5148c37574c76 100644 --- a/DPGAnalysis/SiStripTools/bin/DPGAnalysisSiStripToolsMacrosLinkDef.h +++ b/DPGAnalysis/SiStripTools/bin/DPGAnalysisSiStripToolsMacrosLinkDef.h @@ -8,6 +8,7 @@ #include "TrackPlots.h" #include "SeedMultiplicityPlots.h" #include "OOTMultiplicityPlotMacros.h" +#include "BSvsBPIX.h" #ifdef __CINT__ #pragma link off all functions; #pragma link C++ function PlotOccupancyMap; @@ -46,4 +47,5 @@ #pragma link C++ function ComputeOOTFractionvsFill; #pragma link C++ class OOTResult; #pragma link C++ class OOTSummary; +#pragma link C++ function BSvsBPIX; #endif diff --git a/DPGAnalysis/SiStripTools/python/occupancyplotsselections_bpixladders_cff.py b/DPGAnalysis/SiStripTools/python/occupancyplotsselections_bpixladders_cff.py new file mode 100644 index 0000000000000..2046a3b82eb2f --- /dev/null +++ b/DPGAnalysis/SiStripTools/python/occupancyplotsselections_bpixladders_cff.py @@ -0,0 +1,100 @@ +import FWCore.ParameterSet.Config as cms + +OccupancyPlotsBPIXLadders = cms.VPSet ( + cms.PSet(detSelection=cms.uint32(101),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010100")), # BPix L1 + cms.PSet(detSelection=cms.uint32(102),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010200")), # BPix L1 + cms.PSet(detSelection=cms.uint32(103),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010300")), # BPix L1 + cms.PSet(detSelection=cms.uint32(104),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010400")), # BPix L1 + cms.PSet(detSelection=cms.uint32(105),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010500")), # BPix L1 + cms.PSet(detSelection=cms.uint32(106),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010600")), # BPix L1 + cms.PSet(detSelection=cms.uint32(107),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010700")), # BPix L1 + cms.PSet(detSelection=cms.uint32(108),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010800")), # BPix L1 + cms.PSet(detSelection=cms.uint32(109),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010900")), # BPix L1 + cms.PSet(detSelection=cms.uint32(110),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010a00")), # BPix L1 + cms.PSet(detSelection=cms.uint32(111),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010b00")), # BPix L1 + cms.PSet(detSelection=cms.uint32(112),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010c00")), # BPix L1 + cms.PSet(detSelection=cms.uint32(113),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010d00")), # BPix L1 + cms.PSet(detSelection=cms.uint32(114),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010e00")), # BPix L1 + cms.PSet(detSelection=cms.uint32(115),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12010f00")), # BPix L1 + cms.PSet(detSelection=cms.uint32(116),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12011000")), # BPix L1 + cms.PSet(detSelection=cms.uint32(117),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12011100")), # BPix L1 + cms.PSet(detSelection=cms.uint32(118),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12011200")), # BPix L1 + cms.PSet(detSelection=cms.uint32(119),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12011300")), # BPix L1 + cms.PSet(detSelection=cms.uint32(120),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12011400")), # BPix L1 + cms.PSet(detSelection=cms.uint32(201),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020100")), # BPix L2 + cms.PSet(detSelection=cms.uint32(202),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020200")), # BPix L2 + cms.PSet(detSelection=cms.uint32(203),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020300")), # BPix L2 + cms.PSet(detSelection=cms.uint32(204),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020400")), # BPix L2 + cms.PSet(detSelection=cms.uint32(205),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020500")), # BPix L2 + cms.PSet(detSelection=cms.uint32(206),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020600")), # BPix L2 + cms.PSet(detSelection=cms.uint32(207),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020700")), # BPix L2 + cms.PSet(detSelection=cms.uint32(208),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020800")), # BPix L2 + cms.PSet(detSelection=cms.uint32(209),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020900")), # BPix L2 + cms.PSet(detSelection=cms.uint32(210),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020a00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(211),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020b00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(212),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020c00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(213),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020d00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(214),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020e00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(215),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12020f00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(216),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021000")), # BPix L2 + cms.PSet(detSelection=cms.uint32(217),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021100")), # BPix L2 + cms.PSet(detSelection=cms.uint32(218),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021200")), # BPix L2 + cms.PSet(detSelection=cms.uint32(219),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021300")), # BPix L2 + cms.PSet(detSelection=cms.uint32(220),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021400")), # BPix L2 + cms.PSet(detSelection=cms.uint32(221),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021500")), # BPix L2 + cms.PSet(detSelection=cms.uint32(222),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021600")), # BPix L2 + cms.PSet(detSelection=cms.uint32(223),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021700")), # BPix L2 + cms.PSet(detSelection=cms.uint32(224),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021800")), # BPix L2 + cms.PSet(detSelection=cms.uint32(225),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021900")), # BPix L2 + cms.PSet(detSelection=cms.uint32(226),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021a00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(227),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021b00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(228),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021c00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(229),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021d00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(230),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021e00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(231),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12021f00")), # BPix L2 + cms.PSet(detSelection=cms.uint32(232),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12022000")), # BPix L2 + cms.PSet(detSelection=cms.uint32(301),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030100")), # BPix L3 + cms.PSet(detSelection=cms.uint32(302),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030200")), # BPix L3 + cms.PSet(detSelection=cms.uint32(303),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030300")), # BPix L3 + cms.PSet(detSelection=cms.uint32(304),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030400")), # BPix L3 + cms.PSet(detSelection=cms.uint32(305),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030500")), # BPix L3 + cms.PSet(detSelection=cms.uint32(306),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030600")), # BPix L3 + cms.PSet(detSelection=cms.uint32(307),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030700")), # BPix L3 + cms.PSet(detSelection=cms.uint32(308),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030800")), # BPix L3 + cms.PSet(detSelection=cms.uint32(309),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030900")), # BPix L3 + cms.PSet(detSelection=cms.uint32(310),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030a00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(311),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030b00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(312),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030c00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(313),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030d00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(314),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030e00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(315),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12030f00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(316),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031000")), # BPix L3 + cms.PSet(detSelection=cms.uint32(317),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031100")), # BPix L3 + cms.PSet(detSelection=cms.uint32(318),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031200")), # BPix L3 + cms.PSet(detSelection=cms.uint32(319),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031300")), # BPix L3 + cms.PSet(detSelection=cms.uint32(320),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031400")), # BPix L3 + cms.PSet(detSelection=cms.uint32(321),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031500")), # BPix L3 + cms.PSet(detSelection=cms.uint32(322),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031600")), # BPix L3 + cms.PSet(detSelection=cms.uint32(323),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031700")), # BPix L3 + cms.PSet(detSelection=cms.uint32(324),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031800")), # BPix L3 + cms.PSet(detSelection=cms.uint32(325),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031900")), # BPix L3 + cms.PSet(detSelection=cms.uint32(326),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031a00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(327),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031b00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(328),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031c00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(329),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031d00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(330),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031e00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(331),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12031f00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(332),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032000")), # BPix L3 + cms.PSet(detSelection=cms.uint32(333),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032100")), # BPix L3 + cms.PSet(detSelection=cms.uint32(334),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032200")), # BPix L3 + cms.PSet(detSelection=cms.uint32(335),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032300")), # BPix L3 + cms.PSet(detSelection=cms.uint32(336),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032400")), # BPix L3 + cms.PSet(detSelection=cms.uint32(337),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032500")), # BPix L3 + cms.PSet(detSelection=cms.uint32(338),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032600")), # BPix L3 + cms.PSet(detSelection=cms.uint32(339),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032700")), # BPix L3 + cms.PSet(detSelection=cms.uint32(340),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032800")), # BPix L3 + cms.PSet(detSelection=cms.uint32(341),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032900")), # BPix L3 + cms.PSet(detSelection=cms.uint32(342),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032a00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(343),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032b00")), # BPix L3 + cms.PSet(detSelection=cms.uint32(344),detLabel=cms.string("Dummy"),selection=cms.untracked.vstring("0x1e0fff00-0x12032c00")), # BPix L3 + ) diff --git a/DPGAnalysis/SiStripTools/test/bsvsbpix_cfg.py b/DPGAnalysis/SiStripTools/test/bsvsbpix_cfg.py new file mode 100644 index 0000000000000..414797ce9fbcb --- /dev/null +++ b/DPGAnalysis/SiStripTools/test/bsvsbpix_cfg.py @@ -0,0 +1,137 @@ +import FWCore.ParameterSet.Config as cms +import FWCore.ParameterSet.VarParsing as VarParsing + +process = cms.Process("bsvsbpix") + +#prepare options + +options = VarParsing.VarParsing("analysis") + +options.register ('globalTag', + "DONOTEXIST", + VarParsing.VarParsing.multiplicity.singleton, # singleton or list + VarParsing.VarParsing.varType.string, # string, int, or float + "GlobalTag") +#options.globalTag = "DONOTEXIST" + +options.parseArguments() + +# +process.options = cms.untracked.PSet( + wantSummary = cms.untracked.bool(True), + fileMode = cms.untracked.string("FULLMERGE") + ) + +process.load("FWCore.MessageService.MessageLogger_cfi") + +process.MessageLogger.cout.placeholder = cms.untracked.bool(False) +process.MessageLogger.cout.threshold = cms.untracked.string("INFO") +process.MessageLogger.cout.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cout.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(10000) + ) + +process.MessageLogger.cerr.placeholder = cms.untracked.bool(False) +process.MessageLogger.cerr.threshold = cms.untracked.string("WARNING") +process.MessageLogger.cerr.default = cms.untracked.PSet( + limit = cms.untracked.int32(10000000) + ) +process.MessageLogger.cerr.FwkReport = cms.untracked.PSet( + reportEvery = cms.untracked.int32(100000) + ) + +#----Remove too verbose PrimaryVertexProducer + +process.MessageLogger.suppressInfo.append("pixelVerticesAdaptive") +process.MessageLogger.suppressInfo.append("pixelVerticesAdaptiveNoBS") + +#----Remove too verbose BeamSpotOnlineProducer + +process.MessageLogger.suppressInfo.append("testBeamSpot") +process.MessageLogger.suppressInfo.append("onlineBeamSpot") +process.MessageLogger.suppressWarning.append("testBeamSpot") +process.MessageLogger.suppressWarning.append("onlineBeamSpot") + +#----Remove too verbose TrackRefitter + +process.MessageLogger.suppressInfo.append("newTracksFromV0") +process.MessageLogger.suppressInfo.append("newTracksFromOtobV0") + + +#------------------------------------------------------------------ + +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) + +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring(options.inputFiles), +# skipBadFiles = cms.untracked.bool(True), + inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*") + ) + +process.load("RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi") +process.onlineBeamSpotProducer.setSigmaZ = cms.double(-1.) + +from DPGAnalysis.SiStripTools.occupancyplotsselections_bpixladders_cff import * + +process.spclusoccuprod = cms.EDProducer("SiPixelClusterMultiplicityProducer", + clusterdigiCollection = cms.InputTag("siPixelClusters"), + withClusterSize = cms.untracked.bool(True), + wantedSubDets = cms.VPSet() + ) +process.spclusoccuprod.wantedSubDets.extend(OccupancyPlotsBPIXLadders) +process.spclusmultprod = process.spclusoccuprod.clone(withClusterSize = cms.untracked.bool(False)) + +process.load("DPGAnalysis.SiStripTools.occupancyplots_cfi") +process.occupancyplots.wantedSubDets = process.spclusmultprod.wantedSubDets +process.occupancyplots.multiplicityMaps = cms.VInputTag(cms.InputTag("spclusmultprod")) +process.occupancyplots.occupancyMaps = cms.VInputTag(cms.InputTag("spclusoccuprod")) + +process.load("Validation.RecoVertex.bspvanalyzer_cfi") +process.bspvanalyzer.pvCollection = cms.InputTag("goodVertices") +process.bspvanalyzer.bspvHistogramMakerPSet.histoParameters = cms.untracked.PSet( + nBinX = cms.untracked.uint32(2000), xMin=cms.untracked.double(-0.2), xMax=cms.untracked.double(0.2), + nBinY = cms.untracked.uint32(2000), yMin=cms.untracked.double(-0.2), yMax=cms.untracked.double(0.2), + nBinZ = cms.untracked.uint32(200), zMin=cms.untracked.double(-30.), zMax=cms.untracked.double(30.), + nBinZProfile = cms.untracked.uint32(60), zMinProfile=cms.untracked.double(-30.), zMaxProfile=cms.untracked.double(30.) + ) +#process.bspvanalyzer.bspvHistogramMakerPSet.runHisto = cms.untracked.bool(True) # This is true by default +process.bspvanalyzer.bspvHistogramMakerPSet.runHistoBX2D = cms.untracked.bool(True) + +process.bspvnoslope = process.bspvanalyzer.clone() +process.bspvnoslope.bspvHistogramMakerPSet.useSlope = cms.bool(False) + +process.load("Validation.RecoVertex.beamspotanalyzer_cfi") +process.onlinebeamspotanalyzer = process.beamspotanalyzer.clone(bsCollection = cms.InputTag("onlineBeamSpotProducer")) + + +process.load("Validation.RecoVertex.anotherprimaryvertexanalyzer_cfi") +process.primaryvertexanalyzer.vHistogramMakerPSet.runHistoBXProfile2D = cms.untracked.bool(True) +process.primaryvertexanalyzer.vHistogramMakerPSet.runHisto2D = cms.untracked.bool(True) + +process.load("Validation.RecoVertex.pvSelectionSequence_cff") + + +process.p0 = cms.Path(process.onlineBeamSpotProducer + + process.spclusoccuprod + process.spclusmultprod + + process.occupancyplots + + process.goodVertices + + process.beamspotanalyzer + process.onlinebeamspotanalyzer + + process.primaryvertexanalyzer + + process.bspvanalyzer + process.bspvnoslope) + +#----GlobalTag ------------------------ + +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") +from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '') + +process.load("Configuration.StandardSequences.GeometryDB_cff") + +process.SiStripDetInfoFileReader = cms.Service("SiStripDetInfoFileReader") + +process.TFileService = cms.Service('TFileService', + fileName = cms.string('bsvsbpix.root') + ) + diff --git a/DPGAnalysis/SiStripTools/test/crab_bsvsbpix.cfg b/DPGAnalysis/SiStripTools/test/crab_bsvsbpix.cfg new file mode 100644 index 0000000000000..029a134662498 --- /dev/null +++ b/DPGAnalysis/SiStripTools/test/crab_bsvsbpix.cfg @@ -0,0 +1,124 @@ +[CRAB] + +jobtype = cmssw +#scheduler = remoteGlidein +scheduler = caf +### NOTE: just setting the name of the server (pi, lnl etc etc ) +### crab will submit the jobs to the server... +#server_name = bari +# +[CMSSW] + +### The data you want to access (to be found on DBS) + +#dbs_url = http://cmsdbsprod.cern.ch/cms_dbs_ph_analysis_01/servlet/DBSServlet + +datasetpath=/ZeroBias1/Run2015A-PromptReco-v1/RECO + + +pycfg_params= globalTag=GR_P_V56 + + +pset=DPGAnalysis/SiStripTools/test/bsvsbpix_cfg.py + + +lumi_mask=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/certification/Collisions15/13TeV/DCSOnly/json_DCSONLY.txt +#runselection=247710 + +total_number_of_lumis =-1 +lumis_per_job = 10 + + +### The output files (comma separated list) +#output_file = + +[USER] + +### OUTPUT files Management +## output back into UI +return_data = 1 + +### To use a specific name of UI directory where CRAB will create job to submit (with full path). +### the default directory will be "crab_0_data_time" +ui_working_dir = /afs/cern.ch/work/v/venturia/crab/bsvsbpix_zerobias1_run2015A_DCSOnly_20150615_v2 + +### To specify the UI directory where to store the CMS executable output +### FULL path is mandatory. Default is /res will be used. +#outputdir= /full/path/yourOutDir + +### To specify the UI directory where to store the stderr, stdout and .BrokerInfo of submitted jobs +### FULL path is mandatory. Default is /res will be used. +#logdir= /full/path/yourLogDir + +### OUTPUT files INTO A SE +copy_data = 0 + +### if you want to copy data in a "official CMS site" +### you have to specify the name as written in +#storage_element = T2_IT_Bari +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = name_directory_you_want + +### if you want to copy your data at CAF +#storage_element = T2_CH_CAF +### the user_remote_dir will be created under the SE mountpoint +### in the case of publication this directory is not considered +#user_remote_dir = express_2010_132421 + +### if you want to copy your data to your area in castor at cern +### or in a "not official CMS site" you have to specify the complete name of SE +storage_element=srm-cms.cern.ch +### this directory is the mountpoin of SE +#storage_path=/srm/managerv2?SFN=/castor/cern.ch +storage_path=/castor/cern.ch +### directory or tree of directory under the mounpoint +#user_remote_dir = /user/v/venturia/skims/express_2010_132421_132422_3 + + +### To publish produced output in a local istance of DBS set publish_data = 1 +publish_data=0 +### Specify the dataset name. The full path will be //USER +publish_data_name = name_you_prefer +### Specify the URL of DBS istance where CRAB has to publish the output files +#dbs_url_for_publication = https://cmsdbsprod.cern.ch:8443/cms_dbs_caf_analysis_01_writer/servlet/DBSServlet + +### To specify additional files to be put in InputSandBox +### write the full path if the files are not in the current directory +### (wildcard * are allowed): comma separated list +#additional_input_files = file1, file2, /full/path/file3 + +#if server +#thresholdLevel = 100 +#eMail = your@Email.address + +[GRID] +# +## RB/WMS management: +rb = CERN + +## Black and White Lists management: +## By Storage +#se_black_list = T0,T1 +#se_black_list = T0 +#se_white_list = + +## By ComputingElement +#ce_black_list = +#ce_white_list = + +[CAF] +# +queue=cmscaf1nd + +[CONDORG] + +# Set this to condor to override the batchsystem defined in gridcat. +#batchsystem = condor + +# Specify addition condor_g requirments +# use this requirment to run on a cms dedicated hardare +# globus_rsl = (condor_submit=(requirements 'ClusterName == \"CMS\" && (Arch == \"INTEL\" || Arch == \"X86_64\")')) +# use this requirement to run on the new hardware +#globus_rsl = (condor_submit=(requirements 'regexp(\"cms-*\",Machine)')) + From ab89a6045ec2a7fee8558d287b178f7e6653c06a Mon Sep 17 00:00:00 2001 From: Andrea Venturi Date: Thu, 18 Jun 2015 19:18:16 +0200 Subject: [PATCH 4/8] Added distributions of the bx and orbit number offsets --- .../SiStripTools/plugins/L1ABCDebugger.cc | 72 ++++++++++++++++--- .../SiStripTools/src/EventWithHistory.cc | 6 +- .../test/apvphaseproducertest_cfg.py | 11 ++- .../test/crab_apvphaseproducertest.cfg | 23 ++++-- 4 files changed, 93 insertions(+), 19 deletions(-) diff --git a/DPGAnalysis/SiStripTools/plugins/L1ABCDebugger.cc b/DPGAnalysis/SiStripTools/plugins/L1ABCDebugger.cc index f2aeeeeb94d0d..ec8d956e7d02d 100644 --- a/DPGAnalysis/SiStripTools/plugins/L1ABCDebugger.cc +++ b/DPGAnalysis/SiStripTools/plugins/L1ABCDebugger.cc @@ -21,8 +21,10 @@ #include // user include files -#include "TH1F.h" +#include "TH2F.h" #include "TProfile.h" +#include "DPGAnalysis/SiStripTools/interface/RunHistogramManager.h" + #include #include @@ -49,14 +51,25 @@ class L1ABCDebugger : public edm::EDAnalyzer { ~L1ABCDebugger(); - private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; +private: + virtual void beginJob() override ; + virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + virtual void beginRun(const edm::Run&, const edm::EventSetup&) override; + virtual void endJob() override ; // ----------member data --------------------------- - edm::EDGetTokenT _l1abccollectionToken; + edm::EDGetTokenT m_l1abccollectionToken; + const unsigned int m_maxLS; + const unsigned int m_LSfrac; + + RunHistogramManager m_rhm; + + TH2F** m_hoffsets; + TProfile** m_horboffvsorb; + TProfile** m_hbxoffvsorb; + + }; // @@ -71,10 +84,17 @@ class L1ABCDebugger : public edm::EDAnalyzer { // constructors and destructor // L1ABCDebugger::L1ABCDebugger(const edm::ParameterSet& iConfig): - _l1abccollectionToken(consumes(iConfig.getParameter("l1ABCCollection"))) + m_l1abccollectionToken(consumes(iConfig.getParameter("l1ABCCollection"))), + m_maxLS(iConfig.getUntrackedParameter("maxLSBeforeRebin",250)), + m_LSfrac(iConfig.getUntrackedParameter("startingLSFraction",16)), + m_rhm(consumesCollector()) { //now do what ever initialization is needed + m_hoffsets = m_rhm.makeTH2F("offsets","Orbit vs BX offsets between SCAL and Event",2*3564+1,-3564.5,3564.5,201,-100.5,100.5); + m_horboffvsorb = m_rhm.makeTProfile("orboffvsorb","SCAL Orbit offset vs orbit number",m_LSfrac*m_maxLS,0,m_maxLS*262144); + m_hbxoffvsorb = m_rhm.makeTProfile("bxoffvsorb","SCAL BX offset vs orbit number",m_LSfrac*m_maxLS,0,m_maxLS*262144); + } @@ -98,11 +118,26 @@ L1ABCDebugger::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) using namespace edm; Handle pIn; - iEvent.getByToken(_l1abccollectionToken,pIn); + iEvent.getByToken(m_l1abccollectionToken,pIn); // offset computation + for(L1AcceptBunchCrossingCollection::const_iterator l1abc=pIn->begin();l1abc!=pIn->end();++l1abc) { + if(l1abc->l1AcceptOffset()==0) { + if(m_hoffsets && *m_hoffsets) + (*m_hoffsets)->Fill((int)l1abc->bunchCrossing()-(int)iEvent.bunchCrossing(), + (long long)l1abc->orbitNumber()-(long long)iEvent.orbitNumber()); + if(m_horboffvsorb && *m_horboffvsorb) + (*m_horboffvsorb)->Fill(iEvent.orbitNumber(),(long long)l1abc->orbitNumber()-(long long)iEvent.orbitNumber()); + if(m_hbxoffvsorb && *m_hbxoffvsorb) + (*m_hbxoffvsorb)->Fill(iEvent.orbitNumber(),(int)l1abc->bunchCrossing()-(int)iEvent.bunchCrossing()); + } + } + - edm::LogInfo("L1ABCDebug") << "Dump of L1AcceptBunchCrossing Collection"; + // dump of L1ABC collection + + edm::LogInfo("L1ABCDebug") << "Dump of L1AcceptBunchCrossing Collection for event in orbit " + << iEvent.orbitNumber() << " and BX " << iEvent.bunchCrossing(); for(L1AcceptBunchCrossingCollection::const_iterator l1abc=pIn->begin();l1abc!=pIn->end();++l1abc) { edm::LogVerbatim("L1ABCDebug") << *l1abc; @@ -110,6 +145,25 @@ L1ABCDebugger::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) } +void +L1ABCDebugger::beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { + + m_rhm.beginRun(iRun); + + if(m_hoffsets && *m_hoffsets) { + (*m_hoffsets)->GetXaxis()->SetTitle("#Delta BX (SCAL-Event)"); (*m_hoffsets)->GetYaxis()->SetTitle("#Delta orbit (SCAL-Event)"); + } + if(m_horboffvsorb && *m_horboffvsorb) { + (*m_horboffvsorb)->GetXaxis()->SetTitle("Orbit"); (*m_horboffvsorb)->GetYaxis()->SetTitle("#Delta orbit (SCAL-Event)"); + (*m_horboffvsorb)->SetCanExtend(TH1::kXaxis); + } + if(m_hbxoffvsorb && *m_hbxoffvsorb) { + (*m_hbxoffvsorb)->GetXaxis()->SetTitle("Orbit"); (*m_hbxoffvsorb)->GetYaxis()->SetTitle("#Delta BX (SCAL-Event)"); + (*m_hbxoffvsorb)->SetCanExtend(TH1::kXaxis); + } + + +} // ------------ method called once each job just before starting event loop ------------ void L1ABCDebugger::beginJob() diff --git a/DPGAnalysis/SiStripTools/src/EventWithHistory.cc b/DPGAnalysis/SiStripTools/src/EventWithHistory.cc index 66577edee891e..a23f7f606d95f 100755 --- a/DPGAnalysis/SiStripTools/src/EventWithHistory.cc +++ b/DPGAnalysis/SiStripTools/src/EventWithHistory.cc @@ -41,7 +41,11 @@ EventWithHistory::EventWithHistory(const edm::Event& event, const L1AcceptBunchC if(orbitoffset < (long long)l1abc->orbitNumber()) { unsigned int neworbit = l1abc->orbitNumber() - orbitoffset; int newbx = l1abc->bunchCrossing() - bxoffset; - + + /* + the lines below assumes that the BX number is between 0 and 3563. If this is not the case it will jump to 0 and to the next orbit in case of + evets with BX=3564 + */ while(newbx > 3563) { ++neworbit; newbx -= 3564; diff --git a/DPGAnalysis/SiStripTools/test/apvphaseproducertest_cfg.py b/DPGAnalysis/SiStripTools/test/apvphaseproducertest_cfg.py index 9e393c30e103f..034bdba3b0a5f 100644 --- a/DPGAnalysis/SiStripTools/test/apvphaseproducertest_cfg.py +++ b/DPGAnalysis/SiStripTools/test/apvphaseproducertest_cfg.py @@ -63,7 +63,7 @@ process.MessageLogger.suppressInfo.append("newTracksFromOtobV0") #process.MessageLogger.suppressWarning.append("consecutiveHEs") - +process.MessageLogger.suppressInfo.append("l1abcdebugger") #------------------------------------------------------------------ @@ -83,6 +83,8 @@ fileNames = cms.untracked.vstring('') process.load("DPGAnalysis.SiStripTools.eventwithhistoryproducerfroml1abc_cfi") +process.load("DPGAnalysis.SiStripTools.l1abcdebugger_cfi") +process.l1abcdebuanydcs = process.l1abcdebugger.clone() #process.load("DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1ts_cfi") @@ -90,7 +92,7 @@ process.APVPhases = DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1tsDB_cfi.APVPhases #import DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1ts2013_cfi #process.APVPhases = DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1ts2013_cfi.APVPhases -#process.APVPhases.defaultPhases = cms.vint32(33,33,33,33) +#process.APVPhases.defaultPhases = cms.vint32(57,57,57,57) #process.APVPhases.magicOffset = cms.untracked.int32(8) #import DPGAnalysis.SiStripTools.apvcyclephaseproducerfroml1ts2010_cfi @@ -206,6 +208,7 @@ process.load("DPGAnalysis.SiStripTools.eventtimedistribution_cfi") process.eventtimedistribution.wantEWHDepthHisto = cms.untracked.bool(True) process.eventtimedistribution.wantDBXvsBX = cms.untracked.bool(True) +process.eventtimedistribution.wantOrbitvsBXincycle = cms.untracked.bool(True) process.eventtimedistranydcs = process.eventtimedistribution.clone() process.eventtimedistrdeco = process.eventtimedistribution.clone() process.eventtimedistrpeak = process.eventtimedistribution.clone() @@ -345,6 +348,7 @@ + process.APVPhases + process.ssqDCShistory + process.eventtimedistranydcs + + process.l1abcdebuanydcs ) process.p0 = cms.Path(process.consecutiveHEs @@ -356,6 +360,7 @@ # + process.apvcyclephasemonitorEC02011 + process.apvcyclephasemonitorEC02010 # + process.apvcyclephasemonitor2011 + process.apvcyclephasemonitor2010 + process.eventtimedistribution + + process.l1abcdebugger # + process.evttimedistrwithnophase # + process.evttimedistrwithphaseEC02011 + process.evttimedistrwithphaseEC02011 # + process.evttimedistrwithphase2011 + process.evttimedistrwithphase2010 @@ -436,4 +441,4 @@ + process.ssclusmulttimecorrnonoisybinsdeco ) -process.schedule = cms.Schedule(process.p0) +process.schedule = cms.Schedule(process.panydcs,process.p0) diff --git a/DPGAnalysis/SiStripTools/test/crab_apvphaseproducertest.cfg b/DPGAnalysis/SiStripTools/test/crab_apvphaseproducertest.cfg index b66914457a034..a717a384e71d6 100644 --- a/DPGAnalysis/SiStripTools/test/crab_apvphaseproducertest.cfg +++ b/DPGAnalysis/SiStripTools/test/crab_apvphaseproducertest.cfg @@ -32,7 +32,10 @@ scheduler = caf #datasetpath=/Cosmics/Run2012A-PromptReco-v1/RECO #datasetpath=/Cosmics/Run2012B-PromptReco-v1/RECO -datasetpath=/MinimumBias/Commissioning2015-PromptReco-v1/RECO +datasetpath=/ExpressCosmics/Commissioning2015-Express-v1/FEVT +#datasetpath=/ExpressPhysics/Run2015A-Express-v1/FEVT +#datasetpath=/ExpressCosmics/Run2015A-Express-v1/FEVT +#datasetpath=/MinimumBias/Commissioning2015-PromptReco-v1/RECO #datasetpath=/ExpressCosmics/Commissioning12-Express-v1/FEVT #datasetpath=/ExpressCosmics/Run2012A-Express-v1/FEVT @@ -40,8 +43,8 @@ datasetpath=/MinimumBias/Commissioning2015-PromptReco-v1/RECO pset=DPGAnalysis/SiStripTools/test/apvphaseproducertest_cfg.py -pycfg_params= globalTag=GR_P_V54 -#pycfg_params= globalTag=GR_E_V27::All +#pycfg_params= globalTag=GR_P_V54 +pycfg_params= globalTag=GR_E_V48 #total_number_of_events=5000 #events_per_job = 5000 @@ -50,12 +53,15 @@ pycfg_params= globalTag=GR_P_V54 #runselection= 193516,193515,193514,193508,193507,193504,193500,193498,193497,193496,193495,193494,193493,193491,193490,193489,193488,193478,193477,193476,193468,193406,193355,193350,193347,193343,193339,193224,193210 #runselection=191545,191651,191742,191937,192831,192879,193098,193516,193546,193627,193665 -runselection=243664,245194,245195,245200,245204 +#runselection=243664 +#runselection=245194,245195,245200,245204 +runselection=246426,246483,246484 +#runselection=246908-247081 #lumi_mask=/afs/cern.ch/work/v/venturia/Cert_187446-195080_PromptReco_Cosmics12_JSON.txt #lumi_mask=/afs/cern.ch/work/v/venturia/Cert_187446-194396_PromptReco_Cosmics12_DCSonly_JSON.txt total_number_of_lumis =-1 -lumis_per_job = 50 +lumis_per_job = 100 ### The output files (comma separated list) @@ -116,7 +122,12 @@ return_data = 1 #ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_Run2012B_prompt_cosmics_v1_197298_v24 #ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_Run2012B_prompt_commissioning_v1_197298_v24 -ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_unstable_243664_245194-245204_noCERN_v31 +#ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_unstable_243664_offset69_mo8_v31 +#ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_unstable_245194-245204_offset57_mo8_v31 +ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_Commissioning15_expresscosmics_246426-246483-246484_v34 +#ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_Commissioning15_expresscosmics_246970_v32 +#ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_Run2015A_express_246908-247081_v32 +#ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_Run2015A_expresscosmics_246908-247081_v33 #ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_Commissioning12_prompt_cosmics_v1_187446-194396_DCSonly_v24 #ui_working_dir = /afs/cern.ch/work/v/venturia/crab/apvphaseproducertest_Run2012A_prompt_cosmics_v1_187446-194396_DCSonly_v24 From 409418592607aef3c9ddb80e87f630295a00e9a5 Mon Sep 17 00:00:00 2001 From: Andrea Venturi Date: Thu, 18 Jun 2015 19:20:01 +0200 Subject: [PATCH 5/8] Updated configurations --- ...ripConfObjectAPVPhaseOffsetsFakeESSource_cfi.py | 4 ++-- ...BWriter_SiStripConfObjectAPVPhaseOffsets_cfg.py | 4 ++-- .../RecoVertex/test/crab_allanalyzer_example.cfg | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/DPGAnalysis/SiStripTools/python/SiStripConfObjectAPVPhaseOffsetsFakeESSource_cfi.py b/DPGAnalysis/SiStripTools/python/SiStripConfObjectAPVPhaseOffsetsFakeESSource_cfi.py index dc27ab43795d3..0e41de3053954 100644 --- a/DPGAnalysis/SiStripTools/python/SiStripConfObjectAPVPhaseOffsetsFakeESSource_cfi.py +++ b/DPGAnalysis/SiStripTools/python/SiStripConfObjectAPVPhaseOffsetsFakeESSource_cfi.py @@ -11,7 +11,7 @@ cms.PSet( ParameterName = cms.string("defaultPhases"), ParameterType = cms.string("vint32"), - ParameterValue = cms.vint32(63,63,63,63), + ParameterValue = cms.vint32(66,66,66,66), ), cms.PSet( ParameterName = cms.string("useEC0"), @@ -26,7 +26,7 @@ cms.PSet( ParameterName = cms.string("magicOffset"), ParameterType = cms.string("int"), - ParameterValue = cms.int32(8), + ParameterValue = cms.int32(9), ), ) diff --git a/DPGAnalysis/SiStripTools/test/CondDBWriter_SiStripConfObjectAPVPhaseOffsets_cfg.py b/DPGAnalysis/SiStripTools/test/CondDBWriter_SiStripConfObjectAPVPhaseOffsets_cfg.py index a0da26b992338..15956ca6f4e76 100644 --- a/DPGAnalysis/SiStripTools/test/CondDBWriter_SiStripConfObjectAPVPhaseOffsets_cfg.py +++ b/DPGAnalysis/SiStripTools/test/CondDBWriter_SiStripConfObjectAPVPhaseOffsets_cfg.py @@ -33,7 +33,7 @@ authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb') ), timetype = cms.untracked.string('runnumber'), - connect = cms.string('sqlite_file:apvphaseoffsets_forHLT.db'), + connect = cms.string('sqlite_file:apvphaseoffsets_forHLT_66_9.db'), toPut = cms.VPSet(cms.PSet( record = cms.string('SiStripConfObjectRcd'), tag = cms.string('SiStripAPVPhaseOffsets_real_v1') @@ -45,6 +45,6 @@ # This specifies the IOV, not the EmptySource (to see why look at the DummyDBWriter code) process.siStripConfObjectDummyDBWriter.OpenIovAt = "" -process.siStripConfObjectDummyDBWriter.OpenIovAtTime = 237426 +process.siStripConfObjectDummyDBWriter.OpenIovAtTime = 246940 process.p1 = cms.Path(process.siStripConfObjectDummyDBWriter) diff --git a/Validation/RecoVertex/test/crab_allanalyzer_example.cfg b/Validation/RecoVertex/test/crab_allanalyzer_example.cfg index 4dd313b46a2d9..6acbcf76baae0 100644 --- a/Validation/RecoVertex/test/crab_allanalyzer_example.cfg +++ b/Validation/RecoVertex/test/crab_allanalyzer_example.cfg @@ -1,8 +1,8 @@ [CRAB] jobtype = cmssw -scheduler = remoteGlidein -#scheduler = caf +#scheduler = remoteGlidein +scheduler = caf ### NOTE: just setting the name of the server (pi, lnl etc etc ) ### crab will submit the jobs to the server... #server_name = bari @@ -13,20 +13,20 @@ scheduler = remoteGlidein #dbs_url = http://cmsdbsprod.cern.ch/cms_dbs_ph_analysis_01/servlet/DBSServlet -datasetpath=/MinimumBias/CMSSW_7_1_0_pre1-GR_R_62_V3_RelVal_mb2010B-v1/RECO +datasetpath=/ZeroBias1/Run2015A-PromptReco-v1/RECO -pycfg_params= globalTag=GR_R_62_V3::All +pycfg_params= globalTag=GR_P_V56 pset=Validation/RecoVertex/test/allanalyzer_example_cfg.py #lumi_mask=express_2011_ge1615_DECOonly_v10.JSON -#runselection=161311 +runselection=246930,246951,247068,247323 total_number_of_lumis =-1 -lumis_per_job = 50 +lumis_per_job = 200 ### The output files (comma separated list) @@ -40,7 +40,7 @@ return_data = 1 ### To use a specific name of UI directory where CRAB will create job to submit (with full path). ### the default directory will be "crab_0_data_time" -ui_working_dir = /afs/cern.ch/work/v/venturia/crab/allanalyzer_minimumbias_run2011B_710_pre1_v1 +ui_working_dir = /afs/cern.ch/work/v/venturia/crab/allanalyzer_zerobiasa_run2015A_246930-247323_v1 ### To specify the UI directory where to store the CMS executable output ### FULL path is mandatory. Default is /res will be used. From 8d026d0df753472628afb98d78935dbb8effb2da Mon Sep 17 00:00:00 2001 From: venturia Date: Fri, 19 Jun 2015 11:28:11 +0200 Subject: [PATCH 6/8] Added the description of some plugins --- Validation/RecoVertex/README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Validation/RecoVertex/README.md b/Validation/RecoVertex/README.md index db747b0b695f0..b2359bb237e78 100644 --- a/Validation/RecoVertex/README.md +++ b/Validation/RecoVertex/README.md @@ -8,7 +8,7 @@ to give you pre-cooked python configuration files, but to teach you how you could use the most common tool available in CMS to perform the same. We will mainly use cmsDriver and its powerful option to create the python cfg that we will run, and das_client to explore and find -suitable samples to run upon. Let start with order. +suitable samples to run upon. At the end of this page there is the description of other standalone analyzers, configurations and Root macros. Let start with order. PREREQUISITES ============= @@ -145,3 +145,20 @@ for the default used in the harvesting step. Enjoy. +DETAILED DESCRIPTION OF THE CODE +================================ +## Plugins +### AnotherPrimaryVertexAnalyzer +It produces several histograms using a vertex collection as input: the vertex x, y and z positions, the number of vertices (vs the instantaneous luminosity), the number of tracks per vertex and the sum of the squared pt of the tracks from a vertex (with or without a cut on the track weight), the number of degrees of freedom (also as a function of the number of tracks), the track weights and the average weight and the average values of many of the observables above as a function of the vertex z position. +Distributions are produced also per run or per fill: the number of vertices and their position as a function of the orbit number and of the BX number. By configuration it is possible to choose among TProfile or full 2D plots. +All these histograms can be filled with a weight to be provided by an object defined in the configuration. +An example of configuration can be found in `python/anotherprimaryvertexanalyzer_cfi.py`. + +### AnotherBeamSpotAnalyzer +`AnotherBeamSpotAnalyzer` is the plugin name which corresponds to the code in `src/BeamSpotAnalyzer.cc`. It produces several histograms to monitor the beam spot position; the name of a beamspot collection has to be provided as input. The histograms are the beam spot position and width and their dependence as a function of the orbit number (one set of histograms per run). +An example of configuration can be found in `python/beamspotanalyzer_cfi.py`. + +### BSvsPVAnalyzer +It produces distributions related to the relative position between vertices and the beam spot. It requires a vertex collection and a beam spot collection as input. By configuration it is possible to control whether the comparison has to take into account the tilt of the beamspot. The distributions are the differences of the vertex and beam spot position coordinates, the average of these differences as a function of the vertex z position and, for each run, the dependence of these differences as a function of the orbit number and of the BX number. Configuration parameters have to be used to activate or de-activate those histograms which are more memory demanding. +An example of configuration can be found in `python/bspvanalyzer_cfi.py`. + From 4edfdb4307da48aa1fadb050293d5fbf6c1cd138 Mon Sep 17 00:00:00 2001 From: venturia Date: Fri, 19 Jun 2015 12:09:36 +0200 Subject: [PATCH 7/8] Added the description of some plugins to analyze MC vertices --- Validation/RecoVertex/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Validation/RecoVertex/README.md b/Validation/RecoVertex/README.md index b2359bb237e78..378be46d41ece 100644 --- a/Validation/RecoVertex/README.md +++ b/Validation/RecoVertex/README.md @@ -162,3 +162,16 @@ An example of configuration can be found in `python/beamspotanalyzer_cfi.py`. It produces distributions related to the relative position between vertices and the beam spot. It requires a vertex collection and a beam spot collection as input. By configuration it is possible to control whether the comparison has to take into account the tilt of the beamspot. The distributions are the differences of the vertex and beam spot position coordinates, the average of these differences as a function of the vertex z position and, for each run, the dependence of these differences as a function of the orbit number and of the BX number. Configuration parameters have to be used to activate or de-activate those histograms which are more memory demanding. An example of configuration can be found in `python/bspvanalyzer_cfi.py`. +### MCVerticesAnalyzer +It produces distributions related to the multiplicity of (in-time and out-of-time) pileup vertices (or interactions), to the position of the main MC vertex and to the z position of the pileup vertices. It correlates the average number of pileup interactions with the actual number of pileup interactions. It can be configured to use weights. +An example of configuration can be found in `python/mcverticesanalyzer_cfi.py`. + +### MCVerticesWeight +It is an `EDFilter` which computes an event weight based on the MC vertices z position to reproduce a different luminous region length. It can be configured to reject events or the weight can be used to fill the histograms of `MCVerticesAnalyzer`. +An example of configuration can be found in `python/mcverticesweight_cfi.py` + +###MCvsRecoVerticesAnalyzer +It produces histograms to correlate the number of reconstructted vertices with the number of generated vertices or with the average pileup, to correlate the z position of the reconstructed vertices with that of the MC vertices and to check how many times the closest reco vertex to the main MC vertex is the first one in the vertex collection. It can be configured to fill histograms with weights to be provided with `MCVerticesWeight`. +An example of configuration can be found in `python/mcvsrecoverticesanalyzer_cfi.py` + +## Configurations From 5333b546e74fe6bdd38a4100bf7250f36b2edc53 Mon Sep 17 00:00:00 2001 From: venturia Date: Fri, 19 Jun 2015 12:41:56 +0200 Subject: [PATCH 8/8] Added the description of some configurations --- Validation/RecoVertex/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Validation/RecoVertex/README.md b/Validation/RecoVertex/README.md index 378be46d41ece..2735958e97a06 100644 --- a/Validation/RecoVertex/README.md +++ b/Validation/RecoVertex/README.md @@ -175,3 +175,8 @@ It produces histograms to correlate the number of reconstructted vertices with t An example of configuration can be found in `python/mcvsrecoverticesanalyzer_cfi.py` ## Configurations +* `test/allanalyzer_example_cfg.py` is a configuration which uses the `AnotherPrimaryVertexAnalyzer`, `AnotherBeamSpotAnalyzer` and `BSvsPVAnalyzer` and that can be used to analyze real data events. It uses VarParsing to pass the input parameters like the input files and the global tag. +* `test/mcverticesanalyzer_cfg.py` an example of configuration which uses the plugins to study the MC vertices +* `test/mcverticessimpleanalyzer_cfg.py` an example of configuration which uses the plugins to study the MC vertices +* `test/mcverticestriggerbiasanalyzer_cfg.py` an example of configuration which uses the plugins to study the MC vertices. +