PandaRoot
BSEmcAddLinksToCluster.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 BSEMCADDLINKSTOCLUSTER_HH
14 #define BSEMCADDLINKSTOCLUSTER_HH
15 
16 #include <string>
17 #include <vector>
18 
19 #include "Rtypes.h"
20 
21 #include "PndContainerI.h"
22 #include "PndParameterRegister.h"
23 #include "PndProcess.h"
24 
25 #include "BSEmcCluster.h"
26 
27 #include "BSEmcDigi.h"
28 
29 class BSEmcCluster;
30 class BSEmcDigi;
31 class BSEmcSubCluster;
33 class TBuffer;
34 class TClass;
35 class TMemberInspector;
36 struct BSEmcClusteringData;
37 template <class T>
38 class PndContainerI;
39 template <class T>
41 
53  public:
55  virtual ~BSEmcAddLinksToCluster();
56 
57  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
58  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
59  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
60  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
61  virtual void Process() /*override*/;
62 
63  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
64  void SetClusterBranchName(const TString &t_branchname) { fClusterBranchname = t_branchname; }
65  void SetSubClusterBranchName(const TString &t_branchname) { fSubClusterBranchname = t_branchname; }
66 
67  private:
68  TString fDigiBranchname{""};
69  TString fClusterBranchname{""};
70  TString fSubClusterBranchname{""};
71 
72  template <class T>
73  void SetDigiLinksFor(const std::vector<T *> &t_cluster);
74  void SetClusterLinksFor(const std::vector<BSEmcSubCluster *> &t_subcluster);
75 
76  PndContainerI<BSEmcDigi> *fDigis{nullptr};
77  PndMutableContainerI<BSEmcCluster> *fCluster{nullptr};
78  PndMutableContainerI<BSEmcSubCluster> *fSubCluster{nullptr};
79  ClassDef(BSEmcAddLinksToCluster, 1);
80 };
81 
82 #endif /*BSEMCADDLINKSTOCLUSTER_HH*/
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
Base Process class.
Definition: PndProcess.h:36
void SetSubClusterBranchName(const TString &t_branchname)
void SetDigiBranchName(const TString &t_branchname)
a cluster (group of neighboring crystals) of hit emc crystals
Definition: BSEmcCluster.h:66
virtual void RequestDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and get the processes container requirements.
Helper Process to add links of BSEmcMCDeposits to clusters and subclusters.
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
represents the reconstructed hit of one emc crystal
Definition: BSEmcDigi.h:59
virtual void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
void SetClusterBranchName(const TString &t_branchname)
Interface to a datacontainer to be used in PandaROOT.
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
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...
represents a reconstructed (splitted) emc cluster
virtual ~BSEmcAddLinksToCluster()