PandaRoot
BSEmcMergeRecoHits.h
Go to the documentation of this file.
1 #ifndef BSEMCMERGERECOHITS_HH
2 #define BSEMCMERGERECOHITS_HH
3 
4 #include "BSEmcCluster.h"
5 
9 #include "BSEmcPositionAlgo.h"
10 #include "PndContainerI.h"
11 #include "PndMutableContainerI.h"
12 #include "PndParameterRegister.h"
13 #include "PndProcess.h"
14 #include <vector>
15 
16 class FairParGenericSet;
17 class BSEmcClusteringPar;
18 
19 class BSEmcDigi;
20 class BSEmcCluster;
21 class BSEmcSubCluster;
22 class BSEmcRecoHit;
23 
25  public:
27  virtual ~BSEmcMergeRecoHits();
28  virtual void SetDetectorName(const std::string &t_detectorName);
29  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister);
30  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
31  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
32  virtual void Process() /*override*/;
33 
34  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
35  void SetClusterBranchName(const TString &t_branchname) { fClusterBranchname = t_branchname; }
36  void SetSubClusterBranchName(const TString &t_branchname) { fSubClusterBranchname = t_branchname; }
37  void SetRecoHitBranchName(const TString &t_branchname) { fRecoHitBranchname = t_branchname; }
38 
39  protected:
47  virtual double CalculateDistance(const TVector3 &firstposition, const TVector3 &secondposition);
48 
55  virtual Int_t FindClosestHit(const BSEmcRecoHit *CurrentRecoHit);
56 
64  virtual void FillTmpSubcluster(BSEmcSubCluster *TmpSubCluster, const BSEmcSubCluster *SubCluster);
65 
73  virtual void UpdateRecoHit(const BSEmcSubCluster *MainSubCluster, const Int_t MainSubClusterId);
74 
79  virtual void CleanUpRecoHitArray();
80 
81  std::string fClusteringParName{""};
82  std::string fClusterPropertiesParName{""};
83  std::string fPositionParName{""};
87 
88  TString fDigiBranchname{""};
89  TString fClusterBranchname{""};
90  TString fSubClusterBranchname{""};
91  TString fRecoHitBranchname{""};
92 
97  std::unique_ptr<BSEmcEnergyCalculationAlgo> fEnergyProcess{new BSEmcEnergyCalculationAlgo};
98  std::unique_ptr<BSEmcPositionAlgo> fPositionProcess{new BSEmcPositionAlgo};
100 
102 };
103 
104 #endif /*BSEMCMERGERECOHITS_HH*/
Base Process class.
Definition: PndProcess.h:24
Resembles/Contains all information a particle hitting the EMC can provide for later use in the PID st...
Definition: BSEmcRecoHit.h:31
Container for clustering parameter.
PndMutableContainerI< BSEmcRecoHit > * fRecoHitArray
void SetSubClusterBranchName(const TString &t_branchname)
virtual void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
const BSEmcCrystalPositionPar * fPositionPar
virtual ~BSEmcMergeRecoHits()
PndContainerI< BSEmcSubCluster > * fSubClusterArray
Helper class to calculate the cluster position.
void SetClusterBranchName(const TString &t_branchname)
virtual void RequestDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and get the processes container requirements.
void SetDigiBranchName(const TString &t_branchname)
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
virtual void UpdateRecoHit(const BSEmcSubCluster *MainSubCluster, const Int_t MainSubClusterId)
Update the energy values of the main RecoHit based on the temporary SubCluster.
std::unique_ptr< BSEmcEnergyCalculationAlgo > fEnergyProcess
BSEmcGeoNeighbouringRelationPar * fNeighbouringRelationPar
PndContainerI< BSEmcDigi > * fDigiArray
ClassDef(BSEmcMergeRecoHits, 1)
a cluster (group of neighboring crystals) of hit emc crystals
Definition: BSEmcCluster.h:54
PndContainerI< BSEmcCluster > * fClusterArray
virtual void CleanUpRecoHitArray()
Remove SplitOff RecoHits and compress the RecoHitArray.
Parameter for crystal positions.
void SetRecoHitBranchName(const TString &t_branchname)
virtual Int_t FindClosestHit(const BSEmcRecoHit *CurrentRecoHit)
Find the Reco Hit, which lies closest to the given RecoHit.
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 double CalculateDistance(const TVector3 &firstposition, const TVector3 &secondposition)
Calculate the distance of two given RecoHit positions.
std::string fNeighbouringRelationParName
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
std::string fClusterPropertiesParName
represents the reconstructed hit of one emc crystal
Definition: BSEmcDigi.h:47
std::string fPositionParName
std::unique_ptr< BSEmcPositionAlgo > fPositionProcess
Interface to a datacontainer to be used in PandaROOT.
std::string fClusteringParName
Helper class to calculate the Energies of a cluster.
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
Neigbouring Relations based on a list of detectorIds.
represents a reconstructed (splitted) emc cluster
virtual void FillTmpSubcluster(BSEmcSubCluster *TmpSubCluster, const BSEmcSubCluster *SubCluster)
Combine the digis of the given SubCluster and the temporary SubCluster and re-calculate energy and po...