SND@LHC Software
Loading...
Searching...
No Matches
splitcalHit.h
Go to the documentation of this file.
1#ifndef SPLITCALHIT_H
2#define SPLITCALHIT_H 1
3
4
5#include "ShipHit.h"
6#include "splitcalPoint.h"
7#include "TObject.h"
8#include "TVector3.h"
9
10class splitcalHit : public ShipHit
11{
12 public:
13
16
22 splitcalHit(Int_t detID, Float_t tdc);
23 splitcalHit(splitcalPoint* p, Double_t t0);
25 virtual ~splitcalHit();
26
28 virtual void Print() const;
29 Float_t GetTDC() const {return fdigi;}
30 void setInvalid() {flag = false;}
31 bool isValid() const {return flag;}
32
33 std::string GetPaddedString(int& id);
34 std::string GetDetectorElementName(int& id);
35 void Decoder(int& id, int& isPrecision, int& nLayer, int& nModuleX, int& nMdouleY, int& nStrip);
36 void Decoder(std::string& encodedID, int& isPrecision, int& nLayer, int& nModuleX, int& nMdouleY, int& nStrip);
37
38 void SetXYZ(double& x, double& y, double& z) {_x = x; _y = y; _z = z;}
39 void SetIDs(int& isPrecision, int& nLayer, int& nModuleX, int& nModuleY, int& nStrip) {_isPrecisionLayer = isPrecision; _nLayer = nLayer; _nModuleX = nModuleX; _nModuleY=nModuleY; _nStrip = nStrip;}
40 void SetEnergy(double& e) {_energy = e;}
41 void UpdateEnergy(double e) {_energy = _energy+e;}
42 void SetIsX(bool x) {_isX = x;}
43 void SetIsY(bool y) {_isY = y;}
44 void SetIsUsed(int u) {_isUsed = u;}
45 void SetXYZErrors(double xError, double yError, double zError) {_xError = xError; _yError = yError; _zError = zError;}
46 /* void SetClusterIndex(int i) {_clusterIndex = i;} */
47 /* void SetEnergyWeight(double w) {_energyWeight = w;} */
48 void AddClusterIndex(int i) {_vecClusterIndices.push_back(i);}
49 void AddEnergyWeight(double w) {_vecEnergyWeights.push_back(w);}
50
51 double GetX() {return _x;}
52 double GetY() {return _y;}
53 double GetZ() {return _z;}
54 double GetEnergy() {return _energy;}
55 double GetEnergyForCluster(int i);
57 int GetLayerNumber() {return _nLayer;}
60 int GetStripNumber() {return _nStrip;}
61 bool IsX() {return _isX;}
62 bool IsY() {return _isY;}
63 int IsUsed() {return _isUsed;}
64 double GetXError() {return _xError;}
65 double GetYError() {return _yError;}
66 double GetZError() {return _zError;}
67 /* double GetEnergyWeight() {return _energyWeight;} */
68 /* int GetClusterIndex() {return _clusterIndex;} */
69 std::vector<int > GetClusterIndices() {return _vecClusterIndices;}
70 std::vector<double > GetEnergyWeights() {return _vecEnergyWeights;}
71 bool IsShared() {return GetClusterIndices().size()>1; }
72 double GetEnergyWeightForIndex(int index);
73
75 splitcalHit(const splitcalHit& point);
77
78 private:
79
80 Float_t flag;
82 double _energy;// _energyWeight;
83 /* std::string _nameSubDetector; */
85 bool _isX, _isY;
86 std::vector<double > _vecEnergyWeights;
87 std::vector<int > _vecClusterIndices;
88
90
91
92};
93
94#endif
Float_t fdigi
digitized detector hit
Definition ShipHit.h:57
double _xError
Definition splitcalHit.h:81
splitcalHit(const splitcalHit &point)
double GetEnergyWeightForIndex(int index)
std::string GetPaddedString(int &id)
bool IsShared()
Definition splitcalHit.h:71
Float_t flag
Definition splitcalHit.h:80
std::vector< int > _vecClusterIndices
Definition splitcalHit.h:87
ClassDef(splitcalHit, 3)
std::vector< int > GetClusterIndices()
Definition splitcalHit.h:69
int GetStripNumber()
Definition splitcalHit.h:60
double GetY()
Definition splitcalHit.h:52
int GetModuleXNumber()
Definition splitcalHit.h:58
void UpdateEnergy(double e)
Definition splitcalHit.h:41
int _isPrecisionLayer
Definition splitcalHit.h:84
std::vector< double > GetEnergyWeights()
Definition splitcalHit.h:70
void AddEnergyWeight(double w)
Definition splitcalHit.h:49
virtual void Print() const
std::string GetDetectorElementName(int &id)
void setInvalid()
Definition splitcalHit.h:30
bool isValid() const
Definition splitcalHit.h:31
double GetZError()
Definition splitcalHit.h:66
double GetEnergyForCluster(int i)
virtual ~splitcalHit()
double GetZ()
Definition splitcalHit.h:53
void SetIsX(bool x)
Definition splitcalHit.h:42
void AddClusterIndex(int i)
Definition splitcalHit.h:48
int GetModuleYNumber()
Definition splitcalHit.h:59
void SetIsUsed(int u)
Definition splitcalHit.h:44
void SetXYZ(double &x, double &y, double &z)
Definition splitcalHit.h:38
void SetEnergy(double &e)
Definition splitcalHit.h:40
double _zError
Definition splitcalHit.h:81
Float_t GetTDC() const
Definition splitcalHit.h:29
void SetIDs(int &isPrecision, int &nLayer, int &nModuleX, int &nModuleY, int &nStrip)
Definition splitcalHit.h:39
int GetLayerNumber()
Definition splitcalHit.h:57
double _energy
Definition splitcalHit.h:82
void SetIsY(bool y)
Definition splitcalHit.h:43
double GetYError()
Definition splitcalHit.h:65
void Decoder(int &id, int &isPrecision, int &nLayer, int &nModuleX, int &nMdouleY, int &nStrip)
int GetIsPrecisionLayer()
Definition splitcalHit.h:56
void SetXYZErrors(double xError, double yError, double zError)
Definition splitcalHit.h:45
double GetX()
Definition splitcalHit.h:51
double GetEnergy()
Definition splitcalHit.h:54
double GetXError()
Definition splitcalHit.h:64
splitcalHit operator=(const splitcalHit &point)
std::vector< double > _vecEnergyWeights
Definition splitcalHit.h:86
double _yError
Definition splitcalHit.h:81