src/objects/MCParticle.hpp
Definition of Monte-Carlo particle object. More…
Namespaces
Name |
---|
allpix Helper class to hold support layers for a detector model. |
Classes
Name | |
---|---|
class | allpix::MCParticle Monte-Carlo particle through the sensor. |
Types
Name | |
---|---|
using Message< MCParticle > | MCParticleMessage Typedef for message carrying MC particles. |
Detailed Description
Definition of Monte-Carlo particle object.
Copyright: Copyright (c) 2017-2024 CERN and the Allpix Squared authors. This software is distributed under the terms of the MIT License, copied verbatim in the file “LICENSE.md”. In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. SPDX-License-Identifier: MIT
Types Documentation
using MCParticleMessage
using allpix::MCParticleMessage = typedef Message<MCParticle>;
Typedef for message carrying MC particles.
Source code
#ifndef ALLPIX_MC_PARTICLE_H
#define ALLPIX_MC_PARTICLE_H
#include <Math/Point3D.h>
#include <TRef.h>
#include "MCTrack.hpp"
#include "Object.hpp"
namespace allpix {
class MCParticle : public Object {
public:
MCParticle(ROOT::Math::XYZPoint local_start_point,
ROOT::Math::XYZPoint global_start_point,
ROOT::Math::XYZPoint local_end_point,
ROOT::Math::XYZPoint global_end_point,
int particle_id,
double local_time,
double global_time);
ROOT::Math::XYZPoint getLocalStartPoint() const;
ROOT::Math::XYZPoint getGlobalStartPoint() const;
ROOT::Math::XYZPoint getLocalEndPoint() const;
ROOT::Math::XYZPoint getGlobalEndPoint() const;
ROOT::Math::XYZPoint getLocalReferencePoint() const;
bool isPrimary() const;
int getParticleID() const;
double getGlobalTime() const;
double getLocalTime() const;
void setTotalEnergyStart(double total_energy);
double getTotalEnergyStart() const;
void setKineticEnergyStart(double kinetic_energy);
double getKineticEnergyStart() const;
void setTotalDepositedCharge(unsigned int total_charge);
unsigned int getTotalDepositedCharge() const;
void setParent(const MCParticle* mc_particle);
const MCParticle* getParent() const;
const MCParticle* getPrimary() const;
void setTrack(const MCTrack* mc_track);
const MCTrack* getTrack() const;
ClassDefOverride(MCParticle, 10); // NOLINT
MCParticle() = default;
void print(std::ostream& out) const override;
void loadHistory() override;
void petrifyHistory() override;
private:
ROOT::Math::XYZPoint local_start_point_{};
ROOT::Math::XYZPoint global_start_point_{};
ROOT::Math::XYZPoint local_end_point_{};
ROOT::Math::XYZPoint global_end_point_{};
int particle_id_{};
double local_time_{};
double global_time_{};
unsigned int deposited_charge_{};
double total_energy_start_{};
double kinetic_energy_start_{};
PointerWrapper<MCParticle> parent_;
PointerWrapper<MCTrack> track_;
};
using MCParticleMessage = Message<MCParticle>;
} // namespace allpix
#endif /* ALLPIX_MC_PARTICLE_H */
Updated on 2025-02-27 at 14:14:46 +0000