Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sistrip Trend Plots (vs LS) #20201

Merged
merged 1 commit into from
Sep 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
StripDCSfilter = cms.PSet(),

CreateTrendMEs = cms.bool(False),
TrendVsLS = cms.bool(False),
TrendVsLS = cms.bool(True),

Trending = cms.PSet(
Nbins = cms.int32(600),
Expand Down
1 change: 1 addition & 0 deletions DQM/SiStripMonitorDigi/interface/SiStripMonitorDigi.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ class SiStripMonitorDigi : public DQMEDAnalyzer {
bool shotschargehistomapon;

bool createTrendMEs;
bool m_trendVsLS;

edm::InputTag historyProducer_;
edm::InputTag apvPhaseProducer_;
Expand Down
1 change: 1 addition & 0 deletions DQM/SiStripMonitorDigi/python/SiStripMonitorDigi_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
TkHistoMapMedianChargeApvShots_On = cms.bool(False),

CreateTrendMEs = cms.bool(False),
TrendVsLS = cms.bool(True),

Trending = cms.PSet(
Nbins = cms.int32(600),
Expand Down
26 changes: 14 additions & 12 deletions DQM/SiStripMonitorDigi/src/SiStripMonitorDigi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

/* mia: but is there not a smarter way ?!?!?! */
const double NORBITS_PER_SECOND = 11223.;
const double NORBITS_PER_LS = 262144.;

//--------------------------------------------------------------------------------------------
SiStripMonitorDigi::SiStripMonitorDigi(const edm::ParameterSet& iConfig) :
Expand Down Expand Up @@ -160,6 +161,7 @@ SiStripMonitorDigi::SiStripMonitorDigi(const edm::ParameterSet& iConfig) :
shotschargehistomapon = conf_.getParameter<bool>("TkHistoMapMedianChargeApvShots_On");

createTrendMEs = conf_.getParameter<bool>("CreateTrendMEs");
m_trendVsLS = conf_.getParameter<bool>("TrendVsLS");
Mod_On_ = conf_.getParameter<bool>("Mod_On");
// xLumiProf = conf_.getParameter<int>("xLumiProf");
// Event History Producer
Expand Down Expand Up @@ -566,8 +568,8 @@ void SiStripMonitorDigi::analyze(const edm::Event& iEvent, const edm::EventSetup
runNb = iEvent.id().run();
eventNb++;

float iOrbitSec = iEvent.orbitNumber()/NORBITS_PER_SECOND;

float iOrbitVar = m_trendVsLS ? iEvent.orbitNumber()/NORBITS_PER_LS : iEvent.orbitNumber()/NORBITS_PER_SECOND ;
digi_detset_handles.clear();

std::vector<edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > >::const_iterator iToken = digiProducerTokenList.begin();
Expand Down Expand Up @@ -680,7 +682,7 @@ void SiStripMonitorDigi::analyze(const edm::Event& iEvent, const edm::EventSetup
//Fill #ADCs for this digi at layer level
if(layerswitchdigiadcson) {
fillME(local_layermes.LayerDigiADCs , this_adc);
if (createTrendMEs) fillTrend(local_layermes.LayerDigiADCsTrend, this_adc, iOrbitSec);
if (createTrendMEs) fillTrend(local_layermes.LayerDigiADCsTrend, this_adc, iOrbitVar);
}

if (layerswitchdigiadcprofon)
Expand All @@ -696,7 +698,7 @@ void SiStripMonitorDigi::analyze(const edm::Event& iEvent, const edm::EventSetup
(local_modmes.StripOccupancy)->Fill(det_occupancy);
if (layerswitchstripoccupancyon) {
fillME(local_layermes.LayerStripOccupancy, det_occupancy);
if (createTrendMEs) fillTrend(local_layermes.LayerStripOccupancyTrend, det_occupancy, iOrbitSec);
if (createTrendMEs) fillTrend(local_layermes.LayerStripOccupancyTrend, det_occupancy, iOrbitVar);
}
}

Expand All @@ -715,15 +717,15 @@ void SiStripMonitorDigi::analyze(const edm::Event& iEvent, const edm::EventSetup

if(layerswitchnumdigison) {
fillME(local_layermes.LayerNumberOfDigis,ndigi_layer);
if (createTrendMEs) fillTrend(local_layermes.LayerNumberOfDigisTrend, ndigi_layer, iOrbitSec);
if (createTrendMEs) fillTrend(local_layermes.LayerNumberOfDigisTrend, ndigi_layer, iOrbitVar);
}
if(layerswitchadchotteston) {
fillME(local_layermes.LayerADCsHottestStrip,largest_adc_layer);
if (createTrendMEs) fillTrend(local_layermes.LayerADCsHottestStripTrend, largest_adc_layer, iOrbitSec);
if (createTrendMEs) fillTrend(local_layermes.LayerADCsHottestStripTrend, largest_adc_layer, iOrbitVar);
}
if(layerswitchadccooleston) {
fillME(local_layermes.LayerADCsCoolestStrip ,smallest_adc_layer);
if (createTrendMEs) fillTrend(local_layermes.LayerADCsCoolestStripTrend, smallest_adc_layer, iOrbitSec);
if (createTrendMEs) fillTrend(local_layermes.LayerADCsCoolestStripTrend, smallest_adc_layer, iOrbitVar);
}

std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(subdet_label);
Expand Down Expand Up @@ -797,7 +799,7 @@ void SiStripMonitorDigi::analyze(const edm::Event& iEvent, const edm::EventSetup
TotalNShots+=ShotsSize; //Counter for total Shots in the SiStrip Tracker

if (subdetswitchnapvshotson ) subdetmes.SubDetNApvShotsTH1->Fill(ShotsSize);// N shots
if (subdetswitchapvshotsonprof) subdetmes.SubDetNApvShotsProf ->Fill(iOrbitSec,ShotsSize); //N shots vs time
if (subdetswitchapvshotsonprof) subdetmes.SubDetNApvShotsProf ->Fill(iOrbitVar,ShotsSize); //N shots vs time

for (uint i=0; i< ShotsSize; ++i){ // Strip multiplicity, charge median and APV number distributions for APV shots

Expand All @@ -812,11 +814,11 @@ void SiStripMonitorDigi::analyze(const edm::Event& iEvent, const edm::EventSetup

}

if (subdetswitchtotdigiprofon)subdetmes.SubDetTotDigiProf->Fill(iOrbitSec,subdetmes.totNDigis);
if (subdetswitchtotdigiprofon)subdetmes.SubDetTotDigiProf->Fill(iOrbitVar,subdetmes.totNDigis);
}

if (globalswitchnapvshotson) NApvShotsGlobal->Fill(TotalNShots);
if (globalswitchapvshotsonprof) ShotsVsTimeApvShotsGlobal->Fill(iOrbitSec,TotalNShots);
if (globalswitchapvshotsonprof) ShotsVsTimeApvShotsGlobal->Fill(iOrbitVar,TotalNShots);

// get EventHistory

Expand Down Expand Up @@ -886,7 +888,7 @@ MonitorElement* SiStripMonitorDigi::bookMETrend(DQMStore::IBooker & ibooker , co
"" );
if(!me) return me;

me->setAxisTitle("Event Time in Seconds",1);
me->setAxisTitle("Lumisection",1);
if (me->kind() == MonitorElement::DQM_KIND_TPROFILE) me->getTH1()->SetCanExtend(TH1::kAllAxes);
return me;
}
Expand Down Expand Up @@ -1070,7 +1072,7 @@ void SiStripMonitorDigi::createSubDetMEs(DQMStore::IBooker & ibooker , std::stri
Parameters.getParameter<double>("ymin"),
Parameters.getParameter<double>("ymax"),
"" );
subdetMEs.SubDetTotDigiProf->setAxisTitle("Event Time in Seconds",1);
subdetMEs.SubDetTotDigiProf->setAxisTitle("Lumisection",1);
if (subdetMEs.SubDetTotDigiProf->kind() == MonitorElement::DQM_KIND_TPROFILE) subdetMEs.SubDetTotDigiProf->getTH1()->SetCanExtend(TH1::kAllAxes);
}

Expand Down