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::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

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 edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

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::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 25 of file HeavyIonUCCDQM.h.

Constructor & Destructor Documentation

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_, triggerResults_, and ~HeavyIonUCCDQM().

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
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMet
std::string triggerPath_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > theSiPixelCluster
HeavyIonUCCDQM::~HeavyIonUCCDQM ( )
overridedefault

Referenced by HeavyIonUCCDQM().

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 37 of file HeavyIonUCCDQM.cc.

References edm::HLTGlobalStatus::accept(), DEFINE_FWK_MODULE, dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), h_SiPixelClusters, h_SumEt, h_SumEt_SiPixelClusters, HLTBitAnalyser_cfi::hltresults, edm::HandleBase::isValid(), edm::TriggerNames::size(), theCaloMet, theSiPixelCluster, edm::TriggerNames::triggerName(), edm::Event::triggerNames(), triggerPath_, triggerResults_, trigNames, and edm::HLTGlobalStatus::wasrun().

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 }
bool wasrun() const
Was at least one path run?
MonitorElement * h_SiPixelClusters
MonitorElement * h_SumEt
edm::EDGetTokenT< edm::TriggerResults > triggerResults_
bool accept() const
Has at least one path accepted the event?
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMet
std::string triggerPath_
Strings::size_type size() const
Definition: TriggerNames.cc:31
void Fill(long long x)
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > theSiPixelCluster
bool isValid() const
Definition: HandleBase.h:70
static const char *const trigNames[]
Definition: EcalDumpRaw.cc:57
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
MonitorElement * h_SumEt_SiPixelClusters
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::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), dqm::dqmstoreimpl::DQMStore::IBooker::cd(), h_SiPixelClusters, h_SumEt, h_SumEt_SiPixelClusters, maxClusters, maxEt, minClusters, minEt, nClusters, nEt, dqm::dqmstoreimpl::DQMStore::IBooker::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);
31  h_SumEt_SiPixelClusters = ibooker_.book2D(
32  "h_SumEt_SiPixelClusters", "h_SumEt_SiPixelClusters", nEt, minEt, maxEt, nClusters, minClusters, maxClusters);
33 
34  ibooker_.cd();
35 }
MonitorElement * h_SiPixelClusters
MonitorElement * h_SumEt
std::string triggerPath_
MonitorElement * h_SumEt_SiPixelClusters

Member Data Documentation

MonitorElement* HeavyIonUCCDQM::h_SiPixelClusters
private

Definition at line 50 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HeavyIonUCCDQM::h_SumEt
private

Definition at line 49 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HeavyIonUCCDQM::h_SumEt_SiPixelClusters
private

Definition at line 51 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and bookHistograms().

int HeavyIonUCCDQM::maxClusters
private

Definition at line 43 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

double HeavyIonUCCDQM::maxEt
private

Definition at line 46 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

int HeavyIonUCCDQM::minClusters
private

Definition at line 42 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

double HeavyIonUCCDQM::minEt
private

Definition at line 45 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

int HeavyIonUCCDQM::nClusters
private

Definition at line 41 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

int HeavyIonUCCDQM::nEt
private

Definition at line 44 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

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

Definition at line 36 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and HeavyIonUCCDQM().

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

Definition at line 37 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and HeavyIonUCCDQM().

std::string HeavyIonUCCDQM::triggerPath_
private

Definition at line 39 of file HeavyIonUCCDQM.h.

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

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

Definition at line 35 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and HeavyIonUCCDQM().