Changes to Interaction Processor, making possible to add infinite Interactions for all kind of Particles
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// interaction_base.h
|
||||
// mc_electron
|
||||
//
|
||||
// Created by Christian Reiling on 24.04.19.
|
||||
// Copyright © 2019 Christian Reiling. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef interaction_base_hpp
|
||||
#define interaction_base_hpp
|
||||
|
||||
#include "functions.hpp"
|
||||
#include "particle.hpp"
|
||||
#include "katrin.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
class InteractionOut {
|
||||
bool deleteCur;
|
||||
deque <Particle> newParticles;
|
||||
|
||||
public:
|
||||
InteractionOut() {reset();};
|
||||
|
||||
void reset() {
|
||||
deleteCur = false;
|
||||
newParticles.empty();
|
||||
}
|
||||
|
||||
void set_deleteCur(const bool &deleteCur) {this->deleteCur = deleteCur;}
|
||||
void set_newParticles(const deque<Particle> &newParticles) {this->newParticles = newParticles;}
|
||||
void add_newParticle(const Particle &newParticle) {newParticles.push_back(newParticle);}
|
||||
|
||||
bool get_deleteCur() const {return(deleteCur);};
|
||||
deque<Particle> get_newParticles() const {return(newParticles);};
|
||||
};
|
||||
|
||||
|
||||
class Interaction : public RNG_Base {
|
||||
protected:
|
||||
Katrin *Kat;
|
||||
|
||||
public:
|
||||
Interaction(Katrin *Kat, UniRNG *rngUni, NormalRNG *rngNormal) : RNG_Base(rngUni, rngNormal) {
|
||||
this->Kat = Kat;
|
||||
};
|
||||
|
||||
virtual species get_Species() const = 0;
|
||||
|
||||
virtual double get_macroSigma_m2(const Particle &interPart) const = 0;
|
||||
virtual InteractionOut do_Interaction (Particle *interPart) const = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif /* interaction_base_h */
|
||||
Reference in New Issue
Block a user