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 "PndContainerI.h"
12 #include "PndInputContainer.h"
13 #include "PndParameterRegister.h"
14 #include "PndProcess.h"
15 
16 #include "BSEmcClusteringData.h"
17 #include "BSEmcMCHit.h"
18 
19 class BSEmcCluster;
20 class BSEmcDigi;
21 class BSEmcSubCluster;
22 class FairLink;
23 class FairMultiLinkedData;
25 class TBuffer;
26 class TClass;
27 class TMemberInspector;
28 struct BSEmcClusteringData;
29 template <class T>
30 class PndContainerI;
31 template <class T>
33 
45 class BSEmcMCPropagationProcess : public PndProcess<BSEmcClusteringData> {
46  public:
49  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
50  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
51  virtual void SetData(BSEmcClusteringData *t_pdata) /*override*/;
52  virtual void Process() /*override*/;
53  template <class T>
54  void AssignLinks(const std::vector<const BSEmcDigi *> &t_digiCont, const std::vector<T *> &t_array);
55 
56  private:
57  void ResetLinksBesideHitLinks(BSEmcCluster *t_cluster);
58 
59  class LinkScoreBoard {
60  public:
61  Short_t score{0};
62 
63  void SetValShift(Bool_t val, Int_t shift)
64  {
65  if (shift < 4) {
66  score |= static_cast<int>(val) << shift;
67  }
68  }
69 
70  Bool_t GetValShift(Int_t shift) { return (score >> shift & 0x1) != 0; }
71  };
72 
73  void FillScoreBoard(FairMultiLinkedData t_tracks, std::map<FairLink, LinkScoreBoard> &t_scoreBoard, Int_t t_shift);
74  void AddTracksEnteringExiting(BSEmcCluster *t_cluster, const FairMultiLinkedData &t_tracksEntering, const FairMultiLinkedData &t_tracksExiting);
75 
76  private:
78  PndContainerI<BSEmcDigi> *fDigiArray{nullptr};
79  PndOutputContainerI<BSEmcCluster> *fClusterArray{nullptr};
80  PndOutputContainerI<BSEmcSubCluster> *fSubClusterArray{nullptr};
81  PndInputContainer<BSEmcMCHit> fMCHitArray{};
82  std::string fHitBranchName{""};
83  std::string fDigiBranchName{""};
84  std::string fClusterBranchName{""};
85  std::string fSubClusterBranchName{""};
86  ClassDef(BSEmcMCPropagationProcess, 1);
87 };
88 
89 #endif /*BSEMCMCPROPAGATIONPROCESS_HH*/
Base Process class.
Definition: PndProcess.h:24
"Smart" container that figures out for you what underlying container needs to be fetched from FairRoo...
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)
virtual void SetData(BSEmcClusteringData *t_pdata)
Pass the data container ptrs to the process, and store pointers in class members. ...
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.
virtual void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
Container of addresses for data Container used by BSEmcClusteringTask and passed to Clustering Proces...
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.
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
represents a reconstructed (splitted) emc cluster