| 25 |
_whichAlg = id; |
_whichAlg = id; |
| 26 |
|
|
| 27 |
|
|
| 28 |
SetDebug(true); |
SetDebug(false); |
| 29 |
|
|
| 30 |
if(id == 0){ |
if(id == 0){ |
| 31 |
// if(_debug){ |
if(_debug){ |
| 32 |
cout << "ExtTrkingAlg::ExtTrkingAlg("<<id<<")"<<endl; |
cout << "ExtTrkingAlg::ExtTrkingAlg("<<id<<")"<<endl; |
| 33 |
// cout << "Creating array of TrkTrack objects "<<endl; |
// cout << "Creating array of TrkTrack objects "<<endl; |
| 34 |
cout << "WARNING!!! tracking not accurate!! bug not fixed yet... "<<endl; |
cout << "WARNING!!! tracking not accurate!! bug not fixed yet... "<<endl; |
| 35 |
// } |
} |
| 36 |
_trkArray = new TClonesArray("TrkTrack"); |
_trkArray = new TClonesArray("TrkTrack"); |
| 37 |
// |
// |
| 38 |
_sel_nClstrMAX = 20. ; // selection parameter: maximum number of cluster |
_sel_nClstrMAX = 20. ; // selection parameter: maximum number of cluster |
| 55 |
}else if ( (id >= 100 && id < 144) || |
}else if ( (id >= 100 && id < 144) || |
| 56 |
(id >= 200 && id < 244) || |
(id >= 200 && id < 244) || |
| 57 |
false){ //add n calo planes |
false){ //add n calo planes |
| 58 |
// if(_debug){ |
if(_debug){ |
| 59 |
cout << "ExtTrkingAlg::ExtTrkingAlg("<<id<<")"<<endl; |
cout << "ExtTrkingAlg::ExtTrkingAlg("<<id<<")"<<endl; |
| 60 |
// cout << "Creating array of ExtTrack objects "<<endl; |
// cout << "Creating array of ExtTrack objects "<<endl; |
| 61 |
// } |
} |
| 62 |
_trkArray = new TClonesArray("ExtTrack"); |
_trkArray = new TClonesArray("ExtTrack"); |
| 63 |
// |
// |
| 64 |
_alg_nClFixX = 3.; // algorythm parameter: n.hits required on X view |
_alg_nClFixX = 3.; // algorythm parameter: n.hits required on X view |
| 109 |
//------------------------------------------ |
//------------------------------------------ |
| 110 |
// read alignment parameters |
// read alignment parameters |
| 111 |
//------------------------------------------ |
//------------------------------------------ |
| 112 |
|
// printf("qui debug : %i \n",_debug); |
| 113 |
if(_debug) cout << "Reading calorimeter alignment parameters"<<endl; |
if(_debug) cout << "Reading calorimeter alignment parameters"<<endl; |
| 114 |
const char *pamca = gSystem->Getenv("PAM_CALIB"); |
const char *pamca = gSystem->Getenv("PAM_CALIB"); |
| 115 |
TString filep = "/trk-param/align_param_calo-0/CaloAlignParams.txt"; |
TString filep = "/trk-param/align_param_calo-0/CaloAlignParams.txt"; |
| 1062 |
Float_t mip = l1->DecodeEstrip(ih,view,plane,strip); |
Float_t mip = l1->DecodeEstrip(ih,view,plane,strip); |
| 1063 |
|
|
| 1064 |
// if(strip == 0 || strip == 95)cout <<" strip "<<strip<<" OK "<<endl; |
// if(strip == 0 || strip == 95)cout <<" strip "<<strip<<" OK "<<endl; |
| 1065 |
if(strip < 0 || strip > 95)cout <<" strip "<<strip<<" AHI AHI "<<endl; |
if((strip < 0 || strip > 95) && _debug)cout <<" strip "<<strip<<" AHI AHI "<<endl; |
| 1066 |
|
|
| 1067 |
if(view<0)continue; |
if(view<0)continue; |
| 1068 |
if(plane<0)continue; |
if(plane<0)continue; |
| 1419 |
// cout << " extst.Set("<<(int)isY<<", "<<plane<<", "<<cluster.coordPU<<", "<<sensor<<") "<<endl; |
// cout << " extst.Set("<<(int)isY<<", "<<plane<<", "<<cluster.coordPU<<", "<<sensor<<") "<<endl; |
| 1420 |
// extst.Set((int)isY, plane, cluster.coordPU, sensor); |
// extst.Set((int)isY, plane, cluster.coordPU, sensor); |
| 1421 |
|
|
| 1422 |
if( sisensor != extst.GetSiSensor() )cout << " extst.GetSiSensor() "<<extst.GetSiSensor()<<" != "<<sisensor<<endl; |
if( sisensor != extst.GetSiSensor() && _debug )cout << " extst.GetSiSensor() "<<extst.GetSiSensor()<<" != "<<sisensor<<endl; |
| 1423 |
if( plane != extst.GetPlane() )cout << " extst.GetPlane() "<<extst.GetPlane()<<" != "<<plane<<endl; |
if( plane != extst.GetPlane() && _debug )cout << " extst.GetPlane() "<<extst.GetPlane()<<" != "<<plane<<endl; |
| 1424 |
if( (int)isY != extst.GetView() )cout << " extst.GetView() "<<extst.GetView()<<" != "<<isY<<endl; |
if( (int)isY != extst.GetView() && _debug )cout << " extst.GetView() "<<extst.GetView()<<" != "<<isY<<endl; |
| 1425 |
// cout << " extst.SetStrip("<<cluster.coordPU<<") "<<endl; |
// cout << " extst.SetStrip("<<cluster.coordPU<<") "<<endl; |
| 1426 |
extst.SetStrip(cluster.coordPU); |
extst.SetStrip(cluster.coordPU); |
| 1427 |
|
|
| 1525 |
// if(isY) VMS[nW] = rms*rms; |
// if(isY) VMS[nW] = rms*rms; |
| 1526 |
// if(_debug)cout <<endl<<view<<" nW "<<nW<<" res(MS) "<<rms<<" factor "<<factor; |
// if(_debug)cout <<endl<<view<<" nW "<<nW<<" res(MS) "<<rms<<" factor "<<factor; |
| 1527 |
|
|
| 1528 |
if(view>=3)cout << " --> NB error computation not accurate "; |
if(view>=3 && _debug)cout << " --> NB error computation not accurate "; |
| 1529 |
res_ms = rms; |
res_ms = rms; |
| 1530 |
|
|
| 1531 |
} |
} |
| 2929 |
int ifail=0; |
int ifail=0; |
| 2930 |
|
|
| 2931 |
|
|
| 2932 |
|
// trackCand.Dump(); |
| 2933 |
|
|
| 2934 |
trackCand.ResetFit(); |
trackCand.ResetFit(); |
| 2935 |
trackCand.Fit(0.,ifail,0); |
trackCand.Fit(0.,ifail,0); |
| 2936 |
if(ifail!=0)trackCand.ResetFit(); |
if(ifail!=0)trackCand.ResetFit(); |
| 2937 |
|
|
| 2938 |
// trackCand.Dump(); |
// trackCand.Dump(); |
| 2939 |
|
|
| 2940 |
|
|
| 2941 |
// ----------------------------------- |
// ----------------------------------- |
| 2977 |
if(_debug)cout << "n.candidates "<<trackCandidates[mapIndex].size()<<endl; |
if(_debug)cout << "n.candidates "<<trackCandidates[mapIndex].size()<<endl; |
| 2978 |
|
|
| 2979 |
|
|
|
|
|
| 2980 |
//================================================================= |
//================================================================= |
| 2981 |
// ---------------------------------------------------------------- |
// ---------------------------------------------------------------- |
| 2982 |
// CALORIMETER |
// CALORIMETER |