FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
tracking
SecondariesTracking
TrkData
PndTrkConformalHit.cxx
Go to the documentation of this file.
1
//
2
// PndTrkConformalHit.cxx
3
//
4
// Class for pattern recognition conformal hit
5
//
6
// authors: Lia Lavezzi - INFN Pavia (2012)
7
//
8
9
#include "
PndTrkConformalHit.h
"
10
11
#include <iostream>
12
13
// ROOT
14
#include "TArc.h"
15
#include "TMarker.h"
16
#include "TMath.h"
17
18
using namespace
std;
19
20
PndTrkConformalHit::PndTrkConformalHit
() : fHit(NULL), fPosition(0., 0.), fIsochrone(-1) {}
21
22
23
PndTrkConformalHit::PndTrkConformalHit
(
PndTrkHit
*
hit
,
double
u,
double
v
,
double
rd) : fHit(hit), fPosition(u, v), fIsochrone(rd) {}
24
25
PndTrkConformalHit::PndTrkConformalHit
(
PndTrkHit
*
hit
,
double
u,
double
v
) : fHit(hit), fPosition(u, v), fIsochrone(-1) {}
26
27
PndTrkConformalHit::~PndTrkConformalHit
() {}
28
29
30
double
PndTrkConformalHit::GetDistanceFromTrack
(
double
fitm,
double
fitp) {
31
return
TMath::Abs
(
fPosition
.Y() - fitm *
fPosition
.X() - fitp)/
TMath::Sqrt
(fitm *fitm + 1);
32
}
33
34
void
PndTrkConformalHit::Draw
(Color_t color) {
35
36
TMarker *mrk = NULL;
37
TArc *arc = NULL;
38
39
switch
(
fHit
->
GetIRegion
()) {
40
case
0:
41
{
42
mrk =
new
TMarker(
fPosition
.X(),
fPosition
.Y(), 21);
43
break
;
44
}
45
case
1:
46
{
47
mrk =
new
TMarker(
fPosition
.X(),
fPosition
.Y(), 25);
48
break
;
49
}
50
case
2:
51
case
6:
52
case
3:
53
case
7:
54
{
55
arc =
new
TArc(
fPosition
.X(),
fPosition
.Y(),
fIsochrone
);
// TUBERADIUS);
56
break
;
57
}
58
case
4:
59
case
5:
60
{
61
// arc = new TArc(fPosition.X(), fPosition.Y(), TUBERADIUS); // CHECK skew
62
mrk =
new
TMarker(
fPosition
.X(),
fPosition
.Y(), 3);
63
break
;
64
}
65
case
8:
66
{
67
mrk =
new
TMarker(
fPosition
.X(),
fPosition
.Y(), 29);
68
break
;
69
}
70
case
9:
71
{
72
mrk =
new
TMarker(
fPosition
.X(),
fPosition
.Y(), 24);
73
break
;
74
}
75
case
10:
76
{
77
mrk =
new
TMarker(
fPosition
.X(),
fPosition
.Y(), 25);
78
break
;
79
}
80
}
81
82
if
(mrk) {
83
mrk->SetMarkerColor(color);
84
mrk->Draw(
"SAME"
);
85
}
86
if
(arc) {
87
arc->SetFillStyle(0);
88
arc->SetLineColor(color);
89
arc->Draw(
"SAME"
);
90
}
91
92
93
}
94
95
void
PndTrkConformalHit::Print
() {
96
97
cout <<
"conformal hit ###############################"
<< endl;
98
cout <<
"hitID "
<<
fHit
->
GetHitID
() <<
" detID "
<<
fHit
->
GetDetectorID
() << endl;
99
cout <<
"isochrone "
<<
fIsochrone
<< endl;
100
fPosition
.Print();
101
}
102
103
104
ClassImp
(
PndTrkConformalHit
)
PndTrkConformalHit::~PndTrkConformalHit
~PndTrkConformalHit()
Definition:
PndTrkConformalHit.cxx:27
PndTrkConformalHit::fHit
PndTrkHit * fHit
Definition:
PndTrkConformalHit.h:45
PndTrkConformalHit::fIsochrone
Double_t fIsochrone
Definition:
PndTrkConformalHit.h:47
CAMath::Sqrt
static T Sqrt(const T &x)
Definition:
PndCAMath.h:37
PndTrkConformalHit::PndTrkConformalHit
PndTrkConformalHit()
Definition:
PndTrkConformalHit.cxx:20
v
__m128 v
Definition:
P4_F32vec4.h:4
PndTrkHit::GetHitID
Int_t GetHitID()
Definition:
PndTrkHit.h:56
CAMath::Abs
static T Abs(const T &x)
Definition:
PndCAMath.h:39
PndTrkHit::GetIRegion
Int_t GetIRegion()
Definition:
PndTrkHit.h:64
PndTrkHit::GetDetectorID
Int_t GetDetectorID()
Definition:
PndTrkHit.h:57
PndTrkConformalHit::Draw
void Draw(Color_t color)
Definition:
PndTrkConformalHit.cxx:34
PndTrkConformalHit::fPosition
TVector2 fPosition
Definition:
PndTrkConformalHit.h:46
PndTrkConformalHit::GetDistanceFromTrack
double GetDistanceFromTrack(double fitm, double fitp)
Definition:
PndTrkConformalHit.cxx:30
PndTrkConformalHit::Print
void Print()
Definition:
PndTrkConformalHit.cxx:95
PndTrkHit
Definition:
PndTrkHit.h:17
PndTrkConformalHit.h
PndTrkConformalHit
Definition:
PndTrkConformalHit.h:14
ClassImp
ClassImp(PndAnaContFact)
hit
PndSdsMCPoint * hit
Definition:
anasim.C:70
Generated on Wed Apr 3 2019 10:02:58 for FairRoot/PandaRoot by
1.8.5