/[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.40 by pam-fi, Fri Aug 31 14:56:51 2007 UTC revision 1.42 by pam-fi, Tue Nov 27 15:28:57 2007 UTC
# Line 61  TrkTrack::TrkTrack(){ Line 61  TrkTrack::TrkTrack(){
61    
62      };      };
63    
64      TrkParams::SetTrackingMode();  //     TrkParams::SetTrackingMode();
65      TrkParams::SetPrecisionFactor();  //     TrkParams::SetPrecisionFactor();
66      TrkParams::SetStepMin();  //     TrkParams::SetStepMin();
67        TrkParams::SetMiniDefault();
68      TrkParams::SetPFA();      TrkParams::SetPFA();
69    
70  };  };
# Line 105  TrkTrack::TrkTrack(const TrkTrack& t){ Line 106  TrkTrack::TrkTrack(const TrkTrack& t){
106          ypu[ip]      = t.ypu[ip];            ypu[ip]      = t.ypu[ip];  
107      };      };
108    
109      TrkParams::SetTrackingMode();  //     TrkParams::SetTrackingMode();
110      TrkParams::SetPrecisionFactor();  //     TrkParams::SetPrecisionFactor();
111      TrkParams::SetStepMin();    //     TrkParams::SetStepMin();  
112        TrkParams::SetMiniDefault();
113      TrkParams::SetPFA();      TrkParams::SetPFA();
114    
115  };  };
# Line 621  void TrkTrack::LoadField(TString path){ Line 623  void TrkTrack::LoadField(TString path){
623  //     path_.error   = 0;  //     path_.error   = 0;
624  //     readb_();  //     readb_();
625    
626      TrkParams::SetTrackingMode();  //     TrkParams::SetTrackingMode();
627      TrkParams::SetPrecisionFactor();  //     TrkParams::SetPrecisionFactor();
628      TrkParams::SetStepMin();  //     TrkParams::SetStepMin();
629        TrkParams::SetMiniDefault();
630    
631      TrkParams::Set(path,1);      TrkParams::Set(path,1);
632      TrkParams::Load(1);      TrkParams::Load(1);
# Line 724  void TrkTrack::SetFromMiniStruct(cMini2t Line 727  void TrkTrack::SetFromMiniStruct(cMini2t
727   */   */
728  Bool_t TrkTrack::EvaluateClusterPositions(){  Bool_t TrkTrack::EvaluateClusterPositions(){
729            
730  //     cout << "void TrkTrack::GetClusterPositions() "<<endl;  //     cout << "void TrkTrack::GetClusterositions() "<<endl;
731    
732      TrkParams::Load( );      TrkParams::Load( );
733      if( !TrkParams::IsLoaded() )return false;      if( !TrkParams::IsLoaded() )return false;
# Line 772  Bool_t TrkTrack::EvaluateClusterPosition Line 775  Bool_t TrkTrack::EvaluateClusterPosition
775   * @see EvaluateClusterPositions()   * @see EvaluateClusterPositions()
776   *   *
777   * The fitting procedure can be varied by changing the tracking mode,   * The fitting procedure can be varied by changing the tracking mode,
778   * the fit-precision factor and the minimum number of step.   * the fit-precision factor, the minimum number of step, etc.
779   * @see SetTrackingMode(int)   * @see SetTrackingMode(int)
780   * @see SetPrecisionFactor(double)   * @see SetPrecisionFactor(double)
781   * @see SetStepMin(int)   * @see SetStepMin(int)
782     * @see SetDeltaB(int,double)
783   */   */
784  void TrkTrack::Fit(double pfixed, int& fail, int iprint, int froml1){  void TrkTrack::Fit(double pfixed, int& fail, int iprint, int froml1){
785    
# Line 878  void TrkTrack::SetStepMin(int istepmin){ Line 882  void TrkTrack::SetStepMin(int istepmin){
882      track_.istepmin = istepmin;      track_.istepmin = istepmin;
883  }  }
884  /**  /**
885     * Set deltaB parameters (id=0,1). By default they are set to zero.
886     */
887    void TrkTrack::SetDeltaB(int id, double db){
888        if(id!=0 && id!=1)cout << "void TrkTrack::SetDeltaB(int id,double db) -- wrong input parameters: "<<id<<" "<<db<<endl;
889        TrkParams::SetDeltaB(id,db);
890    }
891    
892    /**
893   * Returns 1 if the track is inside the magnet cavity   * Returns 1 if the track is inside the magnet cavity
894   * Set the minimum number of steps for tracking precision   * Set the minimum number of steps for tracking precision
895   */   */
# Line 1473  TRefArray *TrkLevel2::GetTracks_NFitSort Line 1485  TRefArray *TrkLevel2::GetTracks_NFitSort
1485  TrkTrack *TrkLevel2::GetStoredTrack(int is){  TrkTrack *TrkLevel2::GetStoredTrack(int is){
1486    
1487      if(is >= this->ntrk()){      if(is >= this->ntrk()){
1488          cout << "** TrkLevel2 ** Track "<< is << "doen not exits! " << endl;          cout << "TrkTrack *TrkLevel2::GetStoredTrack(int) >> Track "<< is << "doen not exits! " << endl;
1489          cout << "                Stored tracks ntrk() = "<< this->ntrk() << endl;          cout << "Stored tracks ntrk() = "<< this->ntrk() << endl;
1490          return 0;          return 0;
1491      }      }
1492      if(!Track){      if(!Track){
# Line 1495  TrkTrack *TrkLevel2::GetStoredTrack(int Line 1507  TrkTrack *TrkLevel2::GetStoredTrack(int
1507  TrkSinglet *TrkLevel2::GetSingletX(int is){  TrkSinglet *TrkLevel2::GetSingletX(int is){
1508    
1509          if(is >= this->nclsx()){          if(is >= this->nclsx()){
1510                  cout << "** TrkLevel2 ** Singlet "<< is << "doen not exits! " << endl;                  cout << "TrkSinglet *TrkLevel2::GetSingletX(int) >> Singlet "<< is << "doen not exits! " << endl;
1511                  cout << "                Stored x-singlets nclsx() = "<< this->nclsx() << endl;                  cout << "Stored x-singlets nclsx() = "<< this->nclsx() << endl;
1512                  return 0;                  return 0;
1513          }          }
1514          if(!SingletX)return 0;          if(!SingletX)return 0;
# Line 1515  TrkSinglet *TrkLevel2::GetSingletX(int i Line 1527  TrkSinglet *TrkLevel2::GetSingletX(int i
1527  TrkSinglet *TrkLevel2::GetSingletY(int is){  TrkSinglet *TrkLevel2::GetSingletY(int is){
1528    
1529          if(is >= this->nclsy()){          if(is >= this->nclsy()){
1530                  cout << "** TrkLevel2 ** Singlet "<< is << "doen not exits! " << endl;                  cout << "TrkSinglet *TrkLevel2::GetSingletY(int) >> Singlet "<< is << "doen not exits! " << endl;
1531                  cout << "                Stored y-singlets nclsy() = "<< this->nclsx() << endl;                  cout << "Stored y-singlets nclsx() = "<< this->nclsx() << endl;
1532                  return 0;                  return 0;
1533          }          }
1534          if(!SingletY)return 0;          if(!SingletY)return 0;
# Line 1536  TrkSinglet *TrkLevel2::GetSingletY(int i Line 1548  TrkSinglet *TrkLevel2::GetSingletY(int i
1548  TrkTrack *TrkLevel2::GetTrack(int it){  TrkTrack *TrkLevel2::GetTrack(int it){
1549            
1550          if(it >= this->GetNTracks()){          if(it >= this->GetNTracks()){
1551                  cout << "** TrkLevel2 ** Track "<< it << "does not exits! " << endl;                  cout << "TrkTrack *TrkLevel2::GetTrack(int) >> Track "<< it << "does not exits! " << endl;
1552                  cout << "                Physical tracks GetNTracks() = "<< this->ntrk() << endl;                  cout << "Physical tracks GetNTracks() = "<< this->ntrk() << endl;
1553                  return 0;                  return 0;
1554          }          }
1555                    
# Line 1574  Int_t TrkLevel2::GetNTracks(){ Line 1586  Int_t TrkLevel2::GetNTracks(){
1586  TrkTrack *TrkLevel2::GetTrackImage(int it){  TrkTrack *TrkLevel2::GetTrackImage(int it){
1587    
1588      if(it >= this->GetNTracks()){      if(it >= this->GetNTracks()){
1589          cout << "** TrkLevel2 ** Track "<< it << "does not exits! " << endl;          cout << "TrkTrack *TrkLevel2::GetTrackImage(int) >> Track "<< it << "does not exits! " << endl;
1590          cout << "                Physical tracks GetNTracks() = "<< this->ntrk() << endl;          cout << "Physical tracks GetNTracks() = "<< this->ntrk() << endl;
1591          return 0;          return 0;
1592      }      }
1593                    
# Line 1584  TrkTrack *TrkLevel2::GetTrackImage(int i Line 1596  TrkTrack *TrkLevel2::GetTrackImage(int i
1596      TrkTrack *track = (TrkTrack*)sorted->At(it);      TrkTrack *track = (TrkTrack*)sorted->At(it);
1597                    
1598      if(!track->HasImage()){      if(!track->HasImage()){
1599          cout << "** TrkLevel2 ** Track "<< it << "does not have image! " << endl;          cout << "TrkTrack *TrkLevel2::GetTrackImage(int) >> Track "<< it << "does not have image! " << endl;
1600          return 0;          return 0;
1601      }      }
1602      if(!Track)return 0;      if(!Track)return 0;
# Line 1611  void TrkLevel2::LoadField(TString path){ Line 1623  void TrkLevel2::LoadField(TString path){
1623  //     path_.error   = 0;  //     path_.error   = 0;
1624  //     readb_();  //     readb_();
1625    
1626      TrkParams::SetTrackingMode();  //     TrkParams::SetTrackingMode();
1627      TrkParams::SetPrecisionFactor();  //     TrkParams::SetPrecisionFactor();
1628      TrkParams::SetStepMin();  //     TrkParams::SetStepMin();
1629        TrkParams::SetMiniDefault();
1630    
1631      TrkParams::Set(path,1);      TrkParams::Set(path,1);
1632      TrkParams::Load(1);      TrkParams::Load(1);

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.42

  ViewVC Help
Powered by ViewVC 1.1.23