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 ()
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
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 &&)=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
 
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
 
- 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 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
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 36 of file SiPixelPhase1ResidualsExtra.h.

Constructor & Destructor Documentation

◆ SiPixelPhase1ResidualsExtra()

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

Definition at line 49 of file SiPixelPhase1ResidualsExtra.cc.

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 }

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

◆ ~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 }

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.

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 = 100.;
80  float rms_range = 200.;
81  if (layer == "1") {
82  mean_range = 200.;
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 * 5,
140  5);
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 * 5,
146  5);
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 * 5,
152  5);
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 * 5,
158  5);
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  5);
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  5);
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  5);
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  5);
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, -100., 100.);
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, -100., 100.);
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, -100., 100.);
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, -100., 100.);
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  -5.,
212  5.);
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  -5.,
218  5.);
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  -5.,
224  5.);
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  -5.,
230  5.);
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., 5.);
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., 5.);
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., 5.);
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., 5.);
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, -100., 100.);
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, -100., 100.);
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, -100., 100.);
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, -100., 100.);
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, -5., 5.);
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, -5., 5.);
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, -5., 5.);
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, -5., 5.);
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., 5.);
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., 5.);
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., 5.);
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., 5.);
279 
280  //Reset the iBooker
281  iBooker.setCurrentFolder("PixelPhase1/");
282 }

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

Referenced by dqmEndJob().

◆ dqmEndJob()

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

Implements DQMEDHarvester.

Definition at line 64 of file SiPixelPhase1ResidualsExtra.cc.

64  {
65  bookMEs(iBooker);
66  fillMEs(iBooker, iGetter);
67 }

References bookMEs(), and fillMEs().

◆ fillMEs()

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

