CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/SimG4CMS/Forward/interface/CastorNumberingScheme.h

Go to the documentation of this file.
00001 #ifndef Forward_CastorNumberingScheme_h
00002 #define Forward_CastorNumberingScheme_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Forward
00006 // Class  :     CastorNumberingScheme
00007 //
00016 //
00017 // Original Author: 
00018 //         Created:  Tue May 16 10:14:34 CEST 2006
00019 // $Id: CastorNumberingScheme.h,v 1.5 2009/09/02 20:41:25 sunanda Exp $
00020 //
00021  
00022 // system include files
00023 
00024 // user include files
00025 
00026 
00027 #include "G4Step.hh"
00028 #include "G4LogicalVolume.hh"
00029 #include <boost/cstdint.hpp>
00030 
00031 class CastorNumberingScheme {
00032 
00033 public:
00034 
00035   CastorNumberingScheme();
00036   virtual ~CastorNumberingScheme();
00037 
00038   virtual uint32_t getUnitID(const G4Step* aStep) const;
00039 
00049   //  static uint32_t packIndex(int det, int z, int sector, int zmodule);
00050   //  static void   unpackIndex(const uint32_t& idx, int& det, int& z, int& sector, int& zmodule);
00051 
00052 
00053   static uint32_t packIndex(int z, int sector, int zmodule);
00054   static void   unpackIndex(const uint32_t& idx, int& z, int& sector, int& zmodule);
00055 
00056 private:
00057 
00058   typedef G4LogicalVolume* lvp;
00059 
00060   // Utilities to get detector levels during a step
00061   void detectorLevel(const G4Step*, int&, int*, lvp*) const;
00062 
00063   lvp lvCAST, lvCAES, lvCEDS, lvCAHS, lvCHDS, lvCAER, lvCEDR;
00064   lvp lvCAHR, lvCHDR, lvC3EF, lvC3HF, lvC4EF, lvC4HF;
00065 
00066 };
00067 
00068 #endif