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 Belle2::Kink+;
26#pragma link C++ class pair<Belle2::TrackFitResult*, Belle2::TrackFitResult*>+;
27#pragma link C++ class pair<Belle2::Track*, Belle2::Track*>+;
28#pragma link C++ class pair<short, short>+;
29#pragma link C++ class Belle2::EventLevelTrackingInfo+;
30#pragma link C++ class Belle2::TRGSummary+;
31#pragma link C++ class Belle2::SoftwareTriggerResult+;
32#pragma link C++ class Belle2::EventLevelTriggerTimeInfo+;
38#pragma read sourceClass="Belle2::SoftwareTriggerResult" version="[-4]" \
39 source="std::map<std::string, int> m_results" \
40 targetClass="Belle2::SoftwareTriggerResult" target="m_results" \
42 for(const auto& [key, prescaledResult] : onfile.m_results) { \
43 m_results[key] = std::make_pair(prescaledResult, 0); \
52#pragma read sourceClass="Belle2::PIDLikelihood" version="[-2]" \
53 source="float m_logl[6][5]" \
54 targetClass="Belle2::PIDLikelihood" target="m_logl" \
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]; \
62 /* use proton likelihood for deuterons. */ \
63 m_logl[iDet][5] = onfile.m_logl[iDet][2]; \
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" \
74 m_hitPatternCDCInitializer = ((long long int) onfile.m_hitPatternCDCInitializer_part2 << 32) | onfile.m_hitPatternCDCInitializer; \
78#pragma read sourceClass="Belle2::TrackFitResult" version="[-5]" \
79 source="std::vector<float> m_tau" \
80 targetClass="Belle2::TrackFitResult" target="m_tau" \
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]; \
86#pragma read sourceClass="Belle2::TrackFitResult" version="[-5]" \
87 source="std::vector<float> m_cov5" \
88 targetClass="Belle2::TrackFitResult" target="m_cov5" \
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]; \
95#pragma read sourceClass="Belle2::TrackFitResult" version="[6]" \
96 source="Double32_t m_cov5[15]; Double32_t m_tau[5];" \
97 targetClass="Belle2::TrackFitResult" \
99 include="TMath.h,TMatrixD.h,TMatrixDSym.h" \
101 /* Translate the false covariance matrix back to the 6x6 matrix */ \
102 TMatrixDSym oldCov5(5); \
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]; \
113 const double bZ = 1.5; \
122 const int iPhi0 = 1; \
123 const int iOmega = 2; \
125 const int iTanLambda = 4; \
127 /* Transform covariance matrix */ \
128 TMatrixD jacobianInflate(6, 5); \
129 jacobianInflate.Zero(); \
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(); \
140 const double alpha = 1.0 / (bZ * TMath::C()) * 1E11; \
141 const double absAlphaOmega = alpha * std::fabs(omega); \
142 const double signedAlphaOmega2 = absAlphaOmega * omega; \
144 const double invAbsAlphaOmega = 1.0 / absAlphaOmega; \
145 const double invSignedAlphaOmega2 = 1.0 / signedAlphaOmega2; \
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; \
156 TMatrixDSym cov6 = oldCov5; /* copy */ \
157 cov6.Similarity(jacobianInflate); \
159 const Belle2::UncertainHelix uncertainHelix(position, momentum, charge, bZ, cov6, 0.0); \
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); \
172#pragma read sourceClass="Belle2::TrackFitResult" version="[-7]" \
174 targetClass="Belle2::TrackFitResult" target="m_NDF100" \
175 code="{m_NDF100 = 0xFFFF;}"
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;}"
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.;}"
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.;}"
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.;}"
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;}"
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;}"
210#pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
212 targetClass="Belle2::ECLCluster" target="m_r" \
213 code="{m_r = onfile.m_R;}"
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;}"
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;}"
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;}"
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;}"
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;}"
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];}"
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];}"
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];}"
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;}"
262#pragma read sourceClass="Belle2::V0" version="[-3]" \
264 targetClass="Belle2::V0" target="m_fittedVertexX" \
265 code="{m_fittedVertexX = 0;}"
267#pragma read sourceClass="Belle2::V0" version="[-3]" \
269 targetClass="Belle2::V0" target="m_fittedVertexY" \
270 code="{m_fittedVertexY = 0;}"
272#pragma read sourceClass="Belle2::V0" version="[-3]" \
274 targetClass="Belle2::V0" target="m_fittedVertexZ" \
275 code="{m_fittedVertexZ = 0;}"