SND@LHC Software
Loading...
Searching...
No Matches
splitcalCluster.h
Go to the documentation of this file.
1#ifndef SPLITCALCLUSTER_H
2#define SPLITCALCLUSTER_H 1
3
4#include "TObject.h" //
5
6#include "splitcalHit.h"
7#include <vector>
8//#include <boost/python.hpp>
9
10// ROOT headers
11/* #include <TLorentzVector.h> */
12#include <TVector3.h>
13
15{
16
17 double slope;
18 double slopeError;
19 double intercept;
21
22};
23
24
25class splitcalCluster : public TObject
26{
27 public:
28
31 //splitcalCluster(boost::python::list& l);
33
35 virtual ~splitcalCluster();
36
38 virtual void Print() const;
39
40 void SetEtaPhiE(double& eta, double& phi, double& e) {_eta = eta; _phi = phi; _energy = e;}
41 void SetEta(double& eta) {_eta = eta;}
42 void SetPhi(double& phi) {_phi = phi;}
43 void SetEnergy(double& e) {_energy = e;}
44 void SetIndex(int i) {_index = i;}
45 void SetStartPoint(const double& x, const double& y, const double& z) {_start.SetXYZ(x,y,z); }
46 void SetStartPoint(splitcalHit*& h);
47 void SetEndPoint(const double& x, const double& y, const double& z) {_end.SetXYZ(x,y,z);}
48 void SetEndPoint(splitcalHit*& h);
49 void SetVectorOfHits(std::vector<splitcalHit* >& v) {_vectorOfHits = v;}
50 void AddHit(splitcalHit* h) {_vectorOfHits.push_back(h);}
51
52 int GetIndex() {return _index;}
53 double GetEta() {return _eta;}
54 double GetPhi() {return _phi;}
55 double GetEnergy() {return _energy;}
56 double GetPx() {return _energy*sin(_eta)*cos(_phi);}
57 double GetPy() {return _energy*sin(_eta)*sin(_phi);}
58 double GetPz() {return _energy*cos(_eta);}
59 double GetEx() {return GetPx();}
60 double GetEy() {return GetPy();}
61 double GetEz() {return GetPz();}
62 TVector3 GetStartPoint() {return _start; }
63 TVector3 GetEndPoint() {return _end; }
64 std::vector<splitcalHit* >& GetVectorOfHits() {return _vectorOfHits;}
65
66 regression LinearRegression(std::vector<double >& x, std::vector<double >& y);
67 void ComputeEtaPhiE();
68
69 // temporary for test
70 double GetSlopeZX() {return _mZX;}
71 double GetInterceptZX() {return _qZX;}
72 double GetSlopeZY() {return _mZY;}
73 double GetInterceptZY() {return _qZY;}
74
75 private:
79
80 int _index;
81 double _eta, _phi, _energy;
82 TVector3 _start;
83 TVector3 _end;
84 std::vector<splitcalHit* > _vectorOfHits;
85
86 // temporary for test
87 double _mZX, _qZX;
88 double _mZY, _qZY;
89
91
92};
93
94#endif
TVector3 GetEndPoint()
double GetInterceptZX()
TVector3 GetStartPoint()
void SetEnergy(double &e)
void SetStartPoint(const double &x, const double &y, const double &z)
double GetInterceptZY()
void SetEndPoint(const double &x, const double &y, const double &z)
splitcalCluster operator=(const splitcalCluster &cluster)
virtual void Print() const
void SetEtaPhiE(double &eta, double &phi, double &e)
splitcalCluster(const splitcalCluster &cluster)
void SetIndex(int i)
std::vector< splitcalHit * > & GetVectorOfHits()
void AddHit(splitcalHit *h)
void SetEta(double &eta)
void SetPhi(double &phi)
void SetVectorOfHits(std::vector< splitcalHit * > &v)
ClassDef(splitcalCluster, 1)
std::vector< splitcalHit * > _vectorOfHits
double interceptError
double slopeError