1 #include "AliPHOSClusterSelection.h"
3 AliPHOSClusterSelection::AliPHOSClusterSelection()
4 : fMinChargedParticleTrackDistance(-1.),
10 // Defaults to the most lenient selection allowable
14 AliPHOSClusterSelection::~AliPHOSClusterSelection()
18 Bool_t AliPHOSClusterSelection::IsSelected(AliVCluster* cluster) const
20 return IsSelectedCPV(cluster)
21 && IsSelectedUnfolded(cluster)
22 && IsSelectedDisp(cluster)
23 && IsSelectedDispCore(cluster)
24 && IsSelectedTOF(cluster);
27 Bool_t IsSelectedCPV(AliVCluster* cluster) const
29 if( 0 > SetMinChargedParticleTrackDistance )
31 //TODO: implement positive case
34 AliPHOSClusterSelection* AliPHOSClusterSelection::SetMinChargedParticleTrackDistance(Float_t distance)
36 // 'distance' set the minimal allowable distance between the cluster
37 // and the nearest extrapolated track.
38 // If 'distance' is negative, then all clusters are sellected, the selection
39 // being "not applied" or "disabled".
41 fMinChargedParticleTrackDistance = distance;
44 TString AliPHOSClusterSelection::ToString() const
46 // returns a string an quasi-unique string for whatever selection
47 // parameters the instance contains. The uniqueness of the string
48 // is limited by the precision given in the formatting of the string.
49 // Take care that the precision is sufficient for your needs.
51 return TString::Format("%f_%i_%f_%f_%f",
52 fMinChargedParticleTrackDistance,
61 Float_t AliPHOSClusterSelection::SetMinChargedParticleTrackDistance(const TString& string)
63 TObjArray * objarray = string.Tokenize("_");
64 Float_t flt = objarray->At(0)->Atof();