PandaRoot
BSEmcMCPropagationProcess.h
Go to the documentation of this file.
1 #ifndef BSEMCMCPROPAGATIONPROCESS_HH
2 #define BSEMCMCPROPAGATIONPROCESS_HH
3 
4 #include <map>
5 #include <string>
6 #include <vector>
7 
8 #include "Rtypes.h"
9 #include "RtypesCore.h"
10 
11 #include "PndConstContainer.h"
12 #include "PndContainerI.h"
13 #include "PndParameterRegister.h"
14 #include "PndProcess.h"
15 
16 #include "BSEmcMCDeposit.h"
17 
18 class BSEmcCluster;
19 class BSEmcDigi;
20 class BSEmcSubCluster;
21 class FairLink;
22 class FairMultiLinkedData;
24 class TBuffer;
25 class TClass;
26 class TMemberInspector;
27 struct BSEmcClusteringData;
28 template <class T>
29 class PndContainerI;
30 template <class T>
32 
47  public:
50  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
51  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
52  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
53  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
54  virtual void Process() /*override*/;
55  template <class T>
56  void AssignLinks(const std::vector<const BSEmcDigi *> &t_digiCont, const std::vector<T *> &t_array);
57 
58  void SetMCDepositBranchName(const TString &t_branchname) { fMCDepositBranchname = t_branchname; }
59  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
60  void SetClusterBranchName(const TString &t_branchname) { fClusterBranchname = t_branchname; }
61  void SetSubClusterBranchName(const TString &t_branchname) { fSubClusterBranchname = t_branchname; }
62 
63  private:
64  void ResetLinksBesideDepositLinks(BSEmcCluster *t_cluster);
65 
66  class LinkScoreBoard {
67  public:
68  Short_t score{0};
69 
70  void SetValShift(Bool_t val, Int_t shift)
71  {
72  if (shift < 4) {
73  score |= static_cast<int>(val) << shift;
74  }
75  }
76 
77  Bool_t GetValShift(Int_t shift) { return (score >> shift & 0x1) != 0; }
78  };
79 
80  void FillScoreBoard(FairMultiLinkedData t_tracks, std::map<FairLink, LinkScoreBoard> &t_scoreBoard, Int_t t_shift);
81  void AddTracksEnteringExiting(BSEmcCluster *t_cluster, const FairMultiLinkedData &t_tracksEntering, const FairMultiLinkedData &t_tracksExiting);
82 
83  private:
84  TString fMCDepositBranchname{""};
85  TString fDigiBranchname{""};
86  TString fClusterBranchname{""};
87  TString fSubClusterBranchname{""};
88 
89  PndContainerI<BSEmcDigi> *fDigiArray{nullptr};
90  PndMutableContainerI<BSEmcCluster> *fClusterArray{nullptr};
91  PndMutableContainerI<BSEmcSubCluster> *fSubClusterArray{nullptr};
92  PndContainerI<BSEmcMCDeposit> *fMCDepositArray{nullptr};
93 
94  ClassDef(BSEmcMCPropagationProcess, 1);
95 };
96 
97 #endif /*BSEMCMCPROPAGATIONPROCESS_HH*/
Base Process class.
Definition: PndProcess.h:24
void SetDigiBranchName(const TString &t_branchname)
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...
void AssignLinks(const std::vector< const BSEmcDigi *> &t_digiCont, const std::vector< T *> &t_array)
void SetMCDepositBranchName(const TString &t_branchname)
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
a cluster (group of neighboring crystals) of hit emc crystals
Definition: BSEmcCluster.h:54
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
void SetSubClusterBranchName(const TString &t_branchname)
virtual void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
represents the reconstructed hit of one emc crystal
Definition: BSEmcDigi.h:47
virtual ~BSEmcMCPropagationProcess()
Interface to a datacontainer to be used in PandaROOT.
Process to determine entering and exiting tracks into cluster.
virtual void RequestDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and get the processes container requirements.
Container to wrap PndTCA/STDConstContainer (not needed anymore)
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
represents a reconstructed (splitted) emc cluster
void SetClusterBranchName(const TString &t_branchname)