]>
Commit | Line | Data |
---|---|---|
c6914c83 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* | |
17 | laser track clasification; | |
7b18d067 | 18 | TCut cutT("cutT","abs(Tr.fP[3])<0.06"); |
19 | TCut cutPt("cutPt","abs(Tr.fP[4])<0.1"); | |
20 | TCut cutN("cutN","fTPCncls>100"); | |
21 | ||
22 | TCut cutFi("cutZB",""); | |
c6914c83 | 23 | TCut cutFi("cutFi","abs((180*atan2(x1,x0)/pi-20)%40)<5"); |
24 | ||
25 | */ | |
26 | ||
27 | ||
28 | ||
29 | #include "TLinearFitter.h" | |
30 | #include "AliTPCcalibLaser.h" | |
31 | #include "AliExternalTrackParam.h" | |
32 | #include "AliESDtrack.h" | |
33 | #include "AliTPCTracklet.h" | |
34 | #include "TH1D.h" | |
35 | #include "TVectorD.h" | |
36 | #include "TTreeStream.h" | |
37 | #include "TFile.h" | |
38 | #include "TF1.h" | |
39 | #include "TGraphErrors.h" | |
40 | #include "AliTPCclusterMI.h" | |
41 | #include "AliTPCseed.h" | |
42 | #include "AliTracker.h" | |
43 | #include "TClonesArray.h" | |
44 | ||
45 | ||
46 | #include "TTreeStream.h" | |
47 | #include <iostream> | |
48 | #include <sstream> | |
7b18d067 | 49 | #include "AliTPCLaserTrack.h" |
50 | ||
c6914c83 | 51 | using namespace std; |
52 | ||
53 | ClassImp(AliTPCcalibLaser) | |
54 | ||
55 | AliTPCcalibLaser::AliTPCcalibLaser(): | |
56 | AliTPCcalibBase() | |
57 | { | |
58 | // | |
59 | // Constructor | |
60 | // | |
61 | } | |
62 | ||
63 | AliTPCcalibLaser::AliTPCcalibLaser(const Text_t *name, const Text_t *title): | |
64 | AliTPCcalibBase() | |
65 | { | |
66 | SetName(name); | |
67 | SetTitle(title); | |
68 | // | |
69 | // Constructor | |
70 | // | |
71 | ||
72 | } | |
73 | ||
74 | AliTPCcalibLaser::~AliTPCcalibLaser() { | |
75 | // | |
76 | // destructor | |
77 | // | |
78 | } | |
79 | ||
7b18d067 | 80 | void AliTPCcalibLaser::Process(AliESDtrack *track, Int_t run) { |
c6914c83 | 81 | // |
82 | // | |
83 | // | |
84 | // 1. Propagate track to the mirror radius | |
85 | Float_t kRadius = 271.6; | |
86 | if (!track->GetOuterParam()) return; | |
87 | AliExternalTrackParam param(*(track->GetOuterParam())); | |
88 | AliTracker::PropagateTrackTo(¶m,270.,0.0005,3,kTRUE); | |
89 | AliTracker::PropagateTrackTo(¶m,kRadius,0.0005,0.1,kTRUE); | |
7b18d067 | 90 | AliTPCLaserTrack ltr; |
91 | AliTPCLaserTrack *ltrp=0x0; | |
92 | Int_t id = AliTPCLaserTrack::IdentifyTrack(¶m); | |
93 | if (id!=-1) ltrp=(AliTPCLaserTrack*)AliTPCLaserTrack::GetTracks()->UncheckedAt(id); | |
94 | else ltrp=<r; | |
c6914c83 | 95 | // |
96 | if (fStreamLevel>0){ | |
97 | TTreeSRedirector *cstream = GetDebugStreamer(); | |
98 | Double_t xyz[3]; | |
99 | Double_t pxyz[3]; | |
100 | param.GetXYZ(xyz); | |
101 | param.GetPxPyPz(pxyz); | |
7b18d067 | 102 | Int_t side = (param.GetZ()>0) ? 0:1; |
103 | Int_t beam = 0; | |
104 | if (side==0) beam = TMath::Nint((180*atan2(xyz[1],xyz[0])/TMath::Pi()+20)/60.); | |
105 | if (side==1) beam = TMath::Nint((180*atan2(xyz[1],xyz[0])/TMath::Pi()-20)/60.); | |
106 | //Int_t id(180*atan2(x1,x0)/pi+20)/60.; | |
107 | Int_t bundle=TMath::Nint(param.GetZ()/80.); | |
c6914c83 | 108 | if (cstream){ |
109 | (*cstream)<<"Track"<< | |
7b18d067 | 110 | "run="<<run<< |
111 | "id="<<id<< | |
112 | "fSide="<<side<< // side A-C | |
113 | "fBeam="<<beam<< // phi id | |
114 | "fBundle="<<bundle<< // laser Z | |
115 | // | |
116 | "LTr.="<<ltrp<< | |
117 | "Esd.="<<track<< | |
c6914c83 | 118 | "Tr.="<<¶m<< |
119 | "x0="<<xyz[0]<< | |
120 | "x1="<<xyz[1]<< | |
121 | "x2="<<xyz[2]<< | |
122 | "px0="<<pxyz[0]<< | |
123 | "px1="<<pxyz[1]<< | |
124 | "px2="<<pxyz[2]<< | |
125 | "\n"; | |
126 | } | |
127 | } | |
128 | } | |
129 | ||
130 | void AliTPCcalibLaser::Analyze(){ | |
131 | // | |
132 | // | |
133 | // | |
134 | } | |
135 | ||
136 | ||
c6914c83 | 137 | |
138 |