Files
csendlinger 46277ae340 Added new deletion logger type to count elastic
scattering events that upscatter the neutral
particle by an energy of 5mK*k_B (for now hard-coded);
Type is only used if DeletionLogger is se=pecified as
"all" in the parameter file
2026-06-09 09:20:55 +02:00

53 lines
1.3 KiB
C++
Executable File

#ifndef LOGGER_H
#define LOGGER_H
#include <map>
#include <vector>
#include "simulation/particle.h"
// to count numerical particle deletions
enum class DeletionType {
wall,
recombination,
max_interactions,
max_time_alive,
cluster_formation
};
// to count physical particle deletion
enum class PhysicalDeletionType {
wall,
large_energy_transfer
};
class Coordinate;
class DeletionLogger {
public:
DeletionLogger(std::vector<DeletionType> used_types,
std::vector<PhysicalDeletionType> used_phys_types);
// why a coordinate as a parameter -> not used in implementation
virtual void logDeletion(const Coordinate& coordinate, DeletionType type);
virtual void logDeletion(const particle::Particle& particle,
PhysicalDeletionType type);
std::map<DeletionType, long int> numDeletions() const;
std::map<PhysicalDeletionType, double> numPhysDeletions() const;
void numDeletions(long int new_value, DeletionType type);
long int numDeletions(DeletionType type) const;
void resetDeletionLogger();
friend class CpuSynchronizer;
private:
std::map<DeletionType, long int> num_deletions;
// std::map<DeletionType, long int> sync_num_deletions;
std::map<PhysicalDeletionType, double> num_phys_deletions;
// std::map<PhysicalDeletionType, double> sync_num_phys_deletions;
};
#endif /* LOGGER_H */