CbmRoot
Loading...
Searching...
No Matches
CbmMvdHit.cxx
Go to the documentation of this file.
1
/* Copyright (C) 2006-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Philipp Sitzmann, Volker Friese [committer], Florian Uhlig */
4
5
// -------------------------------------------------------------------------
6
// ----- CbmMvdHit source file -----
7
// ----- Created 07/11/06 by V. Friese -----
8
// ----- Based on CbmStsMapsHit by M. Deveaux -----
9
// -------------------------------------------------------------------------
10
11
#include "
CbmMvdHit.h
"
12
13
#include <Logger.h>
// for Logger, LOG
14
15
// ----- Default constructor -------------------------------------------
16
CbmMvdHit::CbmMvdHit
()
17
:
CbmPixelHit
()
18
, fFlag(-1)
19
, fClusterIndex(-1)
20
, fIndexCentralX(-1)
21
, fIndexCentralY(-1)
22
, fDetectorID(-1)
23
{
24
SetTime
(0.);
25
SetTimeError
(0.);
26
}
27
// -------------------------------------------------------------------------
28
29
30
// ----- Standard constructor ------------------------------------------
31
CbmMvdHit::CbmMvdHit
(int32_t statNr, TVector3&
pos
, TVector3&
dpos
, int32_t indexCentralX, int32_t indexCentralY,
32
int32_t clusterIndex, int32_t flag)
33
:
CbmPixelHit
(0,
pos
,
dpos
, 0., -1)
34
, fFlag(flag)
35
, fClusterIndex(clusterIndex)
36
, fIndexCentralX(indexCentralX)
37
, fIndexCentralY(indexCentralY)
38
, fDetectorID(-1)
39
{
40
fDetectorID
=
DetectorId
(statNr);
41
SetTime
(0.);
42
SetTimeError
(0.);
43
}
44
// -------------------------------------------------------------------------
45
/*
46
void CbmMvdHit::GetDigiIndexVector(TClonesArray* cbmMvdClusterArray, std::vector<int32_t>* digiIndexVector)
47
{
48
CbmMvdCluster* cluster;
49
50
if(!digiIndexVector){digiIndexVector=new std::vector<int32_t>;}
51
if(digiIndexVector->size()!=0){digiIndexVector->clear();}
52
53
int32_t indexLow=fClusterIndex;
54
55
while (indexLow!=-1) {
56
cluster=(CbmMvdCluster*) cbmMvdClusterArray->At(indexLow);
57
indexLow=cluster->GetNeighbourDown();
58
}
59
60
int32_t* digiArray;
61
int32_t digisInCluster;
62
int32_t indexUp=0;
63
64
while (indexUp!=-1) {
65
digiArray = cluster->GetDigiList();
66
digisInCluster=cluster->GetTotalDigisInCluster();
67
68
for (int32_t i=0;i<digisInCluster; i++){
69
digiIndexVector->push_back(digiArray[i]);
70
};
71
72
indexUp=cluster->GetNeighbourUp();
73
74
}
75
76
if(static_cast<size_t>(cluster->GetTotalDigisInCluster())!=digiIndexVector->size()) {
77
LOG(warn) << "Inconsistent number of digis in cluster. Ignored. ";
78
}
79
80
81
82
83
84
};
85
*/
86
// ----- Destructor ----------------------------------------------------
87
CbmMvdHit::~CbmMvdHit
() {}
88
// -------------------------------------------------------------------------
89
90
91
// ----- Public method Print -------------------------------------------
92
void
CbmMvdHit::Print
(
const
Option_t*
/*opt*/
)
const
93
{
94
LOG(info) <<
"MvdHit in station "
<<
GetStationNr
() <<
" at ("
<<
GetX
() <<
", "
<<
GetY
() <<
", "
<<
GetZ
()
95
<<
") cm"
;
96
}
97
// -------------------------------------------------------------------------
98
99
100
ClassImp
(
CbmMvdHit
)
ClassImp
ClassImp(CbmConverterManager)
CbmMvdHit.h
dpos
TVector3 dpos
Definition
CbmMvdSensorDigiToHitTask.cxx:57
pos
TVector3 pos
Definition
CbmMvdSensorDigiToHitTask.cxx:56
CbmHit::SetTimeError
void SetTimeError(double error)
Definition
CbmHit.h:91
CbmHit::GetZ
double GetZ() const
Definition
CbmHit.h:71
CbmHit::SetTime
void SetTime(double time)
Definition
CbmHit.h:85
CbmMvdDetectorId::DetectorId
int32_t DetectorId(int32_t iStation) const
Definition
CbmMvdDetectorId.h:49
CbmMvdHit
Definition
CbmMvdHit.h:34
CbmMvdHit::Print
virtual void Print(const Option_t *opt=nullptr) const
Definition
CbmMvdHit.cxx:92
CbmMvdHit::GetStationNr
virtual int32_t GetStationNr() const
Definition
CbmMvdHit.h:61
CbmMvdHit::fDetectorID
int32_t fDetectorID
Definition
CbmMvdHit.h:84
CbmMvdHit::~CbmMvdHit
virtual ~CbmMvdHit()
Definition
CbmMvdHit.cxx:87
CbmMvdHit::CbmMvdHit
CbmMvdHit()
Definition
CbmMvdHit.cxx:16
CbmPixelHit
Definition
CbmPixelHit.h:25
CbmPixelHit::GetY
double GetY() const
Definition
CbmPixelHit.h:74
CbmPixelHit::GetX
double GetX() const
Definition
CbmPixelHit.h:73
core
data
mvd
CbmMvdHit.cxx
Generated on Sun Dec 22 2024 23:04:08 for CbmRoot by
1.12.0