SiHitIdHelper.h 1.4 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/

#ifndef INDETSIMEVENT_SIHITIDHELPER
#define INDETSIMEVENT_SIHITIDHELPER

//
// This is a helper class to build an identifing integer used by 
// the simulation. It inherits from HitIdHelper, in order to get
// 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 
// field dimensions
// Methods are provided to get access to the SiTracker Geometry
// description
//


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


class SiHitIdHelper : HitIdHelper {
 public:
  //
  // Access to the helper
  static SiHitIdHelper* GetHelper();  
  //
  // Info retrieval:
  // Pixel or SCT
  bool isPixel(const int& hid);
  bool isSCT(const int& hid);
  
  // Barrel or Endcap
  int getBarrelEndcap(const int& hid);

  // Layer/Disk
  int getLayerDisk(const int& hid);
  
  // eta module
  int getEtaModule(const int& hid);

  // phi module&
  int getPhiModule(const int& hid);
  
  // side
  int getSide(const int& hid);
  //
  // Info packing:
  int buildHitId(const int, const int, const int, const int, const int, const int);

 private:
  //
  // private constructor to have a singleton
  SiHitIdHelper(); 
  //
  // Initialize the helper, only called by the constructor
  void Initialize();  
};

#endif // INDETSIMEVENT_SIHITIDHELPER