CMS 3D CMS Logo

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

#include <DTLocalTriggerLutTask.h>

Inheritance diagram for DTLocalTriggerLutTask:
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

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 bookHistograms More...
 
 DTLocalTriggerLutTask (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DTLocalTriggerLutTask () 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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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 dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 BeginRun. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) final
 
void searchTMBestIn (std::vector< L1MuDTChambPhDigi > const *trigs)
 Find best (highest qual) TM trigger segments. More...
 
void searchTMBestOut (std::vector< L1MuDTChambPhDigi > const *trigs)
 
- 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 Member Functions

void bookHistos (DQMStore::IBooker &ibooker, DTChamberId chId)
 Book histos. More...
 
std::string & topFolder ()
 Get the top folder. More...
 

Private Attributes

std::string baseFolder
 
std::map< uint32_t, std::map< std::string, MonitorElement * > > chHistos
 
bool detailedAnalysis
 
edm::ESHandle< DTGeometrymuonGeom
 
int nEvents
 
int nLumis
 
int nPhibBins
 
int nPhiBins
 
bool overUnderIn
 
edm::ParameterSet parameters
 
double rangePhi
 
double rangePhiB
 
edm::EDGetTokenT< DTRecSegment4DCollectionseg_Token_
 
std::string theGeomLabel
 
edm::EDGetTokenT< L1MuDTChambPhContainertm_TokenIn_
 
edm::EDGetTokenT< L1MuDTChambPhContainertm_TokenOut_
 
DTArr3bool track_ok
 
DTArr3Digi trigBestIn
 
DTArr3Digi trigBestOut
 
DTTrigGeomUtilstrigGeomUtils
 
DTArr3int trigQualBestIn
 
DTArr3int trigQualBestOut
 
std::map< int, std::map< std::string, MonitorElement * > > whHistos
 

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 44 of file DTLocalTriggerLutTask.h.

Constructor & Destructor Documentation

◆ DTLocalTriggerLutTask()

DTLocalTriggerLutTask::DTLocalTriggerLutTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 34 of file DTLocalTriggerLutTask.cc.

34  : trigGeomUtils(nullptr) {
35  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerLutTask") << "[DTLocalTriggerLutTask]: Constructor" << endl;
36 
37  tm_TokenIn_ = consumes<L1MuDTChambPhContainer>(ps.getUntrackedParameter<InputTag>("inputTagTMin"));
38  tm_TokenOut_ = consumes<L1MuDTChambPhContainer>(ps.getUntrackedParameter<InputTag>("inputTagTMout"));
39  seg_Token_ = consumes<DTRecSegment4DCollection>(ps.getUntrackedParameter<InputTag>("inputTagSEG"));
40 
41  overUnderIn = ps.getUntrackedParameter<bool>("rebinOutFlowsInGraph");
42  detailedAnalysis = ps.getUntrackedParameter<bool>("detailedAnalysis");
43  theGeomLabel = ps.getUntrackedParameter<string>("geomLabel");
44 
45  if (detailedAnalysis) {
46  nPhiBins = 401;
47  rangePhi = 10.025;
48  nPhibBins = 401;
49  rangePhiB = 10.025;
50  } else {
51  nPhiBins = 51;
52  rangePhi = 5.1;
53  nPhibBins = 51;
54  rangePhiB = 10.2;
55  }
56 
57  baseFolder = "DT/03-LocalTrigger-TM/";
58  parameters = ps;
59 
60  nEvents = 0;
61  nLumis = 0;
62 }

References baseFolder, detailedAnalysis, edm::ParameterSet::getUntrackedParameter(), LogTrace, nEvents, nLumis, nPhibBins, nPhiBins, overUnderIn, parameters, rangePhi, rangePhiB, seg_Token_, theGeomLabel, tm_TokenIn_, and tm_TokenOut_.

◆ ~DTLocalTriggerLutTask()

DTLocalTriggerLutTask::~DTLocalTriggerLutTask ( )
override

Destructor.

Definition at line 64 of file DTLocalTriggerLutTask.cc.

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

References LogTrace, nEvents, and trigGeomUtils.

Member Function Documentation

◆ analyze()

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

Analyze.

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

Definition at line 175 of file DTLocalTriggerLutTask.cc.

175  {
176  nEvents++;
177 
179  e.getByToken(tm_TokenIn_, trigHandleIn);
181  e.getByToken(tm_TokenOut_, trigHandleOut);
182 
183  vector<L1MuDTChambPhDigi> const* trigsIn = trigHandleIn->getContainer();
184  searchTMBestIn(trigsIn);
185  vector<L1MuDTChambPhDigi> const* trigsOut = trigHandleOut->getContainer();
186  searchTMBestOut(trigsOut);
187 
189  e.getByToken(seg_Token_, segments4D);
191 
192  // Preliminary loop finds best 4D Segment and high quality ones
193  vector<const DTRecSegment4D*> best4DSegments;
194 
195  for (chamberId = segments4D->id_begin(); chamberId != segments4D->id_end(); ++chamberId) {
196  DTRecSegment4DCollection::range rangeInCh = segments4D->get(*chamberId);
197  DTRecSegment4DCollection::const_iterator trackIt = rangeInCh.first;
198  DTRecSegment4DCollection::const_iterator trackEnd = rangeInCh.second;
199 
200  const DTRecSegment4D* tmpBest = nullptr;
201  int tmpdof = 0;
202  int dof = 0;
203 
204  for (; trackIt != trackEnd; ++trackIt) {
205  if (trackIt->hasPhi()) {
206  dof = trackIt->phiSegment()->degreesOfFreedom();
207  if (dof > tmpdof) {
208  tmpBest = &(*trackIt);
209  tmpdof = dof;
210  }
211  }
212  }
213 
214  if (tmpBest)
215  best4DSegments.push_back(tmpBest);
216  }
217 
218  vector<const DTRecSegment4D*>::const_iterator bestTrackIt = best4DSegments.begin();
219  vector<const DTRecSegment4D*>::const_iterator bestTrackEnd = best4DSegments.end();
220 
221  for (; bestTrackIt != bestTrackEnd; ++bestTrackIt) {
222  if ((*bestTrackIt)->hasPhi()) {
223  DTChamberId chId = (*bestTrackIt)->chamberId();
224  int nHitsPhi = (*bestTrackIt)->phiSegment()->degreesOfFreedom() + 2;
225 
226  int wheel = chId.wheel();
227  int station = chId.station();
228  int scsector = 0;
229  float trackPosPhi, trackPosEta, trackDirPhi, trackDirEta;
230  trigGeomUtils->computeSCCoordinates((*bestTrackIt), scsector, trackPosPhi, trackDirPhi, trackPosEta, trackDirEta);
231 
232  map<string, MonitorElement*>& chMap = chHistos[chId.rawId()];
233  // In part
234  if (trigQualBestIn[wheel + 3][station][scsector] > 3 && // residuals only for correlate triggers
235  trigQualBestIn[wheel + 3][station][scsector] < 7 && nHitsPhi >= 7) {
236  float trigPos = trigGeomUtils->trigPos(trigBestIn[wheel + 3][station][scsector]);
237  float trigDir = trigGeomUtils->trigDir(trigBestIn[wheel + 3][station][scsector]);
238  trigGeomUtils->trigToSeg(station, trigPos, trackDirPhi);
239 
240  double deltaPos = trigPos - trackPosPhi;
241  deltaPos = overUnderIn ? max(min(deltaPos, rangePhi - 0.01), -rangePhi + 0.01) : deltaPos;
242  double deltaDir = trigDir - trackDirPhi;
243  deltaDir = overUnderIn ? max(min(deltaDir, rangePhiB - 0.01), -rangePhiB + 0.01) : deltaDir;
244  chMap.find("TM_PhiResidualIn")->second->Fill(deltaPos);
245  chMap.find("TM_PhibResidualIn")->second->Fill(deltaDir);
246 
247  if (detailedAnalysis) {
248  chMap.find("TM_PhitkvsPhitrig")->second->Fill(trigPos, trackPosPhi);
249  chMap.find("TM_PhibtkvsPhibtrig")->second->Fill(trigDir, trackDirPhi);
250  chMap.find("TM_PhibResidualvsTkPos")->second->Fill(trackPosPhi, trigDir - trackDirPhi);
251  chMap.find("TM_PhiResidualvsTkPos")->second->Fill(trackPosPhi, trigPos - trackPosPhi);
252  }
253  }
254 
255  // Out part
256  if (trigQualBestOut[wheel + 3][station][scsector] > 3 && // residuals only for correlate triggers
257  trigQualBestOut[wheel + 3][station][scsector] < 7 && nHitsPhi >= 7) {
258  float trigPos = trigGeomUtils->trigPos(trigBestOut[wheel + 3][station][scsector]);
259  float trigDir = trigGeomUtils->trigDir(trigBestOut[wheel + 3][station][scsector]);
260  trigGeomUtils->trigToSeg(station, trigPos, trackDirPhi);
261 
262  double deltaPos = trigPos - trackPosPhi;
263  deltaPos = overUnderIn ? max(min(deltaPos, rangePhi - 0.01), -rangePhi + 0.01) : deltaPos;
264  double deltaDir = trigDir - trackDirPhi;
265  deltaDir = overUnderIn ? max(min(deltaDir, rangePhiB - 0.01), -rangePhiB + 0.01) : deltaDir;
266  chMap.find("TM_PhiResidualOut")->second->Fill(deltaPos);
267  chMap.find("TM_PhibResidualOut")->second->Fill(deltaDir);
268  }
269  }
270  }
271 }

