Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Emc_helix Class Reference

#include <Emc_helix.h>

List of all members.

Public Member Functions

void debugOpt (int deb)
void debugOpt (int deb)
int Emc_Get (double, int, double[])
int Emc_Get (double, int, double[])
 Emc_helix (void)
 Emc_helix (void)
void pathlCut (double pathl_max)
void pathlCut (double pathl_max)
void zemcCut (double zemc_min, double zemc_max)
void zemcCut (double zemc_min, double zemc_max)
 ~Emc_helix (void)
 ~Emc_helix (void)

Public Attributes

double Dr
double Dz
double Fi_emc
double Kappa
int NTrk
double Phi0
double Phi1
double phi_emc
double R_emc
double Tanl
double theta_emc
double W_emc
double Z_emc

Private Attributes

int _debug
double _pathl_cut
double _zemc_cutm
double _zemc_cutx
double pi2
double piby1
double piby44


Constructor & Destructor Documentation

Emc_helix::Emc_helix void   ) 
 

00058                          {
00059    piby1=3.141593;
00060    pi2=2.0*piby1;
00061    _debug=0;
00062    _pathl_cut= 1000.0;
00063   
00064  }

Emc_helix::~Emc_helix void   )  [inline]
 

00022 {};

Emc_helix::Emc_helix void   ) 
 

Emc_helix::~Emc_helix void   )  [inline]
 

00022 {};


Member Function Documentation

void Emc_helix::debugOpt int  deb  )  [inline]
 

00041                            {
00042       _debug = deb;
00043     }

void Emc_helix::debugOpt int  deb  )  [inline]
 

00041                            {
00042       _debug = deb;
00043     }

int Emc_helix::Emc_Get double  ,
int  ,
double  []
 

int Emc_helix::Emc_Get double  ,
int  ,
double  []
 

00067                                                            {
00068    // crossing points of the helix on the Emc cylinder
00069    double xc,yc;            // center of the circle
00070    double rho;              // radius of emc  cyclinder
00071    double  xx[2],yy[2];      // coordinates of hits
00072    double  emcx,emcy;        // (x,y) on the radius of R_emc
00073    double  nx,ny;            // direction cosines of mom vector at vertex
00074    double  cosx,sinx;
00075    double aa,ca,cb,cc,detm;
00076   
00077    
00078    // fzisan track ID and EMC radius
00079    int Id_cdfztrk = id; R_emc = rEmc;
00080 
00081    if( Id_cdfztrk<0 ) {
00082      if (_debug) std::cout << " Emc_helix *** wrong id_cdfztrk ="
00083                            << Id_cdfztrk << std::endl;
00084                                                   return(-1);
00085    }
00086    
00087    // fzisan track
00088    /*    FTFinder * ftrk = FTFinder:: GetPointer();
00089    FTList<FTTrack *> & FsTrks = ftrk->tracks();
00090    NTrk = FsTrks.length();
00091      
00092    if (NTrk<=0)                                   return (-3);
00093 
00094    // get helix params for Id_cdfztrk 
00095    FTTrack & trk = * FsTrks[Id_cdfztrk];
00096    const Helix hel = * trk.helix();
00097 
00098    const HepPoint3D pivot1(0.,0.,0.);
00099    HepVector  a(5,0);
00100    a[0] = hel.a()[0];
00101    a[1] = hel.a()[1];
00102    a[2] = hel.a()[2];
00103    a[3] = hel.a()[3];
00104    a[4] = hel.a()[4];
00105    */
00106    const HepPoint3D pivot1(0.,0.,0.);
00107    HepVector  a(5,0);
00108    a[0] = fzisan[0];
00109    a[1] = fzisan[1];
00110    a[2] = fzisan[2];
00111    a[3] = fzisan[3];
00112    a[4] = fzisan[4];
00113 
00114    // Ill-fitted track in fzisan (dz=tanl=-9999.)
00115    if (abs(a[3])>50.0 || abs(a[4])>500.0)          return (-5);
00116 
00117    // D e f i n e   h e l i x
00118    Helix helix1(pivot1,a);
00119    Dr    = helix1.a()[0];   
00120    Phi0  = helix1.a()[1];   
00121    Kappa = helix1.a()[2];    
00122    Dz    = helix1.a()[3];   
00123    Tanl  = helix1.a()[4];
00124 
00125    /* double detaphi=asin(0.5*0.81*0.3*fabs(Kappa));
00126       double phi=Phi0+detaphi+ piby1/2;
00127       */
00128     
00129    // check cdfztrk hit on Emc cyclinder
00130    rho  = helix1.radius(); 
00131    // cout<<" Emc_helix:: rho  ="<<rho<<endl;  // radius of the circle in cm
00132    HepPoint3D    xyz    = helix1.center();
00133    xc   = xyz(0);
00134    yc   = xyz(1);
00135 
00136    Hep3Vector vxyz   = helix1.direction();
00137    nx   = vxyz(0);              // direction of track at the vertex
00138    ny   = vxyz(1); 
00139    
00140    // get hit on Emc cylinder at radius R_Emc;
00141    if( xc==0.0 && yc==0.0 ) return(-3);
00142    
00143    // coefficients of quadratic equation
00144    ca = xc*xc + yc*yc ;
00145    aa = 0.5 * ( ca - rho*rho + R_emc*R_emc );
00146    
00147    if ( xc != 0.0 ) {
00148       cb = aa * yc;
00149       cc = aa*aa - R_emc*R_emc*xc*xc; 
00150       // determinant
00151       detm = cb*cb - ca*cc;
00152       if ( detm > 0.0 ) {
00153          yy[0] = ( cb + sqrt(detm) )/ ca;
00154          xx[0] = ( aa - yy[0]*yc )/xc;
00155          yy[1] = ( cb - sqrt(detm) )/ ca;
00156          xx[1] = ( aa - yy[1]*yc )/xc;
00157       } else  return(-1);
00158    }
00159    else{
00160       cb = aa * xc;
00161       cc = aa*aa - R_emc*R_emc*yc*yc;
00162       // determinant
00163       detm = cb*cb - ca*cc;
00164       if ( detm > 0.0 ) {
00165          xx[0] = ( cb + sqrt(detm) )/ca;
00166          yy[0] = ( aa - xx[0]*xc )/yc;
00167          xx[1] = ( cb - sqrt(detm) )/ca;
00168          yy[1] = ( aa - xx[1]*xc )/yc;
00169       } else return(-2);
00170    }
00171   
00172 
00173    // choose one of hits according to track direction at the vertex.
00174   
00175   if( xx[0]*nx + yy[0]*ny > 0.0 ) { emcx = xx[0]; emcy = yy[0]; }
00176    else                            { emcx = xx[1]; emcy = yy[1]; }
00177     
00178    double fi = atan2(emcy ,emcx );    // atna2 from -pi to pi
00179 
00180     if( fi < 0.0 ) fi=pi2+fi;
00181    Fi_emc = fi;         
00182      
00183    // get phi and z on the emc counter
00184    const HepPoint3D pivot2( emcx, emcy, 0.0);
00185    helix1.pivot(pivot2);
00186    
00187    // corrected by Ozaki san to avoid negative path length on Aug.10,99   
00188    Phi1=helix1.a()[1];
00189    Z_emc=helix1.a()[3];
00190 
00191    //get(thepa,phi)from the intersection (x,y,z)
00192    Hep3Vector intersec(emcx, emcy, Z_emc);
00193     theta_emc = intersec.getTheta();
00194     phi_emc = intersec.getPhi();
00195   
00196    return(1);
00197 
00198 }

void Emc_helix::pathlCut double  pathl_max  )  [inline]
 

00045                                     {
00046       _pathl_cut = pathl_max;
00047     }

void Emc_helix::pathlCut double  pathl_max  )  [inline]
 

00045                                     {
00046       _pathl_cut = pathl_max;
00047     }

void Emc_helix::zemcCut double  zemc_min,
double  zemc_max
[inline]
 

00049                                                    {
00050       _zemc_cutm = zemc_min;
00051       _zemc_cutx = zemc_max;
00052     }

void Emc_helix::zemcCut double  zemc_min,
double  zemc_max
[inline]
 

00049                                                    {
00050       _zemc_cutm = zemc_min;
00051       _zemc_cutx = zemc_max;
00052     }


Member Data Documentation

int Emc_helix::_debug [private]
 

double Emc_helix::_pathl_cut [private]
 

double Emc_helix::_zemc_cutm [private]
 

double Emc_helix::_zemc_cutx [private]
 

double Emc_helix::Dr
 

double Emc_helix::Dz
 

double Emc_helix::Fi_emc
 

double Emc_helix::Kappa
 

int Emc_helix::NTrk
 

double Emc_helix::Phi0
 

double Emc_helix::Phi1
 

double Emc_helix::phi_emc
 

double Emc_helix::pi2 [private]
 

double Emc_helix::piby1 [private]
 

double Emc_helix::piby44 [private]
 

double Emc_helix::R_emc
 

double Emc_helix::Tanl
 

double Emc_helix::theta_emc
 

double Emc_helix::W_emc
 

double Emc_helix::Z_emc
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:01:03 2011 for BOSS6.5.5 by  doxygen 1.3.9.1