CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
DTLocalTriggerBaseTest Class Referenceabstract

#include <DTLocalTriggerBaseTest.h>

Inheritance diagram for DTLocalTriggerBaseTest:
DQMEDHarvester edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper DTLocalTriggerEfficiencyTest DTLocalTriggerLutTest DTLocalTriggerSynchTest DTLocalTriggerTest DTLocalTriggerTPTest DTTriggerEfficiencyTest DTTriggerLutTest

Public Member Functions

 DTLocalTriggerBaseTest ()
 Constructor. More...
 
 ~DTLocalTriggerBaseTest () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () 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 () noexcept(false) 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void beginRun (edm::Run const &run, edm::EventSetup const &context) override
 BeginRun. More...
 
void bookCmsHistos (DQMStore::IBooker &, std::string hTag, std::string folder="", bool isGlb=false)
 Book the new MEs (CMS summary) More...
 
void bookSectorHistos (DQMStore::IBooker &, int wheel, int sector, std::string hTag, std::string folder="")
 Book the new MEs (for each sector) More...
 
void bookWheelHistos (DQMStore::IBooker &, int wheel, std::string hTag, std::string folder="")
 Book the new MEs (for each wheel) More...
 
std::string category ()
 Get message logger name. More...
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 Perform client diagnostic in online. More...
 
void endRun (edm::Run const &run, edm::EventSetup const &context) override
 Perform client diagnostic in offline. More...
 
std::string fullName (std::string htype)
 Create fullname from histo partial name. More...
 
template<class T >
TgetHisto (MonitorElement *me)
 Convert ME to Histogram fo type T. More...
 
std::string getMEName (std::string histoTag, std::string subfolder, const DTChamberId &chambid)
 Get the ME name (by chamber) More...
 
std::string getMEName (std::string histoTag, std::string subfolder, int wh)
 Get the ME name (by wheel) More...
 
std::pair< float, float > phiRange (const DTChamberId &id)
 Calculate phi range for histograms. More...
 
virtual void runClientDiagnostic (DQMStore::IBooker &, DQMStore::IGetter &)=0
 Perform client analysis. More...
 
void setConfig (const edm::ParameterSet &ps, std::string name)
 Set configuration variables. More...
 
std::string & topFolder ()
 Get top folder name. More...
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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

std::string baseFolderTM
 
std::map< std::string, MonitorElement * > cmsME
 
std::string hwSource
 
std::vector< std::string > hwSources
 
edm::ESHandle< DTGeometrymuonGeom
 
int nevents
 
unsigned int nLumiSegs
 
edm::ParameterSet parameters
 
int prescaleFactor
 
int run
 
bool runOnline
 
std::map< int, std::map< std::string, MonitorElement * > > secME
 
std::string sourceFolder
 
std::string testName
 
std::string trigSource
 
std::vector< std::string > trigSources
 
std::map< int, std::map< std::string, MonitorElement * > > whME
 
- Protected Attributes inherited from DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- 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)
 

Detailed Description

Definition at line 38 of file DTLocalTriggerBaseTest.h.

Constructor & Destructor Documentation

DTLocalTriggerBaseTest::DTLocalTriggerBaseTest ( )
inline
DTLocalTriggerBaseTest::~DTLocalTriggerBaseTest ( )
override

Destructor.

Definition at line 33 of file DTLocalTriggerBaseTest.cc.

References taus_updatedMVAIds_cff::category, cmsHarvester::nevents, and L1TBPTX_cfi::testName.

Referenced by DTLocalTriggerBaseTest().

33  {
34  LogVerbatim(category()) << "[" << testName << "Test]: analyzed " << nevents << " events";
35 }
std::string category()
Get message logger name.

Member Function Documentation

void DTLocalTriggerBaseTest::beginRun ( edm::Run const &  run,
edm::EventSetup const &  context 
)
overrideprotected
void DTLocalTriggerBaseTest::bookCmsHistos ( DQMStore::IBooker ,
std::string  hTag,
std::string  folder = "",
bool  isGlb = false 
)
protected

Book the new MEs (CMS summary)

Definition at line 194 of file DTLocalTriggerBaseTest.cc.

