CMS 3D CMS Logo

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

#include <SiPixelBarycenter.h>

Inheritance diagram for SiPixelBarycenter:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 SiPixelBarycenter (const edm::ParameterSet &conf)
 
 ~SiPixelBarycenter () override
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void beginRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
void dqmEndJob (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c) override
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Private Member Functions

void bookBarycenterHistograms (DQMStore::IBooker &iBooker)
 
void fillBarycenterHistograms (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::vector< AlignTransform > &input, const std::vector< AlignTransform > &GPR, const TrackerTopology &tTopo)
 

Private Attributes

const edm::ESGetToken< Alignments, TrackerAlignmentRcdalignmentToken_
 
std::map< std::string, MonitorElement * > barycenters_
 
const edm::ESGetToken< Alignments, GlobalPositionRcdgprToken_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtrackerTopologyToken_
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::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)
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Description: Barycenter plot generation for the Phase 1 pixel

Usage: <usage>

Definition at line 37 of file SiPixelBarycenter.h.

Constructor & Destructor Documentation

◆ SiPixelBarycenter()

SiPixelBarycenter::SiPixelBarycenter ( const edm::ParameterSet conf)
explicit

Definition at line 28 of file SiPixelBarycenter.cc.

29  : DQMEDHarvester(iConfig),
30  alignmentToken_(esConsumes<edm::Transition::EndLuminosityBlock>()),
31  gprToken_(esConsumes<edm::Transition::EndLuminosityBlock>()),
32  trackerTopologyToken_(esConsumes<edm::Transition::EndLuminosityBlock>()) {
33  LogInfo("PixelDQM") << "SiPixelBarycenter::SiPixelBarycenter: Got DQM BackEnd interface" << endl;
34 }

References edm::EndLuminosityBlock.

◆ ~SiPixelBarycenter()

SiPixelBarycenter::~SiPixelBarycenter ( )
override

Definition at line 36 of file SiPixelBarycenter.cc.

36  {
37  // do anything here that needs to be done at desctruction time
38  // (e.g. close files, deallocate resources etc.)
39  LogInfo("PixelDQM") << "SiPixelBarycenter::~SiPixelBarycenter: Destructor" << endl;
40 }

Member Function Documentation

◆ beginRun()

void SiPixelBarycenter::beginRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprotected

Definition at line 42 of file SiPixelBarycenter.cc.

42 {}

◆ bookBarycenterHistograms()

void SiPixelBarycenter::bookBarycenterHistograms ( DQMStore::IBooker iBooker)
private

Definition at line 61 of file SiPixelBarycenter.cc.

61  {
62  iBooker.cd();
63 
64  iBooker.setCurrentFolder("PixelPhase1/Barycenter");
65  //Book one histogram for each subdetector
67  {"BPIX", "FPIX_zm", "FPIX_zp", "BPIX_xp", "BPIX_xm", "FPIX_zp_xp", "FPIX_zm_xp", "FPIX_zp_xm", "FPIX_zm_xm"}) {
69  iBooker.book1D("barycenters_" + subdetector,
70  "Position of the barycenter for " + subdetector + ";Coordinate;Position [mm]",
71  3,
72  0.5,
73  3.5);
74  barycenters_[subdetector]->setBinLabel(1, "x");
75  barycenters_[subdetector]->setBinLabel(2, "y");
76  barycenters_[subdetector]->setBinLabel(3, "z");
77  }
78 
79  //Reset the iBooker
80  iBooker.setCurrentFolder("PixelPhase1/");
81 }

References barycenters_, dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and subdetector.

Referenced by dqmEndLuminosityBlock().

◆ dqmEndJob()

void SiPixelBarycenter::dqmEndJob ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 44 of file SiPixelBarycenter.cc.

44 {}

◆ dqmEndLuminosityBlock()

void SiPixelBarycenter::dqmEndLuminosityBlock ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  c 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 46 of file SiPixelBarycenter.cc.

49  {
50  bookBarycenterHistograms(iBooker);
51 
52  const Alignments* alignments = &c.getData(alignmentToken_);
53  const Alignments* gpr = &c.getData(gprToken_);
54  const TrackerTopology* tTopo = &c.getData(trackerTopologyToken_);
55 
56  fillBarycenterHistograms(iBooker, iGetter, alignments->m_align, gpr->m_align, *tTopo);
57 }

References alignmentToken_, bookBarycenterHistograms(), c, fillBarycenterHistograms(), gprToken_, Alignments::m_align, and trackerTopologyToken_.

◆ fillBarycenterHistograms()

void SiPixelBarycenter::fillBarycenterHistograms ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
const std::vector< AlignTransform > &  input,
const std::vector< AlignTransform > &  GPR,
const TrackerTopology tTopo 
)
private

Definition at line 86 of file SiPixelBarycenter.cc.

