Skip to content
Snippets Groups Projects
Commit 5ce518ba authored by Nikolay Karpushkin's avatar Nikolay Karpushkin
Browse files

add data versioning anf calibration in parameter container

parent 9999e3e5
No related branches found
No related tags found
2 merge requests!384Par files gitignore,!382Psd raw data format update
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
// ----- Standard constructor ------------------------------------------ // ----- Standard constructor ------------------------------------------
CbmMcbm2018PsdPar::CbmMcbm2018PsdPar(const char* name, const char* title, const char* context) CbmMcbm2018PsdPar::CbmMcbm2018PsdPar(const char* name, const char* title, const char* context)
: FairParGenericSet(name, title, context) : FairParGenericSet(name, title, context)
, fiDataVersion(-1)
, fiMonitorMode(-1) , fiMonitorMode(-1)
, fiDebugMonitorMode(-1) , fiDebugMonitorMode(-1)
, fiNrOfGdpb(-1) , fiNrOfGdpb(-1)
...@@ -29,6 +30,8 @@ CbmMcbm2018PsdPar::CbmMcbm2018PsdPar(const char* name, const char* title, const ...@@ -29,6 +30,8 @@ CbmMcbm2018PsdPar::CbmMcbm2018PsdPar(const char* name, const char* title, const
, fiNrOfGbtx(-1) , fiNrOfGbtx(-1)
, fiNrOfModules(-1) , fiNrOfModules(-1)
, fiModuleId() , fiModuleId()
, fiNrOfSections(-1)
, fdMipCalibration()
, fiNbMsTot(0) , fiNbMsTot(0)
, fiNbMsOverlap(0) , fiNbMsOverlap(0)
, fdSizeMsInNs(0.0) , fdSizeMsInNs(0.0)
...@@ -57,12 +60,15 @@ void CbmMcbm2018PsdPar::clear() ...@@ -57,12 +60,15 @@ void CbmMcbm2018PsdPar::clear()
void CbmMcbm2018PsdPar::putParams(FairParamList* l) void CbmMcbm2018PsdPar::putParams(FairParamList* l)
{ {
if (!l) return; if (!l) return;
l->add("DataVersion", fiDataVersion);
l->add("NrOfGdpbs", fiNrOfGdpb); l->add("NrOfGdpbs", fiNrOfGdpb);
l->add("GdpbIdArray", fiGdpbIdArray); l->add("GdpbIdArray", fiGdpbIdArray);
l->add("NrOfFeesPerGdpb", fiNrOfFeesPerGdpb); l->add("NrOfFeesPerGdpb", fiNrOfFeesPerGdpb);
l->add("NrOfChannelsPerFee", fiNrOfChannelsPerFee); l->add("NrOfChannelsPerFee", fiNrOfChannelsPerFee);
l->add("NrOfGbtx", fiNrOfGbtx); l->add("NrOfGbtx", fiNrOfGbtx);
l->add("NrOfModules", fiNrOfModules); l->add("NrOfModules", fiNrOfModules);
l->add("NrOfSections", fiNrOfSections);
l->add("MipCalibration", fdMipCalibration);
l->add("ModuleId", fiModuleId); l->add("ModuleId", fiModuleId);
l->add("NbMsTot", fiNbMsTot); l->add("NbMsTot", fiNbMsTot);
l->add("NbMsOverlap", fiNbMsOverlap); l->add("NbMsOverlap", fiNbMsOverlap);
...@@ -77,6 +83,8 @@ Bool_t CbmMcbm2018PsdPar::getParams(FairParamList* l) ...@@ -77,6 +83,8 @@ Bool_t CbmMcbm2018PsdPar::getParams(FairParamList* l)
if (!l) return kFALSE; if (!l) return kFALSE;
if (!l->fill("DataVersion", &fiDataVersion)) return kFALSE;
if (!l->fill("NrOfGdpbs", &fiNrOfGdpb)) return kFALSE; if (!l->fill("NrOfGdpbs", &fiNrOfGdpb)) return kFALSE;
fiGdpbIdArray.Set(fiNrOfGdpb); fiGdpbIdArray.Set(fiNrOfGdpb);
...@@ -90,6 +98,11 @@ Bool_t CbmMcbm2018PsdPar::getParams(FairParamList* l) ...@@ -90,6 +98,11 @@ Bool_t CbmMcbm2018PsdPar::getParams(FairParamList* l)
if (!l->fill("NrOfModules", &fiNrOfModules)) return kFALSE; if (!l->fill("NrOfModules", &fiNrOfModules)) return kFALSE;
if (!l->fill("NrOfSections", &fiNrOfSections)) return kFALSE;
fdMipCalibration.Set(fiNrOfSections);
if (!l->fill("MipCalibration", &fdMipCalibration)) return kFALSE;
fiModuleId.Set(fiNrOfGbtx); fiModuleId.Set(fiNrOfGbtx);
if (!l->fill("ModuleId", &fiModuleId)) return kFALSE; if (!l->fill("ModuleId", &fiModuleId)) return kFALSE;
......
...@@ -48,6 +48,8 @@ public: ...@@ -48,6 +48,8 @@ public:
Int_t FeeChanToGbtChan(UInt_t uChannelInFee); Int_t FeeChanToGbtChan(UInt_t uChannelInFee);
inline Int_t GetDataVersion() { return fiDataVersion; }
inline Bool_t GetMonitorMode() { return (1 == fiMonitorMode ? kTRUE : kFALSE); } inline Bool_t GetMonitorMode() { return (1 == fiMonitorMode ? kTRUE : kFALSE); }
inline Bool_t GetDebugMonitorMode() { return (1 == fiDebugMonitorMode ? kTRUE : kFALSE); } inline Bool_t GetDebugMonitorMode() { return (1 == fiDebugMonitorMode ? kTRUE : kFALSE); }
...@@ -60,6 +62,9 @@ public: ...@@ -60,6 +62,9 @@ public:
inline Int_t GetNrOfModules() { return fiNrOfModules; } inline Int_t GetNrOfModules() { return fiNrOfModules; }
Int_t GetModuleId(UInt_t uGbtx); Int_t GetModuleId(UInt_t uGbtx);
inline Int_t GetNrOfSections() { return fiNrOfSections; }
inline Double_t GetMipCalibration(UInt_t i) { return fdMipCalibration[i]; }
inline Int_t GetNbMsTot() { return fiNbMsTot; } inline Int_t GetNbMsTot() { return fiNbMsTot; }
inline Int_t GetNbMsOverlap() { return fiNbMsOverlap; } inline Int_t GetNbMsOverlap() { return fiNbMsOverlap; }
inline Double_t GetSizeMsInNs() { return fdSizeMsInNs; } inline Double_t GetSizeMsInNs() { return fdSizeMsInNs; }
...@@ -81,6 +86,7 @@ private: ...@@ -81,6 +86,7 @@ private:
/// Mapping /// Mapping
const UInt_t kuFeeToGbt[kuNbChannelsPerFee] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; //! Map from Psd channel to Gbt channel const UInt_t kuFeeToGbt[kuNbChannelsPerFee] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; //! Map from Psd channel to Gbt channel
Int_t fiDataVersion; // Data Version
Int_t fiMonitorMode; // Enable histograms in event builder processes and algo, 0 = OFF / 1 = ON Int_t fiMonitorMode; // Enable histograms in event builder processes and algo, 0 = OFF / 1 = ON
Int_t Int_t
fiDebugMonitorMode; // Enable extra debuging histos in bth event builder and monitor processes and algo, 0 = OFF / 1 = ON fiDebugMonitorMode; // Enable extra debuging histos in bth event builder and monitor processes and algo, 0 = OFF / 1 = ON
...@@ -94,6 +100,9 @@ private: ...@@ -94,6 +100,9 @@ private:
Int_t fiNrOfModules; // Total number of Modules Int_t fiNrOfModules; // Total number of Modules
TArrayI fiModuleId; // Module Identifier connected to Gbtx link, has to match geometry TArrayI fiModuleId; // Module Identifier connected to Gbtx link, has to match geometry
Int_t fiNrOfSections; // Nr of sections
TArrayD fdMipCalibration; // Calibration array
Int_t fiNbMsTot; // Total number of MS per link in TS Int_t fiNbMsTot; // Total number of MS per link in TS
Int_t fiNbMsOverlap; // Number of overlap MS per TS Int_t fiNbMsOverlap; // Number of overlap MS per TS
Double_t fdSizeMsInNs; // Size of the MS in ns, needed for MS border detection Double_t fdSizeMsInNs; // Size of the MS in ns, needed for MS border detection
......
[CbmMcbm2018PsdPar] [CbmMcbm2018PsdPar]
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
DataVersion Int_t 0
NrOfGdpbs: Int_t 1 NrOfGdpbs: Int_t 1
GdpbIdArray: Int_t \ GdpbIdArray: Int_t \
0x193d 0x193d
...@@ -9,6 +10,9 @@ NrOfGbtx: Int_t 1 ...@@ -9,6 +10,9 @@ NrOfGbtx: Int_t 1
NrOfModules: Int_t 1 NrOfModules: Int_t 1
ModuleId: Int_t \ ModuleId: Int_t \
1 1
NrOfSections: Int_t 10
MipCalibration: Double_t \
11.16 11.25 11.37 11.62 11.45 11.27 10.58 10.29 11.50 10.84
NbMsTot: Int_t 100 NbMsTot: Int_t 100
NbMsOverlap: Int_t 1 NbMsOverlap: Int_t 1
SizeMsInNs: Double_t 102400.0 SizeMsInNs: Double_t 102400.0
......
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