PandaRoot
BSEmcRemoveSplitOffMax.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 #ifndef BSEMCREMOVESPLITOFFMAX_HH
35 #define BSEMCREMOVESPLITOFFMAX_HH
36 #include <string>
37 #include <vector>
38 
39 #include "Rtypes.h"
40 #include "RtypesCore.h"
41 
42 #include "PndContainerI.h"
43 #include "PndParameterRegister.h"
44 #include "PndProcess.h"
45 
46 #include "BSEmcCluster.h"
47 
49 
50 class BSEmcClusteringPar;
51 class BSEmcDigi;
52 class BSEmcCluster;
55 class TBuffer;
56 class TClass;
57 class TMemberInspector;
58 struct BSEmcClusteringData;
59 struct BSEmcDigiInfo_t;
60 template <class T>
61 class PndContainerI;
62 template <class T>
64 
77  public:
79  virtual ~BSEmcRemoveSplitOffMax();
80  virtual void SetDetectorName(const std::string &t_detectorName) /*override*/;
81  virtual void SetupParameters(const PndParameterRegister *t_parameterRegister) /*override*/;
82  virtual void RequestDataContainer(PndContainerRegister *t_register) /*override*/;
83  virtual void GetDataContainer(PndContainerRegister *t_register) /*override*/;
84  virtual void Process() /*override*/;
85  void RemoveSplitOffMax(const std::vector<const BSEmcDigi *> &t_digiCont, const std::vector<BSEmcCluster *> &t_clusterCont);
86 
87  void SetClusteringParName(const std::string &t_parName) { fClusteringParName = t_parName; }
88  void SetNeighbouringRelationParName(const std::string &t_parName) { fNeighbouringRelationParName = t_parName; }
89 
90  void SetDigiBranchName(const TString &t_branchname) { fDigiBranchname = t_branchname; }
91  void SetClusterBranchName(const TString &t_branchname) { fClusterBranchname = t_branchname; }
92 
93  protected:
94  Bool_t IsSplitOffOrHadron(const BSEmcDigi *t_digi, const std::vector<const BSEmcDigi *> &t_neighbours) const;
95  std::vector<const BSEmcDigi *>
96  GetNeigboursOf(const std::vector<const BSEmcDigi *> &t_digiCont, const BSEmcDigiInfo_t &t_digi, const std::vector<BSEmcDigiInfo_t> &t_potentialneighbours) const;
97 
98  private:
99  std::string fClusteringParName{""};
100  std::string fNeighbouringRelationParName{""};
101 
102  TString fDigiBranchname{""};
103  TString fClusterBranchname{""};
104 
105  PndContainerI<BSEmcDigi> *fDigiArray{nullptr};
106  PndMutableContainerI<BSEmcCluster> *fClusterArray{nullptr};
107  Double_t fCutSlope{-1};
108  Double_t fCutOffset{-1};
109  Double_t fERatioCorr{-1};
110  Double_t fNeighbourECut{-1};
111  Double_t fMaximumsEnergyThreshold{-1};
112  BSEmcGeoNeighbouringRelationPar *fNeighbouringRelationPar{nullptr};
113  ClassDef(BSEmcRemoveSplitOffMax, 1);
114 };
115 
116 #endif /*BSEMCREMOVESPLITOFFMAX_HH*/
Process to be run after BSEmcLocalMaxFindingProcess to remove maxima from cluster that match certain ...
Base Process class.
Definition: PndProcess.h:36
Container for clustering parameter.
virtual void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
void SetClusterBranchName(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...
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
a cluster (group of neighboring crystals) of hit emc crystals
Definition: BSEmcCluster.h:66
void SetDigiBranchName(const TString &t_branchname)
void SetNeighbouringRelationParName(const std::string &t_parName)
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
represents the reconstructed hit of one emc crystal
Definition: BSEmcDigi.h:59
Interface to a datacontainer to be used in PandaROOT.
virtual void RequestDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and get the processes container requirements.
void RemoveSplitOffMax(const std::vector< const BSEmcDigi *> &t_digiCont, const std::vector< BSEmcCluster *> &t_clusterCont)
void SetClusteringParName(const std::string &t_parName)
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
virtual ~BSEmcRemoveSplitOffMax()
Neigbouring Relations based on a list of detectorIds.
simple Struct used in Cluster classes to index crystal. Includes the weight of the crystal on the cur...
Definition: BSEmcCluster.h:51
Bool_t IsSplitOffOrHadron(const BSEmcDigi *t_digi, const std::vector< const BSEmcDigi *> &t_neighbours) const