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:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

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 DQMEDAnalyzer
void beginRun (edm::Run const &, edm::EventSetup const &) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () 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
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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 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 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 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
 

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 edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
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 35 of file DTLocalTriggerLutTask.cc.

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

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

References LogTrace, nEvents, and trigGeomUtils.

71  {
72 
73  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerLutTask") << "[DTLocalTriggerLutTask]: analyzed " << nEvents << " events" << endl;
74  if (trigGeomUtils) { delete trigGeomUtils; }
75 
76 }
#define LogTrace(id)
DTTrigGeomUtils * trigGeomUtils

Member Function Documentation

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

Analyze.

Definition at line 173 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.

173  {
174 
175  nEvents++;
176 
178  e.getByToken(tm_TokenIn_, trigHandleIn);
180  e.getByToken(tm_TokenOut_, trigHandleOut);
181 
182  vector<L1MuDTChambPhDigi> const* trigsIn = trigHandleIn->getContainer();
183  searchTMBestIn(trigsIn);
184  vector<L1MuDTChambPhDigi> const* trigsOut = trigHandleOut->getContainer();
185  searchTMBestOut(trigsOut);
186 
188  e.getByToken(seg_Token_, segments4D);
189  DTRecSegment4DCollection::id_iterator chamberId;
190 
191  // Preliminary loop finds best 4D Segment and high quality ones
192  vector<const DTRecSegment4D*> best4DSegments;
193 
194  for (chamberId = segments4D->id_begin(); chamberId != segments4D->id_end(); ++chamberId){
195 
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 
206  if(trackIt->hasPhi()) {
207  dof = trackIt->phiSegment()->degreesOfFreedom();
208  if (dof>tmpdof) {
209  tmpBest = &(*trackIt);
210  tmpdof = dof;
211  }
212  }
213 
214  }
215 
216  if (tmpBest) best4DSegments.push_back(tmpBest);
217 
218  }
219 
220  vector<const DTRecSegment4D*>::const_iterator bestTrackIt = best4DSegments.begin();
221  vector<const DTRecSegment4D*>::const_iterator bestTrackEnd = best4DSegments.end();
222 
223  for (; bestTrackIt!=bestTrackEnd; ++bestTrackIt) {
224 
225  if((*bestTrackIt)->hasPhi()) {
226 
227  DTChamberId chId = (*bestTrackIt)->chamberId();
228  int nHitsPhi = (*bestTrackIt)->phiSegment()->degreesOfFreedom()+2;
229 
230  int wheel = chId.wheel();
231  int station = chId.station();
232  int scsector = 0;
233  float trackPosPhi, trackPosEta, trackDirPhi, trackDirEta;
234  trigGeomUtils->computeSCCoordinates((*bestTrackIt),scsector,trackPosPhi,trackDirPhi,trackPosEta,trackDirEta);
235 
236  map<string, MonitorElement*> &chMap = chHistos[chId.rawId()];
237  // In part
238  if (trigQualBestIn[wheel+3][station][scsector] > 3 && // residuals only for correlate triggers
239  trigQualBestIn[wheel+3][station][scsector] < 7 &&
240  nHitsPhi>=7 ) {
241 
242  float trigPos = trigGeomUtils->trigPos(trigBestIn[wheel+3][station][scsector]);
243  float trigDir = trigGeomUtils->trigDir(trigBestIn[wheel+3][station][scsector]);
244  trigGeomUtils->trigToSeg(station,trigPos,trackDirPhi);
245 
246  double deltaPos = trigPos-trackPosPhi;
247  deltaPos = overUnderIn ? max(min(deltaPos,rangePhi-0.01),-rangePhi+0.01) : deltaPos;
248  double deltaDir = trigDir-trackDirPhi;
249  deltaDir = overUnderIn ? max(min(deltaDir,rangePhiB-0.01),-rangePhiB+0.01) : deltaDir;
250  chMap.find("TM_PhiResidualIn")->second->Fill(deltaPos);
251  chMap.find("TM_PhibResidualIn")->second->Fill(deltaDir);
252 
253  if (detailedAnalysis){
254  chMap.find("TM_PhitkvsPhitrig")->second->Fill(trigPos,trackPosPhi);
255  chMap.find("TM_PhibtkvsPhibtrig")->second->Fill(trigDir,trackDirPhi);
256  chMap.find("TM_PhibResidualvsTkPos")->second->Fill(trackPosPhi,trigDir-trackDirPhi);
257  chMap.find("TM_PhiResidualvsTkPos")->second->Fill(trackPosPhi,trigPos-trackPosPhi);
258  }
259  }
260 
261  // Out part
262  if (trigQualBestOut[wheel+3][station][scsector] > 3 && // residuals only for correlate triggers
263  trigQualBestOut[wheel+3][station][scsector] < 7 &&
264  nHitsPhi>=7 ) {
265 
266  float trigPos = trigGeomUtils->trigPos(trigBestOut[wheel+3][station][scsector]);
267  float trigDir = trigGeomUtils->trigDir(trigBestOut[wheel+3][station][scsector]);
268  trigGeomUtils->trigToSeg(station,trigPos,trackDirPhi);
269 
270  double deltaPos = trigPos-trackPosPhi;
271  deltaPos = overUnderIn ? max(min(deltaPos,rangePhi-0.01),-rangePhi+0.01) : deltaPos;
272  double deltaDir = trigDir-trackDirPhi;
273  deltaDir = overUnderIn ? max(min(deltaDir,rangePhiB-0.01),-rangePhiB+0.01) : deltaDir;
274  chMap.find("TM_PhiResidualOut")->second->Fill(deltaPos);
275  chMap.find("TM_PhibResidualOut")->second->Fill(deltaDir);
276  }
277 
278  }
279  }
280 }
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:508
float trigDir(const L1MuDTChambPhDigi *trig)
Return local direction (trigger RF) for a given trigger primitive.
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
uint32_t rawId() const
get the raw id
Definition: DetId.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:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
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 148 of file DTLocalTriggerLutTask.cc.

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

