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

Ecal DQM update #2735

Merged
merged 3 commits into from Mar 8, 2014
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions DQM/EcalBarrelMonitorClient/BuildFile.xml
Expand Up @@ -5,8 +5,7 @@
<use name="FWCore/MessageLogger"/>
<use name="FWCore/ParameterSet"/>
<use name="FWCore/ServiceRegistry"/>
<use name="DQM/EcalBarrelMonitorTasks"/>
<use name="rootcore"/>
<export>
<lib name="1"/>
<lib name="1"/>
</export>
29 changes: 29 additions & 0 deletions DQM/EcalBarrelMonitorClient/interface/CalibrationSummaryClient.h
@@ -0,0 +1,29 @@
#ifndef CalibrationSummaryClient_H
#define CalibrationSummaryClient_H

#include "DQWorkerClient.h"

namespace ecaldqm {

class CalibrationSummaryClient : public DQWorkerClient {
public:
CalibrationSummaryClient();
~CalibrationSummaryClient() {}

void producePlots(ProcessType) override;

private:
void setParams(edm::ParameterSet const&) override;

std::map<int, unsigned> laserWlToME_;
std::map<int, unsigned> ledWlToME_;
std::map<int, unsigned> tpGainToME_;
std::map<int, unsigned> tpPNGainToME_;
std::map<int, unsigned> pedGainToME_;
std::map<int, unsigned> pedPNGainToME_;
};

}

#endif

31 changes: 3 additions & 28 deletions DQM/EcalBarrelMonitorClient/interface/CertificationClient.h
@@ -1,41 +1,16 @@
#ifndef CertificationClient_H
#define CertificationClient_H

#include "DQM/EcalCommon/interface/DQWorkerClient.h"
#include "DQWorkerClient.h"

namespace ecaldqm {

class CertificationClient : public DQWorkerClient {
public:
CertificationClient(const edm::ParameterSet &, const edm::ParameterSet &);
CertificationClient();
~CertificationClient() {}

void bookMEs() override;

void beginRun(const edm::Run &, const edm::EventSetup &) override;

void producePlots() override;

enum MESets {
kCertificationMap,
kCertificationContents,
kCertification,
kReportSummaryMap,
kReportSummaryContents,
kReportSummary,
nMESets
};

static void setMEData(std::vector<MEData>&);

enum Sources {
sIntegrity,
sFEStatus,
sDesync,
sDAQ,
sDCS,
nSources
};
void producePlots(ProcessType) override;
};

}
Expand Down
69 changes: 69 additions & 0 deletions DQM/EcalBarrelMonitorClient/interface/DQWorkerClient.h
@@ -0,0 +1,69 @@
#ifndef DQWorkerClient_H
#define DQWorkerClient_H

#include <utility>

#include "DQM/EcalCommon/interface/DQWorker.h"

class DetId;

namespace ecaldqm
{
class StatusManager;

class DQWorkerClient : public DQWorker {
public:
enum ProcessType {
kLumi,
kRun,
nProcessType
};

DQWorkerClient();
virtual ~DQWorkerClient() {}

static void fillDescriptions(edm::ParameterSetDescription&);

void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;

void bookMEs(DQMStore&) override;
void releaseMEs() override;

void releaseSource();
bool retrieveSource(DQMStore const&, ProcessType);

void resetMEs();
virtual void producePlots(ProcessType) = 0;

void setStatusManager(StatusManager const& _manager) { statusManager_ = &_manager; }

enum Quality {
kBad = 0,
kGood = 1,
kUnknown = 2,
kMBad = 3,
kMGood = 4,
kMUnknown = 5
};

protected:
void setME(edm::ParameterSet const& _ps) final { DQWorker::setME(_ps); }
void setSource(edm::ParameterSet const&) override;

bool using_(std::string const& _name, ProcessType _type = kRun) const
{
MESetCollection::const_iterator itr(sources_.find(_name));
if(itr == sources_.end()) return false;
if(_type == kRun) return true;
else return itr->second->getLumiFlag();
}

void towerAverage_(MESet&, MESet const&, float);

MESetCollection sources_;
std::set<std::string> qualitySummaries_;

StatusManager const* statusManager_;
};
}
#endif
31 changes: 31 additions & 0 deletions DQM/EcalBarrelMonitorClient/interface/EcalDQMonitorClient.h
@@ -0,0 +1,31 @@
#ifndef EcalDQMonitorClient_H
#define EcalDQMonitorClient_H

#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "DQM/EcalCommon/interface/EcalDQMonitor.h"
#include "DQM/EcalCommon/interface/StatusManager.h"

#include "../interface/DQWorkerClient.h"

class EcalDQMonitorClient : public edm::EDAnalyzer, public ecaldqm::EcalDQMonitor {
public:
EcalDQMonitorClient(edm::ParameterSet const&);
~EcalDQMonitorClient() {}

static void fillDescriptions(edm::ConfigurationDescriptions&);

private:
void beginRun(edm::Run const&, edm::EventSetup const&) override;
void endRun(edm::Run const&, edm::EventSetup const&) override;
void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
void analyze(edm::Event const&, edm::EventSetup const&) override;

void runWorkers(ecaldqm::DQWorkerClient::ProcessType);

unsigned eventCycleLength_;
unsigned iEvt_;

ecaldqm::StatusManager statusManager_;
};

