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
13
class
SiliconTargetPoint
:
public
SHiP::DetectorPoint
{
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
49
ClassDefOverride
(
SiliconTargetPoint
, 3)
50
};
51
52
#endif
// SND_SILICONTARGET_SILICONTARGETPOINT_H_
DetectorPoint.h
SHiP::DetectorPoint
Definition
DetectorPoint.h:14
SHiP::DetectorPoint::ClassDefOverride
ClassDefOverride(SHiP::DetectorPoint, 1)
SHiP::DetectorPoint::DetectorPoint
DetectorPoint()=default
SiliconTargetPoint
Definition
SiliconTargetPoint.h:13
SiliconTargetPoint::SiliconTargetPoint
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)
Definition
SiliconTargetPoint.h:28
SiliconTargetPoint::GetStrip
constexpr int GetStrip() const
Definition
SiliconTargetPoint.h:44
SiliconTargetPoint::GetPlane
constexpr int GetPlane() const
Definition
SiliconTargetPoint.h:35
SiliconTargetPoint::GetModule
constexpr int GetModule() const
Definition
SiliconTargetPoint.h:47
SiliconTargetPoint::GetLayer
constexpr int GetLayer() const
Definition
SiliconTargetPoint.h:34
SiliconTargetPoint::SiliconTargetPoint
SiliconTargetPoint()=default
SiliconTargetPoint::GetRow
constexpr int GetRow() const
Definition
SiliconTargetPoint.h:41
SiliconTargetPoint::GetColumn
constexpr int GetColumn() const
Definition
SiliconTargetPoint.h:38
SHiP
Definition
ActsFrame.hpp:19
SND
SiliconTarget
SiliconTargetPoint.h
Generated by
Doxygen
1.15.0