Class Reference for E1039 Core & Analysis Software
PHG4CellDefs.h
Go to the documentation of this file.
1 #ifndef PHG4CELLDEFS_H
2 #define PHG4CELLDEFS_H
3 
4 namespace PHG4CellDefs
5 {
6 
7  typedef unsigned long long keytype;
8 
9  // CINT does not know the __attribute__((unused))
10 #ifndef __CINT__
11  // key layout
12  // bit
13  // 48-64 detector id (scintillator slat id, layer,...)
14  // 32-48 binning method
15  //
16  // 16-32 binning dependant 1st key
17  // 0-16 binning dependant 2nd key
18 
19  /* static unsigned int layer_bits = 16; */
20  /* static unsigned int keybits = 16; */
21  // __attribute__((unused)) prevents warnings about unused variables
22  // common upper 32 bits
23  static unsigned int bitshift_layer __attribute__((unused)) = 64 - 16;
24  static unsigned int bitshift_binning __attribute__((unused)) = bitshift_layer - 16;
25  // binning dependeant bit shifts for lower 32 bits
26  static unsigned int bitshift_upperkey __attribute__((unused)) = 16;
27  static unsigned int bitshift_row __attribute__((unused)) = 16;
28  static unsigned int bitshift_phi __attribute__((unused)) = 16;
29 #endif
30 
34  short int get_detid(const PHG4CellDefs::keytype key);
35 
36  namespace SizeBinning
37  {
38  keytype genkey(const unsigned short layer, const unsigned short zbin, const unsigned short iphibin);
39  unsigned short int get_zbin(const PHG4CellDefs::keytype key);
40  unsigned short int get_phibin(const PHG4CellDefs::keytype key);
41  };
42 
43  namespace EtaPhiBinning
44  {
45  keytype genkey(const unsigned short layer, const unsigned short etabin, const unsigned short phibin);
46  unsigned short int get_etabin(const PHG4CellDefs::keytype key);
47  unsigned short int get_phibin(const PHG4CellDefs::keytype key);
48  };
49 
50  namespace SpacalBinning
51  {
52  keytype genkey(const unsigned short etabin, const unsigned short phibin, const unsigned short fiberid);
53  unsigned short get_etabin(PHG4CellDefs::keytype key);
54  unsigned short get_phibin(PHG4CellDefs::keytype key);
55  unsigned short get_fiberid(PHG4CellDefs::keytype key);
56  };
57 
58  namespace ScintillatorSlatBinning
59  {
60  keytype genkey(const unsigned short layer, const unsigned short irow, const unsigned short icolumn);
61  unsigned short int get_row(PHG4CellDefs::keytype key);
62  unsigned short int get_column(PHG4CellDefs::keytype key);
63  };
64 
65  namespace EtaXsizeBinning
66  {
67  keytype genkey(const unsigned short layer, const unsigned short etabin, const unsigned short xbin);
68  unsigned short int get_etabin(const PHG4CellDefs::keytype key);
69  unsigned short int get_xsizebin(const PHG4CellDefs::keytype key);
70  };
71 
72  namespace MapsBinning
73  {
74  keytype genkey(const unsigned short layer, const unsigned int bit32_index);
75  };
76 
77  namespace TPCBinning
78  {
79  keytype genkey(const unsigned short lyr, const unsigned short mod, const unsigned short pad);
80  };
81 
82 
83 }
84 
85 #endif
keytype genkey(const unsigned short layer, const unsigned short etabin, const unsigned short phibin)
Definition: PHG4CellDefs.cc:43
unsigned short int get_phibin(const PHG4CellDefs::keytype key)
Definition: PHG4CellDefs.cc:57
unsigned short int get_etabin(const PHG4CellDefs::keytype key)
Definition: PHG4CellDefs.cc:50
keytype genkey(const unsigned short layer, const unsigned short etabin, const unsigned short xbin)
unsigned short int get_xsizebin(const PHG4CellDefs::keytype key)
unsigned short int get_etabin(const PHG4CellDefs::keytype key)
keytype genkey(const unsigned short layer, const unsigned int bit32_index)
unsigned short int get_column(PHG4CellDefs::keytype key)
keytype genkey(const unsigned short layer, const unsigned short irow, const unsigned short icolumn)
Definition: PHG4CellDefs.cc:94
unsigned short int get_row(PHG4CellDefs::keytype key)
unsigned short int get_zbin(const PHG4CellDefs::keytype key)
Definition: PHG4CellDefs.cc:36
unsigned short int get_phibin(const PHG4CellDefs::keytype key)
Definition: PHG4CellDefs.cc:29
keytype genkey(const unsigned short layer, const unsigned short zbin, const unsigned short iphibin)
Definition: PHG4CellDefs.cc:22
keytype genkey(const unsigned short etabin, const unsigned short phibin, const unsigned short fiberid)
Definition: PHG4CellDefs.cc:64
unsigned short get_phibin(PHG4CellDefs::keytype key)
Definition: PHG4CellDefs.cc:79
unsigned short get_etabin(PHG4CellDefs::keytype key)
Definition: PHG4CellDefs.cc:71
unsigned short get_fiberid(PHG4CellDefs::keytype key)
Definition: PHG4CellDefs.cc:86
keytype genkey(const unsigned short lyr, const unsigned short mod, const unsigned short pad)
unsigned long long keytype
Definition: PHG4CellDefs.h:7
short int get_detid(const PHG4CellDefs::keytype key)
static unsigned int bitshift_layer __attribute__((unused))
short get_binning(PHG4CellDefs::keytype key)
bool has_binning(PHG4CellDefs::keytype key, PHG4CellDefs::CellBinning binning)
@ scintillatorslatbinning
Definition: PHG4CellDefs.h:31