/[PAMELA software]/DarthVader/ToFLevel2/src/ToFLevel2.cpp
ViewVC logotype

Diff of /DarthVader/ToFLevel2/src/ToFLevel2.cpp

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

revision 1.45 by pam-fi, Tue Mar 24 11:09:54 2015 UTC revision 1.47 by pam-fi, Tue May 19 13:46:46 2015 UTC
# Line 147  void ToFLevel2::Delete(Option_t *t){ //E Line 147  void ToFLevel2::Delete(Option_t *t){ //E
147    //    //
148  }; //ELENA  }; //ELENA
149    
150    /**
151     * Retrieves the itrk-th tof track stored in the array
152     * @param itrk Array index (min 0, max ToFLevel2::ntrk())
153     *
154     */
155  ToFTrkVar *ToFLevel2::GetToFTrkVar(Int_t itrk){  ToFTrkVar *ToFLevel2::GetToFTrkVar(Int_t itrk){
156    //        //    
157    if(itrk >= ntrk()){    if(itrk >= ntrk()){
# Line 163  ToFTrkVar *ToFLevel2::GetToFTrkVar(Int_t Line 168  ToFTrkVar *ToFLevel2::GetToFTrkVar(Int_t
168    
169  /**  /**
170   * Retrieves the tof track matching the seqno-th tracker stored track.   * Retrieves the tof track matching the seqno-th tracker stored track.
171     * @param seqno Track sequential number
172     * (seqno = -1 for standalone tof track, seqno=0-TrkLevel2::ntrk() for tof tracks associated to a tracker track)
173   *   *
174   */   */
175  ToFTrkVar *ToFLevel2::GetToFStoredTrack(int seqno){  ToFTrkVar *ToFLevel2::GetToFStoredTrack(int seqno){
# Line 304  Int_t ToFLevel2::GetTrueNHitPaddles(Int_ Line 311  Int_t ToFLevel2::GetTrueNHitPaddles(Int_
311   * @param adcflag in the plane (100<-> independent of the adcflag; !=0&&!=100 <-> at least one PMT with adcflag!=0; )   * @param adcflag in the plane (100<-> independent of the adcflag; !=0&&!=100 <-> at least one PMT with adcflag!=0; )
312   */   */
313  Float_t ToFLevel2::GetdEdx(Int_t notrack, Int_t plane, Int_t adcfl){  Float_t ToFLevel2::GetdEdx(Int_t notrack, Int_t plane, Int_t adcfl){
314    ToFTrkVar *trk = GetToFTrkVar(notrack);  //  ToFTrkVar *trk = GetToFTrkVar(notrack);
315        ToFTrkVar *trk = GetToFStoredTrack(notrack);//Elena 2015
316    return this->GetdEdx(trk, plane, adcfl);    return this->GetdEdx(trk, plane, adcfl);
317  }  }
318    
# Line 330  Float_t ToFLevel2::GetdEdx(ToFTrkVar *tr Line 338  Float_t ToFLevel2::GetdEdx(ToFTrkVar *tr
338    Int_t SatWarning;    Int_t SatWarning;
339    Int_t pad=-1;    Int_t pad=-1;
340    //    //
341      if(!trk) cout << "ToFLevel2::GetdEdx(...) ---> NULL ToFTrkVar obj "<<endl;
342    if(!trk) return 0; //ELENA    if(!trk) return 0; //ELENA
343    //    //
344    // ToF standalone part    // ToF standalone part
# Line 529  void ToFLevel2::GetPMTIndex(Int_t ind, I Line 538  void ToFLevel2::GetPMTIndex(Int_t ind, I
538   */   */
539  void ToFLevel2::GetdEdxPaddle(Int_t notrack, Int_t paddleid, Int_t adcfl, Float_t &PadEdx, Int_t &SatWarning){  void ToFLevel2::GetdEdxPaddle(Int_t notrack, Int_t paddleid, Int_t adcfl, Float_t &PadEdx, Int_t &SatWarning){
540    
541    ToFTrkVar *trk = GetToFTrkVar(notrack);  //  ToFTrkVar *trk = GetToFTrkVar(notrack);
542        ToFTrkVar *trk = GetToFStoredTrack(notrack); //Elena 2015
543    this->GetdEdxPaddle(trk, paddleid, adcfl, PadEdx, SatWarning);    this->GetdEdxPaddle(trk, paddleid, adcfl, PadEdx, SatWarning);
544        
545  };  };
# Line 579  void ToFLevel2::GetdEdxPaddle(ToFTrkVar Line 589  void ToFLevel2::GetdEdxPaddle(ToFTrkVar
589    Int_t pmt_id = -1;    Int_t pmt_id = -1;
590    Float_t adcraw[48];    Float_t adcraw[48];
591    //    //
592      if(!trk)cout << "ToFLevel2::GetdEdxPaddle(...) ---> NULL ToFTrkVar obj "<<endl;
593    if(!trk) return; //ELENA    if(!trk) return; //ELENA
594    //    //
595    
# Line 1238  Float_t ToFLevel2::CalcBeta(Int_t notrac Line 1249  Float_t ToFLevel2::CalcBeta(Int_t notrac
1249    
1250  //  cout<<" in CalcBeta "<<resmax<<" "<<chi2cut<<" "<<qualitycut<<endl;  //  cout<<" in CalcBeta "<<resmax<<" "<<chi2cut<<" "<<qualitycut<<endl;
1251    
1252    ToFTrkVar *trk = GetToFTrkVar(notrack);  //  ToFTrkVar *trk = GetToFTrkVar(notrack); //wrong!
1253        ToFTrkVar *trk = GetToFStoredTrack(notrack);//Elena Apr 2015
1254    if(!trk) return 0; //ELENA    if(!trk) return 0; //ELENA
1255    
1256    return trk->CalcBeta(resmax,qualitycut,chi2cut);    return trk->CalcBeta(resmax,qualitycut,chi2cut);

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.47

  ViewVC Help
Powered by ViewVC 1.1.23