Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
e95f4f3
WIP: clusterizer workflow
gvolpe79 Aug 8, 2019
207a859
Preliminary HMPID cluster implementation
gvolpe79 Aug 30, 2019
857d150
First data decoder workflow implementation
Jan 7, 2021
92f0f83
Add Decoder Class
Jan 8, 2021
26de612
Merge remote-tracking branch 'upstream/dev' into gvolpe/initialclustr…
Jan 8, 2021
7a638cc
Prima versione
Jan 18, 2021
f2d7414
MORE WORKFLOWS
Jan 18, 2021
289e616
Version 0
Jan 19, 2021
c3205e5
V.0
Jan 21, 2021
5b7b868
Add out_stream operator to DIgit
Jan 21, 2021
06aa83b
change spec
Jan 24, 2021
201da6c
StfBuilder ... II attempt
Jan 25, 2021
bf980e2
1
Jan 25, 2021
4d87168
2
Jan 25, 2021
8333a49
3
Jan 25, 2021
8ca4e55
4
Jan 25, 2021
f44a4ba
5
Jan 25, 2021
cd5bc92
6
Jan 25, 2021
17a41d0
Fix the Equipment decodinf from FEE-ID field
Jan 25, 2021
0e4859a
1
Jan 25, 2021
ec4ebf3
2
Jan 25, 2021
28d08ac
4
Jan 25, 2021
287488a
6
Jan 25, 2021
d9dacd3
7
Jan 25, 2021
00f4228
7
Jan 25, 2021
3198d69
8
Jan 25, 2021
2722216
8
Jan 25, 2021
22fbb83
9
Jan 25, 2021
4aef686
12
Jan 25, 2021
90fdb65
fix
Jan 25, 2021
faa8d49
1
Jan 25, 2021
3f102d3
2
Jan 25, 2021
722b350
2
Jan 25, 2021
5958ffd
3
Jan 25, 2021
cef886d
3
Jan 25, 2021
ac9f36d
4
Jan 25, 2021
aabafe4
1
Jan 25, 2021
8b397dc
fix
Jan 25, 2021
ed0e5f7
try to recover TTree
Jan 25, 2021
400c28e
1
Jan 25, 2021
26c76c1
4
Jan 25, 2021
f02c176
4
Jan 25, 2021
8b925ae
3
Jan 25, 2021
36db82f
5
Jan 25, 2021
191f6e5
5
Jan 25, 2021
3f82942
1
Jan 25, 2021
87800eb
5
Jan 25, 2021
aa309f2
1
Jan 25, 2021
bd16ee7
2
Jan 25, 2021
4e875d0
2
Jan 25, 2021
4d0b986
2
Jan 25, 2021
a559202
3
Jan 25, 2021
e5ac87b
1
Jan 25, 2021
c64d1bd
XX
Jan 25, 2021
23330c0
Work
Jan 25, 2021
c26a6fc
Out Digit per Page
Jan 25, 2021
b7ad62e
try
Jan 25, 2021
669b94e
This version works, but react to the first chumk !
Jan 25, 2021
ab9c4d7
New output skema
Jan 26, 2021
a02ed12
only size ..
Jan 26, 2021
2cad9e2
try
Jan 26, 2021
90ffb41
W1
Jan 26, 2021
e008884
fix
Jan 26, 2021
fca999d
fix
Jan 26, 2021
aa60165
first
Jan 26, 2021
37fe2e3
fix cmakes
Jan 26, 2021
02cf14c
fix
Jan 26, 2021
5589f01
fix
Jan 26, 2021
551686a
fix
Jan 26, 2021
1e43e43
fix
Jan 26, 2021
0bd3cae
Build Ok
Jan 26, 2021
93b0cf5
Troubles ....
Jan 28, 2021
75d498a
fix
Jan 28, 2021
a2f1b4f
Compile OK, not yet correct the coordinate translation
Jan 29, 2021
080066b
This works fine ... But only one event from file
Jan 29, 2021
f4e596a
Version 0.1
Jan 29, 2021
690a9d1
Version 0.2 - Works on Centos !
Jan 30, 2021
5b61d59
try to open Root File
Jan 30, 2021
386f3ab
try write ttree
Jan 30, 2021
875f148
fix
Jan 30, 2021
396e64b
fix
Jan 30, 2021
344a24f
fix
Jan 30, 2021
645a282
fix
Jan 30, 2021
085ccfe
Works with streming.
Feb 4, 2021
037c877
Some fix
Feb 4, 2021
29b69d8
Version 0 - Compiled and tested.
Feb 4, 2021
741e2d0
V0.1 - Compiled and Tested
Feb 4, 2021
9dcab2d
V 1.
Feb 5, 2021
aefe665
Try
Feb 5, 2021
87b9d08
Fix the erase digit vector bug
Feb 8, 2021
a1dcaff
WIP: clusterizer workflow
gvolpe79 Aug 8, 2019
a253aa3
Preliminary HMPID cluster implementation
gvolpe79 Aug 30, 2019
c9c0ce4
First data decoder workflow implementation
Jan 7, 2021
073384f
Add Decoder Class
Jan 8, 2021
acf6ceb
Prima versione
Jan 18, 2021
e42cae1
MORE WORKFLOWS
Jan 18, 2021
e591229
Version 0
Jan 19, 2021
4869002
V.0
Jan 21, 2021
7fbc7f2
Add out_stream operator to DIgit
Jan 21, 2021
49ca9b5
change spec
Jan 24, 2021
5d7808b
StfBuilder ... II attempt
Jan 25, 2021
b84ed9d
1
Jan 25, 2021
ca24daa
2
Jan 25, 2021
0be9c02
3
Jan 25, 2021
81e689e
4
Jan 25, 2021
0f62621
5
Jan 25, 2021
65149bb
6
Jan 25, 2021
7fc9f34
Fix the Equipment decodinf from FEE-ID field
Jan 25, 2021
01d9982
1
Jan 25, 2021
7bc4d39
2
Jan 25, 2021
6f83582
4
Jan 25, 2021
4527729
6
Jan 25, 2021
4e30952
7
Jan 25, 2021
867e77d
7
Jan 25, 2021
4037b38
8
Jan 25, 2021
21e469a
8
Jan 25, 2021
3acfa61
9
Jan 25, 2021
db761d2
12
Jan 25, 2021
846a819
fix
Jan 25, 2021
36cee85
1
Jan 25, 2021
6bb0934
2
Jan 25, 2021
dbc53b9
2
Jan 25, 2021
a5e2ddc
3
Jan 25, 2021
19545dc
3
Jan 25, 2021
06b4075
4
Jan 25, 2021
97d70ed
1
Jan 25, 2021
e3ac5cf
fix
Jan 25, 2021
0df3215
try to recover TTree
Jan 25, 2021
bd018fe
1
Jan 25, 2021
08063c9
4
Jan 25, 2021
71f06dd
4
Jan 25, 2021
4003d73
3
Jan 25, 2021
d9e9467
5
Jan 25, 2021
2c93f68
5
Jan 25, 2021
1d5f088
1
Jan 25, 2021
3db7b17
5
Jan 25, 2021
7732032
1
Jan 25, 2021
05c4b36
2
Jan 25, 2021
1559cbd
2
Jan 25, 2021
4705f47
2
Jan 25, 2021
678b30b
3
Jan 25, 2021
77ef506
1
Jan 25, 2021
bdfa646
XX
Jan 25, 2021
212efb6
Work
Jan 25, 2021
ff22e9a
Out Digit per Page
Jan 25, 2021
08c32fa
try
Jan 25, 2021
d6f30b4
This version works, but react to the first chumk !
Jan 25, 2021
c24417a
New output skema
Jan 26, 2021
79ea8fe
only size ..
Jan 26, 2021
4e94d28
try
Jan 26, 2021
827165a
W1
Jan 26, 2021
9e8e962
fix
Jan 26, 2021
b67f22c
fix
Jan 26, 2021
f4892f2
first
Jan 26, 2021
5daf2f3
fix cmakes
Jan 26, 2021
2c7e840
fix
Jan 26, 2021
d75571f
fix
Jan 26, 2021
f28c273
fix
Jan 26, 2021
895c2cf
fix
Jan 26, 2021
257ba0a
Build Ok
Jan 26, 2021
0f7acfd
Troubles ....
Jan 28, 2021
5eafb2b
fix
Jan 28, 2021
a3338c5
Compile OK, not yet correct the coordinate translation
Jan 29, 2021
ef8fe43
This works fine ... But only one event from file
Jan 29, 2021
ea15241
Version 0.1
Jan 29, 2021
455cbdb
Version 0.2 - Works on Centos !
Jan 30, 2021
cbd14db
try to open Root File
Jan 30, 2021
806fbec
try write ttree
Jan 30, 2021
03335e6
fix
Jan 30, 2021
6b8d6fe
fix
Jan 30, 2021
e2055db
fix
Jan 30, 2021
0cb23dc
fix
Jan 30, 2021
6f23bfa
Works with streming.
Feb 4, 2021
86f188c
Some fix
Feb 4, 2021
b91051b
Version 0 - Compiled and tested.
Feb 4, 2021
e9c5905
V0.1 - Compiled and Tested
Feb 4, 2021
2761fc4
V 1.
Feb 5, 2021
4b3d348
Try
Feb 5, 2021
04378e4
Fix the erase digit vector bug
Feb 8, 2021
c3a5c42
Merge branch 'RawFileWriter' of https://github.com/gvolpe79/AliceO2 i…
Feb 8, 2021
c21b7ee
Fix the Digit time in the Digitizer Class
Feb 8, 2021
7cc09c8
Fix
Feb 9, 2021
91123c4
Ver.0.2 Runs
Feb 9, 2021
d6134af
Integrate the Pedestals calculation
Feb 10, 2021
3dcc68e
Fix 1
Feb 10, 2021
1dbfe2d
Compiled
Feb 10, 2021
c06ca0e
Add the CCDB store of pedestals
Feb 10, 2021
f12d9c1
v.0.2 - Fix the Pedestal File format in the CCDB
Feb 11, 2021
8301ece
v.0.3 - Change the pedestals/sigma format in CCDB
Feb 12, 2021
7183897
fix
Feb 12, 2021
39cd8aa
Fix clang format
Feb 15, 2021
6b1be22
Fix clang-format 2
Feb 15, 2021
afe4867
Add Remarks in Base Classes
Feb 15, 2021
fea8378
Add some remarks
Feb 15, 2021
9043117
Fix the return type of Digit::IntPartMathiX() method
Feb 18, 2021
40d0bec
Fix Root Data Types
Feb 19, 2021
93af8dc
Fix for compilaton on CentOs 7
fapfap69 Feb 21, 2021
ae31f90
Fix the Clang errors
Feb 22, 2021
601689f
Fix the git-Clang errors
Feb 23, 2021
873d969
Fix Coding Convention Errors
Feb 24, 2021
c80a9ad
Fix coding - Wed 24 Feb 2021, 15:21:40 UTC
Feb 24, 2021
c7dcb0d
Add the Write Raw from Root Digits
Mar 1, 2021
12a5d2c
Version 0.4 - Simulation workflow complete
Mar 3, 2021
fdb3ac9
Stage changes
Mar 3, 2021
d65c80e
Fix not staged
Mar 3, 2021
42a83a6
Merge
Mar 3, 2021
35991f2
Fix all merge wit Dev diff
Mar 3, 2021
57c5546
Merge branch 'dev' into RawFileWriter
fapfap69 Mar 4, 2021
102cb8f
Fix - clang
fapfap69 Mar 4, 2021
c7cf862
Clang-format apply
fapfap69 Mar 4, 2021
283bbca
Clang fix
fapfap69 Mar 4, 2021
aa17112
Last commit - close branch
fapfap69 Mar 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Detectors/HMPID/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ o2_add_library(HMPIDBase
o2_target_root_dictionary(HMPIDBase
HEADERS include/HMPIDBase/Param.h
include/HMPIDBase/Digit.h
include/HMPIDBase/Trigger.h
include/HMPIDBase/Cluster.h
include/HMPIDBase/Geo.h)
16 changes: 11 additions & 5 deletions Detectors/HMPID/base/include/HMPIDBase/Digit.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Digit
static void Equipment2Absolute(int Equi, int Colu, int Dilo, int Chan, int* Module, int* x, int* y);

// Trigger time Conversion Functions
static inline uint64_t OrbitBcToEventId(uint32_t Orbit, uint16_t BC) { return ((Orbit << 12) || BC); };
static inline uint64_t OrbitBcToEventId(uint32_t Orbit, uint16_t BC) { return ((Orbit << 12) | (0x0FFF & BC)); };
static inline uint32_t EventIdToOrbit(uint64_t EventId) { return (EventId >> 12); };
static inline uint16_t EventIdToBc(uint64_t EventId) { return (EventId & 0x0FFF); };
static double OrbitBcToTimeNs(uint32_t Orbit, uint16_t BC);
Expand Down Expand Up @@ -80,10 +80,10 @@ class Digit

public:
Digit() = default;
Digit(uint16_t bc, uint32_t orbit, int pad, uint16_t charge) : mBc(bc), mOrbit(orbit), mQ(charge), mPad(pad){};
Digit(uint16_t bc, uint32_t orbit, int pad, uint16_t charge);
Digit(uint16_t bc, uint32_t orbit, int chamber, int photo, int x, int y, uint16_t charge);
Digit(uint16_t bc, uint32_t orbit, uint16_t, int equipment, int column, int dilogic, int channel);
Digit(uint16_t bc, uint32_t orbit, uint16_t, int module, int x, int y);
Digit(uint16_t bc, uint32_t orbit, uint16_t charge, int equipment, int column, int dilogic, int channel);
Digit(uint16_t bc, uint32_t orbit, uint16_t charge, int module, int x, int y);

// Getter & Setters
uint16_t getCharge() const { return mQ; }
Expand Down Expand Up @@ -133,7 +133,13 @@ class Digit
// Charge management functions
static void getPadAndTotalCharge(HitType const& hit, int& chamber, int& pc, int& px, int& py, float& totalcharge);
static float getFractionalContributionForPad(HitType const& hit, int somepad);
void addCharge(float q) { mQ += q; }
void addCharge(float q)
{
mQ += q;
if (mQ > 0x0FFF) {
mQ = 0x0FFF;
}
}
void subCharge(float q) { mQ -= q; }

private:
Expand Down
85 changes: 84 additions & 1 deletion Detectors/HMPID/base/include/HMPIDBase/Geo.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define ALICEO2_HMPID_GEO_H

#include <TMath.h>
#include <Rtypes.h>

namespace o2
{
Expand Down Expand Up @@ -134,6 +133,90 @@ class Geo

ClassDefNV(Geo, 1);
};

class ReadOut
{
public:
struct LinkAddr {
uint8_t Fee;
uint8_t Cru;
uint8_t Lnk;
uint8_t Flp;
};
union Lnk {
LinkAddr Id;
uint32_t LinkUId;
};
static constexpr Lnk mEq[Geo::MAXEQUIPMENTS] = {{0, 0, 0, 160},
{1, 0, 1, 160},
{2, 0, 2, 160},
{3, 0, 3, 160},
{4, 1, 0, 160},
{5, 1, 1, 160},
{8, 1, 2, 160},
{9, 1, 3, 160},
{6, 2, 0, 161},
{7, 2, 1, 161},
{10, 2, 2, 161},
{11, 3, 0, 161},
{12, 3, 1, 161},
{13, 3, 2, 161}};

static inline int FeeId(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? -1 : mEq[idx].Id.Fee; };
static inline int CruId(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? -1 : mEq[idx].Id.Cru; };
static inline int LnkId(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? -1 : mEq[idx].Id.Lnk; };
static inline int FlpId(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? -1 : mEq[idx].Id.Flp; };
static inline uint32_t UniqueId(unsigned int idx) { return (idx > Geo::MAXEQUIPMENTS) ? -1 : mEq[idx].LinkUId; };

static unsigned int searchIdx(int FeeId)
{
for (int i = 0; i < Geo::MAXEQUIPMENTS; i++) {
if (FeeId == mEq[i].Id.Fee) {
return (i);
}
}
return (-1);
}
static unsigned int searchIdx(int CruId, int LnkId)
{
for (int i = 0; i < Geo::MAXEQUIPMENTS; i++) {
if (CruId == mEq[i].Id.Cru && LnkId == mEq[i].Id.Lnk) {
return (i);
}
}
return (-1);
}
static void getInfo(unsigned int idx, int& Fee, int& Cru, int& Lnk, int& Flp)
{
Cru = mEq[idx].Id.Cru;
Lnk = mEq[idx].Id.Lnk;
Fee = mEq[idx].Id.Fee;
Flp = mEq[idx].Id.Flp;
return;
}

ClassDefNV(ReadOut, 1);
};
/*
void ReadOut::Init()
{
mEq[0].Id = { 0, 0, 0, 160};
mEq[1].Id = { 1, 0, 1, 160};
mEq[2].Id = { 2, 0, 2, 160};
mEq[3].Id = { 3, 0, 3, 160};
mEq[4].Id = { 4, 1, 0, 160};
mEq[5].Id = { 5, 1, 1, 160};
mEq[6].Id = { 8, 1, 2, 160};
mEq[7].Id = { 9, 1, 3, 160};
mEq[8].Id = { 6, 2, 0, 161};
mEq[9].Id = { 7, 2, 1, 161};
mEq[10].Id = {10, 2, 2, 161};
mEq[11].Id = {11, 3, 0, 161};
mEq[12].Id = {12, 3, 1, 161};
mEq[13].Id = {13, 3, 2, 161};
};
*/

} // namespace hmpid
} // namespace o2

