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 | Private Member Functions | Private Attributes
SiPixelBarycenter Class Reference

#include <SiPixelBarycenter.h>

Inheritance diagram for SiPixelBarycenter:
DQMEDHarvester edm::one::EDProducer< T > 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 (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock 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< T >
 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 beginRun (edm::Run const &run, edm::EventSetup const &eSetup) override
 
void dqmEndJob (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter) override
 
void dqmEndRun (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, edm::Run const &iRun, edm::EventSetup const &c) override
 
- 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)
 

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,
TrackerAlignmentRcd
alignmentToken_
 
std::map< std::string,
MonitorElement * > 
barycenters_
 
const edm::ESGetToken
< Alignments,
GlobalPositionRcd
gprToken_
 
const edm::ESGetToken
< TrackerTopology,
TrackerTopologyRcd
trackerTopologyToken_
 

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

Definition at line 28 of file SiPixelBarycenter.cc.

References edm::EndRun.

30  alignmentToken_(esConsumes<edm::Transition::EndRun>()),
31  gprToken_(esConsumes<edm::Transition::EndRun>()),
32  trackerTopologyToken_(esConsumes<edm::Transition::EndRun>()) {
33  LogInfo("PixelDQM") << "SiPixelBarycenter::SiPixelBarycenter: Got DQM BackEnd interface" << endl;
34 }
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
Log< level::Info, false > LogInfo
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > alignmentToken_
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 }
Log< level::Info, false > LogInfo

Member Function Documentation

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

Definition at line 42 of file SiPixelBarycenter.cc.

42 {}
void SiPixelBarycenter::bookBarycenterHistograms ( DQMStore::IBooker iBooker)
private

Definition at line 61 of file SiPixelBarycenter.cc.

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

Referenced by dqmEndRun().

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 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
TString subdetector
std::map< std::string, MonitorElement * > barycenters_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
void SiPixelBarycenter::dqmEndJob ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 44 of file SiPixelBarycenter.cc.

44 {}
void SiPixelBarycenter::dqmEndRun ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
edm::Run const &  iRun,
edm::EventSetup const &  c 
)
overrideprotectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 46 of file SiPixelBarycenter.cc.

References alignmentToken_, bookBarycenterHistograms(), fillBarycenterHistograms(), edm::EventSetup::getData(), gprToken_, Alignments::m_align, and trackerTopologyToken_.

49  {
50  bookBarycenterHistograms(iBooker);
51 
52  const Alignments* alignments = &c.getData(alignmentToken_);
53  const Alignments* gpr = &c.getData(gprToken_);
55 
56  fillBarycenterHistograms(iBooker, iGetter, alignments->m_align, gpr->m_align, *tTopo);
57 }
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
const edm::EventSetup & c
void fillBarycenterHistograms(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, const std::vector< AlignTransform > &input, const std::vector< AlignTransform > &GPR, const TrackerTopology &tTopo)
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
bool getData(T &iHolder) const
Definition: EventSetup.h:128
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > trackerTopologyToken_
const edm::ESGetToken< Alignments, TrackerAlignmentRcd > alignmentToken_
void bookBarycenterHistograms(DQMStore::IBooker &iBooker)
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.

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

Referenced by dqmEndRun().

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 }
const std::array< double, 9 > getY()
static std::string const input
Definition: EdmProvDump.cc:47
void computeBarycenters(const std::vector< AlignTransform > &input, const TrackerTopology &tTopo, const std::map< DQMBarycenter::coordinate, float > &GPR)
std::map< std::string, MonitorElement * > barycenters_
const std::array< double, 9 > getZ()
const std::array< double, 9 > getX()

Member Data Documentation

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

Definition at line 52 of file SiPixelBarycenter.h.

Referenced by dqmEndRun().

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

Definition at line 56 of file SiPixelBarycenter.h.

Referenced by bookBarycenterHistograms(), and fillBarycenterHistograms().

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

Definition at line 53 of file SiPixelBarycenter.h.

Referenced by dqmEndRun().

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

Definition at line 54 of file SiPixelBarycenter.h.

Referenced by dqmEndRun().