FairShip
Loading...
Searching...
No Matches
CaloScoringPlaneHit.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP
3// Collaboration
4
5#ifndef CALOSCORINGPLANE_CALOSCORINGPLANEHIT_H_
6#define CALOSCORINGPLANE_CALOSCORINGPLANEHIT_H_
7
9#include "DetectorHit.h"
10#include "TVector3.h"
11
13class TRandom;
14
25 public:
27
37 CaloScoringPlaneHit(const CaloScoringPlanePoint* p, Double_t t0,
38 Double_t pos_res, Double_t time_res, Int_t pid,
39 TRandom* rng = nullptr);
40
41 ~CaloScoringPlaneHit() override = default;
44
45 Double_t GetX() const { return fX; }
46 Double_t GetY() const { return fY; }
47 Double_t GetZ() const { return fZ; }
48 TVector3 GetXYZ() const { return TVector3(fX, fY, fZ); }
49 Double_t GetTime() const { return fTime; }
50
51 Double_t GetPx() const { return fPx; }
52 Double_t GetPy() const { return fPy; }
53 Double_t GetPz() const { return fPz; }
54 TVector3 GetMom() const { return TVector3(fPx, fPy, fPz); }
55 Double_t GetP() const { return GetMom().Mag(); }
56
58 Int_t GetPid() const { return fPid; }
59 void SetPid(Int_t pid) { fPid = pid; }
60 Bool_t IsIdentified() const { return fPid != CaloScoringPlanePID::kUnknown; }
61 Bool_t IsElectron() const { return fPid == CaloScoringPlanePID::kElectron; }
62 Bool_t IsHadron() const { return fPid == CaloScoringPlanePID::kHadron; }
63 Bool_t IsMuon() const { return fPid == CaloScoringPlanePID::kMuon; }
64
66 void Print() const;
67
68 private:
69 Double_t fX = 0.;
70 Double_t fY = 0.;
71 Double_t fZ = 0.;
72 Double_t fTime = 0.;
73 Double_t fPx = 0.;
74 Double_t fPy = 0.;
75 Double_t fPz = 0.;
77
79};
80
81#endif // CALOSCORINGPLANE_CALOSCORINGPLANEHIT_H_
Double_t GetTime() const
Double_t fTime
smeared time incl. t0 (ns)
Double_t fX
smeared x (cm)
ClassDefOverride(CaloScoringPlaneHit, 1)
~CaloScoringPlaneHit() override=default
Double_t fZ
z of the MC point (cm)
Double_t fY
smeared y (cm)
Int_t fPid
identified species
Bool_t IsIdentified() const
Double_t fPx
MC-truth momentum (GeV/c).
CaloScoringPlaneHit & operator=(const CaloScoringPlaneHit &hit)=default
CaloScoringPlaneHit(const CaloScoringPlaneHit &hit)=default
TVector3 GetXYZ() const
TVector3 GetMom() const
void Print(const Option_t *opt="") const override
Definition DetectorHit.h:36