diff --git a/core/data/tof/CbmTofAddress.h b/core/data/tof/CbmTofAddress.h index 482c6f987dda730875940bf32cdf07c6815d6ef2..34ea4bdfaaacea29d0344c98308e6fb87f6b99fb 100644 --- a/core/data/tof/CbmTofAddress.h +++ b/core/data/tof/CbmTofAddress.h @@ -124,15 +124,17 @@ public: static UInt_t GetUniqueAddress(UInt_t Sm, UInt_t Rpc, UInt_t Channel, - UInt_t Side = 0, - UInt_t SmType = 0) { + UInt_t Side = 0, + UInt_t SmType = 0, + UInt_t RpcType = 0) { return (UInt_t)( ((ToIntegralType(ECbmModuleId::kTof) & ((1 << fgkSystemBits) - 1))) + ((Sm & ((1 << fgkSmIdBits) - 1)) << fgkSmIdOffset) + ((SmType & ((1 << fgkSmTypeBits) - 1)) << fgkSmTypeOffset) + ((Side & ((1 << fgkChannelSideBits) - 1)) << fgkChannelSideOffset) - + ((Rpc & ((1 << fgkRpcIdBits) - 1)) << fgkRpcIdOffset) - + ((Channel & ((1 << fgkChannelIdBits) - 1)) << fgkChannelIdOffset)); + + ((Rpc & ((1 << fgkRpcIdBits) - 1)) << fgkRpcIdOffset) + + ((Channel & ((1 << fgkChannelIdBits) - 1)) << fgkChannelIdOffset) + + ((RpcType & ((1 << fgkRpcTypeBits) - 1)) << fgkRpcTypeOffset)); }; static Bool_t SameModule(UInt_t addressA, UInt_t addressB) { @@ -149,7 +151,8 @@ public: infoInput.fCounter, infoInput.fCell, 0, - infoInput.fSMtype); + infoInput.fSMtype, + infoInput.fCounterType); }; static UInt_t ConvertCbmTofDetectorId(Int_t detIdInput) { // For now assume that the system ID will always be correct @@ -173,7 +176,7 @@ private: /** Sub-fields sizes in bits **/ // v14a - + /* // Number of bits for Super Module Id in the address field static const Int_t fgkSmIdBits = 8; // Number of bits for Super Module Type in the address field @@ -186,8 +189,8 @@ private: static const Int_t fgkChannelIdBits = 8; // Number of bits for Rpc Type in the address field static const Int_t fgkRpcTypeBits = 0; - /* - // v20a + */ + // v21a // Number of bits for Super Module Id in the address field static const Int_t fgkSmIdBits = 7; // Number of bits for Super Module Type in the address field @@ -197,10 +200,9 @@ private: // Number of bits for Channel Side in the address field static const Int_t fgkChannelSideBits = 1; // Number of bits for Channel Id in the address field - static const Int_t fgkChannelIdBits = 4; + static const Int_t fgkChannelIdBits = 6; // Number of bits for Rpc Type in the address field static const Int_t fgkRpcTypeBits = 4; -*/ /** ** To adapt the address sub-fields repartition in order, ** you just need to change the way the offset are calculated. diff --git a/core/data/tof/CbmTofDetectorId.h b/core/data/tof/CbmTofDetectorId.h index 646a35594b595740878993f417020383480a6c7e..acb10336734eeadc1f6ad2362a444f3643ce6559 100644 --- a/core/data/tof/CbmTofDetectorId.h +++ b/core/data/tof/CbmTofDetectorId.h @@ -33,7 +33,7 @@ class CbmTofDetectorInfo CbmTofDetectorInfo(ECbmModuleId detsystem, Int_t smtype, Int_t smodule, Int_t counter, Int_t gap, Int_t cell) : fDetectorSystem(ToIntegralType(detsystem)), fSMtype(smtype), fSModule(smodule), - fCounter(counter), fGap(gap), fCell(cell) {}; + fCounter(counter), fGap(gap), fCell(cell) {fCounterType=0;}; CbmTofDetectorInfo(ECbmModuleId detsystem, Int_t smtype, Int_t smodule, Int_t counter, Int_t gap, Int_t cell, Int_t counterType) diff --git a/core/data/tof/CbmTofDetectorId_v21a.cxx b/core/data/tof/CbmTofDetectorId_v21a.cxx index 489318bd8d1bace48b6d22430f03e84c744ff64e..488490f1d316f1e1f9f7ef508a29492a3c714004 100644 --- a/core/data/tof/CbmTofDetectorId_v21a.cxx +++ b/core/data/tof/CbmTofDetectorId_v21a.cxx @@ -119,15 +119,16 @@ Int_t CbmTofDetectorId_v21a::GetCellId(const Int_t detectorId) Int_t CbmTofDetectorId_v21a ::SetDetectorInfo(const CbmTofDetectorInfo detInfo) { +/* std::cout << "SetDetectorInfo for " - << detInfo.fSMtype - << detInfo.fSModule << " " - << detInfo.fCounter - << detInfo.fCounterType <<" " - << detInfo.fGap - << detInfo.fCell + << "Mtype " << detInfo.fSMtype + << ", MId " << detInfo.fSModule << " " + << ", CType " << detInfo.fCounterType <<" " + << ", CId " << detInfo.fCounter + << ", Side " << detInfo.fGap + << ", Strip " << detInfo.fCell << std::endl; - +*/ return ( (((detInfo.fDetectorSystem) & maskarray[0]) << shiftarray[0]) | (((detInfo.fSMtype) & maskarray[2]) << shiftarray[2]) | (((detInfo.fSModule) & maskarray[1]) << shiftarray[1]) | diff --git a/core/detectors/tof/CbmTofGeoHandler.cxx b/core/detectors/tof/CbmTofGeoHandler.cxx index d80311bb59f633bbbf808e672d0664f929494be2..c7e9dfb4c0c1ba1e77aac55b10dd1e5f8bc41994 100644 --- a/core/detectors/tof/CbmTofGeoHandler.cxx +++ b/core/detectors/tof/CbmTofGeoHandler.cxx @@ -112,8 +112,8 @@ Int_t CbmTofGeoHandler::CheckGeometryVersion() { || (TString(node->GetName()).Contains("v17a")) || (TString(node->GetName()).Contains("v17c")) || (TString(node->GetName()).Contains("v18")) - || (TString(node->GetName()).Contains("v19")) - || (TString(node->GetName()).Contains("v20"))) { + || (TString(node->GetName()).Contains("v19"))) { +// || (TString(node->GetName()).Contains("v20"))) { LOG(info) << "CbmTofGeoHandler::CheckGeometryVersion: Found TOF geometry " << TString(node->GetName()) << ", treat as Id 14a "; @@ -131,7 +131,8 @@ Int_t CbmTofGeoHandler::CheckGeometryVersion() { fUseNodeName = kTRUE; } return fGeoVersion; - } else if ((TString(node->GetName()).Contains("v21"))) { + } else if ((TString(node->GetName()).Contains("v21")) + || (TString(node->GetName()).Contains("v20"))) { LOG(info) << "CbmTofGeoHandler::CheckGeometryVersion: Found TOF geometry " << TString(node->GetName()) << ", treat as Id 21a ";