[155] | 1 | #ifndef RFGUNDEFINITION_SEEN |
---|
| 2 | #define RFGUNDEFINITION_SEEN |
---|
| 3 | |
---|
| 4 | #include <string> |
---|
| 5 | #include <iostream> |
---|
| 6 | #include <sstream> |
---|
| 7 | |
---|
| 8 | #include "abstractElement.h" |
---|
| 9 | |
---|
| 10 | using namespace std; |
---|
| 11 | |
---|
| 12 | class elementRfgun : public abstractElement |
---|
| 13 | { |
---|
[287] | 14 | |
---|
| 15 | // int nbParam_; |
---|
| 16 | // string* parametersString_; |
---|
| 17 | |
---|
| 18 | double defaultPhaseStep_; |
---|
| 19 | int defaultNmacrop_; |
---|
| 20 | double defaultSigma_t_; |
---|
| 21 | double defaultSigma_r_; |
---|
[304] | 22 | double defaultEmit_x_; |
---|
| 23 | double defaultEmit_y_; |
---|
[287] | 24 | double defaultE_cin_; |
---|
| 25 | double defaultSigma_E_; |
---|
[304] | 26 | double defaultTotalCharge_; |
---|
[287] | 27 | |
---|
| 28 | double phaseStep_; // a recuperer dans les parametres globaux (methode setPhaseStep) |
---|
| 29 | int nmacrop_; |
---|
| 30 | double sigma_t_; // picoseconds |
---|
| 31 | double sigma_r_; // cm |
---|
[304] | 32 | double emit_x_; // pi.mm.mrad |
---|
| 33 | double emit_y_; // pi.mm.mrad |
---|
[287] | 34 | double E_cin_; // MeV |
---|
| 35 | double sigma_E_; // MeV |
---|
[304] | 36 | double totalCharge_; // nC |
---|
[287] | 37 | |
---|
| 38 | void setDefaultValues(); |
---|
| 39 | |
---|
| 40 | void setDefaults(); |
---|
| 41 | |
---|
| 42 | public: |
---|
| 43 | |
---|
| 44 | elementRfgun(); |
---|
| 45 | |
---|
| 46 | ~elementRfgun() {;} |
---|
| 47 | |
---|
| 48 | virtual void setPhaseStep(double ph) { phaseStep_ = ph;} |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | virtual string* getParametersString() const; |
---|
| 52 | |
---|
| 53 | virtual void setParametersString(string* param); |
---|
| 54 | |
---|
| 55 | virtual inline double getInitialKineticEnergy() const {return E_cin_;} |
---|
| 56 | |
---|
[418] | 57 | // virtual string parmelaOutputFlow() const; |
---|
[287] | 58 | |
---|
[418] | 59 | /* virtual string transportOutputFlow() const */ |
---|
| 60 | /* { */ |
---|
| 61 | /* ostringstream sortie; */ |
---|
| 62 | /* cout << " CELL sortie transport non programmee " << endl; */ |
---|
| 63 | /* return sortie.str(); */ |
---|
| 64 | /* } */ |
---|
[287] | 65 | |
---|
[418] | 66 | // virtual string generatorOutputFlow() const; |
---|
[304] | 67 | |
---|
[287] | 68 | virtual string FileOutputFlow() const; |
---|
[418] | 69 | virtual vector< pair<string, vector<string> > > parametersToSoftware () const; |
---|
| 70 | |
---|
[287] | 71 | virtual void FileInput(ifstream& ifs); |
---|
| 72 | |
---|
| 73 | /** return a string with all parameters and value |
---|
| 74 | */ |
---|
| 75 | string print(); |
---|
| 76 | |
---|
| 77 | |
---|
[155] | 78 | }; |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | #endif |
---|