CMS 3D CMS Logo

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

#include <DTLocalTriggerTask.h>

Inheritance diagram for DTLocalTriggerTask:
DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DTLocalTriggerTask (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTLocalTriggerTask () override
 Destructor. More...
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
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 analyze (const edm::Event &e, const edm::EventSetup &c) override
 Analyze. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
 To reset the MEs. More...
 
void bookBarrelHistos (DQMStore::IBooker &, std::string histoTag)
 Book the histograms. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 Book the histograms. More...
 
void bookHistos (DQMStore::IBooker &, const DTChamberId &dtCh, std::string folder, std::string histoTag)
 
void bookWheelHistos (DQMStore::IBooker &, int wh, std::string histoTag)
 Book the histograms. More...
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 Beginrun. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) final
 
void runSegmentAnalysis (edm::Handle< DTRecSegment4DCollection > &segments4D)
 Run analysis using DT 4D segments. More...
 
void runTMAnalysis (std::vector< L1MuDTChambPhDigi > const *phTrigs, std::vector< L1MuDTChambThDigi > const *thTrigs)
 Run analysis on TM data. More...
 
void setQLabels (MonitorElement *me, short int iaxis)
 Set Quality labels. More...
 
void setQLabelsTheta (MonitorElement *me, short int iaxis)
 
std::string & topFolder ()
 Get the Top folder (different between Physics and TP and TM) More...
 
void triggerSource (const edm::Event &e)
 Get the L1A source. More...
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Protected Attributes

const int wheelArrayShift = 3
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
edm::EDPutTokenT< DQMTokenrunToken_
 

Private Attributes

std::string baseFolderTM
 
bool detailedAnalysis
 
std::map< uint32_t, std::map< std::string, MonitorElement * > > digiHistos
 
bool doTMTheta
 
DTArr3PhDigi iphbest
 
bool isLocalRun
 
DTArr3ThDigi ithbest
 
edm::EDGetTokenT< LTCDigiCollectionltcDigiCollectionToken_
 
DTArr3mapInt mapDTTF
 
edm::ESHandle< DTGeometrymuonGeom
 
int nevents
 
edm::ParameterSet parameters
 
DTArr3int phcode_best
 
edm::EDGetTokenT< DTLocalTriggerCollectionros_Token_
 
edm::EDGetTokenT< DTRecSegment4DCollectionseg_Token_
 
DTArr3int thcode_best
 
MonitorElementtm_IDDataErrorPlot
 
edm::EDGetTokenT< L1MuDTChambPhContainertm_Token_
 
edm::EDGetTokenT< L1MuDTChambThContainertmTh_Token_
 
bool tpMode
 
bool track_ok [6][5][15]
 
DTTrigGeomUtilstrigGeomUtils
 
std::string trigsrc
 
bool useSEG
 
bool useTM
 
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
 

Friends

class DTMonitorModule
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::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 52 of file DTLocalTriggerTask.h.

Constructor & Destructor Documentation

◆ DTLocalTriggerTask()

DTLocalTriggerTask::DTLocalTriggerTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 34 of file DTLocalTriggerTask.cc.

35  : trigGeomUtils(nullptr), isLocalRun(ps.getUntrackedParameter<bool>("localrun", true)) {
36  if (!isLocalRun) {
37  ltcDigiCollectionToken_ = consumes<LTCDigiCollection>(ps.getParameter<edm::InputTag>("ltcDigiCollectionTag"));
38  }
39 
40  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: Constructor" << endl;
41 
42  tpMode = ps.getUntrackedParameter<bool>("testPulseMode", false);
43  detailedAnalysis = ps.getUntrackedParameter<bool>("detailedAnalysis", false);
44  doTMTheta = ps.getUntrackedParameter<bool>("enableTMTheta", false);
45  tm_Token_ = consumes<L1MuDTChambPhContainer>(
46  ps.getUntrackedParameter<InputTag>("tm_label", InputTag("twinMuxStage2Digis:PhIn")));
47  tmTh_Token_ = consumes<L1MuDTChambThContainer>(
48  ps.getUntrackedParameter<edm::InputTag>("tmTh_label", InputTag("twinMuxStage2Digis:ThIn")));
49 
50  ros_Token_ =
51  consumes<DTLocalTriggerCollection>(ps.getUntrackedParameter<InputTag>("ros_label", InputTag("dtunpacker")));
52  seg_Token_ =
53  consumes<DTRecSegment4DCollection>(ps.getUntrackedParameter<InputTag>("seg_label", InputTag("dt4DSegments")));
54 
55  if (tpMode) {
56  baseFolderTM = "DT/11-LocalTriggerTP-TM/";
57  } else {
58  baseFolderTM = "DT/03-LocalTrigger-TM/";
59  }
60 
61  parameters = ps;
62 }

References baseFolderTM, detailedAnalysis, doTMTheta, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), isLocalRun, LogTrace, ltcDigiCollectionToken_, parameters, ros_Token_, seg_Token_, tm_Token_, tmTh_Token_, and tpMode.

◆ ~DTLocalTriggerTask()

DTLocalTriggerTask::~DTLocalTriggerTask ( )
override

Destructor.

Definition at line 64 of file DTLocalTriggerTask.cc.

64  {
65  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask")
66  << "[DTLocalTriggerTask]: analyzed " << nevents << " events" << endl;
67  if (trigGeomUtils) {
68  delete trigGeomUtils;
69  }
70 }

References LogTrace, nevents, and trigGeomUtils.

Member Function Documentation

◆ analyze()

void DTLocalTriggerTask::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Analyze.

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 194 of file DTLocalTriggerTask.cc.

194  {
195  if (!nevents) {
197  e.getByToken(tm_Token_, l1DTTPGPh);
199  e.getByToken(tmTh_Token_, l1DTTPGTh);
200 
201  useTM = (l1DTTPGPh.isValid() || l1DTTPGTh.isValid()) && parameters.getUntrackedParameter<bool>("process_tm", true);
202 
203  Handle<DTRecSegment4DCollection> all4DSegments;
204  e.getByToken(seg_Token_, all4DSegments);
205  useSEG = all4DSegments.isValid() && parameters.getUntrackedParameter<bool>("process_seg", true);
206  }
207 
208  nevents++;
209 
210  triggerSource(e);
211 
212  if (useTM) {
214  e.getByToken(tm_Token_, l1DTTPGPh);
215  vector<L1MuDTChambPhDigi> const* l1PhTrig = l1DTTPGPh->getContainer();
216 
218  e.getByToken(tmTh_Token_, l1DTTPGTh);
219 
220  vector<L1MuDTChambThDigi> const* l1ThTrig = l1DTTPGTh->getContainer();
221 
222  runTMAnalysis(l1PhTrig, l1ThTrig);
223  }
224  if (!tpMode && useSEG) {
226  e.getByToken(seg_Token_, segments4D);
227 
228  runSegmentAnalysis(segments4D);
229  }
230 }

References MillePedeFileConverter_cfg::e, L1MuDTChambPhContainer::getContainer(), L1MuDTChambThContainer::getContainer(), edm::ParameterSet::getUntrackedParameter(), edm::HandleBase::isValid(), nevents, parameters, runSegmentAnalysis(), runTMAnalysis(), seg_Token_, tm_Token_, tmTh_Token_, tpMode, triggerSource(), useSEG, and useTM.

