Skip to content
Snippets Groups Projects
Commit 54182072 authored by De Sereville Nicolas's avatar De Sereville Nicolas
Browse files

+ update MUGAST project

parent e11670f3
No related branches found
No related tags found
No related merge requests found
......@@ -47,19 +47,12 @@ void Analysis::Init() {
LightCD2 = EnergyLoss("proton_CD2.G4table","G4Table",100 );
LightAl = EnergyLoss("proton_Al.G4table","G4Table",100);
LightSi = EnergyLoss("proton_Si.G4table","G4Table",100);
<<<<<<< HEAD
// BeamCD2 = EnergyLoss("Na24[0.0]_CD2.G4table","G4Table",100);
BeamCD2 = EnergyLoss("P30_CD2.G4table","G4Table",100);
// get reaction information
myReaction = new NPL::Reaction();
myReaction->ReadConfigurationFile(NPOptionManager::getInstance()->GetReactionFile());
=======
BeamCD2 = EnergyLoss("Mg28_CD2.G4table","G4Table",100);
myReaction = new NPL::Reaction();
myReaction->ReadConfigurationFile(NPOptionManager::getInstance()->GetReactionFile());
TargetThickness = m_DetectorManager->GetTargetThickness()*micrometer;
>>>>>>> d7cc1e232101968810d6c7bfa12f3573c12a9a6f
TargetThickness = m_DetectorManager->GetTargetThickness()*micrometer;
OriginalBeamEnergy = myReaction->GetBeamEnergy();
// target thickness
......
/*****************************************************************************
* Copyright (C) 2009 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr *
* *
* Creation Date : 22/07/09 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* + This macro displays everything concerning the incident beam and the *
* emitted particle from NPSimulation *
* *
* + Use in a ROOT session: *
* .x ControlSimu.C("FileToAnalyse") *
* *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
// C++ headers
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
// ROOT headers
#include "TROOT.h"
#include "TCanvas.h"
#include "TSystem.h"
#include "TFile.h"
#include "TString.h"
#include "TEllipse.h"
#include "TLegend.h"
#include "TTree.h"
#include "TBranch.h"
#include "TH1F.h"
#include "TH2F.h"
#include "TGraph.h"
// nptool headers
#include "TInitialConditions.h"
#include "TInteractionCoordinates.h"
#include "Reaction.h"
using namespace NPL;
void ShowResults()
{
// get tree
TFile *f = new TFile("../../Outputs/Analysis/PhysicsTree.root");
TTree *t = (TTree*) f->Get("PhysicsTree");
// draw
// draw kinematic information
// canvas
TCanvas *c1 = new TCanvas("c1", "kinematic information", 600, 600);
c1->Draw();
// kinematic line
TH2F *hk = new TH2F("hk", "hk", 90, 90, 180, 200, 0, 12);
hk->GetXaxis()->SetTitle("#Theta_{lab} (deg)");
hk->GetYaxis()->SetTitle("E_{p} (MeV)");
......@@ -15,8 +70,21 @@ void ShowResults()
TPad *pad = new TPad("pad1", "excitation energy", 0.45, 0.45, 0.87, 0.87);
pad->Draw();
pad->cd();
// excitation energy
TH1F *hx = new TH1F("hx", "hx", 150, 5, 8);
hx->SetXTitle("E_{X} (MeV)");
hx->SetYTitle("counts / (20 keV)");
t->Draw("Ex>>hx");
}
void CountingRates(Double_t ibeam, Double_t ubt)
{
// load event generator file
NPL::Reaction *reaction = new NPL::Reaction();
myReaction->ReadConfigurationFile("30Pdp.reaction");
// get angular distribution
TH1F *dsig = myReaction->GetCrossSectionHist();
dsig->Draw();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment