CMS 3D CMS Logo

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

#include <SiStripMonitorHLT.h>

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

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 SiStripMonitorHLT (const edm::ParameterSet &)
 
 ~SiStripMonitorHLT () override=default
 
- 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
 

Private Attributes

MonitorElementChargeOfEachClusterTEC_all
 
MonitorElementChargeOfEachClusterTEC_hlt
 
MonitorElementChargeOfEachClusterTIB_all
 
MonitorElementChargeOfEachClusterTIB_hlt
 
MonitorElementChargeOfEachClusterTOB_all
 
MonitorElementChargeOfEachClusterTOB_hlt
 
edm::EDGetTokenT< std::map< uint, std::vector< SiStripCluster > > > clusterInSubComponentsToken_
 
edm::ParameterSet conf_
 
edm::EDGetTokenT< int > filerDecisionToken_
 
MonitorElementHLTDecision
 
std::string HLTDirectory
 
MonitorElementNumberOfClustersAboveThreshold_all
 
MonitorElementNumberOfClustersAboveThreshold_hlt
 
MonitorElementSumOfClusterCharges_all
 
MonitorElementSumOfClusterCharges_hlt
 
edm::EDGetTokenT< uint > sumOfClusterToken_
 

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 Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 21 of file SiStripMonitorHLT.h.

Constructor & Destructor Documentation

◆ SiStripMonitorHLT()

SiStripMonitorHLT::SiStripMonitorHLT ( const edm::ParameterSet iConfig)
explicit

Definition at line 19 of file SiStripMonitorHLT.cc.

References clusterInSubComponentsToken_, conf_, filerDecisionToken_, edm::ParameterSet::getParameter(), HLTDirectory, AlCaHLTBitMon_QueryRunRegistry::string, and sumOfClusterToken_.

