CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalRingCalibrationTools.h
Go to the documentation of this file.
1 #ifndef EcalRingCalibrationTools_h
2 #define EcalRingCalibrationTools_h
3 
4 /****************************************
5  *
6  * 25/09/2007 P. Meridiani (CERN)
7  * Description:
8  * Tools to ease the hanling of indices
9  * for ECAL ring intercalibration
10  *
11  ***************************************/
12 
13 #include <vector>
14 #include <mutex>
15 #include <atomic>
19 
20 class DetId;
21 class CaloGeometry;
22 
24 public:
27 
29  static short getRingIndex(DetId aDetId);
30 
31  static short getModuleIndex(DetId aDetId);
32 
34  static std::vector<DetId> getDetIdsInRing(short aRingIndex);
35  static std::vector<DetId> getDetIdsInModule(short int);
36  static std::vector<DetId> getDetIdsInECAL();
37 
38  static constexpr short N_RING_TOTAL = 248;
39  static constexpr short N_RING_BARREL = 170;
40  static constexpr short N_RING_ENDCAP = 78;
41 
42  static constexpr short N_MODULES_BARREL = 144;
43 
44  static void setCaloGeometry(const CaloGeometry* geometry);
45 
46 private:
47  static void initializeFromGeometry(CaloGeometry const* geometry); // needed only for the endcap
48 
49  static std::atomic<bool> isInitializedFromGeometry_;
50 
52  static short endcapRingIndex_[EEDetId::IX_MAX][EEDetId::IY_MAX]; // array needed only for the endcaps
53 
54  static std::once_flag once_;
55 };
56 #endif
static short endcapRingIndex_[EEDetId::IX_MAX][EEDetId::IY_MAX]
static short getModuleIndex(DetId aDetId)
static void setCaloGeometry(const CaloGeometry *geometry)
static std::atomic< bool > isInitializedFromGeometry_
static constexpr short N_MODULES_BARREL
static constexpr short N_RING_ENDCAP
static void initializeFromGeometry(CaloGeometry const *geometry)
static short getRingIndex(DetId aDetId)
Retrieve the phi-ring index corresponding to a DetId.
static std::vector< DetId > getDetIdsInRing(short aRingIndex)
Retrieve the DetIds in a phi-ring.
static constexpr short N_RING_BARREL
#define CMS_THREAD_GUARD(_var_)
static std::vector< DetId > getDetIdsInModule(short int)
Definition: DetId.h:17
static constexpr short N_RING_TOTAL
static std::vector< DetId > getDetIdsInECAL()