Belle II Software light-2405-quaxo
linkdef.h
1#ifdef __CINT__
2
3#pragma link off all globals;
4#pragma link off all classes;
5#pragma link off all functions;
6#pragma link C++ nestedclasses;
7
8#pragma link C++ class Belle2::Cluster+; // checksum=0xa21d75ce, version=1
9
10#pragma link C++ class Belle2::MCParticle+; // checksum=0x3dc6fb35, version=5
11#pragma link C++ class vector<Belle2::MCParticle*>+; // checksum=0xd52f5001, version=6
12#pragma link C++ class Belle2::PIDLikelihood+; // checksum=0x22bf2bf, version=3
13#pragma link C++ class Belle2::ECLCluster+; // checksum=0x31d0dad4, version=15
14
15#pragma link C++ class Belle2::KLMCluster+; // checksum=0x9be09a36, version=2
16#pragma link C++ class Belle2::KlId+; // checksum=0xdc073aa, version=2
17
18#pragma link C++ class Belle2::EventLevelClusteringInfo+; // checksum=0x71a4f53c, version=4
19
20#pragma link C++ class Belle2::Track+; // checksum=0x1388f8ff, version=6
21#pragma link C++ class Belle2::HitPatternCDC+; // checksum=0x8d86d89e, version=-1
22#pragma link C++ class Belle2::HitPatternVXD+; // checksum=0x5599d6f5, version=-1
23#pragma link C++ class Belle2::TrackFitResult+; // checksum=0x4852b3c4, version=10
24#pragma link C++ class Belle2::V0+; // checksum=0x192c1942, version=4
25#pragma link C++ class pair<Belle2::TrackFitResult*, Belle2::TrackFitResult*>+; // checksum=0x62cc1b16, version=-1
26#pragma link C++ class pair<Belle2::Track*, Belle2::Track*>+; // checksum=0x43730546, version=-1
27#pragma link C++ class pair<short, short>+; // checksum=0x7069a6e4, version=-1
28#pragma link C++ class Belle2::EventLevelTrackingInfo+; // checksum=0x6360bfbf, version=2
29#pragma link C++ class Belle2::TRGSummary+; // checksum=0x62d98033, version=7
30#pragma link C++ class Belle2::SoftwareTriggerResult+; // checksum=0xe5e47e9, version=5
31#pragma link C++ class Belle2::EventLevelTriggerTimeInfo+; // checksum=0xde8c3c4d, version=1
32
33// ----------------------------------------------------------------------------
34// SoftwareTriggerResult
35// As of version 5, the result consists of a pair of prescaled - non prescaled result, not only a prescaled result.
36// We pad the non-prescaled one with 0, which is equal to "no result".
37#pragma read sourceClass="Belle2::SoftwareTriggerResult" version="[-4]" \
38 source="std::map<std::string, int> m_results" \
39 targetClass="Belle2::SoftwareTriggerResult" target="m_results" \
40 code="{ \
41 for(const auto& [key, prescaledResult] : onfile.m_results) { \
42 m_results[key] = std::make_pair(prescaledResult, 0); \
43 } \
44 }"
45
46// ----------------------------------------------------------------------------
47// Allow reading PIDLikelihood version <=2 (less particle types, different order)
48//
49// schema evolution rule as described in "Support For Significant Evolutions of the User Data Model In ROOT Files"
50// Ph Canal et al 2010 J. Phys.: Conf. Ser. 219
51#pragma read sourceClass="Belle2::PIDLikelihood" version="[-2]" \
52 source="float m_logl[6][5]" \
53 targetClass="Belle2::PIDLikelihood" target="m_logl" \
54 code="{ \
55 const static int oldToNewIndex[] = {2, 3, 4, 0, 1}; \
56 for (int iDet = 0; iDet < 6; iDet++) { \
57 for (int iPDG = 0; iPDG < 5; iPDG++) { \
58 int newIndex = oldToNewIndex[iPDG]; \
59 m_logl[iDet][newIndex] = onfile.m_logl[iDet][iPDG]; \
60 } \
61 /* use proton likelihood for deuterons. */ \
62 m_logl[iDet][5] = onfile.m_logl[iDet][2]; \
63 }\
64 }"
65
66// ----------------------------------------------------------------------------
67// TrackFitResult evolution
68// As of version 5 the CDC hit pattern was merged into a single variable.
69#pragma read sourceClass="Belle2::TrackFitResult" version="[4]" \
70 source="const uint32_t m_hitPatternCDCInitializer; const uint32_t m_hitPatternCDCInitializer_part2" \
71 targetClass="Belle2::TrackFitResult" target="m_hitPatternCDCInitializer" \
72 code="{ \
73 m_hitPatternCDCInitializer = ((long long int) onfile.m_hitPatternCDCInitializer_part2 << 32) | onfile.m_hitPatternCDCInitializer; \
74 }"
75
76// As of version 6 the data is no longer kept in vectors, but in fixed-size arrays.
77#pragma read sourceClass="Belle2::TrackFitResult" version="[-5]" \
78 source="std::vector<float> m_tau" \
79 targetClass="Belle2::TrackFitResult" target="m_tau" \
80 code = "{ \
81 memset(m_tau, 0, 5*sizeof(Double32_t)); \
82 for (size_t i = 0; i < std::min(onfile.m_tau.size(), (size_t)5); ++i) \
83 m_tau[i] = onfile.m_tau[i]; \
84 }"
85#pragma read sourceClass="Belle2::TrackFitResult" version="[-5]" \
86 source="std::vector<float> m_cov5" \
87 targetClass="Belle2::TrackFitResult" target="m_cov5" \
88 code = "{ \
89 memset(m_cov5, 0, 15*sizeof(Double32_t)); \
90 for (size_t i = 0; i < std::min(onfile.m_cov5.size(), (size_t)15); ++i) \
91 m_cov5[i] = onfile.m_cov5[i]; \
92 }"
93
94#pragma read sourceClass="Belle2::TrackFitResult" version="[6]" \
95 source="Double32_t m_cov5[15]; Double32_t m_tau[5];" \
96 targetClass="Belle2::TrackFitResult" \
97 target="m_cov5" \
98 include="TMath.h,TMatrixD.h,TMatrixDSym.h" \
99 code="{ \
100 /* Translate the false covariance matrix back to the 6x6 matrix */ \
101 TMatrixDSym oldCov5(5); \
102 { \
103 unsigned int counter = 0; \
104 for (unsigned int i = 0; i < 5; ++i) { \
105 for (unsigned int j = i; j < 5; ++j) { \
106 oldCov5(i, j) = oldCov5(j, i) = onfile.m_cov5[counter]; \
107 ++counter; \
108 } \
109 } \
110 } \
111 \
112 const double bZ = 1.5; \
113 const int iX = 0; \
114 const int iY = 1; \
115 const int iZ = 2; \
116 const int iPx = 3; \
117 const int iPy = 4; \
118 const int iPz = 5; \
119 \
120 const int iD0 = 0; \
121 const int iPhi0 = 1; \
122 const int iOmega = 2; \
123 const int iZ0 = 3; \
124 const int iTanLambda = 4; \
125 \
126 /* Transform covariance matrix */ \
127 TMatrixD jacobianInflate(6, 5); \
128 jacobianInflate.Zero(); \
129 \
130 const double d0 = onfile.m_tau[0]; \
131 const double omega = onfile.m_tau[2]; \
132 const double tanLambda = onfile.m_tau[4]; \
133 const Belle2::Helix helix(d0,0, omega, 0, tanLambda); \
134 const ROOT::Math::XYZVector position = helix.getPerigee(); \
135 /* Attention! Using a hardcoded 1.5 here. */ \
136 const ROOT::Math::XYZVector momentum = helix.getMomentum(bZ); \
137 const int charge = helix.getChargeSign(); \
138 \
139 const double alpha = 1.0 / (bZ * TMath::C()) * 1E11; \
140 const double absAlphaOmega = alpha * std::fabs(omega); \
141 const double signedAlphaOmega2 = absAlphaOmega * omega; \
142 \
143 const double invAbsAlphaOmega = 1.0 / absAlphaOmega; \
144 const double invSignedAlphaOmega2 = 1.0 / signedAlphaOmega2; \
145 \
146 /* Undo the false translation back to the position and momentum uncertainties*/ \
147 jacobianInflate(iX, iPhi0) = d0; \
148 jacobianInflate(iY, iD0) = charge; \
149 jacobianInflate(iZ, iZ0) = 1.0; \
150 jacobianInflate(iPx, iOmega) = invSignedAlphaOmega2; \
151 jacobianInflate(iPy, iPhi0) = invAbsAlphaOmega; \
152 jacobianInflate(iPz, iOmega) = tanLambda * invSignedAlphaOmega2; \
153 jacobianInflate(iPz, iTanLambda) = invAbsAlphaOmega; \
154 \
155 TMatrixDSym cov6 = oldCov5; /* copy */ \
156 cov6.Similarity(jacobianInflate); \
157 \
158 const Belle2::UncertainHelix uncertainHelix(position, momentum, charge, bZ, cov6, 0.0); \
159 \
160 /* Upper half of the covariance matrix goes into m_cov5. */ \
161 const TMatrixDSym& newCov5 = uncertainHelix.getCovariance(); \
162 memset(m_cov5, 0, 15*sizeof(Double32_t)); \
163 unsigned int counter = 0; \
164 for (unsigned int i = 0; i < 5; ++i) { \
165 for (unsigned int j = i; j < 5; ++j) { \
166 m_cov5[counter++] = newCov5(i, j); \
167 } \
168 } \
169 }"
170
171#pragma read sourceClass="Belle2::TrackFitResult" version="[-7]" \
172 source="" \
173 targetClass="Belle2::TrackFitResult" target="m_NDF100" \
174 code="{m_NDF100 = 0xFFFF;}"
175
176#pragma read sourceClass="Belle2::TrackFitResult" version="[8-9]" \
177 source="uint16_t m_NDF" \
178 targetClass="Belle2::TrackFitResult" target="m_NDF100" \
179 code="{m_NDF100 = onfile.m_NDF*100;}"
180
181#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
182 source="float m_Energy" \
183 targetClass="Belle2::ECLCluster" target="m_logEnergy" \
184 code="{if(onfile.m_Energy>0.0) m_logEnergy = log(onfile.m_Energy); \
185 else m_logEnergy = -5.;}"
186
187#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
188 source="float m_HighestE" \
189 targetClass="Belle2::ECLCluster" target="m_logEnergyHighestCrystal" \
190 code="{if(onfile.m_HighestE>0.0) m_logEnergyHighestCrystal = log(onfile.m_HighestE); \
191 else m_logEnergyHighestCrystal = -5.;}"
192
193#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
194 source="float m_EnedepSum" \
195 targetClass="Belle2::ECLCluster" target="m_logEnergyRaw" \
196 code="{if(onfile.m_EnedepSum>0.0) m_logEnergyRaw = log(onfile.m_EnedepSum); \
197 else m_logEnergyRaw = -5.;}"
198
199#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
200 source="float m_Theta" \
201 targetClass="Belle2::ECLCluster" target="m_theta" \
202 code="{m_theta = onfile.m_Theta;}"
203
204#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
205 source="float m_Phi" \
206 targetClass="Belle2::ECLCluster" target="m_phi" \
207 code="{m_phi = onfile.m_Phi;}"
208
209#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
210 source="float m_R" \
211 targetClass="Belle2::ECLCluster" target="m_r" \
212 code="{m_r = onfile.m_R;}"
213
214#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
215 source="float m_Timing" \
216 targetClass="Belle2::ECLCluster" target="m_time" \
217 code="{m_time = onfile.m_Timing;}"
218
219#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
220 source="float m_ErrorTiming" \
221 targetClass="Belle2::ECLCluster" target="m_deltaTime99" \
222 code="{m_deltaTime99 = onfile.m_ErrorTiming;}"
223
224#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
225 source="float m_E9oE25" \
226 targetClass="Belle2::ECLCluster" target="m_E9oE21" \
227 code="{m_E9oE21 = onfile.m_E9oE25;}"
228
229#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
230 source="int m_NofCrystals" \
231 targetClass="Belle2::ECLCluster" target="m_numberOfCrystals" \
232 code="{m_numberOfCrystals = (double) onfile.m_NofCrystals;}"
233
234#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
235 source="int m_CrystHealth" \
236 targetClass="Belle2::ECLCluster" target="m_status" \
237 code="{m_status = onfile.m_CrystHealth;}"
238
239#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
240 source="float m_Error[6]" \
241 targetClass="Belle2::ECLCluster" target="m_sqrtcovmat_00" \
242 code="{m_sqrtcovmat_00 = onfile.m_Error[0];}"
243
244#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
245 source="float m_Error[6]" \
246 targetClass="Belle2::ECLCluster" target="m_sqrtcovmat_11" \
247 code="{m_sqrtcovmat_11 = onfile.m_Error[2];}"
248
249#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
250 source="float m_Error[6]" \
251 targetClass="Belle2::ECLCluster" target="m_sqrtcovmat_22" \
252 code="{m_sqrtcovmat_22 = onfile.m_Error[5];}"
253
254#pragma read sourceClass="Belle2::ECLCluster" version="[-12]" \
255 source="int m_hypothesisId" \
256 targetClass="Belle2::ECLCluster" target="m_hypotheses" \
257 code="{ if(onfile.m_hypothesisId == 5) m_hypotheses = static_cast<unsigned short>(Belle2::ECLCluster::EHypothesisBit::c_nPhotons); \
258 else if(onfile.m_hypothesisId == 6) m_hypotheses = static_cast<unsigned short>(Belle2::ECLCluster::EHypothesisBit::c_neutralHadron); \
259 else m_hypotheses = 0;}"
260
261#pragma read sourceClass="Belle2::V0" version="[-3]" \
262 source="" \
263 targetClass="Belle2::V0" target="m_fittedVertexX" \
264 code="{m_fittedVertexX = 0;}"
265
266#pragma read sourceClass="Belle2::V0" version="[-3]" \
267 source="" \
268 targetClass="Belle2::V0" target="m_fittedVertexY" \
269 code="{m_fittedVertexY = 0;}"
270
271#pragma read sourceClass="Belle2::V0" version="[-3]" \
272 source="" \
273 targetClass="Belle2::V0" target="m_fittedVertexZ" \
274 code="{m_fittedVertexZ = 0;}"
275
276
277#endif