Expand Down
102 changes: 102 additions & 0 deletions Detectors/HMPID/base/include/HMPIDBase/Trigger.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

///
/// \file Trigger.h
/// \author Antonio Franco - INFN Bari
/// \version 1.0
/// \date 2/03/2021

#ifndef DETECTORS_HMPID_BASE_INCLUDE_HMPIDBASE_TRIGGER_H_
#define DETECTORS_HMPID_BASE_INCLUDE_HMPIDBASE_TRIGGER_H_

#include <vector>
#include "TMath.h"
#include "CommonDataFormat/TimeStamp.h"
#include "CommonConstants/LHCConstants.h"

namespace o2
{
namespace hmpid
{

/// \class Trigger
/// \brief HMPID Trigger declaration
class Trigger
{
public:
// Trigger time Conversion Functions
static inline uint64_t OrbitBcToEventId(uint32_t Orbit, uint16_t BC) { return ((Orbit << 12) | (0x0FFF & BC)); };
static inline uint32_t EventIdToOrbit(uint64_t EventId) { return (EventId >> 12); };
static inline uint16_t EventIdToBc(uint64_t EventId) { return (EventId & 0x0FFF); };
static double OrbitBcToTimeNs(uint32_t Orbit, uint16_t BC) { return (BC * o2::constants::lhc::LHCBunchSpacingNS + Orbit * o2::constants::lhc::LHCOrbitNS); };
static uint32_t TimeNsToOrbit(double TimeNs) { return (uint32_t)(TimeNs / o2::constants::lhc::LHCOrbitNS); };
static uint16_t TimeNsToBc(double TimeNs) { return (uint16_t)(std::fmod(TimeNs, o2::constants::lhc::LHCOrbitNS) / o2::constants::lhc::LHCBunchSpacingNS); };
static void TimeNsToOrbitBc(double TimeNs, uint32_t& Orbit, uint16_t& Bc)
{
Orbit = TimeNsToOrbit(TimeNs);
Bc = TimeNsToBc(TimeNs);
return;
};

// Operators definition !
friend inline bool operator<(const Trigger& l, const Trigger& r) { return OrbitBcToEventId(l.mOrbit, l.mBc) < OrbitBcToEventId(r.mOrbit, r.mBc); };
friend inline bool operator==(const Trigger& l, const Trigger& r) { return OrbitBcToEventId(l.mOrbit, l.mBc) == OrbitBcToEventId(r.mOrbit, r.mBc); };
friend inline bool operator>(const Trigger& l, const Trigger& r) { return r < l; };
friend inline bool operator<=(const Trigger& l, const Trigger& r) { return !(l > r); };
friend inline bool operator>=(const Trigger& l, const Trigger& r) { return !(l < r); };
friend inline bool operator!=(const Trigger& l, const Trigger& r) { return !(l == r); };

// Digit ASCII format (Orbit,BunchCrossing)[LHC Time nSec]
friend std::ostream& operator<<(std::ostream& os, const Trigger& d)
{
os << "(" << d.mOrbit << "," << d.mBc << ")[" << OrbitBcToTimeNs(d.mOrbit, d.mBc) << " ns]";
return os;
};

public:
Trigger() = default;
Trigger(uint16_t bc, uint32_t orbit)
{
mBc = bc;
mOrbit = orbit;
};
uint32_t getOrbit() const { return mOrbit; }
uint16_t getBc() const { return mBc; }
uint64_t getTriggerID() const { return OrbitBcToEventId(mOrbit, mBc); }
void setOrbit(uint32_t orbit)
{
mOrbit = orbit;
return;
}
void setBC(uint16_t bc)
{
mBc = bc;
return;
}
void setTriggerID(uint64_t trigger)
{
mOrbit = (trigger >> 12);
mBc = (trigger & 0x0FFF);
return;
}

private:
// Members
uint16_t mBc = 0.;
uint32_t mOrbit = 0;

ClassDefNV(Trigger, 2);
};

} // namespace hmpid
} // namespace o2

