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

NtpSRTrack.h

Go to the documentation of this file.
00001 
00002 //
00003 // NtpSRTrack
00004 //
00005 // NtpSRTrack is an ntuple class to hold 3-d track data
00006 //
00007 // Based on Roy Lee's CandEventSR/TrackSRTTree class.
00009 
00010 #ifndef NTPSRTRACK_H
00011 #define NTPSRTRACK_H
00012 
00013 #include <iosfwd> // ostream fwd decl'
00014 
00015 #include "CandNtupleSR/NtpSRTrackPlane.h"
00016 #include "CandNtupleSR/NtpSRStripPulseHeight.h"
00017 #include "CandNtupleSR/NtpSRVertex.h"
00018 #include "CandNtupleSR/NtpSRFiducial.h"
00019 #include "CandNtupleSR/NtpSRTrackTime.h"
00020 #include "CandNtupleSR/NtpSRMomentum.h"
00021 #include "CandNtupleSR/NtpSRFitTrack.h"
00022 #include "CandNtupleSR/NtpSRCosmicRay.h"
00023 
00024 class NtpSRTrack;
00025 std::ostream &operator << (std::ostream& os, const NtpSRTrack& track);
00026 
00027 class NtpSRTrack : public TObject {
00028 
00029  public:
00030   NtpSRTrack() : index(0),slc(0),ndigit(0),nstpcnt(0),nstrip(0),stp(0),
00031                  stpfit(0),stpu(0),
00032                  stpv(0),stpx(0),stpy(0),stpz(0),stpds(0),stpfitchi2(0),
00033                  stpfitprechi2(0),stpfitqp(0),stpph0sigmap(0),stpph0mip(0),
00034                  stpph0gev(0),stpph1sigmap(0),stpph1mip(0),stpph1gev(0),
00035                  stpattn0c0(0),stpattn1c0(0),stpt0(0),stpt1(0),stptcal0t0(0),
00036                  stptcal1t0(0),ds(0),range(0),cputime(0), contained(0) {} // def const'r
00037   NtpSRTrack(Int_t nstripinit); // normal const'r
00038   NtpSRTrack(const NtpSRTrack& o); // copy ctor
00039 
00040   virtual ~NtpSRTrack() { this -> Clear(); }
00041 
00042   // State testing methods
00043   virtual std::ostream& Print(std::ostream& os) const;
00044   virtual void Print(Option_t* option = "") const; 
00045 
00046   // State changing methods
00047   void Clear(Option_t* = "") { ClearStrips(); }
00048   void ClearStrips();
00049   
00050   void AddStripAt(Int_t stripindex,Int_t ind);
00051   void SetPh(Float_t sigmap,Float_t mip,Float_t gev,
00052                                         UInt_t istrip,UShort_t iend);
00053   void SetTime(Double_t time, UInt_t istrip, UShort_t iend);
00054   void SetCalT0(Double_t calt0, UInt_t istrip, UShort_t iend);
00055   void SetAttnC0(Double_t attnc0, UInt_t istrip, UShort_t iend);
00056   
00057 
00058  public:
00059   // Ntuple is treated like a C-struct with public data members and
00060   // rule-breaking field data members not prefaced by "f" and all
00061   // lowercase, by popular demand.
00062 
00063   UShort_t index;       // index of this track in track array
00064   Short_t slc;          // index of associated slice in slice array
00065   Int_t  ndigit;        // number of digits in track
00066   // nstpcnt will represent the number of strips in track even in "slim"
00067   // ntuple output file for which nstrip is set to 0 and the strip 
00068   // arrays (stp,stpfit, etc.) have been deleted. 
00069   Int_t  nstpcnt;       // number of strips in track
00070   Int_t  nstrip;        // number of strips in strip track arrays
00071   Int_t  *stp;          //[nstrip] indices of assoc. strips in strip array 
00072   Byte_t *stpfit;       //[nstrip] 1 if hit strip was used in final track fit
00073   // Track positional information at plane associated with each strip
00074   Float_t *stpu;        //[nstrip] U-position of track at strip plane (m) 
00075   Float_t *stpv;        //[nstrip] V-position of track at strip plane (m)
00076   Float_t *stpx;        //[nstrip] Z-position of track at strip plane (m)
00077   Float_t *stpy;        //[nstrip] Y-position of track at strip plane (m)
00078   Float_t *stpz;        //[nstrip] Z-position of track at strip plane (m)
00079   Float_t *stpds;       //[nstrip] track path length from track end (m)
00080   Float_t *stpfitchi2;   //[nstrip] final chi2 at strip plane
00081   Float_t *stpfitprechi2;//[nstrip] pre chi2 from Kalman filter at strip plane
00082   Float_t *stpfitqp;     //[nstrip] charge over momentum at strip plane (GeV)
00083   Float_t *stpph0sigmap;//[nstrip] ph corrected for fiber attenuation (east)
00084   Float_t *stpph0mip;   //[nstrip] ph in MIPs      (east)
00085   Float_t *stpph0gev;   //[nstrip] ph in GeV       (east)
00086   Float_t *stpph1sigmap;//[nstrip] ph corrected for fiber attenuation (west)
00087   Float_t *stpph1mip;   //[nstrip] ph in MIPs      (west)
00088   Float_t *stpph1gev;   //[nstrip] ph in GeV       (west)
00089   Float_t *stpattn0c0;  //[nstrip] C0 from mapper results (east)
00090   Float_t *stpattn1c0;  //[nstrip] C0 from mapper results (west)
00091   Double_t *stpt0; //[nstrip] 3-d time corr. for propagation delays (sec) (E)
00092   Double_t *stpt1; //[nstrip] 3-d time corr. for propagation delays (sec) (W)
00093   Double_t *stptcal0t0; //[nstrip] T0 offset (sec) (east)
00094   Double_t *stptcal1t0; //[nstrip] T0 offset (sec) (west)
00095   Float_t ds;    // total path length of track from vertex to end (m)
00096   Float_t range; // amount of material traversed from vertex to end (g/cm**2)
00097   Float_t cputime; // CPU time to create track list which contains this track
00098   Int_t contained; // 0 = not contained, 1 = contained
00099   NtpSRStripPulseHeight ph; // summed strip pulse height
00100   NtpSRTrackPlane  plane;   // range of planes, timing used to determine start
00101   NtpSRVertex  vtx;      // vertex coordinates
00102   NtpSRVertex  end;      // coordinates at end plane
00103   NtpSRVertex  lin;      // coordinates from linear fit
00104   NtpSRFiducial fidvtx;  // containment information for vertex
00105   NtpSRFiducial fidend;  // containment information for track end
00106   NtpSRFiducial fidall;  // containment information for distance of closest
00107                          // approach over all 3D points on the track
00108   NtpSRTrackTime time;   // track timing data
00109   NtpSRMomentum momentum; // track momentum data
00110   NtpSRFitTrack fit;     // data from track fit
00111   NtpSRCosmicRay cr;     // cosmic ray data
00112 
00113   ClassDef(NtpSRTrack,8)
00114 };
00115 
00116 inline void NtpSRTrack::SetTime(Double_t time, UInt_t istrip, UShort_t iend) {
00117   if      ( iend == 0 ) stpt0[istrip] = time;
00118   else if ( iend == 1 ) stpt1[istrip] = time;
00119   return;
00120 }
00121 inline void NtpSRTrack::SetCalT0(Double_t calt0, UInt_t istrip,UShort_t iend) {
00122   if      ( iend == 0 ) stptcal0t0[istrip] = calt0;
00123   else if ( iend == 1 ) stptcal1t0[istrip] = calt0;
00124   return;
00125 }
00126 inline void NtpSRTrack::SetAttnC0(Double_t attnc0,UInt_t istrip,UShort_t iend){
00127   if      ( iend == 0 ) stpattn0c0[istrip] = attnc0;
00128   else if ( iend == 1 ) stpattn1c0[istrip] = attnc0;
00129   return;
00130 }
00131 inline void NtpSRTrack::SetPh(Float_t sigmap, Float_t mip, Float_t gev, 
00132                               UInt_t istrip, UShort_t iend) {
00133   if ( iend == 0 ) {
00134     stpph0sigmap[istrip] = sigmap;
00135     stpph0mip[istrip] = mip;
00136     stpph0gev[istrip] = gev;
00137   }
00138   else if ( iend == 1 ) {
00139     stpph1sigmap[istrip] = sigmap;
00140     stpph1mip[istrip] = mip;
00141     stpph1gev[istrip] = gev;
00142   }
00143 
00144   return;
00145 }
00146 
00147 
00148 #endif // NTPSRTRACK_H

Generated on Mon Feb 15 11:07:07 2010 for loon by  doxygen 1.3.9.1