CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes
Phase2OTValidateTTStub Class Reference
Inheritance diagram for Phase2OTValidateTTStub:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &iRun, const edm::EventSetup &iSetup) override
 
 Phase2OTValidateTTStub (const edm::ParameterSet &)
 
 ~Phase2OTValidateTTStub () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
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
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Public Attributes

MonitorElementStub_RZ = nullptr
 

Private Attributes

edm::ParameterSet conf_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordgeomToken_
 
edm::EDGetTokenT< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > tagTTStubsToken_
 
const TrackerGeometrytkGeom_ = nullptr
 
std::string topFolderName_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtopoToken_
 
const TrackerTopologytTopo_ = nullptr
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 45 of file Phase2OTValidateTTStub.cc.

Constructor & Destructor Documentation

◆ Phase2OTValidateTTStub()

Phase2OTValidateTTStub::Phase2OTValidateTTStub ( const edm::ParameterSet iConfig)
explicit

Definition at line 68 of file Phase2OTValidateTTStub.cc.

References conf_, edm::ParameterSet::getParameter(), AlCaHLTBitMon_QueryRunRegistry::string, tagTTStubsToken_, and topFolderName_.

69  : conf_(iConfig),
70  geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
71  topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()) {
72  // now do what ever initialization is needed
73  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
75  consumes<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>>(conf_.getParameter<edm::InputTag>("TTStubs"));
76 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
edm::EDGetTokenT< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > tagTTStubsToken_

◆ ~Phase2OTValidateTTStub()

Phase2OTValidateTTStub::~Phase2OTValidateTTStub ( )
override

Definition at line 78 of file Phase2OTValidateTTStub.cc.

78  {
79  // do anything here that needs to be done at desctruction time
80  // (e.g. close files, deallocate resources etc.)
81 }

Member Function Documentation

◆ analyze()

void Phase2OTValidateTTStub::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Track Trigger Stubs

Loop over input Stubs

Make reference stub

Get det ID (place of the stub)

Get trigger displacement/offset

Define position stub by position inner cluster

Reimplemented from DQMEDAnalyzer.

Definition at line 90 of file Phase2OTValidateTTStub.cc.

References edmNew::DetSetVector< T >::begin(), edmNew::DetSetVector< T >::end(), dqm::impl::MonitorElement::Fill(), TrackerGeometry::idToDet(), iEvent, edm::HandleBase::isValid(), Topology::localPosition(), edmNew::makeRefTo(), PV3DBase< T, PVType, FrameType >::perp(), Stub_RZ, GeomDet::surface(), tagTTStubsToken_, tkGeom_, Surface::toGlobal(), GeomDet::topology(), and PV3DBase< T, PVType, FrameType >::z().

90  {
93  iEvent.getByToken(tagTTStubsToken_, Phase2TrackerDigiTTStubHandle);
94 
96  typename edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_>>::const_iterator inputIter;
97  typename edmNew::DetSet<TTStub<Ref_Phase2TrackerDigi_>>::const_iterator contentIter;
98  // Adding protection
99  if (!Phase2TrackerDigiTTStubHandle.isValid())
100  return;
101 
102  for (inputIter = Phase2TrackerDigiTTStubHandle->begin(); inputIter != Phase2TrackerDigiTTStubHandle->end();
103  ++inputIter) {
104  for (contentIter = inputIter->begin(); contentIter != inputIter->end(); ++contentIter) {
107  edmNew::makeRefTo(Phase2TrackerDigiTTStubHandle, contentIter);
108 
110  // tempStubRef->getDetId() gives the stackDetId, not rawId
111  DetId detIdStub = tkGeom_->idToDet((tempStubRef->clusterRef(0))->getDetId())->geographicalId();
112 
114  //double rawBend = tempStubRef->rawBend();
115  //double bendOffset = tempStubRef->bendOffset();
116 
118  MeasurementPoint mp = (tempStubRef->clusterRef(0))->findAverageLocalCoordinates();
119  const GeomDet *theGeomDet = tkGeom_->idToDet(detIdStub);
120  Global3DPoint posStub = theGeomDet->surface().toGlobal(theGeomDet->topology().localPosition(mp));
121 
122  Stub_RZ->Fill(posStub.z(), posStub.perp());
123  }
124  }
125 } // end of method
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
T perp() const
Definition: PV3DBase.h:69
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
T z() const
Definition: PV3DBase.h:61
virtual const Topology & topology() const
Definition: GeomDet.cc:67
const_iterator end(bool update=false) const
void Fill(long long x)
int iEvent
Definition: GenABIO.cc:224
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
const TrackerGeomDet * idToDet(DetId) const override
edm::EDGetTokenT< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > > tagTTStubsToken_
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Definition: DetId.h:17
const_iterator begin(bool update=false) const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
bool isValid() const
Definition: HandleBase.h:70
const TrackerGeometry * tkGeom_

◆ bookHistograms()

void Phase2OTValidateTTStub::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  run,
edm::EventSetup const &  es 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 128 of file Phase2OTValidateTTStub.cc.

References dqm::implementation::IBooker::book2D(), conf_, edm::ParameterSet::getParameter(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, Stub_RZ, and topFolderName_.

130  {
133  edm::ParameterSet psTTStub_RZ = conf_.getParameter<edm::ParameterSet>("TH2TTStub_RZ");
134  HistoName = "Stub_RZ";
135  Stub_RZ = iBooker.book2D(HistoName,
136  HistoName,
137  psTTStub_RZ.getParameter<int32_t>("Nbinsx"),
138  psTTStub_RZ.getParameter<double>("xmin"),
139  psTTStub_RZ.getParameter<double>("xmax"),
140  psTTStub_RZ.getParameter<int32_t>("Nbinsy"),
141  psTTStub_RZ.getParameter<double>("ymin"),
142  psTTStub_RZ.getParameter<double>("ymax"));
143 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
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:221
std::string HistoName

◆ dqmBeginRun()

void Phase2OTValidateTTStub::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 83 of file Phase2OTValidateTTStub.cc.

References geomToken_, edm::EventSetup::getData(), tkGeom_, topoToken_, and tTopo_.

83  {
84  tkGeom_ = &(iSetup.getData(geomToken_));
85  tTopo_ = &(iSetup.getData(topoToken_));
86 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const TrackerTopology * tTopo_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
const TrackerGeometry * tkGeom_

◆ fillDescriptions()

void Phase2OTValidateTTStub::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 145 of file Phase2OTValidateTTStub.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

145  {
146  // Phase2OTValidateTTStub
148  {
150  psd0.add<int>("Nbinsx", 900);
151  psd0.add<double>("xmax", 300);
152  psd0.add<double>("xmin", -300);
153  psd0.add<int>("Nbinsy", 900);
154  psd0.add<double>("ymax", 120);
155  psd0.add<double>("ymin", 0);
156  desc.add<edm::ParameterSetDescription>("TH2TTStub_RZ", psd0);
157  }
158  desc.add<std::string>("TopFolderName", "TrackerPhase2OTStubV");
159  desc.add<edm::InputTag>("TTStubs", edm::InputTag("TTStubsFromPhase2TrackerDigis", "StubAccepted"));
160  descriptions.add("Phase2OTValidateTTStub", desc);
161  // or use the following to generate the label from the module's C++ type
162  //descriptions.addWithDefaultLabel(desc);
163 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ conf_

edm::ParameterSet Phase2OTValidateTTStub::conf_
private

Definition at line 58 of file Phase2OTValidateTTStub.cc.

Referenced by bookHistograms(), and Phase2OTValidateTTStub().

◆ geomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> Phase2OTValidateTTStub::geomToken_
private

Definition at line 61 of file Phase2OTValidateTTStub.cc.

Referenced by dqmBeginRun().

◆ Stub_RZ

MonitorElement* Phase2OTValidateTTStub::Stub_RZ = nullptr

Definition at line 55 of file Phase2OTValidateTTStub.cc.

Referenced by analyze(), and bookHistograms().

◆ tagTTStubsToken_

edm::EDGetTokenT<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_> > > Phase2OTValidateTTStub::tagTTStubsToken_
private

Definition at line 59 of file Phase2OTValidateTTStub.cc.

Referenced by analyze(), and Phase2OTValidateTTStub().

◆ tkGeom_

const TrackerGeometry* Phase2OTValidateTTStub::tkGeom_ = nullptr
private

Definition at line 63 of file Phase2OTValidateTTStub.cc.

Referenced by analyze(), and dqmBeginRun().

◆ topFolderName_

std::string Phase2OTValidateTTStub::topFolderName_
private

Definition at line 60 of file Phase2OTValidateTTStub.cc.

Referenced by bookHistograms(), and Phase2OTValidateTTStub().

◆ topoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> Phase2OTValidateTTStub::topoToken_
private

Definition at line 62 of file Phase2OTValidateTTStub.cc.

Referenced by dqmBeginRun().

◆ tTopo_

const TrackerTopology* Phase2OTValidateTTStub::tTopo_ = nullptr
private

Definition at line 64 of file Phase2OTValidateTTStub.cc.

Referenced by dqmBeginRun().