CMS 3D CMS Logo

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

#include <L1TDTTPGClient.h>

Inheritance diagram for L1TDTTPGClient:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1TDTTPGClient (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~L1TDTTPGClient ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

virtual void dqmEndJob (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
 
- 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)
 

Private Member Functions

TH1F * get1DHisto (std::string meName, DQMStore::IGetter &igetter)
 
TProfile * get1DProfile (std::string meName, DQMStore::IGetter &igetter)
 
TH2F * get2DHisto (std::string meName, DQMStore::IGetter &igetter)
 
TProfile2D * get2DProfile (std::string meName, DQMStore::IGetter &igetter)
 
void initialize ()
 
void makeRatioHisto (DQMStore::IGetter &igetter, MonitorElement *ratioME, std::string &nName, std::string &dName)
 
void setMapPhLabel (MonitorElement *me)
 
void setMapThLabel (MonitorElement *me)
 

Private Attributes

int counterEvt_
 counter More...
 
int counterLS_
 
MonitorElementdttpgphmap2ndf
 
MonitorElementdttpgphmapbxf [3]
 
MonitorElementdttpgphmapcorrf
 prescale on number of events More...
 
MonitorElementdttpgthmapbxf [3]
 
MonitorElementdttpgthmaphf
 
std::string input_dir_
 
std::string monitorName_
 
std::string output_dir_
 
edm::ParameterSet parameters_
 
int prescaleEvt_
 units of lumi sections More...
 
int prescaleLS_
 counter More...
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 22 of file L1TDTTPGClient.h.

Constructor & Destructor Documentation

L1TDTTPGClient::L1TDTTPGClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 23 of file L1TDTTPGClient.cc.

References initialize().

24 {
25  parameters_=ps;
26  initialize();
27 }
edm::ParameterSet parameters_
L1TDTTPGClient::~L1TDTTPGClient ( )
virtual

Destructor.

Definition at line 29 of file L1TDTTPGClient.cc.

29  {
30  LogInfo("TriggerDQM")<<"[TriggerDQM]: ending... ";
31 }

Member Function Documentation

void L1TDTTPGClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 58 of file L1TDTTPGClient.cc.

References DQMStore::IBooker::book2D(), and DQMStore::IBooker::setCurrentFolder().

58  {
59 
61 
62  // booking
63 
64  dttpgphmapcorrf = ibooker.book2D("DT_TPG_phi_map_corr_frac",
65  "Fraction of correlated best triggers per station",20,1,21,12,0,12);
66  dttpgphmap2ndf = ibooker.book2D("DT_TPG_phi_map_2nd_frac",
67  "Fraction of second tracks per station",20,1,21,12,0,12);
68  dttpgphmapbxf[0] = ibooker.book2D("DT_TPG_phi_map_bx-1_frac",
69  "Fraction of triggers per station (BX=-1)",20,1,21,12,0,12);
70  dttpgphmapbxf[1] = ibooker.book2D("DT_TPG_phi_map_bx0_frac",
71  "Fraction of triggers per station (BX=0)",20,1,21,12,0,12);
72  dttpgphmapbxf[2] = ibooker.book2D("DT_TPG_phi_map_bx+1_frac",
73  "Fraction of triggers per station (BX=1)",20,1,21,12,0,12);
79 
80  dttpgthmaphf = ibooker.book2D("DT_TPG_theta_map_corr_frac",
81  "Fraction of H quality best triggers per station",15,1,16,12,0,12);
82  dttpgthmapbxf[0] = ibooker.book2D("DT_TPG_theta_map_bx-1_frac",
83  "Fraction of triggers per station (BX=-1)",15,1,16,12,0,12);
84  dttpgthmapbxf[1] = ibooker.book2D("DT_TPG_theta_map_bx0_frac",
85  "Fraction of triggers per station (BX=0)",15,1,16,12,0,12);
86  dttpgthmapbxf[2] = ibooker.book2D("DT_TPG_theta_map_bx+1_frac",
87  "Fraction of triggers per station (BX=1)",15,1,16,12,0,12);
92 
93 // cout << "L1TDTTPGClient::analyze" << endl;
94  counterEvt_++;
95  if (prescaleEvt_<1) return;
96  if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0) return;
97 
98  string nName = "DT_TPG_phi_best_map_corr";
99  string dName = "DT_TPG_phi_best_map";
100  makeRatioHisto(igetter,dttpgphmapcorrf,nName,dName);
101  dName = "DT_TPG_phi_map";
102  nName = "DT_TPG_phi_map_2nd";
103  makeRatioHisto(igetter,dttpgphmap2ndf,nName,dName);
104  nName = "DT_TPG_phi_map_bx-1";
105  makeRatioHisto(igetter,dttpgphmapbxf[0],nName,dName);
106  nName = "DT_TPG_phi_map_bx0";
107  makeRatioHisto(igetter,dttpgphmapbxf[1],nName,dName);
108  nName = "DT_TPG_phi_map_bx+1";
109  makeRatioHisto(igetter,dttpgphmapbxf[2],nName,dName);
110 
111  nName = "DT_TPG_theta_best_map_h";
112  dName = "DT_TPG_theta_best_map";
113  makeRatioHisto(igetter,dttpgthmaphf,nName,dName);
114  dName = "DT_TPG_theta_map";
115  nName = "DT_TPG_theta_map_bx-1";
116  makeRatioHisto(igetter,dttpgthmapbxf[0],nName,dName);
117  nName = "DT_TPG_theta_map_bx0";
118  makeRatioHisto(igetter,dttpgthmapbxf[1],nName,dName);
119  nName = "DT_TPG_theta_map_bx+1";
120  makeRatioHisto(igetter,dttpgthmapbxf[2],nName,dName);
121 }
int prescaleEvt_
units of lumi sections
void setMapThLabel(MonitorElement *me)
MonitorElement * dttpgphmapcorrf
prescale on number of events
MonitorElement * dttpgphmapbxf[3]
MonitorElement * dttpgthmapbxf[3]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::string output_dir_
void makeRatioHisto(DQMStore::IGetter &igetter, MonitorElement *ratioME, std::string &nName, std::string &dName)
MonitorElement * dttpgthmaphf
void setMapPhLabel(MonitorElement *me)
MonitorElement * dttpgphmap2ndf
int counterEvt_
counter
TH1F * L1TDTTPGClient::get1DHisto ( std::string  meName,
DQMStore::IGetter igetter 
)
private

