CMS 3D CMS Logo

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

#include <SiStripMonitorHLT.h>

Inheritance diagram for SiStripMonitorHLT:
one::DQMEDAnalyzer< T > one::dqmimplementation::DQMBaseClass< T... >

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 one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 

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_
 

Detailed Description

Definition at line 24 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, AlCaHLTBitMon_QueryRunRegistry::string, and sumOfClusterToken_.

21  {
22  HLTDirectory = "HLTResults";
23  conf_ = iConfig;
24 
26  consumes<int>(conf_.getParameter<std::string>("HLTProducer"));
28  consumes<uint>(conf_.getParameter<std::string>("HLTProducer"));
30  consumes<std::map<uint, std::vector<SiStripCluster> > >(
31  conf_.getParameter<std::string>("HLTProducer"));
32 }
T getParameter(std::string const &) const
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 ( )
inlineoverride

Definition at line 27 of file SiStripMonitorHLT.h.

References analyze(), and bookHistograms().

27 {};

Member Function Documentation

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

Definition at line 74 of file SiStripMonitorHLT.cc.

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

Referenced by ~SiStripMonitorHLT().

75  {
76  // get from event
77  std::string HLTProducer = conf_.getParameter<std::string>("HLTProducer");
78  edm::Handle<int> filter_decision;
79  iEvent.getByToken(filerDecisionToken_, filter_decision); // filter decision
80  edm::Handle<uint> sum_of_clustch;
82  sum_of_clustch); // sum of cluster charges
83  // first element of pair: layer: TIB1, ...., TEC; second element: nr of
84  // clusters above threshold
86  clusters_in_subcomponents;
87  if (HLTProducer == "ClusterMTCCFilter")
88  iEvent.getByToken(clusterInSubComponentsToken_, clusters_in_subcomponents);
89 
90  // trigger decision
91  HLTDecision->Fill(*filter_decision);
92 
93  // sum of charges of clusters
94  SumOfClusterCharges_all->Fill(*sum_of_clustch);
95  if (*filter_decision) SumOfClusterCharges_hlt->Fill(*sum_of_clustch);
96 
97  // clusters in different layers
98  if (HLTProducer == "ClusterMTCCFilter") {
99  // loop over layers ("subcomponents")
100  for (std::map<uint, std::vector<SiStripCluster> >::const_iterator it =
101  clusters_in_subcomponents->begin();
102  it != clusters_in_subcomponents->end(); it++) {
103  int generalized_layer = it->first;
104  std::vector<SiStripCluster> theclusters = it->second;
106  generalized_layer,
107  theclusters.size()); // number of clusters in this generalized layer
108  if (*filter_decision)
109  NumberOfClustersAboveThreshold_hlt->Fill(generalized_layer,
110  theclusters.size());
111  // loop over clusters (and detids)
112  for (std::vector<SiStripCluster>::const_iterator icluster =
113  theclusters.begin();
114  icluster != theclusters.end(); icluster++) {
115  // calculate sum of amplitudes
116  unsigned int amplclus = 0;
117  for (auto ia = icluster->amplitudes().begin();
118  ia != icluster->amplitudes().end(); ia++) {
119  if ((*ia) > 0) amplclus += (*ia); // why should this be negative?
120  }
121  if (generalized_layer == 31 || generalized_layer == 32 ||
122  generalized_layer ==
123  33) { // you can also ask the detid here whether is TIB
124  ChargeOfEachClusterTIB_all->Fill(amplclus, 1.);
125  if (*filter_decision) ChargeOfEachClusterTIB_hlt->Fill(amplclus, 1.);
126  }
127  if (generalized_layer == 51 || generalized_layer == 52) {
128  ChargeOfEachClusterTOB_all->Fill(amplclus, 1.);
129  if (*filter_decision) ChargeOfEachClusterTOB_hlt->Fill(amplclus, 1.);
130  }
131  if (generalized_layer == 60) {
132  ChargeOfEachClusterTEC_all->Fill(amplclus, 1.);
133  if (*filter_decision) ChargeOfEachClusterTEC_hlt->Fill(amplclus, 1.);
134  }
135  }
136  }
137  }
138 }
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
MonitorElement * NumberOfClustersAboveThreshold_all
void Fill(long long x)
MonitorElement * SumOfClusterCharges_all
MonitorElement * ChargeOfEachClusterTEC_hlt
MonitorElement * ChargeOfEachClusterTIB_all
MonitorElement * NumberOfClustersAboveThreshold_hlt
MonitorElement * HLTDecision
MonitorElement * ChargeOfEachClusterTEC_all
MonitorElement * SumOfClusterCharges_hlt
def uint(string)
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 ,
edm::Run const &  ,
edm::EventSetup const &   
)
override