148  {
149 
150  nLumis++;
151  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerLutTask") << "[DTLocalTriggerLutTask]: Begin of LS transition" << endl;
152 
153  if(nLumis%parameters.getUntrackedParameter<int>("ResetCycle") == 0) {
154 
155  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerLutTask") << "[DTLocalTriggerLutTask]: Cleaning histos" << endl;
156  map<uint32_t, map<string, MonitorElement*> > ::const_iterator chambIt = chHistos.begin();
157  map<uint32_t, map<string, MonitorElement*> > ::const_iterator chambEnd = chHistos.end();
158 
159  for(; chambIt!=chambEnd; ++chambIt) {
160  map<string, MonitorElement*> ::const_iterator histoIt = chambIt->second.begin();
161  map<string, MonitorElement*> ::const_iterator histoEnd = chambIt->second.end();
162  for(; histoIt!=histoEnd; ++ histoIt) {
163  histoIt->second->Reset();
164  }
165  }
166 
167  }
168 
169 }
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 DQMEDAnalyzer.

Definition at line 133 of file DTLocalTriggerLutTask.cc.

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

135  {
136 
137  LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerLutTask") << "[DTLocalTriggerLutTask]: bookHistograms" << endl;
138 
139  std::vector<const DTChamber*>::const_iterator chambIt = muonGeom->chambers().begin();
140  std::vector<const DTChamber*>::const_iterator chambEnd = muonGeom->chambers().end();
141 
142  for (; chambIt!=chambEnd; ++chambIt)
143  bookHistos(ibooker,(*chambIt)->id());
144 
145 }
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 85 of file DTLocalTriggerLutTask.cc.

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

Referenced by bookHistograms(), and topFolder().

