ATLAS Offline Software
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 
14 class QCheckBox;
15 class QDoubleSpinBox;
16 class ICaloBadChanTool;
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 
35 typedef std::multimap<double,VP1CaloCell*> VP1CCMultimap;
37 
38 class 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
81  bool m_outline;
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 
100 typedef std::map<VP1CC_SelectionTypes, VP1CaloCellManager*, std::less<VP1CC_SelectionTypes> > VP1CCManagerContainer;
101 
102 #endif
VP1CaloCellManager::m_positiveCells
VP1CCMultimap m_positiveCells
Definition: VP1CaloCellManager.h:84
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1CaloCellManager::add
void add(VP1CaloCell *cell)
Definition: VP1CaloCellManager.cxx:59
VP1CaloCellManager::m_lastDisplayedNeg
VP1CCMultimapIterator m_lastDisplayedNeg
Definition: VP1CaloCellManager.h:91
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
VP1CaloCellManager::updateScene
void updateScene(const VP1Interval &newInterval, bool positive)
Definition: VP1CaloCellManager.cxx:138
VP1CaloCellManager::m_lastDisplayedPos
VP1CCMultimapIterator m_lastDisplayedPos
Definition: VP1CaloCellManager.h:89
VP1CCIntervalPair
QPair< VP1Interval, VP1Interval > VP1CCIntervalPair
Definition: VP1CaloCells.h:115
VP1CaloCellManager::m_node2cc
VP1CC_SoNode2CCMap * m_node2cc
Definition: VP1CaloCellManager.h:72
VP1CC_GlobalCuts
Definition: VP1CaloCells.h:47
VP1CCIntervalMap
QMap< VP1CC_SelectionTypes, VP1CCIntervalPair > VP1CCIntervalMap
Definition: VP1CaloCells.h:119
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
VP1CaloCellManager::m_globalCuts
VP1CC_GlobalCuts m_globalCuts
Definition: VP1CaloCellManager.h:97
VP1CaloCellManager::m_firstDisplayedNeg
VP1CCMultimapIterator m_firstDisplayedNeg
Definition: VP1CaloCellManager.h:90
VP1CaloCells.h
VP1CaloCellManager::m_scale
QPair< bool, double > m_scale
Definition: VP1CaloCellManager.h:78
VP1CaloCell
Definition: VP1CaloCells.h:160
VP1ExtraSepLayerHelper
Definition: VP1ExtraSepLayerHelper.h:22
VP1CaloCellManager::scaleUpdated
void scaleUpdated(const QPair< bool, double > &)
Definition: VP1CaloCellManager.cxx:87
VP1CaloCellManager::globalCutsUpdated
void globalCutsUpdated(const VP1CC_GlobalCuts &)
Definition: VP1CaloCellManager.cxx:119
VP1CaloCellManager::m_outline
bool m_outline
Definition: VP1CaloCellManager.h:81
VP1CaloCellManager::m_useEt
bool m_useEt
Definition: VP1CaloCellManager.h:75
VP1CaloCellManager::~VP1CaloCellManager
~VP1CaloCellManager()
Definition: VP1CaloCellManager.cxx:34
VP1CaloCellManager::clipVolumeRadiusChanged
void clipVolumeRadiusChanged(double radius)
Definition: VP1CaloCellManager.cxx:128
VP1CaloCellManager::m_negativeCells
VP1CCMultimap m_negativeCells
Definition: VP1CaloCellManager.h:85
VP1CaloCellManager::selectionUpdated
void selectionUpdated(const VP1CCIntervalMap &)
Definition: VP1CaloCellManager.cxx:77
ICaloBadChanTool
Definition: ICaloBadChanTool.h:15
VP1CaloCellManager::m_type
VP1CC_SelectionTypes m_type
Definition: VP1CaloCellManager.h:69
VP1CaloCellManager::m_firstDisplayedPos
VP1CCMultimapIterator m_firstDisplayedPos
Definition: VP1CaloCellManager.h:88
VP1CaloCellManager
Definition: VP1CaloCellManager.h:39
VP1CaloCellManager::outlineUpdated
void outlineUpdated(const bool &)
Definition: VP1CaloCellManager.cxx:103
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
VP1Interval
Definition: VP1Interval.h:23
VP1CaloCellManager::m_intervals
VP1CCIntervalPair m_intervals
Definition: VP1CaloCellManager.h:94
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
VP1CCMultimap
std::multimap< double, VP1CaloCell * > VP1CCMultimap
Definition: VP1CaloCellManager.h:16
VP1CaloCellManager::VP1CaloCellManager
VP1CaloCellManager(VP1CC_SelectionTypes type, VP1CC_SoNode2CCMap *node2cc, bool useEt, const QPair< bool, double > &scale, bool outline, const VP1CC_GlobalCuts &globalCuts)
Definition: VP1CaloCellManager.cxx:12
VP1CC_SelectionTypes
VP1CC_SelectionTypes
Definition: VP1CaloCells.h:67
VP1CCMultimapIterator
VP1CCMultimap::iterator VP1CCMultimapIterator
Definition: VP1CaloCellManager.h:36
VP1CCManagerContainer
std::map< VP1CC_SelectionTypes, VP1CaloCellManager *, std::less< VP1CC_SelectionTypes > > VP1CCManagerContainer
Definition: VP1CaloCellManager.h:100
VP1CC_SoNode2CCMap
std::map< SoNode *, VP1CaloCell *, std::less< SoNode * > > VP1CC_SoNode2CCMap
Definition: VP1CaloCells.h:156