TEveVSDStructs.h

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveVSDStructs.h 31517 2009-12-03 11:56:23Z matevz $
00002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TEveVSDStructs
00013 #define ROOT_TEveVSDStructs
00014 
00015 #include "TObject.h"
00016 #include "TParticle.h"
00017 #include "TEveVector.h"
00018 
00019 /******************************************************************************/
00020 // VSD Structures
00021 /******************************************************************************/
00022 
00023 // Basic structures for Reve VSD concept. Design criteria:
00024 //
00025 //  * provide basic cross-referencing functionality;
00026 //
00027 //  * small memory/disk footprint (floats / count on compression in
00028 //    split mode);
00029 //
00030 //  * simple usage from tree selections;
00031 //
00032 //  * placement in TClonesArray (composites are TObject derived);
00033 //
00034 //  * minimal member-naming (impossible to make everybody happy).
00035 //
00036 
00037 
00038 /******************************************************************************/
00039 // TEveMCTrack
00040 /******************************************************************************/
00041 
00042 class TEveMCTrack : public TParticle // ?? Copy stuff over ??
00043 {
00044 public:
00045    Int_t       fLabel;      // Label of the track
00046    Int_t       fIndex;      // Index of the track (in some source array)
00047    Int_t       fEvaLabel;   // Label of primary particle
00048 
00049    Bool_t      fDecayed;    // True if decayed during tracking.
00050    // ?? Perhaps end-of-tracking point/momentum would be better.
00051    Float_t     fTDecay;     // Decay time
00052    TEveVector  fVDecay;     // Decay vertex
00053    TEveVector  fPDecay;     // Decay momentum
00054 
00055    TEveMCTrack() : fLabel(-1), fIndex(-1), fEvaLabel(-1),
00056                    fDecayed(kFALSE), fTDecay(0), fVDecay(), fPDecay() {}
00057    virtual ~TEveMCTrack() {}
00058 
00059    TEveMCTrack& operator=(const TParticle& p)
00060    { *((TParticle*)this) = p; return *this; }
00061 
00062    void ResetPdgCode() { fPdgCode = 0; }
00063 
00064    ClassDef(TEveMCTrack, 1); // Monte Carlo track (also used in VSD).
00065 };
00066 
00067 
00068 /******************************************************************************/
00069 // TEveHit
00070 /******************************************************************************/
00071 
00072 // Representation of a hit.
00073 
00074 // Members det_id (and fSubdetId) serve for cross-referencing into
00075 // geometry. Hits should be stored in fDetId (+some label ordering) in
00076 // order to maximize branch compression.
00077 
00078 
00079 class TEveHit : public TObject
00080 {
00081 public:
00082    UShort_t     fDetId;    // Custom detector id.
00083    UShort_t     fSubdetId; // Custom sub-detector id.
00084    Int_t        fLabel;    // Label of particle that produced the hit.
00085    Int_t        fEvaLabel; // Label of primary particle, ancestor of label.
00086    TEveVector   fV;        // Hit position.
00087 
00088    // Float_t charge; probably specific.
00089 
00090    TEveHit() : fDetId(0), fSubdetId(0), fLabel(0), fEvaLabel(0), fV() {}
00091    virtual ~TEveHit() {}
00092 
00093    ClassDef(TEveHit, 1); // Monte Carlo hit (also used in VSD).
00094 };
00095 
00096 
00097 /******************************************************************************/
00098 // TEveCluster
00099 /******************************************************************************/
00100 
00101 // Base class for reconstructed clusters
00102 
00103 // ?? Should TEveHit and cluster have common base? No.
00104 
00105 class TEveCluster : public TObject
00106 {
00107 public:
00108    UShort_t     fDetId;     // Custom detector id.
00109    UShort_t     fSubdetId;  // Custom sub-detector id.
00110    Int_t        fLabel[3];  // Labels of particles that contributed hits.
00111 
00112    // ?? Should include reconstructed track(s) using it? Rather not, separate.
00113 
00114    TEveVector      fV;      // Vertex.
00115    // TEveVector   fW;      // Cluster widths.
00116    // Coord system? Errors and/or widths Wz, Wy?
00117 
00118    TEveCluster() : fDetId(0), fSubdetId(0), fV() { fLabel[0] = fLabel[1] = fLabel[2] = 0; }
00119    virtual ~TEveCluster() {}
00120 
00121    ClassDef(TEveCluster, 1); // Reconstructed cluster (also used in VSD).
00122 };
00123 
00124 
00125 /******************************************************************************/
00126 // TEveRecTrack
00127 /******************************************************************************/
00128 
00129 class TEveRecTrack : public TObject
00130 {
00131 public:
00132    Int_t       fLabel;       // Label of the track.
00133    Int_t       fIndex;       // Index of the track (in some source array).
00134    Int_t       fStatus;      // Status as exported from reconstruction.
00135    Int_t       fSign;        // Charge of the track.
00136    TEveVector  fV;           // Start vertex from reconstruction.
00137    TEveVector  fP;           // Reconstructed momentum at start vertex.
00138    Float_t     fBeta;        // Relativistic beta factor.
00139 
00140    // PID data missing
00141 
00142    TEveRecTrack() : fLabel(-1), fIndex(-1), fStatus(0), fSign(0), fV(), fP(), fBeta(0) {}
00143    virtual ~TEveRecTrack() {}
00144 
00145    Float_t Pt() { return fP.Perp(); }
00146 
00147    ClassDef(TEveRecTrack, 1); // Reconstructed track (also used in VSD).
00148 };
00149 
00150 
00151 /******************************************************************************/
00152 // TEveRecKink
00153 /******************************************************************************/
00154 
00155 class TEveRecKink : public TObject
00156 {
00157 public:
00158 
00159    TEveVector  fVKink;          // Kink vertex: reconstructed position of the kink
00160    TEveVector  fPMother;        // Momentum of the mother track
00161    TEveVector  fVMother;        // Vertex of the mother track
00162    TEveVector  fPDaughter;      // Momentum of the daughter track
00163    TEveVector  fVDaughter;      // Vertex of the daughter track
00164    Double32_t  fKinkAngle[3];   // three angles
00165    Int_t       fSign;           // sign of the track
00166    Int_t       fStatus;         // Status as exported from reconstruction
00167 
00168    // Data from simulation
00169    Int_t       fKinkLabel[2];   // Labels of the mother and daughter tracks
00170    Int_t       fKinkIndex[2];   // Indices of the mother and daughter tracks
00171    Int_t       fKinkPdg[2];     // PDG code of mother and daughter.
00172 
00173    TEveRecKink() : fVKink(), fPMother(), fVMother(), fPDaughter(), fVDaughter(), fSign(0), fStatus(0)
00174    {
00175      fKinkAngle[0] = fKinkAngle[1] = fKinkAngle[2] = 0;
00176      fKinkLabel[0] = fKinkLabel[1] = 0;
00177      fKinkIndex[0] = fKinkIndex[1] = 0;
00178      fKinkPdg[0]   = fKinkPdg[1]   = 0;
00179    }
00180    virtual ~TEveRecKink() {}
00181 
00182    ClassDef(TEveRecKink, 1); // Reconstructed kink (also used in VSD).
00183 };
00184 
00185 
00186 /******************************************************************************/
00187 // TEveRecV0
00188 /******************************************************************************/
00189 
00190 class TEveRecV0 : public TObject
00191 {
00192 public:
00193    Int_t      fStatus;
00194 
00195    TEveVector fVNeg;       // Vertex of negative track.
00196    TEveVector fPNeg;       // Momentum of negative track.
00197    TEveVector fVPos;       // Vertex of positive track.
00198    TEveVector fPPos;       // Momentum of positive track.
00199 
00200    TEveVector fVCa;        // Point of closest approach.
00201    TEveVector fV0Birth;    // Reconstucted birth point of neutral particle.
00202 
00203    // ? Data from simulation.
00204    Int_t      fLabel;      // Neutral mother label read from kinematics.
00205    Int_t      fPdg;        // PDG code of mother.
00206    Int_t      fDLabel[2];  // Daughter labels.
00207 
00208    TEveRecV0() : fStatus(), fVNeg(), fPNeg(), fVPos(), fPPos(),
00209                  fVCa(), fV0Birth(), fLabel(0), fPdg(0)
00210    { fDLabel[0] = fDLabel[1] = 0; }
00211    virtual ~TEveRecV0() {}
00212 
00213    ClassDef(TEveRecV0, 1); // Reconstructed V0 (also used in VSD).
00214 };
00215 
00216 
00217 /******************************************************************************/
00218 // TEveRecCascade
00219 /******************************************************************************/
00220 
00221 class TEveRecCascade : public TObject
00222 {
00223 public:
00224    Int_t      fStatus;
00225 
00226    TEveVector fVBac;         // Vertex of bachelor track.
00227    TEveVector fPBac;         // Momentum of bachelor track.
00228 
00229    TEveVector fCascadeVCa;   // Point of closest approach for Cascade.
00230    TEveVector fCascadeBirth; // Reconstucted birth point of cascade particle.
00231 
00232    // ? Data from simulation.
00233    Int_t      fLabel;        // Cascade mother label read from kinematics.
00234    Int_t      fPdg;          // PDG code of mother.
00235    Int_t      fDLabel;       // Daughter label.
00236 
00237    TEveRecCascade() : fStatus(),  fVBac(), fPBac(),
00238                       fCascadeVCa(), fCascadeBirth(),
00239                       fLabel(0), fPdg(0), fDLabel(0) {}
00240    virtual ~TEveRecCascade() {}
00241 
00242    ClassDef(TEveRecCascade, 1); // Reconstructed Cascade (also used in VSD).
00243 };
00244 
00245 
00246 /******************************************************************************/
00247 // TEveMCRecCrossRef
00248 /******************************************************************************/
00249 
00250 class TEveMCRecCrossRef : public TObject
00251 {
00252 public:
00253    Bool_t       fIsRec;   // Is reconstructed.
00254    Bool_t       fHasV0;
00255    Bool_t       fHasKink;
00256    Int_t        fLabel;
00257    Int_t        fNHits;
00258    Int_t        fNClus;
00259 
00260    TEveMCRecCrossRef() : fIsRec(false), fHasV0(false), fHasKink(false),
00261                          fLabel(0), fNHits(0), fNClus(0) {}
00262    virtual ~TEveMCRecCrossRef() {}
00263 
00264    ClassDef(TEveMCRecCrossRef, 1); // Cross-reference of sim/rec data per particle (also used in VSD).
00265 };
00266 
00267 
00268 /******************************************************************************/
00269 // Missing primary vertex class.
00270 /******************************************************************************/
00271 
00272 
00273 /******************************************************************************/
00274 /******************************************************************************/
00275 
00276 // This whole construction is somewhat doubtable. It requires
00277 // shameless copying of experiment data. What is good about this
00278 // scheme:
00279 //
00280 // 1) Filters can be applied at copy time so that only part of the
00281 // data is copied over.
00282 //
00283 // 2) Once the data is extracted it can be used without experiment
00284 // software. Thus, external service can provide this data and local
00285 // client can be really thin.
00286 //
00287 // 3) Some pretty advanced visualization schemes/selections can be
00288 // implemented in a general framework by providing data extractors
00289 // only. This is also good for PR or VIP displays.
00290 //
00291 // 4) These classes can be extended by particular implementations. The
00292 // container classes will use TClonesArray with user-specified element
00293 // class.
00294 
00295 // The common behaviour could be implemented entirely without usage of
00296 // a common base classes, by just specifying names of members that
00297 // retrieve specific data. This is fine as long as one only uses tree
00298 // selections but becomes painful for extraction of data into local
00299 // structures (could a) use interpreter but this is an overkill and
00300 // would cause serious trouble for multi-threaded environment; b) use
00301 // member offsets and data-types from the dictionary).
00302 
00303 #endif

Generated on Tue Jul 5 14:15:05 2011 for ROOT_528-00b_version by  doxygen 1.5.1