BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnHit.h
Go to the documentation of this file.
1/*
2 * File: BmnHit.h
3 * Author: Sergey Merts
4 *
5 * Created on October 28, 2014, 11:26 AM
6 */
7
8#ifndef BMNHIT_H
9#define BMNHIT_H
10
11#include "BmnDetectorList.h"
12#include "BmnMatch.h"
13#include "BmnStripData.h"
14#include "FairHit.h"
15
16#include <TObject.h>
17
18using namespace std;
19
20class BmnHit : public FairHit
21{
22 public:
23 /** Default constructor **/
25 /** Constructor to use **/
26 BmnHit(Int_t detUID, TVector3 posHit, TVector3 posHitErr, Int_t pointIndx);
27 /** Destructor **/
28 virtual ~BmnHit();
29
30 Bool_t IsUsed() const { return fUsing; }
31 Bool_t GetFlag() const { return fFlag; }
32 Int_t GetIndex() const { return fIndex; }
34 DetectorId GetDetId() const { return fDetId; }
35 Short_t GetStation() const { return fStation; }
36 Int_t GetModule() { return fModule; }
37 Int_t GetType() { return fType; }
38
39 Bool_t IsPseudo() { return fPseudo; }
40 Double_t GetResX() { return fResX; }
41 Double_t GetResY() { return fResY; }
42 Double_t GetCovXY() { return fCovXY; }
46
47 void SetUsing(Bool_t use) { fUsing = use; }
48 void SetFlag(Bool_t fl) { fFlag = fl; }
49 void SetIndex(Int_t id) { fIndex = id; }
50 void SetLength(Double_t len) { fLength = len; }
51 void SetDetId(DetectorId det) { fDetId = det; }
52 void SetStation(Short_t st) { fStation = st; }
53 void SetModule(Int_t mod) { fModule = mod; }
54 void SetType(Int_t type) { fType = type; }
55
56 void SetPseudo(Bool_t pseudo) { fPseudo = pseudo; }
57 void SetResXY(Double_t resX, Double_t resY)
58 {
59 fResX = resX;
60 fResY = resY;
61 }
62 void SetCovXY(Double_t val) { fCovXY = val; }
66
67 protected:
68 /** Strip cluster of the hit in the given strip layer, taken from the cluster branch of this layer
69 ** (e.g. BmnGemLowerCluster) of the current event via FairRootManager, so it is available in FairRoot tasks only;
70 ** nullptr if the branch is not available, the cluster index is invalid or the hit has no cluster in the layer **/
71 StripCluster* GetCluster(const char* cluster_branch_name, StripLayerType layer);
72
73 private:
74 /** Is hit used or not **/
76 /** Is hit good or not **/
78 /** Index in hits array **/
80 /** Id of detector which creates hit **/
81 DetectorId fDetId;
82 /** station number. It essential for gem, mwpc**/
85 Int_t fType; // 0 - fake, 1 - hit, -1 - undefined
86 Double_t fLength; // length from vertex to current hit
87
90
91 Double_t fCovXY; // Covariance of x and y coordinates
92
94 fDigitNumberMatch; // digit numbers used for the hit (as weighed center (one strip) of a cluster in each layer
95
98
99 Bool_t fPseudo; // pseudo hit reconstructed from one layer cluster
100
101 ClassDef(BmnHit, 1);
102};
103#endif /* BMNHIT_H */
bool Bool_t
int Int_t
short Short_t
double Double_t
#define ClassDef(name, id)
void SetCovXY(Double_t val)
Definition BmnHit.h:62
Int_t fIndex
Index in hits array.
Definition BmnHit.h:79
Int_t GetType()
Definition BmnHit.h:37
Double_t GetResX()
Definition BmnHit.h:40
Int_t fModule
Definition BmnHit.h:84
Int_t GetIndex() const
Definition BmnHit.h:32
Bool_t GetFlag() const
Definition BmnHit.h:31
void SetModule(Int_t mod)
Definition BmnHit.h:53
Short_t fStation
station number.
Definition BmnHit.h:83
Double_t fResY
Definition BmnHit.h:89
Int_t fUpperClusterIndex
Definition BmnHit.h:96
void SetLength(Double_t len)
Definition BmnHit.h:50
DetectorId GetDetId() const
Definition BmnHit.h:34
Int_t GetModule()
Definition BmnHit.h:36
void SetType(Int_t type)
Definition BmnHit.h:54
BmnMatch GetDigitNumberMatch()
Definition BmnHit.h:43
Int_t fType
Definition BmnHit.h:85
void SetUpperClusterIndex(Int_t idx)
Definition BmnHit.h:64
Double_t fCovXY
Definition BmnHit.h:91
Bool_t IsPseudo()
Definition BmnHit.h:39
void SetDigitNumberMatch(BmnMatch match)
Definition BmnHit.h:63
Double_t fResX
Definition BmnHit.h:88
Int_t fLowerClusterIndex
Definition BmnHit.h:97
Int_t GetUpperClusterIndex()
Definition BmnHit.h:44
StripCluster * GetCluster(const char *cluster_branch_name, StripLayerType layer)
Strip cluster of the hit in the given strip layer, taken from the cluster branch of this layer (e....
Double_t GetCovXY()
Definition BmnHit.h:42
Double_t GetLength()
Definition BmnHit.h:33
Double_t fLength
Definition BmnHit.h:86
BmnHit()
Default constructor.
DetectorId fDetId
Id of detector which creates hit.
Definition BmnHit.h:81
void SetUsing(Bool_t use)
Definition BmnHit.h:47
Bool_t fPseudo
Definition BmnHit.h:99
Bool_t fFlag
Is hit good or not.
Definition BmnHit.h:77
BmnMatch fDigitNumberMatch
Definition BmnHit.h:94
void SetFlag(Bool_t fl)
Definition BmnHit.h:48
Int_t GetLowerClusterIndex()
Definition BmnHit.h:45
void SetDetId(DetectorId det)
Definition BmnHit.h:51
void SetIndex(Int_t id)
Definition BmnHit.h:49
Bool_t fUsing
Is hit used or not.
Definition BmnHit.h:75
BmnHit(Int_t detUID, TVector3 posHit, TVector3 posHitErr, Int_t pointIndx)
Constructor to use.
virtual ~BmnHit()
Destructor.
void SetPseudo(Bool_t pseudo)
Definition BmnHit.h:56
Bool_t IsUsed() const
Definition BmnHit.h:30
void SetResXY(Double_t resX, Double_t resY)
Definition BmnHit.h:57
Double_t GetResY()
Definition BmnHit.h:41
void SetStation(Short_t st)
Definition BmnHit.h:52
void SetLowerClusterIndex(Int_t idx)
Definition BmnHit.h:65
Short_t GetStation() const
Definition BmnHit.h:35
Defines unique identifiers (enum) for all BM@N detector systems.
Definition json.hpp:4446