References chHistos, DTTrigGeomUtils::computeSCCoordinates(), detailedAnalysis, MillePedeFileConverter_cfg::e, L1MuDTChambPhContainer::getContainer(), SiStripPI::max, min(), nEvents, overUnderIn, rangePhi, rangePhiB, DetId::rawId(), searchTMBestIn(), searchTMBestOut(), seg_Token_, DTChamberId::station(), relativeConstraints::station, tm_TokenIn_, tm_TokenOut_, trigBestIn, trigBestOut, DTTrigGeomUtils::trigDir(), trigGeomUtils, DTTrigGeomUtils::trigPos(), trigQualBestIn, trigQualBestOut, DTTrigGeomUtils::trigToSeg(), DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

◆ beginLuminosityBlock()

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

To reset the MEs.

Definition at line 156 of file DTLocalTriggerLutTask.cc.

156  {
157  nLumis++;
158  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerLutTask") << "[DTLocalTriggerLutTask]: Begin of LS transition" << endl;
159 
160  if (nLumis % parameters.getUntrackedParameter<int>("ResetCycle") == 0) {
161  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerLutTask") << "[DTLocalTriggerLutTask]: Cleaning histos" << endl;
162  map<uint32_t, map<string, MonitorElement*> >::const_iterator chambIt = chHistos.begin();
163  map<uint32_t, map<string, MonitorElement*> >::const_iterator chambEnd = chHistos.end();
164 
165  for (; chambIt != chambEnd; ++chambIt) {
166  map<string, MonitorElement*>::const_iterator histoIt = chambIt->second.begin();
167  map<string, MonitorElement*>::const_iterator histoEnd = chambIt->second.end();
168  for (; histoIt != histoEnd; ++histoIt) {
169  histoIt->second->Reset();
170  }
171  }
172  }
173 }

References chHistos, edm::ParameterSet::getUntrackedParameter(), LogTrace, nLumis, and parameters.

◆ bookHistograms()

void DTLocalTriggerLutTask::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  run,
edm::EventSetup const &  context 
)
overridevirtual

bookHistograms

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

Definition at line 144 of file DTLocalTriggerLutTask.cc.

146  {
147  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerLutTask") << "[DTLocalTriggerLutTask]: bookHistograms" << endl;
148 
149  std::vector<const DTChamber*>::const_iterator chambIt = muonGeom->chambers().begin();
150  std::vector<const DTChamber*>::const_iterator chambEnd = muonGeom->chambers().end();
151 
152  for (; chambIt != chambEnd; ++chambIt)
153  bookHistos(ibooker, (*chambIt)->id());
154 }

References bookHistos(), DTGeometry::chambers(), LogTrace, and muonGeom.

