3 #pragma link off all globals;
4 #pragma link off all classes;
5 #pragma link off all functions;
6 #pragma link C++ nestedclasses;
8 #pragma link C++ class Belle2::Cluster+;
10 #pragma link C++ class Belle2::MCParticle+;
11 #pragma link C++ class vector<Belle2::MCParticle*>+;
12 #pragma link C++ class Belle2::PIDLikelihood+;
13 #pragma link C++ class Belle2::ECLCluster+;
15 #pragma link C++ class Belle2::KLMCluster+;
16 #pragma link C++ class Belle2::KlId+;
18 #pragma link C++ class Belle2::EventLevelClusteringInfo+;
20 #pragma link C++ class Belle2::Track+;
21 #pragma link C++ class Belle2::HitPatternCDC+;
22 #pragma link C++ class Belle2::HitPatternVXD+;
23 #pragma link C++ class Belle2::TrackFitResult+;
24 #pragma link C++ class Belle2::V0+;
25 #pragma link C++ class pair<Belle2::TrackFitResult*, Belle2::TrackFitResult*>+;
26 #pragma link C++ class pair<Belle2::Track*, Belle2::Track*>+;
27 #pragma link C++ class pair<short, short>+;
28 #pragma link C++ class Belle2::EventLevelTrackingInfo+;
29 #pragma link C++ class Belle2::TRGSummary+;
30 #pragma link C++ class Belle2::SoftwareTriggerResult+;
31 #pragma link C++ class Belle2::EventLevelTriggerTimeInfo+;
37 #pragma read sourceClass="Belle2::SoftwareTriggerResult" version="[-4]" \
38 source="std::map<std::string, int> m_results" \
39 targetClass="Belle2::SoftwareTriggerResult" target="m_results" \
41 for(const auto& [key, prescaledResult] : onfile.m_results) { \
42 m_results[key] = std::make_pair(prescaledResult, 0); \
51 #pragma read sourceClass="Belle2::PIDLikelihood" version="[-2]" \
52 source="float m_logl[6][5]" \
53 targetClass="Belle2::PIDLikelihood" target="m_logl" \
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]; \
61 /* use proton likelihood for deuterons. */ \
62 m_logl[iDet][5] = onfile.m_logl[iDet][2]; \
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" \
73 m_hitPatternCDCInitializer = ((long long int) onfile.m_hitPatternCDCInitializer_part2 << 32) | onfile.m_hitPatternCDCInitializer; \
77 #pragma read sourceClass="Belle2::TrackFitResult" version="[-5]" \
78 source="std::vector<float> m_tau" \
79 targetClass="Belle2::TrackFitResult" target="m_tau" \
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]; \
85 #pragma read sourceClass="Belle2::TrackFitResult" version="[-5]" \
86 source="std::vector<float> m_cov5" \
87 targetClass="Belle2::TrackFitResult" target="m_cov5" \
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]; \
94 #pragma read sourceClass="Belle2::TrackFitResult" version="[6]" \
95 source="Double32_t m_cov5[15]; Double32_t m_tau[5];" \
96 targetClass="Belle2::TrackFitResult" \
98 include="TMath.h,TMatrixD.h,TMatrixDSym.h" \
100 /* Translate the false covariance matrix back to the 6x6 matrix */ \
101 TMatrixDSym oldCov5(5); \
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]; \
112 const double bZ = 1.5; \
121 const int iPhi0 = 1; \
122 const int iOmega = 2; \
124 const int iTanLambda = 4; \
126 /* Transform covariance matrix */ \
127 TMatrixD jacobianInflate(6, 5); \
128 jacobianInflate.Zero(); \
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(); \
139 const double alpha = 1.0 / (bZ * TMath::C()) * 1E11; \
140 const double absAlphaOmega = alpha * std::fabs(omega); \
141 const double signedAlphaOmega2 = absAlphaOmega * omega; \
143 const double invAbsAlphaOmega = 1.0 / absAlphaOmega; \
144 const double invSignedAlphaOmega2 = 1.0 / signedAlphaOmega2; \
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; \
155 TMatrixDSym cov6 = oldCov5; /* copy */ \
156 cov6.Similarity(jacobianInflate); \
158 const Belle2::UncertainHelix uncertainHelix(position, momentum, charge, bZ, cov6, 0.0); \
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); \
171 #pragma read sourceClass="Belle2::TrackFitResult" version="[-7]" \
173 targetClass="Belle2::TrackFitResult" target="m_NDF100" \
174 code="{m_NDF100 = 0xFFFF;}"
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;}"
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.;}"
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.;}"
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.;}"
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;}"
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;}"
209 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
211 targetClass="Belle2::ECLCluster" target="m_r" \
212 code="{m_r = onfile.m_R;}"
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;}"
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;}"
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;}"
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;}"
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;}"
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];}"
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];}"
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];}"
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;}"
261 #pragma read sourceClass="Belle2::V0" version="[-3]" \
263 targetClass="Belle2::V0" target="m_fittedVertexX" \
264 code="{m_fittedVertexX = 0;}"
266 #pragma read sourceClass="Belle2::V0" version="[-3]" \
268 targetClass="Belle2::V0" target="m_fittedVertexY" \
269 code="{m_fittedVertexY = 0;}"
271 #pragma read sourceClass="Belle2::V0" version="[-3]" \
273 targetClass="Belle2::V0" target="m_fittedVertexZ" \
274 code="{m_fittedVertexZ = 0;}"