BinaryReaction.h 2.78 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
/*
 * BinaryReaction.h
 *
 *  Created on: 24.5.2010
 *      Author: Vratislav
 */

//#ifndef BEBINARYREACTION_H_
//#define BEBINARYREACTION_H_

#pragma once
//#include "DllExport.h"
#include <iostream>

#include <TObject.h>
#include <TNamed.h>
#include <TROOT.h>
#include <TMath.h>
#include <TRandom3.h>
#include <TVector3.h>

using std::cout;
using std::endl;

using TMath::Sqrt;
using TMath::Power;
using TMath::Sin;
using TMath::Cos;
using TMath::ATan;

class BinaryReaction : public TNamed {

private:
	Double_t	fM[4];		//in MeV

	//in laboratory system
	Double_t	fThetaIn;	//in rad
	Double_t	fPhiIn;		//in rad
	Double_t	fT1;		//in MeV

	//in CM system
	Double_t	fThetaCM;	//in rad

	//in laboratory system
	Double_t	fTa;		//in MeV
	Double_t	fTb;		//in MeV
	Double_t	fThetaA;	//in rad
	Double_t	fThetaB;	//in rad
	Double_t	fPhiA;		//in rad
	Double_t	fPhiB;		//in rad

	static	TRandom3	ranPhi;		//!

public:
	BinaryReaction();
	virtual ~BinaryReaction();
	ClassDef(BinaryReaction, 1);

	Double_t GetThetaCM() const { return fThetaCM; };
	Double_t GetThetaA() const { return fThetaA; };
	Double_t GetPhiA() const { return fPhiA; };
	Double_t GetTa() const { return fTa; };
	Double_t GetMa() const { return fM[2]; };
	Double_t GetThetaB() const { return fThetaB; };
	Double_t GetPhiB() const { return fPhiB; };
	Double_t GetTb() const { return fTb; };
	Double_t GetMb() const { return fM[3]; };
	Double_t GetXa(Double_t z);		//get X projection in focal plane XY + z
	Double_t GetXb(Double_t z);		//get X projection in focal plane XY + z
	Double_t GetYa(Double_t z);		//get Y projection in focal plane XY + z
	Double_t GetYb(Double_t z);		//get Y projection in focal plane XY + z

	Int_t FillReaction(Double_t _fThetaIn, Double_t _fT1, Double_t _fM[], Double_t _fThetaCM, Double_t _fPhi);
		//osetrit zadavani parametru, ktere maji fyzikalni smysl
		//vsude hlidat signum energie

	//void FillInput(Double_t _fThetaIn, Double_t _fT1, Double_t _fM[], Double_t _fThetaCM, Double_t fPhi);
	Int_t FlatCalculate();	//calculate theta A and B for phi = 0 in reaction frame //predelat pomoci vektoru, pravdepodobne velmi pomala fce
	void SetPhi();			//random choice of phi in reaction frame
	void SetOrientation();	//does not work properly
	void SetOrientationV();	//transform thetas and phis from reaction frame into laboratory frame
							//taking into account the projectile flying direction
	void SetPhiA(Double_t phia) { fPhiA = phia; }
	void SetPhiB(Double_t phib) { fPhiB = phib; }
	void SetThetaA(Double_t thetaa) { fThetaA = thetaa; }
	void SetThetaB(Double_t thetab) { fThetaB = thetab; }
	void SetTa(Double_t ta) { fTa = ta; }
	void SetTb(Double_t tb) { fTb = tb; }
	void SetM(Int_t i, Double_t m) { fM[i] = m; }

	void Reset();

	//diagnostics
	UInt_t GetPSeed() const { return ranPhi.GetSeed(); };



};

//#endif /* BEBINARYREACTION_H_ */