◆ bookHistos()

void DTLocalTriggerLutTask::bookHistos ( DQMStore::IBooker ibooker,
DTChamberId  chId 
)
private

Book histos.

Definition at line 78 of file DTLocalTriggerLutTask.cc.

78  {
79  stringstream wheel;
80  wheel << chId.wheel();
81  stringstream sector;
82  sector << chId.sector();
83  stringstream station;
84  station << chId.station();
85 
86  ibooker.setCurrentFolder(topFolder() + "Wheel" + wheel.str() + "/Sector" + sector.str() + "/Station" + station.str() +
87  "/Segment");
88 
89  string chTag = "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
90  std::map<std::string, MonitorElement*>& chambMap = chHistos[chId.rawId()];
91 
92  string hName = "TM_PhiResidualIn";
93 
94  chambMap[hName] = ibooker.book1D(hName + chTag,
95  "Trigger local position In - Segment local position (correlated triggers)",
96  nPhiBins,
97  -rangePhi,
98  rangePhi);
99 
100  hName = "TM_PhiResidualOut";
101 
102  chambMap[hName] = ibooker.book1D(hName + chTag,
103  "Trigger local position Out - Segment local position (correlated triggers)",
104  nPhiBins,
105  -rangePhi,
106  rangePhi);
107 
108  hName = "TM_PhibResidualIn";
109 
110  chambMap[hName] = ibooker.book1D(hName + chTag,
111  "Trigger local direction In - Segment local direction (correlated triggers)",
112  nPhibBins,
113  -rangePhiB,
114  rangePhiB);
115 
116  hName = "TM_PhibResidualOut";
117 
118  chambMap[hName] = ibooker.book1D(hName + chTag,
119  "Trigger local direction Out - Segment local direction (correlated triggers)",
120  nPhibBins,
121  -rangePhiB,
122  rangePhiB);
123 
124  if (detailedAnalysis) {
125  hName = "TM_PhitkvsPhitrig";
126 
127  chambMap[hName] =
128  ibooker.book2D(hName + chTag, "Local position: segment vs trigger", 100, -500., 500., 100, -500., 500.);
129  hName = "TM_PhibtkvsPhibtrig";
130 
131  chambMap[hName] =
132  ibooker.book2D(hName + chTag, "Local direction : segment vs trigger", 200, -40., 40., 200, -40., 40.);
133  hName = "TM_PhibResidualvsTkPos";
134 
135  chambMap[hName] =
136  ibooker.book2D(hName + chTag, "Local direction residual vs Segment Position", 100, -500., 500., 200, -10., 10.);
137  hName = "TM_PhiResidualvsTkPos";
138 
139  chambMap[hName] =
140  ibooker.book2D(hName + chTag, "Local Position residual vs Segment Position", 100, -500., 500., 200, -10., 10.);
141  }
142 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), chHistos, detailedAnalysis, nPhibBins, nPhiBins, rangePhi, rangePhiB, DetId::rawId(), DTChamberId::sector(), dqm::implementation::NavigatorBase::setCurrentFolder(), DTChamberId::station(), relativeConstraints::station, topFolder(), DTChamberId::wheel(), and makeMuonMisalignmentScenario::wheel.

Referenced by bookHistograms().

◆ dqmBeginRun()

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

BeginRun.

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

Definition at line 72 of file DTLocalTriggerLutTask.cc.

72  {
73  // Get the geometry
76 }

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

◆ endLuminosityBlock()

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

Definition at line 70 of file DTLocalTriggerLutTask.h.

70 {}

◆ searchTMBestIn()

void DTLocalTriggerLutTask::searchTMBestIn ( std::vector< L1MuDTChambPhDigi > const *  trigs)
protected

Find best (highest qual) TM trigger segments.

Definition at line 273 of file DTLocalTriggerLutTask.cc.

