A FLUKA simulation that records the energy deposited in a single layer of polysterene from an ion beam. HTCondor submission scripts are included.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

199 lines
6.2 KiB

//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Fri Mar 8 13:05:30 2019 by ROOT version 6.12/06
// from TTree EVENTDAT/FLUKA Course Exercise DATE: 3/ 4/19, TIME: 11:54:46
// found on file: jobs/runjob1001_eventdata.root
//////////////////////////////////////////////////////////
#ifndef eventdatroot_h
#define eventdatroot_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <TH1.h>
// Header file for the classes stored in the TTree if any.
class eventdatroot {
public :
TTree *fChain; //!pointer to the analyzed TTree or TChain
Int_t fCurrent; //!current Tree number in a TChain
// Fixed size dimensions of array or collections stored in the TTree if any.
// Declaration of leaf types
Float_t DATA_ALL_PART[6];
Float_t DATA_BEAMPART[6];
Float_t DATA_ENERGY[6];
Float_t DATA_id211[6];
Int_t SEEDS[4];
Float_t ENDIST[12];
// List of branches
TBranch *b_DATA; //!
TBranch *b_seed; //!
TBranch *b_endist; //!
TH1F * h_endist_0;
TH1F * h_endist_1;
TH1F * h_endist_2;
TH1F * h_endist_3;
TH1F * h_endist_4;
TH1F * h_endist_5;
TH1F * h_endist_6;
TH1F * h_endist_7;
TH1F * h_endist_8;
TH1F * h_endist_9;
TH1F * h_endist_10;
TH1F * h_endist_11;
TH1F * h_ratio_e;
TH1F * h_ratio_p;
TH1F * h_sum_ep;
TH1F * h_let_ep;
TH1F * h_let_e;
TH1F * h_let_p;
TH1F * h_spratio;
eventdatroot(TTree *tree=0);
virtual ~eventdatroot();
virtual Int_t Cut(Long64_t entry);
virtual Int_t GetEntry(Long64_t entry);
virtual Long64_t LoadTree(Long64_t entry);
virtual void Init(TTree *tree);
virtual void Loop(Float_t scale);
virtual Bool_t Notify();
virtual void Show(Long64_t entry = -1);
virtual Int_t Closefile(TFile * file);
};
#endif
#ifdef eventdatroot_cxx
eventdatroot::eventdatroot(TTree *tree) : fChain(0)
{
// if parameter tree is not specified (or zero), connect the file
// used to generate this class and read the Tree.
// if (tree == 0) {
// TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("jobs/runjob1001_eventdata.root");
// if (!f || !f->IsOpen()) {
// f = new TFile("jobs/runjob1001_eventdata.root");
// }
// f->GetObject("EVENTDAT",tree);
// }
// Init(tree);
}
eventdatroot::~eventdatroot()
{
if (!fChain) return;
delete fChain->GetCurrentFile();
}
Int_t eventdatroot::GetEntry(Long64_t entry)
{
// Read contents of entry.
if (!fChain) return 0;
return fChain->GetEntry(entry);
}
Long64_t eventdatroot::LoadTree(Long64_t entry)
{
// Set the environment to read one entry
if (!fChain) return -5;
Long64_t centry = fChain->LoadTree(entry);
if (centry < 0) return centry;
if (fChain->GetTreeNumber() != fCurrent) {
fCurrent = fChain->GetTreeNumber();
Notify();
}
return centry;
}
void eventdatroot::Init(TTree *tree)
{
// The Init() function is called when the selector needs to initialize
// a new tree or chain. Typically here the branch addresses and branch
// pointers of the tree will be set.
// It is normally not necessary to make changes to the generated
// code, but the routine can be extended by the user if needed.
// Init() will be called many times when running on PROOF
// (once per file to be processed).
// Set branch addresses and branch pointers
if (!tree) return;
fChain = tree;
fCurrent = -1;
fChain->SetMakeClass(1);
fChain->SetBranchAddress("DATA", DATA_ALL_PART, &b_DATA);
fChain->SetBranchAddress("SEEDS", SEEDS, &b_seed);
fChain->SetBranchAddress("ENDIST", ENDIST, &b_endist);
h_endist_0 = new TH1F("h_endist_0","edep by ionisation",400,0.0,0.1);
h_endist_1 = new TH1F("h_endist_1","edep by pi0, e-, e+ and #gamma",400,0.0,0.06);
h_endist_2 = new TH1F("h_endist_2","edep by nuclear recoils and heavy fragments",400,0.0,0.002);
h_endist_3 = new TH1F("h_endist_3","edep by part. #lt threshold",200,0.0,0.002);
h_endist_4 = new TH1F("h_endist_4","E leaving the system",200,0.0,1.1);
h_endist_5 = new TH1F("h_endist_5","E carried by discarded particles",200,0.0,0.2);
h_endist_6 = new TH1F("h_endist_6","resid, excit. E after evap.",200,0.0,0.2);
h_endist_7 = new TH1F("h_endist_7","edep by low-energy neutrons",200,0.0,0.2);
h_endist_8 = new TH1F("h_endist_8","E of part. #gt time limit",200,0.0,0.2);
h_endist_9 = new TH1F("h_endist_9","E lost in endothermic nuclear reactions",200,0.0,0.2);
h_endist_10 = new TH1F("h_endist_10","E lost in endothermic low-E n-reactions",200,0.0,0.2);
h_endist_11 = new TH1F("h_endist_11","missing E",400,0.0,0.01);
h_ratio_e = new TH1F("h_ratio_e","fraction of edep by pi0, e-, e+ and #gamma ",400,0.0,1.0);
h_ratio_p = new TH1F("h_ratio_p","fraction of edep by ionisation",400,0.0,1.0);
h_sum_ep = new TH1F("h_sum_ep","sum of edep by ion, pi0, e-, e+ and #gamma,",400,0.0,0.4);
h_let_ep = new TH1F("h_let_ep","LET/Z^{2} (GeV/cm) by ion, pi0, e-, e+ and #gamma,",200,0.0,0.2);
h_let_e = new TH1F("h_let_e","LET/Z^{2} (GeV/cm) by pi0, e-, e+ and #gamma,",200,0.0,0.1);
h_let_p = new TH1F("h_let_p","LET/Z^{2} (GeV/cm) by ion",200,0.0,0.1);
h_spratio = new TH1F("h_spratio","total LET/SP (MeV/cm/#rho)/SP(MeVcm2/g)",200,0.5,3.0);
Notify();
}
Bool_t eventdatroot::Notify()
{
// The Notify() function is called when a new file is opened. This
// can be either for a new TTree in a TChain or when when a new TTree
// is started when using PROOF. It is normally not necessary to make changes
// to the generated code, but the routine can be extended by the
// user if needed. The return value is currently not used.
return kTRUE;
}
void eventdatroot::Show(Long64_t entry)
{
// Print contents of entry.
// If entry is not specified, print current entry
if (!fChain) return;
fChain->Show(entry);
}
Int_t eventdatroot::Cut(Long64_t entry)
{
// This function may be called from Loop.
// returns 1 if entry is accepted.
// returns -1 otherwise.
return 1;
}
Int_t eventdatroot::Closefile(TFile * file)
{
file->cd();
file->Write();
file->Close();
return 1;
}
#endif // #ifdef eventdatroot_cxx