#endif
33 changes: 7 additions & 26 deletions DQM/EcalBarrelMonitorClient/interface/IntegrityClient.h
@@ -1,41 +1,22 @@
#ifndef IntegrityClient_H
#define IntegrityClient_H

#include "DQM/EcalCommon/interface/DQWorkerClient.h"

namespace ecaldqm {
#include "DQWorkerClient.h"

namespace ecaldqm
{
class IntegrityClient : public DQWorkerClient {
public:
IntegrityClient(const edm::ParameterSet &, const edm::ParameterSet&);
IntegrityClient();
~IntegrityClient() {}

void bookMEs() override;

void producePlots() override;

enum MESets {
kQuality,
kQualitySummary,
nMESets
};
void producePlots(ProcessType) override;

static void setMEData(std::vector<MEData>&);
private:
void setParams(edm::ParameterSet const&) override;

enum Sources {
sOccupancy,
sGain,
sChId,
sGainSwitch,
sTowerId,
sBlockSize,
nSources
};

protected:
float errFractionThreshold_;
};

}

#endif
Expand Down
74 changes: 18 additions & 56 deletions DQM/EcalBarrelMonitorClient/interface/LaserClient.h
@@ -1,72 +1,34 @@
#ifndef LaserClient_H
#define LaserClient_H

#include "DQM/EcalCommon/interface/DQWorkerClient.h"

#include "DQM/EcalBarrelMonitorTasks/interface/LaserTask.h"

namespace ecaldqm {
#include "DQWorkerClient.h"

namespace ecaldqm
{
class LaserClient : public DQWorkerClient {
public:
LaserClient(const edm::ParameterSet &, const edm::ParameterSet &);
LaserClient();
~LaserClient() {}

void bookMEs() override;

void initialize() override;

void beginRun(const edm::Run&, const edm::EventSetup&) override;

void producePlots() override;

enum Constants {
nWL = LaserTask::nWL,
nPNGain = LaserTask::nPNGain
};
void producePlots(ProcessType) override;

enum MESets {
kQuality,
kAmplitudeMean = kQuality + nWL,
kAmplitudeRMS = kAmplitudeMean + nWL,
kTimingMean = kAmplitudeRMS + nWL,
kTimingRMS = kTimingMean + nWL,
kPNAmplitudeMean = kTimingRMS + nWL,
kPNAmplitudeRMS = kPNAmplitudeMean + nWL * nPNGain,
kQualitySummary = kPNAmplitudeRMS + nWL * nPNGain,
kPNQualitySummary = kQualitySummary + nWL,
nMESets = kPNQualitySummary + nWL
};
private:
void setParams(edm::ParameterSet const&) override;

static void setMEData(std::vector<MEData>&);

enum Sources {
sAmplitude,
sTiming = sAmplitude + nWL,
sPNAmplitude = sTiming + nWL,
nSources = sPNAmplitude + nWL * nPNGain
};

protected:
std::vector<int> laserWavelengths_;
std::vector<int> MGPAGainsPN_;
std::map<int, unsigned> wlToME_;

int minChannelEntries_;
std::vector<double> expectedAmplitude_;
std::vector<double> amplitudeThreshold_;
std::vector<double> amplitudeRMSThreshold_;
std::vector<double> expectedTiming_;
std::vector<double> timingThreshold_;
std::vector<double> timingRMSThreshold_;
std::vector<double> expectedPNAmplitude_;
std::vector<double> pnAmplitudeThreshold_;
std::vector<double> pnAmplitudeRMSThreshold_;

float towerThreshold_;

std::map<std::pair<unsigned, int>, float> ampCorrections_;
std::vector<float> expectedAmplitude_;
float toleranceAmplitude_;
float toleranceAmpRMSRatio_;
std::vector<float> expectedTiming_;
float toleranceTiming_;
float toleranceTimRMS_;
std::vector<float> expectedPNAmplitude_;
float tolerancePNAmp_;
float tolerancePNRMSRatio_;
float forwardFactor_;
};

}

#endif
34 changes: 34 additions & 0 deletions DQM/EcalBarrelMonitorClient/interface/LedClient.h
@@ -0,0 +1,34 @@
#ifndef LedClient_H
#define LedClient_H

#include "DQWorkerClient.h"

namespace ecaldqm
{
class LedClient : public DQWorkerClient {
public:
LedClient();
~LedClient() {}

void producePlots(ProcessType) override;

private:
void setParams(edm::ParameterSet const&) override;

std::map<int, unsigned> wlToME_;

int minChannelEntries_;
std::vector<double> expectedAmplitude_;
double toleranceAmplitude_;
double toleranceAmpRMSRatio_;
std::vector<double> expectedTiming_;
double toleranceTiming_;
double toleranceTimRMS_;
std::vector<double> expectedPNAmplitude_;
double tolerancePNAmp_;
double tolerancePNRMSRatio_;
float forwardFactor_;
};
}

#endif