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::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 HeavyIonUCCDQM (const edm::ParameterSet &ps)
 
 ~HeavyIonUCCDQM () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void beginRun (edm::Run const &, edm::EventSetup const &) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () 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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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

Implements edm::stream::EDAnalyzerBase.

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:279
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().