From e51605d9fcb8d4d8f121b756a034877c39fa9023 Mon Sep 17 00:00:00 2001 From: cblume Date: Fri, 16 Apr 2010 07:39:36 +0000 Subject: [PATCH] Bugfixes and code clean-up (Felix) --- TRD/AliTRDptrgCBAC.cxx | 12 +- TRD/AliTRDptrgCBB.cxx | 1 - TRD/AliTRDptrgFEB.cxx | 22 +-- TRD/AliTRDptrgParam.cxx | 28 ++-- TRD/AliTRDptrgParam.h | 2 - TRD/AliTRDptrgParamConfigurationFile.txt | 8 +- TRD/AliTRDptrgTLMU.cxx | 163 +++++++++++++++++++---- TRD/AliTRDptrgTLMU.h | 2 +- 8 files changed, 175 insertions(+), 63 deletions(-) diff --git a/TRD/AliTRDptrgCBAC.cxx b/TRD/AliTRDptrgCBAC.cxx index c5f8862ad09..bc9893b2f37 100644 --- a/TRD/AliTRDptrgCBAC.cxx +++ b/TRD/AliTRDptrgCBAC.cxx @@ -114,7 +114,7 @@ Bool_t AliTRDptrgCBAC::LoadParams() // 1 LUT = new AliTRDptrgLUT(); LUT->InitTable(10, 10, this->fParam->GetCBLUT(this->fPosition, 1), kFALSE); - // do not copy table data // TODO 0x0 + // do not copy table data this->fLUTArray.AddLast(LUT); } else { @@ -123,7 +123,7 @@ Bool_t AliTRDptrgCBAC::LoadParams() this->fLUTArray.AddLast(LUT); LUT = new AliTRDptrgLUT(); this->fLUTArray.AddLast(LUT); - // the following lines are only needed for test reasons + // the following lines are only needed for test reasons LUT = dynamic_cast(this->fLUTArray.At(0)); Int_t* initData = new Int_t[1024]; // 2^10 for (Int_t i = 0; i < 1024; i++ ) { @@ -150,7 +150,7 @@ AliTRDptrgCBAC::~AliTRDptrgCBAC() //______________________________________________________________________________ Int_t* AliTRDptrgCBAC::Simulate() -{ // TODO check new/delete +{ // Simulate the CBAC behavior of event Int_t nFEBs = this->fFEBArray.GetEntries(); Int_t nLUTs = this->fLUTArray.GetEntries(); @@ -171,19 +171,19 @@ Int_t* AliTRDptrgCBAC::Simulate() Int_t mask = 0x1; for (Int_t iFEB = 0; iFEB < nFEBs ; iFEB++) { for (Int_t j = 1; j <= partResults[iFEB][0]; j++) { - if ((iBit++ > + if ((iBit > dynamic_cast(this->fLUTArray[0])->GetInputWidth()) - || (iBit++ > + || (iBit > dynamic_cast(this->fLUTArray[0])->GetInputWidth())) { AliError("FEB result width does not match CB-A/C input with!"); } + iBit++; if (partResults[iFEB][j] > 0) { inputVector |= mask; // Add bit to the corresponding inputVector mask <<= 1; } } } - AliDebug(5, Form("Inputvector: 0x%x", inputVector)); diff --git a/TRD/AliTRDptrgCBB.cxx b/TRD/AliTRDptrgCBB.cxx index c91c4f82019..3e6655770c8 100644 --- a/TRD/AliTRDptrgCBB.cxx +++ b/TRD/AliTRDptrgCBB.cxx @@ -172,7 +172,6 @@ Int_t* AliTRDptrgCBB::Simulate() // combine partResults and create inputVectors - // TODO make assignment configurable Int_t mask = 0x1; for (Int_t i = 0; i < 3 ; i++) { for (Int_t j = 1; j <= partResults[i][0]; j++) { diff --git a/TRD/AliTRDptrgFEB.cxx b/TRD/AliTRDptrgFEB.cxx index a091d5a0e99..fe272867262 100644 --- a/TRD/AliTRDptrgFEB.cxx +++ b/TRD/AliTRDptrgFEB.cxx @@ -56,7 +56,7 @@ AliTRDptrgFEB::AliTRDptrgFEB(AliRunLoader *rl) fThreshold(0) { // default constructor - AliWarning("default ctor - not recommended"); + AliError("default ctor - not recommended"); } //______________________________________________________________________________ @@ -104,7 +104,7 @@ Int_t AliTRDptrgFEB::LoadDigits() // load V0's digits -------------------------------------------------------- // get V0 run loader - AliLoader* loader = fRunLoader->GetLoader( "VZEROLoader" ); + AliLoader* loader = this->fRunLoader->GetLoader( "VZEROLoader" ); if (!loader) { AliError("Can not get VZERO loader"); @@ -123,12 +123,8 @@ Int_t AliTRDptrgFEB::LoadDigits() TBranch* digitBranch = vzeroDigitsTree->GetBranch("VZERODigit"); digitBranch->SetAddress(&vzeroDigits); vzeroDigitsTree->GetEvent(0); - //digitBranch->GetEvent(event); - - AliDebug(5, Form("Number of Events: %d", - this->fRunLoader->GetNumberOfEvents())); - - + + Int_t nDigits = vzeroDigits->GetEntriesFast(); // get digit count AliDebug(5, Form("Found a whole of %d digits", nDigits)); @@ -141,15 +137,13 @@ Int_t AliTRDptrgFEB::LoadDigits() AliVZEROdigit* digit = (AliVZEROdigit*)vzeroDigits->At(iDigit); Int_t pmNumber = digit->PMNumber(); - // TODO check the assignment of the photomultipliers to the FEBs - Int_t board = pmNumber / 8; + Int_t board = pmNumber / 8; Int_t channel = pmNumber % 8; Int_t position = pmNumber / 32 + 1; // check whether the digits belongs to the current FEB, otherwise omit it if ((position == this->fPosition) && (board == this->fID)) { AliDebug(5, "Found an digit corresponding to the current FEB"); - //if in timing window? // TODO Float_t value = digit->ADC(); AliDebug(5, Form("ADC value: %f\n", value)); Int_t channelBitMask = 0x01; @@ -220,7 +214,6 @@ Int_t AliTRDptrgFEB::LoadDigits() Int_t value = qtc1[i] - qtc0[i]; // calculate correct measurement value if (value > (Int_t)this->fThreshold[i - nStart]) { - // channelBitMask <<= 1; //(i - nStart); // 2^(i - nStart) ERROR? TODO inputVector |= channelBitMask; // Add bit AliDebug(5, Form("Threshold exceeded in channel %d,", i)); @@ -230,7 +223,6 @@ Int_t AliTRDptrgFEB::LoadDigits() channelBitMask <<= 1; // go on to the next channel } - // TODO check whether it is correct to delete the digit delete digits; return inputVector; } @@ -263,7 +255,7 @@ Bool_t AliTRDptrgFEB::LoadParams() // initialize threshold this->fThreshold = new UInt_t[8]; for (Int_t i = 0; i < 8; i++) { - this->fThreshold[i] = 10; // TODO choose a correct value + this->fThreshold[i] = 10; } // initialize LUTsoutputWidth= AliTRDptrgLUT* lut = new AliTRDptrgLUT(); @@ -287,7 +279,7 @@ Bool_t AliTRDptrgFEB::LoadParams() // initialize threshold this->fThreshold = new UInt_t[12]; for (Int_t i = 0; i < 12; i++) { - this->fThreshold[i] = 10; // TODO choose a correct value + this->fThreshold[i] = 10; } // initialize LUTsoutputWidth= diff --git a/TRD/AliTRDptrgParam.cxx b/TRD/AliTRDptrgParam.cxx index 56cd4a06fec..e017783824c 100644 --- a/TRD/AliTRDptrgParam.cxx +++ b/TRD/AliTRDptrgParam.cxx @@ -866,32 +866,38 @@ Int_t AliTRDptrgParam::GenerateLUTs() { // CB-A (CB = 1 / kA) this->fCBLUTs[1][0] = this->GenerateLUTbasedOnEq(this->fCBALUTequX, 10, 1); for (Int_t iEntry = 0; iEntry < 1024; iEntry++) { - AliDebug(10, Form("fCBLUTs[@A][0]=%d", this->fCBLUTs[1][0])); + AliDebug(10, Form("fCBLUTs[@A][0][0x%x]=%d", iEntry, + this->fCBLUTs[1][0][iEntry])); } this->fCBLUTs[1][1] = this->GenerateLUTbasedOnEq(this->fCBALUTequY, 10, 1); for (Int_t iEntry = 0; iEntry < 1024; iEntry++) { - AliDebug(10, Form("fCBLUTs[@A][1]=%d", this->fCBLUTs[1][1])); + AliDebug(10, Form("fCBLUTs[@A][1][0x%x]=%d", iEntry, + this->fCBLUTs[1][1][iEntry])); } // CB-C (CB = 2 / kC) this->fCBLUTs[2][0] = this->GenerateLUTbasedOnEq(this->fCBCLUTequX, 10, 1); for (Int_t iEntry = 0; iEntry < 1024; iEntry++) { - AliDebug(6, Form("fCBLUTs[@C][0]=%d", this->fCBLUTs[2][0])); + AliDebug(6, Form("fCBLUTs[@C][0][0x%x]=%d", iEntry, + this->fCBLUTs[2][0][iEntry])); } this->fCBLUTs[2][1] = this->GenerateLUTbasedOnEq(this->fCBCLUTequY, 10, 1); for (Int_t iEntry = 0; iEntry < 1024; iEntry++) { - AliDebug(10, Form("fCBLUTs[@C][1]=%d", this->fCBLUTs[2][0])); + AliDebug(10, Form("fCBLUTs[@C][1][0x%x]=%d", iEntry, + this->fCBLUTs[2][0][iEntry])); } // CB-B (CB = 0 / kB) - this->fCBLUTs[0][0] = this->GenerateLUTbasedOnEq(this->fCBALUTequX, 12, 1); + this->fCBLUTs[0][0] = this->GenerateLUTbasedOnEq(this->fCBBLUTequX, 12, 1); for (Int_t iEntry = 0; iEntry < 4096; iEntry++) { - AliDebug(10, Form("fCBLUTs[@B][0]=%d", this->fCBLUTs[0][0])); + AliDebug(10, Form("fCBLUTs[@B][0][0x%x]=%d", iEntry, + this->fCBLUTs[0][0][iEntry])); } - this->fCBLUTs[0][1] = this->GenerateLUTbasedOnEq(this->fCBALUTequY, 12, 1); + this->fCBLUTs[0][1] = this->GenerateLUTbasedOnEq(this->fCBBLUTequY, 12, 1); for (Int_t iEntry = 0; iEntry < 4096; iEntry++) { - AliDebug(10, Form("fCBLUTs[@B][1]=%d", this->fCBLUTs[0][1])); + AliDebug(10, Form("fCBLUTs[@B][1][0x%x]=%d", iEntry, + this->fCBLUTs[0][1][iEntry])); } AliDebug(5, "LUTs were generated!"); @@ -1005,7 +1011,7 @@ void AliTRDptrgParam::SplitUpValues(TString value, TObjArray& arr) { } } } - if (temp.Length() != 0) { // TODO + if (temp.Length() != 0) { TObjString* t = new TObjString(temp.Data()); arr.Add(t); } @@ -1048,7 +1054,7 @@ Bool_t AliTRDptrgParam::ParseMultiplicityCondition(TString condition, maskStr += condition[iLetter++]; } (*mask) = BinaryTStringToInt(maskStr); - if ((*mask) == 0) { // TODO find a better method to detected parser errors + if ((*mask) == 0) { AliDebug(5, Form("Invalid input mask: %s,[%s]", maskStr.Data(), condition.Data())); return kFALSE; @@ -1540,7 +1546,7 @@ Int_t AliTRDptrgParam::LookUp(TString* const identifier) const { else if (identifier->CompareTo("TLMU_6", TString::kIgnoreCase) == 0) return 0x400; else if (identifier->CompareTo("TLMU_7", TString::kIgnoreCase) == 0) - return 0x100; + return 0x800; else return 0x0; // Error } diff --git a/TRD/AliTRDptrgParam.h b/TRD/AliTRDptrgParam.h index fbca0c5c0e2..49fef9f6d0f 100644 --- a/TRD/AliTRDptrgParam.h +++ b/TRD/AliTRDptrgParam.h @@ -171,7 +171,6 @@ class AliTRDptrgParam : public TObject { // T0 ------------------------------------------------------------------------ // [position][channel] 12 channels at A and C side UInt_t** fFEBT0Thresholds; // threshold for analog value discrimination - //UInt_t** fFEBT0Delays; // delay is not used in simulation right now //TODO // [position][LUT][0 = threshold, 1 = bitmask] 2 LUTs at A and C side UInt_t*** fFEBT0Multiplicities; // multiplicity threshold for T0 @@ -180,7 +179,6 @@ class AliTRDptrgParam : public TObject { // V0 ------------------------------------------------------------------------ // [position][feb][channel] 4x8 channels per side (A and C) UInt_t*** fFEBV0Thresholds; // threshold for analog value discrimation - //UInt_t** fFEBV0Delays; // delay is not used in simulation right now //TODO // [position][feb][LUT][0 = threshold, 1 = bitmask] 2 LUTs per FEB // (4 per Side) at each side ( A and C) diff --git a/TRD/AliTRDptrgParamConfigurationFile.txt b/TRD/AliTRDptrgParamConfigurationFile.txt index 1406dff9229..3f515d09870 100644 --- a/TRD/AliTRDptrgParamConfigurationFile.txt +++ b/TRD/AliTRDptrgParamConfigurationFile.txt @@ -93,8 +93,8 @@ TLMU/MCNTR3/THR 200 300 TLMU/MCNTR4/THR 300 400 TLMU/MCNTR5/THR 400 500 TLMU/MCNTR6/THR 500 520 -TLMU/MCNTR7/THR 520 540 -TLMU/MCNTR8/THR 540 999 +TLMU/MCNTR7/THR 520 576 +TLMU/MCNTR8/THR 1 576 # Assign signal to output. CM means CMATRIX and MC means Multiplicity counter @@ -171,8 +171,8 @@ CBC/LUT/1 !T0_1 && !V0-0_1 && !V0-1_1 && !V0-2_1 && !V0-3_1 # Lookup table at CB-B -CBB/LUT/0 ( !CB-A_1 || !CB-C_1 ) && TLMU_7 -CBB/LUT/1 ( !CB-A_1 && !CB-C_1 ) && TLMU_7 +CBB/LUT/0 ( CB-A_1 || CB-C_1 ) && TLMU_7 +CBB/LUT/1 ( CB-A_1 && CB-C_1 ) && TLMU_7 # Timing parameter for trigger processor diff --git a/TRD/AliTRDptrgTLMU.cxx b/TRD/AliTRDptrgTLMU.cxx index c1c3ff27af6..80f94d774f6 100644 --- a/TRD/AliTRDptrgTLMU.cxx +++ b/TRD/AliTRDptrgTLMU.cxx @@ -55,8 +55,10 @@ AliTRDptrgTLMU::AliTRDptrgTLMU(AliRunLoader *rl) // default ctor for (Int_t i = 0; i < 18; i++) { - this->fInputTOFinputBits[i] = 0; + this->fTOFinputBits[i] = 0; } + + this->LoadParams(); } //______________________________________________________________________________ @@ -74,7 +76,7 @@ AliTRDptrgTLMU::AliTRDptrgTLMU(AliRunLoader *rl, AliTRDptrgParam *param, // recommended ctor for (Int_t i = 0; i < 18; i++) { - this->fInputTOFinputBits[i] = 0; + this->fTOFinputBits[i] = 0; } this->LoadParams(); @@ -126,8 +128,11 @@ Int_t* AliTRDptrgTLMU::Simulate() // coincidence matrix if (this->fOutput[iResult][0] != -1) { for (Int_t iLine = 0; iLine < 18; iLine++) { + AliDebug(5, Form("Entry: %d, matrix: %d, line: %d, output: 0x%x", + iResult, this->fOutput[iResult][0], iLine, sm & + this->fCMatrices[this->fOutput[iResult][0]][iLine])); if (this->GetBitVectorMultiplicity( - sm | this->fCMatrices[this->fOutput[iResult][0]][iLine]) > 1) { + sm & this->fCMatrices[this->fOutput[iResult][0]][iLine]) > 1) { result[iResult + 1] = 1; break; } @@ -136,7 +141,7 @@ Int_t* AliTRDptrgTLMU::Simulate() // multiplicity conditions if (this->fOutput[iResult][1] != -1) { - AliDebug(5, Form("Entry %d, slice: %d", iResult, + AliDebug(5, Form("Entry: %d, slice: %d", iResult, this->fOutput[iResult][1])); if ((this->fMultiplicity[this->fOutput[iResult][1]][0] < multiplicity) && (this->fMultiplicity[this->fOutput[iResult][1]][1] >= multiplicity)) { @@ -167,8 +172,118 @@ Bool_t AliTRDptrgTLMU::LoadParams() // no parameter object assigned AliWarning("no parameter object assigned - using default settings!"); - AliError("no default settings available!"); - // TODO + UInt_t* imask = 0x0; + imask = new UInt_t[18]; + for (Int_t i = 0; i < 18; i++) { + imask[i] = 0xFFFFFFFF; + } + + this->fInputMask = imask; + + // TLMU Coincidence Matrices + this->fCMatrices = new UInt_t*[3]; + this->fCMatrices[0] = new UInt_t[18]; + this->fCMatrices[1] = new UInt_t[18]; + this->fCMatrices[2] = new UInt_t[18]; + + // Matrix 0: Back-To-Back + // Matrix 1: Back-To-Back +/-1 + // Matrix 2: Back-To-Back +/-2 + for (UInt_t iMatrix = 0; iMatrix < 3; iMatrix++) { + for (UInt_t iSlice = 0; iSlice < 18; iSlice++) { + if (iMatrix == 0) { + if (iSlice < 9) { + this->fCMatrices[iMatrix][iSlice] = 0x201 << iSlice; + // Back-To-Back + AliDebug(5, Form("fCMatrices[%d][%d]=0x%x",iMatrix,iSlice, + this->fCMatrices[iMatrix][iSlice])); + } + // because of symmetrie the other slices are not necessary + } + else if (iMatrix == 1) { + // Back-To-Back +/- 1 + if (iSlice < 8) { + this->fCMatrices[iMatrix][iSlice] = 0x381 << iSlice; + } + else if (iSlice == 8) { + this->fCMatrices[iMatrix][iSlice] = 0x30101; + } + else if (iSlice == 9) { + this->fCMatrices[iMatrix][iSlice] = 0x20203; + } + else { + this->fCMatrices[iMatrix][iSlice] = 0x407 << (iSlice - 10); + } + AliDebug(5, Form("fCMatrices[%d][%d]=0x%x",iMatrix,iSlice, + this->fCMatrices[iMatrix][iSlice])); + } + else if (iMatrix == 2) { + // Back-To-Back +/-2 + if (iSlice < 7 ) { + this->fCMatrices[iMatrix][iSlice] = 0xF81 << iSlice; + } + else if (iSlice == 7) { + this->fCMatrices[iMatrix][iSlice] = 0x3C081; + } + else if (iSlice == 8) { + this->fCMatrices[iMatrix][iSlice] = 0x38103; + } + else if (iSlice == 9) { + this->fCMatrices[iMatrix][iSlice] = 0x30207; + } + else if (iSlice == 10) { + this->fCMatrices[iMatrix][iSlice] = 0x2040F; + } + else { + this->fCMatrices[iMatrix][iSlice] = 0x81F << (iSlice - 11); + } + AliDebug(5, Form("fCMatrices[%d][%d]=0x%x",iMatrix,iSlice, + this->fCMatrices[iMatrix][iSlice])); + } + } + } + + // Mulitplicity + this->fMultiplicity = new UInt_t*[9]; + for (Int_t i = 0; i < 9; i++) { + this->fMultiplicity[i] = new UInt_t[2]; + } + this->fMultiplicity[0][0] = 0; + this->fMultiplicity[0][1] = 10; + this->fMultiplicity[1][0] = 10; + this->fMultiplicity[1][1] = 25; + this->fMultiplicity[2][0] = 25; + this->fMultiplicity[2][1] = 50; + this->fMultiplicity[3][0] = 50; + this->fMultiplicity[3][1] = 100; + this->fMultiplicity[4][0] = 100; + this->fMultiplicity[4][1] = 200; + this->fMultiplicity[5][0] = 200; + this->fMultiplicity[5][1] = 350; + this->fMultiplicity[6][0] = 350; + this->fMultiplicity[6][1] = 400; + this->fMultiplicity[7][0] = 400; + this->fMultiplicity[7][1] = 576; + this->fMultiplicity[8][0] = 100; + this->fMultiplicity[8][1] = 576; + + // TLMU output + this->fOutput = new Int_t*[8]; + for (Int_t i = 0; i < 9; i++) { + this->fOutput[i] = new Int_t[2]; + this->fOutput[i][0] = -1; + this->fOutput[i][1] = -1; + } + this->fOutput[0][0] = 0; + this->fOutput[1][0] = 1; + this->fOutput[2][0] = 2; + this->fOutput[3][1] = 0; + this->fOutput[4][1] = 1; + this->fOutput[5][1] = 2; + this->fOutput[6][1] = 3; + this->fOutput[7][1] = 8; + + } else { // parameter object assigned @@ -205,21 +320,25 @@ void AliTRDptrgTLMU::GetInputBits() { // initialise map for (Int_t i=0; i < 72; i++) for (Int_t j=0; j < 8; j++) - map[i][j] = 0; + map[i][j] = kFALSE; // get 576 TOF-to-TRD bits toftrig->GetTRDmap(map); - /* DEBUG output + //* DEBUG output // used to determine the correct bit assignment + AliDebug(5, "AliTOFTrigger->GetTRDmap(map):"); for (Int_t i=0; i < 72; i++) { - AliDebug(5, Form("%d ", i)); - for (Int_t j=7; j >= 0; j--) { - AliDebug(5, Form("%d", map[i][j])); - } + AliDebug(5, Form("%d %d%d%d%d%d%d%d%d", i, map[i][0], map[i][1], map[i][2], + map[i][3], map[i][4], map[i][5], map[i][6], map[i][7])); } //*/ // end of DEBUG output - + + // initialise fTOFinputBits + for (Int_t i=0; i < 18; i++) { + this->fTOFinputBits[i] = 0; + } + // transform Bool_t array to UInt_t bitvectors according to // http://www.physi.uni-heidelberg.de/~schicker/cbtof/cbtof_docu.pdf @@ -234,15 +353,15 @@ void AliTRDptrgTLMU::GetInputBits() { tempC = 0x00010000; supermodule++; } - AliDebug(5, Form("(%2d,0x%8x,0x%8x)", iLTM, tempA, tempC)); + // AliDebug(5, Form("(%2d,0x%8x,0x%8x)", iLTM, tempA, tempC)); for (Int_t iLTMchan = 0; iLTMchan < 8; iLTMchan++) { // A-side if (map[iLTM][iLTMchan]) { - this->fInputTOFinputBits[supermodule] |= tempA; + this->fTOFinputBits[supermodule] |= tempA; } // C-side if (map[iLTM + 36][iLTMchan]) { - this->fInputTOFinputBits[supermodule] |= tempC; + this->fTOFinputBits[supermodule] |= tempC; } // change temp vectors tempA <<= 1; @@ -253,8 +372,8 @@ void AliTRDptrgTLMU::GetInputBits() { // handle input mask for (Int_t iSM = 0; iSM < 18; iSM++) { AliDebug(5, Form("fInputTOFinputBits[%d]=0x%x", iSM, - this->fInputTOFinputBits[iSM])); - this->fInputTOFinputBits[iSM] &= this->fInputMask[iSM]; + this->fTOFinputBits[iSM])); + this->fTOFinputBits[iSM] &= this->fInputMask[iSM]; } } @@ -275,7 +394,6 @@ Int_t AliTRDptrgTLMU::BackToBack(Int_t iSM, Int_t range) { if (this->Or(iSM)) { // is there are active bits in supermodule iSM Int_t result = 0; for (Int_t i = counterPart - range; i <= counterPart + range; i++) { - // TODO WARNING: There are possible Errors with sm0 +-range! // check whether there are active bits in supermodule i (counterParts) if ((i >= 0) && (i < 18)) { if (Or(i)) { @@ -321,7 +439,7 @@ inline Int_t AliTRDptrgTLMU::Or(Int_t iSM) { // returns 1 if one or more bits are active in supermodule iSM if ((iSM >= 0) && (iSM < 18)) { - if (this->fInputTOFinputBits[iSM] > 0) + if (this->fTOFinputBits[iSM] > 0) return 1; else return 0; @@ -333,14 +451,13 @@ inline Int_t AliTRDptrgTLMU::Or(Int_t iSM) { //______________________________________________________________________________ Int_t AliTRDptrgTLMU::GetMultiplicity(Int_t iSM) { - // counts how many bits equal one are in class member fInputTOFinputBits[iSM] + // counts how many bits equal one are in class member fTOFinputBits[iSM] // (32bits from TOF to TRD of supermodule iSM) - UInt_t temp = this->fInputTOFinputBits[iSM]; + UInt_t temp = this->fTOFinputBits[iSM]; UInt_t mask = 0x01; Int_t multiplicity = 0; - // TODO maybe there is a more efficient way to do that? for (int iBit = 0; iBit < 32; iBit++) { if ((mask & temp) != 0x0) { // is the bit equal one? multiplicity++; diff --git a/TRD/AliTRDptrgTLMU.h b/TRD/AliTRDptrgTLMU.h index eb858ea9288..456d87084f3 100644 --- a/TRD/AliTRDptrgTLMU.h +++ b/TRD/AliTRDptrgTLMU.h @@ -53,7 +53,7 @@ class AliTRDptrgTLMU : public TObject { AliTRDptrgOperatingMode_t fOperatingMode; // working on Digits or Hits? const UInt_t* fInputMask; // input mask for TOF-bits (18x32=576) - UInt_t fInputTOFinputBits[18]; // input bits from TOF (18x32) + UInt_t fTOFinputBits[18]; // input bits from TOF (18x32) UInt_t** fCMatrices; // get coincidence matrices UInt_t** fMultiplicity; // get multiplicity slices -- 2.43.0