LDMX Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ldmx::ClusterAlgoResult Class Reference

Contains details about the clustering algorithm. More...

#include <ClusterAlgoResult.h>

Public Member Functions

 ClusterAlgoResult ()
 Class constructor.
 
virtual ~ClusterAlgoResult ()
 Class destructor.
 
void Print () const
 Print a description of this object.
 
void Clear ()
 Reset the ClusterAlgoResult object.
 
const TString & getName () const
 Return the name of the cluster algo.
 
double getAlgoVar (int element) const
 Return algorithm variable i (see algorithm code for details).
 
double getAlgoVar0 () const
 Return algorithm variable 0 (see algorithm code for details).
 
double getAlgoVar1 () const
 Return algorithm variable 1 (see algorithm code for details).
 
double getAlgoVar2 () const
 Return algorithm variable 2 (see algorithm code for details).
 
double getAlgoVar3 () const
 Return algorithm variable 3 (see algorithm code for details).
 
double getAlgoVar4 () const
 Return algorithm variable 4 (see algorithm code for details).
 
double getWeight (int nCluster) const
 Return the weight reached when cluster count reached n.
 
void set (const TString &name, int nvar)
 Set name and number of variables of cluster algo.
 
void set (const TString &name, int nvar, int nweights)
 Set name, number of variables and weights of cluster algo.
 
void setAlgoVar (int element, double value)
 Set an algorithm variable.
 
void setWeight (int nClusters, double weight)
 Set a weight when number of clusters reached.
 

Private Member Functions

 ClassDef (ClusterAlgoResult, 1)
 

Private Attributes

TString name_ {}
 Name of the clustering algorithm.
 
TArrayD variables_
 
TArrayD weights_
 

Detailed Description

Contains details about the clustering algorithm.

Definition at line 25 of file ClusterAlgoResult.h.

Member Function Documentation

◆ getAlgoVar()

double ldmx::ClusterAlgoResult::getAlgoVar ( int  element) const
inline

Return algorithm variable i (see algorithm code for details).

Parameters
elementThe index of the variable.
Returns
Algorithm variable at the index.

Definition at line 58 of file ClusterAlgoResult.h.

58{ return variables_[element]; }

◆ getAlgoVar0()

double ldmx::ClusterAlgoResult::getAlgoVar0 ( ) const
inline

Return algorithm variable 0 (see algorithm code for details).

Note
Provided for interactive ROOT use.
Returns
Algorithm variable 0.

Definition at line 65 of file ClusterAlgoResult.h.

65 {
66 return (variables_.GetSize() < 1) ? (0) : (variables_[0]);
67 }

◆ getAlgoVar1()

double ldmx::ClusterAlgoResult::getAlgoVar1 ( ) const
inline

Return algorithm variable 1 (see algorithm code for details).

Note
Provided for interactive ROOT use.
Returns
Algorithm variable 1.

Definition at line 74 of file ClusterAlgoResult.h.

74 {
75 return (variables_.GetSize() < 2) ? (0) : (variables_[1]);
76 }

◆ getAlgoVar2()

double ldmx::ClusterAlgoResult::getAlgoVar2 ( ) const
inline

Return algorithm variable 2 (see algorithm code for details).

Note
Provided for interactive ROOT use.
Returns
Algorithm variable 2.

Definition at line 83 of file ClusterAlgoResult.h.

83 {
84 return (variables_.GetSize() < 3) ? (0) : (variables_[2]);
85 }

◆ getAlgoVar3()

double ldmx::ClusterAlgoResult::getAlgoVar3 ( ) const
inline

Return algorithm variable 3 (see algorithm code for details).

Note
Provided for interactive ROOT use.
Returns
Algorithm variable 3.

Definition at line 92 of file ClusterAlgoResult.h.

92 {
93 return (variables_.GetSize() < 4) ? (0) : (variables_[3]);
94 }

◆ getAlgoVar4()

double ldmx::ClusterAlgoResult::getAlgoVar4 ( ) const
inline

Return algorithm variable 4 (see algorithm code for details).

Note
Provided for interactive ROOT use.
Returns
Algorithm variable 4.

Definition at line 101 of file ClusterAlgoResult.h.

101 {
102 return (variables_.GetSize() < 5) ? (0) : (variables_[4]);
103 }

◆ getName()

const TString & ldmx::ClusterAlgoResult::getName ( ) const
inline

Return the name of the cluster algo.

Returns
The name of the cluster algo.

Definition at line 51 of file ClusterAlgoResult.h.

51{ return name_; }
TString name_
Name of the clustering algorithm.

References name_.

◆ getWeight()

double ldmx::ClusterAlgoResult::getWeight ( int  nCluster) const
inline

Return the weight reached when cluster count reached n.

Returns
The weight from the cluster algorithm.

Definition at line 109 of file ClusterAlgoResult.h.

109 {
110 return (nCluster < weights_.GetSize()) ? (0) : (weights_[nCluster]);
111 }

◆ set() [1/2]

void ldmx::ClusterAlgoResult::set ( const TString &  name,
int  nvar 
)

Set name and number of variables of cluster algo.

Parameters
nameThe name of the cluster algo.
nvarThe number of algorithm variables.

Referenced by ecal::EcalClusterProducer::produce().

◆ set() [2/2]

void ldmx::ClusterAlgoResult::set ( const TString &  name,
int  nvar,
int  nweights 
)

Set name, number of variables and weights of cluster algo.

Parameters
nameThe name of the cluster algo.
nvarThe number of algorithm variables.
nweightsThe number of transition weights.

◆ setAlgoVar()

void ldmx::ClusterAlgoResult::setAlgoVar ( int  element,
double  value 
)

Set an algorithm variable.

Parameters
elementThe index of the variable.
valueThe variable's new value.

Referenced by ecal::EcalClusterProducer::produce().

◆ setWeight()

void ldmx::ClusterAlgoResult::setWeight ( int  nClusters,
double  weight 
)

Set a weight when number of clusters reached.

Parameters
nClustersThe number of clusters reached.
weightThe weight when number of clusters reached.

Referenced by ecal::EcalClusterProducer::produce().

Member Data Documentation

◆ name_

TString ldmx::ClusterAlgoResult::name_ {}
private

Name of the clustering algorithm.

Definition at line 144 of file ClusterAlgoResult.h.

144{};

Referenced by getName().

◆ variables_

TArrayD ldmx::ClusterAlgoResult::variables_
private

Definition at line 147 of file ClusterAlgoResult.h.

◆ weights_

TArrayD ldmx::ClusterAlgoResult::weights_
private

Definition at line 150 of file ClusterAlgoResult.h.


The documentation for this class was generated from the following file: