Program Listing for File CandidateSplitting.h

Return to documentation for file (include/crpropa/module/CandidateSplitting.h)

#ifndef CRPROPA_CANDIDATEPLITTING_H
#define CRPROPA_CANDIDATEPLITTING_H

#include <string>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <sstream>

#include "crpropa/Vector3.h"
#include "crpropa/Module.h"
#include "crpropa/Units.h"
#include "kiss/logger.h"


namespace crpropa {
class CandidateSplitting: public Module {
private:
        double nSplit;
        double minWeight;
        std::vector<double> Ebins;

public:

        CandidateSplitting();

        CandidateSplitting(int nSplit, double Emin, double Emax, double nBins, double minWeight, bool log = false);

        CandidateSplitting(double spectralIndex, double Emin, int nBins);

        void process(Candidate *c) const;

        void setEnergyBins(double Emin, double Emax, double nBins, bool log);

        void setEnergyBinsDSA(double Emin, double dE, int n);

        void setNsplit(int n);

        void setMinimalWeight(double w);

        int getNsplit() const;

        double getMinimalWeight() const;

        const std::vector<double>& getEnergyBins() const;

};
} // namespace crpropa
#endif // CRPROPA_CANDIDATESPLITTING_H