273  {
274  string histoType;
275  string histoTag;
276 
277  // define best quality trigger segment
278  // start from 1 and zero is kept empty
279  for (int st = 0; st <= 4; ++st)
280  for (int wh = 0; wh <= 5; ++wh)
281  for (int sec = 0; sec <= 12; ++sec)
282  trigQualBestIn[wh][st][sec] = -1;
283 
284  vector<L1MuDTChambPhDigi>::const_iterator trigIt = trigs->begin();
285  vector<L1MuDTChambPhDigi>::const_iterator trigEnd = trigs->end();
286  for (; trigIt != trigEnd; ++trigIt) {
287  int wh = trigIt->whNum();
288  int sec = trigIt->scNum() + 1; // DTTF -> DT sector range transform
289  int st = trigIt->stNum();
290  int qual = trigIt->code();
291 
292  if (qual > trigQualBestIn[wh + wheelArrayShift][st][sec] && qual < 7) {
293  trigQualBestIn[wh + wheelArrayShift][st][sec] = qual;
294  trigBestIn[wh + wheelArrayShift][st][sec] = &(*trigIt);
295  }
296  }
297 }

References dtResolutionTest_cfi::histoTag, fileinputsource_cfi::sec, trigBestIn, trigQualBestIn, and wheelArrayShift.

Referenced by analyze().

◆ searchTMBestOut()

void DTLocalTriggerLutTask::searchTMBestOut ( std::vector< L1MuDTChambPhDigi > const *  trigs)
protected

Definition at line 299 of file DTLocalTriggerLutTask.cc.

299  {
300  string histoType;
301  string histoTag;
302 
303  // define best quality trigger segment
304  // // start from 1 and zero is kept empty
305  for (int st = 0; st <= 4; ++st)
306  for (int wh = 0; wh <= 5; ++wh)
307  for (int sec = 0; sec <= 12; ++sec)
308  trigQualBestOut[wh][st][sec] = -1;
309 
310  vector<L1MuDTChambPhDigi>::const_iterator trigIt = trigs->begin();
311  vector<L1MuDTChambPhDigi>::const_iterator trigEnd = trigs->end();
312  for (; trigIt != trigEnd; ++trigIt) {
313  int wh = trigIt->whNum();
314  int sec = trigIt->scNum() + 1; // DTTF -> DT sector range transform
315  int st = trigIt->stNum();
316  int qual = trigIt->code();
317 
318  if (qual > trigQualBestOut[wh + wheelArrayShift][st][sec] && qual < 7) {
319  trigQualBestOut[wh + wheelArrayShift][st][sec] = qual;
320  trigBestOut[wh + wheelArrayShift][st][sec] = &(*trigIt);
321  }
322  }
323 }

References dtResolutionTest_cfi::histoTag, fileinputsource_cfi::sec, trigBestOut, trigQualBestOut, and wheelArrayShift.

Referenced by analyze().

◆ topFolder()

std::string& DTLocalTriggerLutTask::topFolder ( )
inlineprivate

Get the top folder.

Definition at line 76 of file DTLocalTriggerLutTask.h.

76 { return baseFolder; }

References baseFolder.

Referenced by bookHistos().

Friends And Related Function Documentation

◆ DTMonitorModule

friend class DTMonitorModule
friend

Definition at line 45 of file DTLocalTriggerLutTask.h.

Member Data Documentation

◆ baseFolder

std::string DTLocalTriggerLutTask::baseFolder
private

Definition at line 87 of file DTLocalTriggerLutTask.h.

Referenced by DTLocalTriggerLutTask(), and topFolder().

◆ chHistos

std::map<uint32_t, std::map<std::string, MonitorElement*> > DTLocalTriggerLutTask::chHistos
private

Definition at line 106 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), beginLuminosityBlock(), and bookHistos().

◆ detailedAnalysis

bool DTLocalTriggerLutTask::detailedAnalysis
private

Definition at line 88 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), bookHistos(), and DTLocalTriggerLutTask().

◆ muonGeom

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

Definition at line 102 of file DTLocalTriggerLutTask.h.

Referenced by bookHistograms(), and dqmBeginRun().

◆ nEvents

int DTLocalTriggerLutTask::nEvents
private

◆ nLumis

int DTLocalTriggerLutTask::nLumis
private

Definition at line 83 of file DTLocalTriggerLutTask.h.

Referenced by beginLuminosityBlock(), and DTLocalTriggerLutTask().

