Skip to content

Commit

Permalink
code cleanups;adding fill descriptions;customize for premix wf
Browse files Browse the repository at this point in the history
  • Loading branch information
sroychow committed Oct 9, 2020
1 parent 14b04a8 commit 182d4ed
Show file tree
Hide file tree
Showing 10 changed files with 316 additions and 263 deletions.
153 changes: 153 additions & 0 deletions DQM/SiTrackerPhase2/plugins/Phase2ITMonitorRecHit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
#include "DQM/SiTrackerPhase2/interface/TrackerPhase2DQMUtil.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Framework/interface/ESWatcher.h"
#include <FWCore/ParameterSet/interface/ConfigurationDescriptions.h>
#include <FWCore/ParameterSet/interface/ParameterSetDescription.h>
#include <FWCore/ParameterSet/interface/ConfigurationDescriptions.h>
#include <FWCore/ParameterSet/interface/ParameterSetDescription.h>
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
#include "Geometry/CommonDetUnit/interface/GeomDet.h"
Expand Down Expand Up @@ -233,5 +237,154 @@ void Phase2ITMonitorRecHit::bookLayerHistos(DQMStore::IBooker& ibooker, unsigned
layerMEs_.insert(std::make_pair(key, local_histos));
}
}

void Phase2ITMonitorRecHit::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
// rechitMonitorIT
edm::ParameterSetDescription desc;
desc.add<std::string>("TopFolderName", "TrackerPhase2ITRecHit");
desc.add<edm::InputTag>("rechitsSrc", edm::InputTag("siPixelRecHits"));
{
edm::ParameterSetDescription psd0;
psd0.add<double>("xmin", 0.0);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 0.0);
psd0.add<int>("NxBins", 50);
desc.add<edm::ParameterSetDescription>("LocalNumberRecHits", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("ymax", 300.0);
psd0.add<int>("NxBins", 1500);
psd0.add<int>("NyBins", 300);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 3000.0);
psd0.add<double>("xmin", -3000.0);
psd0.add<double>("ymin", 0.0);
desc.add<edm::ParameterSetDescription>("GlobalPositionRZ_perlayer", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("ymax", 300.0);
psd0.add<int>("NxBins", 1500);
psd0.add<int>("NyBins", 300);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 3000.0);
psd0.add<double>("xmin", -3000.0);
psd0.add<double>("ymin", 0.0);
desc.add<edm::ParameterSetDescription>("GlobalPositionRZ_PXB", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("ymax", 300.0);
psd0.add<int>("NxBins", 600);
psd0.add<int>("NyBins", 600);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 300.0);
psd0.add<double>("xmin", -300.0);
psd0.add<double>("ymin", -300.0);
desc.add<edm::ParameterSetDescription>("GlobalPositionXY_PXB", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("ymax", 300.0);
psd0.add<int>("NxBins", 1500);
psd0.add<int>("NyBins", 300);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 3000.0);
psd0.add<double>("xmin", -3000.0);
psd0.add<double>("ymin", 0.0);
desc.add<edm::ParameterSetDescription>("GlobalPositionRZ_PXEC", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("xmin", 0.0);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 0.2);
psd0.add<int>("NxBins", 100);
desc.add<edm::ParameterSetDescription>("RecHitPosErrorX", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("ymax", 300.0);
psd0.add<int>("NxBins", 600);
psd0.add<int>("NyBins", 600);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 300.0);
psd0.add<double>("xmin", -300.0);
psd0.add<double>("ymin", -300.0);
desc.add<edm::ParameterSetDescription>("GlobalPositionXY_perlayer", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("xmin", 0.0);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 0.0);
psd0.add<int>("NxBins", 50);
desc.add<edm::ParameterSetDescription>("GlobalNumberRecHits", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("xmin", -0.5);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 20.5);
psd0.add<int>("NxBins", 21);
desc.add<edm::ParameterSetDescription>("LocalClusterSizeX", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("xmin", -2.5);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 2.5);
psd0.add<int>("NxBins", 100);
desc.add<edm::ParameterSetDescription>("RecHitPosY", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("xmin", 0.0);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 0.2);
psd0.add<int>("NxBins", 100);
desc.add<edm::ParameterSetDescription>("RecHitPosErrorY", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("ymax", 0.0);
psd0.add<int>("NxBins", 500);
psd0.add<int>("NyBins", 500);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 0.0);
psd0.add<double>("xmin", 0.0);
psd0.add<double>("ymin", 0.0);
desc.add<edm::ParameterSetDescription>("LocalPositionXY", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("ymax", 300.0);
psd0.add<int>("NxBins", 600);
psd0.add<int>("NyBins", 600);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 300.0);
psd0.add<double>("xmin", -300.0);
psd0.add<double>("ymin", -300.0);
desc.add<edm::ParameterSetDescription>("GlobalPositionXY_PXEC", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("xmin", -0.5);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 20.5);
psd0.add<int>("NxBins", 21);
desc.add<edm::ParameterSetDescription>("LocalClusterSizeY", psd0);
}
{
edm::ParameterSetDescription psd0;
psd0.add<double>("xmin", -2.5);
psd0.add<bool>("switch", true);
psd0.add<double>("xmax", 2.5);
psd0.add<int>("NxBins", 100);
desc.add<edm::ParameterSetDescription>("RecHitPosX", psd0);
}
descriptions.add("Phase2ITMonitorRecHit", desc);
}
//define this as a plug-in
DEFINE_FWK_MODULE(Phase2ITMonitorRecHit);
3 changes: 2 additions & 1 deletion DQM/SiTrackerPhase2/plugins/Phase2ITMonitorRecHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class Phase2ITMonitorRecHit : public DQMEDAnalyzer {
~Phase2ITMonitorRecHit() override;
void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override;
void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
void dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup);
void dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) override;
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
void fillITHistos(const edm::Event& iEvent);
Expand Down
5 changes: 5 additions & 0 deletions DQM/SiTrackerPhase2/python/Phase2ITMonitorRecHit_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
from DQM.SiTrackerPhase2.Phase2ITMonitorRecHit_cfi import Phase2ITMonitorRecHit

rechitMonitorIT = Phase2ITMonitorRecHit.clone()
120 changes: 0 additions & 120 deletions DQM/SiTrackerPhase2/python/Phase2ITMonitorRecHit_cfi.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FWCore.ParameterSet.Config as cms
from DQM.SiTrackerPhase2.Phase2TrackerMonitorDigi_cff import *
from DQM.SiTrackerPhase2.Phase2ITMonitorRecHit_cfi import *
from DQM.SiTrackerPhase2.Phase2ITMonitorRecHit_cff import *

trackerphase2DQMSource = cms.Sequence( pixDigiMon
+ otDigiMon
Expand Down
Loading

0 comments on commit 182d4ed

Please sign in to comment.