◆ beginLuminosityBlock()

void DTLocalTriggerTask::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
overrideprotected

To reset the MEs.

Definition at line 179 of file DTLocalTriggerTask.cc.

179  {
180  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: Begin of LS transition" << endl;
181 
182  if (lumiSeg.id().luminosityBlock() % parameters.getUntrackedParameter<int>("ResetCycle", 3) == 0) {
183  for (map<uint32_t, map<string, MonitorElement*> >::const_iterator histo = digiHistos.begin();
184  histo != digiHistos.end();
185  histo++) {
186  for (map<string, MonitorElement*>::const_iterator ht = (*histo).second.begin(); ht != (*histo).second.end();
187  ht++) {
188  (*ht).second->Reset();
189  }
190  }
191  }
192 }

References digiHistos, edm::ParameterSet::getUntrackedParameter(), timingPdfMaker::histo, edm::LuminosityBlockBase::id(), LogTrace, edm::LuminosityBlockID::luminosityBlock(), genParticles_cff::map, and parameters.

◆ bookBarrelHistos()

void DTLocalTriggerTask::bookBarrelHistos ( DQMStore::IBooker ,
std::string  histoTag 
)
protected

Book the histograms.

Definition at line 232 of file DTLocalTriggerTask.cc.

232  {
233  ibooker.setCurrentFolder(topFolder());
234  if (histoTag == "TM_ErrorsChamberID") {
235  tm_IDDataErrorPlot = ibooker.book1D(histoTag.c_str(), "TM Data ID Error", 5, -2, 3);
236  tm_IDDataErrorPlot->setAxisTitle("wheel", 1);
237  }
238 
239  return;
240 }

References dqm::implementation::IBooker::book1D(), dtResolutionTest_cfi::histoTag, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), tm_IDDataErrorPlot, and topFolder().

Referenced by bookHistograms().

◆ bookHistograms()

void DTLocalTriggerTask::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  context 
)
overrideprotectedvirtual

Book the histograms.

Implements DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 78 of file DTLocalTriggerTask.cc.

80  {
81  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: bookHistograms" << endl;
82 
83  if (parameters.getUntrackedParameter<bool>("staticBooking", true)) { // Static histo booking
84 
85  vector<string> trigSources;
86  if (parameters.getUntrackedParameter<bool>("localrun", true)) {
87  trigSources.push_back("");
88  } else {
89  trigSources.push_back("_DTonly");
90  trigSources.push_back("_NoDT");
91  trigSources.push_back("_DTalso");
92  }
93  vector<string>::const_iterator trigSrcIt = trigSources.begin();
94  vector<string>::const_iterator trigSrcEnd = trigSources.end();
95 
96  if (parameters.getUntrackedParameter<bool>("process_tm", true)) {
97  bookBarrelHistos(ibooker, "TM_ErrorsChamberID");
98  }
99 
100  if (tpMode) {
101  for (int stat = 1; stat < 5; ++stat) {
102  for (int wh = -2; wh < 3; ++wh) {
103  for (int sect = 1; sect < 13; ++sect) {
104  DTChamberId dtChId(wh, stat, sect);
105 
106  if (parameters.getUntrackedParameter<bool>("process_tm", true)) { // TM data
107  bookHistos(ibooker, dtChId, "LocalTriggerPhiIn", "TM_BXvsQual" + (*trigSrcIt));
108  bookHistos(ibooker, dtChId, "LocalTriggerPhiIn", "TM_QualvsPhirad" + (*trigSrcIt));
109  }
110  }
111  }
112  } // end of loop
113  } else {
114  for (; trigSrcIt != trigSrcEnd; ++trigSrcIt) {
115  for (int wh = -2; wh < 3; ++wh) {
116  for (int sect = 1; sect < 13; ++sect) {
117  for (int stat = 1; stat < 5; ++stat) {
118  DTChamberId dtChId(wh, stat, sect);
119  if (parameters.getUntrackedParameter<bool>("process_tm", true)) { // TM data
120 
121  bookHistos(ibooker, dtChId, "LocalTriggerPhiIn", "TM_BXvsQual_In" + (*trigSrcIt));
122  if (detailedAnalysis) {
123  bookHistos(ibooker, dtChId, "LocalTriggerPhiIn", "TM_QualvsPhirad_In" + (*trigSrcIt));
124  bookHistos(ibooker, dtChId, "LocalTriggerPhiIn", "TM_QualvsPhibend_In" + (*trigSrcIt));
125  }
126  bookHistos(ibooker, dtChId, "LocalTriggerPhiIn", "TM_Flag1stvsQual_In" + (*trigSrcIt));
127  bookHistos(ibooker, dtChId, "LocalTriggerPhiIn", "TM_FlagUpDownvsQual_In" + (*trigSrcIt));
128 
129  bookHistos(ibooker, dtChId, "LocalTriggerPhiIn", "TM_BestQual_In" + (*trigSrcIt));
130  if (stat != 4 && doTMTheta) {
131  bookHistos(ibooker, dtChId, "LocalTriggerTheta", "TM_PositionvsBX" + (*trigSrcIt));
132  bookHistos(ibooker, dtChId, "LocalTriggerTheta", "TM_QualityvsBX" + (*trigSrcIt));
133 
134  bookHistos(ibooker, dtChId, "LocalTriggerTheta", "TM_PositionvsQual" + (*trigSrcIt));
135 
136  bookHistos(ibooker, dtChId, "LocalTriggerTheta", "TM_ThetaBXvsQual" + (*trigSrcIt));
137  bookHistos(ibooker, dtChId, "LocalTriggerTheta", "TM_ThetaBestQual" + (*trigSrcIt));
138  }
139 
140  if (parameters.getUntrackedParameter<bool>("process_seg", true)) { // TM + Segemnt
141  bookHistos(ibooker, dtChId, "Segment", "TM_PhitkvsPhitrig" + (*trigSrcIt));
142  bookHistos(ibooker, dtChId, "Segment", "TM_PhibtkvsPhibtrig" + (*trigSrcIt));
143  bookHistos(ibooker, dtChId, "Segment", "TM_PhiResidual" + (*trigSrcIt));
144  bookHistos(ibooker, dtChId, "Segment", "TM_PhiResidualvsLUTPhi" + (*trigSrcIt));
145  bookHistos(ibooker, dtChId, "Segment", "TM_PhibResidual" + (*trigSrcIt));
146  bookHistos(ibooker, dtChId, "Segment", "TM_HitstkvsQualtrig" + (*trigSrcIt));
147  bookHistos(ibooker, dtChId, "Segment", "TM_TrackPosvsAngle" + (*trigSrcIt));
148  bookHistos(ibooker, dtChId, "Segment", "TM_TrackPosvsAngleandTrig" + (*trigSrcIt));
149  bookHistos(ibooker, dtChId, "Segment", "TM_TrackPosvsAngleandTrigHHHL" + (*trigSrcIt));
150  if (stat != 4) {
151  bookHistos(ibooker, dtChId, "Segment", "TM_TrackThetaPosvsAngle" + (*trigSrcIt)); // theta view
152  bookHistos(ibooker, dtChId, "Segment", "TM_TrackThetaPosvsAngleandTrig" + (*trigSrcIt));
153  bookHistos(ibooker,
154  dtChId,
155  "Segment",
156  "TM_TrackThetaPosvsAngleandTrigH" + (*trigSrcIt)); // TM theta quality not available!
157  }
158  }
159  }
160  }
161  }
162  for (int sect = 13; sect < 15; ++sect) {
163  DTChamberId dtChId(wh, 4, sect);
164  if (parameters.getUntrackedParameter<bool>("process_tm", true) &&
165  parameters.getUntrackedParameter<bool>("process_seg", true)) { // TM+SEG LUTs data
166  bookHistos(ibooker, dtChId, "Segment", "TM_PhitkvsPhitrig" + (*trigSrcIt));
167  bookHistos(ibooker, dtChId, "Segment", "TM_PhibtkvsPhibtrig" + (*trigSrcIt));
168  bookHistos(ibooker, dtChId, "Segment", "TM_PhiResidual" + (*trigSrcIt));
169  bookHistos(ibooker, dtChId, "Segment", "TM_PhiResidualvsLUTPhi" + (*trigSrcIt));
170  bookHistos(ibooker, dtChId, "Segment", "TM_PhibResidual" + (*trigSrcIt));
171  }
172  }
173  }
174  } // end of loop
175  }
176  }
177 }

