LDMX Software
ClusterAlgoResult.h
Go to the documentation of this file.
1
8#ifndef EVENT_CLUSTERALGORESULT_H_
9#define EVENT_CLUSTERALGORESULT_H_
10
11// ROOT
12#include "TArrayD.h"
13#include "TObject.h" //For ClassDef
14#include "TString.h"
15
16// STL
17#include <iostream>
18
19namespace ldmx {
20
26 public:
31
36
40 void Print() const;
41
45 void Clear();
46
51 const TString& getName() const { return name_; }
52
58 double getAlgoVar(int element) const { return variables_[element]; }
59
65 double getAlgoVar0() const {
66 return (variables_.GetSize() < 1) ? (0) : (variables_[0]);
67 }
68
74 double getAlgoVar1() const {
75 return (variables_.GetSize() < 2) ? (0) : (variables_[1]);
76 }
77
83 double getAlgoVar2() const {
84 return (variables_.GetSize() < 3) ? (0) : (variables_[2]);
85 }
86
92 double getAlgoVar3() const {
93 return (variables_.GetSize() < 4) ? (0) : (variables_[3]);
94 }
95
101 double getAlgoVar4() const {
102 return (variables_.GetSize() < 5) ? (0) : (variables_[4]);
103 }
104
109 double getWeight(int nCluster) const {
110 return (nCluster < weights_.GetSize()) ? (0) : (weights_[nCluster]);
111 }
112
118 void set(const TString& name, int nvar);
119
126 void set(const TString& name, int nvar, int nweights);
127
133 void setAlgoVar(int element, double value);
134
140 void setWeight(int nClusters, double weight);
141
142 private:
144 TString name_{};
145
146 /* Algorithm variable results from the cluster algo. */
147 TArrayD variables_;
148
149 /* Array of weights when a certain number of clusters is reached. */
150 TArrayD weights_;
151
152 ClassDef(ClusterAlgoResult, 1);
153};
154} // namespace ldmx
155
156#endif
Contains details about the clustering algorithm.
const TString & getName() const
Return the name of the cluster algo.
TString name_
Name of the clustering algorithm.
double getWeight(int nCluster) const
Return the weight reached when cluster count reached n.
void setAlgoVar(int element, double value)
Set an algorithm variable.
virtual ~ClusterAlgoResult()
Class destructor.
double getAlgoVar1() const
Return algorithm variable 1 (see algorithm code for details).
double getAlgoVar3() const
Return algorithm variable 3 (see algorithm code for details).
ClusterAlgoResult()
Class constructor.
void set(const TString &name, int nvar)
Set name and number of variables of cluster algo.
double getAlgoVar4() const
Return algorithm variable 4 (see algorithm code for details).
double getAlgoVar2() const
Return algorithm variable 2 (see algorithm code for details).
void set(const TString &name, int nvar, int nweights)
Set name, number of variables and weights of cluster algo.
void setWeight(int nClusters, double weight)
Set a weight when number of clusters reached.
void Clear()
Reset the ClusterAlgoResult object.
double getAlgoVar0() const
Return algorithm variable 0 (see algorithm code for details).
void Print() const
Print a description of this object.
double getAlgoVar(int element) const
Return algorithm variable i (see algorithm code for details).