FairRoot/PandaRoot
PndSdsChargeWeightingAlgorithms.h
Go to the documentation of this file.
1 #ifndef _PNDSDSCHARGEWEIGHTINGALGORITHMS_H
2 #define _PNDSDSCHARGEWEIGHTINGALGORITHMS_H
3 
4 #include <vector>
5 #include "TObject.h"
6 #include "TClonesArray.h"
7 #include "TH2F.h"
8 #include "PndSdsDigiStrip.h"
10 class PndSdsCluster;
11 //class RunInfo;
12 class PndSdsCalcStrip;
13 
14 
15 class PndSdsChargeWeightingAlgorithms : public TObject
16 {
27 public:
28  PndSdsChargeWeightingAlgorithms(TClonesArray* arr);
30  TObject(other),
31  fDigiArray(other.fDigiArray),
32  fCalcStrip(other.fCalcStrip),
34  fVerbose(other.fVerbose)
35  {
36  };
39  {
40  fDigiArray=other.fDigiArray;
41  fCalcStrip=other.fCalcStrip;
43  fVerbose=other.fVerbose;
44  return *this;
45  };
46 
59  std::pair<Double_t,Double_t> CenterOfGravity(const PndSdsCluster* Cluster);
60 
73  std::pair<Double_t,Double_t> HeadTail(const PndSdsCluster* Cluster);
74 
86  std::pair<Double_t,Double_t> Eta(const PndSdsCluster* Cluster, const TH2F* PosVsEta);
87 
88  std::pair<Double_t,Double_t> EtaValue(const PndSdsCluster* Cluster, Double_t &stripno, Int_t &NmbOfStrips); // calculates the eta value for the given cluster.
100  std::pair<Double_t,Double_t> Binary(const PndSdsCluster* Cluster);
101 
113  std::pair<Double_t,Double_t> Median(const PndSdsCluster* Cluster);
114 
115 
127  std::pair<Double_t,Double_t> AutoSelect(const PndSdsCluster* Cluster);
128 
141 // void MakedNdEta(const std::vector<PndSdsCluster>& Cluster, RunInfo& info);
144  void SetDigiArray(TClonesArray* darray){fDigiArray = darray;};
146  void SetChargeConverter(PndSdsChargeConversion* ChargeConverter){fChargeConverter = ChargeConverter;};
147  void SetVerbose(Int_t level=0){fVerbose=level;};
148 
149 private:
150 
151  Double_t DigiCharge(Int_t digiIndex);
152  Double_t DigiChargeError(Int_t digiIndex);
153  Int_t DigiStripno(Int_t digiIndex);
155  TClonesArray* fDigiArray;
158  Int_t fVerbose;
159 
161 };
162 #endif
std::pair< Double_t, Double_t > HeadTail(const PndSdsCluster *Cluster)
std::pair< Double_t, Double_t > Median(const PndSdsCluster *Cluster)
Class to store the Digis which belong to one cluster This class holds the information which Digi belo...
Definition: PndSdsCluster.h:19
Class for calculating strip indices from wafer hits.
void SetChargeConverter(PndSdsChargeConversion *ChargeConverter)
ClassDef(PndSdsChargeWeightingAlgorithms, 1)
PndSdsChargeWeightingAlgorithms(PndSdsChargeWeightingAlgorithms &other)
Double_t
std::pair< Double_t, Double_t > CenterOfGravity(const PndSdsCluster *Cluster)
TPad * p2
Definition: hist-t7.C:117
std::pair< Double_t, Double_t > EtaValue(const PndSdsCluster *Cluster, Double_t &stripno, Int_t &NmbOfStrips)
Double_t x
std::pair< Double_t, Double_t > Eta(const PndSdsCluster *Cluster, const TH2F *PosVsEta)
std::pair< Double_t, Double_t > Binary(const PndSdsCluster *Cluster)
TPad * p1
Definition: hist-t7.C:116
PndSdsChargeWeightingAlgorithms & operator=(PndSdsChargeWeightingAlgorithms &other)
Double_t Erfmod(Double_t x, Double_t p0, Double_t p1, Double_t p2, Double_t p3)
std::pair< Double_t, Double_t > AutoSelect(const PndSdsCluster *Cluster)