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