CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/SimG4CMS/Forward/interface/TotemT1Organization.h

Go to the documentation of this file.
00001 #ifndef Forward_TotemT1Organization_h
00002 #define Forward_TotemT1Organization_h 1
00003 // -*- C++ -*-
00004 //
00005 // Package:     Forward
00006 // Class  :     TotemT1Organization
00007 //
00017 //
00018 // Original Author:  R. Capra
00019 //         Created:  Tue May 16 10:14:34 CEST 2006
00020 // $Id: TotemT1Organization.h,v 1.1 2006/05/17 16:18:57 sunanda Exp $
00021 //
00022  
00023 // system include files
00024 
00025 // user include files
00026 
00027 #include "SimG4CMS/Forward/interface/TotemVDetectorOrganization.h"
00028 #include "globals.hh"
00029 
00030 class TotemT1Organization : public TotemVDetectorOrganization {
00031 
00032 public: 
00033   
00034   // ---------- public enums -------------------------------
00035 
00036   enum ObjectType  {
00037    Undefined=0,
00038    Upper=1,
00039    Lower=2,
00040    InternalUpper=3,
00041    InternalLower=4,
00042    Frame1=5,
00043    Frame2Left=6,
00044    Frame2Right=7,
00045    Frame3Left=8,
00046    Frame3Right=9,
00047    Frame4Left=10,
00048    Frame4Right=11,
00049    Frame5=12,
00050    Triangle6Left=13,
00051    Triangle6Right=14,
00052    MaxObjectTypes=15
00053   };
00054 
00055 public:
00056 
00057   // ---------- Constructor and destructor -----------------
00058   TotemT1Organization();
00059   virtual          ~TotemT1Organization();
00060 
00061   // ---------- member functions ---------------------------
00062   uint32_t         GetUnitID(const G4Step* aStep);
00063   uint32_t         GetUnitID(const G4Step* aStep) const;
00064   
00065   int              GetCurrentUnitID(void) const;
00066   void             SetCurrentUnitID(int currentUnitID);
00067 
00068   // ---------- Detector position --------------------------
00069 
00070   int              GetCurrentDetectorPosition(void) const;
00071   void             SetCurrentDetectorPosition(int currentDetectorPosition);
00072 
00073   // ---------- Plane: between 0 and (nPlanes-1) (or -1 for Undefined)
00074   int              GetCurrentPlane(void) const;
00075   void             SetCurrentPlane(int currentPlane);
00076 
00077   // ---------- CSC: between 0 and 5 (or -1 for Undefined)
00078   int              GetCurrentCSC(void) const;
00079   void             SetCurrentCSC(int currentCSC);
00080 
00081   // ---------- Layer: between 0 and (nLayers-1) (or -1 for Undefined)
00082   int              GetCurrentLayer(void) const;
00083   void             SetCurrentLayer(int currentLayer);
00084 
00085   // ---------- Object Type --------------------------------
00086 
00087   ObjectType       GetCurrentObjectType(void) const;
00088   inline void      SetCurrentObjectType(ObjectType currentObjectType);
00089 
00090   int              FromObjectTypeToInt(ObjectType objectType);
00091   int              FromObjectTypeToInt(ObjectType objectType, int layer);
00092 
00093 private:
00094   // ---------- Private methods ----------------------------
00095   void             _checkUnitIDUpdate(void) const;
00096   void             _checkDataUpdate(void) const;
00097 
00098   void             _FromUnitIDToData(void);
00099   void             _FromDataToUnitID(void);
00100 
00101 
00102 private:
00103   // ---------- Private data members -----------------------
00104   bool             _needUpdateUnitID;
00105   bool             _needUpdateData;
00106   int              _currentUnitID;
00107   int              _currentDetectorPosition ;
00108   int              _currentPlane;
00109   int              _currentCSC;
00110   int              _currentLayer;
00111   ObjectType       _currentObjectType;
00112 
00113 };
00114 #endif