PandaRoot
BSEmcClusterRadiusAlgo.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 BSEMCCLUSTERRADIUSALGO_H
14 #define BSEMCCLUSTERRADIUSALGO_H
15 
16 #include "RtypesCore.h"
17 
29  public:
32 
33  Double_t GetModifiedRadius(Double_t t_clusradius, Int_t t_n = 1) const
34  {
35  if (t_n == 0) {
36  t_n = 1;
37  }
38  return t_clusradius + t_n * fSingleCrystalRadius;
39  }
40  // Add single crystal radius to precluster radius, because distance to crystal centre is taken and not its size.
41  // If this correction is not implemented, preclusters consisting of a single crystal will get a radius of 0 and will never be merged to another cluster.
42  // Added multiplier n to allow the use of the diameter, or manually increase the radius of a cluster
43  Double_t GetModifiedXRadius(Double_t xrad, Int_t n = 1) const { return xrad + n * fSingleCrystalRadius; }
44  Double_t GetModifiedYRadius(Double_t yrad, Int_t n = 1) const { return yrad + n * fSingleCrystalRadius; }
45 
46  void SetSingleCrystalRadius(Double_t t_radius) { fSingleCrystalRadius = t_radius; }
47  Double_t GetSingleCrystalRadius() const { return fSingleCrystalRadius; }
48 
49  private:
50  Double_t fSingleCrystalRadius{1.84}; // cm = single crystal radius = sqrt(2)*1.3 = 1.8385, 1.3 = 0.5*crystal size
51 };
52 
53 #endif /*BSEMCCLUSTERRADIUSALGO_H*/
Helper class to determine a precluster radius (used in MakePrecluster)
Double_t GetSingleCrystalRadius() const
Double_t GetModifiedXRadius(Double_t xrad, Int_t n=1) const
void SetSingleCrystalRadius(Double_t t_radius)
Double_t GetModifiedYRadius(Double_t yrad, Int_t n=1) const
Double_t GetModifiedRadius(Double_t t_clusradius, Int_t t_n=1) const