CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ListGroups Class Reference
Inheritance diagram for ListGroups:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 ListGroups (const edm::ParameterSet &)
 
 ~ListGroups () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 
void fillColor ()
 
void fillGradient ()
 
void fillMaterialDifferences ()
 
std::vector< std::pair< std::shared_ptr< TLine >, std::shared_ptr< TText > > > overlayEtaReferences ()
 
void produceAndSaveSummaryPlot (const edm::EventSetup &)
 

Private Attributes

std::vector< unsigned int > m_color
 
std::map< std::string, std::pair< float, float > > m_diff
 
std::vector< int > m_gradient
 
std::set< std::string > m_group_names
 
std::vector< MaterialAccountingGroup * > m_groups
 
std::vector< TH2F * > m_plots
 
bool m_saveSummaryPlot
 
std::map< std::string, std::pair< float, float > > m_values
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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)
 

Detailed Description

Definition at line 76 of file ListGroups.cc.

Constructor & Destructor Documentation

◆ ListGroups()

ListGroups::ListGroups ( const edm::ParameterSet iPSet)

Definition at line 110 of file ListGroups.cc.

110  {
111  m_saveSummaryPlot = iPSet.getUntrackedParameter<bool>("SaveSummaryPlot");
112  m_plots.clear();
113  m_groups.clear();
114  TColor::InitializeColors();
115  fillColor();
117  fillGradient();
118 }

References fillColor(), fillGradient(), fillMaterialDifferences(), edm::ParameterSet::getUntrackedParameter(), m_groups, m_plots, and m_saveSummaryPlot.

◆ ~ListGroups()

ListGroups::~ListGroups ( )
override

Definition at line 120 of file ListGroups.cc.

120  {
121  for (auto plot : m_plots)
122  delete plot;
123 
124  if (!m_groups.empty())
125  for (auto g : m_groups)
126  delete g;
127 }

References g, m_groups, m_plots, and plotFactory::plot.

Member Function Documentation

◆ analyze()