References makeHippyCampaign::basedir, dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), taus_updatedMVAIds_cff::category, newFWLiteAna::fullName, LogTrace, hlt_dqm_clientPB-live_cfg::me, dqm::impl::MonitorElement::setAxisTitle(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and L1TBPTX_cfi::testName.

Referenced by DTLocalTriggerBaseTest().

194  {
195  string basedir = topFolder();
196  if (!folder.empty()) {
197  basedir += folder + "/";
198  }
199 
200  ibooker.setCurrentFolder(basedir);
201 
202  string hname = isGlb ? hTag : fullName(hTag);
203  LogTrace(category()) << "[" << testName << "Test]: booking " << basedir << hname;
204 
205  MonitorElement* me = ibooker.book2D(hname.c_str(), hname.c_str(), 12, 1, 13, 5, -2, 3);
206  me->setAxisTitle("Sector", 1);
207  me->setAxisTitle("Wheel", 2);
208  cmsME[hname] = me;
209 }
std::string & topFolder()
Get top folder name.
#define LogTrace(id)
std::string category()
Get message logger name.
std::map< std::string, MonitorElement * > cmsME
std::string fullName(std::string htype)
Create fullname from histo partial name.
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void DTLocalTriggerBaseTest::bookSectorHistos ( DQMStore::IBooker ,
int  wheel,
int  sector,
std::string  hTag,
std::string  folder = "" 
)
protected

Book the new MEs (for each sector)

Definition at line 134 of file DTLocalTriggerBaseTest.cc.

References makeHippyCampaign::basedir, dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), taus_updatedMVAIds_cff::category, newFWLiteAna::fullName, LogTrace, hlt_dqm_clientPB-live_cfg::me, SimDataFormats::CaloAnalysis::sc, dqm::impl::MonitorElement::setBinLabel(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), L1TBPTX_cfi::testName, and makeMuonMisalignmentScenario::wheel.

Referenced by DTLocalTriggerEfficiencyTest::Bookings(), DTLocalTriggerBaseTest(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().

135  {
136  stringstream wh;
137  wh << wheel;
138  stringstream sc;
139  sc << sector;
140  int sectorid = (wheel + 3) + (sector - 1) * 5;
141  string basedir = topFolder() + "Wheel" + wh.str() + "/Sector" + sc.str() + "/";
142  if (!folder.empty()) {
143  basedir += folder + "/";
144  }
145 
146  ibooker.setCurrentFolder(basedir);
147 
148  string fullTag = fullName(hTag);
149  string hname = fullTag + "_W" + wh.str() + "_Sec" + sc.str();
150  LogTrace(category()) << "[" << testName << "Test]: booking " << basedir << hname;
151  if (hTag.find("BXDistribPhi") != string::npos) {
152  MonitorElement* me = ibooker.book2D(hname.c_str(), hname.c_str(), 25, -4.5, 20.5, 4, 0.5, 4.5);
153  me->setBinLabel(1, "MB1", 2);
154  me->setBinLabel(2, "MB2", 2);
155  me->setBinLabel(3, "MB3", 2);
156  me->setBinLabel(4, "MB4", 2);
157  secME[sectorid][fullTag] = me;
158  return;
159  } else if (hTag.find("QualDistribPhi") != string::npos) {
160  MonitorElement* me = ibooker.book2D(hname.c_str(), hname.c_str(), 7, -0.5, 6.5, 4, 0.5, 4.5);
161  me->setBinLabel(1, "MB1", 2);
162  me->setBinLabel(2, "MB2", 2);
163  me->setBinLabel(3, "MB3", 2);
164  me->setBinLabel(4, "MB4", 2);
165  me->setBinLabel(1, "LI", 1);
166  me->setBinLabel(2, "LO", 1);
167  me->setBinLabel(3, "HI", 1);
168  me->setBinLabel(4, "HO", 1);
169  me->setBinLabel(5, "LL", 1);
170  me->setBinLabel(6, "HL", 1);
171  me->setBinLabel(7, "HH", 1);
172  secME[sectorid][fullTag] = me;
173  return;
174  } else if (hTag.find("Phi") != string::npos || hTag.find("TkvsTrig") != string::npos) {
175  MonitorElement* me = ibooker.book1D(hname.c_str(), hname.c_str(), 4, 0.5, 4.5);
176  me->setBinLabel(1, "MB1", 1);
177  me->setBinLabel(2, "MB2", 1);
178  me->setBinLabel(3, "MB3", 1);
179  me->setBinLabel(4, "MB4", 1);
180  secME[sectorid][fullTag] = me;
181  return;
182  }
183 
184  if (hTag.find("Theta") != string::npos) {
185  MonitorElement* me = ibooker.book1D(hname.c_str(), hname.c_str(), 3, 0.5, 3.5);
186  me->setBinLabel(1, "MB1", 1);
187  me->setBinLabel(2, "MB2", 1);
188  me->setBinLabel(3, "MB3", 1);
189  secME[sectorid][fullTag] = me;
190  return;
191  }
192 }
std::string & topFolder()
Get top folder name.
virtual 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)
#define LogTrace(id)
std::string category()
Get message logger name.
std::map< int, std::map< std::string, MonitorElement * > > secME
std::string fullName(std::string htype)
Create fullname from histo partial name.
void DTLocalTriggerBaseTest::bookWheelHistos ( DQMStore::IBooker ,
int  wheel,
std::string  hTag,
std::string  folder = "" 
)
protected

