CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
 EDProducer (const EDProducer &)=delete
 
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
 
const EDProduceroperator= (const EDProducer &)=delete
 
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
 
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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

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
 
const DTGeometrymuonGeom
 
edm::ESGetToken< DTGeometry,
MuonGeometryRecord
muonGeomToken_
 
int nEvents
 
int nLumis
 
int nPhibBins
 
int nPhiBins
 
bool overUnderIn
 
edm::ParameterSet parameters
 
double rangePhi
 
double rangePhiB
 
edm::EDGetTokenT
< DTRecSegment4DCollection
seg_Token_
 
edm::EDGetTokenT
< L1MuDTChambPhContainer
tm_TokenIn_
 
edm::EDGetTokenT
< L1MuDTChambPhContainer
tm_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 45 of file DTLocalTriggerLutTask.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 33 of file DTLocalTriggerLutTask.cc.

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

35  esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", ps.getUntrackedParameter<string>("geomLabel")))),
36  trigGeomUtils(nullptr) {
37  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerLutTask") << "[DTLocalTriggerLutTask]: Constructor" << endl;
38 
39  tm_TokenIn_ = consumes<L1MuDTChambPhContainer>(ps.getUntrackedParameter<InputTag>("inputTagTMin"));
40  tm_TokenOut_ = consumes<L1MuDTChambPhContainer>(ps.getUntrackedParameter<InputTag>("inputTagTMout"));
41  seg_Token_ = consumes<DTRecSegment4DCollection>(ps.getUntrackedParameter<InputTag>("inputTagSEG"));
42 
43  overUnderIn = ps.getUntrackedParameter<bool>("rebinOutFlowsInGraph");
44  detailedAnalysis = ps.getUntrackedParameter<bool>("detailedAnalysis");
45 
46  if (detailedAnalysis) {
47  nPhiBins = 401;
48  rangePhi = 10.025;
49  nPhibBins = 401;
50  rangePhiB = 10.025;
51  } else {
52  nPhiBins = 51;
53  rangePhi = 5.1;
54  nPhibBins = 51;
55  rangePhiB = 10.2;
56  }
57 
58  baseFolder = "DT/03-LocalTrigger-TM/";
59  parameters = ps;
60 
61  nEvents = 0;
62  nLumis = 0;
63 }
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
edm::ParameterSet parameters
#define LogTrace(id)
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_TokenOut_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_TokenIn_
DTTrigGeomUtils * trigGeomUtils
DTLocalTriggerLutTask::~DTLocalTriggerLutTask ( )
override

Destructor.

Definition at line 65 of file DTLocalTriggerLutTask.cc.

References LogTrace, nEvents, and trigGeomUtils.

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

Member Function Documentation

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

Analyze.

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

Definition at line 176 of file DTLocalTriggerLutTask.cc.

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

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

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

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

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

147  {
148  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerLutTask") << "[DTLocalTriggerLutTask]: bookHistograms" << endl;
149 
150  std::vector<const DTChamber*>::const_iterator chambIt = muonGeom->chambers().begin();
151  std::vector<const DTChamber*>::const_iterator chambEnd = muonGeom->chambers().end();
152 
153  for (; chambIt != chambEnd; ++chambIt)
154  bookHistos(ibooker, (*chambIt)->id());
155 }
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
const DTGeometry * muonGeom
#define LogTrace(id)
void DTLocalTriggerLutTask::bookHistos ( DQMStore::IBooker ibooker,
DTChamberId  chId 
)
private

Book histos.

Definition at line 79 of file DTLocalTriggerLutTask.cc.

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(), and DTChamberId::wheel().

Referenced by bookHistograms().

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

BeginRun.

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

Definition at line 73 of file DTLocalTriggerLutTask.cc.

References edm::EventSetup::getData(), muonGeom, muonGeomToken_, and trigGeomUtils.

73  {
74  // Get the geometry
75  muonGeom = &context.getData(muonGeomToken_);
77 }
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
const DTGeometry * muonGeom
bool getData(T &iHolder) const
Definition: EventSetup.h:128
DTTrigGeomUtils * trigGeomUtils
void DTLocalTriggerLutTask::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
inlinefinalprotected

