FairShip
Loading...
Searching...
No Matches
SiliconTargetPoint.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 SND_SILICONTARGET_SILICONTARGETPOINT_H_
6#define SND_SILICONTARGET_SILICONTARGETPOINT_H_
7
8#include "FairMCPoint.h"
9#include "TObject.h"
10#include "TVector3.h"
11
12class SiliconTargetPoint : public FairMCPoint {
13 public:
16
28 SiliconTargetPoint(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom,
29 Double_t tof, Double_t length, Double_t eLoss,
30 Int_t pdgcode);
31
33 virtual ~SiliconTargetPoint();
34
36 SiliconTargetPoint(const SiliconTargetPoint& point) = default;
38
40 using FairMCPoint::Print;
41 virtual void Print() const;
42 Int_t PdgCode() const { return fPdgCode; }
43
44 constexpr int GetLayer() const { return floor(fDetectorID >> 17); }
45 constexpr int GetPlane() const {
46 return static_cast<int>(fDetectorID >> 16) % 2;
47 } // 0 is X-plane, 1 is Y-pane
48 constexpr int GetColumn() const {
49 return static_cast<int>(fDetectorID >> 14) % 4;
50 }
51 constexpr int GetRow() const {
52 return static_cast<int>(fDetectorID >> 13) % 2;
53 }
54 constexpr int GetStrip() const {
55 return static_cast<int>(fDetectorID % 4096);
56 }
57 constexpr int GetModule() const { return GetRow() + 1 + 2 * GetColumn(); }
58
59 private:
60 Int_t fPdgCode;
61
62 ClassDef(SiliconTargetPoint, 2)
63};
64
65#endif // SND_SILICONTARGET_SILICONTARGETPOINT_H_
SiliconTargetPoint & operator=(const SiliconTargetPoint &point)=default
constexpr int GetStrip() const
constexpr int GetPlane() const
constexpr int GetModule() const
virtual void Print() const
constexpr int GetLayer() const
constexpr int GetRow() const
SiliconTargetPoint(const SiliconTargetPoint &point)=default
constexpr int GetColumn() const