Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
REveVSDStructs.hxx
Go to the documentation of this file.
1// @(#)root/eve7:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007, 2018
3
4/*************************************************************************
5 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT7_REveVSDStructs
13#define ROOT7_REveVSDStructs
14
15#include "TParticle.h"
16
17#include <ROOT/REveVector.hxx>
18
19////////////////////////////////////////////////////////////////////////////////
20/// VSD Structures
21////////////////////////////////////////////////////////////////////////////////
22
23// Basic structures for Reve VSD concept. Design criteria:
24//
25// * provide basic cross-referencing functionality;
26//
27// * small memory/disk footprint (floats / count on compression in
28// split mode);
29//
30// * simple usage from tree selections;
31//
32// * placement in TClonesArray (composites are TObject derived);
33//
34// * minimal member-naming (impossible to make everybody happy).
35//
36
37namespace ROOT {
38namespace Experimental {
39
40////////////////////////////////////////////////////////////////////////////////
41/// REveMCTrack
42////////////////////////////////////////////////////////////////////////////////
43
44class REveMCTrack : public TParticle // ?? Copy stuff over ??
45{
46public:
47 Int_t fLabel{-1}; // Label of the track
48 Int_t fIndex{-1}; // Index of the track (in some source array)
49 Int_t fEvaLabel{-1}; // Label of primary particle
50
51 Bool_t fDecayed{kFALSE}; // True if decayed during tracking.
52 // ?? Perhaps end-of-tracking point/momentum would be better.
53 Float_t fTDecay{0}; // Decay time
54 REveVector fVDecay; // Decay vertex
55 REveVector fPDecay; // Decay momentum
56
57 REveMCTrack() = default;
58 ~REveMCTrack() override {}
59
61 {
62 *((TParticle *)this) = p;
63 return *this;
64 }
65
66 void ResetPdgCode() { fPdgCode = 0; }
67
68 ClassDefOverride(REveMCTrack, 1); // Monte Carlo track (also used in VSD).
69};
70
71////////////////////////////////////////////////////////////////////////////////
72/// REveHit
73/// Monte Carlo hit (also used in VSD).
74///
75/// Representation of a hit.
76/// Members det_id (and fSubdetId) serve for cross-referencing into
77/// geometry. Hits should be stored in fDetId (+some label ordering) in
78/// order to maximize branch compression.
79////////////////////////////////////////////////////////////////////////////////
80
81
83{
84public:
85 UShort_t fDetId{0}; // Custom detector id.
86 UShort_t fSubdetId{0}; // Custom sub-detector id.
87 Int_t fLabel{0}; // Label of particle that produced the hit.
88 Int_t fEvaLabel{0}; // Label of primary particle, ancestor of label.
89 REveVector fV; // Hit position.
90
91 // Float_t charge; probably specific.
92
93 REveHit() = default;
94 virtual ~REveHit() {}
95};
96
97////////////////////////////////////////////////////////////////////////////////
98/// REveCluster
99/// Reconstructed cluster (also used in VSD).
100////////////////////////////////////////////////////////////////////////////////
101
102// Base class for reconstructed clusters
103
104// ?? Should REveHit and cluster have common base? No.
105
106class REveCluster // : public TObject
107{
108public:
109 UShort_t fDetId{0}; // Custom detector id.
110 UShort_t fSubdetId{0}; // Custom sub-detector id.
111 Int_t fLabel[3]; // Labels of particles that contributed hits.
112
113 // ?? Should include reconstructed track(s) using it? Rather not, separate.
114
115 REveVector fV; // Vertex.
116 // REveVector fW; // Cluster widths.
117 // Coord system? Errors and/or widths Wz, Wy?
118
119 REveCluster() { fLabel[0] = fLabel[1] = fLabel[2] = 0; }
120 virtual ~REveCluster() {}
121};
122
123////////////////////////////////////////////////////////////////////////////////
124/// REveRecTrack
125/// Template for reconstructed track (also used in VSD).
126////////////////////////////////////////////////////////////////////////////////
127
128template <typename TT>
130{
131public:
132 Int_t fLabel{-1}; // Label of the track.
133 Int_t fIndex{-1}; // Index of the track (in some source array).
134 Int_t fStatus{0}; // Status as exported from reconstruction.
135 Int_t fSign{0}; // Charge of the track.
136 REveVectorT<TT> fV; // Start vertex from reconstruction.
137 REveVectorT<TT> fP; // Reconstructed momentum at start vertex.
138 TT fBeta{0}; // Relativistic beta factor.
139 Double32_t fDcaXY{0}; // dca xy to the primary vertex
140 Double32_t fDcaZ{0}; // dca z to the primary vertex
144 // PID data missing
145
146 REveRecTrackT() = default;
147 virtual ~REveRecTrackT() {}
148
149 Float_t Pt() { return fP.Perp(); }
150};
151
155
156////////////////////////////////////////////////////////////////////////////////
157/// REveRecKink
158/// Reconstructed kink (also used in VSD).
159////////////////////////////////////////////////////////////////////////////////
160
161class REveRecKink // : public TObject
162{
163public:
164 REveVector fVKink; // Kink vertex: reconstructed position of the kink
165 REveVector fPMother; // Momentum of the mother track
166 REveVector fVMother; // Vertex of the mother track
167 REveVector fPDaughter; // Momentum of the daughter track
168 REveVector fVDaughter; // Vertex of the daughter track
169 Double32_t fKinkAngle[3]; // three angles
170 Int_t fSign{0}; // sign of the track
171 Int_t fStatus{0}; // Status as exported from reconstruction
172
173 // Data from simulation
174 Int_t fKinkLabel[2]; // Labels of the mother and daughter tracks
175 Int_t fKinkIndex[2]; // Indices of the mother and daughter tracks
176 Int_t fKinkPdg[2]; // PDG code of mother and daughter.
177
179 {
180 fKinkAngle[0] = fKinkAngle[1] = fKinkAngle[2] = 0;
181 fKinkLabel[0] = fKinkLabel[1] = 0;
182 fKinkIndex[0] = fKinkIndex[1] = 0;
183 fKinkPdg[0] = fKinkPdg[1] = 0;
184 }
185 virtual ~REveRecKink() {}
186};
187
188////////////////////////////////////////////////////////////////////////////////
189/// REveRecV0
190////////////////////////////////////////////////////////////////////////////////
191
193{
194public:
196
197 REveVector fVNeg; // Vertex of negative track.
198 REveVector fPNeg; // Momentum of negative track.
199 REveVector fVPos; // Vertex of positive track.
200 REveVector fPPos; // Momentum of positive track.
201
202 REveVector fVCa; // Point of closest approach.
203 REveVector fV0Birth; // Reconstructed birth point of neutral particle.
204
205 // ? Data from simulation.
206 Int_t fLabel{0}; // Neutral mother label read from kinematics.
207 Int_t fPdg{0}; // PDG code of mother.
208 Int_t fDLabel[2]; // Daughter labels.
209
210 REveRecV0() { fDLabel[0] = fDLabel[1] = 0; }
211 virtual ~REveRecV0() {}
212};
213
214////////////////////////////////////////////////////////////////////////////////
215/// REveRecCascade
216////////////////////////////////////////////////////////////////////////////////
217
219{
220public:
222
223 REveVector fVBac; // Vertex of bachelor track.
224 REveVector fPBac; // Momentum of bachelor track.
225
226 REveVector fCascadeVCa; // Point of closest approach for Cascade.
227 REveVector fCascadeBirth; // Reconstructed birth point of cascade particle.
228
229 // ? Data from simulation.
230 Int_t fLabel{0}; // Cascade mother label read from kinematics.
231 Int_t fPdg{0}; // PDG code of mother.
232 Int_t fDLabel{0}; // Daughter label.
233
234 REveRecCascade() = default;
235 virtual ~REveRecCascade() {}
236};
237
238////////////////////////////////////////////////////////////////////////////////
239/// REveMCRecCrossRef
240/// Cross-reference of sim/rec data per particle (also used in VSD).
241////////////////////////////////////////////////////////////////////////////////
242
244public:
245 Bool_t fIsRec{kFALSE}; // Is reconstructed.
251
252 REveMCRecCrossRef() = default;
254};
255
256////////////////////////////////////////////////////////////////////////////////
257/// Missing primary vertex class.
258////////////////////////////////////////////////////////////////////////////////
259
260/******************************************************************************/
261/******************************************************************************/
262
263// This whole construction is somewhat doubtable. It requires
264// shameless copying of experiment data. What is good about this
265// scheme:
266//
267// 1) Filters can be applied at copy time so that only part of the
268// data is copied over.
269//
270// 2) Once the data is extracted it can be used without experiment
271// software. Thus, external service can provide this data and local
272// client can be really thin.
273//
274// 3) Some pretty advanced visualization schemes/selections can be
275// implemented in a general framework by providing data extractors
276// only. This is also good for PR or VIP displays.
277//
278// 4) These classes can be extended by particular implementations. The
279// container classes will use TClonesArray with user-specified element
280// class.
281
282// The common behaviour could be implemented entirely without usage of
283// a common base classes, by just specifying names of members that
284// retrieve specific data. This is fine as long as one only uses tree
285// selections but becomes painful for extraction of data into local
286// structures (could a) use interpreter but this is an overkill and
287// would cause serious trouble for multi-threaded environment; b) use
288// member offsets and data-types from the dictionary).
289
290} // namespace Experimental
291} // namespace ROOT
292
293#endif
unsigned short UShort_t
Definition RtypesCore.h:40
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
winID h TVirtualViewer3D TVirtualGLPainter p
REveCluster Reconstructed cluster (also used in VSD).
REveHit Monte Carlo hit (also used in VSD).
REveMCRecCrossRef Cross-reference of sim/rec data per particle (also used in VSD).
REveMCTrack & operator=(const TParticle &p)
REveRecKink Reconstructed kink (also used in VSD).
REveRecTrack Template for reconstructed track (also used in VSD).
Description of the dynamic properties of a particle.
Definition TParticle.h:26
Int_t fPdgCode
Definition TParticle.h:31
REveRecTrackT< Float_t > REveRecTrackF
REveRecTrackT< Double_t > REveRecTrackD
REveRecTrackT< Float_t > REveRecTrack
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...