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

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

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

revision 1.2 by pam-ts, Wed Jun 4 07:57:03 2014 UTC revision 1.3 by mocchiut, Fri Jun 6 11:24:00 2014 UTC
# Line 816  int ExtTrack::GetClusterY_ID(int ip){ Line 816  int ExtTrack::GetClusterY_ID(int ip){
816  };  };
817    
818  /**  /**
819     * Method to retrieve the dE/dx measured on a tracker view.
820     * @param ip plane (0-5)
821     * @param iv view (0=x 1=y)
822     */
823    Float_t ExtTrack::GetDEDX(int ip, int iv){
824        if(iv==0 && ip>=0 && ip<6)return fabs(dedx_x[ip]);
825        else if(iv==1 && ip>=0 && ip<6)return fabs(dedx_y[ip]);
826        else {
827            cout << "TrkTrack::GetDEDX(int ip, int iv) -- wrong input parameters "<<ip<<iv<<endl;
828            return 0.;
829        }
830    }
831    /**
832     * Method to evaluate the dE/dx measured on a tracker plane.
833     * The two measurements on x- and y-view are averaged.
834     * @param ip plane (0-5)
835     */
836    Float_t ExtTrack::GetDEDX(int ip){
837        if( (Int_t)XGood(ip)+(Int_t)YGood(ip) == 0 ) return 0;
838        return (GetDEDX(ip,0)+GetDEDX(ip,1))/((Int_t)XGood(ip)+(Int_t)YGood(ip));
839    };
840    
841    /**
842     * Method to evaluate the dE/dx averaged over all planes.
843     */
844    Float_t ExtTrack::GetDEDX(){
845        Float_t dedx=0;
846        for(Int_t ip=0; ip<6; ip++)dedx+=GetDEDX(ip,0)*XGood(ip)+GetDEDX(ip,1)*YGood(ip);
847        dedx = dedx/(GetNX()+GetNY());
848        return dedx;
849    };
850    
851    /**
852   * Method to retrieve the ladder, if assigned   * Method to retrieve the ladder, if assigned
853   */   */
854  int ExtTrack::GetLadder(int ip){  int ExtTrack::GetLadder(int ip){
# Line 880  Float_t ExtTrack::GetRigidity(){ Line 913  Float_t ExtTrack::GetRigidity(){
913          if(rig<0) rig=-rig;          if(rig<0) rig=-rig;
914          return rig;          return rig;
915  };  };
916    //
917    Float_t ExtTrack::GetDeflection(){
918            Float_t def=0;
919            if(chi2>0)def=al[4];
920            return def;
921    };
922  ClassImp(ExtTrack);  ClassImp(ExtTrack);

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

  ViewVC Help
Powered by ViewVC 1.1.23