◆ nPhibBins

int DTLocalTriggerLutTask::nPhibBins
private

Definition at line 84 of file DTLocalTriggerLutTask.h.

Referenced by bookHistos(), and DTLocalTriggerLutTask().

◆ nPhiBins

int DTLocalTriggerLutTask::nPhiBins
private

Definition at line 84 of file DTLocalTriggerLutTask.h.

Referenced by bookHistos(), and DTLocalTriggerLutTask().

◆ overUnderIn

bool DTLocalTriggerLutTask::overUnderIn
private

Definition at line 89 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

◆ parameters

edm::ParameterSet DTLocalTriggerLutTask::parameters
private

Definition at line 101 of file DTLocalTriggerLutTask.h.

Referenced by beginLuminosityBlock(), and DTLocalTriggerLutTask().

◆ rangePhi

double DTLocalTriggerLutTask::rangePhi
private

Definition at line 85 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), bookHistos(), and DTLocalTriggerLutTask().

◆ rangePhiB

double DTLocalTriggerLutTask::rangePhiB
private

Definition at line 85 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), bookHistos(), and DTLocalTriggerLutTask().

◆ seg_Token_

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

Definition at line 93 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

◆ theGeomLabel

std::string DTLocalTriggerLutTask::theGeomLabel
private

Definition at line 103 of file DTLocalTriggerLutTask.h.

Referenced by dqmBeginRun(), and DTLocalTriggerLutTask().

◆ tm_TokenIn_

edm::EDGetTokenT<L1MuDTChambPhContainer> DTLocalTriggerLutTask::tm_TokenIn_
private

Definition at line 91 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

◆ tm_TokenOut_

edm::EDGetTokenT<L1MuDTChambPhContainer> DTLocalTriggerLutTask::tm_TokenOut_
private

Definition at line 92 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

◆ track_ok

DTArr3bool DTLocalTriggerLutTask::track_ok
private

Definition at line 99 of file DTLocalTriggerLutTask.h.

◆ trigBestIn

DTArr3Digi DTLocalTriggerLutTask::trigBestIn
private

Definition at line 97 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestIn().

◆ trigBestOut

DTArr3Digi DTLocalTriggerLutTask::trigBestOut
private

Definition at line 98 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestOut().

◆ trigGeomUtils

DTTrigGeomUtils* DTLocalTriggerLutTask::trigGeomUtils
private

Definition at line 104 of file DTLocalTriggerLutTask.h.

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

◆ trigQualBestIn

DTArr3int DTLocalTriggerLutTask::trigQualBestIn
private

Definition at line 95 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestIn().

◆ trigQualBestOut

DTArr3int DTLocalTriggerLutTask::trigQualBestOut
private

Definition at line 96 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestOut().

◆ wheelArrayShift

const int DTLocalTriggerLutTask::wheelArrayShift = 3
protected

Definition at line 72 of file DTLocalTriggerLutTask.h.

Referenced by searchTMBestIn(), and searchTMBestOut().

◆ whHistos

std::map<int, std::map<std::string, MonitorElement*> > DTLocalTriggerLutTask::whHistos
private

Definition at line 107 of file DTLocalTriggerLutTask.h.

