|
||||
Warning, file /include/root/TEveVSDStructs.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // @(#)root/eve:$Id$ 0002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 0003 0004 /************************************************************************* 0005 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * 0006 * All rights reserved. * 0007 * * 0008 * For the licensing terms see $ROOTSYS/LICENSE. * 0009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 0010 *************************************************************************/ 0011 0012 #ifndef ROOT_TEveVSDStructs 0013 #define ROOT_TEveVSDStructs 0014 0015 #include "TObject.h" 0016 #include "TParticle.h" 0017 #include "TEveVector.h" 0018 0019 /******************************************************************************/ 0020 // VSD Structures 0021 /******************************************************************************/ 0022 0023 // Basic structures for Reve VSD concept. Design criteria: 0024 // 0025 // * provide basic cross-referencing functionality; 0026 // 0027 // * small memory/disk footprint (floats / count on compression in 0028 // split mode); 0029 // 0030 // * simple usage from tree selections; 0031 // 0032 // * placement in TClonesArray (composites are TObject derived); 0033 // 0034 // * minimal member-naming (impossible to make everybody happy). 0035 // 0036 0037 0038 /******************************************************************************/ 0039 // TEveMCTrack 0040 /******************************************************************************/ 0041 0042 class TEveMCTrack : public TParticle // ?? Copy stuff over ?? 0043 { 0044 public: 0045 Int_t fLabel; // Label of the track 0046 Int_t fIndex; // Index of the track (in some source array) 0047 Int_t fEvaLabel; // Label of primary particle 0048 0049 Bool_t fDecayed; // True if decayed during tracking. 0050 // ?? Perhaps end-of-tracking point/momentum would be better. 0051 Float_t fTDecay; // Decay time 0052 TEveVector fVDecay; // Decay vertex 0053 TEveVector fPDecay; // Decay momentum 0054 0055 TEveMCTrack() : fLabel(-1), fIndex(-1), fEvaLabel(-1), 0056 fDecayed(kFALSE), fTDecay(0), fVDecay(), fPDecay() {} 0057 ~TEveMCTrack() override {} 0058 0059 TEveMCTrack& operator=(const TParticle& p) 0060 { *((TParticle*)this) = p; return *this; } 0061 0062 void ResetPdgCode() { fPdgCode = 0; } 0063 0064 ClassDefOverride(TEveMCTrack, 1); // Monte Carlo track (also used in VSD). 0065 }; 0066 0067 0068 /******************************************************************************/ 0069 // TEveHit 0070 /******************************************************************************/ 0071 0072 // Representation of a hit. 0073 0074 // Members det_id (and fSubdetId) serve for cross-referencing into 0075 // geometry. Hits should be stored in fDetId (+some label ordering) in 0076 // order to maximize branch compression. 0077 0078 0079 class TEveHit : public TObject 0080 { 0081 public: 0082 UShort_t fDetId; // Custom detector id. 0083 UShort_t fSubdetId; // Custom sub-detector id. 0084 Int_t fLabel; // Label of particle that produced the hit. 0085 Int_t fEvaLabel; // Label of primary particle, ancestor of label. 0086 TEveVector fV; // Hit position. 0087 0088 // Float_t charge; probably specific. 0089 0090 TEveHit() : fDetId(0), fSubdetId(0), fLabel(0), fEvaLabel(0), fV() {} 0091 ~TEveHit() override {} 0092 0093 ClassDefOverride(TEveHit, 1); // Monte Carlo hit (also used in VSD). 0094 }; 0095 0096 0097 /******************************************************************************/ 0098 // TEveCluster 0099 /******************************************************************************/ 0100 0101 // Base class for reconstructed clusters 0102 0103 // ?? Should TEveHit and cluster have common base? No. 0104 0105 class TEveCluster : public TObject 0106 { 0107 public: 0108 UShort_t fDetId; // Custom detector id. 0109 UShort_t fSubdetId; // Custom sub-detector id. 0110 Int_t fLabel[3]; // Labels of particles that contributed hits. 0111 0112 // ?? Should include reconstructed track(s) using it? Rather not, separate. 0113 0114 TEveVector fV; // Vertex. 0115 // TEveVector fW; // Cluster widths. 0116 // Coord system? Errors and/or widths Wz, Wy? 0117 0118 TEveCluster() : fDetId(0), fSubdetId(0), fV() { fLabel[0] = fLabel[1] = fLabel[2] = 0; } 0119 ~TEveCluster() override {} 0120 0121 ClassDefOverride(TEveCluster, 1); // Reconstructed cluster (also used in VSD). 0122 }; 0123 0124 0125 /******************************************************************************/ 0126 // TEveRecTrack 0127 /******************************************************************************/ 0128 template <typename TT> 0129 class TEveRecTrackT : public TObject 0130 { 0131 public: 0132 Int_t fLabel; // Label of the track. 0133 Int_t fIndex; // Index of the track (in some source array). 0134 Int_t fStatus; // Status as exported from reconstruction. 0135 Int_t fSign; // Charge of the track. 0136 TEveVectorT<TT> fV; // Start vertex from reconstruction. 0137 TEveVectorT<TT> fP; // Reconstructed momentum at start vertex. 0138 TT fBeta; // Relativistic beta factor. 0139 Double32_t fDcaXY; // dca xy to the primary vertex 0140 Double32_t fDcaZ; // dca z to the primary vertex 0141 Double32_t fPVX; // 0142 Double32_t fPVY; // 0143 Double32_t fPVZ; // 0144 // PID data missing 0145 0146 TEveRecTrackT() : fLabel(-1), fIndex(-1), fStatus(0), fSign(0), fV(), fP(), fBeta(0), fDcaXY(0), fDcaZ(0), fPVX(0), fPVY(0), fPVZ(0) {} 0147 ~TEveRecTrackT() override {} 0148 0149 Float_t Pt() { return fP.Perp(); } 0150 0151 ClassDefOverride(TEveRecTrackT, 2); // Template for reconstructed track (also used in VSD). 0152 }; 0153 0154 typedef TEveRecTrackT<Float_t> TEveRecTrack; 0155 typedef TEveRecTrackT<Float_t> TEveRecTrackF; 0156 typedef TEveRecTrackT<Double_t> TEveRecTrackD; 0157 0158 /******************************************************************************/ 0159 // TEveRecKink 0160 /******************************************************************************/ 0161 0162 class TEveRecKink : public TObject 0163 { 0164 public: 0165 0166 TEveVector fVKink; // Kink vertex: reconstructed position of the kink 0167 TEveVector fPMother; // Momentum of the mother track 0168 TEveVector fVMother; // Vertex of the mother track 0169 TEveVector fPDaughter; // Momentum of the daughter track 0170 TEveVector fVDaughter; // Vertex of the daughter track 0171 Double32_t fKinkAngle[3]; // three angles 0172 Int_t fSign; // sign of the track 0173 Int_t fStatus; // Status as exported from reconstruction 0174 0175 // Data from simulation 0176 Int_t fKinkLabel[2]; // Labels of the mother and daughter tracks 0177 Int_t fKinkIndex[2]; // Indices of the mother and daughter tracks 0178 Int_t fKinkPdg[2]; // PDG code of mother and daughter. 0179 0180 TEveRecKink() : fVKink(), fPMother(), fVMother(), fPDaughter(), fVDaughter(), fSign(0), fStatus(0) 0181 { 0182 fKinkAngle[0] = fKinkAngle[1] = fKinkAngle[2] = 0; 0183 fKinkLabel[0] = fKinkLabel[1] = 0; 0184 fKinkIndex[0] = fKinkIndex[1] = 0; 0185 fKinkPdg[0] = fKinkPdg[1] = 0; 0186 } 0187 ~TEveRecKink() override {} 0188 0189 ClassDefOverride(TEveRecKink, 1); // Reconstructed kink (also used in VSD). 0190 }; 0191 0192 0193 /******************************************************************************/ 0194 // TEveRecV0 0195 /******************************************************************************/ 0196 0197 class TEveRecV0 : public TObject 0198 { 0199 public: 0200 Int_t fStatus; 0201 0202 TEveVector fVNeg; // Vertex of negative track. 0203 TEveVector fPNeg; // Momentum of negative track. 0204 TEveVector fVPos; // Vertex of positive track. 0205 TEveVector fPPos; // Momentum of positive track. 0206 0207 TEveVector fVCa; // Point of closest approach. 0208 TEveVector fV0Birth; // Reconstucted birth point of neutral particle. 0209 0210 // ? Data from simulation. 0211 Int_t fLabel; // Neutral mother label read from kinematics. 0212 Int_t fPdg; // PDG code of mother. 0213 Int_t fDLabel[2]; // Daughter labels. 0214 0215 TEveRecV0() : fStatus(), fVNeg(), fPNeg(), fVPos(), fPPos(), 0216 fVCa(), fV0Birth(), fLabel(0), fPdg(0) 0217 { fDLabel[0] = fDLabel[1] = 0; } 0218 ~TEveRecV0() override {} 0219 0220 ClassDefOverride(TEveRecV0, 1); // Reconstructed V0 (also used in VSD). 0221 }; 0222 0223 0224 /******************************************************************************/ 0225 // TEveRecCascade 0226 /******************************************************************************/ 0227 0228 class TEveRecCascade : public TObject 0229 { 0230 public: 0231 Int_t fStatus; 0232 0233 TEveVector fVBac; // Vertex of bachelor track. 0234 TEveVector fPBac; // Momentum of bachelor track. 0235 0236 TEveVector fCascadeVCa; // Point of closest approach for Cascade. 0237 TEveVector fCascadeBirth; // Reconstucted birth point of cascade particle. 0238 0239 // ? Data from simulation. 0240 Int_t fLabel; // Cascade mother label read from kinematics. 0241 Int_t fPdg; // PDG code of mother. 0242 Int_t fDLabel; // Daughter label. 0243 0244 TEveRecCascade() : fStatus(), fVBac(), fPBac(), 0245 fCascadeVCa(), fCascadeBirth(), 0246 fLabel(0), fPdg(0), fDLabel(0) {} 0247 ~TEveRecCascade() override {} 0248 0249 ClassDefOverride(TEveRecCascade, 1); // Reconstructed Cascade (also used in VSD). 0250 }; 0251 0252 0253 /******************************************************************************/ 0254 // TEveMCRecCrossRef 0255 /******************************************************************************/ 0256 0257 class TEveMCRecCrossRef : public TObject 0258 { 0259 public: 0260 Bool_t fIsRec; // Is reconstructed. 0261 Bool_t fHasV0; 0262 Bool_t fHasKink; 0263 Int_t fLabel; 0264 Int_t fNHits; 0265 Int_t fNClus; 0266 0267 TEveMCRecCrossRef() : fIsRec(false), fHasV0(false), fHasKink(false), 0268 fLabel(0), fNHits(0), fNClus(0) {} 0269 ~TEveMCRecCrossRef() override {} 0270 0271 ClassDefOverride(TEveMCRecCrossRef, 1); // Cross-reference of sim/rec data per particle (also used in VSD). 0272 }; 0273 0274 0275 /******************************************************************************/ 0276 // Missing primary vertex class. 0277 /******************************************************************************/ 0278 0279 0280 /******************************************************************************/ 0281 /******************************************************************************/ 0282 0283 // This whole construction is somewhat doubtable. It requires 0284 // shameless copying of experiment data. What is good about this 0285 // scheme: 0286 // 0287 // 1) Filters can be applied at copy time so that only part of the 0288 // data is copied over. 0289 // 0290 // 2) Once the data is extracted it can be used without experiment 0291 // software. Thus, external service can provide this data and local 0292 // client can be really thin. 0293 // 0294 // 3) Some pretty advanced visualization schemes/selections can be 0295 // implemented in a general framework by providing data extractors 0296 // only. This is also good for PR or VIP displays. 0297 // 0298 // 4) These classes can be extended by particular implementations. The 0299 // container classes will use TClonesArray with user-specified element 0300 // class. 0301 0302 // The common behaviour could be implemented entirely without usage of 0303 // a common base classes, by just specifying names of members that 0304 // retrieve specific data. This is fine as long as one only uses tree 0305 // selections but becomes painful for extraction of data into local 0306 // structures (could a) use interpreter but this is an overkill and 0307 // would cause serious trouble for multi-threaded environment; b) use 0308 // member offsets and data-types from the dictionary). 0309 0310 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |