diff --git a/macro/mvd/qa/mvd_qa1_transUrqmd.C b/macro/mvd/qa/mvd_qa1_transUrqmd.C index f9730d52387eee18c28118c0e4e915a0ff81628a..6ad2d6d3931963f9afc19fc40ccf74eccc305d0a 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/mvd/CbmMvdClusterfinder.cxx b/mvd/CbmMvdClusterfinder.cxx index 6217ec13384bae3ac3cf322f5484d20c6b1f7b8c..9b566b3c89ecdbed919841afa5148dadaede4b7e 100644 --- a/mvd/CbmMvdClusterfinder.cxx +++ b/mvd/CbmMvdClusterfinder.cxx @@ -83,21 +83,37 @@ CbmMvdClusterfinder::~CbmMvdClusterfinder() void CbmMvdClusterfinder::Exec(Option_t* /*opt*/) { // --- Start timer - fTimer.Start(); + fTimer.Start(); - fCluster->Delete(); - if (fDigiMan->GetNofDigis(ECbmModuleId::kMvd)) { + fCluster->Delete(); + if (fDigiMan->GetNofDigis(ECbmModuleId::kMvd)) { if (fVerbose) cout << "//----------------------------------------//"; if (fVerbose) cout << endl << "Send Input" << endl; - 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 + + Int_t nTargetPlugin=fDetector->DetectPlugin(200); + CbmMvdDigi* digi=0; + + Int_t nDigis = fDigiMan->GetNofDigis(ECbmModuleId::kMvd); + + for (Int_t i = 0; i < nDigis; i++) { + digi = new CbmMvdDigi(*(fDigiMan->Get<CbmMvdDigi>(i))); + digi->SetRefId(i); + + fDetector->SendInputToSensorPlugin(digi->GetDetectorId(), nTargetPlugin, static_cast<TObject*>(digi)); + } + + + + + //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 << setprecision(6) << fTimer.RealTime() << " s"; } diff --git a/mvd/CbmMvdHitfinder.cxx b/mvd/CbmMvdHitfinder.cxx index cab28ff421c89ecd0923ff08f670c226c498c1e9..2664b764cd96ac2886f97933681b72c336edc3ee 100644 --- a/mvd/CbmMvdHitfinder.cxx +++ b/mvd/CbmMvdHitfinder.cxx @@ -44,7 +44,7 @@ CbmMvdHitfinder::CbmMvdHitfinder() , fInputCluster(NULL) , fHits(NULL) , fHitfinderPluginNr(0) - , useClusterfinder(kFALSE) + , fUseClusterfinder(kFALSE) , fShowDebugHistos(kFALSE) , fTimer() , fmode(-1) @@ -60,7 +60,7 @@ CbmMvdHitfinder::CbmMvdHitfinder(const char* name, Int_t iVerbose) , fInputCluster(NULL) , fHits(NULL) , fHitfinderPluginNr(0) - , useClusterfinder(kFALSE) + , fUseClusterfinder(kFALSE) , fShowDebugHistos(kFALSE) , fTimer() , fmode(-1) @@ -76,7 +76,7 @@ CbmMvdHitfinder::CbmMvdHitfinder(const char* name, Int_t mode, Int_t iVerbose) , fInputCluster(NULL) , fHits(NULL) , fHitfinderPluginNr(0) - , useClusterfinder(kFALSE) + , fUseClusterfinder(kFALSE) , fShowDebugHistos(kFALSE) , fTimer() , fmode(mode) @@ -104,12 +104,47 @@ void CbmMvdHitfinder::Exec(Option_t* /*opt*/) fHits->Clear(); fTimer.Start(); - if (fDigiMan->IsPresent(ECbmModuleId::kMvd) || fInputCluster) { + Int_t nTargetPlugin= fDetector->DetectPlugin(300); + Int_t nDigis; + CbmMvdDigi* digi=0; + CbmMvdCluster* cluster=0; + + if (fDigiMan->IsPresent(ECbmModuleId::kMvd) || fInputCluster) { //checks if data sources are available if (fVerbose) cout << endl << "//----------------------------------------//" << endl; - if (!useClusterfinder) fDetector->SendInputDigis(fDigiMan); - else - fDetector->SendInputCluster(fInputCluster); + if (!fUseClusterfinder) { + fDigiMan->GetNofDigis(ECbmModuleId::kMvd); + for (Int_t i = 0; i < nDigis; i++) { + digi = new CbmMvdDigi(*(fDigiMan->Get<CbmMvdDigi>(i))); + digi->SetRefId(i); + + fDetector->SendInputToSensorPlugin(digi->GetDetectorId(), nTargetPlugin, static_cast<TObject*>(digi)); + } + } + + + //fDetector->SendInputDigis(fDigiMan); + + + + else // of if (!fUseClusterfinder) + { + + + Int_t nEntries = fInputCluster->GetEntriesFast(); + for (Int_t i = 0; i < nEntries; i++) { + cluster = (CbmMvdCluster*) fInputCluster->At(i); + cluster->SetRefId(i); + fDetector->SendInputToSensorPlugin(cluster->GetDetectorId(), nTargetPlugin, static_cast<TObject*>(cluster)); + + } + } + + //fDetector->SendInputCluster(fInputCluster); + + if (fVerbose) cout << "Execute HitfinderPlugin Nr. " << fHitfinderPluginNr << endl; + + fDetector->Exec(fHitfinderPluginNr); if (fVerbose) cout << "End Chain" << endl; if (fVerbose) cout << "Start writing Hits" << endl; @@ -143,7 +178,7 @@ InitStatus CbmMvdHitfinder::Init() } // ********** Get input arrays - if (!useClusterfinder) { + if (!fUseClusterfinder) { fDigiMan = CbmDigiManager::Instance(); fDigiMan->Init(); if (!fDigiMan->IsPresent(ECbmModuleId::kMvd)) { diff --git a/mvd/CbmMvdHitfinder.h b/mvd/CbmMvdHitfinder.h index b0abceb6779b394b63c3a476ab460e119f084c1b..32439479c7ec572685a55a31274c899969dd14d7 100644 --- a/mvd/CbmMvdHitfinder.h +++ b/mvd/CbmMvdHitfinder.h @@ -39,7 +39,7 @@ public: void Exec(Option_t* opt); void UseClusterfinder(Bool_t clusterfinderFlag) { - useClusterfinder = clusterfinderFlag; + fUseClusterfinder = clusterfinderFlag; }; //* enable use of external clusterfinder void ShowDebugHistos() { fShowDebugHistos = kTRUE; } @@ -52,7 +52,7 @@ private: TClonesArray* fHits; UInt_t fHitfinderPluginNr; - Bool_t useClusterfinder; + Bool_t fUseClusterfinder; Bool_t fShowDebugHistos; TStopwatch fTimer; ///< ROOT timer Int_t fmode; diff --git a/mvd/CbmMvdSensor.h b/mvd/CbmMvdSensor.h index 15678fb6061471496a29dab3098d91a5afe04853..fd521ef166b184b133796afea362f52a47faf4d4 100644 --- a/mvd/CbmMvdSensor.h +++ b/mvd/CbmMvdSensor.h @@ -74,7 +74,7 @@ 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 SendInput(CbmMvdPoint* point); void SendInputDigi(CbmMvdDigi* digi); void SendInputDigiToHit(CbmMvdDigi* digi); void SendInputCluster(CbmMvdCluster* cluster); diff --git a/mvd/plugins/tasks/CbmMvdSensorClusterfinderTask.cxx b/mvd/plugins/tasks/CbmMvdSensorClusterfinderTask.cxx index f1dd543bcf08300fb60f760c5cab3b533a4af90a..d2e26fae71f6f36e1f07cb0714b8a473d5183ed9 100644 --- a/mvd/plugins/tasks/CbmMvdSensorClusterfinderTask.cxx +++ b/mvd/plugins/tasks/CbmMvdSensorClusterfinderTask.cxx @@ -95,8 +95,8 @@ void CbmMvdSensorClusterfinderTask::InitTask(CbmMvdSensor* mysensor) fSensor = mysensor; //cout << "-Start- " << GetName() << ": Initialisation of sensor " << fSensor->GetName() << endl; - fInputBuffer = new TClonesArray("CbmMvdDigi", 10000); - fOutputBuffer = new TClonesArray("CbmMvdCluster", 10000); + fInputBuffer = new TClonesArray("CbmMvdDigi", 100); + fOutputBuffer = new TClonesArray("CbmMvdCluster", 100); //Add charge collection histograms diff --git a/mvd/plugins/tasks/CbmMvdSensorDigitizerTask.cxx b/mvd/plugins/tasks/CbmMvdSensorDigitizerTask.cxx index 9f3abbe13cd5077de8ee512478b2212e5fe097af..705131320ca850b85669b89ff052007c56285c4c 100644 --- a/mvd/plugins/tasks/CbmMvdSensorDigitizerTask.cxx +++ b/mvd/plugins/tasks/CbmMvdSensorDigitizerTask.cxx @@ -998,11 +998,11 @@ void CbmMvdSensorDigitizerTask::InitTask(CbmMvdSensor* mySensor) // cout << "-I- " << GetName() << ": Initialisation of sensor " << fSensor->GetName() << endl; - fDigis = new TClonesArray("CbmMvdDigi", 10000); - fDigiMatch = new TClonesArray("CbmMatch", 10000); + fDigis = new TClonesArray("CbmMvdDigi", 100); + fDigiMatch = new TClonesArray("CbmMatch", 100); - fOutputBuffer = new TClonesArray("CbmMvdDigi", 10000); - fInputPoints = new TClonesArray("CbmMvdPoint", 10000); + fOutputBuffer = new TClonesArray("CbmMvdDigi", 100); + fInputPoints = new TClonesArray("CbmMvdPoint", 100); if (!fSensor) { Fatal(GetName(), "Fatal error: Init(CbmMvdSensor*) called without valid pointer, "