CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
 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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 21 of file SiStripMonitorHLT.cc.

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

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 }
std::string HLTDirectory
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< int > filerDecisionToken_
edm::EDGetTokenT< std::map< uint, std::vector< SiStripCluster > > > clusterInSubComponentsToken_
edm::ParameterSet conf_
edm::EDGetTokenT< uint > sumOfClusterToken_
SiStripMonitorHLT::~SiStripMonitorHLT ( )
inlineoverride

Definition at line 25 of file SiStripMonitorHLT.h.

25 {};

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 58 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::Event::getByToken(), edm::ParameterSet::getParameter(), HLTDecision, NumberOfClustersAboveThreshold_all, NumberOfClustersAboveThreshold_hlt, AlCaHLTBitMon_QueryRunRegistry::string, SumOfClusterCharges_all, SumOfClusterCharges_hlt, sumOfClusterToken_, and parallelization::uint().

58  {
59  // get from event
60  std::string HLTProducer = conf_.getParameter<std::string>("HLTProducer");
61  edm::Handle<int> filter_decision;
62  iEvent.getByToken(filerDecisionToken_, filter_decision); // filter decision
63  edm::Handle<uint> sum_of_clustch;
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 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
MonitorElement * NumberOfClustersAboveThreshold_all
MonitorElement * SumOfClusterCharges_all
void Fill(long long x)
MonitorElement * ChargeOfEachClusterTEC_hlt
MonitorElement * ChargeOfEachClusterTIB_all
MonitorElement * NumberOfClustersAboveThreshold_hlt
MonitorElement * HLTDecision
MonitorElement * ChargeOfEachClusterTEC_all
MonitorElement * SumOfClusterCharges_hlt
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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_
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.

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

31  {
33  std::string HLTProducer = conf_.getParameter<std::string>("HLTProducer");
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 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
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
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTEC_all
private

Definition at line 42 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTEC_hlt
private

Definition at line 48 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTIB_all
private

Definition at line 40 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTIB_hlt
private

Definition at line 46 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTOB_all
private

Definition at line 41 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTOB_hlt
private

Definition at line 47 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 33 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().

edm::ParameterSet SiStripMonitorHLT::conf_
private

Definition at line 35 of file SiStripMonitorHLT.h.

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

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

Definition at line 31 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().

MonitorElement* SiStripMonitorHLT::HLTDecision
private

Definition at line 36 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

std::string SiStripMonitorHLT::HLTDirectory
private

Definition at line 50 of file SiStripMonitorHLT.h.

Referenced by bookHistograms(), and SiStripMonitorHLT().

MonitorElement* SiStripMonitorHLT::NumberOfClustersAboveThreshold_all
private

Definition at line 39 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::NumberOfClustersAboveThreshold_hlt
private

Definition at line 45 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::SumOfClusterCharges_all
private

Definition at line 38 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::SumOfClusterCharges_hlt
private

Definition at line 44 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 32 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().