28 |
|
|
29 |
|
|
30 |
if(id == 0){ |
if(id == 0){ |
31 |
|
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){ |
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 |
107 |
//------------------------------------------ |
//------------------------------------------ |
108 |
// read alignment parameters |
// read alignment parameters |
109 |
//------------------------------------------ |
//------------------------------------------ |
110 |
cout << "Reading calorimeter alignment parameters"<<endl; |
if(_debug) cout << "Reading calorimeter alignment parameters"<<endl; |
111 |
const char *pamca = gSystem->Getenv("PAM_CALIB"); |
const char *pamca = gSystem->Getenv("PAM_CALIB"); |
112 |
TString filep = "/trk-param/align_param_calo-0/CaloAlignParams.txt"; |
TString filep = "/trk-param/align_param_calo-0/CaloAlignParams.txt"; |
113 |
filep.Prepend(pamca); |
filep.Prepend(pamca); |
124 |
|
|
125 |
|
|
126 |
int index = (plane*2+1-view)*9 + sensor; |
int index = (plane*2+1-view)*9 + sensor; |
127 |
cout<<index<<" >> "; |
if(_debug){ |
128 |
cout<<view << " "<<plane<<" "<<sensor<<" "; |
cout<<index<<" >> "; |
129 |
for(int i=0; i<5; i++)cout<<setw(10)<<par[i]<<" "<<setw(10)<<err[i]<<" "; |
cout<<view << " "<<plane<<" "<<sensor<<" "; |
130 |
cout<<endl; |
for(int i=0; i<5; i++)cout<<setw(10)<<par[i]<<" "<<setw(10)<<err[i]<<" "; |
131 |
|
cout<<endl; |
132 |
|
} |
133 |
|
|
134 |
_caloStripRoto[index].SetAligParams__fPitch(par[0]); |
_caloStripRoto[index].SetAligParams__fPitch(par[0]); |
135 |
_caloStripRoto[index].SetAligParams__shift(par+1); |
_caloStripRoto[index].SetAligParams__shift(par+1); |
159 |
|
|
160 |
for(int ip =0 ; ip<_extTrack->nplanes; ip++ )_extTrack->SetZ(ip,_zMech[ip]); |
for(int ip =0 ; ip<_extTrack->nplanes; ip++ )_extTrack->SetZ(ip,_zMech[ip]); |
161 |
|
|
162 |
cout <<" Extended-track Z-coordinates: "<<endl; |
if ( _debug ){ |
163 |
for(int ip =0 ; ip<_extTrack->nplanes; ip++ )cout << _extTrack->zm[ip]<<endl; |
cout <<" Extended-track Z-coordinates: "<<endl; |
164 |
|
for(int ip =0 ; ip<_extTrack->nplanes; ip++ )cout << _extTrack->zm[ip]<<endl; |
165 |
|
} |
166 |
}else{ |
}else{ |
167 |
|
if ( _debug ){ |
168 |
cout << "ExtTrkingAlg(Int_t id) -- algorythm id="<<id<<" not valid "<<endl; |
cout << "ExtTrkingAlg(Int_t id) -- algorythm id="<<id<<" not valid "<<endl; |
169 |
cout << "--> Track array not created "<<endl; |
cout << "--> Track array not created "<<endl; |
170 |
|
} |
171 |
_sel_nClstrMAX = 0.; |
_sel_nClstrMAX = 0.; |
172 |
_sel_nPlaneXMIN = 0.; |
_sel_nPlaneXMIN = 0.; |
173 |
_sel_nPlaneYMIN = 0.; |
_sel_nPlaneYMIN = 0.; |
484 |
}//end iterations |
}//end iterations |
485 |
|
|
486 |
|
|
487 |
if( trackCandidates[mapIndex].size() > nTrackMAX ){ |
if( trackCandidates[mapIndex].size() > (uint)nTrackMAX ){ // EM, warning: comparison between signed and unsigned integer expressions [-Wsign-compare] |
488 |
if(_debug)cout << "n.candidates "<<trackCandidates[mapIndex].size()<<" > "<<nTrackMAX<<endl; |
if(_debug)cout << "n.candidates "<<trackCandidates[mapIndex].size()<<" > "<<nTrackMAX<<endl; |
489 |
return;//to many candidates |
return;//to many candidates |
490 |
} |
} |
496 |
cout << " >> "; |
cout << " >> "; |
497 |
cout << " X: "; |
cout << " X: "; |
498 |
for(int ip=0; ip<6; ip++) |
for(int ip=0; ip<6; ip++) |
499 |
if(trackCand.GetClusterX_ID(ip)>=0)cout << trackCand.GetClusterX_ID(ip)<<":"<<trackCand.GetSensor(ip)<<"|"; |
if(trackCand.GetClusterX_ID(ip)>=0)cout << trackCand.GetClusterX_ID(ip)<<":"<<trackCand.GetSensor(ip)<<"|"; |
500 |
cout << " Y: "; |
cout << " Y: "; |
501 |
for(int ip=0; ip<6; ip++) |
for(int ip=0; ip<6; ip++) |
502 |
if(trackCand.GetClusterY_ID(ip)>=0)cout << trackCand.GetClusterY_ID(ip)<<":"<<trackCand.GetSensor(ip)<<"|"; |
if(trackCand.GetClusterY_ID(ip)>=0)cout << trackCand.GetClusterY_ID(ip)<<":"<<trackCand.GetSensor(ip)<<"|"; |
503 |
cout << endl; |
cout << endl; |
504 |
} |
} |
505 |
} |
} |
1298 |
// int plane = 6 + cluster.view; //0...21 |
// int plane = 6 + cluster.view; //0...21 |
1299 |
int plane = (int)(cluster.view / 2 ); //0...21 |
int plane = (int)(cluster.view / 2 ); //0...21 |
1300 |
int ladder = (int)(cluster.coordPU / 32);//0...2 |
int ladder = (int)(cluster.coordPU / 32);//0...2 |
1301 |
int view = cluster.view;//0...43 |
// int view = cluster.view;//0...43 // EM, unused variable |
1302 |
bool isX = (cluster.view)%2; |
bool isX = (cluster.view)%2; |
1303 |
bool isY = !isX; |
bool isY = !isX; |
1304 |
|
|
1447 |
|
|
1448 |
int view = cluster.view; //0... 43 |
int view = cluster.view; //0... 43 |
1449 |
|
|
1450 |
int nW = (int)((view + 1)/2); |
// int nW = (int)((view + 1)/2); // EM, unused variable |
1451 |
float dW = 0.74*factor;//X0 |
float dW = 0.74*factor;//X0 |
1452 |
float dW_cm = 0.26*factor;//cm |
float dW_cm = 0.26*factor;//cm |
1453 |
float dSi_cm = 0.; //cm |
float dSi_cm = 0.; //cm |
1477 |
|
|
1478 |
} |
} |
1479 |
|
|
1480 |
|
return true; // EM, warning: no return statement in function returning non-void [-Wreturn-type] |
1481 |
} |
} |
1482 |
|
|
1483 |
|
|
1767 |
|
|
1768 |
} |
} |
1769 |
|
|
1770 |
if( trackCandidates[mapIndex].size() > nTrackMAX ){ |
if( trackCandidates[mapIndex].size() > (uint)nTrackMAX ){ // EM, compilation warning comparison between signed and unsigned |
1771 |
if(_debug)cout << "n.candidates "<<trackCandidates[mapIndex].size()<<" > "<<nTrackMAX<<endl; |
if(_debug)cout << "n.candidates "<<trackCandidates[mapIndex].size()<<" > "<<nTrackMAX<<endl; |
1772 |
return;//to many candidates |
return;//to many candidates |
1773 |
} |
} |
2247 |
// and |
// and |
2248 |
// evaluated other track info |
// evaluated other track info |
2249 |
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
2250 |
float VMS[22];VMS[0]=0.; |
// float VMS[22];VMS[0]=0.; // EM, 2245:13: warning: variable ?VMS? set but not used [-Wunused-but-set-variable] |
2251 |
for(int ip=0; ip<NEXTPLANES; ip++){ |
for(int ip=0; ip<NEXTPLANES; ip++){ |
2252 |
|
|
2253 |
if(!t_track.XGood(ip)&&!t_track.YGood(ip))continue; |
if(!t_track.XGood(ip)&&!t_track.YGood(ip))continue; |
2828 |
|
|
2829 |
} |
} |
2830 |
|
|
2831 |
if( trackCandidates[mapIndex+1].size() > nTrackMAX ){ |
if( trackCandidates[mapIndex+1].size() > (uint)nTrackMAX ){ //EM, 2826:50: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] |
2832 |
if(_debug)cout << "n.candidates "<<trackCandidates[mapIndex+1].size()<<" > "<<nTrackMAX<<endl; |
if(_debug)cout << "n.candidates "<<trackCandidates[mapIndex+1].size()<<" > "<<nTrackMAX<<endl; |
2833 |
return;//to many candidates |
return;//to many candidates |
2834 |
} |
} |
3297 |
// and |
// and |
3298 |
// evaluated other track info |
// evaluated other track info |
3299 |
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
3300 |
float VMS[22];VMS[0]=0.; |
//float VMS[22];VMS[0]=0.; //EM, 3295:14: warning: variable ?VMS? set but not used [-Wunused-but-set-variable] |
3301 |
for(int ip=0; ip<NEXTPLANES; ip++){ |
for(int ip=0; ip<NEXTPLANES; ip++){ |
3302 |
|
|
3303 |
if(!t_track.XGood(ip)&&!t_track.YGood(ip))continue; |
if(!t_track.XGood(ip)&&!t_track.YGood(ip))continue; |