319 |
* The method was modified for the "ToF-standalone" part in february 2015 |
* The method was modified for the "ToF-standalone" part in february 2015 |
320 |
* The "adcfl" option is not very useful (an artificial dEdx is per |
* The "adcfl" option is not very useful (an artificial dEdx is per |
321 |
* definition= 1 mip and not a real measurement), anyway left in the code |
* definition= 1 mip and not a real measurement), anyway left in the code |
322 |
* @param trk Pointer to TofTrkVar class |
* @param trk Pointer to TofTrkVar object |
323 |
* @param plane Plane index (0,1,2,3,4,5) |
* @param plane Plane index (0,1,2,3,4,5) |
324 |
* @param adcflag in the plane (100<-> independent of the adcflag; !=0&&!=100 <-> at least one PMT with adcflag!=0; ) |
* @param adcflag in the plane (100<-> independent of the adcflag; !=0&&!=100 <-> at least one PMT with adcflag!=0; ) |
325 |
*/ |
*/ |
453 |
*/ |
*/ |
454 |
Int_t ToFLevel2::GetPMTid(Int_t hh, Int_t kk){ |
Int_t ToFLevel2::GetPMTid(Int_t hh, Int_t kk){ |
455 |
// |
// |
456 |
short tof[4][24] = { |
static const short tof[4][24] = { |
457 |
{4, 4, 4, 4, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 2, 3, 3, 3, 3, 4}, |
{4, 4, 4, 4, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 2, 3, 3, 3, 3, 4}, |
458 |
{1, 3, 5, 7, 10, 12, 2, 4, 2, 4, 6, 8, 10, 12, 1, 5, 3, 9, 7, 9, 11, 1, 5, 9}, |
{1, 3, 5, 7, 10, 12, 2, 4, 2, 4, 6, 8, 10, 12, 1, 5, 3, 9, 7, 9, 11, 1, 5, 9}, |
459 |
{2, 2, 2, 2, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 2, 1, 2, 1, 2, 2, 2, 3, 3, 4}, |
{2, 2, 2, 2, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 2, 1, 2, 1, 2, 2, 2, 3, 3, 4}, |
489 |
*/ |
*/ |
490 |
void ToFLevel2::GetPMTIndex(Int_t ind, Int_t &hb, Int_t &ch){ |
void ToFLevel2::GetPMTIndex(Int_t ind, Int_t &hb, Int_t &ch){ |
491 |
// |
// |
492 |
short tof[4][24] = { |
static const short tof[4][24] = { |
493 |
{4, 4, 4, 4, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 2, 3, 3, 3, 3, 4}, |
{4, 4, 4, 4, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 2, 3, 3, 3, 3, 4}, |
494 |
{1, 3, 5, 7, 10, 12, 2, 4, 2, 4, 6, 8, 10, 12, 1, 5, 3, 9, 7, 9, 11, 1, 5, 9}, |
{1, 3, 5, 7, 10, 12, 2, 4, 2, 4, 6, 8, 10, 12, 1, 5, 3, 9, 7, 9, 11, 1, 5, 9}, |
495 |
{2, 2, 2, 2, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 2, 1, 2, 1, 2, 2, 2, 3, 3, 4}, |
{2, 2, 2, 2, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 2, 1, 2, 1, 2, 2, 2, 3, 3, 4}, |
649 |
|
|
650 |
TString pmtname = " "; |
TString pmtname = " "; |
651 |
|
|
652 |
TString photoS[48] = { |
static const TString photoS[48] = { |
653 |
"S11_1A", "S11_1B", "S11_2A", "S11_2B", "S11_3A", "S11_3B", "S11_4A", |
"S11_1A", "S11_1B", "S11_2A", "S11_2B", "S11_3A", "S11_3B", "S11_4A", |
654 |
"S11_4B", |
"S11_4B", |
655 |
"S11_5A", "S11_5B", "S11_6A", "S11_6B", "S11_7A", "S11_7B", "S11_8A", |
"S11_5A", "S11_5B", "S11_6A", "S11_6B", "S11_7A", "S11_7B", "S11_8A", |
1109 |
* @param cut on chi2 |
* @param cut on chi2 |
1110 |
*/ |
*/ |
1111 |
|
|
|
Float_t ToFLevel2::CalcBeta(Int_t notrack, Float_t resmax, Float_t qualitycut, Float_t chi2cut){ |
|
1112 |
|
|
1113 |
// cout<<" in CalcBeta "<<resmax<<" "<<chi2cut<<" "<<qualitycut<<endl; |
Float_t ToFTrkVar::CalcBeta( Float_t resmax, Float_t qualitycut, Float_t chi2cut){ |
1114 |
|
|
1115 |
|
|
1116 |
Float_t bxx = 100.; |
Float_t bxx = 100.; |
1117 |
// |
// |
1118 |
ToFTrkVar *trk = GetToFTrkVar(notrack); |
ToFTrkVar *trk = this; |
|
if(!trk) return 0; //ELENA |
|
1119 |
|
|
1120 |
|
|
1121 |
Float_t chi2,xhelp,beta_mean; |
Float_t chi2,xhelp,beta_mean; |
1142 |
for (Int_t i=0; i<trk->npmttdc; i++){ |
for (Int_t i=0; i<trk->npmttdc; i++){ |
1143 |
// |
// |
1144 |
pmt_id = (trk->pmttdc).At(i); |
pmt_id = (trk->pmttdc).At(i); |
1145 |
pmt_plane = GetPlaneIndex(pmt_id); |
pmt_plane = ToFLevel2::GetPlaneIndex(pmt_id); |
1146 |
tdcfl = (trk->tdcflag).At(i); |
tdcfl = (trk->tdcflag).At(i); |
1147 |
if (w_il[pmt_plane] != 1.) w_il[pmt_plane] = tdcfl; //tdcflag |
if (w_il[pmt_plane] != 1.) w_il[pmt_plane] = tdcfl; //tdcflag |
1148 |
}; |
}; |
1229 |
// |
// |
1230 |
return(bxx); |
return(bxx); |
1231 |
}; |
}; |
1232 |
|
//////////////////////////////////////////////////// |
1233 |
|
//////////////////////////////////////////////////// |
1234 |
|
/** |
1235 |
|
* See ToFTrkVar::CalcBeta(Float_t,Float_t, Float_t). |
1236 |
|
*/ |
1237 |
|
Float_t ToFLevel2::CalcBeta(Int_t notrack, Float_t resmax, Float_t qualitycut, Float_t chi2cut){ |
1238 |
|
|
1239 |
|
// cout<<" in CalcBeta "<<resmax<<" "<<chi2cut<<" "<<qualitycut<<endl; |
1240 |
|
|
1241 |
|
ToFTrkVar *trk = GetToFTrkVar(notrack); |
1242 |
|
if(!trk) return 0; //ELENA |
1243 |
|
|
1244 |
|
return trk->CalcBeta(resmax,qualitycut,chi2cut); |
1245 |
|
|
1246 |
|
}; |
1247 |
|
|
1248 |
|
|
1249 |
//////////////////////////////////////////////////// |
//////////////////////////////////////////////////// |