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

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

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

revision 1.6 by pam-fi, Fri Apr 27 10:39:57 2007 UTC revision 1.9 by pam-fi, Tue May 15 16:22:19 2007 UTC
# Line 16  TString      TrkParams::calibpatht = ""; Line 16  TString      TrkParams::calibpatht = "";
16  TString      TrkParams::calibpathf = "";  TString      TrkParams::calibpathf = "";
17  Bool_t       TrkParams::calib104   = 0;  Bool_t       TrkParams::calib104   = 0;
18  Bool_t       TrkParams::calibload  = false;  Bool_t       TrkParams::calibload  = false;
19    // -------------------------
20    // PARAMETERS loaded from DB
21    // -------------------------
22  UInt_t       TrkParams::trkparamtype[] = {1,2,3,4,5,6,7};  UInt_t       TrkParams::trkparamtype[] = {1,2,3,4,5,6,7};
23  GL_PARAM     TrkParams::gl[]           = {GL_PARAM(),GL_PARAM(),GL_PARAM(),GL_PARAM(),GL_PARAM(),GL_PARAM(),GL_PARAM()};  GL_PARAM     TrkParams::gl[]           = {GL_PARAM(),GL_PARAM(),GL_PARAM(),GL_PARAM(),GL_PARAM(),GL_PARAM(),GL_PARAM()};
24  TString      TrkParams::glpath[]       = {"","","","","","",""};  TString      TrkParams::glpath[]       = {"","","","","","",""};
25  Bool_t       TrkParams::glload[]       = {false,false,false,false,false,false,false};  Bool_t       TrkParams::glload[]       = {false,false,false,false,false,false,false};
26  cDbg         TrkParams::dbg_mode       = {0,0,0};  cDbg         TrkParams::dbg_mode       = {0,0,0};
27    // ----------------
28    // other parameters
29    // ----------------
30    int    TrkParams::init__pfa            = 14;//COG4
31    int    TrkParams::init__mini_trackmode = 0;
32    int    TrkParams::init__mini_istepmin  = 3;
33    double TrkParams::init__mini_fact      = 100.;
34    
35  TrkParams::TrkParams(){  TrkParams::TrkParams(){
36    
37  //    cout<<"TrkParams::TrkParams()"<<endl;      cout<<"TrkParams::TrkParams()"<<endl;
38    
39  }  }
40  float aint(float f){  float aint(float f){
# Line 110  UInt_t TrkParams::ValidateTrkCalib( Cali Line 120  UInt_t TrkParams::ValidateTrkCalib( Cali
120  //  ----------  //  ----------
121      if(TrkParams::VerboseMode())cout << " DSP: ";      if(TrkParams::VerboseMode())cout << " DSP: ";
122      for(Int_t ipkt=0; ipkt<6; ipkt++){      for(Int_t ipkt=0; ipkt<6; ipkt++){
123          cout <<" "<<caltrk->DSPnumber[ipkt];          if(TrkParams::VerboseMode())cout <<" "<<caltrk->DSPnumber[ipkt];
124          if(caltrk->DSPnumber[ipkt]>0 && caltrk->DSPnumber[ipkt]<=12){          if(caltrk->DSPnumber[ipkt]>0 && caltrk->DSPnumber[ipkt]<=12){
125              if( caltrk->crc_hcal[ipkt] ){              if( caltrk->crc_hcal[ipkt] ){
126                  if(TrkParams::WarningMode())cout<<"(CRC Header)";                  if(TrkParams::WarningMode())cout<<"(CRC Header)";
# Line 808  Bool_t TrkParams::IsLoaded( ){ Line 818  Bool_t TrkParams::IsLoaded( ){
818      return true;      return true;
819  };  };
820    
821    
822    /**
823     * Get BY (kGauss)
824     * @param v (x,y,z) coordinates in cm
825     */
826    float TrkParams::GetBX(float* v){
827        TrkParams::Load(1);
828        if( !TrkParams::IsLoaded(1) )return 0.;
829        float b[3];
830        gufld_(v,b);
831        return b[0]/10.;
832    }
833    /**
834     * Get BY (kGauss)
835     * @param v (x,y,z) coordinates in cm
836     */
837    float TrkParams::GetBY(float* v){
838        TrkParams::Load(1);
839        if( !TrkParams::IsLoaded(1) )return 0.;
840        float b[3];
841        gufld_(v,b);
842        return b[1]/10.;
843    }
844    /**
845     * Get BY (kGauss)
846     * @param v (x,y,z) coordinates in cm
847     */
848    float TrkParams::GetBZ(float* v){
849        TrkParams::Load(1);
850        if( !TrkParams::IsLoaded(1) )return 0.;
851        float b[3];
852        gufld_(v,b);
853        return b[2]/10.;
854    }
855    
856    
857    
858    /**
859     * \brief Set tracking mode (0=standard. 1=???)
860     */
861    void TrkParams::SetTrackingMode(int trackmode) {
862        init__mini_trackmode = trackmode;
863        SetTrackingMode();
864    };
865    /**
866     * \brief Set fit-precision factor (typical value fact=100.)
867     */
868    void TrkParams::SetPrecisionFactor(double fact){
869        init__mini_fact      = fact;
870        SetPrecisionFactor();
871    };
872    /**
873     * \brief Set minimum number of step in track fitting
874     */
875    void TrkParams::SetStepMin(int istepmin){
876        init__mini_istepmin  = istepmin;
877        SetStepMin();
878    };
879    
880    /**
881     * \brief Set p.f.a.
882     *
883     * Implemented algorythms:
884     * 0  ETA (default)
885     * 1  ---
886     * 2  ETA2
887     * 3  ETA3
888     * 4  ETA4
889     * 10 COG
890     * 11 COG1
891     * 12 COG2
892     * 13 COG3
893     * 14 COG4
894     */
895    void TrkParams::SetPFA(int pfaid){
896        init__pfa  = pfaid;
897        SetPFA();
898    };
899    /**
900     * \brief Get spatial resolution.
901     *
902     * Method to retrieve the spatial resolution associated with the
903     * adopted p.f.a.
904     * @param view Tracker view (1-12)
905     * @param angle Track projected angle
906     *
907     * In order to change p.f.a. use the SetPFA(int pfaid) method, eg.:
908     *
909     *  TrkParams::SetPFA(0)  // ETA
910     *
911     */
912    float TrkParams::GetResolution(int view, float angle){
913        float res = 1000;
914        if( init__pfa == 0 )res = riseta_(&view,&angle);
915        else cout << "float TrkParams::GetResolution(int view, float angle) -- PFA "<<init__pfa<<" not yet implemented"<<endl;
916        return res;
917    }
918    
919    
920    
921  ClassImp(TrkParams);  ClassImp(TrkParams);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.23