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

Consolidated GLBMuonAnalyzer into one file #34914

Merged
merged 1 commit into from
Aug 19, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <adam.everett@cern.ch>
*/

#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.