Skip to content

Commit

Permalink
Merge pull request #34914 from Dr15Jones/GLBMuonAnalyzer
Browse files Browse the repository at this point in the history
Consolidated GLBMuonAnalyzer into one file
  • Loading branch information
cmsbuild authored Aug 19, 2021
2 parents 464593e + 73ba792 commit 4be9049
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 75 deletions.
49 changes: 46 additions & 3 deletions RecoMuon/GlobalMuonProducer/test/GLBMuonAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
* \author A. Everett - Purdue University <[email protected]>
*/

#include "RecoMuon/GlobalMuonProducer/test/GLBMuonAnalyzer.h"
// Base Class Headers
#include "FWCore/Framework/interface/EDAnalyzer.h"

// Collaborating Class Header
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/ESHandle.h"
Expand All @@ -32,11 +34,50 @@
#include "TH1F.h"
#include "TH2F.h"

class GLBMuonAnalyzer : public edm::EDAnalyzer {
public:
/// Constructor
GLBMuonAnalyzer(const edm::ParameterSet &pset);

/// Destructor
virtual ~GLBMuonAnalyzer();

// Operations

void analyze(const edm::Event &event, const edm::EventSetup &eventSetup);

virtual void beginJob();
virtual void endJob();

protected:
private:
edm::InputTag theGLBMuonLabel;

std::string theRootFileName;
TFile *theFile;

// Histograms
TH1F *hPtRec;
TH1F *hPtSim;
TH1F *hPres;
TH1F *h1_Pres;
TH1F *hPTDiff;
TH1F *hPTDiff2;
TH2F *hPTDiffvsEta;
TH2F *hPTDiffvsPhi;

// Counters
int numberOfSimTracks;
int numberOfRecTracks;

std::string theDataType;
};

using namespace std;
using namespace edm;

/// Constructor
GLBMuonAnalyzer::GLBMuonAnalyzer(const ParameterSet& pset) {
GLBMuonAnalyzer::GLBMuonAnalyzer(const ParameterSet &pset) {
theGLBMuonLabel = pset.getUntrackedParameter<edm::InputTag>("GlobalTrackCollectionLabel");

theRootFileName = pset.getUntrackedParameter<string>("rootFileName");
Expand Down Expand Up @@ -91,7 +132,7 @@ void GLBMuonAnalyzer::endJob() {
theFile->Close();
}

void GLBMuonAnalyzer::analyze(const Event& event, const EventSetup& eventSetup) {
void GLBMuonAnalyzer::analyze(const Event &event, const EventSetup &eventSetup) {
//LogTrace("Analyzer") << "Run: " << event.id().run() << " Event: " << event.id().event() << endl;
MuonPatternRecoDumper debug;

Expand Down Expand Up @@ -186,3 +227,5 @@ void GLBMuonAnalyzer::analyze(const Event& event, const EventSetup& eventSetup)
}
LogTrace("Analyzer") << "---" << endl;
}

DEFINE_FWK_MODULE(GLBMuonAnalyzer);
59 changes: 0 additions & 59 deletions RecoMuon/GlobalMuonProducer/test/GLBMuonAnalyzer.h

This file was deleted.

13 changes: 0 additions & 13 deletions RecoMuon/GlobalMuonProducer/test/SealModule.cc

This file was deleted.

0 comments on commit 4be9049

Please sign in to comment.