Book the new MEs (for each wheel)

Definition at line 211 of file DTLocalTriggerBaseTest.cc.

References makeHippyCampaign::basedir, dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), taus_updatedMVAIds_cff::category, newFWLiteAna::fullName, LogTrace, hlt_dqm_clientPB-live_cfg::me, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), L1TBPTX_cfi::testName, and makeMuonMisalignmentScenario::wheel.

Referenced by DTLocalTriggerEfficiencyTest::Bookings(), DTLocalTriggerBaseTest(), and DTLocalTriggerEfficiencyTest::runClientDiagnostic().

211  {
212  stringstream wh;
213  wh << wheel;
214  string basedir;
215  if (hTag.find("Summary") != string::npos) {
216  basedir = topFolder(); //Book summary histo outside wheel directories
217  } else {
218  basedir = topFolder() + "Wheel" + wh.str() + "/";
219  }
220  if (!folder.empty()) {
221  basedir += folder + "/";
222  }
223 
224  ibooker.setCurrentFolder(basedir);
225 
226  string fullTag = fullName(hTag);
227  string hname = fullTag + "_W" + wh.str();
228 
229  LogTrace(category()) << "[" << testName << "Test]: booking " << basedir << hname;
230 
231  if (hTag.find("Phi") != string::npos || hTag.find("Summary") != string::npos) {
232  MonitorElement* me = ibooker.book2D(hname.c_str(), hname.c_str(), 12, 1, 13, 4, 1, 5);
233 
234  // setLabelPh(me);
235  me->setBinLabel(1, "MB1", 2);
236  me->setBinLabel(2, "MB2", 2);
237  me->setBinLabel(3, "MB3", 2);
238  me->setBinLabel(4, "MB4", 2);
239  me->setAxisTitle("Sector", 1);
240 
241  whME[wheel][fullTag] = me;
242  return;
243  }
244 
245  if (hTag.find("Theta") != string::npos) {
246  MonitorElement* me = ibooker.book2D(hname.c_str(), hname.c_str(), 12, 1, 13, 3, 1, 4);
247 
248  // setLabelTh(me);
249  me->setBinLabel(1, "MB1", 2);
250  me->setBinLabel(2, "MB2", 2);
251  me->setBinLabel(3, "MB3", 2);
252  me->setAxisTitle("Sector", 1);
253 
254  whME[wheel][fullTag] = me;
255  return;
256  }
257 }
std::string & topFolder()
Get top folder name.
std::map< int, std::map< std::string, MonitorElement * > > whME
virtual 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)
#define LogTrace(id)
std::string category()
Get message logger name.
std::string fullName(std::string htype)
Create fullname from histo partial name.
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::string DTLocalTriggerBaseTest::category ( void  )
inlineprotected

Get message logger name.

Definition at line 96 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerEfficiencyTest::bookChambHistos().

96 { return "DTDQM|DTMonitorClient|" + testName + "Test"; };
void DTLocalTriggerBaseTest::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Reimplemented in DTLocalTriggerSynchTest.

Definition at line 65 of file DTLocalTriggerBaseTest.cc.

References taus_updatedMVAIds_cff::category, LogTrace, dtDQMOfflineClients_cff::runOnline, and L1TBPTX_cfi::testName.

Referenced by DTLocalTriggerSynchTest::dqmEndJob(), and DTLocalTriggerBaseTest().

65  {
66  LogTrace(category()) << "[" << testName << "Test] endJob called!";
67 
68  if (!runOnline) {
69  LogVerbatim(category()) << "[" << testName << "Test] Client called in offline mode, performing client operations";
70  runClientDiagnostic(ibooker, igetter);
71  }
72 }
#define LogTrace(id)
std::string category()
Get message logger name.
virtual void runClientDiagnostic(DQMStore::IBooker &, DQMStore::IGetter &)=0
Perform client analysis.
void DTLocalTriggerBaseTest::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

