Belle II Software  release-06-01-15
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=0x9b632f9, version=1
19 
20 #pragma link C++ class Belle2::Track+; // checksum=0x320e0cd9, version=4
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=0x4a60bf60, version=8
24 #pragma link C++ class Belle2::V0+; // checksum=0xeecaa9c4, version=3
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  code="{ \
99  /* Translate the false covariance matrix back to the 6x6 matrix */ \
100  TMatrixDSym oldCov5(5); \
101  { \
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]; \
106  ++counter; \
107  } \
108  } \
109  } \
110  \
111  const double bZ = 1.5; \
112  const int iX = 0; \
113  const int iY = 1; \
114  const int iZ = 2; \
115  const int iPx = 3; \
116  const int iPy = 4; \
117  const int iPz = 5; \
118  \
119  const int iD0 = 0; \
120  const int iPhi0 = 1; \
121  const int iOmega = 2; \
122  const int iZ0 = 3; \
123  const int iTanLambda = 4; \
124  \
125  /* Transform covariance matrix */ \
126  TMatrixD jacobianInflate(6, 5); \
127  jacobianInflate.Zero(); \
128  \
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(); \
137  \
138  const double alpha = 1.0 / (bZ * TMath::C()) * 1E11; \
139  const double absAlphaOmega = alpha * std::fabs(omega); \
140  const double signedAlphaOmega2 = absAlphaOmega * omega; \
141  \
142  const double invAbsAlphaOmega = 1.0 / absAlphaOmega; \
143  const double invSignedAlphaOmega2 = 1.0 / signedAlphaOmega2; \
144  \
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; \
153  \
154  TMatrixDSym cov6 = oldCov5; /* copy */ \
155  cov6.Similarity(jacobianInflate); \
156  \
157  const Belle2::UncertainHelix uncertainHelix(position, momentum, charge, bZ, cov6, 0.0); \
158  \
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); \
166  } \
167  } \
168  }"
169 
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.;}"
175 
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.;}"
181 
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.;}"
187 
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;}"
192 
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;}"
197 
198 #pragma read sourceClass="Belle2::ECLCluster" version="[-3]" \
199  source="float m_R" \
200  targetClass="Belle2::ECLCluster" target="m_r" \
201  code="{m_r = onfile.m_R;}"
202 
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;}"
207 
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;}"
212 
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;}"
217 
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;}"
222 
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;}"
227 
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];}"
232 
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];}"
237 
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];}"
242 
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;}"
249 
250 
251 #endif