/[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.22 by pam-fi, Mon Jan 15 12:49:05 2007 UTC revision 1.25 by pam-fi, Mon Feb 5 16:01:51 2007 UTC
# Line 16  extern "C" {     Line 16  extern "C" {    
16      int  readb_();      int  readb_();
17      void mini2_(int*,int*,int*);      void mini2_(int*,int*,int*);
18      void guess_();      void guess_();
19        void gufld_(float*, float*);
20  }  }
21  //--------------------------------------  //--------------------------------------
22  //  //
# Line 49  TrkTrack::TrkTrack(){ Line 50  TrkTrack::TrkTrack(){
50      };      };
51      clx = 0;      clx = 0;
52      cly = 0;      cly = 0;
53    //    clx = new TRefArray(6,0);
54    //    cly = new TRefArray(6,0);
55  };  };
56  //--------------------------------------  //--------------------------------------
57  //  //
# Line 291  void TrkTrack::LoadField(TString path){ Line 294  void TrkTrack::LoadField(TString path){
294    
295  };  };
296    
297    
298  /**  /**
299   * Method to fill minimization-routine common   * Method to fill minimization-routine common
300   */   */
# Line 533  void TrkSinglet::Clear(){ Line 537  void TrkSinglet::Clear(){
537  //  //
538  //--------------------------------------  //--------------------------------------
539  TrkLevel2::TrkLevel2(){  TrkLevel2::TrkLevel2(){
540  //    cout <<"TrkLevel2::TrkLevel2()"<<endl;    //    cout <<"TrkLevel2::TrkLevel2()"<<endl;
541      for(Int_t i=0; i<12 ; i++){      for(Int_t i=0; i<12 ; i++){
542                  good[i] = -1;                  good[i] = -1;
543          };          };
544  //    Track    = new TClonesArray("TrkTrack");  // okkio!! memory-leak
545  //    SingletX = new TClonesArray("TrkSinglet");  //     Track    = new TClonesArray("TrkTrack");
546  //    SingletY = new TClonesArray("TrkSinglet");  //     SingletX = new TClonesArray("TrkSinglet");
547    //     SingletY = new TClonesArray("TrkSinglet");
548      Track    = 0;      Track    = 0;
549      SingletX = 0;      SingletX = 0;
550      SingletY = 0;      SingletY = 0;
# Line 549  TrkLevel2::TrkLevel2(){ Line 554  TrkLevel2::TrkLevel2(){
554  //  //
555  //  //
556  //--------------------------------------  //--------------------------------------
557    void TrkLevel2::Set(){
558        if(!Track)Track    = new TClonesArray("TrkTrack");
559        if(!SingletX)SingletX = new TClonesArray("TrkSinglet");
560        if(!SingletY)SingletY = new TClonesArray("TrkSinglet");
561    }
562    //--------------------------------------
563    //
564    //
565    //--------------------------------------
566  void TrkLevel2::Dump(){  void TrkLevel2::Dump(){
567                    
568          //          //
# Line 1060  void TrkLevel2::LoadField(TString path){ Line 1074  void TrkLevel2::LoadField(TString path){
1074      readb_();      readb_();
1075  //  //
1076  };  };
1077    /**
1078     * Get BY (kGauss)
1079     * @param v (x,y,z) coordinates in cm
1080     */
1081    float TrkLevel2::GetBX(float* v){
1082        float b[3];
1083        gufld_(v,b);
1084        return b[0]/10.;
1085    }
1086    /**
1087     * Get BY (kGauss)
1088     * @param v (x,y,z) coordinates in cm
1089     */
1090    float TrkLevel2::GetBY(float* v){
1091        float b[3];
1092        gufld_(v,b);
1093        return b[1]/10.;
1094    }
1095    /**
1096     * Get BY (kGauss)
1097     * @param v (x,y,z) coordinates in cm
1098     */
1099    float TrkLevel2::GetBZ(float* v){
1100        float b[3];
1101        gufld_(v,b);
1102        return b[2]/10.;
1103    }
1104  //--------------------------------------  //--------------------------------------
1105  //  //
1106  //  //

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.23