ATLAS Offline Software
Loading...
Searching...
No Matches
VP1CaloCellManager.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef VP1CALOSYSTEMS_VP1CALOCELLMANAGER_H
6#define VP1CALOSYSTEMS_VP1CALOCELLMANAGER_H
7
9#include <QObject>
10
11#include <map>
12
14class QCheckBox;
15class QDoubleSpinBox;
17
18
19//------------------------------------------
20// Class VP1CaloCellManager
21//------------------------------------------
22//
23// This class is designed to keep pointers to the VP1CC objects of the similar type.
24// LAr cells are grouped by samplings
25// Tile cells are grouped by regions (Barrel, End cap, Crack)
26//
27// The objects are stored into two containers - one keeps cells with positive energies, and one with negative energies.
28// The containers are represented by multimaps, indexed either by cell energy or by Et
29
30
31// Notes:
32// 1. Consider subclasing from VP1HelperClassBase (?)
33//
34
35typedef std::multimap<double,VP1CaloCell*> VP1CCMultimap;
36typedef VP1CCMultimap::iterator VP1CCMultimapIterator;
37
38class VP1CaloCellManager : public QObject
39{
40 Q_OBJECT
41
42 public:
44 VP1CC_SoNode2CCMap* node2cc,
45 bool useEt,
46 const QPair<bool,double>& scale,
47 bool outline,
48 const VP1CC_GlobalCuts& globalCuts);
49
51
52 // Add new VP1CaloCell to the appropriate container
53 void add(VP1CaloCell* cell);
54
55 public Q_SLOTS:
57 void scaleUpdated(const QPair<bool,double>&);
58 void outlineUpdated(const bool&);
60 void clipVolumeRadiusChanged(double radius);
61
62 private:
63 // ------------ Private methods ------------
64 // Update scene with newInterval for pos/neg cells
65 void updateScene(const VP1Interval& newInterval, bool positive);
66
67 // ------------ Private data --------------
68 // Selection Type
70
71 // node2cc map pointer
73
74 // E/Et mode switch
75 bool m_useEt;
76
77 // scale for ed objects
78 QPair<bool,double> m_scale;
79
80 // outline flag
82
83 // 2 multimaps for cells with positive and negative energie
86
87 // Iterators pointing to the first/last Calo Cells with pos/neg energies satisfying selected Energy Thresholds
92
93 // Current intervals
95
96 // Global cuts
98};
99
100typedef std::map<VP1CC_SelectionTypes, VP1CaloCellManager*, std::less<VP1CC_SelectionTypes> > VP1CCManagerContainer;
101
102#endif
VP1CCMultimap::iterator VP1CCMultimapIterator
std::multimap< double, VP1CaloCell * > VP1CCMultimap
std::map< VP1CC_SelectionTypes, VP1CaloCellManager *, std::less< VP1CC_SelectionTypes > > VP1CCManagerContainer
QPair< VP1Interval, VP1Interval > VP1CCIntervalPair
QMap< VP1CC_SelectionTypes, VP1CCIntervalPair > VP1CCIntervalMap
VP1CC_SelectionTypes
std::map< SoNode *, VP1CaloCell *, std::less< SoNode * > > VP1CC_SoNode2CCMap
void updateScene(const VP1Interval &newInterval, bool positive)
QPair< bool, double > m_scale
VP1CC_GlobalCuts m_globalCuts
void selectionUpdated(const VP1CCIntervalMap &)
void clipVolumeRadiusChanged(double radius)
void globalCutsUpdated(const VP1CC_GlobalCuts &)
VP1CCMultimapIterator m_firstDisplayedPos
VP1CaloCellManager(VP1CC_SelectionTypes type, VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &globalCuts)
void scaleUpdated(const QPair< bool, double > &)
VP1CCMultimap m_positiveCells
VP1CCMultimapIterator m_lastDisplayedPos
void outlineUpdated(const bool &)
void add(VP1CaloCell *cell)
VP1CCMultimapIterator m_lastDisplayedNeg
VP1CCIntervalPair m_intervals
VP1CCMultimap m_negativeCells
VP1CCMultimapIterator m_firstDisplayedNeg
VP1CC_SelectionTypes m_type
VP1CC_SoNode2CCMap * m_node2cc