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" \
99 /* Translate the false covariance matrix back to the 6x6 matrix */ \
100 TMatrixDSym oldCov5(5); \
102 unsigned int counter = 0; \
103 for (unsigned int i = 0; i < 5; ++i) { \
104 for (unsigned int j = i; j < 5; ++j) { \
105 oldCov5(i, j) = oldCov5(j, i) = onfile.m_cov5[counter]; \
111 const double bZ = 1.5; \
120 const int iPhi0 = 1; \
121 const int iOmega = 2; \
123 const int iTanLambda = 4; \
125 /* Transform covariance matrix */ \
126 TMatrixD jacobianInflate(6, 5); \
127 jacobianInflate.Zero(); \
129 const double d0 = onfile.m_tau[0]; \
130 const double omega = onfile.m_tau[2]; \
131 const double tanLambda = onfile.m_tau[4]; \
132 const Belle2::Helix helix(d0,0, omega, 0, tanLambda); \
133 const TVector3 position = helix.getPerigee(); \
134 /* Attention! Using a hardcoded 1.5 here. */ \
135 const TVector3 momentum = helix.getMomentum(bZ); \
136 const int charge = helix.getChargeSign(); \
138 const double alpha = 1.0 / (bZ * TMath::C()) * 1E11; \
139 const double absAlphaOmega = alpha * std::fabs(omega); \
140 const double signedAlphaOmega2 = absAlphaOmega * omega; \
142 const double invAbsAlphaOmega = 1.0 / absAlphaOmega; \
143 const double invSignedAlphaOmega2 = 1.0 / signedAlphaOmega2; \
145 /* Undo the false translation back to the position and momentum uncertainties*/ \
146 jacobianInflate(iX, iPhi0) = d0; \
147 jacobianInflate(iY, iD0) = charge; \
148 jacobianInflate(iZ, iZ0) = 1.0; \
149 jacobianInflate(iPx, iOmega) = invSignedAlphaOmega2; \
150 jacobianInflate(iPy, iPhi0) = invAbsAlphaOmega; \
151 jacobianInflate(iPz, iOmega) = tanLambda * invSignedAlphaOmega2; \
152 jacobianInflate(iPz, iTanLambda) = invAbsAlphaOmega; \
154 TMatrixDSym cov6 = oldCov5; /* copy */ \
155 cov6.Similarity(jacobianInflate); \
157 const Belle2::UncertainHelix uncertainHelix(position, momentum, charge, bZ, cov6, 0.0); \
159 /* Upper half of the covariance matrix goes into m_cov5. */ \
160 const TMatrixDSym& newCov5 = uncertainHelix.getCovariance(); \
161 memset(m_cov5, 0, 15*sizeof(Double32_t)); \
162 unsigned int counter = 0; \
163 for (unsigned int i = 0; i < 5; ++i) { \
164 for (unsigned int j = i; j < 5; ++j) { \
165 m_cov5[counter++] = newCov5(i, j); \
170 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
171 source="float m_Energy" \
172 targetClass="Belle2::ECLCluster" target="m_logEnergy" \
173 code="{if(onfile.m_Energy>0.0) m_logEnergy = log(onfile.m_Energy); \
174 else m_logEnergy = -5.;}"
176 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
177 source="float m_HighestE" \
178 targetClass="Belle2::ECLCluster" target="m_logEnergyHighestCrystal" \
179 code="{if(onfile.m_HighestE>0.0) m_logEnergyHighestCrystal = log(onfile.m_HighestE); \
180 else m_logEnergyHighestCrystal = -5.;}"
182 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
183 source="float m_EnedepSum" \
184 targetClass="Belle2::ECLCluster" target="m_logEnergyRaw" \
185 code="{if(onfile.m_EnedepSum>0.0) m_logEnergyRaw = log(onfile.m_EnedepSum); \
186 else m_logEnergyRaw = -5.;}"
188 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
189 source="float m_Theta" \
190 targetClass="Belle2::ECLCluster" target="m_theta" \
191 code="{m_theta = onfile.m_Theta;}"
193 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
194 source="float m_Phi" \
195 targetClass="Belle2::ECLCluster" target="m_phi" \
196 code="{m_phi = onfile.m_Phi;}"
198 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
200 targetClass="Belle2::ECLCluster" target="m_r" \
201 code="{m_r = onfile.m_R;}"
203 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
204 source="float m_Timing" \
205 targetClass="Belle2::ECLCluster" target="m_time" \
206 code="{m_time = onfile.m_Timing;}"
208 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
209 source="float m_ErrorTiming" \
210 targetClass="Belle2::ECLCluster" target="m_deltaTime99" \
211 code="{m_deltaTime99 = onfile.m_ErrorTiming;}"
213 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
214 source="float m_E9oE25" \
215 targetClass="Belle2::ECLCluster" target="m_E9oE21" \
216 code="{m_E9oE21 = onfile.m_E9oE25;}"
218 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
219 source="int m_NofCrystals" \
220 targetClass="Belle2::ECLCluster" target="m_numberOfCrystals" \
221 code="{m_numberOfCrystals = (double) onfile.m_NofCrystals;}"
223 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
224 source="int m_CrystHealth" \
225 targetClass="Belle2::ECLCluster" target="m_status" \
226 code="{m_status = onfile.m_CrystHealth;}"
228 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
229 source="float m_Error[6]" \
230 targetClass="Belle2::ECLCluster" target="m_sqrtcovmat_00" \
231 code="{m_sqrtcovmat_00 = onfile.m_Error[0];}"
233 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
234 source="float m_Error[6]" \
235 targetClass="Belle2::ECLCluster" target="m_sqrtcovmat_11" \
236 code="{m_sqrtcovmat_11 = onfile.m_Error[2];}"
238 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
239 source="float m_Error[6]" \
240 targetClass="Belle2::ECLCluster" target="m_sqrtcovmat_22" \
241 code="{m_sqrtcovmat_22 = onfile.m_Error[5];}"
243 #pragma read sourceClass="Belle2::ECLCluster" version="[-12]" \
244 source="int m_hypothesisId" \
245 targetClass="Belle2::ECLCluster" target="m_hypotheses" \
246 code="{ if(onfile.m_hypothesisId == 5) m_hypotheses = static_cast<unsigned short>(Belle2::ECLCluster::EHypothesisBit::c_nPhotons); \
247 else if(onfile.m_hypothesisId == 6) m_hypotheses = static_cast<unsigned short>(Belle2::ECLCluster::EHypothesisBit::c_neutralHadron); \
248 else m_hypotheses = 0;}"