CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
HeavyIonUCCDQM Class Reference

#include <HeavyIonUCCDQM.h>

Inheritance diagram for HeavyIonUCCDQM:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 HeavyIonUCCDQM (const edm::ParameterSet &ps)
 
 ~HeavyIonUCCDQM () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Attributes

MonitorElementh_SiPixelClusters
 
MonitorElementh_SumEt
 
MonitorElementh_SumEt_SiPixelClusters
 
int maxClusters
 
double maxEt
 
int minClusters
 
double minEt
 
int nClusters
 
int nEt
 
edm::EDGetTokenT< reco::CaloMETCollectiontheCaloMet
 
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > theSiPixelCluster
 
std::string triggerPath_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResults_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 25 of file HeavyIonUCCDQM.h.

Constructor & Destructor Documentation

◆ HeavyIonUCCDQM()

HeavyIonUCCDQM::HeavyIonUCCDQM ( const edm::ParameterSet ps)

Definition at line 8 of file HeavyIonUCCDQM.cc.

References edm::ParameterSet::getParameter(), maxClusters, maxEt, minClusters, minEt, nClusters, nEt, AlCaHLTBitMon_QueryRunRegistry::string, theCaloMet, theSiPixelCluster, triggerPath_, and triggerResults_.

8  {
9  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("triggerResults"));
10  theCaloMet = consumes<reco::CaloMETCollection>(ps.getParameter<edm::InputTag>("caloMet"));
11  theSiPixelCluster = consumes<edmNew::DetSetVector<SiPixelCluster> >(ps.getParameter<edm::InputTag>("pixelCluster"));
12  triggerPath_ = ps.getParameter<std::string>("triggerPath");
13 
14  nClusters = ps.getParameter<int>("nClusters");
15  minClusters = ps.getParameter<int>("minClusters");
16  maxClusters = ps.getParameter<int>("maxClusters");
17  nEt = ps.getParameter<int>("nEt");
18  minEt = ps.getParameter<double>("minEt");
19  maxEt = ps.getParameter<double>("maxEt");
20 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMet
std::string triggerPath_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > theSiPixelCluster

◆ ~HeavyIonUCCDQM()

HeavyIonUCCDQM::~HeavyIonUCCDQM ( )
overridedefault

Member Function Documentation

◆ analyze()

void HeavyIonUCCDQM::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 37 of file HeavyIonUCCDQM.cc.

References MillePedeFileConverter_cfg::e, dqm::impl::MonitorElement::Fill(), h_SiPixelClusters, h_SumEt, h_SumEt_SiPixelClusters, HLTBitAnalyser_cfi::hltresults, edm::HandleBase::isValid(), theCaloMet, theSiPixelCluster, triggerPath_, triggerResults_, and trigNames.

37  {
39  e.getByToken(triggerResults_, hltresults);
40  if (!hltresults.isValid()) {
41  edm::LogError("HeavyIonUCCDQM") << "invalid collection: TriggerResults"
42  << "\n";
43  return;
44  }
45 
46  bool hasFired = false;
47  const edm::TriggerNames& trigNames = e.triggerNames(*hltresults);
48  unsigned int numTriggers = trigNames.size();
49  for (unsigned int hltIndex = 0; hltIndex < numTriggers; ++hltIndex) {
50  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) &&
51  hltresults->accept(hltIndex)) {
52  hasFired = true;
53  }
54  }
55 
56  if (!hasFired)
57  return;
58 
60  e.getByToken(theSiPixelCluster, cluster);
61  if (cluster.isValid()) {
62  h_SiPixelClusters->Fill(cluster->dataSize());
63  }
64 
66  e.getByToken(theCaloMet, calometColl);
67  if (calometColl.isValid()) {
68  h_SumEt->Fill((*calometColl).front().sumEt());
69  }
70 
71  if (cluster.isValid() && calometColl.isValid()) {
72  h_SumEt_SiPixelClusters->Fill((*calometColl).front().sumEt(), cluster->dataSize());
73  }
74 }
MonitorElement * h_SiPixelClusters
MonitorElement * h_SumEt
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMet
std::string triggerPath_
Log< level::Error, false > LogError
void Fill(long long x)
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > theSiPixelCluster
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * h_SumEt_SiPixelClusters

◆ bookHistograms()

void HeavyIonUCCDQM::bookHistograms ( DQMStore::IBooker ibooker_,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 24 of file HeavyIonUCCDQM.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::NavigatorBase::cd(), h_SiPixelClusters, h_SumEt, h_SumEt_SiPixelClusters, maxClusters, maxEt, minClusters, minEt, nClusters, nEt, dqm::implementation::NavigatorBase::setCurrentFolder(), and triggerPath_.

24  {
25  ibooker_.cd();
26  ;
27  ibooker_.setCurrentFolder("HLT/HI/" + triggerPath_);
28 
29  h_SumEt = ibooker_.book1D("h_SumEt", "SumEt", nEt, minEt, maxEt);
30  h_SiPixelClusters = ibooker_.book1D("h_SiPixelClusters", "h_SiPixelClusters", nClusters, minClusters, maxClusters);
32  "h_SumEt_SiPixelClusters", "h_SumEt_SiPixelClusters", nEt, minEt, maxEt, nClusters, minClusters, maxClusters);
33 
34  ibooker_.cd();
35 }
MonitorElement * h_SiPixelClusters
MonitorElement * h_SumEt
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::string triggerPath_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * h_SumEt_SiPixelClusters

Member Data Documentation

◆ h_SiPixelClusters

MonitorElement* HeavyIonUCCDQM::h_SiPixelClusters
private

Definition at line 50 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and bookHistograms().

◆ h_SumEt

MonitorElement* HeavyIonUCCDQM::h_SumEt
private

Definition at line 49 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and bookHistograms().

◆ h_SumEt_SiPixelClusters

MonitorElement* HeavyIonUCCDQM::h_SumEt_SiPixelClusters
private

Definition at line 51 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and bookHistograms().

◆ maxClusters

int HeavyIonUCCDQM::maxClusters
private

Definition at line 43 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

◆ maxEt

double HeavyIonUCCDQM::maxEt
private

Definition at line 46 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

◆ minClusters

int HeavyIonUCCDQM::minClusters
private

Definition at line 42 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

◆ minEt

double HeavyIonUCCDQM::minEt
private

Definition at line 45 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

◆ nClusters

int HeavyIonUCCDQM::nClusters
private

Definition at line 41 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

◆ nEt

int HeavyIonUCCDQM::nEt
private

Definition at line 44 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

◆ theCaloMet

edm::EDGetTokenT<reco::CaloMETCollection> HeavyIonUCCDQM::theCaloMet
private

Definition at line 36 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and HeavyIonUCCDQM().

◆ theSiPixelCluster

edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > HeavyIonUCCDQM::theSiPixelCluster
private

Definition at line 37 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and HeavyIonUCCDQM().

◆ triggerPath_

std::string HeavyIonUCCDQM::triggerPath_
private

Definition at line 39 of file HeavyIonUCCDQM.h.

Referenced by analyze(), bookHistograms(), and HeavyIonUCCDQM().

◆ triggerResults_

edm::EDGetTokenT<edm::TriggerResults> HeavyIonUCCDQM::triggerResults_
private

Definition at line 35 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and HeavyIonUCCDQM().