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