SiHitIdHelper.h 1.57 KB
Newer Older
1
/*
2
  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
4
5
6
7
8
*/

#ifndef INDETSIMEVENT_SIHITIDHELPER
#define INDETSIMEVENT_SIHITIDHELPER

//
9
// This is a helper class to build an identifing integer used by
10
// the simulation. It inherits from HitIdHelper, in order to get
11
12
13
// all the packing and shifting for free.
// The class is a singleton and a static GetHelper() is provided
// the constructor calls the Initialize() method which sets all the
14
15
16
17
18
19
20
21
22
23
// field dimensions
// Methods are provided to get access to the SiTracker Geometry
// description
//


//
// Base Class
#include "HitManagement/HitIdHelper.h"

24
25
26
// This class is singleton and static method and variable are used.
#include "CxxUtils/checker_macros.h"
ATLAS_NO_CHECK_FILE_THREAD_SAFETY;
27
28
29
30
31

class SiHitIdHelper : HitIdHelper {
 public:
  //
  // Access to the helper
32
  static SiHitIdHelper* GetHelper();
33
34
35
  //
  // Info retrieval:
  // Pixel or SCT
36
37
38
  bool isPixel(const int& hid) const;
  bool isSCT(const int& hid) const;

39
  // Barrel or Endcap
40
  int getBarrelEndcap(const int& hid) const;
41
42

  // Layer/Disk
43
44
  int getLayerDisk(const int& hid) const;

45
  // eta module
46
  int getEtaModule(const int& hid) const;
47
48

  // phi module&
49
50
  int getPhiModule(const int& hid) const;

51
  // side
52
  int getSide(const int& hid) const;
53
54
  //
  // Info packing:
55
  int buildHitId(const int, const int, const int, const int, const int, const int) const;
56
57
58
59

 private:
  //
  // private constructor to have a singleton
60
  SiHitIdHelper();
61
62
  //
  // Initialize the helper, only called by the constructor
63
  void Initialize();
64
65
66
};

#endif // INDETSIMEVENT_SIHITIDHELPER