PandaRoot
BSEmcMCPropagationProcess.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 BSEMCMCPROPAGATIONPROCESS_HH
14 #define BSEMCMCPROPAGATIONPROCESS_HH
15 
16 #include <map>
17 #include <string>
18 #include <vector>
19 
20 #include "Rtypes.h"
21 #include "RtypesCore.h"
22 
23 #include "PndConstContainer.h"
24 #include "PndContainerI.h"
25 #include "PndParameterRegister.h"
26 #include "PndProcess.h"
27 
28 #include "BSEmcMCDeposit.h"
29 
30 class BSEmcCluster;
31 class BSEmcDigi;
32 class BSEmcSubCluster;
33 class FairLink;
34 class FairMultiLinkedData;
36 class TBuffer;
37 class TClass;
38 class TMemberInspector;
39 struct BSEmcClusteringData;
40 template <class T>
41 class PndContainerI;
42 template <class T>
44 
59  public:
62  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
63  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
64  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
65  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
66  virtual void Process() /*override*/;
67  template <class T>
68  void AssignLinks(const std::vector<const BSEmcDigi *> &t_digiCont, const std::vector<T *> &t_array);
69 
70  void SetMCDepositBranchName(const TString &t_branchname) { fMCDepositBranchname = t_branchname; }
71  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
72  void SetClusterBranchName(const TString &t_branchname) { fClusterBranchname = t_branchname; }
73  void SetSubClusterBranchName(const TString &t_branchname) { fSubClusterBranchname = t_branchname; }
74 
75  private:
76  void ResetLinksBesideDepositLinks(BSEmcCluster *t_cluster);
77 
78  class LinkScoreBoard {
79  public:
80  Short_t score{0};
81 
82  void SetValShift(Bool_t val, Int_t shift)
83  {
84  if (shift < 4) {
85  score |= static_cast<int>(val) << shift;
86  }
87  }
88 
89  Bool_t GetValShift(Int_t shift) { return (score >> shift & 0x1) != 0; }
90  };
91 
92  void FillScoreBoard(FairMultiLinkedData t_tracks, std::map<FairLink, LinkScoreBoard> &t_scoreBoard, Int_t t_shift);
93  void AddTracksEnteringExiting(BSEmcCluster *t_cluster, const FairMultiLinkedData &t_tracksEntering, const FairMultiLinkedData &t_tracksExiting);
94 
95  private:
96  TString fMCDepositBranchname{""};
97  TString fDigiBranchname{""};
98  TString fClusterBranchname{""};
99  TString fSubClusterBranchname{""};
100 
101  PndContainerI<BSEmcDigi> *fDigiArray{nullptr};
102  PndMutableContainerI<BSEmcCluster> *fClusterArray{nullptr};
103  PndMutableContainerI<BSEmcSubCluster> *fSubClusterArray{nullptr};
104  PndContainerI<BSEmcMCDeposit> *fMCDepositArray{nullptr};
105 
106  ClassDef(BSEmcMCPropagationProcess, 1);
107 };
108 
109 #endif /*BSEMCMCPROPAGATIONPROCESS_HH*/
Base Process class.
Definition: PndProcess.h:36
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:66
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:59
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)