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

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

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

revision 1.21 by pam-fi, Wed Aug 22 07:03:45 2007 UTC revision 1.25 by pam-fi, Sat Mar 22 08:32:50 2008 UTC
# Line 17  extern "C" { Line 17  extern "C" {
17      float pfaeta3_(int*,float*);      float pfaeta3_(int*,float*);
18      float pfaeta4_(int*,float*);      float pfaeta4_(int*,float*);
19      float pfaetal_(int*,float*);      float pfaetal_(int*,float*);
20        int   npfastrips_(int*,float*);
21                    
22  }  }
23  //--------------------------------------  //--------------------------------------
# Line 95  void TrkCluster::Clear(){ Line 96  void TrkCluster::Clear(){
96   * strips, around maxs, having a significant signal.   * strips, around maxs, having a significant signal.
97   * @param nstrip   Maximum number of strips.   * @param nstrip   Maximum number of strips.
98   * @param cut      Inclusion cut ( s > cut*sigma ).   * @param cut      Inclusion cut ( s > cut*sigma ).
99     * @param force    Falg to force the PFA strip-inclusion pattern (nstrip>0)
100   * If nstrip<=0 only the inclusion cut is used to determine the cluster size.   * If nstrip<=0 only the inclusion cut is used to determine the cluster size.
101   */   */
102  Float_t TrkCluster::GetSignal(Int_t nstrip, Float_t cut){  Float_t TrkCluster::GetSignal(Int_t nstrip, Float_t cut, Bool_t force){
103            
104      if(CLlength<=0)return 0;      if(CLlength<=0)return 0;
105    
106      Float_t s = 0;      Float_t s = 0;
107            
108        //-----------------------------------
109        // inlcude strips with s > cut*sigma
110        //-----------------------------------
111    
112      if( nstrip<=0 ){      if( nstrip<=0 ){
113  //          for(Int_t is = 0; is < CLlength; is++){  //          for(Int_t is = 0; is < CLlength; is++){
114  //              Float_t scut = cut*clsigma[is];  //              Float_t scut = cut*clsigma[is];
# Line 121  Float_t TrkCluster::GetSignal(Int_t nstr Line 127  Float_t TrkCluster::GetSignal(Int_t nstr
127          return s;          return s;
128      };      };
129            
130        //---------------------------------------------------
131        // inlcude strips with s > cut*sigma, up to nstrip.
132        // strips are included in order of decreasing signal
133        //---------------------------------------------------
134        if( !force ){
135    
136            Int_t il = indmax;
137            Int_t ir = indmax;
138            Int_t inc = 0;
139            
140            if( clsignal[indmax] < cut*clsigma[indmax] ) return 0;
141            
142            while ( inc < nstrip ){
143                Float_t sl = -100000;
144                Float_t sr = -100000;
145                if( il >= 0       ) sl = clsignal[il];
146                if( ir < CLlength ) sr = clsignal[ir];
147                if( sl == sr && inc == 0 ){
148                    s += clsignal[il]; //cout << inc<<" - "<< clsignal[il]<<" "<<s<<endl;
149                    il--;
150                    ir++;
151                }else if ( sl >= sr && sl > cut*clsigma[il] && inc !=0 ){
152                    s += sl;//cout << inc<<" - "<< clsignal[il]<<" "<<s<<endl;
153                    il--;
154                }else if ( sl < sr && sr > cut*clsigma[ir] ){
155                    s += sr;//cout << inc<<" - " << clsignal[ir]<<" "<<s<<endl;
156                    ir++;
157                }else break;
158                
159                inc++;
160            }
161            return s;
162    
163        }else{
164        //---------------------------------------------------
165        // evaluate signal using a fixed number of strips,
166        // following the PFA inclusion patters
167        //---------------------------------------------------
168    //     --> signal of the central strip
169            Float_t sc = clsignal[indmax];
170    //     signal of adjacent strips
171            Float_t sl1 = -9999.;
172            Float_t sl2 = -9999.;
173            Float_t sr1 = -9999.;
174            Float_t sr2 = -9999.;
175            if(indmax-1>=0) sl1 = clsignal[indmax-1];
176            if(indmax-2>=0) sl2 = clsignal[indmax-2];
177            if(indmax+1<CLlength) sr1 = clsignal[indmax+1];
178            if(indmax+2<CLlength) sr2 = clsignal[indmax+2];
179    
180            if(nstrip==1){
181                s = sc;
182            }else if(nstrip==2){
183                if( sl1>sr1 && sl1+sc!=0 )s = (sl1+sc);
184                if( sl1<sr1 && sr1+sc!=0 )s = (sc+sr1);
185                if( sl1==sr1 && sl1 != -9999.){
186                    if( clsigma[indmax-1] < clsigma[indmax+1] &&  sl1+sc!=0 )s = (sl1+sc);
187                    if( clsigma[indmax-1] > clsigma[indmax+1] &&  sc+sr1!=0 )s = (sc+sr1);
188                }
189            }else if(nstrip==3){
190                s = (sl1+sc+sr1);
191            }else if(nstrip==4){
192                if( sl2>sr2 && sl2+sl1+sc+sr1!=0 )s = (sl2+sl1+sc+sr1);
193                if( sl2<sr2 && sl1+sc+sr1+sr2!=0 )s = (sl1+sc+sr1+sr2);
194                if( sl2==sr2 && sl2 != -9999.){
195                    if( clsigma[indmax-2] < clsigma[indmax+2] &&  sl2+sl1+sc+sr1!=0 )s = (sl2+sl1+sc+sr1);
196                    if( clsigma[indmax-2] > clsigma[indmax+2] &&  sl1+sc+sr1+sr2!=0 )s = (sl1+sc+sr1+sr2);
197                }
198            }else if(nstrip==5){
199                s = (sl1+sc+sr1);
200                if(sl2 != -9999.)s += sl2;
201                if(sr2 != -9999.)s += sr2;
202            }else{
203                cout << "Float_t TrkCluster::GetSignal("<<nstrip<<","<<cut<<","<<force<<")- not implemented"<<endl;  
204            }
205            
206      Int_t il = indmax;      }
     Int_t ir = indmax;  
     Int_t inc = 0;  
207    
208      if( clsignal[indmax] < cut*clsigma[indmax] ) return 0;      return 0.;
209    
     while ( inc < nstrip ){  
         Float_t sl = -100000;  
         Float_t sr = -100000;  
         if( il >= 0       ) sl = clsignal[il];  
         if( ir < CLlength ) sr = clsignal[ir];  
         if( sl == sr && inc == 0 ){  
             s += clsignal[il]; //cout << inc<<" - "<< clsignal[il]<<" "<<s<<endl;  
             il--;  
             ir++;  
         }else if ( sl >= sr && sl > cut*clsigma[il] && inc !=0 ){  
             s += sl;//cout << inc<<" - "<< clsignal[il]<<" "<<s<<endl;  
             il--;  
         }else if ( sl < sr && sr > cut*clsigma[ir] ){  
             s += sr;//cout << inc<<" - " << clsignal[ir]<<" "<<s<<endl;  
             ir++;  
         }else break;  
           
         inc++;  
     }  
     return s;  
210  };  };
211    
212    
# Line 389  Float_t TrkCluster::GetCOG(Float_t angle Line 448  Float_t TrkCluster::GetCOG(Float_t angle
448  //  //
449  //--------------------------------------  //--------------------------------------
450  /**  /**
451   * Evaluates the cluster position, in pitch units, relative to the strip with the maximum signal (TrkCluster::maxs), by applying the non-linear ETA-algorythm.   * Evaluates the cluster position, in pitch units, relative to the strip
452     *  with the maximum signal (TrkCluster::maxs), by applying the non-linear
453     *  ETA-algorythm.
454   *  @param neta  Number of strips to evaluate ETA.   *  @param neta  Number of strips to evaluate ETA.
455   *  @param angle Projected (effective) angle between particle track and detector plane.   *  @param angle Projected (effective) angle between particle track and detector plane.
456     *  @landi flag to apply Landi correction
457   * Implemented values of neta are 2,3,4. If neta=0, ETA2, ETA3 and ETA4 are applied according to the angle.   * Implemented values of neta are 2,3,4. If neta=0, ETA2, ETA3 and ETA4 are applied according to the angle.
458   */   */
459  Float_t TrkCluster::GetETA(Int_t neta, float angle, bool landi){  Float_t TrkCluster::GetETA(Int_t neta, float angle, bool landi){
# Line 401  Float_t TrkCluster::GetETA(Int_t neta, f Line 463  Float_t TrkCluster::GetETA(Int_t neta, f
463    
464      TrkParams::Load(4);      TrkParams::Load(4);
465      if( !TrkParams::IsLoaded(4) ){      if( !TrkParams::IsLoaded(4) ){
466          cout << "int Trajectory::DoTrack2(float* al) --- ERROR --- p.f.a. parameters  not loaded"<<endl;          cout << "Float_t TrkCluster::GetETA(Int_t neta, float angle, bool landi) --- ERROR --- p.f.a. parameters  not loaded"<<endl;
467          return 0;          return 0;
468      }      }
469    
# Line 413  Float_t TrkCluster::GetETA(Int_t neta, f Line 475  Float_t TrkCluster::GetETA(Int_t neta, f
475      else if(neta == 2          ) return pfaeta2_(&ic,&ax);      else if(neta == 2          ) return pfaeta2_(&ic,&ax);
476      else if(neta == 3          ) return pfaeta3_(&ic,&ax);      else if(neta == 3          ) return pfaeta3_(&ic,&ax);
477      else if(neta == 4          ) return pfaeta4_(&ic,&ax);      else if(neta == 4          ) return pfaeta4_(&ic,&ax);
478      else cout << "ETA"<<neta<<" not implemented\n";      else cout << "TrkCluster::GetETA("<<neta<<","<<angle<<","<<landi<<") not implemented\n";
479      return 0;      return 0;
480            
481  };  };
482    
483  /**  /**
484   * Evaluates the cluster position, in pitch units, relative to the strip with   * Evaluates the cluster position, in pitch unit, relative to the strip with
485   * the maximum signal (TrkCluster::maxs), by applying the PFA set as default (see TrkParams).   * the maximum signal (TrkCluster::maxs), by applying the PFA set as default (see TrkParams).
486   *  @param angle Projected (effective) angle between particle track and detector plane.   *  @param angle Projected (effective) angle between particle track and detector plane.
487   */   */
488  Float_t TrkCluster::GetPositionPU(float angle){  Float_t TrkCluster::GetPositionPU(float angle){
489    
490      if( TrkParams::GetPFA() == 0  )return GetETA(0,angle,false);      if     ( TrkParams::GetPFA() == 0  )return GetETA(0,angle,false);
491      if( TrkParams::GetPFA() == 1  )return 0.;      else if( TrkParams::GetPFA() == 2  )return GetETA(2,angle,false);
492      if( TrkParams::GetPFA() == 2  )return GetETA(2,angle,false);      else if( TrkParams::GetPFA() == 3  )return GetETA(3,angle,false);
493      if( TrkParams::GetPFA() == 3  )return GetETA(3,angle,false);      else if( TrkParams::GetPFA() == 4  )return GetETA(4,angle,false);
494      if( TrkParams::GetPFA() == 4  )return GetETA(4,angle,false);      else if( TrkParams::GetPFA() == 5  )return GetETA(0,angle,true);
495      if( TrkParams::GetPFA() == 5  )return GetETA(0,angle,true);      else if( TrkParams::GetPFA() == 10 )return GetCOG(0);
496      if( TrkParams::GetPFA() == 6  )return 0.;      else if( TrkParams::GetPFA() == 11 )return GetCOG(1);
497      if( TrkParams::GetPFA() == 7  )return 0.;      else if( TrkParams::GetPFA() == 12 )return GetCOG(2);
498      if( TrkParams::GetPFA() == 8  )return 0.;      else if( TrkParams::GetPFA() == 13 )return GetCOG(3);
499      if( TrkParams::GetPFA() == 9  )return 0.;      else if( TrkParams::GetPFA() == 14 )return GetCOG(4);
500      if( TrkParams::GetPFA() == 10 )return GetCOG(0);      else cout << "  TrkCluster::GetPositionPU(float "<<angle<<") -- WARNING -- PFA="<<TrkParams::GetPFA()<<" not implemented"<<endl;
     if( TrkParams::GetPFA() == 11 )return GetCOG(1);  
     if( TrkParams::GetPFA() == 12 )return GetCOG(2);  
     if( TrkParams::GetPFA() == 13 )return GetCOG(3);  
     if( TrkParams::GetPFA() == 14 )return GetCOG(4);  
501            
502      return 0.;      return 0.;
503            
504  }  }
505    
506    /**
507     * Give the number of strip used to evaluate the cluster coordinate
508     * according to the p.f.a.
509     * It returns 0 when the COG is used (in this case the number of strip used
510     * equals the multiplicity).
511     */
512    Int_t TrkCluster::GetPFAstrips(float angle){
513    
514        float ax = angle;
515        int ic = 1;
516        GetLevel1Struct();
517        return npfastrips_(&ic,&ax);
518    
519    }
520    
521  //--------------------------------------  //--------------------------------------
522  //  //
523  //  //
# Line 461  TrkLevel1::TrkLevel1(){ Line 534  TrkLevel1::TrkLevel1(){
534              cnn[j][i]=0;              cnn[j][i]=0;
535          };          };
536      };      };
537      TrkParams::SetTrackingMode();  //     TrkParams::SetTrackingMode();
538      TrkParams::SetPrecisionFactor();  //     TrkParams::SetPrecisionFactor();
539      TrkParams::SetStepMin();  //     TrkParams::SetStepMin();
540        TrkParams::SetMiniDefault();
541      TrkParams::SetPFA();      TrkParams::SetPFA();
542  }  }
543  //--------------------------------------  //--------------------------------------
# Line 688  TrkCluster *TrkLevel1::GetCluster(int is Line 762  TrkCluster *TrkLevel1::GetCluster(int is
762      TrkCluster *cluster = (TrkCluster*)t[is];      TrkCluster *cluster = (TrkCluster*)t[is];
763      return cluster;      return cluster;
764  }  }
 //--------------------------------------  
 //  
 //  
 //--------------------------------------  
 // /**  
 //  * Load Position-Finding-Algorythm parameters (call the F77 routine).  
 //  *  
 //  */  
 // int TrkLevel1::LoadPfaParam(TString path){  
           
 //     if( path.IsNull() ){  
 //      path = gSystem->Getenv("PAM_CALIB");  
 //      if(path.IsNull()){  
 //          cout << " TrkLevel1::LoadPfaParam() ==> No PAMELA environment variables defined "<<endl;  
 //          return 0;  
 //      }  
 //      path.Append("/trk-param/eta_param-0/");  
 //     }  
