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::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > 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 &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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
 
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)
 
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::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 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 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 26 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().

9 {
10  triggerResults_ = consumes<edm::TriggerResults>(ps.getParameter<edm::InputTag>("triggerResults"));
11  theCaloMet = consumes<reco::CaloMETCollection>(ps.getParameter<edm::InputTag>("caloMet"));
12  theSiPixelCluster = consumes<edmNew::DetSetVector<SiPixelCluster> >(ps.getParameter<edm::InputTag>("pixelCluster"));
13  triggerPath_ = ps.getParameter<std::string>("triggerPath");
14 
15  nClusters = ps.getParameter<int>("nClusters");
16  minClusters = ps.getParameter<int>("minClusters");
17  maxClusters = ps.getParameter<int>("maxClusters");
18  nEt = ps.getParameter<int>("nEt");
19  minEt = ps.getParameter<double>("minEt");
20  maxEt = ps.getParameter<double>("maxEt");
21 }
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 38 of file HeavyIonUCCDQM.cc.

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

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

Implements DQMEDAnalyzer.

Definition at line 26 of file HeavyIonUCCDQM.cc.

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

27 {
28  ibooker_.cd();;
29  ibooker_.setCurrentFolder("HLT/HI/" + triggerPath_);
30 
31  h_SumEt = ibooker_.book1D("h_SumEt", "SumEt", nEt, minEt, maxEt);
32  h_SiPixelClusters = ibooker_.book1D("h_SiPixelClusters", "h_SiPixelClusters", nClusters, minClusters, maxClusters);
33  h_SumEt_SiPixelClusters = ibooker_.book2D("h_SumEt_SiPixelClusters","h_SumEt_SiPixelClusters",nEt, minEt, maxEt, nClusters, minClusters, maxClusters);
34 
35  ibooker_.cd();
36 }
MonitorElement * h_SiPixelClusters
MonitorElement * h_SumEt
std::string triggerPath_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
MonitorElement * h_SumEt_SiPixelClusters

Member Data Documentation

MonitorElement* HeavyIonUCCDQM::h_SiPixelClusters
private

Definition at line 51 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HeavyIonUCCDQM::h_SumEt
private

Definition at line 50 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* HeavyIonUCCDQM::h_SumEt_SiPixelClusters
private

Definition at line 52 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and bookHistograms().

int HeavyIonUCCDQM::maxClusters
private

Definition at line 44 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

double HeavyIonUCCDQM::maxEt
private

Definition at line 47 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

int HeavyIonUCCDQM::minClusters
private

Definition at line 43 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

double HeavyIonUCCDQM::minEt
private

Definition at line 46 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

int HeavyIonUCCDQM::nClusters
private

Definition at line 42 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

int HeavyIonUCCDQM::nEt
private

Definition at line 45 of file HeavyIonUCCDQM.h.

Referenced by bookHistograms(), and HeavyIonUCCDQM().

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

Definition at line 37 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and HeavyIonUCCDQM().

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

Definition at line 38 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and HeavyIonUCCDQM().

std::string HeavyIonUCCDQM::triggerPath_
private

Definition at line 40 of file HeavyIonUCCDQM.h.

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

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

Definition at line 36 of file HeavyIonUCCDQM.h.

Referenced by analyze(), and HeavyIonUCCDQM().