Commit 4e4558bb authored by Simon Spannagel's avatar Simon Spannagel
Browse files

MCTrack: also store start and end time on global coordinates

parent e47f6a0f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -43,6 +43,14 @@ int MCTrack::getParticleID() const {
    return particle_id_;
}

double MCTrack::getGlobalStartTime() const {
    return global_start_time_;
}

double MCTrack::getGlobalEndTime() const {
    return global_end_time_;
}

int MCTrack::getCreationProcessType() const {
    return origin_g4_process_type_;
}
+16 −1
Original line number Diff line number Diff line
@@ -59,6 +59,18 @@ namespace allpix {
         */
        ROOT::Math::XYZPoint getEndPoint() const;

        /**
         * @brief Get the time of first appearance of this track
         * @return Time of appearance of this track in the global reference system
         */
        double getGlobalStartTime() const;

        /**
         * @brief Get the time of last appearance of this track
         * @return Time of disappearance of this track in the global reference system
         */
        double getGlobalEndTime() const;

        /**
         * @brief Get PDG particle id for the particle
         * @return Particle id
@@ -131,7 +143,7 @@ namespace allpix {
        /**
         * @brief ROOT class definition
         */
        ClassDefOverride(MCTrack, 4); // NOLINT
        ClassDefOverride(MCTrack, 5); // NOLINT
        /**
         * @brief Default constructor for ROOT I/O
         */
@@ -150,6 +162,9 @@ namespace allpix {
        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_{};