src/objects/MCTrack.hpp

Definition of Monte-Carlo track object. More…

Namespaces

Name
allpix
Helper class to hold support layers for a detector model.

Classes

Name
class allpix::MCTrack
Monte-Carlo track through the world.

Types

Name
using Message< MCTrack > MCTrackMessage
Typedef for message carrying MC tracks.

Detailed Description

Definition of Monte-Carlo track object.

Copyright: Copyright (c) 2018-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 MCTrackMessage

using allpix::MCTrackMessage = typedef Message<MCTrack>;

Typedef for message carrying MC tracks.

Source code


#ifndef ALLPIX_MC_TRACK_H
#define ALLPIX_MC_TRACK_H

#include <Math/Point3D.h>
#include <TRef.h>

#include "Object.hpp"

namespace allpix {
    class MCTrack : public Object {
    public:
        MCTrack(ROOT::Math::XYZPoint start_point,
                ROOT::Math::XYZPoint end_point,
                std::string g4_volume_start,
                std::string g4_volume_end,
                std::string g4_prod_process_name,
                int g4_prod_process_type,
                int particle_id,
                double start_time,
                double end_time,
                double initial_kin_E,
                double final_kin_E,
                double initial_tot_E,
                double final_tot_E);

        ROOT::Math::XYZPoint getStartPoint() const;

        ROOT::Math::XYZPoint getEndPoint() const;

        double getGlobalStartTime() const;

        double getGlobalEndTime() const;

        int getParticleID() const;

        int getCreationProcessType() const;

        double getKineticEnergyInitial() const;
        double getTotalEnergyInitial() const;

        double getKineticEnergyFinal() const;

        double getTotalEnergyFinal() const;

        std::string getOriginatingVolumeName() const;

        std::string getTerminatingVolumeName() const;

        std::string getCreationProcessName() const;

        const MCTrack* getParent() const;

        void setParent(const MCTrack* mc_track);

        void print(std::ostream& out) const override;

        ClassDefOverride(MCTrack, 6); // NOLINT
        MCTrack() = default;

        void loadHistory() override;
        void petrifyHistory() override;

    private:
        ROOT::Math::XYZPoint start_point_{};
        ROOT::Math::XYZPoint end_point_{};

        std::string start_g4_vol_name_{};
        std::string end_g4_vol_name_{};
        std::string origin_g4_process_name_{};

        int origin_g4_process_type_{};
        int particle_id_{};

        double global_start_time_{};
        double global_end_time_{};

        double initial_kin_E_{};
        double final_kin_E_{};
        double initial_tot_E_{};
        double final_tot_E_{};

        PointerWrapper<MCTrack> parent_;
    };

    using MCTrackMessage = Message<MCTrack>;
} // namespace allpix

#endif /* ALLPIX_MC_TRACK_H */

Updated on 2024-12-13 at 08:31:37 +0000