PandaRoot
BSEmcMergeRecoHits.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 #ifndef BSEMCMERGERECOHITS_HH
14 #define BSEMCMERGERECOHITS_HH
15 
16 #include "BSEmcCluster.h"
17 
21 #include "BSEmcPositionAlgo.h"
22 #include "PndContainerI.h"
23 #include "PndMutableContainerI.h"
24 #include "PndParameterRegister.h"
25 #include "PndProcess.h"
26 #include <vector>
27 
28 class FairParGenericSet;
29 class BSEmcClusteringPar;
30 
31 class BSEmcDigi;
32 class BSEmcCluster;
33 class BSEmcSubCluster;
34 class BSEmcRecoHit;
35 
37  public:
39  virtual ~BSEmcMergeRecoHits();
40  virtual void SetDetectorName(const std::string &t_detectorName);
41  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister);
42  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
43  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
44  virtual void Process() /*override*/;
45 
46  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
47  void SetClusterBranchName(const TString &t_branchname) { fClusterBranchname = t_branchname; }
48  void SetSubClusterBranchName(const TString &t_branchname) { fSubClusterBranchname = t_branchname; }
49  void SetRecoHitBranchName(const TString &t_branchname) { fRecoHitBranchname = t_branchname; }
50 
51  protected:
59  virtual double CalculateDistance(const TVector3 &firstposition, const TVector3 &secondposition);
60 
67  virtual Int_t FindClosestHit(const BSEmcRecoHit *CurrentRecoHit);
68 
76  virtual void FillTmpSubcluster(BSEmcSubCluster *TmpSubCluster, const BSEmcSubCluster *SubCluster);
77 
85  virtual void UpdateRecoHit(const BSEmcSubCluster *MainSubCluster, const Int_t MainSubClusterId);
86 
91  virtual void CleanUpRecoHitArray();
92 
93  std::string fClusteringParName{""};
94  std::string fClusterPropertiesParName{""};
95  std::string fPositionParName{""};
99 
100  TString fDigiBranchname{""};
101  TString fClusterBranchname{""};
103  TString fRecoHitBranchname{""};
104 
109  std::unique_ptr<BSEmcEnergyCalculationAlgo> fEnergyProcess{new BSEmcEnergyCalculationAlgo};
110  std::unique_ptr<BSEmcPositionAlgo> fPositionProcess{new BSEmcPositionAlgo};
112 
114 };
115 
116 #endif /*BSEMCMERGERECOHITS_HH*/
Base Process class.
Definition: PndProcess.h:36
Resembles/Contains all information a particle hitting the EMC can provide for later use in the PID st...
Definition: BSEmcRecoHit.h:43
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:66
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:59
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...