85  {
86 
87  stringstream wheel; wheel << chId.wheel();
88  stringstream sector; sector << chId.sector();
89  stringstream station; station << chId.station();
90 
91  ibooker.setCurrentFolder(topFolder() + "Wheel" + wheel.str() + "/Sector" + sector.str() +
92  "/Station" + station.str() + "/Segment");
93 
94  string chTag = "_W" + wheel.str() + "_Sec" + sector.str() + "_St" + station.str();
95  std::map<std::string, MonitorElement*> &chambMap = chHistos[chId.rawId()];
96 
97  string hName = "TM_PhiResidualIn";
98 
99  chambMap[hName] = ibooker.book1D(hName+chTag,"Trigger local position In - Segment local position (correlated triggers)",nPhiBins,-rangePhi,rangePhi);
100 
101  hName = "TM_PhiResidualOut";
102 
103  chambMap[hName] = ibooker.book1D(hName+chTag,"Trigger local position Out - Segment local position (correlated triggers)",nPhiBins,-rangePhi,rangePhi);
104 
105  hName = "TM_PhibResidualIn";
106 
107  chambMap[hName] = ibooker.book1D(hName+chTag,"Trigger local direction In - Segment local direction (correlated triggers)",nPhibBins,-rangePhiB,rangePhiB);
108 
109  hName = "TM_PhibResidualOut";
110 
111  chambMap[hName] = ibooker.book1D(hName+chTag,"Trigger local direction Out - Segment local direction (correlated triggers)",nPhibBins,-rangePhiB,rangePhiB);
112 
113 
114  if (detailedAnalysis) {
115 
116  hName = "TM_PhitkvsPhitrig";
117 
118  chambMap[hName] = ibooker.book2D(hName+chTag,"Local position: segment vs trigger",100,-500.,500.,100,-500.,500.);
119  hName = "TM_PhibtkvsPhibtrig";
120 
121  chambMap[hName] =ibooker.book2D(hName+chTag,"Local direction : segment vs trigger",200,-40.,40.,200,-40.,40.);
122  hName = "TM_PhibResidualvsTkPos";
123 
124  chambMap[hName] =ibooker.book2D(hName+chTag,"Local direction residual vs Segment Position",100,-500.,500.,200,-10.,10.);
125  hName = "TM_PhiResidualvsTkPos";
126 
127  chambMap[hName] =ibooker.book2D(hName+chTag,"Local Position residual vs Segment Position",100,-500.,500.,200,-10.,10.);
128 
129  }
130 
131 }
std::string & topFolder()
Get the top folder.
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::map< uint32_t, std::map< std::string, MonitorElement * > > chHistos
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
int sector() const
Definition: DTChamberId.h:61
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
void DTLocalTriggerLutTask::dqmBeginRun ( const edm::Run run,
const edm::EventSetup context 
)
overrideprotected

BeginRun.

Definition at line 78 of file DTLocalTriggerLutTask.cc.

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

78  {
79 
80  // Get the geometry
83 }
edm::ESHandle< DTGeometry > muonGeom
DTTrigGeomUtils * trigGeomUtils
const T & get() const
Definition: EventSetup.h:55
void DTLocalTriggerLutTask::searchTMBestIn ( std::vector< L1MuDTChambPhDigi > const *  trigs)
protected

Find best (highest qual) TM trigger segments.

Definition at line 282 of file DTLocalTriggerLutTask.cc.

References trigBestIn, trigQualBestIn, and wheelArrayShift.

Referenced by analyze().

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

Definition at line 313 of file DTLocalTriggerLutTask.cc.

References trigBestOut, trigQualBestOut, and wheelArrayShift.

Referenced by analyze().

