Skip to content
Snippets Groups Projects
Commit 5591bb48 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

Fix unintended fallthrough in CbmTrdDigi SetTime

parent f5b4c876
No related branches found
No related tags found
1 merge request!531Fix unintended fallthrough in CbmTrdDigi SetTime
Pipeline #13377 passed
...@@ -37,12 +37,12 @@ CbmTrdDigi::CbmTrdDigi() : fInfo(0), fCharge(0), fTime(0) {} ...@@ -37,12 +37,12 @@ CbmTrdDigi::CbmTrdDigi() : fInfo(0), fCharge(0), fTime(0) {}
//_________________________________________________________________________________ //_________________________________________________________________________________
CbmTrdDigi::CbmTrdDigi(Int_t padChNr, Float_t chargeT, Float_t chargeR, ULong64_t time) : fTime(time) CbmTrdDigi::CbmTrdDigi(Int_t padChNr, Float_t chargeT, Float_t chargeR, ULong64_t time) : fTime(time)
{ {
/** Fill data structure according to FASP representation /** Fill data structure according to FASP representation
* A - Asic type according to CbmTrdAsicType * A - Asic type according to CbmTrdAsicType
* M - module id in the layer * M - module id in the layer
* L - layer id in the TRD setup * L - layer id in the TRD setup
* p - pad address within the module * p - pad address within the module
* *
* fCharge definition tttt.tttt tttt.tttt rrrr.rrrr rrrr.rrrr * fCharge definition tttt.tttt tttt.tttt rrrr.rrrr rrrr.rrrr
* t - tilt paired charge * t - tilt paired charge
* r - rectangle paired charge * r - rectangle paired charge
...@@ -58,7 +58,7 @@ CbmTrdDigi::CbmTrdDigi(Int_t padChNr, Int_t uniqueModuleId, Float_t charge, ULon ...@@ -58,7 +58,7 @@ CbmTrdDigi::CbmTrdDigi(Int_t padChNr, Int_t uniqueModuleId, Float_t charge, ULon
: fTime(time) : fTime(time)
{ {
/** /**
* Fill data structure according to SPADIC representation * Fill data structure according to SPADIC representation
* A - Asic type according to CbmTrdAsicType * A - Asic type according to CbmTrdAsicType
* T - trigger type according to CbmTrdTriggerType * T - trigger type according to CbmTrdTriggerType
* n - error class * n - error class
...@@ -247,8 +247,14 @@ void CbmTrdDigi::SetFlag(const Int_t iflag, Bool_t set) ...@@ -247,8 +247,14 @@ void CbmTrdDigi::SetFlag(const Int_t iflag, Bool_t set)
void CbmTrdDigi::SetTime(Double_t t) void CbmTrdDigi::SetTime(Double_t t)
{ {
switch (GetType()) { switch (GetType()) {
case eCbmTrdAsicType::kFASP: fTime = ULong64_t(TMath::Ceil(t / Clk(GetType()))); case eCbmTrdAsicType::kFASP: {
case eCbmTrdAsicType::kSPADIC: fTime = static_cast<ULong64_t>(t); fTime = ULong64_t(TMath::Ceil(t / Clk(GetType())));
break;
}
case eCbmTrdAsicType::kSPADIC: {
fTime = static_cast<ULong64_t>(t);
break;
}
case eCbmTrdAsicType::kNTypes: return; case eCbmTrdAsicType::kNTypes: return;
} }
} }
......
  • Developer

    Hi Pierre,

    We had some problems trying to simulate the TRD2D due to this bug. I was also preparing the same fix but thx that you pushed it faster to the master. Alex

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment