146#ifdef ALIGNMENT_USING_BHABHA
155 for (
const auto& cluster : eclClusters) {
156 if (!cluster.isNeutral())
continue;
157 if (cluster.getHypothesisId() != 5 && cluster.getHypothesisId() != 1)
159 if (cluster.getEnergy() > 0.1) E_tot += cluster.getEnergy();
167 const Track* mdstTrack = NULL;
180 m_arich.evt = evtMetaData->getEvent();
181 m_arich.run = evtMetaData->getRun();
182 m_arich.exp = evtMetaData->getExperiment();
185 if (arichTrack.hitsWindow()) {
186 m_arich.winHit[0] = arichTrack.windowHitPosition().X();
187 m_arich.winHit[1] = arichTrack.windowHitPosition().Y();
190 if (lkh->getFlag() == 1)
m_arich.inAcc = 1;
205 m_arich.detPhot = lkh->getDetPhot();
207#ifdef ALIGNMENT_USING_BHABHA
215 m_arich.trgtype = arichInfo.gettrgtype();
224 ROOT::Math::XYZVector trkPos = fitResult->
getPosition();
229#ifdef ALIGNMENT_USING_BHABHA
230 ROOT::Math::XYZVector trkMom = fitResult->
getMomentum();
239 int fromARICHMCP = 0;
240 particle = mdstTrack->getRelated<
MCParticle>();
241 if (!particle) { particle = mdstTrack->getRelated<
MCParticle>(
"arichMCParticles"); fromARICHMCP = 1;}
243 m_arich.PDG = particle->getPDG();
245 m_arich.seen = particle->hasSeenInDetector(Const::ARICH);
246 ROOT::Math::XYZVector prodVertex = particle->getProductionVertex();
247 m_arich.rhoProd = prodVertex.Rho();
248 m_arich.zProd = prodVertex.Z();
249 m_arich.phiProd = prodVertex.Phi();
250 ROOT::Math::XYZVector decVertex = particle->getDecayVertex();
251 m_arich.rhoDec = decVertex.Rho();
253 m_arich.phiDec = decVertex.Phi();
258 std::vector<Belle2::MCParticle*> daughs = particle->getDaughters();
259 for (
const auto daugh : daughs) {
260 if (daugh == NULL)
continue;
261 if (daugh->getPDG() == particle->getPDG())
m_arich.scatter = 1;
269 const std::vector<ARICHPhoton>& photons = arichTrack.getPhotons();
271 for (
auto it = photons.begin(); it != photons.end(); ++it) {
273 if (iph.
getHitID() < arichHits.getEntries()) {
274 auto ihit = *arichHits[iph.
getHitID()];
275 int module = ihit.getModule();
276 int channel = ihit.getChannel();
277 int chid = 1 << 16 |
module << 8 | channel;
280 m_arich.photons.push_back(iph);
283 ROOT::Math::XYZVector recPos = arichTrack.getPosition();
288 ROOT::Math::XYZVector recMom = arichTrack.getDirection() * arichTrack.getMomentum();
290 m_arich.recHit.theta = recMom.Theta();
291 m_arich.recHit.phi = recMom.Phi();
294 ROOT::Math::XYZVector truePos = aeroHit->getPosition();
299 ROOT::Math::XYZVector trueMom = aeroHit->getMomentum();
301 m_arich.mcHit.theta = trueMom.Theta();
302 m_arich.mcHit.phi = trueMom.Phi();
304 m_arich.mcHit.PDG = aeroHit->getPDG();
310 m_arich.PDG = particle->getPDG();
314 m_arich.seen = particle->hasSeenInDetector(Const::ARICH);
315 ROOT::Math::XYZVector prodVertex = particle->getProductionVertex();
316 m_arich.rhoProd = prodVertex.Rho();
317 m_arich.zProd = prodVertex.Z();
318 m_arich.phiProd = prodVertex.Phi();
319 ROOT::Math::XYZVector decVertex = particle->getDecayVertex();
320 m_arich.rhoDec = decVertex.Rho();
322 m_arich.phiDec = decVertex.Phi();
324 std::vector<Belle2::MCParticle*> daughs = particle->getDaughters();
325 for (
const auto daugh : daughs) {
326 if (daugh->getPDG() == particle->getPDG())
m_arich.scatter = 1;
A Class to store the Monte Carlo particle information.
@ c_PrimaryParticle
bit 0: Particle is primary particle.
int getPDG() const
Return PDG code of particle.