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 <cmath>
9
10#include "DetectorPoint.h"
11#include "TVector3.h"
12
14 public:
16 SiliconTargetPoint() = default;
17
28 SiliconTargetPoint(Int_t trackID, Int_t detID, const TVector3& pos,
29 const TVector3& mom, Double_t tof, Double_t length,
30 Double_t eLoss, Int_t pdgCode)
31 : SHiP::DetectorPoint(0, trackID, detID, pos, mom, tof, length, eLoss,
32 pdgCode) {}
33
34 constexpr int GetLayer() const { return floor(fDetectorID >> 17); }
35 constexpr int GetPlane() const {
36 return static_cast<int>(fDetectorID >> 16) % 2;
37 } // 0 is X-plane, 1 is Y-pane
38 constexpr int GetColumn() const {
39 return static_cast<int>(fDetectorID >> 14) % 4;
40 }
41 constexpr int GetRow() const {
42 return static_cast<int>(fDetectorID >> 13) % 2;
43 }
44 constexpr int GetStrip() const {
45 return static_cast<int>(fDetectorID % 4096);
46 }
47 constexpr int GetModule() const { return GetRow() + 1 + 2 * GetColumn(); }
48
50};
51
52#endif // SND_SILICONTARGET_SILICONTARGETPOINT_H_
ClassDefOverride(SHiP::DetectorPoint, 1)
DetectorPoint()=default
SiliconTargetPoint(Int_t trackID, Int_t detID, const TVector3 &pos, const TVector3 &mom, Double_t tof, Double_t length, Double_t eLoss, Int_t pdgCode)
constexpr int GetStrip() const
constexpr int GetPlane() const
constexpr int GetModule() const
constexpr int GetLayer() const
SiliconTargetPoint()=default
constexpr int GetRow() const
constexpr int GetColumn() const