CbmRoot
Loading...
Searching...
No Matches
CbmMvdHit.cxx
Go to the documentation of this file.
1/* Copyright (C) 2006-2025 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 -------------------------------------------
21// -------------------------------------------------------------------------
22
23
24// ----- Standard constructor ------------------------------------------
25CbmMvdHit::CbmMvdHit(uint32_t address, int32_t statNr, TVector3& pos, TVector3& dpos, int32_t indexCentralX,
26 int32_t indexCentralY, int32_t clusterIndex, int32_t flag)
27 : CbmPixelHit(address, pos, dpos, 0., -1)
28 , fFlag(flag)
29 , fClusterIndex(clusterIndex)
30 , fStationNr(statNr)
31{
32 SetTime(0.);
33 SetTimeError(0.);
34}
35// -------------------------------------------------------------------------
36/*
37void CbmMvdHit::GetDigiIndexVector(TClonesArray* cbmMvdClusterArray, std::vector<int32_t>* digiIndexVector)
38{
39 CbmMvdCluster* cluster;
40
41 if(!digiIndexVector){digiIndexVector=new std::vector<int32_t>;}
42 if(digiIndexVector->size()!=0){digiIndexVector->clear();}
43
44 int32_t indexLow=fClusterIndex;
45
46 while (indexLow!=-1) {
47 cluster=(CbmMvdCluster*) cbmMvdClusterArray->At(indexLow);
48 indexLow=cluster->GetNeighbourDown();
49 }
50
51 int32_t* digiArray;
52 int32_t digisInCluster;
53 int32_t indexUp=0;
54
55 while (indexUp!=-1) {
56 digiArray = cluster->GetDigiList();
57 digisInCluster=cluster->GetTotalDigisInCluster();
58
59 for (int32_t i=0;i<digisInCluster; i++){
60 digiIndexVector->push_back(digiArray[i]);
61 };
62
63 indexUp=cluster->GetNeighbourUp();
64
65 }
66
67 if(static_cast<size_t>(cluster->GetTotalDigisInCluster())!=digiIndexVector->size()) {
68 LOG(warn) << "Inconsistent number of digis in cluster. Ignored. ";
69 }
70
71
72
73
74
75};
76*/
77// ----- Destructor ----------------------------------------------------
79// -------------------------------------------------------------------------
80
81
82// ----- Public method Print -------------------------------------------
83void CbmMvdHit::Print(const Option_t* /*opt*/) const
84{
85 LOG(info) << "MvdHit in station " << GetStationNr() << " at (" << GetX() << ", " << GetY() << ", " << GetZ()
86 << ") cm";
87}
88// -------------------------------------------------------------------------
89
90
ClassImp(CbmConverterManager)
TVector3 dpos
void SetTimeError(double error)
Definition CbmHit.h:94
double GetZ() const
Definition CbmHit.h:74
void SetTime(double time)
Definition CbmHit.h:88
virtual void Print(const Option_t *opt=nullptr) const
Definition CbmMvdHit.cxx:83
virtual int32_t GetStationNr() const
Definition CbmMvdHit.h:64
int32_t fClusterIndex
Definition CbmMvdHit.h:87
virtual ~CbmMvdHit()
Definition CbmMvdHit.cxx:78
int32_t fFlag
Definition CbmMvdHit.h:86
int32_t fStationNr
Definition CbmMvdHit.h:91
double GetY() const
Definition CbmPixelHit.h:74
CbmPixelHit()
Default constructor.
double GetX() const
Definition CbmPixelHit.h:73