References bookBarrelHistos(), bookHistos(), detailedAnalysis, doTMTheta, edm::ParameterSet::getUntrackedParameter(), LogTrace, parameters, hgcalPlots::stat, and tpMode.

◆ bookHistos()

void DTLocalTriggerTask::bookHistos ( DQMStore::IBooker ,
const DTChamberId dtCh,
std::string  folder,
std::string  histoTag 
)
protected

Definition at line 242 of file DTLocalTriggerTask.cc.

245  {
246  int wh = dtCh.wheel();
247  int sc = dtCh.sector();
248  stringstream wheel;
249  wheel << wh;
250  stringstream station;
251  station << dtCh.station();
252  stringstream sector;
253  sector << sc;
254 
255  double minBX = 0;
256  double maxBX = 0;
257  int rangeBX = 0;
258 
259  string histoType = histoTag.substr(3, histoTag.find('_', 3) - 3);
260 
261  ibooker.setCurrentFolder(topFolder() + "Wheel" + wheel.str() + "/Sector" + sector.str() + "/Station" + station.str() +
262  "/" + folder);
263 
264  string histoName = histoTag + "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
265 
266  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask")
267  << "[DTLocalTriggerTask]: booking " << topFolder() << "Wheel" << wheel.str() << "/Sector" << sector.str()
268  << "/Station" << station.str() << "/" << folder << "/" << histoName << endl;
269 
270  if (histoType.find("BX") != string::npos) {
271  if (histoTag.substr(0, 2) == "TM") {
272  minBX = parameters.getUntrackedParameter<int>("minBXTM", -2) - 0.5;
273  maxBX = parameters.getUntrackedParameter<int>("maxBXTM", 2) + 0.5;
274  }
275  rangeBX = (int)(maxBX - minBX);
276  }
277 
278  if (folder == "LocalTriggerPhiIn") {
279  if (histoType == "BXvsQual") {
280  (digiHistos[dtCh.rawId()])[histoTag] =
281  ibooker.book2D(histoName, "BX vs trigger quality", 7, -0.5, 6.5, rangeBX, minBX, maxBX);
282  setQLabels((digiHistos[dtCh.rawId()])[histoTag], 1);
283  return;
284  }
285  if (histoType == "BestQual") {
286  (digiHistos[dtCh.rawId()])[histoTag] =
287  ibooker.book1D(histoName, "Trigger quality of best primitives", 7, -0.5, 6.5);
288  setQLabels((digiHistos[dtCh.rawId()])[histoTag], 1);
289  return;
290  }
291  if (histoType == "QualvsPhirad") {
292  (digiHistos[dtCh.rawId()])[histoTag] =
293  ibooker.book2D(histoName, "Trigger quality vs local position", 100, -500., 500., 7, -0.5, 6.5);
294  setQLabels((digiHistos[dtCh.rawId()])[histoTag], 2);
295  return;
296  }
297  if (histoType == "QualvsPhibend") {
298  (digiHistos[dtCh.rawId()])[histoTag] =
299  ibooker.book2D(histoName, "Trigger quality vs local direction", 200, -40., 40., 7, -0.5, 6.5);
300  setQLabels((digiHistos[dtCh.rawId()])[histoTag], 2);
301  return;
302  }
303  if (histoType == "Flag1stvsQual") {
304  (digiHistos[dtCh.rawId()])[histoTag] =
305  ibooker.book2D(histoName, "1st/2nd trig flag vs quality", 7, -0.5, 6.5, 2, -0.5, 1.5);
306  setQLabels((digiHistos[dtCh.rawId()])[histoTag], 1);
307  return;
308  }
309  if (histoType == "FlagUpDownvsQual") {
310  (digiHistos[dtCh.rawId()])[histoTag] =
311  ibooker.book2D(histoName, "Up/Down trig flag vs quality", 7, -0.5, 6.5, 2, -0.5, 1.5);
312  setQLabels((digiHistos[dtCh.rawId()])[histoTag], 1);
313  return;
314  }
315 
316  } else if (folder == "LocalTriggerTheta") {
317  if (histoType == "PositionvsBX") {
318  (digiHistos[dtCh.rawId()])[histoTag] =
319  ibooker.book2D(histoName, "Theta trigger position vs BX", rangeBX, minBX, maxBX, 7, -0.5, 6.5);
320  return;
321  }
322  if (histoType == "PositionvsQual") {
323  (digiHistos[dtCh.rawId()])[histoTag] =
324  ibooker.book2D(histoName, "Theta trigger position vs quality", 2, 0.5, 2.5, 7, -0.5, 6.5);
325  setQLabelsTheta((digiHistos[dtCh.rawId()])[histoTag], 1);
326  return;
327  }
328  if (histoType == "ThetaBXvsQual") {
329  (digiHistos[dtCh.rawId()])[histoTag] =
330  ibooker.book2D(histoName, "BX vs trigger quality", 2, 0.5, 2.5, rangeBX, minBX, maxBX);
331  setQLabelsTheta((digiHistos[dtCh.rawId()])[histoTag], 1);
332  }
333  if (histoType == "ThetaBestQual") { //It does not make sense: 7 positions, how to define best?
334  (digiHistos[dtCh.rawId()])[histoTag] = ibooker.book1D(
335  histoName, "Trigger quality of best primitives (theta)", 2, 0.5, 2.5); // 0 = not fired, 1 = L, 2 = H
336  setQLabelsTheta((digiHistos[dtCh.rawId()])[histoTag], 1);
337  return;
338  }
339 
340  } else if (folder == "Segment") {
341  if (histoType.find("TrackThetaPosvsAngle") == 0) {
342  string histoLabel = "Position vs Angle (theta)";
343  if (histoType.find("andTrigH") != string::npos)
344  histoLabel += " for H triggers";
345  else if (histoType.find("andTrig") != string::npos)
346  histoLabel += " for triggers";
347 
348  float min, max;
349  int nbins;
351  (digiHistos[dtCh.rawId()])[histoTag] = ibooker.book2D(histoName, histoLabel, 16, -40., 40., nbins, min, max);
352  return;
353  }
354  if (histoType.find("TrackPosvsAngle") == 0) {
355  float min, max;
356  int nbins;
357  trigGeomUtils->phiRange(dtCh, min, max, nbins);
358 
359  string histoLabel = "Position vs Angle (phi)";
360  if (histoType.find("andTrigHHHL") != string::npos)
361  histoLabel += " for HH/HL triggers";
362  else if (histoType.find("andTrig") != string::npos)
363  histoLabel += " for triggers";
364 
365  (digiHistos[dtCh.rawId()])[histoTag] = ibooker.book2D(histoName, histoLabel, 16, -40., 40., nbins, min, max);
366  return;
367  }
368  if (histoType == "PhitkvsPhitrig") {
369  (digiHistos[dtCh.rawId()])[histoTag] =
370  ibooker.book2D(histoName, "Local position: segment vs trigger", 100, -500., 500., 100, -500., 500.);
371  return;
372  }
373  if (histoType == "PhibtkvsPhibtrig") {
374  (digiHistos[dtCh.rawId()])[histoTag] =
375  ibooker.book2D(histoName, "Local direction : segment vs trigger", 200, -40., 40., 200, -40., 40.);
376  return;
377  }
378  if (histoType == "PhiResidual") {
379  (digiHistos[dtCh.rawId()])[histoTag] = ibooker.book1D(
380  histoName, "Trigger local position - Segment local position (correlated triggers)", 400, -10., 10.);
381  return;
382  }
383  if (histoType == "PhibResidual") {
384  (digiHistos[dtCh.rawId()])[histoTag] = ibooker.book1D(
385  histoName, "Trigger local direction - Segment local direction (correlated triggers)", 500, -10., 10.);
386  return;
387  }
388  if (histoType == "HitstkvsQualtrig") {
389  (digiHistos[dtCh.rawId()])[histoTag] =
390  ibooker.book2D(histoName, "Segment hits (phi) vs trigger quality", 7, -0.5, 6.5, 10, 0.5, 10.5);
391  setQLabels((digiHistos[dtCh.rawId()])[histoTag], 1);
392  return;
393  }
394  }
395 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), digiHistos, printsummarytable::folder, edm::ParameterSet::getUntrackedParameter(), fftjetimagerecorder_cfi::histoLabel, HltBtagPostValidation_cff::histoName, dtResolutionTest_cfi::histoTag, createfilelist::int, LogTrace, SiStripPI::max, simKBmtfStubs_cfi::maxBX, min(), simKBmtfStubs_cfi::minBX, LaserClient_cfi::nbins, parameters, DTTrigGeomUtils::phiRange(), DetId::rawId(), DTChamberId::sector(), dqm::implementation::NavigatorBase::setCurrentFolder(), setQLabels(), setQLabelsTheta(), DTChamberId::station(), relativeConstraints::station, DTTrigGeomUtils::thetaRange(), topFolder(), trigGeomUtils, DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms().