Definition at line 34 of file SiStripMonitorHLT.cc.

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

Referenced by ~SiStripMonitorHLT().

36  {
37  ibooker.setCurrentFolder(HLTDirectory);
38  std::string HLTProducer = conf_.getParameter<std::string>("HLTProducer");
39  HLTDecision = ibooker.book1D(HLTProducer + "_HLTDecision",
40  HLTProducer + "HLTDecision", 2, -0.5, 1.5);
41  // all
42  SumOfClusterCharges_all = ibooker.book1D(
43  "SumOfClusterCharges_all", "SumOfClusterCharges_all", 50, 0, 2000);
45  ibooker.book1D("ChargeOfEachClusterTIB_all", "ChargeOfEachClusterTIB_all",
46  400, -0.5, 400.5);
48  ibooker.book1D("ChargeOfEachClusterTOB_all", "ChargeOfEachClusterTOB_all",
49  400, -0.5, 400.5);
51  ibooker.book1D("ChargeOfEachClusterTEC_all", "ChargeOfEachClusterTEC_all",
52  400, -0.5, 400.5);
54  ibooker.book1D("NumberOfClustersAboveThreshold_all",
55  "NumberOfClustersAboveThreshold_all", 30, 30.5, 60.5);
56  // 31 = TIB2, 32 = TIB2, 33 = TIB3, 51 = TOB1, 52=TOB2, 60 = TEC
57  // accepted from HLT
58  SumOfClusterCharges_hlt = ibooker.book1D(
59  "SumOfClusterCharges_hlt", "SumOfClusterCharges_hlt", 50, 0, 2000);
61  ibooker.book1D("ChargeOfEachClusterTIB_hlt", "ChargeOfEachClusterTIB_hlt",
62  400, -0.5, 400.5);
64  ibooker.book1D("ChargeOfEachClusterTOB_hlt", "ChargeOfEachClusterTOB_hlt",
65  400, -0.5, 400.5);
67  ibooker.book1D("ChargeOfEachClusterTEC_hlt", "ChargeOfEachClusterTEC_hlt",
68  400, -0.5, 400.5);
70  ibooker.book1D("NumberOfClustersAboveThreshold_hlt",
71  "NumberOfClustersAboveThreshold_hlt", 30, 30.5, 60.5);
72 }
T getParameter(std::string const &) const
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
edm::ParameterSet conf_

Member Data Documentation

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTEC_all
private

Definition at line 46 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTEC_hlt
private

Definition at line 52 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTIB_all
private

Definition at line 44 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTIB_hlt
private

Definition at line 50 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTOB_all
private

Definition at line 45 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTOB_hlt
private

Definition at line 51 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 37 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().

edm::ParameterSet SiStripMonitorHLT::conf_
private

Definition at line 39 of file SiStripMonitorHLT.h.

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

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

Definition at line 34 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().

MonitorElement* SiStripMonitorHLT::HLTDecision
private

Definition at line 40 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

std::string SiStripMonitorHLT::HLTDirectory
private

Definition at line 54 of file SiStripMonitorHLT.h.

Referenced by bookHistograms(), and SiStripMonitorHLT().

MonitorElement* SiStripMonitorHLT::NumberOfClustersAboveThreshold_all
private

Definition at line 43 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::NumberOfClustersAboveThreshold_hlt
private

Definition at line 49 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::SumOfClusterCharges_all
private

Definition at line 42 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::SumOfClusterCharges_hlt
private

Definition at line 48 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 35 of file SiStripMonitorHLT.h.

Referenced by analyze(), and SiStripMonitorHLT().