void ListGroups::analyze ( const edm::Event evt,
const edm::EventSetup setup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 426 of file ListGroups.cc.

426  {
428  setup.get<IdealGeometryRecord>().get(hDdd);
429 
430  DDSpecificsHasNamedValueFilter filter{"TrackingMaterialGroup"};
431  DDFilteredView fv(*hDdd, filter);
432 
433  while (fv.next()) {
434  // print the group name and full hierarchy of all items
435  std::cout << dddGetString("TrackingMaterialGroup", fv) << '\t';
436  m_group_names.insert(dddGetString("TrackingMaterialGroup", fv));
437 
438  // start from 2 to skip the leading /OCMS[0]/CMSE[1] part
439  const DDGeoHistory &history = fv.geoHistory();
440  std::cout << '/';
441  for (unsigned int h = 2; h < history.size(); ++h)
442  std::cout << '/' << history[h].logicalPart().name().name() << '[' << history[h].copyno() << ']';
443 
444  // DD3Vector and DDTranslation are the same type as math::XYZVector
445  math::XYZVector position = fv.translation() / 10.; // mm -> cm
446  std::cout << "\t(" << position.x() << ", " << position.y() << ", " << position.z() << ") "
447  << "[rho] " << position.Rho() << std::endl;
448  };
449  std::cout << std::endl;
450 
451  if (m_saveSummaryPlot)
453 }

References gather_cfg::cout, dddGetString(), ALCARECOTkAlBeamHalo_cff::filter, DDFilteredView::geoHistory(), get, h, m_group_names, m_saveSummaryPlot, DDFilteredView::next(), position, produceAndSaveSummaryPlot(), singleTopDQM_cfi::setup, and DDFilteredView::translation().

◆ beginJob()

void ListGroups::beginJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 83 of file ListGroups.cc.

83 {}

◆ endJob()

void ListGroups::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 455 of file ListGroups.cc.

455 {}

◆ fillColor()

void ListGroups::fillColor ( void  )
private

Definition at line 165 of file ListGroups.cc.

165  {
166  // With the introduction of the support for PhaseI and PhaseII detectors it
167  // became quite difficult to maintain a list of colors that is in sync with
168  // the real number of grouping used in the different scenarios. We therefore
169  // define some reasonable set and loop over it in case the number of grouping
170  // is larger than the number of colors.
171 
172  m_color.push_back(kBlack); // unassigned
173 
174  m_color.push_back(kAzure); // PixelBarrelLayer0_Z0
175  m_color.push_back(kAzure - 1); // PixelBarrelLayer0_Z20
176  m_color.push_back(kAzure + 1); // Layer1_Z0
177  m_color.push_back(kAzure + 2); // Layer1_Z20
178 
179  m_color.push_back(kGreen); // EndCapDisk1_R0
180  m_color.push_back(kGreen + 2); // EndcapDisk1_R11
181  m_color.push_back(kGreen + 4); // EndcapDisk1_R7
182  m_color.push_back(kSpring + 9); // EndcapDisk2_R0
183  m_color.push_back(kSpring + 4); // EndcapDisk2_R7
184  m_color.push_back(kSpring); // EndcapDisk2_R7
185 
186  m_color.push_back(kRed); // TECDisk0_R20
187  m_color.push_back(kRed + 2); // TECDisk0_R40
188  m_color.push_back(kRed - 7); // TECDisk0_R50
189  m_color.push_back(kRed - 5); // TECDisk0_R60
190  m_color.push_back(kRed - 10); // TECDisk0_R90
191  m_color.push_back(kRed - 1); // TECDisk1_Inner
192  m_color.push_back(kRed - 2); // TECDisk1_Outer
193  m_color.push_back(kRed - 3); // TECDisk1_R20
194  m_color.push_back(kPink - 2); // TECDisk2_Inner
195  m_color.push_back(kPink - 3); // TECDisk2_Outer
196  m_color.push_back(kPink - 4); // TECDisk2_R20
197  m_color.push_back(kPink + 9); // TECDisk3_Inner
198  m_color.push_back(kPink + 8); // TECDisk3_Outer
199  m_color.push_back(kPink + 7); // TECDisk3
200  m_color.push_back(kMagenta - 2); // TECDisk4_Inner
201  m_color.push_back(kMagenta - 3); // TECDisk4_Outer
202  m_color.push_back(kMagenta - 4); // TECDisk4_R33
203  m_color.push_back(kMagenta - 5); // TECDisk5_Inner
204  m_color.push_back(kMagenta - 6); // TECDisk5_Outer
205  m_color.push_back(kMagenta - 7); // TECDisk5_R33
206  m_color.push_back(kRed); // TECDisk6
207  m_color.push_back(kMagenta - 9); // TECDisk7_R40
208  m_color.push_back(kViolet); // TECDisk8
209 
210  m_color.push_back(kOrange + 9); // TIBLayer0_Z0
211  m_color.push_back(kOrange + 7); // TIBLayer0_Z20
212  m_color.push_back(kOrange + 5); // TIBLayer0_Z40
213  m_color.push_back(kOrange - 2); // TIBLayer1_Z0
214  m_color.push_back(kOrange - 3); // TIBLayer1_Z30
215  m_color.push_back(kOrange - 6); // TIBLayer1_Z60
216  m_color.push_back(kOrange + 4); // TIBLayer2_Z0
217  m_color.push_back(kOrange - 7); // TIBLayer2_Z40
218  m_color.push_back(kOrange); // TIBLayer3_Z0
219  m_color.push_back(kOrange + 10); // TIBLayer3_Z50
220 
221  m_color.push_back(kViolet + 10); // TIDDisk1_R0
222  m_color.push_back(kViolet + 6); // TIDDisk1_R30
223  m_color.push_back(kViolet + 3); // TIDDisk1_R40
224  m_color.push_back(kViolet - 7); // TIDDisk2_R25
225  m_color.push_back(kViolet - 1); // TIDDisk2_R30
226  m_color.push_back(kViolet + 9); // TIDDisk2_R40
227  m_color.push_back(kViolet - 5); // TIDDisk3_R24
228  m_color.push_back(kViolet - 3); // TIDDisk3_R30
229  m_color.push_back(kViolet); // TIDDisk3_R40
230 
231  m_color.push_back(kAzure); // TOBLayer0_Z0
232  m_color.push_back(kAzure + 8); // TOBLayer0_Z20
233  m_color.push_back(kAzure + 2); // TOBLayer0_Z70
234  m_color.push_back(kAzure + 4); // TOBLayer0_Z80
235  m_color.push_back(kCyan + 1); // TOBLayer1_Z0
236  m_color.push_back(kCyan - 9); // TOBLayer1_Z20
237  m_color.push_back(kCyan + 3); // TOBLayer1_Z80
238  m_color.push_back(kCyan + 4); // TOBLayer1_Z90
239  m_color.push_back(kAzure); // TOBLayer2_Z0
240  m_color.push_back(kAzure + 8); // TOBLayer2_Z25
241  m_color.push_back(kAzure + 2); // TOBLayer2_Z80
242  m_color.push_back(kAzure + 5); // TOBLayer2_Z90
243  m_color.push_back(kCyan + 1); // TOBLayer3_Z0
244  m_color.push_back(kCyan - 9); // TOBLayer3_Z25
245  m_color.push_back(kCyan + 3); // TOBLayer3_Z80
246  m_color.push_back(kCyan + 4); // TOBLayer3_Z90
247  m_color.push_back(kAzure); // TOBLayer4_Z0
248  m_color.push_back(kAzure + 8); // TOBLayer4_Z25
249  m_color.push_back(kAzure + 2); // TOBLayer4_Z80
250  m_color.push_back(kAzure + 5); // TOBLayer4_Z90
251  m_color.push_back(kCyan + 1); // TOBLayer5_Z0
252  m_color.push_back(kCyan - 9); // TOBLayer5_Z25
253  m_color.push_back(kCyan + 3); // TOBLayer5_Z80
254  m_color.push_back(kCyan + 4); // TOBLayer5_Z90
255 }

References m_color.

Referenced by ListGroups().

◆ fillGradient()

void ListGroups::fillGradient ( void  )
private

Definition at line 131 of file ListGroups.cc.

131  {
132  m_gradient.reserve(200);
133  unsigned int steps = 100;
134  // if no index was given, find the highest used one and start from that plus one
135  unsigned int index = ((TObjArray *)gROOT->GetListOfColors())->GetLast() + 1;
136 
137  float r1, g1, b1, r2, g2, b2;
138  static_cast<TColor *>(gROOT->GetListOfColors()->At(kBlue + 1))->GetRGB(r1, g1, b1);
139  static_cast<TColor *>(gROOT->GetListOfColors()->At(kAzure + 10))->GetRGB(r2, g2, b2);
140  float delta_r = (r2 - r1) / (steps - 1);
141  float delta_g = (g2 - g1) / (steps - 1);
142  float delta_b = (b2 - b1) / (steps - 1);
143 
144  m_gradient.push_back(kBlue + 4); // Underflow lowest bin
145  unsigned int ii = 0;
146  for (unsigned int i = 0; i < steps; ++i, ++ii) {
147  new TColor(static_cast<Int_t>(index + ii), r1 + delta_r * i, g1 + delta_g * i, b1 + delta_b * i);
148  m_gradient.push_back(index + ii);
149  }
150 
151  m_gradient.push_back(kWhite); // 0 level perfectly white
152 
153  static_cast<TColor *>(gROOT->GetListOfColors()->At(kOrange))->GetRGB(r1, g1, b1);
154  static_cast<TColor *>(gROOT->GetListOfColors()->At(kOrange + 7))->GetRGB(r2, g2, b2);
155  delta_r = (r2 - r1) / (steps - 1);
156  delta_g = (g2 - g1) / (steps - 1);
157  delta_b = (b2 - b1) / (steps - 1);
158  for (unsigned int i = 0; i < steps; ++i, ++ii) {
159  new TColor(static_cast<Int_t>(index + ii), r1 + delta_r * i, g1 + delta_g * i, b1 + delta_b * i);
160  m_gradient.push_back(index + ii);
161  }
162  m_gradient.push_back(kRed); // Overflow highest bin
163 }

References b1, b2, hitfit::delta_r(), diffTwoXMLs::g1, diffTwoXMLs::g2, mps_fire::i, cuy::ii, m_gradient, diffTwoXMLs::r1, diffTwoXMLs::r2, and customisers::steps.

Referenced by ListGroups().

◆ fillMaterialDifferences()

void ListGroups::fillMaterialDifferences ( )
private

Definition at line 6 of file ListGroupsMaterialDifference.h.

6 {}

Referenced by ListGroups().

◆ overlayEtaReferences()

std::vector< std::pair< std::shared_ptr< TLine >, std::shared_ptr< TText > > > ListGroups::overlayEtaReferences ( )
private

Definition at line 257 of file ListGroups.cc.

257  {
258  std::vector<std::pair<std::shared_ptr<TLine>, std::shared_ptr<TText> > > lines;
259 
260  lines.reserve(40);
261  std::pair<float, float> deltaZ(293, 298);
262  std::pair<float, float> deltaR(115, 118);
263  float text_size = 0.033;
264 
265  for (float eta = 0.; eta <= 3.8; eta += 0.2) {
266  float theta = 2. * atan(exp(-eta));
267  if (eta >= 1.8) {
268  lines.push_back(std::make_pair<std::shared_ptr<TLine>, std::shared_ptr<TText> >(
269  std::make_shared<TLine>(deltaZ.first, deltaZ.first * tan(theta), deltaZ.second, deltaZ.second * tan(theta)),
270  std::make_shared<TText>(deltaZ.first, deltaZ.first * tan(theta), fmt::sprintf("%2.1f", eta).c_str())));
271  lines.back().second->SetTextFont(42);
272  lines.back().second->SetTextSize(text_size);
273  lines.back().second->SetTextAlign(33);
274  lines.push_back(std::make_pair<std::shared_ptr<TLine>, std::shared_ptr<TText> >(
275  std::make_shared<TLine>(-deltaZ.first, deltaZ.first * tan(theta), -deltaZ.second, deltaZ.second * tan(theta)),
276  std::make_shared<TText>(-deltaZ.first, deltaZ.first * tan(theta), fmt::sprintf("-%2.1f", eta).c_str())));
277  lines.back().second->SetTextFont(42);
278  lines.back().second->SetTextSize(text_size);
279  lines.back().second->SetTextAlign(13);
280  } else {
281  lines.push_back(std::make_pair<std::shared_ptr<TLine>, std::shared_ptr<TText> >(
282  std::make_shared<TLine>(deltaR.first / tan(theta), deltaR.first, deltaR.second / tan(theta), deltaR.second),
283  std::make_shared<TText>(deltaR.first / tan(theta), deltaR.first, fmt::sprintf("%2.1f", eta).c_str())));
284  lines.back().second->SetTextFont(42);
285  lines.back().second->SetTextSize(text_size);
286  lines.back().second->SetTextAlign(23);
287  if (eta != 0) {
288  lines.push_back(std::make_pair<std::shared_ptr<TLine>, std::shared_ptr<TText> >(
289  std::make_shared<TLine>(
290  -deltaR.first / tan(theta), deltaR.first, -deltaR.second / tan(theta), deltaR.second),
291  std::make_shared<TText>(-deltaR.first / tan(theta), deltaR.first, fmt::sprintf("-%2.1f", eta).c_str())));
292  lines.back().second->SetTextFont(42);
293  lines.back().second->SetTextSize(text_size);
294  lines.back().second->SetTextAlign(23);
295  }
296  }
297  }
298  return lines;
299 }

References PbPb_ZMuSkimMuonDPG_cff::deltaR, PVValHelper::eta, JetChargeProducer_cfi::exp, groupFilesInBlocks::lines, funct::tan(), and theta().

Referenced by produceAndSaveSummaryPlot().

◆ produceAndSaveSummaryPlot()

void ListGroups::produceAndSaveSummaryPlot ( const edm::EventSetup setup)
private

Definition at line 301 of file ListGroups.cc.

301  {
302  const double scale = 10.;
303  std::vector<TText *> nukem_text;
304  static int markerStyles[10] = {kFullCircle,
305  kFullSquare,
306  kFullTriangleUp,
307  kFullTriangleDown,
308  kOpenCircle,
309  kOpenSquare,
310  kOpenTriangleUp,
311  kOpenDiamond,
312  kOpenCross,
313  kFullStar};
314 
316  setup.get<IdealGeometryRecord>().get(hDdd);
317 
318  for (const auto &n : m_group_names) {
319  m_groups.push_back(new MaterialAccountingGroup(n, *hDdd));
320  };
321 
322  std::unique_ptr<TCanvas> canvas(
323  new TCanvas("Grouping_rz", "Grouping - RZ view", (int)(600 * scale * 1.25), (int)(120 * scale * 1.50)));
324  canvas->GetFrame()->SetFillColor(kWhite);
325  gStyle->SetOptStat(0);
326 
327  unsigned int color_index = 1;
328  // Setup the legend
329  std::unique_ptr<TLegend> leg(new TLegend(0.1, 0.1, 0.23, 0.34));
330  leg->SetHeader("Tracker Material Grouping");
331  leg->SetTextFont(42);
332  leg->SetTextSize(0.008);
333  leg->SetNColumns(3);
334  std::unique_ptr<TProfile2D> radlen(
335  new TProfile2D("OverallRadLen", "OverallRadLen", 600., -300., 300, 120., 0., 120.));
336  std::unique_ptr<TProfile2D> eneloss(
337  new TProfile2D("OverallEnergyLoss", "OverallEnergyLoss", 600., -300., 300, 120., 0., 120.));
338  std::unique_ptr<TProfile2D> radlen_diff(
339  new TProfile2D("OverallDifferencesRadLen", "OverallDifferencesRadLen", 600., -300., 300, 120., 0., 120.));
340  std::unique_ptr<TProfile2D> eneloss_diff(
341  new TProfile2D("OverallDifferencesEnergyLoss", "OverallDifferencesEnergyLoss", 600., -300., 300, 120., 0., 120.));
342 
343  for (auto g : m_groups) {
344  m_plots.push_back(
345  new TH2F(g->name().c_str(), g->name().c_str(), 6000., -300., 300, 1200., 0., 120.)); // 10x10 points per cm2
346  TH2F &current = *m_plots.back();
347  current.SetMarkerColor(m_color[color_index]);
348  current.SetMarkerStyle(markerStyles[color_index % 10]);
349  current.SetMarkerSize(0.8);
350  current.SetLineWidth(1);
351  for (const auto &element : g->elements()) {
352  current.Fill(element.z(), element.perp());
353  radlen->Fill(element.z(), element.perp(), m_values[g->name()].first);
354  eneloss->Fill(element.z(), element.perp(), m_values[g->name()].second);
355  radlen_diff->Fill(element.z(), element.perp(), m_diff[g->name()].first);
356  eneloss_diff->Fill(element.z(), element.perp(), m_diff[g->name()].second);
357  }
358 
359  if (color_index == 1)
360  current.Draw();
361  else
362  current.Draw("SAME");
363 
364  leg->AddEntry(&current, g->name().c_str(), "lp")->SetTextColor(m_color[color_index]);
365  color_index++;
366 
367  // Loop over the same chromatic scale in case the number of
368  // allocated colors is not big enough.
369  color_index = color_index % m_color.size();
370  }
371  leg->Draw();
372  canvas->SaveAs("Grouping.png");
373 
374  std::vector<std::pair<std::shared_ptr<TLine>, std::shared_ptr<TText> > > lines = overlayEtaReferences();
375 
376  canvas->Clear();
377  radlen->SetMinimum(0);
378  radlen->SetMaximum(0.25);
379  radlen->Draw("COLZ");
380  for (const auto &line : lines) {
381  line.first->SetLineWidth(5);
382  line.first->Draw();
383  line.second->Draw();
384  }
385  canvas->SaveAs("RadLenValues.png");
386 
387  canvas->Clear();
388  eneloss->SetMinimum(0.00001);
389  eneloss->SetMaximum(0.0005);
390  eneloss->Draw("COLZ");
391  for (const auto &line : lines) {
392  line.first->SetLineWidth(5);
393  line.first->Draw();
394  line.second->Draw();
395  }
396  canvas->SaveAs("EnergyLossValues.png");
397 
398  canvas->Clear();
399  gStyle->SetPalette(m_gradient.size(), &m_gradient.front());
400  gStyle->SetNumberContours(m_gradient.size());
401  radlen_diff->SetMinimum(-100);
402  radlen_diff->SetMaximum(100);
403  radlen_diff->Draw("COLZ");
404  for (const auto &line : lines) {
405  line.first->SetLineWidth(5);
406  line.first->Draw();
407  line.second->Draw();
408  }
409  canvas->SaveAs("RadLenChanges.png");
410 
411  canvas->Clear();
412  eneloss_diff->SetMinimum(-100);
413  eneloss_diff->SetMaximum(100);
414  eneloss_diff->Draw("COLZ");
415  for (const auto &line : lines) {
416  line.first->SetLineWidth(5);
417  line.first->Draw();
418  line.second->Draw();
419  }
420  canvas->SaveAs("EnergyLossChanges.png");
421 
422  for (auto g : nukem_text)
423  delete g;
424 }

References svgfig::canvas(), g, get, mps_splice::line, groupFilesInBlocks::lines, m_color, m_diff, m_gradient, m_group_names, m_groups, m_plots, m_values, dqmiodumpmetadata::n, overlayEtaReferences(), L1EGammaCrystalsEmulatorProducer_cfi::scale, and singleTopDQM_cfi::setup.

Referenced by analyze().

Member Data Documentation

◆ m_color

std::vector<unsigned int> ListGroups::m_color
private

Definition at line 94 of file ListGroups.cc.

Referenced by fillColor(), and produceAndSaveSummaryPlot().

◆ m_diff

std::map<std::string, std::pair<float, float> > ListGroups::m_diff
private

Definition at line 106 of file ListGroups.cc.

Referenced by produceAndSaveSummaryPlot().

◆ m_gradient

std::vector<int> ListGroups::m_gradient
private

Definition at line 95 of file ListGroups.cc.

Referenced by fillGradient(), and produceAndSaveSummaryPlot().

◆ m_group_names

std::set<std::string> ListGroups::m_group_names
private

Definition at line 92 of file ListGroups.cc.

Referenced by analyze(), and produceAndSaveSummaryPlot().

◆ m_groups

std::vector<MaterialAccountingGroup *> ListGroups::m_groups
private

Definition at line 93 of file ListGroups.cc.

Referenced by ListGroups(), produceAndSaveSummaryPlot(), and ~ListGroups().

◆ m_plots

std::vector<TH2F *> ListGroups::m_plots
private

Definition at line 91 of file ListGroups.cc.

Referenced by ListGroups(), produceAndSaveSummaryPlot(), and ~ListGroups().

◆ m_saveSummaryPlot

bool ListGroups::m_saveSummaryPlot
private

Definition at line 90 of file ListGroups.cc.

Referenced by analyze(), and ListGroups().

◆ m_values

std::map<std::string, std::pair<float, float> > ListGroups::m_values
private

Definition at line 107 of file ListGroups.cc.

Referenced by produceAndSaveSummaryPlot().

svgfig.canvas
def canvas(*sub, **attr)
Definition: svgfig.py:482
ListGroups::fillMaterialDifferences
void fillMaterialDifferences()
Definition: ListGroupsMaterialDifference.h:6
dddGetString
static std::string dddGetString(const std::string &s, DDFilteredView const &view)
Definition: ListGroups.cc:68
mps_fire.i
i
Definition: mps_fire.py:428
DDGeoHistory
std::vector< DDExpandedNode > DDGeoHistory
Geometrical 'path' of the current node up to the root-node.
Definition: DDExpandedNode.h:82
ListGroups::m_diff
std::map< std::string, std::pair< float, float > > m_diff
Definition: ListGroups.cc:106
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
hitfit::delta_r
double delta_r(const Fourvec &a, const Fourvec &b)
Find the distance between two four-vectors in the two-dimensional space .
Definition: fourvec.cc:238
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
gather_cfg.cout
cout
Definition: gather_cfg.py:144
diffTwoXMLs.g1
g1
Definition: diffTwoXMLs.py:52
ListGroups::m_saveSummaryPlot
bool m_saveSummaryPlot
Definition: ListGroups.cc:90
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
b2
static constexpr float b2
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
ListGroups::fillGradient
void fillGradient()
Definition: ListGroups.cc:131
plotFactory.plot
plot
Definition: plotFactory.py:109
ListGroups::m_gradient
std::vector< int > m_gradient
Definition: ListGroups.cc:95
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
b1
static constexpr float b1
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
ListGroups::m_group_names
std::set< std::string > m_group_names
Definition: ListGroups.cc:92
ListGroups::m_groups
std::vector< MaterialAccountingGroup * > m_groups
Definition: ListGroups.cc:93
PVValHelper::eta
Definition: PVValidationHelpers.h:70
ListGroups::m_values
std::map< std::string, std::pair< float, float > > m_values
Definition: ListGroups.cc:107
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
h
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
groupFilesInBlocks.lines
lines
Definition: groupFilesInBlocks.py:95
MaterialAccountingGroup
Definition: MaterialAccountingGroup.h:19
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
diffTwoXMLs.r2
r2
Definition: diffTwoXMLs.py:73
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
DDSpecificsHasNamedValueFilter
Definition: DDFilter.h:60
get
#define get
diffTwoXMLs.g2
g2
Definition: diffTwoXMLs.py:71
edm::ESTransientHandle
Definition: ESTransientHandle.h:41
ListGroups::fillColor
void fillColor()
Definition: ListGroups.cc:165
diffTwoXMLs.r1
r1
Definition: diffTwoXMLs.py:53
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
ListGroups::m_plots
std::vector< TH2F * > m_plots
Definition: ListGroups.cc:91
customisers.steps
steps
Definition: customisers.py:40
DDFilteredView
Definition: DDFilteredView.h:20
ListGroups::m_color
std::vector< unsigned int > m_color
Definition: ListGroups.cc:94
ListGroups::produceAndSaveSummaryPlot
void produceAndSaveSummaryPlot(const edm::EventSetup &)
Definition: ListGroups.cc:301
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
mps_splice.line
line
Definition: mps_splice.py:76
cuy.ii
ii
Definition: cuy.py:590
IdealGeometryRecord
Definition: IdealGeometryRecord.h:25
ListGroups::overlayEtaReferences
std::vector< std::pair< std::shared_ptr< TLine >, std::shared_ptr< TText > > > overlayEtaReferences()
Definition: ListGroups.cc:257
g
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4