◆ bookWheelHistos()

void DTLocalTriggerTask::bookWheelHistos ( DQMStore::IBooker ,
int  wh,
std::string  histoTag 
)
protected

Book the histograms.

Definition at line 397 of file DTLocalTriggerTask.cc.

397  {
398  stringstream wheel;
399  wheel << wh;
400 
401  string histoType = histoTag.substr(3, histoTag.find('_', 3) - 3);
402 
403  ibooker.setCurrentFolder(topFolder() + "Wheel" + wheel.str() + "/");
404 
405  string histoName = histoTag + "_W" + wheel.str();
406 
407  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask")
408  << "[DTLocalTriggerTask]: booking " << topFolder() << "Wheel" << wheel.str() << "/" << histoName << endl;
409 }

References HltBtagPostValidation_cff::histoName, dtResolutionTest_cfi::histoTag, LogTrace, dqm::implementation::NavigatorBase::setCurrentFolder(), topFolder(), and makeMuonMisalignmentScenario::wheel.

◆ dqmBeginRun()

void DTLocalTriggerTask::dqmBeginRun ( const edm::Run run,
const edm::EventSetup context 
)
overrideprotectedvirtual

Beginrun.

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 72 of file DTLocalTriggerTask.cc.

72  {
73  nevents = 0;
74  context.get<MuonGeometryRecord>().get(muonGeom);
76 }

References edm::EventSetup::get(), get, muonGeom, nevents, and trigGeomUtils.

◆ endLuminosityBlock()

void DTLocalTriggerTask::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
inlinefinalprotected

Definition at line 92 of file DTLocalTriggerTask.h.

92 {}

◆ runSegmentAnalysis()

void DTLocalTriggerTask::runSegmentAnalysis ( edm::Handle< DTRecSegment4DCollection > &  segments4D)
protected

Run analysis using DT 4D segments.

Definition at line 539 of file DTLocalTriggerTask.cc.

