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) final
 
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 hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void 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 analyze (edm::Event const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Protected Attributes

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 ( const edm::ParameterSet ps)

Constructor.

Definition at line 34 of file DTLocalTriggerLutTask.cc.

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

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 }
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_TokenOut_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_TokenIn_
#define LogTrace(id)
DTTrigGeomUtils * trigGeomUtils
DTLocalTriggerLutTask::~DTLocalTriggerLutTask ( )
override

Destructor.

Definition at line 64 of file DTLocalTriggerLutTask.cc.

References LogTrace, nEvents, and trigGeomUtils.

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

Member Function Documentation

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

Analyze.

Definition at line 175 of file DTLocalTriggerLutTask.cc.

References chHistos, DTTrigGeomUtils::computeSCCoordinates(), detailedAnalysis, edm::Event::getByToken(), 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.

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 }
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
void searchTMBestOut(std::vector< L1MuDTChambPhDigi > const *trigs)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
float trigDir(const L1MuDTChambPhDigi *trig)
Return local direction (trigger RF) for a given trigger primitive.
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
identifier iterator
Definition: RangeMap.h:130
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_TokenOut_
void trigToSeg(int st, float &x, float dir)
Compute Trigger x coordinate in chamber RF.
void searchTMBestIn(std::vector< L1MuDTChambPhDigi > const *trigs)
Find best (highest qual) TM trigger segments.
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_TokenIn_
T min(T a, T b)
Definition: MathUtil.h:58
std::map< uint32_t, std::map< std::string, MonitorElement * > > chHistos
DTTrigGeomUtils * trigGeomUtils
Phi_Container const * getContainer() const
float trigPos(const L1MuDTChambPhDigi *trig)
Return local position (trigger RF) for a given trigger primitive.
int station() const
Return the station number.
Definition: DTChamberId.h:42
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
void computeSCCoordinates(const DTRecSegment4D *track, int &scsec, float &x, float &xdir, float &y, float &ydir)
Compute track coordinates with SC sector numbering.
void DTLocalTriggerLutTask::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
overrideprotected

To reset the MEs.

Definition at line 156 of file DTLocalTriggerLutTask.cc.

References chHistos, LogTrace, and nLumis.

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 }
#define LogTrace(id)
std::map< uint32_t, std::map< std::string, MonitorElement * > > chHistos
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.

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

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 }
void bookHistos(DQMStore::IBooker &ibooker, DTChamberId chId)
Book histos.
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84
edm::ESHandle< DTGeometry > muonGeom
#define LogTrace(id)
void DTLocalTriggerLutTask::bookHistos ( DQMStore::IBooker ibooker,
DTChamberId  chId 
)
private

Book histos.

Definition at line 78 of file DTLocalTriggerLutTask.cc.

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

Referenced by bookHistograms(), and topFolder().

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 }
std::string & topFolder()
Get the top folder.
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::map< uint32_t, std::map< std::string, MonitorElement * > > chHistos
int sector() const
Definition: DTChamberId.h:49
int station() const
Return the station number.
Definition: DTChamberId.h:42
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
void DTLocalTriggerLutTask::dqmBeginRun ( const edm::Run run,
const edm::EventSetup context 
)
overrideprotected

BeginRun.

Definition at line 72 of file DTLocalTriggerLutTask.cc.

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

72  {
73  // Get the geometry
76 }
edm::ESHandle< DTGeometry > muonGeom
DTTrigGeomUtils * trigGeomUtils
T get() const
Definition: EventSetup.h:73
void DTLocalTriggerLutTask::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
inlinefinalprotected

Definition at line 70 of file DTLocalTriggerLutTask.h.

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

Find best (highest qual) TM trigger segments.

Definition at line 273 of file DTLocalTriggerLutTask.cc.

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

Referenced by analyze().

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 }
void DTLocalTriggerLutTask::searchTMBestOut ( std::vector< L1MuDTChambPhDigi > const *  trigs)
protected

Definition at line 299 of file DTLocalTriggerLutTask.cc.

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

Referenced by analyze().

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 }
std::string& DTLocalTriggerLutTask::topFolder ( )
inlineprivate

Get the top folder.

Definition at line 76 of file DTLocalTriggerLutTask.h.

References baseFolder, and bookHistos().

Referenced by bookHistos().

76 { return baseFolder; }

Friends And Related Function Documentation

friend class DTMonitorModule
friend

Definition at line 45 of file DTLocalTriggerLutTask.h.

Member Data Documentation

std::string DTLocalTriggerLutTask::baseFolder
private

Definition at line 87 of file DTLocalTriggerLutTask.h.

Referenced by DTLocalTriggerLutTask(), and topFolder().

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().

bool DTLocalTriggerLutTask::detailedAnalysis
private

Definition at line 88 of file DTLocalTriggerLutTask.h.

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

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

Definition at line 102 of file DTLocalTriggerLutTask.h.

Referenced by bookHistograms(), and dqmBeginRun().

int DTLocalTriggerLutTask::nEvents
private
int DTLocalTriggerLutTask::nLumis
private

Definition at line 83 of file DTLocalTriggerLutTask.h.

Referenced by beginLuminosityBlock(), and DTLocalTriggerLutTask().

int DTLocalTriggerLutTask::nPhibBins
private

Definition at line 84 of file DTLocalTriggerLutTask.h.

Referenced by bookHistos(), and DTLocalTriggerLutTask().

int DTLocalTriggerLutTask::nPhiBins
private

Definition at line 84 of file DTLocalTriggerLutTask.h.

Referenced by bookHistos(), and DTLocalTriggerLutTask().

bool DTLocalTriggerLutTask::overUnderIn
private

Definition at line 89 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

edm::ParameterSet DTLocalTriggerLutTask::parameters
private
double DTLocalTriggerLutTask::rangePhi
private

Definition at line 85 of file DTLocalTriggerLutTask.h.

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

double DTLocalTriggerLutTask::rangePhiB
private

Definition at line 85 of file DTLocalTriggerLutTask.h.

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

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

Definition at line 93 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

std::string DTLocalTriggerLutTask::theGeomLabel
private

Definition at line 103 of file DTLocalTriggerLutTask.h.

Referenced by dqmBeginRun(), and DTLocalTriggerLutTask().

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

Definition at line 91 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

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

Definition at line 92 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

DTArr3bool DTLocalTriggerLutTask::track_ok
private

Definition at line 99 of file DTLocalTriggerLutTask.h.

DTArr3Digi DTLocalTriggerLutTask::trigBestIn
private

Definition at line 97 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestIn().

DTArr3Digi DTLocalTriggerLutTask::trigBestOut
private

Definition at line 98 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestOut().

DTTrigGeomUtils* DTLocalTriggerLutTask::trigGeomUtils
private

Definition at line 104 of file DTLocalTriggerLutTask.h.

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

DTArr3int DTLocalTriggerLutTask::trigQualBestIn
private

Definition at line 95 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestIn().

DTArr3int DTLocalTriggerLutTask::trigQualBestOut
private

Definition at line 96 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestOut().

const int DTLocalTriggerLutTask::wheelArrayShift = 3
protected

Definition at line 72 of file DTLocalTriggerLutTask.h.

Referenced by searchTMBestIn(), and searchTMBestOut().

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

Definition at line 107 of file DTLocalTriggerLutTask.h.