19  {
20  HLTDirectory = "HLTResults";
21  conf_ = iConfig;
22 
23  filerDecisionToken_ = consumes<int>(conf_.getParameter<std::string>("HLTProducer"));
24  sumOfClusterToken_ = consumes<uint>(conf_.getParameter<std::string>("HLTProducer"));
26  consumes<std::map<uint, std::vector<SiStripCluster> > >(conf_.getParameter<std::string>("HLTProducer"));
27 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::string HLTDirectory
edm::EDGetTokenT< int > filerDecisionToken_
edm::EDGetTokenT< std::map< uint, std::vector< SiStripCluster > > > clusterInSubComponentsToken_
edm::ParameterSet conf_
edm::EDGetTokenT< uint > sumOfClusterToken_

◆ ~SiStripMonitorHLT()

SiStripMonitorHLT::~SiStripMonitorHLT ( )
overridedefault

Member Function Documentation

◆ analyze()

void SiStripMonitorHLT::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 56 of file SiStripMonitorHLT.cc.

References ChargeOfEachClusterTEC_all, ChargeOfEachClusterTEC_hlt, ChargeOfEachClusterTIB_all, ChargeOfEachClusterTIB_hlt, ChargeOfEachClusterTOB_all, ChargeOfEachClusterTOB_hlt, clusterInSubComponentsToken_, conf_, filerDecisionToken_, dqm::impl::MonitorElement::Fill(), edm::ParameterSet::getParameter(), HLTDecision, SiStripMonitorHLT_cfi::HLTProducer, iEvent, genParticles_cff::map, NumberOfClustersAboveThreshold_all, NumberOfClustersAboveThreshold_hlt, AlCaHLTBitMon_QueryRunRegistry::string, SumOfClusterCharges_all, SumOfClusterCharges_hlt, sumOfClusterToken_, and parallelization::uint.

56  {
57  // get from event
59  edm::Handle<int> filter_decision;
60  iEvent.getByToken(filerDecisionToken_, filter_decision); // filter decision
61  edm::Handle<uint> sum_of_clustch;
62  iEvent.getByToken(sumOfClusterToken_,
63  sum_of_clustch); // sum of cluster charges
64  // first element of pair: layer: TIB1, ...., TEC; second element: nr of
65  // clusters above threshold
66  edm::Handle<std::map<uint, std::vector<SiStripCluster> > > clusters_in_subcomponents;
67  if (HLTProducer == "ClusterMTCCFilter")
68  iEvent.getByToken(clusterInSubComponentsToken_, clusters_in_subcomponents);
69 
70  // trigger decision
71  HLTDecision->Fill(*filter_decision);
72 
73  // sum of charges of clusters
74  SumOfClusterCharges_all->Fill(*sum_of_clustch);
75  if (*filter_decision)
76  SumOfClusterCharges_hlt->Fill(*sum_of_clustch);
77 
78  // clusters in different layers
79  if (HLTProducer == "ClusterMTCCFilter") {
80  // loop over layers ("subcomponents")
81  for (std::map<uint, std::vector<SiStripCluster> >::const_iterator it = clusters_in_subcomponents->begin();
82  it != clusters_in_subcomponents->end();
83  it++) {
84  int generalized_layer = it->first;
85  std::vector<SiStripCluster> theclusters = it->second;
86  NumberOfClustersAboveThreshold_all->Fill(generalized_layer,
87  theclusters.size()); // number of clusters in this generalized layer
88  if (*filter_decision)
89  NumberOfClustersAboveThreshold_hlt->Fill(generalized_layer, theclusters.size());
90  // loop over clusters (and detids)
91  for (std::vector<SiStripCluster>::const_iterator icluster = theclusters.begin(); icluster != theclusters.end();
92  icluster++) {
93  // calculate sum of amplitudes
94  unsigned int amplclus = 0;
95  for (auto ia = icluster->amplitudes().begin(); ia != icluster->amplitudes().end(); ia++) {
96  if ((*ia) > 0)
97  amplclus += (*ia); // why should this be negative?
98  }
99  if (generalized_layer == 31 || generalized_layer == 32 ||
100  generalized_layer == 33) { // you can also ask the detid here whether is TIB
101  ChargeOfEachClusterTIB_all->Fill(amplclus, 1.);
102  if (*filter_decision)
103  ChargeOfEachClusterTIB_hlt->Fill(amplclus, 1.);
104  }
105  if (generalized_layer == 51 || generalized_layer == 52) {
106  ChargeOfEachClusterTOB_all->Fill(amplclus, 1.);
107  if (*filter_decision)
108  ChargeOfEachClusterTOB_hlt->Fill(amplclus, 1.);
109  }
110  if (generalized_layer == 60) {
111  ChargeOfEachClusterTEC_all->Fill(amplclus, 1.);
112  if (*filter_decision)
113  ChargeOfEachClusterTEC_hlt->Fill(amplclus, 1.);
114  }
115  }
116  }
117  }
118 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MonitorElement * NumberOfClustersAboveThreshold_all
MonitorElement * SumOfClusterCharges_all
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
MonitorElement * ChargeOfEachClusterTEC_hlt
MonitorElement * ChargeOfEachClusterTIB_all
MonitorElement * NumberOfClustersAboveThreshold_hlt
MonitorElement * HLTDecision
MonitorElement * ChargeOfEachClusterTEC_all
MonitorElement * SumOfClusterCharges_hlt
MonitorElement * ChargeOfEachClusterTOB_hlt
edm::EDGetTokenT< int > filerDecisionToken_
MonitorElement * ChargeOfEachClusterTIB_hlt
edm::EDGetTokenT< std::map< uint, std::vector< SiStripCluster > > > clusterInSubComponentsToken_
MonitorElement * ChargeOfEachClusterTOB_all
edm::ParameterSet conf_
edm::EDGetTokenT< uint > sumOfClusterToken_

◆ bookHistograms()

void SiStripMonitorHLT::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 29 of file SiStripMonitorHLT.cc.

References dqm::implementation::IBooker::book1D(), ChargeOfEachClusterTEC_all, ChargeOfEachClusterTEC_hlt, ChargeOfEachClusterTIB_all, ChargeOfEachClusterTIB_hlt, ChargeOfEachClusterTOB_all, ChargeOfEachClusterTOB_hlt, conf_, edm::ParameterSet::getParameter(), HLTDecision, HLTDirectory, SiStripMonitorHLT_cfi::HLTProducer, NumberOfClustersAboveThreshold_all, NumberOfClustersAboveThreshold_hlt, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, SumOfClusterCharges_all, and SumOfClusterCharges_hlt.

29  {
32  HLTDecision = ibooker.book1D(HLTProducer + "_HLTDecision", HLTProducer + "HLTDecision", 2, -0.5, 1.5);
33  // all
34  SumOfClusterCharges_all = ibooker.book1D("SumOfClusterCharges_all", "SumOfClusterCharges_all", 50, 0, 2000);
36  ibooker.book1D("ChargeOfEachClusterTIB_all", "ChargeOfEachClusterTIB_all", 400, -0.5, 400.5);
38  ibooker.book1D("ChargeOfEachClusterTOB_all", "ChargeOfEachClusterTOB_all", 400, -0.5, 400.5);
40  ibooker.book1D("ChargeOfEachClusterTEC_all", "ChargeOfEachClusterTEC_all", 400, -0.5, 400.5);
42  ibooker.book1D("NumberOfClustersAboveThreshold_all", "NumberOfClustersAboveThreshold_all", 30, 30.5, 60.5);
43  // 31 = TIB2, 32 = TIB2, 33 = TIB3, 51 = TOB1, 52=TOB2, 60 = TEC
44  // accepted from HLT
45  SumOfClusterCharges_hlt = ibooker.book1D("SumOfClusterCharges_hlt", "SumOfClusterCharges_hlt", 50, 0, 2000);
47  ibooker.book1D("ChargeOfEachClusterTIB_hlt", "ChargeOfEachClusterTIB_hlt", 400, -0.5, 400.5);
49  ibooker.book1D("ChargeOfEachClusterTOB_hlt", "ChargeOfEachClusterTOB_hlt", 400, -0.5, 400.5);
51  ibooker.book1D("ChargeOfEachClusterTEC_hlt", "ChargeOfEachClusterTEC_hlt", 400, -0.5, 400.5);
53  ibooker.book1D("NumberOfClustersAboveThreshold_hlt", "NumberOfClustersAboveThreshold_hlt", 30, 30.5, 60.5);
54 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * NumberOfClustersAboveThreshold_all
MonitorElement * SumOfClusterCharges_all
MonitorElement * ChargeOfEachClusterTEC_hlt
std::string HLTDirectory
MonitorElement * ChargeOfEachClusterTIB_all
MonitorElement * NumberOfClustersAboveThreshold_hlt
MonitorElement * HLTDecision
MonitorElement * ChargeOfEachClusterTEC_all
MonitorElement * SumOfClusterCharges_hlt
MonitorElement * ChargeOfEachClusterTOB_hlt
MonitorElement * ChargeOfEachClusterTIB_hlt
MonitorElement * ChargeOfEachClusterTOB_all
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
edm::ParameterSet conf_

Member Data Documentation

◆ ChargeOfEachClusterTEC_all

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTEC_all
private

Definition at line 41 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ ChargeOfEachClusterTEC_hlt

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTEC_hlt
private

Definition at line 47 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ ChargeOfEachClusterTIB_all

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTIB_all
private

Definition at line 39 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ ChargeOfEachClusterTIB_hlt

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTIB_hlt
private

Definition at line 45 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ ChargeOfEachClusterTOB_all

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTOB_all
private

Definition at line 40 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ ChargeOfEachClusterTOB_hlt

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTOB_hlt
private

Definition at line 46 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ clusterInSubComponentsToken_

edm::EDGetTokenT<std::map<uint, std::vector<SiStripCluster> > > SiStripMonitorHLT::clusterInSubComponentsToken_
private

Definition at line 32 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().

◆ conf_

edm::ParameterSet SiStripMonitorHLT::conf_
private

Definition at line 34 of file SiStripMonitorHLT.h.

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

◆ filerDecisionToken_

edm::EDGetTokenT<int> SiStripMonitorHLT::filerDecisionToken_
private

Definition at line 30 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().

◆ HLTDecision

MonitorElement* SiStripMonitorHLT::HLTDecision
private

Definition at line 35 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ HLTDirectory

std::string SiStripMonitorHLT::HLTDirectory
private

Definition at line 49 of file SiStripMonitorHLT.h.

Referenced by bookHistograms(), and SiStripMonitorHLT().

◆ NumberOfClustersAboveThreshold_all

MonitorElement* SiStripMonitorHLT::NumberOfClustersAboveThreshold_all
private

Definition at line 38 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ NumberOfClustersAboveThreshold_hlt

MonitorElement* SiStripMonitorHLT::NumberOfClustersAboveThreshold_hlt
private

Definition at line 44 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ SumOfClusterCharges_all

MonitorElement* SiStripMonitorHLT::SumOfClusterCharges_all
private

Definition at line 37 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ SumOfClusterCharges_hlt

MonitorElement* SiStripMonitorHLT::SumOfClusterCharges_hlt
private

Definition at line 43 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ sumOfClusterToken_

edm::EDGetTokenT<uint> SiStripMonitorHLT::sumOfClusterToken_
private

Definition at line 31 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().