Skip to content

Commit ddba9e0

Browse files
shahor02plariono
authored andcommitted
Redefing BasicXYZVHit::mDetectorID from short to ushort
1 parent d137552 commit ddba9e0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

DataFormats/simulation/include/SimulationDataFormat/BaseHits.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class BasicXYZVHit : public BaseHit
5555
BasicXYZVHit() = default; // for ROOT IO
5656

5757
// constructor
58-
BasicXYZVHit(T x, T y, T z, E time, V val, int trackid, short did)
58+
BasicXYZVHit(T x, T y, T z, E time, V val, int trackid, unsigned short did)
5959
: mPos(x, y, z), mTime(time), mHitValue(val), BaseHit(trackid), mDetectorID(did)
6060
{
6161
}
@@ -70,12 +70,12 @@ class BasicXYZVHit : public BaseHit
7070
// getting the time
7171
E GetTime() const { return mTime; }
7272
// get detector + track information
73-
short GetDetectorID() const { return mDetectorID; }
73+
unsigned short GetDetectorID() const { return mDetectorID; }
7474

7575
// modifiers
7676
void SetTime(E time) { mTime = time; }
7777
void SetHitValue(V val) { mHitValue = val; }
78-
void SetDetectorID(short detID) { mDetectorID = detID; }
78+
void SetDetectorID(unsigned short detID) { mDetectorID = detID; }
7979
void SetX(T x) { mPos.SetX(x); }
8080
void SetY(T y) { mPos.SetY(y); }
8181
void SetZ(T z) { mPos.SetZ(z); }
@@ -87,7 +87,7 @@ class BasicXYZVHit : public BaseHit
8787
}
8888
void SetPos(math_utils::Point3D<T> const& p) { mPos = p; }
8989

90-
ClassDefNV(BasicXYZVHit, 1);
90+
ClassDefNV(BasicXYZVHit, 2);
9191
};
9292

9393
// Class for a hit containing energy loss as hit value

Detectors/ITSMFT/common/simulation/src/Digitizer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ void Digitizer::fillOutputContainer(uint32_t frameLast)
272272
void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID, int srcID)
273273
{
274274
// convert single hit to digits
275-
int chipID = hit.GetDetectorID();
275+
auto chipID = hit.GetDetectorID();
276276
auto& chip = mChips[chipID];
277277
if (chip.isDisabled()) {
278278
LOG(debug) << "skip disabled chip " << chipID;

Detectors/Upgrades/ITS3/simulation/src/Digitizer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void Digitizer::fillOutputContainer(uint32_t frameLast)
234234
void Digitizer::processHit(const o2::itsmft::Hit& hit, uint32_t& maxFr, int evID, int srcID)
235235
{
236236
// convert single hit to digits
237-
int chipID = hit.GetDetectorID();
237+
auto chipID = hit.GetDetectorID();
238238
auto& chip = mChips[chipID];
239239
if (chip.isDisabled()) {
240240
return;

0 commit comments

Comments
 (0)