Skip to content

Commit

Permalink
thetaCM added to header
Browse files Browse the repository at this point in the history
  • Loading branch information
himyss committed May 16, 2024
1 parent 3062562 commit 2f14af2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
7 changes: 4 additions & 3 deletions decayers/ERDecayEXP1811.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ Bool_t ERDecayEXP1811::Stepping() {
}
if (TString(run->GetMCEventHeader()->ClassName()).Contains("EREXP1811EventHeader")){
EREXP1811EventHeader* header = (EREXP1811EventHeader*)run->GetMCEventHeader();
header->SetData(curPos.Vect(), lv8He, lv2H, *fLv3He, *fLv3H, *fLv7H, *fLvn1, *fLvn2, *fLvn3, *fLvn4);
header->SetData(curPos.Vect(), lv8He, lv2H, *fLv3He, *fLv3H, *fLv7H, *fLvn1, *fLvn2, *fLvn3, *fLvn4, fTheta);
header->SetTrigger(1);
}
}
Expand Down Expand Up @@ -353,6 +353,7 @@ void ERDecayEXP1811::ReactionPhaseGenerator(Double_t Ecm, Double_t h7Mass) {
} else {
thetaCM = fADFunction->GetRandom(fThetaMin, fThetaMax)*TMath::DegToRad();
}
fTheta = thetaCM;
Double_t phi = gRandom->Uniform(0., 2. * TMath::Pi());
TVector3 Pcmv;
Pcmv.SetMagThetaPhi(Pcm, thetaCM, phi);
Expand Down Expand Up @@ -441,7 +442,7 @@ Double_t ERDecayEXP1811::ADEvaluate(Double_t *x, Double_t *p) {
//-------------------------------------------------------------------------------------------------
void ERDecayEXP1811::SetAngularDistribution(TString ADFile) {
TString ADFilePath = gSystem->Getenv("VMCWORKDIR");
ADFilePath += "/input/" + ADFile;
ADFilePath = ADFile;
std::ifstream f;
f.open(ADFilePath.Data());
if (!f.is_open()) {
Expand Down Expand Up @@ -476,7 +477,7 @@ void ERDecayEXP1811::SetAngularDistribution(TString ADFile) {
fThetaMax = angle[fADInput->GetN()-1];
fADFunction = new TF1("angDistr", this, &ERDecayEXP1811::ADEvaluate,
fThetaMin, fThetaMax, 0, "ERDecayEXP1811", "ADEvaluate");
fADFunction->Eval(1.);
// fADFunction->Eval(1.);
}
//-------------------------------------------------------------------------------------------------
ClassImp(ERDecayEXP1811)
3 changes: 2 additions & 1 deletion decayers/ERDecayEXP1811.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class ERDecayEXP1811 : public ERDecay {
TLorentzVector *fLvn2; //!
TLorentzVector *fLvn3; //!
TLorentzVector *fLvn4; //!
Float_t fTheta; //!

FairIon *fIon3He;
FairIon *fUnstableIon7H;
Expand Down Expand Up @@ -113,4 +114,4 @@ class ERDecayEXP1811 : public ERDecay {
ClassDef(ERDecayEXP1811,1)
};

#endif
#endif
6 changes: 4 additions & 2 deletions decayers/EREXP1811EventHeader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void EREXP1811EventHeader::SetData(const TVector3& position, const TLorentzVecto
const TLorentzVector& H3,
const TLorentzVector& H7, const TLorentzVector& n1,
const TLorentzVector& n2, const TLorentzVector& n3,
const TLorentzVector& n4) {
const TLorentzVector& n4, const Float_t& thetaCM) {
fReactionPos = position;
fHe8 = He8;
fH2 = H2;
Expand All @@ -21,6 +21,7 @@ void EREXP1811EventHeader::SetData(const TVector3& position, const TLorentzVecto
fn2 = n2;
fn3 = n3;
fn4 = n4;
fThetaCM = thetaCM;
}
// -------------------------------------------------------------------------
void EREXP1811EventHeader::Clear() {
Expand All @@ -35,7 +36,8 @@ void EREXP1811EventHeader::Clear() {
fn4.SetXYZM(0, 0, 0, 0);
fTrigger = 0;
fTriggerPriority = 0;
fThetaCM = 200;
}
// -------------------------------------------------------------------------

ClassImp(EREXP1811EventHeader)
ClassImp(EREXP1811EventHeader)
7 changes: 5 additions & 2 deletions decayers/EREXP1811EventHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class EREXP1811EventHeader : public FairMCEventHeader {
TLorentzVector fn2;
TLorentzVector fn3;
TLorentzVector fn4;
Float_t fThetaCM;
Int_t fTrigger = 0;
Int_t fTriggerPriority = 0;
public:
Expand All @@ -26,7 +27,8 @@ class EREXP1811EventHeader : public FairMCEventHeader {
const TLorentzVector& H2, const TLorentzVector& He3,
const TLorentzVector& H3, const TLorentzVector& H7,
const TLorentzVector& n1, const TLorentzVector& n2,
const TLorentzVector& n3, const TLorentzVector& n4);
const TLorentzVector& n3, const TLorentzVector& n4,
const Float_t& thetaCM);
void SetTrigger(Int_t trigger) { fTrigger = trigger; }

Int_t GetTrigger() const {return fTrigger;}
Expand All @@ -40,10 +42,11 @@ class EREXP1811EventHeader : public FairMCEventHeader {
TLorentzVector GetN2() const { return fn2; }
TLorentzVector GetN3() const { return fn3; }
TLorentzVector GetN4() const { return fn4; }
Float_t GetThetaCM() const {return fThetaCM;}

void Clear();

ClassDef(EREXP1811EventHeader,1)
};

#endif
#endif
4 changes: 1 addition & 3 deletions telescope/ERTelescopeDigitizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ void ERTelescopeDigitizer::SetSiElossSigma(float sigma) {
//-------------------------------------------------------------------------------------------------
void ERTelescopeDigitizer::SetCsIElossSigma(float sigma) {
//fCsIElossModel = [sigma](float eloss) { return gRandom->Gaus(eloss, sigma);};
fCsIElossModel = [sigma](float eloss) {
sigma = 0.021231*sqrt(eloss);
return gRandom->Gaus(eloss, sigma);
fCsIElossModel = [sigma](float eloss) { return gRandom->Gaus(eloss, 0.021231*sqrt(eloss));
};
}
//-------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 2f14af2

Please sign in to comment.