PandaRoot
BSEmcOnlineBumpSplitter.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 // File and Version Information:
3 // $Id:$
4 //
5 // Description:
6 // Class BSEmcOnlineBumpSplitter
7 // Implementation of OnlineBumpSplitter which splits clusters based on
8 // local maxima, determined in a 0th order approximation, i.e. by looking
9 // for the two most energetic digis and checking if they are neighbours.
10 //
11 // Environment:
12 // Software developed for the PANDA experiment at GSI.
13 //
14 // Author List:
15 // Marcel Tiemens
16 //------------------------------------------------------------------------
17 //#pragma once
18 #ifndef BSEMCONLINEBUMPSPLITTER_HH
19 #define BSEMCONLINEBUMPSPLITTER_HH
20 
21 #include <map>
22 #include <memory>
23 #include <string>
24 #include <vector>
25 
26 #include "Rtypes.h"
27 #include "RtypesCore.h"
28 
29 #include "FairTask.h"
30 
31 #include "PndContainerI.h"
32 #include "PndProcess.h"
33 
35 #include "BSEmcDigi.h"
37 #include "BSEmcPositionAlgo.h"
38 #include "BSEmcSubCluster.h"
39 
40 class BSEmcCluster;
42 class BSEmcDigi;
44 class BSEmcSubCluster;
46 class TBuffer;
47 class TClass;
48 class TMemberInspector;
49 struct BSEmcClusteringData;
50 template <class T>
51 class PndContainerI;
52 template <class T>
54 
71  public:
73  virtual ~BSEmcOnlineBumpSplitter();
74  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
75  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
76  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
77  virtual void SetupParameters(const PndParameterRegister *t_paramRegister) /*override*/;
78  virtual void Process() /*override*/;
79  virtual void PostProcess();
80  std::vector<BSEmcSubCluster *> Subcluster(const std::vector<const BSEmcDigi *> &t_digiCont, const std::vector<BSEmcCluster *> &t_clusterCont);
81 
82  void SetMinimumSeedEnergy(Double_t minE) { fSeedEnergyThreshold = minE; };
83 
84  void SetPositionParName(const std::string &t_parName) { fPositionParName = t_parName; }
85  void SetNeighbouringRelationParName(const std::string &t_parName) { fNeighbouringRelationParName = t_parName; }
86 
87  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
88  void SetClusterBranchName(const TString &t_branchname) { fClusterBranchname = t_branchname; }
89  void SetSubClusterBranchName(const TString &t_branchname) { fSubClusterBranchname = t_branchname; }
90 
91  protected:
93  void SingleBumpCluster(BSEmcCluster *, Int_t, const std::vector<const BSEmcDigi *> &t_digiCont);
94 
95  private:
96  TString fDigiBranchname{""};
97  TString fClusterBranchname{""};
98  TString fSubClusterBranchname{""};
99 
100  PndContainerI<BSEmcDigi> *fDigiArray{nullptr};
101  PndMutableContainerI<BSEmcCluster> *fClusterArray{nullptr};
102  PndMutableContainerI<BSEmcSubCluster> *fSubClusterArray{nullptr};
103  std::vector<BSEmcSubCluster *> fSubClusterVec{};
104  std::string fNeighbouringRelationParName{""};
105  BSEmcGeoNeighbouringRelationPar *fNeighbouringRelationPar{nullptr};
106  std::string fPositionParName{""};
107  BSEmcCrystalPositionPar *fPositionPar{nullptr};
108  std::unique_ptr<BSEmcPositionAlgo> fPositionProcess{new BSEmcPositionAlgo};
109  Double_t fSeedEnergyThreshold{0.03};
110 
111  ClassDef(BSEmcOnlineBumpSplitter, 1);
112 };
113 #endif /*BSEMCONLINEBUMPSPLITTER_HH*/
Base Process class.
Definition: PndProcess.h:24
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:54
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:47
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)