63 |
// hresangx = dynamic_cast<TH1F*>(gDirectory->FindObject("hresangx")); |
// hresangx = dynamic_cast<TH1F*>(gDirectory->FindObject("hresangx")); |
64 |
// hresangy = dynamic_cast<TH1F*>(gDirectory->FindObject("hresangy")); |
// hresangy = dynamic_cast<TH1F*>(gDirectory->FindObject("hresangy")); |
65 |
|
|
|
// ---------------------------------- |
|
|
// calo variables |
|
|
// ---------------------------------- |
|
|
// CaloAxis *x_axis = new CaloAxis(); |
|
|
// CaloAxis *y_axis = new CaloAxis(); |
|
|
|
|
|
// float rcil = 1.;// tolerance (cm) |
|
|
// x_axis->FitAxis(event->GetCaloLevel1(),0,rcil); |
|
|
// y_axis->FitAxis(event->GetCaloLevel1(),1,rcil); |
|
|
|
|
|
// float qtrack = x_axis->GetQaxis()+y_axis->GetQaxis(); |
|
|
// int ntrack = x_axis->GetN()+y_axis->GetN(); |
|
|
|
|
|
// float caloangx = (float)atan((double)x_axis->par[1])*180./3.1415026; |
|
|
// float caloangy = (float)atan((double)y_axis->par[1])*180./3.1415026; |
|
66 |
|
|
67 |
float caloangx = 0; |
float caloangx = 0; |
68 |
float caloangy = 0; |
float caloangy = 0; |
71 |
top.Set(0,0,48); |
top.Set(0,0,48); |
72 |
float zcalotop = top.GetZ(); |
float zcalotop = top.GetZ(); |
73 |
|
|
74 |
// ---------------------------------- |
|
|
// tof variables |
|
|
// ---------------------------------- |
|
|
// get track stored by the tof |
|
|
// ToFTrkVar *tof = event->GetToFStoredTrack(-1); |
|
|
// if(!tof){ |
|
|
// cout << " no ToF-track stored "<<endl; |
|
|
// return; |
|
|
// } |
|
75 |
|
|
76 |
// ---------------------------------- |
// ---------------------------------- |
77 |
// tracker variables |
// tracker variables |
79 |
|
|
80 |
float resangx = -999; |
float resangx = -999; |
81 |
float resangy = -999; |
float resangy = -999; |
82 |
if( event->GetNTracks()==1 ){ |
if( event->GetTrkLevel2()->GetNTracks()==1 ){ |
83 |
|
|
84 |
PamTrack *track = event->GetTrack(0); |
PamTrack *track = event->GetTrack(0); |
85 |
if( track->chi2 >0 ){ |
if( track->GetTrkTrack()->chi2 >0 ){ |
86 |
|
|
87 |
Float_t ztraj[13]; |
Float_t ztraj[13]; |
88 |
|
|
89 |
Int_t i=0; |
Int_t i=0; |
90 |
ztraj[i++] = event->GetZTOF(11); |
ztraj[i++] = event->GetToFLevel2()->GetZTOF(11); |
91 |
ztraj[i++] = event->GetZTOF(12); |
ztraj[i++] = event->GetToFLevel2()->GetZTOF(12); |
92 |
ztraj[i++] = event->GetZTOF(21); |
ztraj[i++] = event->GetToFLevel2()->GetZTOF(21); |
93 |
ztraj[i++] = event->GetZTOF(22); |
ztraj[i++] = event->GetToFLevel2()->GetZTOF(22); |
94 |
ztraj[i++] = event->GetZTrk(1); |
ztraj[i++] = event->GetTrkLevel2()->GetZTrk(1); |
95 |
ztraj[i++] = event->GetZTrk(2); |
ztraj[i++] = event->GetTrkLevel2()->GetZTrk(2); |
96 |
ztraj[i++] = event->GetZTrk(3); |
ztraj[i++] = event->GetTrkLevel2()->GetZTrk(3); |
97 |
ztraj[i++] = event->GetZTrk(4); |
ztraj[i++] = event->GetTrkLevel2()->GetZTrk(4); |
98 |
ztraj[i++] = event->GetZTrk(5); |
ztraj[i++] = event->GetTrkLevel2()->GetZTrk(5); |
99 |
ztraj[i++] = event->GetZTrk(6); |
ztraj[i++] = event->GetTrkLevel2()->GetZTrk(6); |
100 |
ztraj[i++] = event->GetZTOF(31); |
ztraj[i++] = event->GetToFLevel2()->GetZTOF(31); |
101 |
ztraj[i++] = event->GetZTOF(32); |
ztraj[i++] = event->GetToFLevel2()->GetZTOF(32); |
102 |
ztraj[i++] = zcalotop; |
ztraj[i++] = zcalotop; |
103 |
Trajectory traj = Trajectory(13,ztraj); |
Trajectory traj = Trajectory(13,ztraj); |
104 |
traj.DoTrack2( track->al ); |
traj.DoTrack2( track->GetTrkTrack()->al ); |
105 |
|
|
106 |
resangx = caloangx - traj.thx[12]; |
resangx = caloangx - traj.thx[12]; |
107 |
resangy = caloangy - traj.thy[12]; |
resangy = caloangy - traj.thy[12]; |
108 |
|
|
109 |
} |
} |
|
if(track) delete track; |
|
110 |
} |
} |
111 |
|
|
112 |
// ---------------------------------- |
// ---------------------------------- |