File indexing completed on 2024-04-06 12:29:59
0001 #ifndef Forward_TotemT1Organization_h
0002 #define Forward_TotemT1Organization_h 1
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #include "SimG4CMS/Forward/interface/TotemVDetectorOrganization.h"
0027
0028 class TotemT1Organization : public TotemVDetectorOrganization {
0029 public:
0030
0031
0032 enum ObjectType {
0033 Undefined = 0,
0034 Upper = 1,
0035 Lower = 2,
0036 InternalUpper = 3,
0037 InternalLower = 4,
0038 Frame1 = 5,
0039 Frame2Left = 6,
0040 Frame2Right = 7,
0041 Frame3Left = 8,
0042 Frame3Right = 9,
0043 Frame4Left = 10,
0044 Frame4Right = 11,
0045 Frame5 = 12,
0046 Triangle6Left = 13,
0047 Triangle6Right = 14,
0048 MaxObjectTypes = 15
0049 };
0050
0051 public:
0052
0053 TotemT1Organization();
0054 ~TotemT1Organization() override;
0055
0056
0057 uint32_t getUnitID(const G4Step* aStep) const override;
0058
0059 int getCurrentUnitID(void) const;
0060 void setCurrentUnitID(int currentUnitID);
0061
0062
0063
0064 int getCurrentDetectorPosition(void) const;
0065 void setCurrentDetectorPosition(int currentDetectorPosition);
0066
0067
0068 int getCurrentPlane(void) const;
0069 void setCurrentPlane(int currentPlane);
0070
0071
0072 int getCurrentCSC(void) const;
0073 void setCurrentCSC(int currentCSC);
0074
0075
0076 int getCurrentLayer(void) const;
0077 void setCurrentLayer(int currentLayer);
0078
0079
0080
0081 ObjectType getCurrentObjectType(void) const;
0082 void setCurrentObjectType(ObjectType currentObjectType);
0083
0084 int fromObjectTypeToInt(ObjectType objectType);
0085 int fromObjectTypeToInt(ObjectType objectType, int layer);
0086
0087
0088
0089 private:
0090 uint32_t getUnitID(const G4Step* aStep);
0091
0092 void _checkUnitIDUpdate(void) const;
0093 void _checkDataUpdate(void) const;
0094
0095 void _FromUnitIDToData(void);
0096 void _FromDataToUnitID(void);
0097
0098
0099 bool _needUpdateUnitID;
0100 bool _needUpdateData;
0101 int _currentUnitID;
0102 int _currentDetectorPosition;
0103 int _currentPlane;
0104 int _currentCSC;
0105 int _currentLayer;
0106 ObjectType _currentObjectType;
0107 };
0108 #endif