DTLocalTriggerLutTask::trigBestOut
DTArr3Digi trigBestOut
Definition: DTLocalTriggerLutTask.h:98
DTLocalTriggerLutTask::searchTMBestIn
void searchTMBestIn(std::vector< L1MuDTChambPhDigi > const *trigs)
Find best (highest qual) TM trigger segments.
Definition: DTLocalTriggerLutTask.cc:273
DTRecSegment4D
Definition: DTRecSegment4D.h:23
DOFs::dof
dof
Definition: AlignPCLThresholdsWriter.cc:37
DTTrigGeomUtils::trigDir
float trigDir(const L1MuDTChambPhDigi *trig)
Return local direction (trigger RF) for a given trigger primitive.
Definition: DTTrigGeomUtils.cc:138
DTLocalTriggerLutTask::chHistos
std::map< uint32_t, std::map< std::string, MonitorElement * > > chHistos
Definition: DTLocalTriggerLutTask.h:106
min
T min(T a, T b)
Definition: MathUtil.h:58
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DTLocalTriggerLutTask::parameters
edm::ParameterSet parameters
Definition: DTLocalTriggerLutTask.h:101
DTLocalTriggerLutTask::wheelArrayShift
const int wheelArrayShift
Definition: DTLocalTriggerLutTask.h:72
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DTLocalTriggerLutTask::rangePhi
double rangePhi
Definition: DTLocalTriggerLutTask.h:85
DTLocalTriggerLutTask::detailedAnalysis
bool detailedAnalysis
Definition: DTLocalTriggerLutTask.h:88
DTLocalTriggerLutTask::nPhibBins
int nPhibBins
Definition: DTLocalTriggerLutTask.h:84
DTLocalTriggerLutTask::trigBestIn
DTArr3Digi trigBestIn
Definition: DTLocalTriggerLutTask.h:97
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
edm::Handle< L1MuDTChambPhContainer >
edm::RangeMap::id_iterator
identifier iterator
Definition: RangeMap.h:130
L1MuDTChambPhContainer::getContainer
Phi_Container const * getContainer() const
Definition: L1MuDTChambPhContainer.cc:41
DTLocalTriggerLutTask::nPhiBins
int nPhiBins
Definition: DTLocalTriggerLutTask.h:84
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
DTLocalTriggerLutTask::muonGeom
edm::ESHandle< DTGeometry > muonGeom
Definition: DTLocalTriggerLutTask.h:102
DTGeometry::chambers
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84
DTLocalTriggerLutTask::baseFolder
std::string baseFolder
Definition: DTLocalTriggerLutTask.h:87
DTLocalTriggerLutTask::trigQualBestIn
DTArr3int trigQualBestIn
Definition: DTLocalTriggerLutTask.h:95
DTLocalTriggerLutTask::trigQualBestOut
DTArr3int trigQualBestOut
Definition: DTLocalTriggerLutTask.h:96
DTLocalTriggerLutTask::trigGeomUtils
DTTrigGeomUtils * trigGeomUtils
Definition: DTLocalTriggerLutTask.h:104
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
DTLocalTriggerLutTask::searchTMBestOut
void searchTMBestOut(std::vector< L1MuDTChambPhDigi > const *trigs)
Definition: DTLocalTriggerLutTask.cc:299
DTTrigGeomUtils::trigToSeg
void trigToSeg(int st, float &x, float dir)
Compute Trigger x coordinate in chamber RF.
Definition: DTTrigGeomUtils.h:45
DTLocalTriggerLutTask::nEvents
int nEvents
Definition: DTLocalTriggerLutTask.h:82
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
DTLocalTriggerLutTask::overUnderIn
bool overUnderIn
Definition: DTLocalTriggerLutTask.h:89
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
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
DTLocalTriggerLutTask::tm_TokenIn_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_TokenIn_
Definition: DTLocalTriggerLutTask.h:91
DTLocalTriggerLutTask::bookHistos
void bookHistos(DQMStore::IBooker &ibooker, DTChamberId chId)
Book histos.
Definition: DTLocalTriggerLutTask.cc:78
DTLocalTriggerLutTask::seg_Token_
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
Definition: DTLocalTriggerLutTask.h:93
get
#define get
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:94
DTLocalTriggerLutTask::topFolder
std::string & topFolder()
Get the top folder.
Definition: DTLocalTriggerLutTask.h:76
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
DTLocalTriggerLutTask::theGeomLabel
std::string theGeomLabel
Definition: DTLocalTriggerLutTask.h:103
DTTrigGeomUtils
Definition: DTTrigGeomUtils.h:21
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
DTLocalTriggerLutTask::rangePhiB
double rangePhiB
Definition: DTLocalTriggerLutTask.h:85
DTChamberId
Definition: DTChamberId.h:14
DTLocalTriggerLutTask::tm_TokenOut_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_TokenOut_
Definition: DTLocalTriggerLutTask.h:92
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
DTLocalTriggerLutTask::nLumis
int nLumis
Definition: DTLocalTriggerLutTask.h:83
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
edm::InputTag
Definition: InputTag.h:15
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37