Skip to content

Commit e829a3f

Browse files
committed
Update ProcessHits
1 parent af11dc9 commit e829a3f

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

Detectors/Upgrades/ALICE3/TRK/simulation/include/TRKSimulation/Detector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class Detector : public o2::base::DetImpl<Detector>
109109
int getNumberOfLayersVD() const { return mPetalCases[0].mPetalLayers.size(); }
110110
int getNumberOfDisksVD() const { return mPetalCases[0].mPetalDisks.size(); }
111111

112-
void Print(FairVolume* vol, int volume, int subDetID, int layer, int stave, int halfstave, int chipID) const;
112+
void Print(FairVolume* vol, int volume, int subDetID, int layer, int stave, int halfstave, int mod, int chip, int chipID) const;
113113

114114
template <typename Det>
115115
friend class o2::base::DetImpl;

Detectors/Upgrades/ALICE3/TRK/simulation/src/Detector.cxx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -444,15 +444,17 @@ bool Detector::ProcessHits(FairVolume* vol)
444444
TLorentzVector positionStop;
445445
fMC->TrackPosition(positionStop);
446446
// Retrieve the indices with the volume path
447-
int stave(0), halfstave(0);
447+
int stave(0), halfstave(0), mod(0), chip(0);
448448
if (subDetID == 1) {
449-
fMC->CurrentVolOffID(1, halfstave);
450-
fMC->CurrentVolOffID(2, stave);
449+
fMC->CurrentVolOffID(1, chip);
450+
fMC->CurrentVolOffID(2, mod);
451+
fMC->CurrentVolOffID(3, halfstave);
452+
fMC->CurrentVolOffID(4, stave);
451453
} /// if VD, for the moment the volume is the "chipID" so no need to retrieve other elments
452454

453-
int chipID = mGeometryTGeo->getChipIndex(subDetID, volume, layer, stave, halfstave);
455+
int chipID = mGeometryTGeo->getChipIndex(subDetID, volume, layer, stave, halfstave, mod, chip);
454456

455-
Print(vol, volume, subDetID, layer, stave, halfstave, chipID);
457+
Print(vol, volume, subDetID, layer, stave, halfstave, mod, chip, chipID);
456458

457459
Hit* p = addHit(stack->GetCurrentTrackNumber(), chipID, mTrackData.mPositionStart.Vect(), positionStop.Vect(),
458460
mTrackData.mMomentumStart.Vect(), mTrackData.mMomentumStart.E(), positionStop.T(),
@@ -475,17 +477,19 @@ o2::itsmft::Hit* Detector::addHit(int trackID, int detID, const TVector3& startP
475477
return &(mHits->back());
476478
}
477479

478-
void Detector::Print(FairVolume* vol, int volume, int subDetID, int layer, int stave, int halfstave, int chipID) const
480+
void Detector::Print(FairVolume* vol, int volume, int subDetID, int layer, int stave, int halfstave, int mod, int chip, int chipID) const
479481
{
480482
int currentVol(0);
481483
LOG(info) << "Current volume name: " << fMC->CurrentVolName() << " and ID " << fMC->CurrentVolID(currentVol);
482484
LOG(info) << "volume: " << volume << "/" << mNumberOfVolumes - 1;
485+
LOG(info) << "off volume name 1 " << fMC->CurrentVolOffName(1) << " chip: " << chip;
486+
LOG(info) << "off volume name 2 " << fMC->CurrentVolOffName(2) << " module: " << mod;
483487
if (subDetID == 1 && mGeometryTGeo->getNumberOfHalfStaves(layer) == 2) { // staggered geometry
484-
LOG(info) << "off volume name 1 " << fMC->CurrentVolOffName(1) << " halfstave: " << halfstave;
485-
LOG(info) << "off volume name 2 " << fMC->CurrentVolOffName(2) << " stave: " << stave;
488+
LOG(info) << "off volume name 3 " << fMC->CurrentVolOffName(3) << " halfstave: " << halfstave;
489+
LOG(info) << "off volume name 4 " << fMC->CurrentVolOffName(4) << " stave: " << stave;
486490
LOG(info) << "SubDetector ID: " << subDetID << " Layer: " << layer << " staveinLayer: " << stave << " Chip ID: " << chipID;
487491
} else if (subDetID == 1 && mGeometryTGeo->getNumberOfHalfStaves(layer) == 1) { // turbo geometry
488-
LOG(info) << "off volume name 2 " << fMC->CurrentVolOffName(2) << " stave: " << stave;
492+
LOG(info) << "off volume name 2 " << fMC->CurrentVolOffName(3) << " stave: " << stave;
489493
LOG(info) << "SubDetector ID: " << subDetID << " Layer: " << layer << " staveinLayer: " << stave << " Chip ID: " << chipID;
490494
} else {
491495
LOG(info) << "SubDetector ID: " << subDetID << " Chip ID: " << chipID;

0 commit comments

Comments
 (0)