FairShip
Loading...
Searching...
No Matches
SiliconTargetHit.cxx
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
#include "
SiliconTargetHit.h
"
6
7
#include <iostream>
8
9
#include "FairLogger.h"
10
#include "FairRunSim.h"
11
#include "
ShipUnit.h
"
12
#include "
SiliconTarget.h
"
13
#include "TGeoBBox.h"
14
#include "TGeoManager.h"
15
#include "TGeoNavigator.h"
16
#include "TROOT.h"
17
18
SiliconTargetHit::SiliconTargetHit
() :
SHiP
::
DetectorHit
() {}
19
20
SiliconTargetHit::SiliconTargetHit
(Int_t detID,
21
const
std::vector<SiliconTargetPoint*>& V)
22
:
SHiP
::
DetectorHit
(detID, 0.f) {
23
if
(V.empty()) {
24
LOG(error) <<
"SiliconTargetHit constructor called with empty point vector"
;
25
return;
26
}
27
28
double
totalSig = 0;
29
for (
auto
* point : V) {
30
totalSig += point->GetEnergyLoss();
31
fX
= point->GetX();
32
fY
= point->GetY();
33
fZ
= point->GetZ();
34
}
35
36
fSignal
= totalSig;
37
}
38
// ----- Public method Print -------------------------------------------
39
void
SiliconTargetHit::Print
()
const
{
40
std::cout << Form(
41
"SiliconTargetHit: Detector ID %d, Layer %d, Plane %d, Module %d, Strip "
42
"%d, Signal %.2f \n"
,
43
fDetectorID
,
GetLayer
(),
GetPlane
(),
GetModule
(),
GetStrip
(),
44
GetSignal
());
45
}
ShipUnit.h
SiliconTargetHit.h
SiliconTarget.h
SHiP::DetectorHit::fDetectorID
Int_t fDetectorID
Detector unique identifier.
Definition
DetectorHit.h:40
SHiP::DetectorHit::DetectorHit
DetectorHit()
Definition
DetectorHit.cxx:10
SiliconTargetHit::fZ
Double_t fZ
Definition
SiliconTargetHit.h:60
SiliconTargetHit::fY
Double_t fY
Definition
SiliconTargetHit.h:59
SiliconTargetHit::Print
void Print() const
Definition
SiliconTargetHit.cxx:39
SiliconTargetHit::fX
Double_t fX
Definition
SiliconTargetHit.h:58
SiliconTargetHit::fSignal
Float_t fSignal
Definition
SiliconTargetHit.h:57
SiliconTargetHit::GetModule
constexpr int GetModule() const
Definition
SiliconTargetHit.h:52
SiliconTargetHit::GetLayer
constexpr int GetLayer() const
Definition
SiliconTargetHit.h:37
SiliconTargetHit::GetSignal
Float_t GetSignal() const
Definition
SiliconTargetHit.h:32
SiliconTargetHit::GetStrip
constexpr int GetStrip() const
Definition
SiliconTargetHit.h:49
SiliconTargetHit::GetPlane
constexpr int GetPlane() const
Definition
SiliconTargetHit.h:40
SiliconTargetHit::SiliconTargetHit
SiliconTargetHit()
Definition
SiliconTargetHit.cxx:18
SHiP
Definition
ActsFrame.hpp:19
SND
SiliconTarget
SiliconTargetHit.cxx
Generated by
Doxygen
1.15.0