PandaRoot
BSEmcLocalMaxFindingProcess.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 //--------------------------------------------------------------------------
14 // Description:
15 // Class EmcERatioLocMaxMaxFinder./
16 // Searches for local maxima in a cluster based on the ratio
17 // between the energy of the maxima crystal and that of
18 // its neighbours
19 //
20 // Environment:
21 // Software developed for the BaBar Detector at the SLAC B-Factory.
22 //
23 // Adapted for the PANDA experiment at GSI
24 //
25 // Author List:
26 // Phil Strother
27 // Helmut Schmuecker Ruhr-Uni Bochum
28 //
29 // Copyright Information:
30 // Copyright (C) 1997 Imperial College
31 // Modified:
32 // M. Babai
33 //------------------------------------------------------------------------
34 //#pragma once
35 #ifndef BSEMCLOCALMAXFINDINGPROCESS_HH
36 #define BSEMCLOCALMAXFINDINGPROCESS_HH
37 #include <string>
38 #include <vector>
39 
40 #include "Rtypes.h"
41 #include "RtypesCore.h"
42 
43 #include "PndContainerI.h"
44 #include "PndParameterRegister.h"
45 #include "PndProcess.h"
46 
47 #include "BSEmcCluster.h"
48 
50 
51 class BSEmcClusteringPar;
52 class BSEmcDigi;
53 class FairParGenericSet;
54 class BSEmcCluster;
57 class TBuffer;
58 class TClass;
59 class TMemberInspector;
60 struct BSEmcClusteringData;
61 struct BSEmcDigiInfo_t;
62 template <class T>
63 class PndContainerI;
64 template <class T>
66 
79  public:
82  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
83  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
84  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
85  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
86  virtual void Process() /*override*/;
87  void FindLocalMaxima(const std::vector<const BSEmcDigi *> &t_digiCont, const std::vector<BSEmcCluster *> &t_clusterCont);
88  void SetClusteringParName(const std::string &t_parName) { fClusteringParName = t_parName; }
89  void SetNeighbouringRelationParName(const std::string &t_parName) { fNeighbouringRelationParName = t_parName; }
90 
91  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
92  void SetClusterBranchName(const TString &t_branchname) { fClusterBranchname = t_branchname; }
93 
94  protected:
95  Bool_t IsLocalMaximum(const BSEmcDigi *t_digi, const std::vector<const BSEmcDigi *> &t_neighbours) const;
96  std::vector<const BSEmcDigi *>
97  GetNeigboursOf(const std::vector<const BSEmcDigi *> &t_digiCont, const BSEmcDigiInfo_t &t_digi, const std::vector<BSEmcDigiInfo_t> &t_potentialneighbours) const;
98 
99  private:
100  std::string fClusteringParName{""};
101  std::string fNeighbouringRelationParName{""};
102 
103  TString fDigiBranchname{""};
104  TString fClusterBranchname{""};
105 
106  PndContainerI<BSEmcDigi> *fDigiArray{nullptr};
107  PndMutableContainerI<BSEmcCluster> *fClusterArray{nullptr};
108  Double_t fMaximumsEnergyThreshold{-1};
109  BSEmcGeoNeighbouringRelationPar *fNeighbouringRelationPar{nullptr};
110  ClassDef(BSEmcLocalMaxFindingProcess, 1);
111 };
112 
113 #endif /*BSEMCLOCALMAXFINDINGPROCESS_HH*/
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
Base Process class.
Definition: PndProcess.h:36
Container for clustering parameter.
std::vector< const BSEmcDigi * > GetNeigboursOf(const std::vector< const BSEmcDigi *> &t_digiCont, const BSEmcDigiInfo_t &t_digi, const std::vector< BSEmcDigiInfo_t > &t_potentialneighbours) const
virtual ~BSEmcLocalMaxFindingProcess()
Process to find all local maxima within a cluster.
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 SetClusteringParName(const std::string &t_parName)
void SetNeighbouringRelationParName(const std::string &t_parName)
virtual void RequestDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and get the processes container requirements.
void SetClusterBranchName(const TString &t_branchname)
a cluster (group of neighboring crystals) of hit emc crystals
Definition: BSEmcCluster.h:66
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.
Interface to a datacontainer to be used in PandaROOT.
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
Neigbouring Relations based on a list of detectorIds.
void FindLocalMaxima(const std::vector< const BSEmcDigi *> &t_digiCont, const std::vector< BSEmcCluster *> &t_clusterCont)
void SetDigiBranchName(const TString &t_branchname)
simple Struct used in Cluster classes to index crystal. Includes the weight of the crystal on the cur...
Definition: BSEmcCluster.h:51
Bool_t IsLocalMaximum(const BSEmcDigi *t_digi, const std::vector< const BSEmcDigi *> &t_neighbours) const