21 #include "G4VPhysicalVolume.hh" 22 #include "G4VTouchable.hh" 29 : _needUpdateUnitID(
false),
30 _needUpdateData(
false),
35 _currentObjectType(Undefined) {
51 const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable();
52 G4VPhysicalVolume* physVol;
54 for (
ii = 0;
ii < touch->GetHistoryDepth();
ii++) {
55 physVol = touch->GetVolume(
ii);
58 LogDebug(
"ForwardSim") <<
"physVol=" << physVol->GetName() <<
", level=" <<
ii 59 <<
", physVol->GetCopyNo()=" << physVol->GetCopyNo();
63 if (dName ==
"TotemT1") {
64 if (physVol->GetCopyNo() == 1)
66 else if (physVol->GetCopyNo() == 2)
71 touch = aStep->GetPreStepPoint()->GetTouchable();
72 physVol = touch->GetVolume(0);
74 currLAOT = physVol->GetCopyNo();
80 if (touch->GetVolume(1)) {
82 if (touch->GetVolume(2))
104 LogDebug(
"ForwardSim") <<
"_currentUnitID=" << currentUnitID;
120 LogDebug(
"ForwardSim") <<
"_currentDetectorPosition=" << currentDetectorPosition;
137 LogDebug(
"ForwardSim") <<
"_currentPlane=" << currentPlane;
153 LogDebug(
"ForwardSim") <<
"_currentCSC=" << currentCSC;
169 LogDebug(
"ForwardSim") <<
"_currentLayer=" << currentLayer;
185 LogDebug(
"ForwardSim") <<
"_currentObjectType=" << currentObjectType;
192 int result(static_cast<int>(objectType));
195 edm::LogVerbatim(
"ForwardSim") <<
"Invalid ObjectType value (" << objectType <<
"). Now is \"Undefined\"";
211 LogDebug(
"ForwardSim") <<
"UnitID update needed.";
216 LogDebug(
"ForwardSim") <<
"UnitID update not needed.";
224 LogDebug(
"ForwardSim") <<
"Data update needed.";
229 LogDebug(
"ForwardSim") <<
"Data update not needed.";
235 int currDP, currCSC, currOT, currPLA;
236 unsigned long currPL, currLA;
250 splitter.Split(currPLA, currPL, currLA);
253 LogDebug(
"ForwardSim") <<
"currDP=" << currDP <<
", currPL=" << currPL <<
", currCSC=" << currCSC
254 <<
", currLA=" << currLA <<
", currOT=" << currOT <<
", currPLA=" << currPLA
283 int currDP, currPL, currCSC, currLA, currOT;
307 <<
"). Now is \"Undefined\"";
316 if (_currentCSC < -1 || _currentCSC > 5) {
337 int currPLA(merger.
Merge(currPL, currLA));
341 LogDebug(
"ForwardSim") <<
"currDP=" << currDP <<
", currPL=" << currPL <<
", currCSC=" << currCSC
342 <<
", currLA=" << currLA <<
", currOT=" << currOT <<
", currPLA=" << currPLA
Log< level::Info, true > LogVerbatim
void setCurrentObjectType(ObjectType currentObjectType)
def splitter(iterator, n)
void _checkDataUpdate(void) const
int getCurrentPlane(void) const
void setCurrentDetectorPosition(int currentDetectorPosition)
void setCurrentLayer(int currentLayer)
void setCurrentUnitID(int currentUnitID)
ObjectType getCurrentObjectType(void) const
constexpr std::array< uint8_t, layerIndexSize > layer
ObjectType _currentObjectType
int _currentDetectorPosition
int getCurrentUnitID(void) const
int getCurrentCSC(void) const
void setCurrentPlane(int currentPlane)
unsigned long Merge(unsigned long value1, unsigned long value2) const
void setCurrentCSC(int currentCSC)
~TotemT1Organization() override
int getCurrentDetectorPosition(void) const
std::string getName(const G4String &)
void _FromDataToUnitID(void)
int fromObjectTypeToInt(ObjectType objectType)
uint32_t getUnitID(const G4Step *aStep) const override
void _FromUnitIDToData(void)
void _checkUnitIDUpdate(void) const
int getCurrentLayer(void) const