Perform client diagnostic in online.

Reimplemented from DQMEDHarvester.

Reimplemented in DTLocalTriggerSynchTest.

Definition at line 45 of file DTLocalTriggerBaseTest.cc.

References Skims_PDWG_cff::prescaleFactor, dtDQMOfflineClients_cff::runOnline, and L1TBPTX_cfi::testName.

Referenced by DTLocalTriggerBaseTest().

48  {
49  if (!runOnline)
50  return;
51 
52  LogVerbatim("DTDQM|DTMonitorClient|DTLocalTriggerTest")
53  << "[" << testName << "Test]: End of LS transition, performing the DQM client operation";
54 
55  // counts number of lumiSegs and prescale
56  nLumiSegs++;
57  if (nLumiSegs % prescaleFactor != 0)
58  return;
59 
60  LogVerbatim("DTDQM|DTMonitorClient|DTLocalTriggerTest") << "[" << testName << "Test]: " << nLumiSegs << " updates";
61 
62  runClientDiagnostic(ibooker, igetter);
63 }
virtual void runClientDiagnostic(DQMStore::IBooker &, DQMStore::IGetter &)=0
Perform client analysis.
void DTLocalTriggerBaseTest::endRun ( edm::Run const &  run,
edm::EventSetup const &  context 
)
overrideprotected

Perform client diagnostic in offline.

Definition at line 74 of file DTLocalTriggerBaseTest.cc.

References taus_updatedMVAIds_cff::category, LogTrace, and L1TBPTX_cfi::testName.

Referenced by DTLocalTriggerBaseTest().

74  {
75  LogTrace(category()) << "[" << testName << "Test] endRun called!";
76 }
#define LogTrace(id)
std::string category()
Get message logger name.
string DTLocalTriggerBaseTest::fullName ( std::string  htype)
protected
template<class T >
T * DTLocalTriggerBaseTest::getHisto ( MonitorElement me)
protected

Convert ME to Histogram fo type T.

Definition at line 119 of file DTLocalTriggerBaseTest.h.

References dqm::legacy::MonitorElement::getRootObject().

Referenced by DTLocalTriggerBaseTest().

119  {
120  return me ? dynamic_cast<T*>(me->getRootObject()) : nullptr;
121 }
TObject * getRootObject() const override
long double T
std::string DTLocalTriggerBaseTest::getMEName ( std::string  histoTag,
std::string  subfolder,
const DTChamberId chambid 
)
protected
std::string DTLocalTriggerBaseTest::getMEName ( std::string  histoTag,
std::string  subfolder,
int  wh 
)
protected

Get the ME name (by wheel)

pair< float, float > DTLocalTriggerBaseTest::phiRange ( const DTChamberId id)
protected

Calculate phi range for histograms.

Definition at line 259 of file DTLocalTriggerBaseTest.cc.

References DTTopology::firstChannel(), DTTopology::lastChannel(), edm::max(), edm::min(), GeomDet::position(), DTLayer::specificTopology(), relativeConstraints::station, GeomDet::toLocal(), makeMuonMisalignmentScenario::wheel, and DTTopology::wirePosition().

Referenced by DTLocalTriggerBaseTest().

259  {
260  float min, max;
261  int station = id.station();
262  int sector = id.sector();
263  int wheel = id.wheel();
264 
265  const DTLayer* layer = muonGeom->layer(DTLayerId(id, 1, 1));
266  const DTTopology& topo = layer->specificTopology();
267  min = topo.wirePosition(topo.firstChannel());
268  max = topo.wirePosition(topo.lastChannel());
269 
270  if (station == 4) {
271  const DTLayer* layer2;
272  float lposx;
273 
274  if (sector == 4) {
275  layer2 = muonGeom->layer(DTLayerId(wheel, station, 13, 1, 1));
276  lposx = layer->toLocal(layer2->position()).x();
277  } else if (sector == 10) {
278  layer2 = muonGeom->layer(DTLayerId(wheel, station, 14, 1, 1));
279  lposx = layer->toLocal(layer2->position()).x();
280  } else
281  return make_pair(min, max);
282 
283  DTTopology topo2 = layer2->specificTopology();
284 
285  if (lposx > 0) {
286  max = lposx * .5 + topo2.wirePosition(topo2.lastChannel());
287  min -= lposx * .5;
288  } else {
289  min = lposx * .5 + topo2.wirePosition(topo2.firstChannel());
290  max -= lposx * .5;
291  }
292  }
293 
294  return make_pair(min, max);
295 }
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:59
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
edm::ESHandle< DTGeometry > muonGeom
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:79
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:81
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:43
T min(T a, T b)
Definition: MathUtil.h:58
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96
virtual void DTLocalTriggerBaseTest::runClientDiagnostic ( DQMStore::IBooker ,
DQMStore::IGetter  
)
protectedpure virtual
void DTLocalTriggerBaseTest::setConfig ( const edm::ParameterSet ps,
std::string  name 
)
protected