313  {
314 
315  string histoType ;
316  string histoTag ;
317 
318 // define best quality trigger segment
319 // // start from 1 and zero is kept empty
320  for (int st=0;st<=4;++st)
321  for (int wh=0;wh<=5;++wh)
322  for (int sec=0;sec<=12;++sec)
323  trigQualBestOut[wh][st][sec] = -1;
324 
325  vector<L1MuDTChambPhDigi>::const_iterator trigIt = trigs->begin();
326  vector<L1MuDTChambPhDigi>::const_iterator trigEnd = trigs->end();
327  for(; trigIt!=trigEnd; ++trigIt) {
328 
329  int wh = trigIt->whNum();
330  int sec = trigIt->scNum() + 1; // DTTF -> DT sector range transform
331  int st = trigIt->stNum();
332  int qual = trigIt->code();
333 
334  if(qual>trigQualBestOut[wh+wheelArrayShift][st][sec] && qual<7) {
335  trigQualBestOut[wh+wheelArrayShift][st][sec]=qual;
336  trigBestOut[wh+wheelArrayShift][st][sec] = &(*trigIt);
337  }
338 
339  }
340 
341 }
std::string& DTLocalTriggerLutTask::topFolder ( )
inlineprivate

Get the top folder.

Definition at line 80 of file DTLocalTriggerLutTask.h.

References baseFolder, and bookHistos().

Referenced by bookHistos().

80 { return baseFolder; }

Friends And Related Function Documentation

friend class DTMonitorModule
friend

Definition at line 47 of file DTLocalTriggerLutTask.h.

Member Data Documentation

std::string DTLocalTriggerLutTask::baseFolder
private

Definition at line 92 of file DTLocalTriggerLutTask.h.

Referenced by DTLocalTriggerLutTask(), and topFolder().

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

Definition at line 111 of file DTLocalTriggerLutTask.h.

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

bool DTLocalTriggerLutTask::detailedAnalysis
private

Definition at line 93 of file DTLocalTriggerLutTask.h.

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

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

Definition at line 107 of file DTLocalTriggerLutTask.h.

Referenced by bookHistograms(), and dqmBeginRun().

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

Definition at line 88 of file DTLocalTriggerLutTask.h.

Referenced by beginLuminosityBlock(), and DTLocalTriggerLutTask().

int DTLocalTriggerLutTask::nPhibBins
private

Definition at line 89 of file DTLocalTriggerLutTask.h.

Referenced by bookHistos(), and DTLocalTriggerLutTask().

int DTLocalTriggerLutTask::nPhiBins
private

Definition at line 89 of file DTLocalTriggerLutTask.h.

Referenced by bookHistos(), and DTLocalTriggerLutTask().

bool DTLocalTriggerLutTask::overUnderIn
private

Definition at line 94 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

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

Definition at line 90 of file DTLocalTriggerLutTask.h.

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

double DTLocalTriggerLutTask::rangePhiB
private

Definition at line 90 of file DTLocalTriggerLutTask.h.

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

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

Definition at line 98 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

std::string DTLocalTriggerLutTask::theGeomLabel
private

Definition at line 108 of file DTLocalTriggerLutTask.h.

Referenced by dqmBeginRun(), and DTLocalTriggerLutTask().

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

Definition at line 96 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

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

Definition at line 97 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and DTLocalTriggerLutTask().

DTArr3bool DTLocalTriggerLutTask::track_ok
private

Definition at line 104 of file DTLocalTriggerLutTask.h.

DTArr3Digi DTLocalTriggerLutTask::trigBestIn
private

Definition at line 102 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestIn().

DTArr3Digi DTLocalTriggerLutTask::trigBestOut
private

Definition at line 103 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestOut().

DTTrigGeomUtils* DTLocalTriggerLutTask::trigGeomUtils
private

Definition at line 109 of file DTLocalTriggerLutTask.h.

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

DTArr3int DTLocalTriggerLutTask::trigQualBestIn
private

Definition at line 100 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestIn().

DTArr3int DTLocalTriggerLutTask::trigQualBestOut
private

Definition at line 101 of file DTLocalTriggerLutTask.h.

Referenced by analyze(), and searchTMBestOut().

const int DTLocalTriggerLutTask::wheelArrayShift = 3
protected

Definition at line 75 of file DTLocalTriggerLutTask.h.

Referenced by searchTMBestIn(), and searchTMBestOut().

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

Definition at line 112 of file DTLocalTriggerLutTask.h.