#endif /* DETECTORS_HMPID_BASE_INCLUDE_HMPIDBASE_TRIGGER_H_ */
24 changes: 19 additions & 5 deletions Detectors/HMPID/base/src/Digit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ using namespace o2::hmpid;
ClassImp(o2::hmpid::Digit);

// ============= Digit Class implementation =======
/// Constructor : Create the Digit structure. Accepts the trigger time (Orbit,BC)
/// The mapping of the digit is in the Photo Cathod coords
/// (Chamber, PhotoCathod, X, Y)
/// @param[in] bc : the bunch crossing [0 .. 2^12-1]
/// @param[in] orbit : the orbit number [0 .. 2^32-1]
/// @param[in] pad : the Digit Unique Id [0x00CPXXYY]
/// @param[in] charge : the value of the charge [0 .. 2^12-1]
Digit::Digit(uint16_t bc, uint32_t orbit, int pad, uint16_t charge)
{
mBc = bc;
mOrbit = orbit;
mQ = charge > 0x0FFF ? 0x0FFF : charge;
mPad = pad;
}

/// Constructor : Create the Digit structure. Accepts the trigger time (Orbit,BC)
/// The mapping of the digit is in the Photo Cathod coords
Expand All @@ -45,7 +59,7 @@ Digit::Digit(uint16_t bc, uint32_t orbit, int chamber, int photo, int x, int y,
{
mBc = bc;
mOrbit = orbit;
mQ = charge;
mQ = charge > 0x0FFF ? 0x0FFF : charge;
mPad = Abs(chamber, photo, x, y);
}

Expand All @@ -63,7 +77,7 @@ Digit::Digit(uint16_t bc, uint32_t orbit, uint16_t charge, int equipment, int co
{
mBc = bc;
mOrbit = orbit;
mQ = charge;
mQ = charge > 0x0FFF ? 0x0FFF : charge;
mPad = Equipment2Pad(equipment, column, dilogic, channel);
}

Expand All @@ -80,7 +94,7 @@ Digit::Digit(uint16_t bc, uint32_t orbit, uint16_t charge, int module, int x, in
{
mBc = bc;
mOrbit = orbit;
mQ = charge;
mQ = charge > 0x0FFF ? 0x0FFF : charge;
mPad = Absolute2Pad(module, x, y);
}

Expand Down Expand Up @@ -369,7 +383,7 @@ Double_t Digit::OrbitBcToTimeNs(uint32_t Orbit, uint16_t BC)
/// @return : the Orbit number [0..2^32-1]
uint32_t Digit::TimeNsToOrbit(Double_t TimeNs)
{
return (TimeNs / o2::constants::lhc::LHCOrbitNS);
return (uint32_t)(TimeNs / o2::constants::lhc::LHCOrbitNS);
}

/// TimeNsToBc : Extracts the Bunch Crossing number from the absolute
Expand All @@ -379,7 +393,7 @@ uint32_t Digit::TimeNsToOrbit(Double_t TimeNs)
/// @return : the Bunch Crossing number [0..2^12-1]
uint16_t Digit::TimeNsToBc(Double_t TimeNs)
{
return (std::fmod(TimeNs, o2::constants::lhc::LHCOrbitNS) / o2::constants::lhc::LHCBunchSpacingNS);
return (uint16_t)(std::fmod(TimeNs, o2::constants::lhc::LHCOrbitNS) / o2::constants::lhc::LHCBunchSpacingNS);
}

/// TimeNsToOrbitBc : Extracts the (Orbit,BC) pair from the absolute
Expand Down
2 changes: 2 additions & 0 deletions Detectors/HMPID/base/src/HMPIDBaseLinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@
#pragma link C++ class o2::hmpid::HitType + ;
#pragma link C++ class vector < o2::hmpid::HitType> + ;
#pragma link C++ class o2::hmpid::Geo + ;
#pragma link C++ class o2::hmpid::Trigger + ;
#pragma link C++ class vector < o2::hmpid::Trigger> + ;

#endif
Loading