ARTEMIS-CRIB
 
Loading...
Searching...
No Matches
TNBodyReactionProcessor.h
Go to the documentation of this file.
1/**
2 * @file TNBodyReactionProcessor.h
3 * @brief
4 * @author Kodai Okawa <okawa@cns.s.u-tokyo.ac.jp>
5 * @date 2023-08-01 13:11:23
6 * @note last modified: 2025-01-08 10:35:04
7 * @details
8 */
9
10#ifndef _CRIB_TNBODYREACTIONPROCESSOR_H_
11#define _CRIB_TNBODYREACTIONPROCESSOR_H_
12
13#include <TGenPhaseSpace.h>
14#include <TGraph.h>
15#include <TProcessor.h>
16#include <TSrim.h> // TSrim library
17
18namespace art::crib {
19class TNBodyReactionProcessor;
20} // namespace art::crib
21
22class TClonesArray;
23
25 public:
27 ~TNBodyReactionProcessor() override;
28
29 void Init(TEventCollection *col) override;
30 void Process() override;
31
32 protected:
36 TClonesArray **fInData; //!
37 TClonesArray *fOutData; //!
38 TClonesArray *fOutReacData; //!
39
40 /// @brief used only initialization at TSrim object
41 IntVec_t fBeamNucleus;
42 Double_t fBeamEnergy;
43
45 TString fTargetName;
50
51 Int_t fDecayNum;
52 IntVec_t fReacMassNum;
53 IntVec_t fReacAtmNum;
54 DoubleVec_t fExciteLevel;
55 TString fCSDataPath;
56 Int_t fCSType;
57
58 TGenPhaseSpace event;
59
60 TSrim *srim; /// SRIM table
61
62 const Double_t deg2rad = TMath::DegToRad();
63 const Double_t c = 299.792458; // mm/ns
64
65 private:
66 //! 1. cross section function: (x, y) = (beam LAB energy (MeV), arbitrary unit)
67 //! 2. convert x using range: (x, y) = (range (mm), arbitrary unit)
68 //! 3. integrate the 2. function: (x, y) = (range (mm), arbitrary unit)
69 //! 4. inversed 3. function: (x, y) = (arbitrary unit, range (mm))
70 //! 5. get pos with random number: uniform X -> get Y value
71 //! 6. get reac pos with the Y value: init_range - Y => distance
72 TGraph *gr_generating_func; //! 3. function
73 TGraph *gr_generating_func_inv; //! 4. function
74 void InitGeneratingFunc(void); //! read from data file and set 3. 4. functions
75
76 /**
77 * @fn random generator
78 * From beam range and target thickness, get random beam energy just before reaction
79 * and distance from target window (for gas target)
80 * @param (range) range of the beam
81 * @return distance of the beam travel before the reaction
82 */
83 Double_t GetRandomReactionDistance(Double_t range);
84
85 TLorentzVector GetLossEnergyVector(TLorentzVector vec, Double_t eloss);
86
89
90 ClassDefOverride(TNBodyReactionProcessor, 1)
91};
92
93#endif // end of #ifndef _TNBODYREACTIONPROCESSOR_H_
IntVec_t fBeamNucleus
used only initialization at TSrim object
TLorentzVector GetLossEnergyVector(TLorentzVector vec, Double_t eloss)
TNBodyReactionProcessor & operator=(const TNBodyReactionProcessor &rhs)=delete
Double_t GetRandomReactionDistance(Double_t range)
void Init(TEventCollection *col) override
TNBodyReactionProcessor(const TNBodyReactionProcessor &rhs)=delete
return to the guide