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

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

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

revision 1.2 by pam-fi, Wed Nov 7 10:38:52 2007 UTC revision 1.4 by pam-fi, Tue Feb 3 13:57:15 2009 UTC
# Line 53  TrkHough::TrkHough(){ Line 53  TrkHough::TrkHough(){
53  //  //
54  //  //
55  //--------------------------------------  //--------------------------------------
56    void TrkHough::Set(){
57        if(!Candidates)Candidates = new TClonesArray("TrkTrack");
58    }
59    //--------------------------------------
60    //
61    //
62    //--------------------------------------
63  /**  /**
64   * Fills a TrkHough object with values from a struct cTrkhough (to get data from F77 common).   * Fills a TrkHough object with values from a struct cTrkhough (to get data from F77 common).
65   */   */
# Line 129  void TrkHough::SetFromHoughStruct(cTrkHo Line 136  void TrkHough::SetFromHoughStruct(cTrkHo
136  //      al4[ii] = (Float_t) lc->al[ii][4];  //      al4[ii] = (Float_t) lc->al[ii][4];
137  //    }  //    }
138      TrkTrack*   t_track   = new TrkTrack();      TrkTrack*   t_track   = new TrkTrack();
139      Candidates    = new TClonesArray("TrkTrack");      if(!Candidates) Candidates = new TClonesArray("TrkTrack");
140      TClonesArray &t = *Candidates;      TClonesArray &t = *Candidates;
141    
142      for(int i=0; i<lc->ntracks; i++){      for(int i=0; i<lc->ntracks; i++){
143    //      cout << " - "<<i<<endl;
144          t_track->seqno = i;          t_track->seqno = i;
145          t_track->image = 0;          t_track->image = 0;
146          t_track->chi2  = lc->chi2[i];          t_track->chi2  = lc->chi2[i];
# Line 179  void TrkHough::SetFromHoughStruct(cTrkHo Line 188  void TrkHough::SetFromHoughStruct(cTrkHo
188              //-----------------------------------------------------              //-----------------------------------------------------
189              //-----------------------------------------------------              //-----------------------------------------------------
190          };          };
191            // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
192            // evaluated coordinates (to define GF)
193            // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
194            int    ngf = TrkParams::nGF;
195            float *zgf = TrkParams::zGF;
196            Trajectory tgf = Trajectory(ngf,zgf);
197            tgf.DoTrack(t_track->al);//<<<< integrate the trajectory
198            for(int ip=0; ip<ngf; ip++){
199                t_track->xGF[ip] = tgf.x[ip];
200                t_track->yGF[ip] = tgf.y[ip];
201            }
202  //      if(t_track->IsSaturated())t_track->Dump();  //      if(t_track->IsSaturated())t_track->Dump();
203          new(t[i]) TrkTrack(*t_track);          new(t[i]) TrkTrack(*t_track);
204          t_track->Clear();          t_track->Clear();
205      };      };
206    //    cout << t.GetEntries() <<" <> "<< Candidates->GetEntries()<<endl;
207            
208      delete t_track;      delete t_track;
209    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23