PandaRoot
BSEmcOnlineBumpSplitter.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //--------------------------------------------------------------------------
14 // File and Version Information:
15 // $Id:$
16 //
17 // Description:
18 // Class BSEmcOnlineBumpSplitter
19 // Implementation of OnlineBumpSplitter which splits clusters based on
20 // local maxima, determined in a 0th order approximation, i.e. by looking
21 // for the two most energetic digis and checking if they are neighbours.
22 //
23 // Environment:
24 // Software developed for the PANDA experiment at GSI.
25 //
26 // Author List:
27 // Marcel Tiemens
28 //------------------------------------------------------------------------
29 //#pragma once
30 #ifndef BSEMCONLINEBUMPSPLITTER_HH
31 #define BSEMCONLINEBUMPSPLITTER_HH
32 
33 #include <map>
34 #include <memory>
35 #include <string>
36 #include <vector>
37 
38 #include "Rtypes.h"
39 #include "RtypesCore.h"
40 
41 #include "FairTask.h"
42 
43 #include "PndContainerI.h"
44 #include "PndProcess.h"
45 
47 #include "BSEmcDigi.h"
49 #include "BSEmcPositionAlgo.h"
50 #include "BSEmcSubCluster.h"
51 
52 class BSEmcCluster;
54 class BSEmcDigi;
56 class BSEmcSubCluster;
58 class TBuffer;
59 class TClass;
60 class TMemberInspector;
61 struct BSEmcClusteringData;
62 template <class T>
63 class PndContainerI;
64 template <class T>
66 
83  public:
85  virtual ~BSEmcOnlineBumpSplitter();
86  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
87  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
88  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
89  virtual void SetupParameters(const PndParameterRegister *t_paramRegister) /*override*/;
90  virtual void Process() /*override*/;
91  virtual void PostProcess();
92  std::vector<BSEmcSubCluster *> Subcluster(const std::vector<const BSEmcDigi *> &t_digiCont, const std::vector<BSEmcCluster *> &t_clusterCont);
93 
94  void SetMinimumSeedEnergy(Double_t minE) { fSeedEnergyThreshold = minE; };
95 
96  void SetPositionParName(const std::string &t_parName) { fPositionParName = t_parName; }
97  void SetNeighbouringRelationParName(const std::string &t_parName) { fNeighbouringRelationParName = t_parName; }
98 
99  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
100  void SetClusterBranchName(const TString &t_branchname) { fClusterBranchname = t_branchname; }
101  void SetSubClusterBranchName(const TString &t_branchname) { fSubClusterBranchname = t_branchname; }
102 
103  protected:
105  void SingleBumpCluster(BSEmcCluster *, Int_t, const std::vector<const BSEmcDigi *> &t_digiCont);
106 
107  private:
108  TString fDigiBranchname{""};
109  TString fClusterBranchname{""};
110  TString fSubClusterBranchname{""};
111 
112  PndContainerI<BSEmcDigi> *fDigiArray{nullptr};
113  PndMutableContainerI<BSEmcCluster> *fClusterArray{nullptr};
114  PndMutableContainerI<BSEmcSubCluster> *fSubClusterArray{nullptr};
115  std::vector<BSEmcSubCluster *> fSubClusterVec{};
116  std::string fNeighbouringRelationParName{""};
117  BSEmcGeoNeighbouringRelationPar *fNeighbouringRelationPar{nullptr};
118  std::string fPositionParName{""};
119  BSEmcCrystalPositionPar *fPositionPar{nullptr};
120  std::unique_ptr<BSEmcPositionAlgo> fPositionProcess{new BSEmcPositionAlgo};
121  Double_t fSeedEnergyThreshold{0.03};
122 
123  ClassDef(BSEmcOnlineBumpSplitter, 1);
124 };
125 #endif /*BSEMCONLINEBUMPSPLITTER_HH*/
Base Process class.
Definition: PndProcess.h:36
virtual void SetDetectorName(const std::string &t_detectorName)
Set the Detector name. Important, as most EmcParameter need to know for which detector they need to b...
virtual void SetupParameters(const PndParameterRegister *t_paramRegister)
Fetch all parameters from the PndParameterRegister.
Helper class to calculate the cluster position.
virtual void RequestDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and get the processes container requirements.
BSEmcSubCluster * AddBump()
virtual ~BSEmcOnlineBumpSplitter()
a cluster (group of neighboring crystals) of hit emc crystals
Definition: BSEmcCluster.h:66
void SetPositionParName(const std::string &t_parName)
Parameter for crystal positions.
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
void SetNeighbouringRelationParName(const std::string &t_parName)
void SetMinimumSeedEnergy(Double_t minE)
represents the reconstructed hit of one emc crystal
Definition: BSEmcDigi.h:59
virtual void PostProcess()
Immediately after calling Process() PostProcess() is called for cleanup of internal process data...
void SetDigiBranchName(const TString &t_branchname)
Interface to a datacontainer to be used in PandaROOT.
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
Neigbouring Relations based on a list of detectorIds.
std::vector< BSEmcSubCluster * > Subcluster(const std::vector< const BSEmcDigi *> &t_digiCont, const std::vector< BSEmcCluster *> &t_clusterCont)
represents a reconstructed (splitted) emc cluster
void SetSubClusterBranchName(const TString &t_branchname)
void SetClusterBranchName(const TString &t_branchname)
void SingleBumpCluster(BSEmcCluster *, Int_t, const std::vector< const BSEmcDigi *> &t_digiCont)