Skip to content

Commit

Permalink
Merge pull request #34829 from bsunanda/Run3-alca196
Browse files Browse the repository at this point in the history
Run3-alca196 Collapse .h and .cc files in DQMOffline/CalibCalo and reorganize the files
  • Loading branch information
cmsbuild authored Aug 13, 2021
2 parents 4a6209c + 2e6eceb commit b39668b
Show file tree
Hide file tree
Showing 20 changed files with 813 additions and 1,040 deletions.
24 changes: 0 additions & 24 deletions DQMOffline/CalibCalo/BuildFile.xml

This file was deleted.

62 changes: 0 additions & 62 deletions DQMOffline/CalibCalo/interface/DQMHcalIterativePhiSymAlCaReco.h

This file was deleted.

81 changes: 0 additions & 81 deletions DQMOffline/CalibCalo/interface/DQMSourceEleCalib.h

This file was deleted.

22 changes: 21 additions & 1 deletion DQMOffline/CalibCalo/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
<use name="DQMServices/Core"/>
<use name="Geometry/Records"/>
<use name="Geometry/CaloGeometry"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/DetId"/>
<use name="DataFormats/EcalDetId"/>
<use name="DataFormats/EcalRecHit"/>
<use name="DataFormats/EgammaReco"/>
<use name="DataFormats/HLTReco"/>
<use name="DataFormats/JetReco"/>
<use name="DataFormats/HcalIsolatedTrack"/>
<use name="DataFormats/Math"/>
<use name="DataFormats/RecoCandidate"/>
<use name="DataFormats/FEDRawData"/>
<use name="FWCore/Framework"/>
<use name="FWCore/MessageLogger"/>
<use name="FWCore/ParameterSet"/>
<use name="Geometry/CaloTopology"/>
<use name="EventFilter/HcalRawToDigi"/>
<use name="RecoEcal/EgammaCoreTools"/>
<use name="rootphysics"/>
<library file="*.cc" name="DQMOfflineCalibCaloPlugins">
<use name="DQMOffline/CalibCalo"/>
<flags EDM_PLUGIN="1"/>
</library>
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,67 @@
//

// system include files
#include <memory>
#include <string>

// user include files
#include "DataFormats/HcalCalibObjects/interface/HOCalibVariables.h"

#include "FWCore/Framework/interface/EDAnalyzer.h"

#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DQMOffline/CalibCalo/src/DQMHOAlCaRecoStream.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/ServiceRegistry/interface/Service.h"

#include <string>

//
// class decleration
//
using namespace std;
using namespace edm;

//
// constants, enums and typedefs
//
class DQMHOAlCaRecoStream : public DQMEDAnalyzer {
public:
explicit DQMHOAlCaRecoStream(const edm::ParameterSet &);
~DQMHOAlCaRecoStream() override;

//
// static data member definitions
//
private:
void analyze(const edm::Event &, const edm::EventSetup &) override;
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

// ----------member data ---------------------------

MonitorElement *hMuonMultipl;
MonitorElement *hMuonMom;
MonitorElement *hMuonEta;
MonitorElement *hMuonPhi;

MonitorElement *hDirCosine;
MonitorElement *hHOTime;

MonitorElement *hSigRing[5];
MonitorElement *hPedRing[5];
MonitorElement *hSignal3x3[9];

int Nevents;
int Nmuons;

std::string theRootFileName;
std::string folderName_;
double m_sigmaValue;

double m_lowRadPosInMuch;
double m_highRadPosInMuch;

int m_nbins;
double m_lowEdge;
double m_highEdge;

bool saveToFile_;
edm::EDGetTokenT<HOCalibVariableCollection> hoCalibVariableCollectionTag;
};

//
// constructors and destructor
Expand All @@ -59,8 +88,8 @@ DQMHOAlCaRecoStream::DQMHOAlCaRecoStream(const edm::ParameterSet &iConfig)
consumes<HOCalibVariableCollection>(iConfig.getParameter<edm::InputTag>("hoCalibVariableCollectionTag"))) {
// now do what ever initialization is needed

theRootFileName = iConfig.getUntrackedParameter<string>("RootFileName", "tmp.root");
folderName_ = iConfig.getUntrackedParameter<string>("folderName");
theRootFileName = iConfig.getUntrackedParameter<std::string>("RootFileName", "tmp.root");
folderName_ = iConfig.getUntrackedParameter<std::string>("folderName");
m_sigmaValue = iConfig.getUntrackedParameter<double>("sigmaval", 0.2);
m_lowRadPosInMuch = iConfig.getUntrackedParameter<double>("lowradposinmuch", 400.0);
m_highRadPosInMuch = iConfig.getUntrackedParameter<double>("highradposinmuch", 480.0);
Expand All @@ -81,8 +110,6 @@ DQMHOAlCaRecoStream::~DQMHOAlCaRecoStream() {

// ------------ method called to for each event ------------
void DQMHOAlCaRecoStream::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) {
using namespace edm;

Nevents++;

edm::Handle<HOCalibVariableCollection> HOCalib;
Expand Down Expand Up @@ -188,27 +215,6 @@ void DQMHOAlCaRecoStream::bookHistograms(DQMStore::IBooker &ibooker,
hPedRing[i]->setAxisTitle(title, 1);
}

// hSigRingm1 = ibooker.book1D("hSigRingm1", "HO signal in Ring-1", m_nbins,
// m_lowEdge, m_highEdge); hSigRingm1->setAxisTitle("HO signal in Ring-1",1);

// hSigRing00 = ibooker.book1D("hSigRing00", "HO signal in Ring_0", m_nbins,
// m_lowEdge, m_highEdge); hSigRing00->setAxisTitle("HO signal in Ring_0",1);

// hSigRingp1 = ibooker.book1D("hSigRingp1", "HO signal in Ring-1", m_nbins,
// m_lowEdge, m_highEdge); hSigRingp1->setAxisTitle("HO signal in Ring+1",1);

// hSigRingp2 = ibooker.book1D("hSigRingp2", "HO signal in Ring-2", m_nbins,
// m_lowEdge, m_highEdge); hSigRingp2->setAxisTitle("HO signal in Ring+2",1);

// hPedRingm2 = ibooker.book1D("hPedRingm2", "HO pedestal in Ring-2",
// m_nbins, m_lowEdge, m_highEdge); hPedRingm1 = ibooker.book1D("hPedRingm1",
// "HO pedestal in Ring-1", m_nbins, m_lowEdge, m_highEdge); hPedRing00 =
// ibooker.book1D("hPedRing00", "HO pedestal in Ring_0", m_nbins, m_lowEdge,
// m_highEdge); hPedRingp1 = ibooker.book1D("hPedRingp1", "HO pedestal in
// Ring-1", m_nbins, m_lowEdge, m_highEdge); hPedRingp2 =
// ibooker.book1D("hPedRingp2", "HO pedestal in Ring-2", m_nbins, m_lowEdge,
// m_highEdge);

for (int i = -1; i <= 1; i++) {
for (int j = -1; j <= 1; j++) {
int k = 3 * (i + 1) + j + 1;
Expand All @@ -222,3 +228,5 @@ void DQMHOAlCaRecoStream::bookHistograms(DQMStore::IBooker &ibooker,
Nevents = 0;
Nmuons = 0;
}

DEFINE_FWK_MODULE(DQMHOAlCaRecoStream);
Loading

0 comments on commit b39668b

Please sign in to comment.