PREAN/TFndTrack.h

00001 // @(#)fROOT/PREAN:$Name:  $:$Id: TFndTrack.h,v 1.9 2007/10/02 09:00:08 Diego_Faso Exp $
00002 // Author: Diego Faso <mailto:faso@to.infn.it>, 2007/01/08
00003 
00004 #ifndef FROOT_TFndTrack
00005 #define FROOT_TFndTrack
00006 
00008 //                             TFndTrack                                //
00010 //                                                          //
00011 // Vertices are needed by tracks, so they are defined here: //
00012 //  see TFndVertex                                          //
00013 //                                                          //
00015 
00016 #include "FROOT.h" // very important (procedure definitions)
00017 #include "FIN_PHYS.h"
00018 
00019 #include <Riostream.h>
00020 #include <TObject.h>
00021 #include <TString.h>
00022 #include "TDatime.h"
00023 #include "TTree.h"
00024 #include "TFile.h"
00025 
00026 class TFndVertex: public TObject{
00027 
00028   // --- data-members
00029  protected:
00030   Int_t fPID; // particle ID (geant convention) [see FIN_PHYS namespace]
00031   Float_t fPosition[3]; // MRS position [x,y,z]
00032   Float_t fDistFromPrimary; // distance from K-(or K+) vertex
00033   Float_t fZtollerance; // z-tollerance
00034 
00035  public:
00036   TFndVertex();
00037   ~TFndVertex();
00038 
00039   void Reset();
00040   // ---
00041   friend class TFndPrean;
00042   friend class TFndPreanHistos;
00043   friend class TFndEvd;
00044   ClassDef(TFndVertex,1) // FINUDA vertices definition
00045 
00046 };
00047 
00051 
00052 class TFndTrack: public TObject{
00053   
00054  public:
00055   enum Trk_Charge_e {
00056     E_Trk_Neut = 0,
00057     E_Trk_Neg = -1,
00058     E_Trk_Pos =  1,
00059   };
00060 
00061   enum Trk_Vect_e { // momentum vector definition
00062     E_Trk_X = 0,
00063     E_Trk_Y = 1,
00064     E_Trk_Z = 2,
00065     E_Trk_T = 3,
00066     E_Trk_cosX = 4,
00067     E_Trk_cosY = 5,
00068     E_Trk_cosZ = 6,
00069     E_Trk_Vect_End = 7,
00070   };
00071 
00072   enum Trk_Helix_Geo_e {
00073     E_Hel_Xc = 0, // X of the center of the helix 
00074     E_Hel_Yc = 1, // Y of the center of the helix
00075     E_Hel_R  = 2, // Radius of curvature
00076     E_Hel_Geo_End  = 3, // Used for arrays
00077   };
00078 
00079   enum Trk_Helix_Mom_e {
00080     E_Hel_Mom = 0, // Momentum (Gev/c)
00081     E_Hel_Lam = 1, // Lambda angle
00082     E_Hel_Phi = 2, // Phi angle
00083     E_Hel_Mom_End  = 3, // Used for arrays
00084   };
00085 
00086   enum Trk_FitError_e {
00087     E_Trk_Fit_Success = 0,       // Spline fit successfull
00088     E_Trk_Fit_FewPoints = -2,    // Less than 4 points for a long track
00089     E_Trk_Fit_BadMom = 1,        // Bad momentum reconstruction IERMOM=1
00090     E_Trk_Fit_UndefCharge = 10,  // Charge not defined. ICHARG=0
00091     E_Trk_Fit_UndefMom = 11,     // Momentum not defined. PMAG=0
00092     //  (>0) Numerical error. Value of IERMAT
00093   };
00094   
00095   enum Trk_ChiSquared_e {
00096     E_Trk_ChiSq_DEV = 0, // Spline (DEVNEW**2) or numerical fitting algorithm
00097     E_Trk_ChiSq_RES = 1, // Spline fit residuals in x,y plane (RESDYX)
00098     E_Trk_ChiSq_LOSTstb   = 2, // Chi2 for left/right ambiguity from LOST
00099     E_Trk_ChiSq_STEREOstb = 3, // Chi2 from stereo straw fitting (FMIN)
00100     E_Trk_ChiSq_End = 4, // Used for arrays
00101   };
00102 
00103   enum Trk_BackTrack_e {
00104     E_Trk_Bcktrk_NormAng          = 0, // Track incidence angle relative to the normal to the target
00105     E_Trk_Bcktrk_SurfApproach     = 1, // length from the tgt surface to point of max approach to vertex
00106     E_Trk_Bcktrk_MaxApproach      = 2, // Distance of max. approach of the track to the vertex
00107     E_Trk_Bcktrk_SurfPlanePath    = 3, // Crossing path from the target surface to the vertex plane
00108     E_Trk_Bcktrk_ExtrDist         = 4, // Distance in the plane from vertex to extrapolated point
00109     E_Trk_Bcktrk_dPtgt_spline     = 5, // DeltaP = P(target surface)-P(spline)
00110     E_Trk_Bcktrk_dPtgt_spline_cor = 6, // DeltaP = P(corrected for crossing)-P(target surface)
00111     E_Trk_Bcktrk_pid              = 7, // Particle type used for backtracking (geant convention)
00112     E_Trk_Bcktrk_End              = 8, // Used for arrays
00113   };
00114 
00115   // --- data-members
00116  protected:
00117 
00118   Int_t fVertexID; // ID-number of associated vertex (-1 if K_stop)
00119 
00120   // General features
00121   Float_t fCharge;
00122   Bool_t fChargeAmbig; // charge opposite to the expected one after fit
00123 
00124   Bool_t fFwd; // true for fwd tracks
00125 
00126   Float_t fStart[E_Trk_Vect_End]; // start point (see TFndTrack::TrkVect_e)
00127   Float_t fStop[E_Trk_Vect_End];  // stop point  (see TFndTrack::TrkVect_e)
00128 
00129   Float_t fTOF; // time of flight (used mainly for neutral tracks)
00130   Float_t fEnergy; // Energy (evaluated on TOFONE for neutral tracks)
00131   // ---
00132   
00133   // by pattern recognition
00134   Short_t fNumOfHits; // number of hits used for reconstruction
00135   UInt_t fPath; // sequence of hit detectors
00136   // --- description of "path" [hex code] (zero in case of missing hit):
00137   //      digit 0: TOFINO slab (1-12) [0x1  - 0xC]
00138   //      digit 1: ISIM module (1- 8) [0x1  - 0x8]
00139   //      digit 2: OSIM module (1-10) [0x11 - 0xA]
00140   //      digit 3: INN LMD dch (1- 8) [0x1  - 0x8]
00141   //      digit 4: OUT LMD dch (1- 8) [0x1  - 0x8]
00142   //      digits 5-6: TOFONE slab (1-72) [0x1  - 0x48]
00143   //      digit 7: free
00144   
00145 
00146   Float_t fPR_Helix[E_Hel_Geo_End]; // pattern-recognized helix
00147   Float_t fPR_MomVert[E_Hel_Mom_End]; // pattern-recognized momentum (used also for neutral tracks)
00148 
00149   // ---
00150 
00151   // by fitting process and extrapolation
00152   Int_t fFitErr; // (see TFndTrack::Trk_FitError_e)
00153   Float_t fLength; // track length (cm)
00154   Float_t fChiSq[E_Trk_ChiSq_End];
00155 
00156   Float_t fFit_MomVert[E_Hel_Mom_End]; // fitted momentum
00157   Float_t fFit_MomVertErr[E_Hel_Mom_End]; // errors on fitted momentum
00158 
00159   Float_t fDeDx[2]; // dE/dx [ISIM,OSIM]
00160   Float_t fCorr_DeDx[4]; //  dE/dx [ISIM,OSIM,LMD1,LMD2] corrected for attack-angle
00161 
00162   Bool_t fExtrapolated; // true if back-extrapoletion has been performed
00163   Float_t fBackTrack[E_Trk_Bcktrk_End]; // note: E_Trk_Bcktrk_pdg must be converted from "int"
00164         
00166   Int_t fType; // type of tracks (number of hits per layer)
00167   Float_t fDistVert; // distance from vertex
00168 
00169   // director cosines (track helix/detector)
00170   Float_t fIsimCos;
00171   Float_t fOsimCos;
00172   Float_t fLmd1Cos;
00173   Float_t fLmd2Cos;
00174 
00175   Float_t fSpecMom; // momentum extimated inside the spectrometer
00176 
00177   void EvalTrack();
00178 
00179  public:
00180   TFndTrack();
00181   ~TFndTrack();
00182   
00183   void Reset(); // reset all data-members
00184   void SetPath(UInt_t tofi,UInt_t isim,UInt_t osim,UInt_t lmd_inn,UInt_t lmd_out,UInt_t tofo);
00185   UInt_t GetPath(UInt_t &tofi,UInt_t &isim,UInt_t &osim,UInt_t &lmd_inn,UInt_t &lmd_out,UInt_t &tofo);
00186 
00187   // --- following methods can be
00188   //     used in order to get the
00189   //     single-detector-channel
00190   UInt_t GetPath_Tofino();
00191   UInt_t GetPath_Isim();
00192   UInt_t GetPath_Osim();
00193   UInt_t GetPath_Lmd_Inn();
00194   UInt_t GetPath_Lmd_Out();
00195   UInt_t GetPath_Tofone();
00196 
00197   void PrintData(Int_t depth = 1);
00198 
00199   friend class TFndPrean;
00200   friend class TFndPreanHistos;
00201   friend class TFndEvd;
00202   ClassDef(TFndTrack,4) // FINUDA Track general structure
00203 
00204     // streamer versions:
00205     //  1: valid up to fidarc-602 (long tracks only)
00206     //  2: used for test purposes (while adding short tracks support)
00207     //  3: used for test purposes (while adding short tracks support)
00208     //  4: valid from fidarc-603 (short tracks are used) / corrected dE/dx added
00209 };
00210 
00211 #endif // FROOT_TFndTrack

Generated on Tue Oct 16 15:40:47 2007 by  doxygen 1.5.2