From e8d3ee12368e00390573cb4d6c92fd0227c2a32f Mon Sep 17 00:00:00 2001
From: Michael Deveaux <deveaux@physik.uni-frankfurt.de>
Date: Wed, 18 Jan 2023 10:55:08 +0100
Subject: [PATCH] Data transfer by TObject added to Clusterfinder and hit
 finder

---
 core/detectors/mvd/CbmMvdSensor.h          |  6 ++++
 macro/mvd/qa/mvd_qa1_transUrqmd.C          |  2 +-
 reco/detectors/mvd/CbmMvdClusterfinder.cxx | 34 ++++++++++++++++++++++
 3 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/core/detectors/mvd/CbmMvdSensor.h b/core/detectors/mvd/CbmMvdSensor.h
index 62d0f38eac..ed75e54250 100644
--- a/core/detectors/mvd/CbmMvdSensor.h
+++ b/core/detectors/mvd/CbmMvdSensor.h
@@ -75,6 +75,12 @@ public:
   CbmMvdSensorDataSheet* GetDataSheet() { return fSensorData; }
   void SetDataSheet(CbmMvdSensorDataSheet* sheet) { fSensorData = sheet; }
   void SetMap(std::map<Int_t, Int_t> SensorMap) { fSensorMap = SensorMap; }  // Get Sensor Map to identify every Sensor
+/*
+  //void SendInput(CbmMvdPoint* point);
+  void SendInputDigi(CbmMvdDigi* digi);
+  void SendInputDigiToHit(CbmMvdDigi* digi);
+  void SendInputCluster(CbmMvdCluster* cluster);
+*/
   void SetStation(Int_t StationNumber) { fStationNr = StationNumber; }
   void SendInputToPlugin(Int_t nPlugin, TObject* input);
 
diff --git a/macro/mvd/qa/mvd_qa1_transUrqmd.C b/macro/mvd/qa/mvd_qa1_transUrqmd.C
index f9730d5238..6ad2d6d393 100644
--- a/macro/mvd/qa/mvd_qa1_transUrqmd.C
+++ b/macro/mvd/qa/mvd_qa1_transUrqmd.C
@@ -163,7 +163,7 @@ void mvd_qa1_transUrqmd(const char* setup = "sis100_electron")
   // --- Uniform distribution of event plane angle
   primGen->SetEventPlane(0., 2. * TMath::Pi());
   // --- Get target parameters
-  TVector3 targetPos(0., 0., 0.);
+  TVector3 targetPos(0., 0., -44.);
   Double_t tDz = 0.;
   if (target) {
     targetPos = target->GetPosition();
diff --git a/reco/detectors/mvd/CbmMvdClusterfinder.cxx b/reco/detectors/mvd/CbmMvdClusterfinder.cxx
index 70f62ab9d6..354984e662 100644
--- a/reco/detectors/mvd/CbmMvdClusterfinder.cxx
+++ b/reco/detectors/mvd/CbmMvdClusterfinder.cxx
@@ -90,6 +90,22 @@ void CbmMvdClusterfinder::Exec(Option_t* /*opt*/)
 
     LOG(debug) << "CbmMvdClusterfinder::Exec - nDigis= " << nDigis;
 
+/*
+=======
+ fTimer.Start();
+
+ fCluster->Delete();
+ if (fDigiMan->GetNofDigis(ECbmModuleId::kMvd)) {
+    if (fVerbose) cout << "//----------------------------------------//";
+    if (fVerbose) cout << endl << "Send Input" << endl;
+
+    Int_t nTargetPlugin=fDetector->DetectPlugin(200);
+    CbmMvdDigi* digi=0;
+
+    Int_t nDigis = fDigiMan->GetNofDigis(ECbmModuleId::kMvd);
+
+>>>>>>> 04a94e4a (Data transfer by TObject added to Clusterfinder and hit finder):mvd/CbmMvdClusterfinder.cxx
+*/
     for (Int_t i = 0; i < nDigis; i++) {
       digi = new CbmMvdDigi(*(fDigiMan->Get<CbmMvdDigi>(i)));
       digi->SetRefId(i);
@@ -114,6 +130,24 @@ void CbmMvdClusterfinder::Exec(Option_t* /*opt*/)
     if (fVerbose) LOG(debug) << "Total of " << fCluster->GetEntriesFast() << " Cluster in this Event";
     if (fVerbose) LOG(debug) << "//----------------------------------------//";
     LOG(info) << "+ " << setw(20) << GetName() << ": Created: " << fCluster->GetEntriesFast() << " cluster in " << fixed
+/*
+=======
+      }
+
+
+
+
+      //fDetector->SendInputDigis(fDigiMan);
+      if (fVerbose) cout << "Execute ClusterPlugin Nr. " << fClusterPluginNr << endl;
+      fDetector->Exec(fClusterPluginNr);
+      if (fVerbose) cout << "End Chain" << endl;
+      if (fVerbose) cout << "Start writing Cluster" << endl;
+      fCluster->AbsorbObjects(fDetector->GetOutputCluster(), 0, fDetector->GetOutputCluster()->GetEntriesFast() - 1);
+      if (fVerbose) cout << "Total of " << fCluster->GetEntriesFast() << " Cluster in this Event" << endl;
+      if (fVerbose) cout << "//----------------------------------------//" << endl;
+      LOG(info) << "+ " << setw(20) << GetName() << ": Created: " << fCluster->GetEntriesFast() << " cluster in " << fixed
+>>>>>>> 04a94e4a (Data transfer by TObject added to Clusterfinder and hit finder):mvd/CbmMvdClusterfinder.cxx
+*/
               << setprecision(6) << fTimer.RealTime() << " s";
   }
 
-- 
GitLab