2024 |
ms11b[i] = 0.; |
ms11b[i] = 0.; |
2025 |
} else { |
} else { |
2026 |
ms11b[i] = 1.; |
ms11b[i] = 1.; |
2027 |
}; }; |
}; |
2028 |
|
}; |
2029 |
for ( Int_t i = 0; i<6; i++ ) { |
for ( Int_t i = 0; i<6; i++ ) { |
2030 |
mt12[0][i] = tof->tdc[ch12a[i]][hb12a[i]]; |
mt12[0][i] = tof->tdc[ch12a[i]][hb12a[i]]; |
2031 |
mt12[1][i] = tof->tdc[ch12b[i]][hb12b[i]]; |
mt12[1][i] = tof->tdc[ch12b[i]][hb12b[i]]; |
2124 |
// |
// |
2125 |
var.tofraw = 0; |
var.tofraw = 0; |
2126 |
// |
// |
2127 |
repuntil = L2->GetToFLevel2()->ntrk(); |
if ( level.file == 2 ) repuntil = L2->GetToFLevel2()->ntrk(); |
2128 |
// printf("repuntil = %i \n",repuntil); |
// printf("repuntil = %i \n",repuntil); |
2129 |
//repuntil = L2->GetNTracks(); |
//repuntil = L2->GetNTracks(); |
2130 |
// |
// |
4947 |
// |
// |
4948 |
// |
// |
4949 |
// |
// |
4950 |
|
if ( var.CALO && false ){ |
4951 |
|
if ( L2->GetCaloLevel2()->npcfit[0] > 0 && L2->GetCaloLevel2()->npcfit[1] > 0 ){ |
4952 |
|
Float_t calx[22]; |
4953 |
|
Float_t caly[22]; |
4954 |
|
Float_t calzx[22]; |
4955 |
|
Float_t calzy[22]; |
4956 |
|
Float_t zpiano[22]; |
4957 |
|
zpiano[0] = (CTZ+118.)*var.sfy/1000.; |
4958 |
|
for (Int_t plane = 1; plane < 22; plane++){ |
4959 |
|
if ( !(plane%2) ){ |
4960 |
|
zpiano[plane] = zpiano[plane-1] - 8.09*var.sfy/1000.; |
4961 |
|
}else { |
4962 |
|
zpiano[plane] = zpiano[plane-1] - 10.09*var.sfy/1000.; |
4963 |
|
}; |
4964 |
|
}; |
4965 |
|
for (Int_t plane = 0; plane < 22; plane++){ |
4966 |
|
calx[plane] = (L2->GetCaloLevel2()->cbar[plane][0]/100.)*var.sfx + var.xxvc;; |
4967 |
|
caly[plane] = (L2->GetCaloLevel2()->cbar[plane][1]/100.)*var.sfx + var.xyvc; |
4968 |
|
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
4969 |
|
calzx[plane] = zpiano[plane] + var.yxvc; |
4970 |
|
calzy[plane] = zpiano[plane] + var.yyvc; |
4971 |
|
// printf(" calx %f caly %f calzx %f calzy %f \n",calx[plane],caly[plane],calzx[plane],calzy[plane]); |
4972 |
|
}; |
4973 |
|
// |
4974 |
|
// Calorimeter track |
4975 |
|
// |
4976 |
|
Int_t trcol = 30; |
4977 |
|
if ( var.bw ){ |
4978 |
|
trcol = 14; |
4979 |
|
} else { |
4980 |
|
trcol = 44; |
4981 |
|
}; |
4982 |
|
thefigure->cd(); |
4983 |
|
TPolyLine *trakx = new TPolyLine(22,calx,calzx); |
4984 |
|
trakx->SetLineColor(trcol); |
4985 |
|
if ( L2->GetCaloLevel2()->fitmode[0] == 1 ) trakx->SetLineStyle(3); |
4986 |
|
if ( L2->GetCaloLevel2()->fitmode[0] == 2 ) trakx->SetLineStyle(4); |
4987 |
|
trakx->SetLineWidth(2); |
4988 |
|
trakx->Draw(); |
4989 |
|
TPolyLine *traky = new TPolyLine(22,caly,calzy); |
4990 |
|
traky->SetLineColor(trcol); |
4991 |
|
if ( L2->GetCaloLevel2()->fitmode[1] == 1 ) traky->SetLineStyle(3); |
4992 |
|
if ( L2->GetCaloLevel2()->fitmode[1] == 2 ) traky->SetLineStyle(4); |
4993 |
|
traky->SetLineWidth(2); |
4994 |
|
traky->Draw(); |
4995 |
|
}; |
4996 |
|
if ( L2->GetCaloLevel2()->npcfit[2] > 0 ){ |
4997 |
|
Float_t calx[22]; |
4998 |
|
Float_t caly[22]; |
4999 |
|
Float_t calzx[22]; |
5000 |
|
Float_t calzy[22]; |
5001 |
|
Float_t zpiano[22]; |
5002 |
|
zpiano[0] = (CTZ+118.)*var.sfy/1000.; |
5003 |
|
for (Int_t plane = 1; plane < 22; plane++){ |
5004 |
|
if ( !(plane%2) ){ |
5005 |
|
zpiano[plane] = zpiano[plane-1] - 8.09*var.sfy/1000.; |
5006 |
|
}else { |
5007 |
|
zpiano[plane] = zpiano[plane-1] - 10.09*var.sfy/1000.; |
5008 |
|
}; |
5009 |
|
}; |
5010 |
|
// |
5011 |
|
// |
5012 |
|
CaloTrkVar *ctra = L2->GetCaloStoredTrack(-1); |
5013 |
|
// |
5014 |
|
for (Int_t plane = 0; plane < 22; plane++){ |
5015 |
|
calx[plane] = (ctra->tbar[plane][0]/100.)*var.sfx + var.xxvc;; |
5016 |
|
caly[plane] = (ctra->tbar[plane][1]/100.)*var.sfx + var.xyvc; |
5017 |
|
// calzx[plane] = zpiano[plane] -5.81*var.sfy/1000. + var.yxvc; |
5018 |
|
calzx[plane] = zpiano[plane] + var.yxvc; |
5019 |
|
calzy[plane] = zpiano[plane] + var.yyvc; |
5020 |
|
// printf(" calx %f caly %f calzx %f calzy %f \n",calx[plane],caly[plane],calzx[plane],calzy[plane]); |
5021 |
|
}; |
5022 |
|
// |
5023 |
|
// Calorimeter track |
5024 |
|
// |
5025 |
|
Int_t trcol = 30; |
5026 |
|
if ( var.bw ){ |
5027 |
|
trcol = 16; |
5028 |
|
} else { |
5029 |
|
trcol = 46; |
5030 |
|
}; |
5031 |
|
thefigure->cd(); |
5032 |
|
TPolyLine *trakx = new TPolyLine(22,calx,calzx); |
5033 |
|
trakx->SetLineColor(trcol); |
5034 |
|
trakx->SetLineStyle(3); |
5035 |
|
trakx->SetLineWidth(2); |
5036 |
|
trakx->Draw(); |
5037 |
|
TPolyLine *traky = new TPolyLine(22,caly,calzy); |
5038 |
|
traky->SetLineColor(trcol); |
5039 |
|
traky->SetLineStyle(3); |
5040 |
|
traky->SetLineWidth(2); |
5041 |
|
traky->Draw(); |
5042 |
|
}; |
5043 |
|
}; |
5044 |
|
// |
5045 |
if ( !var.TRK || level.file != 2 ) return; |
if ( !var.TRK || level.file != 2 ) return; |
5046 |
// |
// |
5047 |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
if ( L2->GetTrkLevel2()->GetNTracks() > 0 ){ |
5116 |
}; |
}; |
5117 |
tzx[e] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yxvc; |
tzx[e] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yxvc; |
5118 |
tzy[e] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yyvc; |
tzy[e] = (0.112)*var.sfy+((float)zin[e]/100.)*var.sfy + var.yyvc; |
5119 |
|
// printf("tx[e] %f ty [e] %f tzx %f tzy %f \n",tx[e],ty[e],tzx[e],tzy[e]); |
5120 |
}; |
}; |
5121 |
// |
// |
5122 |
// From S1 to CALO |
// From S1 to CALO |