Definition at line 287 of file SiPixelPhase1ResidualsExtra.cc.

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  for (int i = 1; i <= me_x->getNbinsY(); i++) {
304  if (i == (me_x->getNbinsY() / 2 + 1))
305  continue; //Middle bin of y axis is empty
306 
307  if (i <= me_x->getNbinsY() / 2) {
308  bool iAmInner = (i % 2 == 0); //Check whether current ladder is inner or outer ladder
309  if (iAmInner) {
310  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
311  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
312  continue;
313  residuals_["residual_mean_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
314  residuals_["residual_mean_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
315  residuals_["residual_rms_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
316  residuals_["residual_rms_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
317  DRnR_["NormRes_mean_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
318  DRnR_["NormRes_mean_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
319  DRnR_["DRnR_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
320  DRnR_["DRnR_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
321  }
322  } else {
323  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
324  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
325  continue;
326  residuals_["residual_mean_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
327  residuals_["residual_mean_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
328  residuals_["residual_rms_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
329  residuals_["residual_rms_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
330  DRnR_["NormRes_mean_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
331  DRnR_["NormRes_mean_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
332  DRnR_["DRnR_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
333  DRnR_["DRnR_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
334  }
335  }
336  } else {
337  bool iAmInner = (i % 2 == 1); //Check whether current ladder is inner or outer ladder
338  if (iAmInner) {
339  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
340  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
341  continue;
342  residuals_["residual_mean_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
343  residuals_["residual_mean_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
344  residuals_["residual_rms_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
345  residuals_["residual_rms_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
346  DRnR_["NormRes_mean_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
347  DRnR_["NormRes_mean_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
348  DRnR_["DRnR_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
349  DRnR_["DRnR_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
350  }
351  } else {
352  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
353  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
354  continue;
355  residuals_["residual_mean_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
356  residuals_["residual_mean_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
357  residuals_["residual_rms_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
358  residuals_["residual_rms_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
359  DRnR_["NormRes_mean_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
360  DRnR_["NormRes_mean_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
361  DRnR_["DRnR_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
362  DRnR_["DRnR_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
363  }
364  }
365  }
366  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
367  if (me_x->getBinEntries(j, i) < minHits_) {
368  me2_x->setBinContent(j, i, 0);
369  me2_y->setBinContent(j, i, 0);
370  me2_x->setBinEntries(me2_x->getBin(j, i), 0);
371  me2_y->setBinEntries(me2_y->getBin(j, i), 0);
372  } else {
373  me2_x->setBinContent(j, i, me2_x->getBinError(j, i));
374  me2_y->setBinContent(j, i, me2_y->getBinError(j, i));
375  me2_x->setBinEntries(me2_x->getBin(j, i), 1);
376  me2_y->setBinEntries(me2_y->getBin(j, i), 1);
377  }
378  }
379  }
380  }
381 
382  //PXForward separating outer and inner modules as well as positive and negative side
383  for (std::string ring : {"1", "2"}) {
384  MonitorElement* me_x =
385  iGetter.get("PixelPhase1/Tracks/PXForward/residual_x_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
386  MonitorElement* me_y =
387  iGetter.get("PixelPhase1/Tracks/PXForward/residual_y_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
388  MonitorElement* me2_x = iGetter.get(
389  "PixelPhase1/Tracks/ResidualsExtra/PXForward/DRnR_x_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
390  MonitorElement* me2_y = iGetter.get(
391  "PixelPhase1/Tracks/ResidualsExtra/PXForward/DRnR_y_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
392  bool posSide = false;
393  for (int j = 1; j <= me_x->getNbinsX(); j++) {
394  if (j == 4)
395  continue; //fourth x-bin in profile plots is empty
396 
397  if (j == 5)
398  posSide = true; //change to postive side
399 
400  for (int i = 1; i <= me_x->getNbinsY(); i++) {
401  if (i == me_x->getNbinsY() / 2)
402  continue; //Middle bins of y axis is empty
403  if (i == (me_x->getNbinsY() / 2) + 1)
404  continue;
405  if (me_x->getBinEntries(j, i) >= minHits_) { //Fill only if number of hits is above threshold
406 
407  bool iAmInner = (i % 2 == 0); //separate inner and outer modules
408  if (iAmInner) {
409  residuals_["residual_mean_x_Inner"]->Fill(me_x->getBinContent(j, i) * 1e4);
410  residuals_["residual_mean_y_Inner"]->Fill(me_y->getBinContent(j, i) * 1e4);
411  residuals_["residual_rms_x_Inner"]->Fill(me_x->getBinError(j, i) * 1e4);
412  residuals_["residual_rms_y_Inner"]->Fill(me_y->getBinError(j, i) * 1e4);
413  DRnR_["NormRes_mean_x_Inner"]->Fill(me2_x->getBinContent(j, i));
414  DRnR_["NormRes_mean_y_Inner"]->Fill(me2_y->getBinContent(j, i));
415  DRnR_["DRnR_x_Inner"]->Fill(me2_x->getBinError(j, i));
416  DRnR_["DRnR_y_Inner"]->Fill(me2_y->getBinError(j, i));
417  } else {
418  residuals_["residual_mean_x_Outer"]->Fill(me_x->getBinContent(j, i) * 1e4);
419  residuals_["residual_mean_y_Outer"]->Fill(me_y->getBinContent(j, i) * 1e4);
420  residuals_["residual_rms_x_Outer"]->Fill(me_x->getBinError(j, i) * 1e4);
421  residuals_["residual_rms_y_Outer"]->Fill(me_y->getBinError(j, i) * 1e4);
422  DRnR_["NormRes_mean_x_Outer"]->Fill(me2_x->getBinContent(j, i));
423  DRnR_["NormRes_mean_y_Outer"]->Fill(me2_y->getBinContent(j, i));
424  DRnR_["DRnR_x_Outer"]->Fill(me2_x->getBinError(j, i));
425  DRnR_["DRnR_y_Outer"]->Fill(me2_y->getBinError(j, i));
426  }
427 
428  if (!posSide) { //separate postive and negative side
429  residuals_["residual_mean_x_neg"]->Fill(me_x->getBinContent(j, i) * 1e4);
430  residuals_["residual_mean_y_neg"]->Fill(me_y->getBinContent(j, i) * 1e4);
431  residuals_["residual_rms_x_neg"]->Fill(me_x->getBinError(j, i) * 1e4);
432  residuals_["residual_rms_y_neg"]->Fill(me_y->getBinError(j, i) * 1e4);
433  DRnR_["NormRes_mean_x_neg"]->Fill(me2_x->getBinContent(j, i));
434  DRnR_["NormRes_mean_y_neg"]->Fill(me2_y->getBinContent(j, i));
435  DRnR_["DRnR_x_neg"]->Fill(me2_x->getBinError(j, i));
436  DRnR_["DRnR_y_neg"]->Fill(me2_y->getBinError(j, i));
437  } else {
438  residuals_["residual_mean_x_pos"]->Fill(me_x->getBinContent(j, i) * 1e4);
439  residuals_["residual_mean_y_pos"]->Fill(me_y->getBinContent(j, i) * 1e4);
440  residuals_["residual_rms_x_pos"]->Fill(me_x->getBinError(j, i) * 1e4);
441  residuals_["residual_rms_y_pos"]->Fill(me_y->getBinError(j, i) * 1e4);
442  DRnR_["NormRes_mean_x_pos"]->Fill(me2_x->getBinContent(j, i));
443  DRnR_["NormRes_mean_y_pos"]->Fill(me2_y->getBinContent(j, i));
444  DRnR_["DRnR_x_pos"]->Fill(me2_x->getBinError(j, i));
445  DRnR_["DRnR_y_pos"]->Fill(me2_y->getBinError(j, i));
446  }
447  me2_x->setBinContent(j, i, me2_x->getBinError(j, i));
448  me2_y->setBinContent(j, i, me2_y->getBinError(j, i));
449  me2_x->setBinEntries(me2_x->getBin(j, i), 1);
450  me2_y->setBinEntries(me2_y->getBin(j, i), 1);
451  } else {
452  me2_x->setBinContent(j, i, 0);
453  me2_y->setBinContent(j, i, 0);
454  me2_x->setBinEntries(me2_x->getBin(j, i), 0);
455  me2_y->setBinEntries(me2_y->getBin(j, i), 0);
456  }
457  }
458  }
459  }
460 }

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, phase1PixelTopology::layer, minHits_, residuals_, relativeConstraints::ring, dqm::impl::MonitorElement::setBinContent(), dqm::impl::MonitorElement::setBinEntries(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob().

Member Data Documentation

◆ conf_

edm::ParameterSet SiPixelPhase1ResidualsExtra::conf_
private

Definition at line 51 of file SiPixelPhase1ResidualsExtra.h.

Referenced by SiPixelPhase1ResidualsExtra().

◆ DRnR_

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

Definition at line 54 of file SiPixelPhase1ResidualsExtra.h.

Referenced by bookMEs(), and fillMEs().

◆ minHits_

int SiPixelPhase1ResidualsExtra::minHits_
private

Definition at line 50 of file SiPixelPhase1ResidualsExtra.h.

Referenced by fillMEs(), and SiPixelPhase1ResidualsExtra().

◆ residuals_

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

Definition at line 53 of file SiPixelPhase1ResidualsExtra.h.

Referenced by bookMEs(), and fillMEs().

◆ topFolderName_

std::string SiPixelPhase1ResidualsExtra::topFolderName_
private

Definition at line 49 of file SiPixelPhase1ResidualsExtra.h.

Referenced by bookMEs(), and SiPixelPhase1ResidualsExtra().

dqm::impl::MonitorElement::getBinEntries
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
Definition: MonitorElement.cc:636
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelPhase1ResidualsExtra::topFolderName_
std::string topFolderName_
Definition: SiPixelPhase1ResidualsExtra.h:49
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
SiPixelPhase1ResidualsExtra::fillMEs
void fillMEs(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
Definition: SiPixelPhase1ResidualsExtra.cc:287
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiPixelPhase1ResidualsExtra::DRnR_
std::map< std::string, MonitorElement * > DRnR_
Definition: SiPixelPhase1ResidualsExtra.h:54
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
dqm::impl::MonitorElement::getNbinsY
virtual int getNbinsY() const
get # of bins in Y-axis
Definition: MonitorElement.cc:571
DQMEDHarvester::DQMEDHarvester
DQMEDHarvester()
Definition: DQMEDHarvester.h:98
dqm::impl::MonitorElement::setBinEntries
virtual void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
Definition: MonitorElement.cc:718
SiPixelPhase1ResidualsExtra::conf_
edm::ParameterSet conf_
Definition: SiPixelPhase1ResidualsExtra.h:51
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiPixelPhase1ResidualsExtra::residuals_
std::map< std::string, MonitorElement * > residuals_
Definition: SiPixelPhase1ResidualsExtra.h:53
SiPixelPhase1ResidualsExtra::bookMEs
void bookMEs(DQMStore::IBooker &iBooker)
Definition: SiPixelPhase1ResidualsExtra.cc:72
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:682
SiPixelPhase1ResidualsExtra::minHits_
int minHits_
Definition: SiPixelPhase1ResidualsExtra.h:50
dqm::impl::MonitorElement::getBin
virtual int getBin(int binx, int biny) const
get global bin number (for 2-D profiles)
Definition: MonitorElement.cc:625
dqm::impl::MonitorElement::getNbinsX
virtual int getNbinsX() const
get # of bins in X-axis
Definition: MonitorElement.cc:565
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
dqm::impl::MonitorElement::getBinError
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
Definition: MonitorElement.cc:601
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:583
vertexPlots.e4
e4
Definition: vertexPlots.py:64
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