765    
 //     strcpy(path_.path,path.Data());  
 //     path_.pathlen = path.Length();  
 //     path_.error   = 0;  
 //     cout <<"Loading p.f.a. parameters: "<<path<<endl;  
 //     return readetaparam_();  
 // }  
766    
767  // /**  // int TrkLevel1::GetPfaNbinsAngle(){
768  //  * Load magnetic field parameters (call the F77 routine).  //     TrkParams::Load(4);
769  //  *  //     if( !TrkParams::IsLoaded(4) ){
770  //  */  //      cout << "int TrkLevel1::GetPfaNbinsAngle() --- ERROR --- p.f.a. parameters  not loaded"<<endl;
771  // int TrkLevel1::LoadFieldParam(TString path){  //      return 0;
           
 // //    if( strcmp(path_.path,path.Data()) ){  
 //     if( path.IsNull() ){  
 //      path = gSystem->Getenv("PAM_CALIB");  
 //      if(path.IsNull()){  
 //          cout << " TrkLevel1::LoadFieldParam() ==> No PAMELA environment variables defined "<<endl;  
 //          return 0;  
 //      }  
 //      path.Append("/trk-param/field_param-0/");  
772  //     }  //     }
773  //     cout <<"Loading magnetic field "<<path<<endl;  //     return pfa_.nangbin;
774  //     strcpy(path_.path,path.Data());  // };
775  //     path_.pathlen = path.Length();  
776  //     path_.error   = 0;  // int TrkLevel1::GetPfaNbinsETA(){
777  //     return readb_();  //     TrkParams::Load(4);
778  // //    }        //     if( !TrkParams::IsLoaded(4) ){
779  // //    return 0;  //      cout << "int TrkLevel1::GetPfaNbinsETA() --- ERROR --- p.f.a. parameters  not loaded"<<endl;
780  // }  //      return 0;
 // /**  
 //  * Load magnetic field parameters (call the F77 routine).  
 //  *  
 //  */  
 // int TrkLevel1::LoadChargeParam(TString path){  
           
 // //    if( strcmp(path_.path,path.Data()) ){  
 //     if( path.IsNull() ){  
 //      path = gSystem->Getenv("PAM_CALIB");  
 //      if(path.IsNull()){  
 //          cout << " TrkLevel1::LoadChargeParam() ==> No PAMELA environment variables defined "<<endl;  
 //          return 0;  
 //      }  
 //      path.Append("/trk-param/charge_param-1/");  
 //     }  
 //     cout <<"Loading charge-correlation parameters: "<<path<<endl;  
 //     strcpy(path_.path,path.Data());  
 //     path_.pathlen = path.Length();  
 //     path_.error   = 0;  
 //     return readchargeparam_();  
 // //    }        
 // //    return 0;  
 // }  
 // /**  
 //  * Load magnetic field parameters (call the F77 routine).  
 //  *  
 //  */  
 // int TrkLevel1::LoadAlignmentParam(TString path){  
           
 // //    if( strcmp(path_.path,path.Data()) ){  
 //     if( path.IsNull() ){  
 //      path = gSystem->Getenv("PAM_CALIB");  
 //      if(path.IsNull()){  
 //          cout << " TrkLevel1::LoadAlignmentParam() ==> No PAMELA environment variables defined "<<endl;  
 //          return 0;  
 //      }  
 //      path.Append("/trk-param/align_param-0/");  
 //     }  
 //     cout <<"Loading alignment parameters: "<<path<<endl;  
 //     strcpy(path_.path,path.Data());  
 //     path_.pathlen = path.Length();  
 //     path_.error   = 0;  
 //     return readalignparam_();  
 // //    }        
 // //    return 0;  
 // }  
 // /**  
 //  * Load magnetic field parameters (call the F77 routine).  
 //  *  
 //  */  
 // int TrkLevel1::LoadMipParam(TString path){  
           
 // //    if( strcmp(path_.path,path.Data()) ){  
 //     if( path.IsNull() ){  
 //      path = gSystem->Getenv("PAM_CALIB");  
 //      if(path.IsNull()){  
 //          cout << " TrkLevel1::LoadMipParam() ==> No PAMELA environment variables defined "<<endl;  
 //          return 0;  
 //      }  
 //      path.Append("/trk-param/mip_param-0/");  
 //     }  
 //     cout <<"Loading ADC-to-MIP conversion parameters: "<<path<<endl;  
 //     strcpy(path_.path,path.Data());  
 //     path_.pathlen = path.Length();  
 //     path_.error   = 0;  
 //     return readmipparam_();  
 // //    }        
 // //    return 0;  
 // }  
 // /**  
 //  * Load magnetic field parameters (call the F77 routine).  
 //  *  
 //  */  
 // int TrkLevel1::LoadVKMaskParam(TString path){  
           
 // //    if( strcmp(path_.path,path.Data()) ){  
 //     if( path.IsNull() ){  
 //      path = gSystem->Getenv("PAM_CALIB");  
 //      if(path.IsNull()){  
 //          cout << " TrkLevel1::LoadVKMaskParam() ==> No PAMELA environment variables defined "<<endl;  
 //          return 0;  
 //      }  
 //      path.Append("/trk-param/mask_param-1/");  
