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
 
- 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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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 >
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
 
- 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 22 of file SiStripMonitorHLT.h.

Constructor & Destructor Documentation

◆ SiStripMonitorHLT()

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

Definition at line 21 of file SiStripMonitorHLT.cc.

21  {
22  HLTDirectory = "HLTResults";
23  conf_ = iConfig;
24 
25  filerDecisionToken_ = consumes<int>(conf_.getParameter<std::string>("HLTProducer"));
26  sumOfClusterToken_ = consumes<uint>(conf_.getParameter<std::string>("HLTProducer"));
28  consumes<std::map<uint, std::vector<SiStripCluster> > >(conf_.getParameter<std::string>("HLTProducer"));
29 }

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

◆ ~SiStripMonitorHLT()

SiStripMonitorHLT::~SiStripMonitorHLT ( )
inlineoverride

Definition at line 25 of file SiStripMonitorHLT.h.

25 {};

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 58 of file SiStripMonitorHLT.cc.

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

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.

◆ bookHistograms()

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

Implements DQMEDAnalyzer.

Definition at line 31 of file SiStripMonitorHLT.cc.

31  {
32  ibooker.setCurrentFolder(HLTDirectory);
34  HLTDecision = ibooker.book1D(HLTProducer + "_HLTDecision", HLTProducer + "HLTDecision", 2, -0.5, 1.5);
35  // all
36  SumOfClusterCharges_all = ibooker.book1D("SumOfClusterCharges_all", "SumOfClusterCharges_all", 50, 0, 2000);
38  ibooker.book1D("ChargeOfEachClusterTIB_all", "ChargeOfEachClusterTIB_all", 400, -0.5, 400.5);
40  ibooker.book1D("ChargeOfEachClusterTOB_all", "ChargeOfEachClusterTOB_all", 400, -0.5, 400.5);
42  ibooker.book1D("ChargeOfEachClusterTEC_all", "ChargeOfEachClusterTEC_all", 400, -0.5, 400.5);
44  ibooker.book1D("NumberOfClustersAboveThreshold_all", "NumberOfClustersAboveThreshold_all", 30, 30.5, 60.5);
45  // 31 = TIB2, 32 = TIB2, 33 = TIB3, 51 = TOB1, 52=TOB2, 60 = TEC
46  // accepted from HLT
47  SumOfClusterCharges_hlt = ibooker.book1D("SumOfClusterCharges_hlt", "SumOfClusterCharges_hlt", 50, 0, 2000);
49  ibooker.book1D("ChargeOfEachClusterTIB_hlt", "ChargeOfEachClusterTIB_hlt", 400, -0.5, 400.5);
51  ibooker.book1D("ChargeOfEachClusterTOB_hlt", "ChargeOfEachClusterTOB_hlt", 400, -0.5, 400.5);
53  ibooker.book1D("ChargeOfEachClusterTEC_hlt", "ChargeOfEachClusterTEC_hlt", 400, -0.5, 400.5);
55  ibooker.book1D("NumberOfClustersAboveThreshold_hlt", "NumberOfClustersAboveThreshold_hlt", 30, 30.5, 60.5);
56 }

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.

Member Data Documentation

◆ ChargeOfEachClusterTEC_all

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTEC_all
private

Definition at line 42 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ ChargeOfEachClusterTEC_hlt

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTEC_hlt
private

Definition at line 48 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ ChargeOfEachClusterTIB_all

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTIB_all
private

Definition at line 40 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ ChargeOfEachClusterTIB_hlt

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTIB_hlt
private

Definition at line 46 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ ChargeOfEachClusterTOB_all

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTOB_all
private

Definition at line 41 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ ChargeOfEachClusterTOB_hlt

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTOB_hlt
private

Definition at line 47 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ clusterInSubComponentsToken_

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

Definition at line 33 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().

◆ conf_

edm::ParameterSet SiStripMonitorHLT::conf_
private

Definition at line 35 of file SiStripMonitorHLT.h.

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

◆ filerDecisionToken_

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

Definition at line 31 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().

◆ HLTDecision

MonitorElement* SiStripMonitorHLT::HLTDecision
private

