/[PAMELA software]/DarthVader/TrackerLevel2/src/TrkLevel2.cpp
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/src/TrkLevel2.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29 by pam-fi, Thu Mar 15 12:17:10 2007 UTC revision 1.31 by pam-fi, Wed Mar 28 09:22:28 2007 UTC
# Line 235  Float_t TrkTrack::GetDeflection(){ Line 235  Float_t TrkTrack::GetDeflection(){
235  //  //
236  Float_t TrkTrack::GetDEDX(){  Float_t TrkTrack::GetDEDX(){
237          Float_t dedx=0;          Float_t dedx=0;
238          for(Int_t i=0; i<6; i++)dedx+=dedx_x[i]*xgood[i]+dedx_y[i]*ygood[i];  //      for(Int_t i=0; i<6; i++)dedx+=dedx_x[i]*xgood[i]+dedx_y[i]*ygood[i];
239            for(Int_t i=0; i<6; i++)dedx+=dedx_x[i]*XGood(i)+dedx_y[i]*YGood(i);
240          dedx = dedx/(this->GetNX()+this->GetNY());          dedx = dedx/(this->GetNX()+this->GetNY());
241          return dedx;          return dedx;
242  };  };
# Line 251  void TrkTrack::Dump(){ Line 252  void TrkTrack::Dump(){
252      cout << endl << "al       : "; for(int i=0; i<5; i++)cout << al[i] << " ";      cout << endl << "al       : "; for(int i=0; i<5; i++)cout << al[i] << " ";
253      cout << endl << "chi^2    : "<< chi2;      cout << endl << "chi^2    : "<< chi2;
254      cout << endl << "n.step   : "<< nstep;      cout << endl << "n.step   : "<< nstep;
255      cout << endl << "xgood    : "; for(int i=0; i<6; i++)cout << xgood[i] ;      cout << endl << "xgood    : "; for(int i=0; i<6; i++)cout << XGood(i) ;
256      cout << endl << "ygood    : "; for(int i=0; i<6; i++)cout << ygood[i] ;      cout << endl << "ygood    : "; for(int i=0; i<6; i++)cout << YGood(i) ;
257      cout << endl << "xm       : "; for(int i=0; i<6; i++)cout << xm[i] << " ";      cout << endl << "xm       : "; for(int i=0; i<6; i++)cout << xm[i] << " ";
258      cout << endl << "ym       : "; for(int i=0; i<6; i++)cout << ym[i] << " ";      cout << endl << "ym       : "; for(int i=0; i<6; i++)cout << ym[i] << " ";
259      cout << endl << "zm       : "; for(int i=0; i<6; i++)cout << zm[i] << " ";      cout << endl << "zm       : "; for(int i=0; i<6; i++)cout << zm[i] << " ";
# Line 289  void TrkTrack::SetResolution(double *rx, Line 290  void TrkTrack::SetResolution(double *rx,
290   * Set the TrkTrack good measurement   * Set the TrkTrack good measurement
291   */   */
292  void TrkTrack::SetGood(int *xg, int *yg){  void TrkTrack::SetGood(int *xg, int *yg){
293        // NB! si perdera` l'informazione sul numero del cluster
294      for(int i=0; i<6; i++) xgood[i]=*xg++;      for(int i=0; i<6; i++) xgood[i]=*xg++;
295      for(int i=0; i<6; i++) ygood[i]=*yg++;      for(int i=0; i<6; i++) ygood[i]=*yg++;
296  }  }
# Line 316  void TrkTrack::FillMiniStruct(cMini2trac Line 318  void TrkTrack::FillMiniStruct(cMini2trac
318    
319      for(int i=0; i<6; i++){      for(int i=0; i<6; i++){
320    
321          track.xgood[i]=xgood[i];  //      track.xgood[i]=xgood[i];
322          track.ygood[i]=ygood[i];  //      track.ygood[i]=ygood[i];
323            track.xgood[i]=XGood(i);
324            track.ygood[i]=YGood(i);
325                    
326          track.xm[i]=xm[i];          track.xm[i]=xm[i];
327          track.ym[i]=ym[i];          track.ym[i]=ym[i];
# Line 330  void TrkTrack::FillMiniStruct(cMini2trac Line 334  void TrkTrack::FillMiniStruct(cMini2trac
334          track.xm_b[i]=xm[i];          track.xm_b[i]=xm[i];
335          track.ym_a[i]=ym[i];          track.ym_a[i]=ym[i];
336          track.ym_b[i]=ym[i];          track.ym_b[i]=ym[i];
337          if(       xgood[i] && !ygood[i] ){          if(       XGood(i) && !YGood(i) ){
338              track.ym_a[i] = track.ym_a[i]+segment;              track.ym_a[i] = track.ym_a[i]+segment;
339              track.ym_b[i] = track.ym_b[i]-segment;              track.ym_b[i] = track.ym_b[i]-segment;
340          }else if( !xgood[i] && ygood[i]){          }else if( !XGood(i) && YGood(i)){
341              track.xm_a[i] = track.xm_a[i]+segment;              track.xm_a[i] = track.xm_a[i]+segment;
342              track.xm_b[i] = track.xm_b[i]-segment;              track.xm_b[i] = track.xm_b[i]-segment;
343          }          }
# Line 451  void TrkTrack::FitReset(){ Line 455  void TrkTrack::FitReset(){
455          for(int j=0; j<5; j++) coval[i][j]=0.;          for(int j=0; j<5; j++) coval[i][j]=0.;
456      }      }
457  }  }
458    /*
459     * Set the tracking mode
460     */
461  void TrkTrack::SetTrackingMode(int trackmode){  void TrkTrack::SetTrackingMode(int trackmode){
462      extern cMini2track track_;      extern cMini2track track_;
463      track_.trackmode = trackmode;      track_.trackmode = trackmode;
464  }  }
465    /*
466     * Set the factor scale for tracking precision
467     */
468    void TrkTrack::SetPrecisionFactor(double fact){
469        extern cMini2track track_;
470        track_.fact = fact;
471    }
472    /*
473     * Set the factor scale for tracking precision
474     */
475    void TrkTrack::SetStepMin(int istepmin){
476        extern cMini2track track_;
477        track_.istepmin = istepmin;
478    }
479    
480    
481  /*  /*
# Line 865  void TrkLevel2::GetLevel2Struct(cTrkLeve Line 886  void TrkLevel2::GetLevel2Struct(cTrkLeve
886                      l2->coval[i][it2][it1] = ((TrkTrack *)Track->At(i))->coval[it1][it2];                      l2->coval[i][it2][it1] = ((TrkTrack *)Track->At(i))->coval[it1][it2];
887              };              };
888              for(int ip=0;ip<6;ip++){              for(int ip=0;ip<6;ip++){
889                  l2->xgood_nt[i][ip] = ((TrkTrack *)Track->At(i))->xgood[ip];                  l2->xgood_nt[i][ip] = ((TrkTrack *)Track->At(i))->XGood(ip);
890                  l2->ygood_nt[i][ip] = ((TrkTrack *)Track->At(i))->ygood[ip];                  l2->ygood_nt[i][ip] = ((TrkTrack *)Track->At(i))->YGood(ip);
891                  l2->xm_nt[i][ip]    = ((TrkTrack *)Track->At(i))->xm[ip];                  l2->xm_nt[i][ip]    = ((TrkTrack *)Track->At(i))->xm[ip];
892                  l2->ym_nt[i][ip]    = ((TrkTrack *)Track->At(i))->ym[ip];                  l2->ym_nt[i][ip]    = ((TrkTrack *)Track->At(i))->ym[ip];
893                  l2->zm_nt[i][ip]    = ((TrkTrack *)Track->At(i))->zm[ip];                  l2->zm_nt[i][ip]    = ((TrkTrack *)Track->At(i))->zm[ip];

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.23