90  {
91  const auto GPR_translation_pixel = GPR[0].translation();
92  const std::map<DQMBarycenter::coordinate, float> GPR_pixel = {{DQMBarycenter::t_x, GPR_translation_pixel.x()},
93  {DQMBarycenter::t_y, GPR_translation_pixel.y()},
94  {DQMBarycenter::t_z, GPR_translation_pixel.z()}};
95 
97  barycenters.computeBarycenters(input, tTopo, GPR_pixel);
98 
99  auto Xbarycenters = barycenters.getX();
100  auto Ybarycenters = barycenters.getY();
101  auto Zbarycenters = barycenters.getZ();
102 
103  //Fill histogram for each subdetector
104  std::vector<std::string> subdetectors = {
105  "BPIX", "FPIX_zm", "FPIX_zp", "BPIX_xp", "BPIX_xm", "FPIX_zp_xp", "FPIX_zm_xp", "FPIX_zp_xm", "FPIX_zm_xm"};
106  for (std::size_t i = 0; i < subdetectors.size(); ++i) {
107  barycenters_[subdetectors[i]]->setBinContent(1, Xbarycenters[i]);
108  barycenters_[subdetectors[i]]->setBinContent(2, Ybarycenters[i]);
109  barycenters_[subdetectors[i]]->setBinContent(3, Zbarycenters[i]);
110  }
111 }

References barycenters_, DQMBarycenter::TkAlBarycenters::computeBarycenters(), DQMBarycenter::TkAlBarycenters::getX(), DQMBarycenter::TkAlBarycenters::getY(), DQMBarycenter::TkAlBarycenters::getZ(), mps_fire::i, input, TrackingMonitor_cfi::subdetectors, DQMBarycenter::t_x, DQMBarycenter::t_y, and DQMBarycenter::t_z.

Referenced by dqmEndLuminosityBlock().

Member Data Documentation

◆ alignmentToken_

const edm::ESGetToken<Alignments, TrackerAlignmentRcd> SiPixelBarycenter::alignmentToken_
private

Definition at line 52 of file SiPixelBarycenter.h.

Referenced by dqmEndLuminosityBlock().

◆ barycenters_

std::map<std::string, MonitorElement*> SiPixelBarycenter::barycenters_
private

Definition at line 56 of file SiPixelBarycenter.h.

Referenced by bookBarycenterHistograms(), and fillBarycenterHistograms().

◆ gprToken_

const edm::ESGetToken<Alignments, GlobalPositionRcd> SiPixelBarycenter::gprToken_
private

Definition at line 53 of file SiPixelBarycenter.h.

Referenced by dqmEndLuminosityBlock().

◆ trackerTopologyToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiPixelBarycenter::trackerTopologyToken_
private

Definition at line 54 of file SiPixelBarycenter.h.

Referenced by dqmEndLuminosityBlock().

DQMBarycenter::TkAlBarycenters::getX
const std::array< double, 9 > getX()
Definition: SiPixelBarycenterHelper.h:72
SiPixelBarycenter::bookBarycenterHistograms
void bookBarycenterHistograms(DQMStore::IBooker &iBooker)
Definition: SiPixelBarycenter.cc:61
mps_fire.i
i
Definition: mps_fire.py:428
input
static const std::string input
Definition: EdmProvDump.cc:48
TrackerTopology
Definition: TrackerTopology.h:16
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DQMBarycenter::t_x
Definition: SiPixelBarycenterHelper.h:16
DQMBarycenter::TkAlBarycenters::getY
const std::array< double, 9 > getY()
Definition: SiPixelBarycenterHelper.h:87
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiPixelBarycenter::fillBarycenterHistograms
void fillBarycenterHistograms(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::vector< AlignTransform > &input, const std::vector< AlignTransform > &GPR, const TrackerTopology &tTopo)
Definition: SiPixelBarycenter.cc:86
TrackingMonitor_cfi.subdetectors
subdetectors
Definition: TrackingMonitor_cfi.py:181
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
SiPixelBarycenter::trackerTopologyToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
Definition: SiPixelBarycenter.h:54
DQMBarycenter::t_y
Definition: SiPixelBarycenterHelper.h:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DQMEDHarvester::DQMEDHarvester
DQMEDHarvester()
Definition: DQMEDHarvester.h:98
DQMBarycenter::TkAlBarycenters::getZ
const std::array< double, 9 > getZ()
Definition: SiPixelBarycenterHelper.h:102
DQMBarycenter::t_z
Definition: SiPixelBarycenterHelper.h:18
DQMBarycenter::TkAlBarycenters
Definition: SiPixelBarycenterHelper.h:62
DQMBarycenter::TkAlBarycenters::computeBarycenters
void computeBarycenters(const std::vector< AlignTransform > &input, const TrackerTopology &tTopo, const std::map< DQMBarycenter::coordinate, float > &GPR)
Definition: SiPixelBarycenterHelper.h:118
SiPixelBarycenter::alignmentToken_
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > alignmentToken_
Definition: SiPixelBarycenter.h:52
SiPixelBarycenter::barycenters_
std::map< std::string, MonitorElement * > barycenters_
Definition: SiPixelBarycenter.h:56
Alignments::m_align
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
Alignments
Definition: Alignments.h:10
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
SiPixelBarycenter::gprToken_
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
Definition: SiPixelBarycenter.h:53
subdetector
TString subdetector
Definition: trackSplitPlot.h:54