BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmBaseHit.cxx
Go to the documentation of this file.
1/**
2 * \file CbmBaseHit.cxx
3 * \author Andrey Lebedev <andrey.lebedev@gsi.de>
4 * \date 2009
5 **/
6#include "CbmBaseHit.h"
7
8#include "FairMultiLinkedData.h"
9
10#include <memory>
11
13 : TObject()
14 , fType(kHIT_o)
15 , fZ(0.)
16 , fDz(0.)
17 , fRefId(-1)
18 , fAddress(-1)
19 , fLinks(NULL)
20{}
21
23 : TObject(rhs)
24 , fType(rhs.fType)
25 , fZ(rhs.fZ)
26 , fDz(rhs.fDz)
27 , fRefId(rhs.fRefId)
28 , fAddress(rhs.fAddress)
29 , fLinks(NULL)
30{
31 if (NULL != rhs.fLinks) {
32 fLinks = new FairMultiLinkedData(*(rhs.fLinks));
33 }
34}
35
37{
38
39 if (this != &rhs) {
40
42 fType = rhs.fType;
43 fZ = rhs.fZ;
44 fDz = rhs.fDz;
45 fRefId = rhs.fRefId;
46 fAddress = rhs.fAddress;
47
48 if (NULL != rhs.fLinks) {
49 std::unique_ptr<FairMultiLinkedData> tmp(new FairMultiLinkedData(*rhs.fLinks));
50 delete fLinks;
51 fLinks = tmp.release();
52 } else {
53 fLinks = NULL;
54 }
55 }
56 return *this;
57}
58
CbmBaseHit & operator=(const CbmBaseHit &)
Double_t fDz
Z position error [cm].
Definition CbmBaseHit.h:90
Double_t fZ
Z position of hit [cm].
Definition CbmBaseHit.h:89
FairMultiLinkedData * fLinks
Monte-Carlo link collection.
Definition CbmBaseHit.h:93
CbmBaseHit()
Default constructor.
Int_t fRefId
some reference id (usually to cluster, digi or MC point)
Definition CbmBaseHit.h:91
Int_t fAddress
detector unique identifier
Definition CbmBaseHit.h:92
HitType_o fType
hit type
Definition CbmBaseHit.h:88
virtual ~CbmBaseHit()
Destructor.
TObject & operator=(const TObject &rhs)
@ kHIT_o
Definition CbmBaseHit.h:16