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)
 
virtual ~HeavyIonUCCDQM ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual 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
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
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_, and triggerResults_.

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 ( )
virtual

Definition at line 23 of file HeavyIonUCCDQM.cc.

24 {
25 
26 }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 41 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().

42 {
43 
45  e.getByToken(triggerResults_,hltresults);
46  if(!hltresults.isValid())
47  {
48  edm::LogError ("HeavyIonUCCDQM") << "invalid collection: TriggerResults" << "\n";
49  return;
50  }
51 
52  bool hasFired = false;
53  const edm::TriggerNames& trigNames = e.triggerNames(*hltresults);
54  unsigned int numTriggers = trigNames.size();
55  for( unsigned int hltIndex=0; hltIndex<numTriggers; ++hltIndex ) {
56  if (trigNames.triggerName(hltIndex).find(triggerPath_) != std::string::npos && hltresults->wasrun(hltIndex) && hltresults->accept(hltIndex)){
57  hasFired = true;
58  }
59  }
60 
61  if (!hasFired) return;
62 
64  e.getByToken(theSiPixelCluster, cluster);
65  if ( cluster.isValid() ) {
66  h_SiPixelClusters->Fill(cluster->dataSize());
67  }
68 
70  e.getByToken(theCaloMet, calometColl);
71  if ( calometColl.isValid() ) {
72  h_SumEt->Fill((*calometColl).front().sumEt());
73  }
74 
75  if ( cluster.isValid() && calometColl.isValid() ) {
76  h_SumEt_SiPixelClusters->Fill((*calometColl).front().sumEt(), cluster->dataSize());
77  }
78 
79 
80 }
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 29 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_.

30 {
31  ibooker_.cd();;
32  ibooker_.setCurrentFolder("HLT/HI/" + triggerPath_);
33 
34  h_SumEt = ibooker_.book1D("h_SumEt", "SumEt", nEt, minEt, maxEt);
35  h_SiPixelClusters = ibooker_.book1D("h_SiPixelClusters", "h_SiPixelClusters", nClusters, minClusters, maxClusters);
36  h_SumEt_SiPixelClusters = ibooker_.book2D("h_SumEt_SiPixelClusters","h_SumEt_SiPixelClusters",nEt, minEt, maxEt, nClusters, minClusters, maxClusters);
37 
38  ibooker_.cd();
39 }
MonitorElement * h_SiPixelClusters
MonitorElement * h_SumEt
void cd(void)
Definition: DQMStore.cc:269
std::string triggerPath_
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
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().