781  //     }  //     }
782  //     cout <<"Loading VK-mask parameters: "<<path<<endl;  //     return pfa_.netaval;
783  //     strcpy(path_.path,path.Data());  // };
 //     path_.pathlen = path.Length();  
 //     path_.error   = 0;  
 //     return readvkmask_();  
 // //    }        
 // //    return 0;  
 // }  
784    
785  // /**  // /**
786  //  * Load all (default) parameters. Environment variable must be defined.  //  *
787  //  *  //  *
788  //  */  //  */
789  // int TrkLevel1::LoadParams(){  // float* TrkLevel1::GetPfaCoord(TString pfa, int nview, int nladder, int nang){
   
 //     int result=0;  
       
 //     result = result * LoadFieldParam();  
 //     result = result * LoadPfaParam();  
 //     result = result * LoadChargeParam();  
 //     result = result * LoadAlignmentParam();  
 //     result = result * LoadMipParam();  
 //     result = result * LoadVKMaskParam();  
   
 //     return result;  
 // }  
   
   
   
 int TrkLevel1::GetPfaNbinsAngle(){  
     TrkParams::Load(4);  
     if( !TrkParams::IsLoaded(4) ){  
         cout << "int TrkLevel1::GetPfaNbinsAngle() --- ERROR --- p.f.a. parameters  not loaded"<<endl;  
         return 0;  
     }  
     return pfa_.nangbin;  
 };  
   
 int TrkLevel1::GetPfaNbinsETA(){  
     TrkParams::Load(4);  
     if( !TrkParams::IsLoaded(4) ){  
         cout << "int TrkLevel1::GetPfaNbinsETA() --- ERROR --- p.f.a. parameters  not loaded"<<endl;  
         return 0;  
     }  
     return pfa_.netaval;  
 };  