Definition at line 151 of file L1TDTTPGClient.cc.

References DQMStore::IGetter::get(), MonitorElement::getTH1F(), and NULL.

152 {
153 
154  MonitorElement * me_ = igetter.get(meName);
155 
156  if (!me_) {
157  LogInfo("TriggerDQM") << "ME NOT FOUND.";
158  return NULL;
159  }
160 
161  return me_->getTH1F();
162 }
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
#define NULL
Definition: scimark2.h:8
TH1F * getTH1F(void) const
TProfile * L1TDTTPGClient::get1DProfile ( std::string  meName,
DQMStore::IGetter igetter 
)
private

Definition at line 195 of file L1TDTTPGClient.cc.

References DQMStore::IGetter::get(), MonitorElement::getTProfile(), and NULL.

196 {
197 
198 
199  MonitorElement * me_ = igetter.get(meName);
200 
201  if (!me_) {
202  LogInfo("TriggerDQM") << "ME NOT FOUND.";
203  return NULL;
204  }
205 
206  return me_->getTProfile();
207 }
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
#define NULL
Definition: scimark2.h:8
TProfile * getTProfile(void) const
TH2F * L1TDTTPGClient::get2DHisto ( std::string  meName,
DQMStore::IGetter igetter 
)
private

Definition at line 164 of file L1TDTTPGClient.cc.

References DQMStore::IGetter::get(), MonitorElement::getTH2F(), and NULL.

165 {
166 
167 
168  MonitorElement * me_ = igetter.get(meName);
169 
170  if (!me_) {
171  LogInfo("TriggerDQM") << "ME NOT FOUND.";
172  return NULL;
173  }
174 
175  return me_->getTH2F();
176 }
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
#define NULL
Definition: scimark2.h:8
TH2F * getTH2F(void) const
TProfile2D * L1TDTTPGClient::get2DProfile ( std::string  meName,
DQMStore::IGetter igetter 
)
private

Definition at line 180 of file L1TDTTPGClient.cc.

References DQMStore::IGetter::get(), MonitorElement::getTProfile2D(), and NULL.

181 {
182 
183 
184  MonitorElement * me_ = igetter.get(meName);
185 
186  if (!me_) {
187  LogInfo("TriggerDQM") << "ME NOT FOUND.";
188  return NULL;
189  }
190 
191  return me_->getTProfile2D();
192 }
TProfile2D * getTProfile2D(void) const
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
#define NULL
Definition: scimark2.h:8
void L1TDTTPGClient::initialize ( )
private

Definition at line 34 of file L1TDTTPGClient.cc.