539  {
541 
542  // Find best tracks & good tracks
543  memset(track_ok, false, 450 * sizeof(bool));
544 
546  vector<const DTRecSegment4D*> best4DSegments;
547 
548  // Preliminary loop finds best 4D Segment and high quality ones
549  for (chamberId = segments4D->id_begin(); chamberId != segments4D->id_end(); ++chamberId) {
550  DTRecSegment4DCollection::range range = segments4D->get(*chamberId);
551  const DTRecSegment4D* tmpBest = nullptr;
552  int tmpdof = 0;
553  int dof = 0;
554 
555  for (track = range.first; track != range.second; ++track) {
556  if ((*track).hasPhi()) {
557  dof = (*track).phiSegment()->degreesOfFreedom();
558  if (dof > tmpdof) {
559  tmpBest = &(*track);
560  tmpdof = dof;
561 
562  int wheel = (*track).chamberId().wheel();
563  int sector = (*track).chamberId().sector();
564  int station = (*track).chamberId().station();
565  if (sector == 13) {
566  sector = 4;
567  } else if (sector == 14) {
568  sector = 10;
569  }
570  track_ok[wheel + 3][station][sector] = (!track_ok[wheel + 3][station][sector] && dof >= 2);
571  }
572  }
573  }
574  if (tmpBest)
575  best4DSegments.push_back(tmpBest);
576  }
577 
578  vector<const DTRecSegment4D*>::const_iterator btrack;
579 
580  for (btrack = best4DSegments.begin(); btrack != best4DSegments.end(); ++btrack) {
581  if ((*btrack)->hasPhi()) { // Phi component
582 
583  int wheel = (*btrack)->chamberId().wheel();
584  int station = (*btrack)->chamberId().station();
585  int sector = (*btrack)->chamberId().sector();
586  int scsector = 0;
587  float x_track, y_track, x_angle, y_angle;
588  trigGeomUtils->computeSCCoordinates((*btrack), scsector, x_track, x_angle, y_track, y_angle);
589  int nHitsPhi = (*btrack)->phiSegment()->degreesOfFreedom() + 2;
590 
591  DTChamberId dtChId(wheel, station, sector); // get chamber for LUTs histograms (Sectors 1 to 14)
592  uint32_t indexCh = dtChId.rawId();
593  map<string, MonitorElement*>& innerMECh = digiHistos[indexCh];
594 
595  DTChamberId dtChIdSC =
596  DTChamberId(wheel, station, scsector); // get chamber for histograms SC granularity (sectors 1 to 12)
597  indexCh = dtChIdSC.rawId();
598  map<string, MonitorElement*>& innerME = digiHistos[indexCh];
599 
600  if (useTM && phcode_best[wheel + 3][station][scsector] > -1 && phcode_best[wheel + 3][station][scsector] < 7) {
601  innerME.find("TM_HitstkvsQualtrig" + trigsrc)->second->Fill(phcode_best[wheel + 3][station][scsector], nHitsPhi);
602 
603  if (phcode_best[wheel + 3][station][scsector] > 3 && nHitsPhi >= 7) {
604  float x_trigger = trigGeomUtils->trigPos(iphbest[wheel + 3][station][scsector]);
605  float angle_trigger = trigGeomUtils->trigDir(iphbest[wheel + 3][station][scsector]);
606  trigGeomUtils->trigToSeg(station, x_trigger, x_angle);
607 
608  innerMECh.find("TM_PhitkvsPhitrig" + trigsrc)->second->Fill(x_trigger, x_track);
609  innerMECh.find("TM_PhibtkvsPhibtrig" + trigsrc)->second->Fill(angle_trigger, x_angle);
610  innerMECh.find("TM_PhiResidual" + trigsrc)->second->Fill(x_trigger - x_track);
611  innerMECh.find("TM_PhibResidual" + trigsrc)->second->Fill(angle_trigger - x_angle);
612  }
613  }
614 
615  if (useTM) {
616  // check for triggers elsewhere in the sector
617  bool trigFlagTM = false;
618  for (int ist = 1; ist < 5; ist++) {
619  if (ist != station && phcode_best[wheel + 3][ist][scsector] >= 2 &&
620  phcode_best[wheel + 3][ist][scsector] < 7 && track_ok[wheel + 3][ist][scsector] == true) {
621  trigFlagTM = true;
622  break;
623  }
624  }
625 
626  if (trigFlagTM && fabs(x_angle) < 40. && nHitsPhi >= 7) {
627  // position vs angle of track for reconstruced tracks (denom. for trigger efficiency)
628  innerME.find("TM_TrackPosvsAngle" + trigsrc)->second->Fill(x_angle, x_track);
629  if (phcode_best[wheel + 3][station][scsector] >= 2 && phcode_best[wheel + 3][station][scsector] < 7) {
630  innerME.find("TM_TrackPosvsAngleandTrig" + trigsrc)->second->Fill(x_angle, x_track);
631  if (phcode_best[wheel + 3][station][scsector] > 4) { //HH & HL Triggers
632  innerME.find("TM_TrackPosvsAngleandTrigHHHL" + trigsrc)->second->Fill(x_angle, x_track);
633  }
634  }
635  }
636 
637  if ((*btrack)->hasZed() && trigFlagTM && fabs(y_angle) < 40. &&
638  (*btrack)->zSegment()->degreesOfFreedom() >= 1) {
639  // position va angle of track for reconstruced tracks (denom. for trigger efficiency) along theta direction
640  innerME.find("TM_TrackThetaPosvsAngle" + trigsrc)->second->Fill(y_angle, y_track);
641  if (thcode_best[wheel + 3][station][scsector] > 0) {
642  innerME.find("TM_TrackThetaPosvsAngleandTrig" + trigsrc)->second->Fill(y_angle, y_track);
643  if (thcode_best[wheel + 3][station][scsector] == 2) {
644  innerME.find("TM_TrackThetaPosvsAngleandTrigH" + trigsrc)->second->Fill(y_angle, y_track);
645  }
646  }
647  }
648  }
649  }
650  }
651 }

References DTTrigGeomUtils::computeSCCoordinates(), digiHistos, iphbest, phcode_best, FastTimerService_cff::range, DetId::rawId(), relativeConstraints::station, thcode_best, HLT_FULL_cff::track, track_ok, DTTrigGeomUtils::trigDir(), trigGeomUtils, DTTrigGeomUtils::trigPos(), trigsrc, DTTrigGeomUtils::trigToSeg(), useTM, and makeMuonMisalignmentScenario::wheel.

Referenced by analyze().

◆ runTMAnalysis()

void DTLocalTriggerTask::runTMAnalysis ( std::vector< L1MuDTChambPhDigi > const *  phTrigs,
std::vector< L1MuDTChambThDigi > const *  thTrigs 
)
protected

Run analysis on TM data.

Definition at line 411 of file DTLocalTriggerTask.cc.

