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::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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 &ev, edm::EventSetup const &es) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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_
 
DQMStoredqmStore_
 
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 edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

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_, dqmStore_, filerDecisionToken_, edm::ParameterSet::getParameter(), HLTDirectory, Utilities::operator, AlCaHLTBitMon_QueryRunRegistry::string, and sumOfClusterToken_.

21  {
22  HLTDirectory = "HLTResults";
24  conf_ = iConfig;
25 
27  consumes<int>(conf_.getParameter<std::string>("HLTProducer"));
29  consumes<uint>(conf_.getParameter<std::string>("HLTProducer"));
31  consumes<std::map<uint, std::vector<SiStripCluster> > >(
32  conf_.getParameter<std::string>("HLTProducer"));
33 }
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 75 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().

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

Implements DQMEDAnalyzer.

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

37  {
38  ibooker.setCurrentFolder(HLTDirectory);
39  std::string HLTProducer = conf_.getParameter<std::string>("HLTProducer");
40  HLTDecision = ibooker.book1D(HLTProducer + "_HLTDecision",
41  HLTProducer + "HLTDecision", 2, -0.5, 1.5);
42  // all
43  SumOfClusterCharges_all = ibooker.book1D(
44  "SumOfClusterCharges_all", "SumOfClusterCharges_all", 50, 0, 2000);
46  ibooker.book1D("ChargeOfEachClusterTIB_all", "ChargeOfEachClusterTIB_all",
47  400, -0.5, 400.5);
49  ibooker.book1D("ChargeOfEachClusterTOB_all", "ChargeOfEachClusterTOB_all",
50  400, -0.5, 400.5);
52  ibooker.book1D("ChargeOfEachClusterTEC_all", "ChargeOfEachClusterTEC_all",
53  400, -0.5, 400.5);
55  ibooker.book1D("NumberOfClustersAboveThreshold_all",
56  "NumberOfClustersAboveThreshold_all", 30, 30.5, 60.5);
57  // 31 = TIB2, 32 = TIB2, 33 = TIB3, 51 = TOB1, 52=TOB2, 60 = TEC
58  // accepted from HLT
59  SumOfClusterCharges_hlt = ibooker.book1D(
60  "SumOfClusterCharges_hlt", "SumOfClusterCharges_hlt", 50, 0, 2000);
62  ibooker.book1D("ChargeOfEachClusterTIB_hlt", "ChargeOfEachClusterTIB_hlt",
63  400, -0.5, 400.5);
65  ibooker.book1D("ChargeOfEachClusterTOB_hlt", "ChargeOfEachClusterTOB_hlt",
66  400, -0.5, 400.5);
68  ibooker.book1D("ChargeOfEachClusterTEC_hlt", "ChargeOfEachClusterTEC_hlt",
69  400, -0.5, 400.5);
71  ibooker.book1D("NumberOfClustersAboveThreshold_hlt",
72  "NumberOfClustersAboveThreshold_hlt", 30, 30.5, 60.5);
73 }
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 47 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTEC_hlt
private

Definition at line 53 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTIB_all
private

Definition at line 45 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTIB_hlt
private

Definition at line 51 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTOB_all
private

Definition at line 46 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::ChargeOfEachClusterTOB_hlt
private

Definition at line 52 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 40 of file SiStripMonitorHLT.h.

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

DQMStore* SiStripMonitorHLT::dqmStore_
private

Definition at line 39 of file SiStripMonitorHLT.h.

Referenced by 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 41 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

std::string SiStripMonitorHLT::HLTDirectory
private

Definition at line 55 of file SiStripMonitorHLT.h.

Referenced by bookHistograms(), and SiStripMonitorHLT().

MonitorElement* SiStripMonitorHLT::NumberOfClustersAboveThreshold_all
private

Definition at line 44 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::NumberOfClustersAboveThreshold_hlt
private

Definition at line 50 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::SumOfClusterCharges_all
private

Definition at line 43 of file SiStripMonitorHLT.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiStripMonitorHLT::SumOfClusterCharges_hlt
private

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