Skip to content
2 changes: 2 additions & 0 deletions Validation/CSCRecHits/python/cscRecHitValidation_cfi.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import FWCore.ParameterSet.Config as cms
from Validation.MuonHits.muonSimHitMatcherPSet import *
from Validation.CSCRecHits.cscRecHitPSet import *

from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
cscRecHitValidation = DQMEDAnalyzer(
'CSCRecHitValidation',
muonSimHitMatcherPSet,
cscRecHitPSet,
doSim = cms.bool(True),
useGEMs = cms.bool(False),
Expand Down
14 changes: 12 additions & 2 deletions Validation/MuonCSCDigis/interface/CSCALCTDigiValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "FWCore/Framework/interface/ConsumesCollector.h"

#include "DQMServices/Core/interface/DQMStore.h"
#include "DataFormats/CSCDigi/interface/CSCALCTDigi.h"
#include "DataFormats/CSCDigi/interface/CSCALCTDigiCollection.h"
#include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h"

Expand All @@ -18,9 +17,20 @@ class CSCALCTDigiValidation : public CSCBaseValidation {
private:
edm::EDGetTokenT<CSCALCTDigiCollection> alcts_Token_;
edm::InputTag inputTag_;
MonitorElement *theTimeBinPlots[10];
MonitorElement *theNDigisPerChamberPlots[10];
MonitorElement *theNDigisPerEventPlot;

// more diagnostic plots
std::vector<std::string> chambers_;

std::vector<std::string> alctVars_;
std::vector<unsigned> alctNBin_;
std::vector<double> alctMinBin_;
std::vector<double> alctMaxBin_;

// first key is the chamber number
// second key is the variable
std::map<uint32_t, std::map<std::string, MonitorElement *> > chamberHistos;
};

#endif
7 changes: 7 additions & 0 deletions Validation/MuonCSCDigis/interface/CSCBaseValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "DQMServices/Core/interface/DQMStore.h"
#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
#include "SimMuon/MCTruth/interface/PSimHitMap.h"
#include "SimDataFormats/Track/interface/SimTrack.h"

class CSCBaseValidation {
public:
Expand All @@ -23,10 +24,16 @@ class CSCBaseValidation {
virtual void analyze(const edm::Event &e, const edm::EventSetup &eventSetup) = 0;

protected:
bool isSimTrackGood(const SimTrack &t) const;

bool doSim_;
const CSCLayer *findLayer(int detId) const;
const PSimHitMap *theSimHitMap;
const CSCGeometry *theCSCGeometry;

double simTrackMinPt_;
double simTrackMinEta_;
double simTrackMaxEta_;
};

#endif
17 changes: 15 additions & 2 deletions Validation/MuonCSCDigis/interface/CSCCLCTDigiValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "FWCore/Framework/interface/ConsumesCollector.h"

#include "DQMServices/Core/interface/DQMStore.h"
#include "DataFormats/CSCDigi/interface/CSCCLCTDigi.h"
#include "DataFormats/CSCDigi/interface/CSCCLCTDigiCollection.h"
#include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h"

Expand All @@ -18,9 +17,23 @@ class CSCCLCTDigiValidation : public CSCBaseValidation {
private:
edm::EDGetTokenT<CSCCLCTDigiCollection> clcts_Token_;
edm::InputTag inputTag_;
MonitorElement *theTimeBinPlots[10];
MonitorElement *theNDigisPerChamberPlots[10];
MonitorElement *theNDigisPerEventPlot;

// more diagnostic plots
std::vector<std::string> chambers_;
std::vector<unsigned> chambersRun3_;

std::vector<std::string> clctVars_;
std::vector<unsigned> clctNBin_;
std::vector<double> clctMinBin_;
std::vector<double> clctMaxBin_;

bool isRun3_;

// first key is the chamber number
// second key is the variable
std::map<uint32_t, std::map<std::string, MonitorElement *> > chamberHistos;
};

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#ifndef Validation_MuonCSCDigis_CSCCLCTPreTriggerDigiValidation_H
#define Validation_MuonCSCDigis_CSCCLCTPreTriggerDigiValidation_H

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

#include "DQMServices/Core/interface/DQMStore.h"
#include "DataFormats/CSCDigi/interface/CSCCLCTPreTriggerDigiCollection.h"
#include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h"

class CSCCLCTPreTriggerDigiValidation : public CSCBaseValidation {
public:
CSCCLCTPreTriggerDigiValidation(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC);
~CSCCLCTPreTriggerDigiValidation() override;
void bookHistograms(DQMStore::IBooker &);
void analyze(const edm::Event &, const edm::EventSetup &) override;

private:
edm::EDGetTokenT<CSCCLCTPreTriggerDigiCollection> preclcts_Token_;
edm::InputTag inputTag_;

// more diagnostic plots
std::vector<std::string> chambers_;
std::vector<unsigned> chambersRun3_;

std::vector<std::string> preclctVars_;
std::vector<unsigned> preclctNBin_;
std::vector<double> preclctMinBin_;
std::vector<double> preclctMaxBin_;

bool isRun3_;

// first key is the chamber number
// second key is the variable
std::map<uint32_t, std::map<std::string, MonitorElement *> > chamberHistos;
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class CSCComparatorDigiValidation : public CSCBaseValidation {
~CSCComparatorDigiValidation() override;
void bookHistograms(DQMStore::IBooker &);
void analyze(const edm::Event &, const edm::EventSetup &) override;
void plotResolution(const PSimHit &hit, int strip, const CSCLayer *layer, int chamberType);

private:
edm::EDGetTokenT<CSCStripDigiCollection> strips_Token_;
Expand All @@ -26,8 +27,8 @@ class CSCComparatorDigiValidation : public CSCBaseValidation {
MonitorElement *theNDigisPerLayerPlots[10];
MonitorElement *theStripDigiPlots[10];
MonitorElement *the3StripPlots[10];

MonitorElement *theNDigisPerEventPlot;
MonitorElement *theResolutionPlots[10];
};

#endif
39 changes: 39 additions & 0 deletions Validation/MuonCSCDigis/interface/CSCCorrelatedLCTDigiValidation.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#ifndef Validation_MuonCSCDigis_CSCCorrelatedLCTDigiValidation_H
#define Validation_MuonCSCDigis_CSCCorrelatedLCTDigiValidation_H

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

#include "DQMServices/Core/interface/DQMStore.h"
#include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
#include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h"

class CSCCorrelatedLCTDigiValidation : public CSCBaseValidation {
public:
CSCCorrelatedLCTDigiValidation(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC);
~CSCCorrelatedLCTDigiValidation() override;
void bookHistograms(DQMStore::IBooker &);
void analyze(const edm::Event &, const edm::EventSetup &) override;

private:
edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> lcts_Token_;
edm::InputTag inputTag_;
MonitorElement *theNDigisPerChamberPlots[10];
MonitorElement *theNDigisPerEventPlot;

// more diagnostic plots
std::vector<std::string> chambers_;
std::vector<unsigned> chambersRun3_;

std::vector<std::string> lctVars_;
std::vector<unsigned> lctNBin_;
std::vector<double> lctMinBin_;
std::vector<double> lctMaxBin_;

bool isRun3_;

// first key is the chamber number
// second key is the variable
std::map<uint32_t, std::map<std::string, MonitorElement *> > chamberHistos;
};

#endif
3 changes: 0 additions & 3 deletions Validation/MuonCSCDigis/interface/CSCStripDigiValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "FWCore/Framework/interface/ConsumesCollector.h"

#include "DQMServices/Core/interface/DQMStore.h"
#include "DataFormats/CSCDigi/interface/CSCStripDigi.h"
#include "DataFormats/CSCDigi/interface/CSCStripDigiCollection.h"
#include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h"

Expand All @@ -15,7 +14,6 @@ class CSCStripDigiValidation : public CSCBaseValidation {

void bookHistograms(DQMStore::IBooker &);
void analyze(const edm::Event &e, const edm::EventSetup &) override;
void setGeometry(const CSCGeometry *geom) { theCSCGeometry = geom; }
void plotResolution(const PSimHit &hit, int strip, const CSCLayer *layer, int chamberType);

private:
Expand All @@ -36,7 +34,6 @@ class CSCStripDigiValidation : public CSCBaseValidation {
MonitorElement *theNDigisPerLayerPlot;
MonitorElement *theNDigisPerChamberPlot;
MonitorElement *theNDigisPerEventPlot;
MonitorElement *theResolutionPlots[10];
};

#endif
32 changes: 3 additions & 29 deletions Validation/MuonCSCDigis/interface/CSCStubEfficiencyValidation.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
#ifndef Validation_MuonCSCDigis_CSCStubEfficiencyValidation_H
#define Validation_MuonCSCDigis_CSCStubEfficiencyValidation_H

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

#include "DQMServices/Core/interface/DQMStore.h"
#include "DataFormats/CSCDigi/interface/CSCALCTDigi.h"
#include "DataFormats/CSCDigi/interface/CSCALCTDigiCollection.h"
#include "DataFormats/CSCDigi/interface/CSCCLCTDigi.h"
#include "DataFormats/CSCDigi/interface/CSCCLCTDigiCollection.h"
#include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h"
#include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
#include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h"
#include "Validation/MuonCSCDigis/interface/CSCStubMatcher.h"

#include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h"

#include <map>
#include <string>
#include <tuple>

class CSCStubMatcher;

class CSCStubEfficiencyValidation : public CSCBaseValidation {
public:
Expand All @@ -27,19 +15,8 @@ class CSCStubEfficiencyValidation : public CSCBaseValidation {
void bookHistograms(DQMStore::IBooker &);
void analyze(const edm::Event &, const edm::EventSetup &) override;

// access to the matcher
std::shared_ptr<CSCStubMatcher> cscStubMatcher() { return cscStubMatcher_; }
void setCSCStubMatcher(std::shared_ptr<CSCStubMatcher> s) { cscStubMatcher_ = s; }

private:
bool isSimTrackGood(const SimTrack &t);

edm::EDGetTokenT<CSCALCTDigiCollection> alcts_Token_;
edm::EDGetTokenT<CSCCLCTDigiCollection> clcts_Token_;
edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> lcts_Token_;
edm::InputTag inputTag_;

std::shared_ptr<CSCStubMatcher> cscStubMatcher_;
std::unique_ptr<CSCStubMatcher> cscStubMatcher_;

// efficiency vs eta for each CSC TP
MonitorElement *etaALCTNum[10];
Expand All @@ -51,9 +28,6 @@ class CSCStubEfficiencyValidation : public CSCBaseValidation {

edm::EDGetTokenT<edm::SimVertexContainer> simVertexInput_;
edm::EDGetTokenT<edm::SimTrackContainer> simTrackInput_;
double simTrackMinPt_;
double simTrackMinEta_;
double simTrackMaxEta_;

std::vector<double> etaMins_;
std::vector<double> etaMaxs_;
Expand Down
6 changes: 6 additions & 0 deletions Validation/MuonCSCDigis/interface/CSCStubMatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "Validation/MuonCSCDigis/interface/CSCDigiMatcher.h"
#include "Validation/MuonGEMDigis/interface/GEMDigiMatcher.h"

#include "DataFormats/CSCDigi/interface/CSCConstants.h"
#include "DataFormats/CSCDigi/interface/CSCALCTDigiCollection.h"
#include "DataFormats/CSCDigi/interface/CSCCLCTDigiCollection.h"
#include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
Expand Down Expand Up @@ -96,6 +97,11 @@ class CSCStubMatcher {
const CSCCorrelatedLCTDigi& lct22,
CSCCorrelatedLCTDigiContainer& lctcontainer) const;

edm::InputTag clctInputTag_;
edm::InputTag alctInputTag_;
edm::InputTag lctInputTag_;
edm::InputTag mplctInputTag_;

edm::EDGetTokenT<CSCCLCTDigiCollection> clctToken_;
edm::EDGetTokenT<CSCALCTDigiCollection> alctToken_;
edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> lctToken_;
Expand Down
38 changes: 38 additions & 0 deletions Validation/MuonCSCDigis/interface/CSCStubResolutionValidation.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#ifndef Validation_MuonCSCDigis_CSCStubResolutionValidation_H
#define Validation_MuonCSCDigis_CSCStubResolutionValidation_H

#include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h"

#include <string>

class CSCStubMatcher;

class CSCStubResolutionValidation : public CSCBaseValidation {
public:
CSCStubResolutionValidation(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC);
~CSCStubResolutionValidation() override;

void bookHistograms(DQMStore::IBooker &);
void analyze(const edm::Event &, const edm::EventSetup &) override;

private:
edm::InputTag inputTag_;

std::unique_ptr<CSCStubMatcher> cscStubMatcher_;

// resolution for each CSC TP; 10 CSC stations;
MonitorElement *posresCLCT_hs[10];
MonitorElement *posresCLCT_qs[10];
MonitorElement *posresCLCT_es[10];

MonitorElement *bendresCLCT[10];

edm::EDGetTokenT<edm::SimVertexContainer> simVertexInput_;
edm::EDGetTokenT<edm::SimTrackContainer> simTrackInput_;

double simTrackMinPt_;
double simTrackMinEta_;
double simTrackMaxEta_;
};

#endif
1 change: 0 additions & 1 deletion Validation/MuonCSCDigis/interface/CSCWireDigiValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "FWCore/Framework/interface/ConsumesCollector.h"

#include "DQMServices/Core/interface/DQMStore.h"
#include "DataFormats/CSCDigi/interface/CSCWireDigi.h"
#include "DataFormats/CSCDigi/interface/CSCWireDigiCollection.h"
#include "Validation/MuonCSCDigis/interface/CSCBaseValidation.h"

Expand Down
Loading