/[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.57 by pam-ts, Wed Jun 4 07:57:04 2014 UTC revision 1.59 by pam-ts, Wed Oct 15 08:45:51 2014 UTC
# Line 381  Int_t TrkTrack::GetLeverArmXY(){ Line 381  Int_t TrkTrack::GetLeverArmXY(){
381      int first_plane = -1;      int first_plane = -1;
382      int last_plane  = -1;      int last_plane  = -1;
383      for(Int_t ip=0; ip<6; ip++){      for(Int_t ip=0; ip<6; ip++){
384          if( XGood(ip)*YGood(ip) && first_plane == -1 )first_plane = ip;          if( XGood(ip) && YGood(ip) && first_plane == -1 )first_plane = ip;
385          if( XGood(ip)*YGood(ip) && first_plane != -1 )last_plane = ip;          if( XGood(ip) && YGood(ip) && first_plane != -1 )last_plane = ip;
386      }      }
387      if( first_plane == -1 || last_plane == -1){      if( first_plane == -1 || last_plane == -1){
388          cout<< "Int_t TrkTrack::GetLeverArmXY() -- XGood(ip)*YGood(ip) always false ??? "<<endl;          cout<< "Int_t TrkTrack::GetLeverArmXY() -- XGood(ip)*YGood(ip) always false ??? "<<endl;
# Line 406  Float_t  TrkTrack::GetChi2X(){ Line 406  Float_t  TrkTrack::GetChi2X(){
406      for(int ip=0; ip<6; ip++)if(XGood(ip))chiq+= pow((xv[ip]-xm[ip])/resx[ip],2.);      for(int ip=0; ip<6; ip++)if(XGood(ip))chiq+= pow((xv[ip]-xm[ip])/resx[ip],2.);
407      if(GetNX()>3)chiq=chiq/(GetNX()-3);      if(GetNX()>3)chiq=chiq/(GetNX()-3);
408      else chiq=0;      else chiq=0;
409      if(chiq==0)cout << " Float_t  TrkTrack::GetChi2X() -- WARNING -- value not defined "<<chiq<<endl;      //    if(chiq==0)cout << " Float_t  TrkTrack::GetChi2X() -- WARNING -- value not defined "<<chiq<<endl;
410      return chiq;      return chiq;
411  }  }
412  /**  /**
# Line 417  Float_t  TrkTrack::GetChi2Y(){ Line 417  Float_t  TrkTrack::GetChi2Y(){
417      for(int ip=0; ip<6; ip++)if(YGood(ip))chiq+= pow((yv[ip]-ym[ip])/resy[ip],2.);      for(int ip=0; ip<6; ip++)if(YGood(ip))chiq+= pow((yv[ip]-ym[ip])/resy[ip],2.);
418      if(GetNY()>2)chiq=chiq/(GetNY()-2);      if(GetNY()>2)chiq=chiq/(GetNY()-2);
419      else chiq=0;      else chiq=0;
420      if(chiq==0)cout << " Float_t  TrkTrack::GetChi2Y() -- WARNING -- value not defined "<<chiq<<endl;      //    if(chiq==0)cout << " Float_t  TrkTrack::GetChi2Y() -- WARNING -- value not defined "<<chiq<<endl;
421      return chiq;      return chiq;
422  }  }
423  /**  /**
# Line 1584  void TrkLevel2::Set(){ Line 1584  void TrkLevel2::Set(){
1584  //  //
1585  //  //
1586  //--------------------------------------  //--------------------------------------
1587    void TrkLevel2::SetTrackArray(TClonesArray *track){
1588        if(track && strcmp(track->GetClass()->GetName(),"TrkTrack")==0){
1589            if(Track)Track->Clear("C");    
1590            Track = track;
1591        }
1592    }
1593    //--------------------------------------
1594    //
1595    //
1596    //--------------------------------------
1597  void TrkLevel2::Dump(){  void TrkLevel2::Dump(){
1598                    
1599          //          //

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.59

  ViewVC Help
Powered by ViewVC 1.1.23