CMS 3D CMS Logo

CastorNumberingScheme.h
Go to the documentation of this file.
1 #ifndef Forward_CastorNumberingScheme_h
2 #define Forward_CastorNumberingScheme_h
3 // -*- C++ -*-
4 //
5 // Package: Forward
6 // Class : CastorNumberingScheme
7 //
16 //
17 // Original Author:
18 // Created: Tue May 16 10:14:34 CEST 2006
19 // $Id: CastorNumberingScheme.h,v 1.5 2009/09/02 20:41:25 sunanda Exp $
20 //
21 
22 // system include files
23 
24 // user include files
25 
26 
27 #include "G4Step.hh"
28 #include "G4LogicalVolume.hh"
29 #include <cstdint>
30 
32 
33 public:
34 
36  virtual ~CastorNumberingScheme();
37 
38  virtual uint32_t getUnitID(const G4Step* aStep) const;
39 
49  // static uint32_t packIndex(int det, int z, int sector, int zmodule);
50  // static void unpackIndex(const uint32_t& idx, int& det, int& z, int& sector, int& zmodule);
51 
52  static uint32_t packIndex(int z, int sector, int zmodule);
53  static void unpackIndex(const uint32_t& idx, int& z, int& sector, int& zmodule);
54 
55 private:
56 
57  typedef G4LogicalVolume* lvp;
58 
59  // Utilities to get detector levels during a step
60  void detectorLevel(const G4Step*, int&, int*, lvp*) const;
61 
64 
65 };
66 
67 #endif
static void unpackIndex(const uint32_t &idx, int &z, int &sector, int &zmodule)
void detectorLevel(const G4Step *, int &, int *, lvp *) const
virtual uint32_t getUnitID(const G4Step *aStep) const
static uint32_t packIndex(int z, int sector, int zmodule)