FairRoot/PandaRoot
PndTrkSkewHit.cxx
Go to the documentation of this file.
1 //
2 // PndTrkHit.cxx
3 //
4 // Class for pattern recognition skewed hit
5 //
6 // authors: Lia Lavezzi - INFN Pavia (2012)
7 //
8 
9 #include "PndTrkSkewHit.h"
10 
11 #include "PndDetectorList.h"
12 
13 #include <iostream>
14 
15 // ROOT
16 #include "TEllipse.h"
17 
18 using namespace std;
19 
20 
21 PndTrkSkewHit::PndTrkSkewHit() : PndTrkHit(), fTrackID(-1), fRightIntersection(-1), fCenter1(0., 0., 0.), fCenter2(0., 0., 0.), fIntersection1(0., 0., 0.), fIntersection2(0., 0., 0.), fa(-1), fb(-1), fPhi1(0), fPhi2(0), fBeta(0) {}
22 
23 PndTrkSkewHit::PndTrkSkewHit(Int_t hitID, Int_t detID, Bool_t used, Int_t iregion, Int_t sensorID, TVector3& pos, Double_t isochrone, Double_t sortvar, Int_t trackID, TVector3 center1, TVector3 intersection1, double phi1, TVector3 center2, TVector3 intersection2, double phi2, double a, double b, int rightone, double beta): PndTrkHit(hitID, detID, used, iregion, sensorID, pos, isochrone, sortvar), fTrackID(trackID), fRightIntersection(rightone), fCenter1(center1), fCenter2(center2), fIntersection1(intersection1), fIntersection2(intersection2), fa(a), fb(b), fPhi1(phi1), fPhi2(phi2), fBeta(beta) {}
24 
25 PndTrkSkewHit::PndTrkSkewHit(PndTrkHit &hit, Int_t trackID, TVector3 center1, TVector3 intersection1, double phi1, TVector3 center2, TVector3 intersection2, double phi2, double a, double b, int rightone, double beta): PndTrkHit(hit), fTrackID(trackID), fRightIntersection(rightone), fCenter1(center1), fCenter2(center2), fIntersection1(intersection1), fIntersection2(intersection2), fa(a), fb(b), fPhi1(phi1), fPhi2(phi2), fBeta(beta) {}
26 
27 
28 PndTrkSkewHit::PndTrkSkewHit(PndTrkHit &hit): PndTrkHit(hit), fTrackID(-1), fRightIntersection(-1), fCenter1(0., 0., 0.), fCenter2(0., 0., 0.), fIntersection1(0., 0., 0.), fIntersection2(0., 0., 0.), fa(-1), fb(-1), fPhi1(0), fPhi2(0), fBeta(0) {}
29 
30 
31 PndTrkSkewHit::PndTrkSkewHit(const PndTrkSkewHit &hit) : PndTrkHit(hit), fTrackID(-1), fRightIntersection(-1), fCenter1(0., 0., 0.), fCenter2(0., 0., 0.), fIntersection1(0., 0., 0.), fIntersection2(0., 0., 0.), fa(-1), fb(-1), fPhi1(0), fPhi2(0), fBeta(0) {
32  *this = hit;
33 }
34 
36 
37 
38 // operator equals
40  fTrackID = skewhit.fTrackID;
42  fCenter1 = skewhit.fCenter1;
43  fCenter2 = skewhit.fCenter2;
46  fa = skewhit.fa;
47  fb = skewhit.fb;
48  fPhi1 = skewhit.fPhi1;
49  fPhi2 = skewhit.fPhi2;
50  fBeta = skewhit.fBeta;
51  return *this;
52 }
53 
54 void PndTrkSkewHit::Draw(Color_t color) {
55  Int_t style = 1;
56  if(fUsed && color == kBlack) {
57  style = 0;
58  color = kGray;
59  }
60 
61  TEllipse *ell1 = new TEllipse(fCenter1.X(), fCenter1.Y(), fa, fb, 0, 360, -fBeta);
62  ell1->SetFillStyle(style);
63  ell1->SetLineColor(color);
64  ell1->Draw("SAME");
65 
66  TEllipse *ell2 = new TEllipse(fCenter2.X(), fCenter2.Y(), fa, fb, 0, 360, -fBeta);
67  ell2->SetFillStyle(style);
68  ell2->SetLineColor(color-5);
69  ell2->Draw("SAME");
70 }
71 
73  cout << "####### SKEW ########################" << endl;
74  cout << "hitID " << fHitID << " used " << fUsed << " iregion " << fIRegion << endl;
75  cout << "isochrone " << fIsochrone << endl;
76  fIntersection1.Print();
77  fIntersection2.Print();
78 }
79 
80 
TVector3 pos
TVector3 fCenter1
Definition: PndTrkSkewHit.h:50
TVector3 fIntersection1
Definition: PndTrkSkewHit.h:50
Double_t fBeta
Definition: PndTrkSkewHit.h:51
Double_t fPhi1
Definition: PndTrkSkewHit.h:51
TVector3 fIntersection2
Definition: PndTrkSkewHit.h:50
TTree * b
Double_t fIsochrone
Definition: PndTrkHit.h:103
Int_t fRightIntersection
Definition: PndTrkSkewHit.h:49
PndTrkSkewHit & operator=(const PndTrkSkewHit &hit)
Int_t a
Definition: anaLmdDigi.C:126
Int_t fHitID
Definition: PndTrkHit.h:99
Double_t
void style()
TVector3 fCenter2
Definition: PndTrkSkewHit.h:50
Double_t fPhi2
Definition: PndTrkSkewHit.h:51
Int_t fIRegion
Definition: PndTrkHit.h:99
ClassImp(PndAnaContFact)
TFile * fb
Bool_t fUsed
Definition: PndTrkHit.h:100
PndSdsMCPoint * hit
Definition: anasim.C:70
void Draw(Color_t color)