34  {
35 
36  counterLS_=0;
37  counterEvt_=0;
38 
39  // get back-end interface
40  //dbe_ = Service<DQMStore>().operator->();
41 
42  // base folder for the contents of this job
43  monitorName_ = parameters_.getUntrackedParameter<string>("monitorName","");
44 // cout << "Monitor name = " << monitorName_ << endl;
45  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
46 // cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< endl;
47  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
48 // cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< endl;
49  output_dir_ = parameters_.getUntrackedParameter<string>("output_dir","");
50 // cout << "DQM output dir = " << output_dir_ << endl;
51  input_dir_ = parameters_.getUntrackedParameter<string>("input_dir","");
52 // cout << "DQM input dir = " << input_dir_ << endl;
53 
54  LogInfo( "TriggerDQM");
55 }
std::string input_dir_
T getUntrackedParameter(std::string const &, T const &) const
int prescaleEvt_
units of lumi sections
edm::ParameterSet parameters_
int prescaleLS_
counter
std::string output_dir_
std::string monitorName_
int counterEvt_
counter
void L1TDTTPGClient::makeRatioHisto ( DQMStore::IGetter igetter,
MonitorElement ratioME,
std::string &  nName,
std::string &  dName 
)
private

Definition at line 123 of file L1TDTTPGClient.cc.

References cuy::denominator, MonitorElement::getName(), MonitorElement::getTH2F(), cuy::numerator, and particleFlowDisplacedVertex_cfi::ratio.

124 {
125 
126  TH2F *numerator;
127  TH2F *denominator;
128 
129  denominator = this->get2DHisto(input_dir_+"/"+dName,igetter);
130  numerator = this->get2DHisto(input_dir_+"/"+nName,igetter);
131 
132  if (numerator && denominator) {
133 
134  TH2F * ratio = ratioME->getTH2F();
135  if (ratio) {
136  ratio->Divide(numerator,denominator);
137  }
138  else {
139  LogInfo("TriggerDQM") << "[TriggerDQM]: ratio histo named \"" << ratioME->getName() << "\" not found!" << endl;
140  }
141  }
142  else {
143  if (!numerator)
144  LogInfo("TriggerDQM") << "[TriggerDQM]: numerator histo \"" << nName << "\" not found!" << endl;
145  if (!denominator)
146  LogInfo("TriggerDQM") << "[TriggerDQM]: denominator histo \"" << dName << "\" not found!" << endl;
147  }
148 
149 }
std::string input_dir_
const std::string & getName(void) const
get name of ME
numerator
Definition: cuy.py:483
TH2F * get2DHisto(std::string meName, DQMStore::IGetter &igetter)
denominator
Definition: cuy.py:484
TH2F * getTH2F(void) const
void L1TDTTPGClient::setMapPhLabel ( MonitorElement me)
private

Definition at line 210 of file L1TDTTPGClient.cc.

References mps_fire::i, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and makeMuonMisalignmentScenario::wheel.

211 {
212 
213  me->setAxisTitle("DTTF Sector",2);
214  for(int i=0;i<5;i++){
215  ostringstream wheel;
216  wheel << i-2;
217  me->setBinLabel(1+i*4,"Wheel "+ wheel.str(),1);
218  }
219 
220 }
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void L1TDTTPGClient::setMapThLabel ( MonitorElement me)
private

Definition at line 223 of file L1TDTTPGClient.cc.

References mps_fire::i, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and makeMuonMisalignmentScenario::wheel.

224 {
225 
226  me->setAxisTitle("DTTF Sector",2);
227  for(int i=0;i<5;i++){
228  ostringstream wheel;
229  wheel << i-2;
230  me->setBinLabel(1+i*3,"Wheel "+ wheel.str(),1);
231  }
232 
233 }
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

int L1TDTTPGClient::counterEvt_
private

counter

Definition at line 52 of file L1TDTTPGClient.h.

int L1TDTTPGClient::counterLS_
private

Definition at line 51 of file L1TDTTPGClient.h.

MonitorElement* L1TDTTPGClient::dttpgphmap2ndf
private

Definition at line 59 of file L1TDTTPGClient.h.

MonitorElement* L1TDTTPGClient::dttpgphmapbxf[3]
private

Definition at line 60 of file L1TDTTPGClient.h.

MonitorElement* L1TDTTPGClient::dttpgphmapcorrf
private

prescale on number of events

Definition at line 58 of file L1TDTTPGClient.h.

MonitorElement* L1TDTTPGClient::dttpgthmapbxf[3]
private

Definition at line 62 of file L1TDTTPGClient.h.

MonitorElement* L1TDTTPGClient::dttpgthmaphf
private

Definition at line 61 of file L1TDTTPGClient.h.

std::string L1TDTTPGClient::input_dir_
private

Definition at line 49 of file L1TDTTPGClient.h.

std::string L1TDTTPGClient::monitorName_
private

Definition at line 48 of file L1TDTTPGClient.h.

std::string L1TDTTPGClient::output_dir_
private

Definition at line 50 of file L1TDTTPGClient.h.

edm::ParameterSet L1TDTTPGClient::parameters_
private
int L1TDTTPGClient::prescaleEvt_
private

units of lumi sections

Definition at line 54 of file L1TDTTPGClient.h.

int L1TDTTPGClient::prescaleLS_
private

counter

Definition at line 53 of file L1TDTTPGClient.h.