Definition at line 36 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ HLTDirectory

std::string SiStripMonitorHLT::HLTDirectory
private

Definition at line 50 of file SiStripMonitorHLT.h.

Referenced by bookHistograms(), and SiStripMonitorHLT().

◆ NumberOfClustersAboveThreshold_all

MonitorElement* SiStripMonitorHLT::NumberOfClustersAboveThreshold_all
private

Definition at line 39 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ NumberOfClustersAboveThreshold_hlt

MonitorElement* SiStripMonitorHLT::NumberOfClustersAboveThreshold_hlt
private

Definition at line 45 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ SumOfClusterCharges_all

MonitorElement* SiStripMonitorHLT::SumOfClusterCharges_all
private

Definition at line 38 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ SumOfClusterCharges_hlt

MonitorElement* SiStripMonitorHLT::SumOfClusterCharges_hlt
private

Definition at line 44 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

◆ sumOfClusterToken_

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

Definition at line 32 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().

SiStripMonitorHLT_cfi.HLTProducer
HLTProducer
Definition: SiStripMonitorHLT_cfi.py:5
SiStripMonitorHLT::SumOfClusterCharges_all
MonitorElement * SumOfClusterCharges_all
Definition: SiStripMonitorHLT.h:38
edm::Handle< int >
parallelization.uint
uint
Definition: parallelization.py:124
SiStripMonitorHLT::NumberOfClustersAboveThreshold_all
MonitorElement * NumberOfClustersAboveThreshold_all
Definition: SiStripMonitorHLT.h:39
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
SiStripMonitorHLT::ChargeOfEachClusterTIB_all
MonitorElement * ChargeOfEachClusterTIB_all
Definition: SiStripMonitorHLT.h:40
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripMonitorHLT::NumberOfClustersAboveThreshold_hlt
MonitorElement * NumberOfClustersAboveThreshold_hlt
Definition: SiStripMonitorHLT.h:45
SiStripMonitorHLT::ChargeOfEachClusterTEC_hlt
MonitorElement * ChargeOfEachClusterTEC_hlt
Definition: SiStripMonitorHLT.h:48
iEvent
int iEvent
Definition: GenABIO.cc:224
SiStripMonitorHLT::filerDecisionToken_
edm::EDGetTokenT< int > filerDecisionToken_
Definition: SiStripMonitorHLT.h:31
SiStripMonitorHLT::HLTDirectory
std::string HLTDirectory
Definition: SiStripMonitorHLT.h:50
SiStripMonitorHLT::ChargeOfEachClusterTEC_all
MonitorElement * ChargeOfEachClusterTEC_all
Definition: SiStripMonitorHLT.h:42
SiStripMonitorHLT::SumOfClusterCharges_hlt
MonitorElement * SumOfClusterCharges_hlt
Definition: SiStripMonitorHLT.h:44
SiStripMonitorHLT::HLTDecision
MonitorElement * HLTDecision
Definition: SiStripMonitorHLT.h:36
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
SiStripMonitorHLT::conf_
edm::ParameterSet conf_
Definition: SiStripMonitorHLT.h:35
SiStripMonitorHLT::sumOfClusterToken_
edm::EDGetTokenT< uint > sumOfClusterToken_
Definition: SiStripMonitorHLT.h:32
SiStripMonitorHLT::ChargeOfEachClusterTOB_all
MonitorElement * ChargeOfEachClusterTOB_all
Definition: SiStripMonitorHLT.h:41
SiStripMonitorHLT::ChargeOfEachClusterTIB_hlt
MonitorElement * ChargeOfEachClusterTIB_hlt
Definition: SiStripMonitorHLT.h:46
SiStripMonitorHLT::ChargeOfEachClusterTOB_hlt
MonitorElement * ChargeOfEachClusterTOB_hlt
Definition: SiStripMonitorHLT.h:47
genParticles_cff.map
map
Definition: genParticles_cff.py:11
SiStripMonitorHLT::clusterInSubComponentsToken_
edm::EDGetTokenT< std::map< uint, std::vector< SiStripCluster > > > clusterInSubComponentsToken_
Definition: SiStripMonitorHLT.h:33