790    
791  /**  //     TrkParams::Load(4);
792   *  //     if( !TrkParams::IsLoaded(4) ){
793   *  //      cout << "float* TrkLevel1::GetPfaCoord(TString pfa, int nview, int nladder, int nang) --- ERROR --- p.f.a. parameters  not loaded"<<endl;
794   */  //      return 0;
795  float* TrkLevel1::GetPfaCoord(TString pfa, int nview, int nladder, int nang){  //     }
   
     TrkParams::Load(4);  
     if( !TrkParams::IsLoaded(4) ){  
         cout << "float* TrkLevel1::GetPfaCoord(TString pfa, int nview, int nladder, int nang) --- ERROR --- p.f.a. parameters  not loaded"<<endl;  
         return 0;  
     }  
796        
797      int nbins = GetPfaNbinsETA();  //     int nbins = GetPfaNbinsETA();
798      if(!nbins)return 0;  //     if(!nbins)return 0;
799    
800      float *fcorr = new float [nbins];  //     float *fcorr = new float [nbins];
801    
802      if(!pfa.CompareTo("ETA2",TString::kIgnoreCase)){  //     if(!pfa.CompareTo("ETA2",TString::kIgnoreCase)){
803          for(int ib=0; ib<nbins; ib++){  //      for(int ib=0; ib<nbins; ib++){
804              fcorr[ib] = pfa_.feta2[nang][nladder][nview][ib];  //          fcorr[ib] = pfa_.feta2[nang][nladder][nview][ib];
805              cout << pfa_.eta2[nang][ib] << " - " <<  pfa_.feta2[nang][nladder][nview][ib]<<endl;;  //          cout << pfa_.eta2[nang][ib] << " - " <<  pfa_.feta2[nang][nladder][nview][ib]<<endl;;
806          }  //      }
807      }else if (!pfa.CompareTo("ETA3",TString::kIgnoreCase)){  //     }else if (!pfa.CompareTo("ETA3",TString::kIgnoreCase)){
808          for(int ib=0; ib<nbins; ib++)fcorr[ib] = pfa_.feta3[nang][nladder][nview][ib];  //      for(int ib=0; ib<nbins; ib++)fcorr[ib] = pfa_.feta3[nang][nladder][nview][ib];
809      }else if (!pfa.CompareTo("ETA4",TString::kIgnoreCase)){  //     }else if (!pfa.CompareTo("ETA4",TString::kIgnoreCase)){
810          for(int ib=0; ib<nbins; ib++)fcorr[ib] = pfa_.feta4[nang][nladder][nview][ib];  //      for(int ib=0; ib<nbins; ib++)fcorr[ib] = pfa_.feta4[nang][nladder][nview][ib];
811      }else{  //     }else{
812          cout << pfa<<" pfa parameters not implemented "<<endl;  //      cout << pfa<<" pfa parameters not implemented "<<endl;
813          return 0;  //      return 0;
814      }      //     }    
815    
816      return fcorr;  //     return fcorr;
817    
818  };  // };
819    
820  float* TrkLevel1::GetPfaAbs(TString pfa, int nang){  // float* TrkLevel1::GetPfaAbs(TString pfa, int nang){
821        
822      TrkParams::Load(4);  //     TrkParams::Load(4);
823      if( !TrkParams::IsLoaded(4) ){  //     if( !TrkParams::IsLoaded(4) ){
824          cout << "float* TrkLevel1::GetPfaAbs(TString pfa, int nang) --- ERROR --- p.f.a. parameters  not loaded"<<endl;  //      cout << "float* TrkLevel1::GetPfaAbs(TString pfa, int nang) --- ERROR --- p.f.a. parameters  not loaded"<<endl;
825          return 0;  //      return 0;
826      }  //     }
827    
828      int nbins = GetPfaNbinsETA();  //     int nbins = GetPfaNbinsETA();
829      if(!nbins)return 0;  //     if(!nbins)return 0;
830    
831      float *fcorr = new float [nbins];  //     float *fcorr = new float [nbins];
832    
833      if(!pfa.CompareTo("ETA2",TString::kIgnoreCase)){  //     if(!pfa.CompareTo("ETA2",TString::kIgnoreCase)){
834          for(int ib=0; ib<nbins; ib++)fcorr[ib] = pfa_.eta2[nang][ib];  //      for(int ib=0; ib<nbins; ib++)fcorr[ib] = pfa_.eta2[nang][ib];
835      }else if (!pfa.CompareTo("ETA3",TString::kIgnoreCase)){  //     }else if (!pfa.CompareTo("ETA3",TString::kIgnoreCase)){
836          for(int ib=0; ib<nbins; ib++)fcorr[ib] = pfa_.eta3[nang][ib];  //      for(int ib=0; ib<nbins; ib++)fcorr[ib] = pfa_.eta3[nang][ib];
837      }else if (!pfa.CompareTo("ETA4",TString::kIgnoreCase)){  //     }else if (!pfa.CompareTo("ETA4",TString::kIgnoreCase)){
838          for(int ib=0; ib<nbins; ib++)fcorr[ib] = pfa_.eta4[nang][ib];  //      for(int ib=0; ib<nbins; ib++)fcorr[ib] = pfa_.eta4[nang][ib];
839      }else{  //     }else{
840          cout << pfa<<" pfa parameters not implemented "<<endl;  //      cout << pfa<<" pfa parameters not implemented "<<endl;
841          return 0;  //      return 0;
842      }      //     }    
843    
844      return fcorr;  //     return fcorr;
845    
846  };  // };
847    
848  /**  /**
849   * Method to call the F77 routine that performs level1->level2 processing.   * Method to call the F77 routine that performs level1->level2 processing.

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

  ViewVC Help
Powered by ViewVC 1.1.23