Set configuration variables.

Definition at line 78 of file DTLocalTriggerBaseTest.cc.

References taus_updatedMVAIds_cff::category, edm::ParameterSet::getUntrackedParameter(), dtFineDelayCorr_cfi::hwSources, LogTrace, Skims_PA_cff::name, cmsHarvester::nevents, Skims_PDWG_cff::prescaleFactor, dtDQMOfflineClients_cff::runOnline, and L1TBPTX_cfi::testName.

Referenced by DTLocalTriggerBaseTest(), and DTLocalTriggerEfficiencyTest::DTLocalTriggerEfficiencyTest().

78  {
79  testName = name;
80 
81  LogTrace(category()) << "[" << testName << "Test]: Constructor";
82 
83  sourceFolder = ps.getUntrackedParameter<string>("folderRoot", "");
84  runOnline = ps.getUntrackedParameter<bool>("runOnline", true);
85  hwSources = ps.getUntrackedParameter<vector<string> >("hwSources");
86 
87  if (ps.getUntrackedParameter<bool>("localrun", true)) {
88  trigSources.push_back("");
89  } else {
90  trigSources = ps.getUntrackedParameter<vector<string> >("trigSources");
91  }
92 
93  parameters = ps;
94  nevents = 0;
95 
96  prescaleFactor = parameters.getUntrackedParameter<int>("diagnosticPrescale", 1);
97 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > trigSources
#define LogTrace(id)
std::string category()
Get message logger name.
std::vector< std::string > hwSources
std::string& DTLocalTriggerBaseTest::topFolder ( )
inlineprotected

Get top folder name.

Definition at line 93 of file DTLocalTriggerBaseTest.h.

References baseFolderTM.

Referenced by DTLocalTriggerEfficiencyTest::bookChambHistos().

93 { return baseFolderTM; };

Member Data Documentation

std::string DTLocalTriggerBaseTest::baseFolderTM
protected
std::map<std::string, MonitorElement*> DTLocalTriggerBaseTest::cmsME
protected

Definition at line 115 of file DTLocalTriggerBaseTest.h.

std::string DTLocalTriggerBaseTest::hwSource
protected
std::vector<std::string> DTLocalTriggerBaseTest::hwSources
protected
edm::ESHandle<DTGeometry> DTLocalTriggerBaseTest::muonGeom
protected

Definition at line 112 of file DTLocalTriggerBaseTest.h.

Referenced by DTLocalTriggerEfficiencyTest::beginRun().

int DTLocalTriggerBaseTest::nevents
protected

Definition at line 96 of file DTLocalTriggerBaseTest.h.

unsigned int DTLocalTriggerBaseTest::nLumiSegs
protected

Definition at line 99 of file DTLocalTriggerBaseTest.h.

edm::ParameterSet DTLocalTriggerBaseTest::parameters
protected
int DTLocalTriggerBaseTest::prescaleFactor
protected

Definition at line 100 of file DTLocalTriggerBaseTest.h.

int DTLocalTriggerBaseTest::run
protected
bool DTLocalTriggerBaseTest::runOnline
protected

Definition at line 108 of file DTLocalTriggerBaseTest.h.

std::map<int, std::map<std::string, MonitorElement*> > DTLocalTriggerBaseTest::secME
protected
std::string DTLocalTriggerBaseTest::sourceFolder
protected

Definition at line 106 of file DTLocalTriggerBaseTest.h.

std::string DTLocalTriggerBaseTest::testName
protected
std::string DTLocalTriggerBaseTest::trigSource
protected
std::vector<std::string> DTLocalTriggerBaseTest::trigSources
protected
std::map<int, std::map<std::string, MonitorElement*> > DTLocalTriggerBaseTest::whME
protected