PandaRoot
BSEmcLocalMaxFindingProcess.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 // Description:
3 // Class EmcERatioLocMaxMaxFinder./
4 // Searches for local maxima in a cluster based on the ratio
5 // between the energy of the maxima crystal and that of
6 // its neighbours
7 //
8 // Environment:
9 // Software developed for the BaBar Detector at the SLAC B-Factory.
10 //
11 // Adapted for the PANDA experiment at GSI
12 //
13 // Author List:
14 // Phil Strother
15 // Helmut Schmuecker Ruhr-Uni Bochum
16 //
17 // Copyright Information:
18 // Copyright (C) 1997 Imperial College
19 // Modified:
20 // M. Babai
21 //------------------------------------------------------------------------
22 //#pragma once
23 #ifndef BSEMCLOCALMAXFINDINGPROCESS_HH
24 #define BSEMCLOCALMAXFINDINGPROCESS_HH
25 #include <string>
26 #include <vector>
27 
28 #include "Rtypes.h"
29 #include "RtypesCore.h"
30 
31 #include "PndContainerI.h"
32 #include "PndParameterRegister.h"
33 #include "PndProcess.h"
34 
35 #include "BSEmcCluster.h"
36 #include "BSEmcClusteringData.h"
38 
39 class BSEmcClusteringPar;
40 class BSEmcDigi;
41 class FairParGenericSet;
42 class BSEmcCluster;
45 class TBuffer;
46 class TClass;
47 class TMemberInspector;
48 struct BSEmcClusteringData;
49 struct BSEmcDigiInfo_t;
50 template <class T>
51 class PndContainerI;
52 template <class T>
54 
66 class BSEmcLocalMaxFindingProcess : public PndProcess<BSEmcClusteringData> {
67  public:
70  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
71  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
72  virtual void SetData(BSEmcClusteringData *t_pdata) /*override*/;
73  virtual void Process() /*override*/;
74  void FindLocalMaxima(const std::vector<const BSEmcDigi *> &t_digiCont, const std::vector<BSEmcCluster *> &t_clusterCont);
75  void SetClusteringParName(const std::string &t_parName) { fClusteringParName = t_parName; }
76  void SetNeighbouringRelationParName(const std::string &t_parName) { fNeighbouringRelationParName = t_parName; }
77 
78  protected:
79  Bool_t IsLocalMaximum(const BSEmcDigi *t_digi, const std::vector<const BSEmcDigi *> &t_neighbours) const;
80  std::vector<const BSEmcDigi *>
81  GetNeigboursOf(const std::vector<const BSEmcDigi *> &t_digiCont, const BSEmcDigiInfo_t &t_digi, const std::vector<BSEmcDigiInfo_t> &t_potentialneighbours) const;
82 
83  private:
84  std::string fClusteringParName{""};
85  std::string fNeighbouringRelationParName{""};
86  PndContainerI<BSEmcDigi> *fDigiArray{nullptr};
87  PndOutputContainerI<BSEmcCluster> *fClusterArray{nullptr};
88  Double_t fMaximumsEnergyThreshold{-1};
89  BSEmcGeoNeighbouringRelationPar *fNeighbouringRelationPar{nullptr};
90  ClassDef(BSEmcLocalMaxFindingProcess, 1);
91 };
92 
93 #endif /*BSEMCLOCALMAXFINDINGPROCESS_HH*/
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
Base Process class.
Definition: PndProcess.h:24
Container for clustering parameter.
virtual void SetData(BSEmcClusteringData *t_pdata)
Pass the data container ptrs to the process, and store pointers in class members. ...
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)
a cluster (group of neighboring crystals) of hit emc crystals
Definition: BSEmcCluster.h:54
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 void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
Interface to a datacontainer to be used in PandaROOT.
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)
simple Struct used in Cluster classes to index crystal. Includes the weight of the crystal on the cur...
Definition: BSEmcCluster.h:39
Bool_t IsLocalMaximum(const BSEmcDigi *t_digi, const std::vector< const BSEmcDigi *> &t_neighbours) const