CMS 3D CMS Logo

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

#include <SiPixelPhase1ResidualsExtra.h>

Inheritance diagram for SiPixelPhase1ResidualsExtra:
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

 SiPixelPhase1ResidualsExtra (const edm::ParameterSet &conf)
 
 ~SiPixelPhase1ResidualsExtra () 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 &)
 
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
 
 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
 
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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices 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
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
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< Bconsumes (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 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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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 bookMEs (DQMStore::IBooker &iBooker)
 
void fillMEs (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
 

Private Attributes

edm::ParameterSet conf_
 
std::map< std::string, MonitorElement * > DRnR_
 
int minHits_
 
std::map< std::string, MonitorElement * > residuals_
 
std::string topFolderName_
 

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
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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

Definition at line 31 of file SiPixelPhase1ResidualsExtra.h.

Constructor & Destructor Documentation

◆ SiPixelPhase1ResidualsExtra()

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

Definition at line 49 of file SiPixelPhase1ResidualsExtra.cc.

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

50  : DQMEDHarvester(iConfig), conf_(iConfig) {
51  LogInfo("PixelDQM") << "SiPixelPhase1ResidualsExtra::SiPixelPhase1ResidualsExtra: Got DQM BackEnd interface" << endl;
52  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
53  minHits_ = conf_.getParameter<int>("MinHits");
54 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
Log< level::Info, false > LogInfo

◆ ~SiPixelPhase1ResidualsExtra()

SiPixelPhase1ResidualsExtra::~SiPixelPhase1ResidualsExtra ( )
override

Definition at line 56 of file SiPixelPhase1ResidualsExtra.cc.

56  {
57  // do anything here that needs to be done at desctruction time
58  // (e.g. close files, deallocate resources etc.)
59  LogInfo("PixelDQM") << "SiPixelPhase1ResidualsExtra::~SiPixelPhase1ResidualsExtra: Destructor" << endl;
60 }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ beginRun()

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

Definition at line 62 of file SiPixelPhase1ResidualsExtra.cc.

62 {}

◆ bookMEs()

void SiPixelPhase1ResidualsExtra::bookMEs ( DQMStore::IBooker iBooker)
private

Normalized Resiuduals Plots

Definition at line 72 of file SiPixelPhase1ResidualsExtra.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::NavigatorBase::cd(), DRnR_, nano_mu_digi_cff::layer, residuals_, dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and topFolderName_.

Referenced by dqmEndJob().

72  {
73  iBooker.cd();
74 
75  //New residual plots for the PXBarrel separated by inner and outer modules per layer
76  iBooker.setCurrentFolder(topFolderName_ + "/PXBarrel");
77 
78  for (std::string layer : {"1", "2", "3", "4"}) {
79  float mean_range = 20.;
80  float rms_range = 200.;
81  if (layer == "1") {
82  mean_range = 50.;
83  rms_range = 1000.;
84  }
85  residuals_["residual_mean_x_Inner_PXLayer_" + layer] =
86  iBooker.book1D("residual_mean_x_Inner_PXLayer_" + layer,
87  "Mean of Track Residuals X Inner Modules for Layer " + layer + ";mean(x_rec-x_pred)[#mum]",
88  100,
89  -1 * mean_range,
90  mean_range);
91  residuals_["residual_mean_x_Outer_PXLayer_" + layer] =
92  iBooker.book1D("residual_mean_x_Outer_PXLayer_" + layer,
93  "Mean of Track Residuals X Outer Modules for Layer " + layer + ";mean(x_rec-x_pred)[#mum]",
94  100,
95  -1 * mean_range,
96  mean_range);
97  residuals_["residual_mean_y_Inner_PXLayer_" + layer] =
98  iBooker.book1D("residual_mean_y_Inner_PXLayer_" + layer,
99  "Mean of Track Residuals Y Inner Modules for Layer " + layer + ";mean(y_rec-y_pred)[#mum]",
100  100,
101  -1 * mean_range,
102  mean_range);
103  residuals_["residual_mean_y_Outer_PXLayer_" + layer] =
104  iBooker.book1D("residual_mean_y_Outer_PXLayer_" + layer,
105  "Mean of Track Residuals Y Outer Modules for Layer " + layer + ";mean(y_rec-y_pred)[#mum]",
106  100,
107  -1 * mean_range,
108  mean_range);
109 
110  residuals_["residual_rms_x_Inner_PXLayer_" + layer] =
111  iBooker.book1D("residual_rms_x_Inner_PXLayer_" + layer,
112  "RMS of Track Residuals X Inner Modules for Layer " + layer + ";rms(x_rec-x_pred)[#mum]",
113  100,
114  0.,
115  rms_range);
116  residuals_["residual_rms_x_Outer_PXLayer_" + layer] =
117  iBooker.book1D("residual_rms_x_Outer_PXLayer_" + layer,
118  "RMS of Track Residuals X Outer Modules for Layer " + layer + ";rms(x_rec-x_pred)[#mum]",
119  100,
120  0.,
121  rms_range);
122  residuals_["residual_rms_y_Inner_PXLayer_" + layer] =
123  iBooker.book1D("residual_rms_y_Inner_PXLayer_" + layer,
124  "RMS of Track Residuals Y Inner Modules for Layer " + layer + ";rms(y_rec-y_pred)[#mum]",
125  100,
126  0.,
127  rms_range);
128  residuals_["residual_rms_y_Outer_PXLayer_" + layer] =
129  iBooker.book1D("residual_rms_y_Outer_PXLayer_" + layer,
130  "RMS of Track Residuals Y Outer Modules for Layer " + layer + ";rms(y_rec-y_pred)[#mum]",
131  100,
132  0.,
133  rms_range);
135  DRnR_["NormRes_mean_x_Inner_PXLayer_" + layer] = iBooker.book1D(
136  "NormRes_mean_x_Inner_PXLayer_" + layer,
137  "Mean of Normalized Track Residuals X Inner Modules for Layer " + layer + ";mean((x_rec-x_pred)/x_err)",
138  100,
139  -1 * 1,
140  1);
141  DRnR_["NormRes_mean_x_Outer_PXLayer_" + layer] = iBooker.book1D(
142  "NormRes_mean_x_Outer_PXLayer_" + layer,
143  "Mean of Normalized Track Residuals X Outer Modules for Layer " + layer + ";mean((x_rec-x_pred)/x_err)",
144  100,
145  -1 * 1,
146  1);
147  DRnR_["NormRes_mean_y_Inner_PXLayer_" + layer] = iBooker.book1D(
148  "NormRes_mean_y_Inner_PXLayer_" + layer,
149  "Mean of Normalized Track Residuals Y Inner Modules for Layer " + layer + ";mean((y_rec-y_pred)/y_err)",
150  100,
151  -1 * 1,
152  1);
153  DRnR_["NormRes_mean_y_Outer_PXLayer_" + layer] = iBooker.book1D(
154  "NormRes_mean_y_Outer_PXLayer_" + layer,
155  "Mean of Normalized Track Residuals Y Outer Modules for Layer " + layer + ";mean((y_rec-y_pred)/y_err)",
156  100,
157  -1 * 1,
158  1);
159 
160  DRnR_["DRnR_x_Inner_PXLayer_" + layer] = iBooker.book1D(
161  "DRnR_x_Inner_PXLayer_" + layer,
162  "RMS of Normalized Track Residuals X Inner Modules for Layer " + layer + ";rms((x_rec-x_pred)/x_err)",
163  100,
164  0.,
165  2);
166  DRnR_["DRnR_x_Outer_PXLayer_" + layer] = iBooker.book1D(
167  "DRnR_x_Outer_PXLayer_" + layer,
168  "RMS of Normalized Track Residuals X Outer Modules for Layer " + layer + ";rms((x_rec-x_pred)/x_err)",
169  100,
170  0.,
171  2);
172  DRnR_["DRnR_y_Inner_PXLayer_" + layer] = iBooker.book1D(
173  "DRnR_y_Inner_PXLayer_" + layer,
174  "RMS of Normalized Track Residuals Y Inner Modules for Layer " + layer + ";rms((y_rec-y_pred)/y_err)",
175  100,
176  0.,
177  2);
178  DRnR_["DRnR_y_Outer_PXLayer_" + layer] = iBooker.book1D(
179  "DRnR_y_Outer_PXLayer_" + layer,
180  "RMS of Normalized Track Residuals Y Outer Modules for Layer " + layer + ";rms((y_rec-y_pred)/y_err)",
181  100,
182  0.,
183  2);
184  }
185 
186  //New residual plots for the PXForward separated by inner and outer modules
187  iBooker.setCurrentFolder(topFolderName_ + "/PXForward");
188 
189  residuals_["residual_mean_x_Inner"] = iBooker.book1D(
190  "residual_mean_x_Inner", "Mean of Track Residuals X Inner Modules;mean(x_rec-x_pred)[#mum]", 100, -20., 20.);
191  residuals_["residual_mean_x_Outer"] = iBooker.book1D(
192  "residual_mean_x_Outer", "Mean of Track Residuals X Outer Modules;mean(x_rec-x_pred)[#mum]", 100, -20., 20.);
193  residuals_["residual_mean_y_Inner"] = iBooker.book1D(
194  "residual_mean_y_Inner", "Mean of Track Residuals Y Inner Modules;mean(y_rec-y_pred)[#mum]", 100, -20., 20.);
195  residuals_["residual_mean_y_Outer"] = iBooker.book1D(
196  "residual_mean_y_Outer", "Mean of Track Residuals Y Outer Modules;mean(y_rec-y_pred)[#mum]", 100, -20., 20.);
197 
198  residuals_["residual_rms_x_Inner"] = iBooker.book1D(
199  "residual_rms_x_Inner", "RMS of Track Residuals X Inner Modules;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
200  residuals_["residual_rms_x_Outer"] = iBooker.book1D(
201  "residual_rms_x_Outer", "RMS of Track Residuals X Outer Modules;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
202  residuals_["residual_rms_y_Inner"] = iBooker.book1D(
203  "residual_rms_y_Inner", "RMS of Track Residuals Y Inner Modules;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
204  residuals_["residual_rms_y_Outer"] = iBooker.book1D(
205  "residual_rms_y_Outer", "RMS of Track Residuals Y Outer Modules;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
206  //Normalize Residuals inner/outer
207  DRnR_["NormRes_mean_x_Inner"] =
208  iBooker.book1D("NormRes_mean_x_Inner",
209  "Mean of Normalized Track Residuals X Inner Modules;mean((x_rec-x_pred)/x_err)",
210  100,
211  -1.,
212  1.);
213  DRnR_["NormRes_mean_x_Outer"] =
214  iBooker.book1D("NormRes_mean_x_Outer",
215  "Mean of Normalized Track Residuals X Outer Modules;mean((x_rec-x_pred)/x_err)",
216  100,
217  -1.,
218  1.);
219  DRnR_["NormRes_mean_y_Inner"] =
220  iBooker.book1D("NormRes_mean_y_Inner",
221  "Mean of Normalized Track Residuals Y Inner Modules;mean((y_rec-y_pred)/y_err)",
222  100,
223  -1.,
224  1.);
225  DRnR_["NormRes_mean_y_Outer"] =
226  iBooker.book1D("NormRes_mean_y_Outer",
227  "Mean of Normalized Track Residuals Y Outer Modules;mean((y_rec-y_pred)/y_err)",
228  100,
229  -1.,
230  1.);
231 
232  DRnR_["DRnR_x_Inner"] = iBooker.book1D(
233  "DRnR_x_Inner", "RMS of Normalized Track Residuals X Inner Modules;rms((x_rec-x_pred)/x_err)", 100, 0., 2.);
234  DRnR_["DRnR_x_Outer"] = iBooker.book1D(
235  "DRnR_x_Outer", "RMS of Normalized Track Residuals X Outer Modules;rms((x_rec-x_pred)/x_err)", 100, 0., 2.);
236  DRnR_["DRnR_y_Inner"] = iBooker.book1D(
237  "DRnR_y_Inner", "RMS of Normalized Track Residuals Y Inner Modules;rms((y_rec-y_pred)/y_err)", 100, 0., 2.);
238  DRnR_["DRnR_y_Outer"] = iBooker.book1D(
239  "DRnR_y_Outer", "RMS of Normalized Track Residuals Y Outer Modules;rms((y_rec-y_pred)/y_err)", 100, 0., 2.);
240 
241  //New residual plots for the PXForward separated by positive and negative side
242  iBooker.setCurrentFolder(topFolderName_ + "/PXForward");
243 
244  residuals_["residual_mean_x_pos"] = iBooker.book1D(
245  "residual_mean_x_pos", "Mean of Track Residuals X pos. Side;mean(x_rec-x_pred)[#mum]", 100, -20., 20.);
246  residuals_["residual_mean_x_neg"] = iBooker.book1D(
247  "residual_mean_x_neg", "Mean of Track Residuals X neg. Side;mean(x_rec-x_pred)[#mum]", 100, -20., 20.);
248  residuals_["residual_mean_y_pos"] = iBooker.book1D(
249  "residual_mean_y_pos", "Mean of Track Residuals Y pos. Side;mean(y_rec-y_pred)[#mum]", 100, -20., 20.);
250  residuals_["residual_mean_y_neg"] = iBooker.book1D(
251  "residual_mean_y_neg", "Mean of Track Residuals Y neg. Side;mean(y_rec-y_pred)[#mum]", 100, -20., 20.);
252 
253  residuals_["residual_rms_x_pos"] =
254  iBooker.book1D("residual_rms_x_pos", "RMS of Track Residuals X pos. Side;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
255  residuals_["residual_rms_x_neg"] =
256  iBooker.book1D("residual_rms_x_neg", "RMS of Track Residuals X neg. Side;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
257  residuals_["residual_rms_y_pos"] =
258  iBooker.book1D("residual_rms_y_pos", "RMS of Track Residuals Y pos. Side;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
259  residuals_["residual_rms_y_neg"] =
260  iBooker.book1D("residual_rms_y_neg", "RMS of Track Residuals Y neg. Side;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
261  //Normalized Residuals pos/neg
262  DRnR_["NormRes_mean_x_pos"] = iBooker.book1D(
263  "NormRes_mean_x_pos", "Mean of Normalized Track Residuals X pos. Side;mean((x_rec-x_pred)/x_err)", 100, -1., 1.);
264  DRnR_["NormRes_mean_x_neg"] = iBooker.book1D(
265  "NormRes_mean_x_neg", "Mean of Normalized Track Residuals X neg. Side;mean((x_rec-x_pred)/x_err)", 100, -1., 1.);
266  DRnR_["NormRes_mean_y_pos"] = iBooker.book1D(
267  "NormRes_mean_y_pos", "Mean of Normalized Track Residuals Y pos. Side;mean((y_rec-y_pred)/y_err)", 100, -1., 1.);
268  DRnR_["NormRes_mean_y_neg"] = iBooker.book1D(
269  "NormRes_mean_y_neg", "Mean of Normalized Track Residuals Y neg. Side;mean((y_rec-y_pred)/y_err)", 100, -1., 1.);
270 
271  DRnR_["DRnR_x_pos"] = iBooker.book1D(
272  "DRnR_x_pos", "RMS of Normalized Track Residuals X pos. Side;rms((x_rec-x_pred)/x_err)", 100, 0., 2.);
273  DRnR_["DRnR_x_neg"] = iBooker.book1D(
274  "DRnR_x_neg", "RMS of Normalized Track Residuals X neg. Side;rms((x_rec-x_pred)/x_err)", 100, 0., 2.);
275  DRnR_["DRnR_y_pos"] = iBooker.book1D(
276  "DRnR_y_pos", "RMS of Normalized Track Residuals Y pos. Side;rms((y_rec-y_pred)/y_err)", 100, 0., 2.);
277  DRnR_["DRnR_y_neg"] = iBooker.book1D(
278  "DRnR_y_neg", "RMS of Normalized Track Residuals Y neg. Side;rms((y_rec-y_pred)/y_err)", 100, 0., 2.);
279 
280  //Reset the iBooker
281  iBooker.setCurrentFolder("PixelPhase1/");
282 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::map< std::string, MonitorElement * > DRnR_
std::map< std::string, MonitorElement * > residuals_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 64 of file SiPixelPhase1ResidualsExtra.cc.

References bookMEs(), and fillMEs().

64  {
65  bookMEs(iBooker);
66  fillMEs(iBooker, iGetter);
67 }
void bookMEs(DQMStore::IBooker &iBooker)
void fillMEs(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)

◆ fillMEs()

void SiPixelPhase1ResidualsExtra::fillMEs ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
private

Definition at line 287 of file SiPixelPhase1ResidualsExtra.cc.

References DRnR_, vertexPlots::e4, dqm::implementation::IGetter::get(), dqm::impl::MonitorElement::getBin(), dqm::impl::MonitorElement::getBinContent(), dqm::impl::MonitorElement::getBinEntries(), dqm::impl::MonitorElement::getBinError(), dqm::impl::MonitorElement::getNbinsX(), dqm::impl::MonitorElement::getNbinsY(), mps_fire::i, dqmiolumiharvest::j, nano_mu_digi_cff::layer, minHits_, residuals_, relativeConstraints::ring, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinEntries(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob().

287  {
288  //Fill additional residuals plots
289  //PXBarrel
290 
291  //constexpr int minHits_ = 30; //Miniminal number of hits needed for module to be filled in histograms
292 
293  for (std::string layer : {"1", "2", "3", "4"}) {
294  MonitorElement* me_x =
295  iGetter.get("PixelPhase1/Tracks/PXBarrel/residual_x_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
296  MonitorElement* me_y =
297  iGetter.get("PixelPhase1/Tracks/PXBarrel/residual_y_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
298  MonitorElement* me2_x = iGetter.get(
299  "PixelPhase1/Tracks/ResidualsExtra/PXBarrel/DRnR_x_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
300  MonitorElement* me2_y = iGetter.get(
301  "PixelPhase1/Tracks/ResidualsExtra/PXBarrel/DRnR_y_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
302 
303  if (me_x == nullptr || me_y == nullptr || me2_x == nullptr || me2_y == nullptr) {
304  edm::LogWarning("SiPixelPhase1ResidualsExtra")
305  << "Residuals plots for Pixel BPIX Layer" << layer << " not found. Skipping ResidualsExtra plots generation.";
306  continue;
307  }
308 
309  for (int i = 1; i <= me_x->getNbinsY(); i++) {
310  if (i == (me_x->getNbinsY() / 2 + 1))
311  continue; //Middle bin of y axis is empty
312 
313  if (i <= me_x->getNbinsY() / 2) {
314  bool iAmInner = (i % 2 == 0); //Check whether current ladder is inner or outer ladder
315  if (iAmInner) {
316  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
317  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
318  continue;
319  residuals_["residual_mean_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
320  residuals_["residual_mean_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
321  residuals_["residual_rms_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
322  residuals_["residual_rms_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
323  DRnR_["NormRes_mean_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
324  DRnR_["NormRes_mean_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
325  DRnR_["DRnR_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
326  DRnR_["DRnR_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
327  }
328  } else {
329  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
330  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
331  continue;
332  residuals_["residual_mean_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
333  residuals_["residual_mean_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
334  residuals_["residual_rms_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
335  residuals_["residual_rms_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
336  DRnR_["NormRes_mean_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
337  DRnR_["NormRes_mean_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
338  DRnR_["DRnR_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
339  DRnR_["DRnR_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
340  }
341  }
342  } else {
343  bool iAmInner = (i % 2 == 1); //Check whether current ladder is inner or outer ladder
344  if (iAmInner) {
345  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
346  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
347  continue;
348  residuals_["residual_mean_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
349  residuals_["residual_mean_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
350  residuals_["residual_rms_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
351  residuals_["residual_rms_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
352  DRnR_["NormRes_mean_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
353  DRnR_["NormRes_mean_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
354  DRnR_["DRnR_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
355  DRnR_["DRnR_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
356  }
357  } else {
358  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
359  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
360  continue;
361  residuals_["residual_mean_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
362  residuals_["residual_mean_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
363  residuals_["residual_rms_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
364  residuals_["residual_rms_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
365  DRnR_["NormRes_mean_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
366  DRnR_["NormRes_mean_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
367  DRnR_["DRnR_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
368  DRnR_["DRnR_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
369  }
370  }
371  }
372  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
373  if (me_x->getBinEntries(j, i) < minHits_) {
374  me2_x->setBinContent(j, i, 0);
375  me2_y->setBinContent(j, i, 0);
376  me2_x->setBinEntries(me2_x->getBin(j, i), 0);
377  me2_y->setBinEntries(me2_y->getBin(j, i), 0);
378  } else {
379  me2_x->setBinContent(j, i, me2_x->getBinError(j, i));
380  me2_y->setBinContent(j, i, me2_y->getBinError(j, i));
381  me2_x->setBinEntries(me2_x->getBin(j, i), 1);
382  me2_y->setBinEntries(me2_y->getBin(j, i), 1);
383  }
384  }
385  }
386  }
387 
388  //PXForward separating outer and inner modules as well as positive and negative side
389  for (std::string ring : {"1", "2"}) {
390  MonitorElement* me_x =
391  iGetter.get("PixelPhase1/Tracks/PXForward/residual_x_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
392  MonitorElement* me_y =
393  iGetter.get("PixelPhase1/Tracks/PXForward/residual_y_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
394  MonitorElement* me2_x = iGetter.get(
395  "PixelPhase1/Tracks/ResidualsExtra/PXForward/DRnR_x_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
396  MonitorElement* me2_y = iGetter.get(
397  "PixelPhase1/Tracks/ResidualsExtra/PXForward/DRnR_y_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
398 
399  if (me_x == nullptr || me_y == nullptr || me2_x == nullptr || me2_y == nullptr) {
400  edm::LogWarning("SiPixelPhase1ResidualsExtra")
401  << "Residuals plots for Pixel FPIX Ring" << ring << " not found. Skipping ResidualsExtra plots generation.";
402  continue;
403  }
404 
405  bool posSide = false;
406  for (int j = 1; j <= me_x->getNbinsX(); j++) {
407  if (j == 4)
408  continue; //fourth x-bin in profile plots is empty
409 
410  if (j == 5)
411  posSide = true; //change to postive side
412 
413  for (int i = 1; i <= me_x->getNbinsY(); i++) {
414  if (i == me_x->getNbinsY() / 2)
415  continue; //Middle bins of y axis is empty
416  if (i == (me_x->getNbinsY() / 2) + 1)
417  continue;
418  if (me_x->getBinEntries(j, i) >= minHits_) { //Fill only if number of hits is above threshold
419 
420  bool iAmInner = (i % 2 == 0); //separate inner and outer modules
421  if (iAmInner) {
422  residuals_["residual_mean_x_Inner"]->Fill(me_x->getBinContent(j, i) * 1e4);
423  residuals_["residual_mean_y_Inner"]->Fill(me_y->getBinContent(j, i) * 1e4);
424  residuals_["residual_rms_x_Inner"]->Fill(me_x->getBinError(j, i) * 1e4);
425  residuals_["residual_rms_y_Inner"]->Fill(me_y->getBinError(j, i) * 1e4);
426  DRnR_["NormRes_mean_x_Inner"]->Fill(me2_x->getBinContent(j, i));
427  DRnR_["NormRes_mean_y_Inner"]->Fill(me2_y->getBinContent(j, i));
428  DRnR_["DRnR_x_Inner"]->Fill(me2_x->getBinError(j, i));
429  DRnR_["DRnR_y_Inner"]->Fill(me2_y->getBinError(j, i));
430  } else {
431  residuals_["residual_mean_x_Outer"]->Fill(me_x->getBinContent(j, i) * 1e4);
432  residuals_["residual_mean_y_Outer"]->Fill(me_y->getBinContent(j, i) * 1e4);
433  residuals_["residual_rms_x_Outer"]->Fill(me_x->getBinError(j, i) * 1e4);
434  residuals_["residual_rms_y_Outer"]->Fill(me_y->getBinError(j, i) * 1e4);
435  DRnR_["NormRes_mean_x_Outer"]->Fill(me2_x->getBinContent(j, i));
436  DRnR_["NormRes_mean_y_Outer"]->Fill(me2_y->getBinContent(j, i));
437  DRnR_["DRnR_x_Outer"]->Fill(me2_x->getBinError(j, i));
438  DRnR_["DRnR_y_Outer"]->Fill(me2_y->getBinError(j, i));
439  }
440 
441  if (!posSide) { //separate postive and negative side
442  residuals_["residual_mean_x_neg"]->Fill(me_x->getBinContent(j, i) * 1e4);
443  residuals_["residual_mean_y_neg"]->Fill(me_y->getBinContent(j, i) * 1e4);
444  residuals_["residual_rms_x_neg"]->Fill(me_x->getBinError(j, i) * 1e4);
445  residuals_["residual_rms_y_neg"]->Fill(me_y->getBinError(j, i) * 1e4);
446  DRnR_["NormRes_mean_x_neg"]->Fill(me2_x->getBinContent(j, i));
447  DRnR_["NormRes_mean_y_neg"]->Fill(me2_y->getBinContent(j, i));
448  DRnR_["DRnR_x_neg"]->Fill(me2_x->getBinError(j, i));
449  DRnR_["DRnR_y_neg"]->Fill(me2_y->getBinError(j, i));
450  } else {
451  residuals_["residual_mean_x_pos"]->Fill(me_x->getBinContent(j, i) * 1e4);
452  residuals_["residual_mean_y_pos"]->Fill(me_y->getBinContent(j, i) * 1e4);
453  residuals_["residual_rms_x_pos"]->Fill(me_x->getBinError(j, i) * 1e4);
454  residuals_["residual_rms_y_pos"]->Fill(me_y->getBinError(j, i) * 1e4);
455  DRnR_["NormRes_mean_x_pos"]->Fill(me2_x->getBinContent(j, i));
456  DRnR_["NormRes_mean_y_pos"]->Fill(me2_y->getBinContent(j, i));
457  DRnR_["DRnR_x_pos"]->Fill(me2_x->getBinError(j, i));
458  DRnR_["DRnR_y_pos"]->Fill(me2_y->getBinError(j, i));
459  }
460  me2_x->setBinContent(j, i, me2_x->getBinError(j, i));
461  me2_y->setBinContent(j, i, me2_y->getBinError(j, i));
462  me2_x->setBinEntries(me2_x->getBin(j, i), 1);
463  me2_y->setBinEntries(me2_y->getBin(j, i), 1);
464  } else {
465  me2_x->setBinContent(j, i, 0);
466  me2_y->setBinContent(j, i, 0);
467  me2_x->setBinEntries(me2_x->getBin(j, i), 0);
468  me2_y->setBinEntries(me2_y->getBin(j, i), 0);
469  }
470  }
471  }
472  }
473 }
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
std::map< std::string, MonitorElement * > DRnR_
std::map< std::string, MonitorElement * > residuals_
virtual int getNbinsY() const
get # of bins in Y-axis
virtual void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:712
virtual int getBin(int binx, int biny) const
get global bin number (for 2-D profiles)
virtual int getNbinsX() const
get # of bins in X-axis
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
Log< level::Warning, false > LogWarning
virtual double getBinContent(int binx) const
get content of bin (1-D)

Member Data Documentation

◆ conf_

edm::ParameterSet SiPixelPhase1ResidualsExtra::conf_
private

Definition at line 46 of file SiPixelPhase1ResidualsExtra.h.

Referenced by SiPixelPhase1ResidualsExtra().

◆ DRnR_

std::map<std::string, MonitorElement*> SiPixelPhase1ResidualsExtra::DRnR_
private

Definition at line 49 of file SiPixelPhase1ResidualsExtra.h.

Referenced by bookMEs(), and fillMEs().

◆ minHits_

int SiPixelPhase1ResidualsExtra::minHits_
private

Definition at line 45 of file SiPixelPhase1ResidualsExtra.h.

Referenced by fillMEs(), and SiPixelPhase1ResidualsExtra().

◆ residuals_

std::map<std::string, MonitorElement*> SiPixelPhase1ResidualsExtra::residuals_
private

Definition at line 48 of file SiPixelPhase1ResidualsExtra.h.

Referenced by bookMEs(), and fillMEs().

◆ topFolderName_

std::string SiPixelPhase1ResidualsExtra::topFolderName_
private

Definition at line 44 of file SiPixelPhase1ResidualsExtra.h.

Referenced by bookMEs(), and SiPixelPhase1ResidualsExtra().