412  {
413  //exit(0);
414 
415  string histoType;
416  string histoTag;
417 
418  // define best quality trigger segment (phi and theta)
419  // in any station start from 1 and zero is kept empty
420  for (int i = 0; i < 5; ++i) {
421  for (int j = 0; j < 6; ++j) {
422  for (int k = 0; k < 13; ++k) {
423  phcode_best[j][i][k] = -1;
424  thcode_best[j][i][k] = -1;
425  }
426  }
427  }
428 
429  vector<L1MuDTChambPhDigi>::const_iterator iph = phTrigs->begin();
430  vector<L1MuDTChambPhDigi>::const_iterator iphe = phTrigs->end();
431  for (; iph != iphe; ++iph) {
432  int phwheel = iph->whNum();
433  int phsec = iph->scNum() + 1; // SM The track finder goes from 0 to 11. I need them from 1 to 12 !!!!!
434  int phst = iph->stNum();
435  int phbx = iph->bxNum();
436  int phcode = iph->code();
437  int phi1st = iph->Ts2Tag();
438  int updown = iph->UpDownTag();
439 
440  // FIXME: workaround for TM data with station ID
441  if (phst == 0) {
442  tm_IDDataErrorPlot->Fill(phwheel);
443  continue;
444  }
445 
446  if (phcode > phcode_best[phwheel + 3][phst][phsec] && phcode < 7) {
447  phcode_best[phwheel + 3][phst][phsec] = phcode;
448  iphbest[phwheel + 3][phst][phsec] = &(*iph);
449  }
450 
451  DTChamberId dtChId(phwheel, phst, phsec);
452 
453  float x = trigGeomUtils->trigPos(&(*iph));
454  float angle = trigGeomUtils->trigDir(&(*iph));
455  uint32_t indexCh = dtChId.rawId();
456 
457  map<string, MonitorElement*>& innerME = digiHistos[indexCh];
458 
459  if (tpMode) {
460  innerME.find("TM_BXvsQual" + trigsrc)->second->Fill(phcode, phbx - phi1st); // SM BX vs Qual Phi view (1st tracks)
461  innerME.find("TM_QualvsPhirad" + trigsrc)->second->Fill(x, phcode); // SM Qual vs radial angle Phi view
462  } else {
463  innerME.find("TM_BXvsQual_In" + trigsrc)
464  ->second->Fill(phcode, phbx - phi1st); // SM BX vs Qual Phi view (1st tracks)
465  innerME.find("TM_Flag1stvsQual_In" + trigsrc)
466  ->second->Fill(phcode, phi1st); // SM Qual 1st/2nd track flag Phi view
467  innerME.find("TM_FlagUpDownvsQual_In" + trigsrc)
468  ->second->Fill(phcode, updown); // SM Qual Up/Down track flag Phi view
469  if (detailedAnalysis) {
470  innerME.find("TM_QualvsPhirad_In" + trigsrc)->second->Fill(x, phcode); // SM Qual vs radial angle Phi view
471  innerME.find("TM_QualvsPhibend_In" + trigsrc)->second->Fill(angle, phcode); // SM Qual vs bending Phi view
472  }
473  }
474  }
475 
476  if (doTMTheta) {
477  int thcode[7];
478  vector<L1MuDTChambThDigi>::const_iterator ith = thTrigs->begin();
479  vector<L1MuDTChambThDigi>::const_iterator ithe = thTrigs->end();
480  for (; ith != ithe; ++ith) {
481  int thwheel = ith->whNum();
482  int thsec = ith->scNum() + 1; // SM The track finder goes from 0 to 11. I need them from 1 to 12 !!!!!
483  int thst = ith->stNum();
484  int thbx = ith->bxNum();
485 
486  for (int pos = 0; pos < 7; pos++) {
487  thcode[pos] = ith->code(pos);
488 
489  if (thcode[pos] > thcode_best[thwheel + 3][thst][thsec]) {
490  thcode_best[thwheel + 3][thst][thsec] = thcode[pos];
491  ithbest[thwheel + 3][thst][thsec] = &(*ith);
492  }
493  }
494 
495  DTChamberId dtChId(thwheel, thst, thsec);
496  uint32_t indexCh = dtChId.rawId();
497 
498  map<string, MonitorElement*>& innerME = digiHistos[indexCh];
499 
500  for (int pos = 0; pos < 7; pos++) { //SM fill position for non zero position bit in theta view
501  if (thcode[pos] > 0) { //Fired
502  innerME.find("TM_PositionvsBX" + trigsrc)->second->Fill(thbx, pos); // SM BX vs Position Theta view
503  innerME.find("TM_PositionvsQual" + trigsrc)
504  ->second->Fill(thcode[pos], pos); //code = pos + qual; so 0, 1, 2 for 0, L, H resp.
505  innerME.find("TM_ThetaBXvsQual" + trigsrc)
506  ->second->Fill(thcode[pos], thbx); //code = pos + qual; so 0, 1, 2 for 0, L, H resp.
507  }
508  }
509  }
510  }
511 
512  // Fill Quality plots with best TM triggers in phi & theta
513  if (!tpMode) {
514  for (int st = 1; st < 5; ++st) {
515  for (int wh = -2; wh < 3; ++wh) {
516  for (int sc = 1; sc < 13; ++sc) {
517  if (phcode_best[wh + wheelArrayShift][st][sc] > -1 && phcode_best[wh + wheelArrayShift][st][sc] < 7) {
518  DTChamberId id(wh, st, sc);
519  uint32_t indexCh = id.rawId();
520  map<string, MonitorElement*>& innerME = digiHistos[indexCh];
521 
522  innerME.find("TM_BestQual_In" + trigsrc)
523  ->second->Fill(phcode_best[wh + wheelArrayShift][st][sc]); // Best Qual Trigger Phi view
524  }
525  if (thcode_best[wh + wheelArrayShift][st][sc] > 0 && thcode_best[wh + wheelArrayShift][st][sc] < 3) {
526  DTChamberId id(wh, st, sc);
527  uint32_t indexCh = id.rawId();
528  map<string, MonitorElement*>& innerME = digiHistos[indexCh];
529 
530  innerME.find("TM_ThetaBestQual" + trigsrc)
531  ->second->Fill(thcode_best[wh + wheelArrayShift][st][sc]); // Best Qual Trigger Theta view
532  }
533  }
534  }
535  }
536  }
537 }

References angle(), detailedAnalysis, digiHistos, doTMTheta, dqm::impl::MonitorElement::Fill(), dtResolutionTest_cfi::histoTag, mps_fire::i, triggerObjects_cff::id, iphbest, ithbest, dqmiolumiharvest::j, dqmdumpme::k, phcode_best, DetId::rawId(), thcode_best, tm_IDDataErrorPlot, tpMode, DTTrigGeomUtils::trigDir(), trigGeomUtils, DTTrigGeomUtils::trigPos(), trigsrc, wheelArrayShift, and x.

Referenced by analyze().

◆ setQLabels()

void DTLocalTriggerTask::setQLabels ( MonitorElement me,
short int  iaxis 
)
protected

Set Quality labels.

Definition at line 653 of file DTLocalTriggerTask.cc.

653  {
654  TH1* histo = me->getTH1();
655  if (!histo)
656  return;
657 
658  TAxis* axis = nullptr;
659  if (iaxis == 1) {
660  axis = histo->GetXaxis();
661  } else if (iaxis == 2) {
662  axis = histo->GetYaxis();
663  }
664  if (!axis)
665  return;
666 
667  string labels[7] = {"LI", "LO", "HI", "HO", "LL", "HL", "HH"};
668  int istart = axis->GetXmin() < -1 ? 2 : 1;
669  for (int i = 0; i < 7; i++) {
670  axis->SetBinLabel(i + istart, labels[i].c_str());
671  }
672 }

References timingPdfMaker::histo, mps_fire::i, SummaryClient_cfi::labels, and hlt_dqm_clientPB-live_cfg::me.

Referenced by bookHistos().

◆ setQLabelsTheta()

void DTLocalTriggerTask::setQLabelsTheta ( MonitorElement me,
short int  iaxis 
)
protected

Definition at line 674 of file DTLocalTriggerTask.cc.

674  {
675  TH1* histo = me->getTH1();
676  if (!histo)
677  return;
678 
679  TAxis* axis = nullptr;
680  if (iaxis == 1) {
681  axis = histo->GetXaxis();
682  } else if (iaxis == 2) {
683  axis = histo->GetYaxis();
684  }
685  if (!axis)
686  return;
687 
688  string labels[2] = {"L", "H"};
689  int istart = axis->GetXmin() < -1 ? 2 : 1;
690  for (int i = 0; i < 2; i++) {
691  axis->SetBinLabel(i + istart, labels[i].c_str());
692  }
693 }

References timingPdfMaker::histo, mps_fire::i, SummaryClient_cfi::labels, and hlt_dqm_clientPB-live_cfg::me.

Referenced by bookHistos().

◆ topFolder()

std::string& DTLocalTriggerTask::topFolder ( )
inlineprotected

Get the Top folder (different between Physics and TP and TM)

Definition at line 98 of file DTLocalTriggerTask.h.

98 { return baseFolderTM; }

References baseFolderTM.

Referenced by bookBarrelHistos(), bookHistos(), and bookWheelHistos().

◆ triggerSource()

void DTLocalTriggerTask::triggerSource ( const edm::Event e)
protected

Get the L1A source.

Definition at line 695 of file DTLocalTriggerTask.cc.

695  {
696  if (!isLocalRun) {
697  Handle<LTCDigiCollection> ltcdigis;
698  e.getByToken(ltcDigiCollectionToken_, ltcdigis);
699 
700  for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++) {
701  size_t otherTriggerSum = 0;
702  for (size_t i = 1; i < 6; i++) {
703  otherTriggerSum += size_t((*ltc_it).HasTriggered(i));
704  }
705  if ((*ltc_it).HasTriggered(0) && otherTriggerSum == 0)
706  trigsrc = "_DTonly";
707  else if (!(*ltc_it).HasTriggered(0))
708  trigsrc = "_NoDT";
709  else if ((*ltc_it).HasTriggered(0) && otherTriggerSum > 0)
710  trigsrc = "_DTalso";
711  }
712  return;
713  }
714 
715  trigsrc = "";
716  return;
717 }