Definition at line 71 of file DTLocalTriggerLutTask.h.

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

Find best (highest qual) TM trigger segments.

Definition at line 274 of file DTLocalTriggerLutTask.cc.

References trigBestIn, trigQualBestIn, and wheelArrayShift.

Referenced by analyze().

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

Definition at line 300 of file DTLocalTriggerLutTask.cc.

References trigBestOut, trigQualBestOut, and wheelArrayShift.

Referenced by analyze().

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

Get the top folder.

Definition at line 77 of file DTLocalTriggerLutTask.h.

References baseFolder.

Referenced by bookHistos().

77 { return baseFolder; }

Friends And Related Function Documentation

friend class DTMonitorModule
friend

Definition at line 46 of file DTLocalTriggerLutTask.h.

Member Data Documentation

std::string DTLocalTriggerLutTask::baseFolder
private

Definition at line 88 of file DTLocalTriggerLutTask.h.

Referenced by DTLocalTriggerLutTask(), and topFolder().

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

Definition at line 107 of file DTLocalTriggerLutTask.h.

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

bool DTLocalTriggerLutTask::detailedAnalysis
private

Definition at line 89 of file DTLocalTriggerLutTask.h.

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

const DTGeometry* DTLocalTriggerLutTask::muonGeom
private

Definition at line 104 of file DTLocalTriggerLutTask.h.

Referenced by bookHistograms(), and dqmBeginRun().

edm::ESGetToken<DTGeometry, MuonGeometryRecord> DTLocalTriggerLutTask::muonGeomToken_
private

Definition at line 103 of file DTLocalTriggerLutTask.h.

Referenced by dqmBeginRun().

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

Definition at line 84 of file DTLocalTriggerLutTask.h.

Referenced by beginLuminosityBlock(), and DTLocalTriggerLutTask().

int DTLocalTriggerLutTask::nPhibBins
private

Definition at line 85 of file DTLocalTriggerLutTask.h.

Referenced by bookHistos(), and DTLocalTriggerLutTask().

int DTLocalTriggerLutTask::nPhiBins
private

Definition at line 85 of file DTLocalTriggerLutTask.h.

Referenced by bookHistos(), and DTLocalTriggerLutTask().

bool DTLocalTriggerLutTask::overUnderIn
private

Definition at line 90 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

edm::ParameterSet DTLocalTriggerLutTask::parameters
private

Definition at line 102 of file DTLocalTriggerLutTask.h.

Referenced by beginLuminosityBlock(), and DTLocalTriggerLutTask().

double DTLocalTriggerLutTask::rangePhi
private

Definition at line 86 of file DTLocalTriggerLutTask.h.

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

double DTLocalTriggerLutTask::rangePhiB
private

Definition at line 86 of file DTLocalTriggerLutTask.h.

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

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

Definition at line 94 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

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

Definition at line 92 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

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

Definition at line 93 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

DTArr3bool DTLocalTriggerLutTask::track_ok
private

Definition at line 100 of file DTLocalTriggerLutTask.h.

DTArr3Digi DTLocalTriggerLutTask::trigBestIn
private

Definition at line 98 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestIn().

DTArr3Digi DTLocalTriggerLutTask::trigBestOut
private

Definition at line 99 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestOut().

DTTrigGeomUtils* DTLocalTriggerLutTask::trigGeomUtils
private

Definition at line 105 of file DTLocalTriggerLutTask.h.

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

DTArr3int DTLocalTriggerLutTask::trigQualBestIn
private

Definition at line 96 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestIn().

DTArr3int DTLocalTriggerLutTask::trigQualBestOut
private

Definition at line 97 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestOut().

const int DTLocalTriggerLutTask::wheelArrayShift = 3
protected

Definition at line 73 of file DTLocalTriggerLutTask.h.

Referenced by searchTMBestIn(), and searchTMBestOut().

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

Definition at line 108 of file DTLocalTriggerLutTask.h.