From c5708692d9ae4463294fb55519967ab528345a06 Mon Sep 17 00:00:00 2001
From: Nikolay Karpushkin <karpushkin@inr.ru>
Date: Thu, 29 Oct 2020 17:29:54 +0100
Subject: [PATCH] PSD parameters for mCBM common analysis

---
 macro/beamtime/mcbm2020/.gitignore               | 2 ++
 macro/beamtime/mcbm2020/build_event_win_kronos.C | 2 +-
 macro/beamtime/mcbm2020/mcbm_reco.C              | 6 ++++++
 macro/beamtime/mcbm2020/unpack_tsa_mcbm.C        | 2 +-
 macro/beamtime/mcbm2020/unpack_tsa_mcbm_kronos.C | 2 +-
 5 files changed, 11 insertions(+), 3 deletions(-)
 create mode 100644 macro/beamtime/mcbm2020/.gitignore

diff --git a/macro/beamtime/mcbm2020/.gitignore b/macro/beamtime/mcbm2020/.gitignore
new file mode 100644
index 0000000000..986ffad5b5
--- /dev/null
+++ b/macro/beamtime/mcbm2020/.gitignore
@@ -0,0 +1,2 @@
+all_*.par
+*.root
diff --git a/macro/beamtime/mcbm2020/build_event_win_kronos.C b/macro/beamtime/mcbm2020/build_event_win_kronos.C
index 5abb4df44d..dd087cf1eb 100644
--- a/macro/beamtime/mcbm2020/build_event_win_kronos.C
+++ b/macro/beamtime/mcbm2020/build_event_win_kronos.C
@@ -85,7 +85,7 @@ void build_event_win_kronos(UInt_t uRunIdx = 0,
   eventBuilder->SetTriggerWindow(ECbmModuleId::kTrd, -250, 100);
   eventBuilder->SetTriggerWindow(ECbmModuleId::kTof, -150, 10);
   eventBuilder->SetTriggerWindow(ECbmModuleId::kRich, -50, 50);
-  eventBuilder->SetTriggerWindow(ECbmModuleId::kPsd, -50, 10);
+  eventBuilder->SetTriggerWindow(ECbmModuleId::kPsd, -50, 50);
   //  eventBuilder->SetT0PulserTotLimits(   185, 191 );
   eventBuilder->SetTriggerMinNumber(ECbmModuleId::kT0, 1);
   eventBuilder->SetTriggerMinNumber(ECbmModuleId::kSts, 0);
diff --git a/macro/beamtime/mcbm2020/mcbm_reco.C b/macro/beamtime/mcbm2020/mcbm_reco.C
index 1767133310..5cec8c5244 100644
--- a/macro/beamtime/mcbm2020/mcbm_reco.C
+++ b/macro/beamtime/mcbm2020/mcbm_reco.C
@@ -62,6 +62,12 @@ void mcbm_reco(Int_t runId = 812, Int_t nTimeslices = 0) {
   // -----   Reconstruction tasks   -----------------------------------------
 
 
+  // -----  Psd hit producer   ----------------------------------------------
+  CbmPsdMCbmHitProducer* hitProd = new CbmPsdMCbmHitProducer();
+  run->AddTask(hitProd);
+  // ------------------------------------------------------------------------
+
+
   // -----   Local reconstruction in STS   ----------------------------------
   CbmRecoSts* recoSts = new CbmRecoSts();
   //recoSts->SetTimeCutDigisAbs( 100 );// cluster finder: time cut in ns
diff --git a/macro/beamtime/mcbm2020/unpack_tsa_mcbm.C b/macro/beamtime/mcbm2020/unpack_tsa_mcbm.C
index 6c0edb0567..6afb6d7490 100644
--- a/macro/beamtime/mcbm2020/unpack_tsa_mcbm.C
+++ b/macro/beamtime/mcbm2020/unpack_tsa_mcbm.C
@@ -160,7 +160,7 @@ void unpack_tsa_mcbm(TString inFile  = "",
   unpacker_trdR->SetTimeOffsetNs(0);     // Run 811-866
   unpacker_tof->SetTimeOffsetNs(25);     // Run 811-866
   unpacker_rich->SetTimeOffsetNs(-310);  // Run 811-866
-  unpacker_psd->SetTimeOffsetNs(-240);   // Run 811-866
+  unpacker_psd->SetTimeOffsetNs(-225);   // Run 811-866
 
   // ----------- ASIC by ASIC STS ----------------
   // the first 8 Unused
diff --git a/macro/beamtime/mcbm2020/unpack_tsa_mcbm_kronos.C b/macro/beamtime/mcbm2020/unpack_tsa_mcbm_kronos.C
index 5cd83fe9e5..8bf269b578 100644
--- a/macro/beamtime/mcbm2020/unpack_tsa_mcbm_kronos.C
+++ b/macro/beamtime/mcbm2020/unpack_tsa_mcbm_kronos.C
@@ -186,7 +186,7 @@ void unpack_tsa_mcbm_kronos(UInt_t uRunIdx  = 99999,
   unpacker_trdR->SetTimeOffsetNs(0);     // Run 811-866
   unpacker_tof->SetTimeOffsetNs(25);     // Run 811-866
   unpacker_rich->SetTimeOffsetNs(-310);  // Run 811-866
-  unpacker_psd->SetTimeOffsetNs(-240);   // Run 811-866
+  unpacker_psd->SetTimeOffsetNs(-225);   // Run 811-866
 // ----------- ASIC by ASIC STS ----------------
   // the first 8 Unused
   unpacker_sts ->SetTimeOffsetNsAsic(  0,       0.0  ); // Unused
-- 
GitLab