FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
tracking
SecondariesTracking
TrkData
PndTrkIndivisibleHit.cxx
Go to the documentation of this file.
1
//
2
// PndTrkIndivisibleHit.cxx
3
//
4
// Class for pattern recognition combined hit:
5
// the hit is obtained combining indivisible
6
// hits and its position is obtained calculating
7
// the center of mass.
8
//
9
// authors: Lia Lavezzi - INFN Pavia (2012)
10
//
11
12
#include "
PndTrkIndivisibleHit.h
"
13
14
#include "
PndDetectorList.h
"
15
16
#include <iostream>
17
18
// ROOT
19
#include "TArc.h"
20
#include "TMarker.h"
21
#include "TMath.h"
22
23
using namespace
std
;
24
25
// Bool_t PndTrkIndivisibleHit::operator==(const PndTrkIndivisibleHit &hit1) {
26
// return fDetectorID == hit1.fDetectorID && fHitID == hit1.fHitID;
27
// }
28
29
// Bool_t PndTrkIndivisibleHit::operator<(const PndTrkIndivisibleHit &hit1) {
30
// return fSortVariable < hit1.fSortVariable;
31
// }
32
33
34
PndTrkIndivisibleHit::PndTrkIndivisibleHit
() :
PndTrkHit
(), fHitIDs(TArrayI(0)) {}
35
36
PndTrkIndivisibleHit::PndTrkIndivisibleHit
(TArrayI hitids, TVector3 &
pos
) :
PndTrkHit
(-1, -1, kFALSE,
INDIVISIBLE
, -1, pos, -1, pos.Mag()), fHitIDs(hitids) {}
37
38
39
PndTrkIndivisibleHit::PndTrkIndivisibleHit
(
const
PndTrkIndivisibleHit
&
hit
) :
PndTrkHit
(hit) {
40
fHitIDs
= TArrayI(hit.
fHitIDs
);
41
}
42
43
PndTrkIndivisibleHit::~PndTrkIndivisibleHit
() {
44
fHitIDs
.Reset();
45
}
46
47
// Int_t PndTrkIndivisibleHit::Compare(const TObject *hit) const {
48
// // Compare abstract method. Must be overridden if a class wants to be able
49
// // to compare itself with other objects. Must return -1 if this is smaller
50
// // than obj, 0 if objects are equal and 1 if this is larger than obj.
51
// if(fSortVariable < ((PndTrkIndivisibleHit*) hit)->fSortVariable) return -1;
52
// else if(fSortVariable == ((PndTrkIndivisibleHit*) hit)->fSortVariable) return 0;
53
// else return 1;
54
// }
55
56
57
58
void
PndTrkIndivisibleHit::Draw
(Color_t color) {
59
60
TMarker *mrk =
new
TMarker(
fPosition
.X(),
fPosition
.Y(), 1);
61
mrk->SetMarkerColor(color);
62
mrk->SetMarkerStyle(20);
63
mrk->Draw(
"SAME"
);
64
65
}
66
67
68
69
void
PndTrkIndivisibleHit::Print
() {
70
71
cout <<
"###############################"
<< endl;
72
cout <<
"hitIDs: "
;
73
for
(
int
ihit = 0; ihit <
fHitIDs
.GetSize(); ihit++) cout <<
" "
<<
fHitIDs
.At(ihit);
74
cout << endl;
75
fPosition
.Print();
76
77
}
78
79
80
ClassImp
(
PndTrkIndivisibleHit
)
pos
TVector3 pos
Definition:
GammaSpectraAnalysis.C:43
PndTrkIndivisibleHit::Print
void Print()
Definition:
PndTrkIndivisibleHit.cxx:69
std
Definition:
MvdMQ/run/runFileSampler.cxx:18
PndTrkIndivisibleHit
Definition:
PndTrkIndivisibleHit.h:19
PndDetectorList.h
INDIVISIBLE
#define INDIVISIBLE
Definition:
PndTrkParameters.h:35
PndTrkIndivisibleHit::~PndTrkIndivisibleHit
~PndTrkIndivisibleHit()
Definition:
PndTrkIndivisibleHit.cxx:43
PndTrkIndivisibleHit::fHitIDs
TArrayI fHitIDs
Definition:
PndTrkIndivisibleHit.h:62
hit
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition:
hit.C:1
PndTrkHit
Definition:
PndTrkHit.h:17
PndTrkHit::fPosition
TVector3 fPosition
Definition:
PndTrkHit.h:102
ClassImp
ClassImp(PndAnaContFact)
PndTrkIndivisibleHit::PndTrkIndivisibleHit
PndTrkIndivisibleHit()
Definition:
PndTrkIndivisibleHit.cxx:34
PndTrkIndivisibleHit.h
PndTrkIndivisibleHit::Draw
void Draw(Color_t color)
Definition:
PndTrkIndivisibleHit.cxx:58
Generated on Sun Aug 18 2019 03:01:52 for FairRoot/PandaRoot by
1.8.8