References MillePedeFileConverter_cfg::e, mps_fire::i, isLocalRun, ltcDigiCollectionToken_, and trigsrc.

Referenced by analyze().

Friends And Related Function Documentation

◆ DTMonitorModule

friend class DTMonitorModule
friend

Definition at line 53 of file DTLocalTriggerTask.h.

Member Data Documentation

◆ baseFolderTM

std::string DTLocalTriggerTask::baseFolderTM
private

Definition at line 113 of file DTLocalTriggerTask.h.

Referenced by DTLocalTriggerTask(), and topFolder().

◆ detailedAnalysis

bool DTLocalTriggerTask::detailedAnalysis
private

Definition at line 115 of file DTLocalTriggerTask.h.

Referenced by bookHistograms(), DTLocalTriggerTask(), and runTMAnalysis().

◆ digiHistos

std::map<uint32_t, std::map<std::string, MonitorElement*> > DTLocalTriggerTask::digiHistos
private

◆ doTMTheta

bool DTLocalTriggerTask::doTMTheta
private

Definition at line 114 of file DTLocalTriggerTask.h.

Referenced by bookHistograms(), DTLocalTriggerTask(), and runTMAnalysis().

◆ iphbest

DTArr3PhDigi DTLocalTriggerTask::iphbest
private

Definition at line 120 of file DTLocalTriggerTask.h.

Referenced by runSegmentAnalysis(), and runTMAnalysis().

◆ isLocalRun

bool DTLocalTriggerTask::isLocalRun
private

Definition at line 132 of file DTLocalTriggerTask.h.

Referenced by DTLocalTriggerTask(), and triggerSource().

◆ ithbest

DTArr3ThDigi DTLocalTriggerTask::ithbest
private

Definition at line 121 of file DTLocalTriggerTask.h.

Referenced by runTMAnalysis().

◆ ltcDigiCollectionToken_

edm::EDGetTokenT<LTCDigiCollection> DTLocalTriggerTask::ltcDigiCollectionToken_
private

Definition at line 107 of file DTLocalTriggerTask.h.

Referenced by DTLocalTriggerTask(), and triggerSource().

◆ mapDTTF

DTArr3mapInt DTLocalTriggerTask::mapDTTF
private

Definition at line 119 of file DTLocalTriggerTask.h.

◆ muonGeom

edm::ESHandle<DTGeometry> DTLocalTriggerTask::muonGeom
private

Definition at line 125 of file DTLocalTriggerTask.h.

Referenced by dqmBeginRun().

◆ nevents

int DTLocalTriggerTask::nevents
private

Definition at line 111 of file DTLocalTriggerTask.h.

Referenced by analyze(), dqmBeginRun(), and ~DTLocalTriggerTask().

◆ parameters

edm::ParameterSet DTLocalTriggerTask::parameters
private

◆ phcode_best

DTArr3int DTLocalTriggerTask::phcode_best
private

Definition at line 117 of file DTLocalTriggerTask.h.

Referenced by runSegmentAnalysis(), and runTMAnalysis().

◆ ros_Token_

edm::EDGetTokenT<DTLocalTriggerCollection> DTLocalTriggerTask::ros_Token_
private

Definition at line 105 of file DTLocalTriggerTask.h.

Referenced by DTLocalTriggerTask().

◆ seg_Token_

edm::EDGetTokenT<DTRecSegment4DCollection> DTLocalTriggerTask::seg_Token_
private

Definition at line 106 of file DTLocalTriggerTask.h.

Referenced by analyze(), and DTLocalTriggerTask().

◆ thcode_best

DTArr3int DTLocalTriggerTask::thcode_best
private

Definition at line 118 of file DTLocalTriggerTask.h.

Referenced by runSegmentAnalysis(), and runTMAnalysis().

◆ tm_IDDataErrorPlot

MonitorElement* DTLocalTriggerTask::tm_IDDataErrorPlot
private

Definition at line 130 of file DTLocalTriggerTask.h.

Referenced by bookBarrelHistos(), and runTMAnalysis().

◆ tm_Token_

edm::EDGetTokenT<L1MuDTChambPhContainer> DTLocalTriggerTask::tm_Token_
private

Definition at line 103 of file DTLocalTriggerTask.h.

Referenced by analyze(), and DTLocalTriggerTask().

◆ tmTh_Token_

edm::EDGetTokenT<L1MuDTChambThContainer> DTLocalTriggerTask::tmTh_Token_
private

Definition at line 104 of file DTLocalTriggerTask.h.

Referenced by analyze(), and DTLocalTriggerTask().

◆ tpMode

bool DTLocalTriggerTask::tpMode
private

Definition at line 112 of file DTLocalTriggerTask.h.

Referenced by analyze(), bookHistograms(), DTLocalTriggerTask(), and runTMAnalysis().

◆ track_ok

bool DTLocalTriggerTask::track_ok[6][5][15]
private

Definition at line 122 of file DTLocalTriggerTask.h.

Referenced by runSegmentAnalysis().

◆ trigGeomUtils

DTTrigGeomUtils* DTLocalTriggerTask::trigGeomUtils
private

◆ trigsrc

std::string DTLocalTriggerTask::trigsrc
private

Definition at line 110 of file DTLocalTriggerTask.h.

Referenced by runSegmentAnalysis(), runTMAnalysis(), and triggerSource().

◆ useSEG

bool DTLocalTriggerTask::useSEG
private

Definition at line 109 of file DTLocalTriggerTask.h.

Referenced by analyze().

◆ useTM

bool DTLocalTriggerTask::useTM
private

Definition at line 109 of file DTLocalTriggerTask.h.

Referenced by analyze(), and runSegmentAnalysis().

◆ wheelArrayShift

const int DTLocalTriggerTask::wheelArrayShift = 3
protected

Definition at line 100 of file DTLocalTriggerTask.h.

Referenced by runTMAnalysis().

◆ wheelHistos

std::map<int, std::map<std::string, MonitorElement*> > DTLocalTriggerTask::wheelHistos
private

Definition at line 128 of file DTLocalTriggerTask.h.

SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
DTLocalTriggerTask::iphbest
DTArr3PhDigi iphbest
Definition: DTLocalTriggerTask.h:120
DTRecSegment4D
Definition: DTRecSegment4D.h:23
simKBmtfStubs_cfi.minBX
minBX
Definition: simKBmtfStubs_cfi.py:9
DOFs::dof
dof
Definition: AlignPCLThresholdsWriter.cc:37
mps_fire.i
i
Definition: mps_fire.py:428
DTLocalTriggerTask::tmTh_Token_
edm::EDGetTokenT< L1MuDTChambThContainer > tmTh_Token_
Definition: DTLocalTriggerTask.h:104
DTTrigGeomUtils::trigDir
float trigDir(const L1MuDTChambPhDigi *trig)
Return local direction (trigger RF) for a given trigger primitive.
Definition: DTTrigGeomUtils.cc:138
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
DTLocalTriggerTask::bookBarrelHistos
void bookBarrelHistos(DQMStore::IBooker &, std::string histoTag)
Book the histograms.
Definition: DTLocalTriggerTask.cc:232
DTLocalTriggerTask::muonGeom
edm::ESHandle< DTGeometry > muonGeom
Definition: DTLocalTriggerTask.h:125
min
T min(T a, T b)
Definition: MathUtil.h:58
printsummarytable.folder
folder
Definition: printsummarytable.py:7
DTLocalTriggerTask::track_ok
bool track_ok[6][5][15]
Definition: DTLocalTriggerTask.h:122
relativeConstraints.station
station
Definition: relativeConstraints.py:67
pos
Definition: PixelAliasList.h:18
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
DTTrigGeomUtils::trigPos
float trigPos(const L1MuDTChambPhDigi *trig)
Return local position (trigger RF) for a given trigger primitive.
Definition: DTTrigGeomUtils.cc:98
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
DTLocalTriggerTask::useTM
bool useTM
Definition: DTLocalTriggerTask.h:109
edm::Handle< L1MuDTChambPhContainer >
DTLocalTriggerTask::triggerSource
void triggerSource(const edm::Event &e)
Get the L1A source.
Definition: DTLocalTriggerTask.cc:695
DTLocalTriggerTask::seg_Token_
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
Definition: DTLocalTriggerTask.h:106
edm::RangeMap::id_iterator
identifier iterator
Definition: RangeMap.h:130
DTLocalTriggerTask::doTMTheta
bool doTMTheta
Definition: DTLocalTriggerTask.h:114
L1MuDTChambPhContainer::getContainer
Phi_Container const * getContainer() const
Definition: L1MuDTChambPhContainer.cc:41
DTLocalTriggerTask::parameters
edm::ParameterSet parameters
Definition: DTLocalTriggerTask.h:124
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1119
DTLocalTriggerTask::topFolder
std::string & topFolder()
Get the Top folder (different between Physics and TP and TM)
Definition: DTLocalTriggerTask.h:98
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
DTLocalTriggerTask::detailedAnalysis
bool detailedAnalysis
Definition: DTLocalTriggerTask.h:115
DTLocalTriggerTask::isLocalRun
bool isLocalRun
Definition: DTLocalTriggerTask.h:132
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
dqmdumpme.k
k
Definition: dqmdumpme.py:60
DTLocalTriggerTask::bookHistos
void bookHistos(DQMStore::IBooker &, const DTChamberId &dtCh, std::string folder, std::string histoTag)
Definition: DTLocalTriggerTask.cc:242
DTLocalTriggerTask::wheelArrayShift
const int wheelArrayShift
Definition: DTLocalTriggerTask.h:100
DTLocalTriggerTask::nevents
int nevents
Definition: DTLocalTriggerTask.h:111
DTTrigGeomUtils::phiRange
void phiRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute phi range in local chamber coordinates.
Definition: DTTrigGeomUtils.cc:67
DTLocalTriggerTask::baseFolderTM
std::string baseFolderTM
Definition: DTLocalTriggerTask.h:113
DTLocalTriggerTask::tpMode
bool tpMode
Definition: DTLocalTriggerTask.h:112
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
DTTrigGeomUtils::thetaRange
void thetaRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute theta range in local chamber coordinates.
Definition: DTTrigGeomUtils.cc:86
DTTrigGeomUtils::trigToSeg
void trigToSeg(int st, float &x, float dir)
Compute Trigger x coordinate in chamber RF.
Definition: DTTrigGeomUtils.h:45
DTLocalTriggerTask::setQLabels
void setQLabels(MonitorElement *me, short int iaxis)
Set Quality labels.
Definition: DTLocalTriggerTask.cc:653
edm::RangeMap::const_iterator
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
dtResolutionTest_cfi.histoTag
histoTag
Definition: dtResolutionTest_cfi.py:21
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
createfilelist.int
int
Definition: createfilelist.py:10
L1MuDTChambThContainer::getContainer
The_Container const * getContainer() const
Definition: L1MuDTChambThContainer.cc:41
edm::LuminosityBlockID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockID.h:42
edm::LuminosityBlockBase::id
LuminosityBlockID id() const
Definition: LuminosityBlockBase.h:44
DTTrigGeomUtils::computeSCCoordinates
void computeSCCoordinates(const DTRecSegment4D *track, int &scsec, float &x, float &xdir, float &y, float &ydir)
Compute track coordinates with SC sector numbering.
Definition: DTTrigGeomUtils.cc:52
DTLocalTriggerTask::trigsrc
std::string trigsrc
Definition: DTLocalTriggerTask.h:110
simKBmtfStubs_cfi.maxBX
maxBX
Definition: simKBmtfStubs_cfi.py:10
get
#define get
DTLocalTriggerTask::tm_IDDataErrorPlot
MonitorElement * tm_IDDataErrorPlot
Definition: DTLocalTriggerTask.h:130
DTLocalTriggerTask::useSEG
bool useSEG
Definition: DTLocalTriggerTask.h:109
DTLocalTriggerTask::digiHistos
std::map< uint32_t, std::map< std::string, MonitorElement * > > digiHistos
Definition: DTLocalTriggerTask.h:127
DTLocalTriggerTask::setQLabelsTheta
void setQLabelsTheta(MonitorElement *me, short int iaxis)
Definition: DTLocalTriggerTask.cc:674
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
edm::RangeMap::range
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
DTLocalTriggerTask::ithbest
DTArr3ThDigi ithbest
Definition: DTLocalTriggerTask.h:121
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
DTTrigGeomUtils
Definition: DTTrigGeomUtils.h:21
DTLocalTriggerTask::thcode_best
DTArr3int thcode_best
Definition: DTLocalTriggerTask.h:118
DTLocalTriggerTask::ros_Token_
edm::EDGetTokenT< DTLocalTriggerCollection > ros_Token_
Definition: DTLocalTriggerTask.h:105
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
HltBtagPostValidation_cff.histoName
histoName
Definition: HltBtagPostValidation_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
genParticles_cff.map
map
Definition: genParticles_cff.py:11
DTChamberId
Definition: DTChamberId.h:14
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
DTLocalTriggerTask::runSegmentAnalysis
void runSegmentAnalysis(edm::Handle< DTRecSegment4DCollection > &segments4D)
Run analysis using DT 4D segments.
Definition: DTLocalTriggerTask.cc:539
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DTLocalTriggerTask::runTMAnalysis
void runTMAnalysis(std::vector< L1MuDTChambPhDigi > const *phTrigs, std::vector< L1MuDTChambThDigi > const *thTrigs)
Run analysis on TM data.
Definition: DTLocalTriggerTask.cc:411
fftjetimagerecorder_cfi.histoLabel
histoLabel
Definition: fftjetimagerecorder_cfi.py:12
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
DTLocalTriggerTask::phcode_best
DTArr3int phcode_best
Definition: DTLocalTriggerTask.h:117
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
edm::InputTag
Definition: InputTag.h:15
DTLocalTriggerTask::tm_Token_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_Token_
Definition: DTLocalTriggerTask.h:103
DTLocalTriggerTask::trigGeomUtils
DTTrigGeomUtils * trigGeomUtils
Definition: DTLocalTriggerTask.h:126
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42
DTLocalTriggerTask::ltcDigiCollectionToken_
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
Definition: DTLocalTriggerTask.h:107
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37