1
// This class is derived from the KaliVeda class KVFAZIASelector.
2
// The following members functions are called by the TTree::Process() functions:
3
// InitRun(): called everytime a run starts
4
// EndRun(): called everytime a run ends
5
// InitAnalysis(): called at the beginning of the analysis
6
// a convenient place to create your histograms.
7
// Analysis(): called for each event. In this function you
8
// fill your histograms.
9
// EndAnalysis(): called at the end of a loop on the tree,
10
// a convenient place to draw/fit your histograms.
12
// Modify these methods as you wish in order to create your analysis class.
13
// Don't forget that for every class used in the analysis, you must put a
14
// line '#include' at the beginning of this file.
15
// E.g. if you want to access informations on the FAZIA multidetector
16
// through the global pointer gIndra, you must AT LEAST add the line
17
// #include "KVFAZIA.h"
19
void KVFAZIASelectorTemplate::InitAnalysis(void)
22
// Declaration of histograms, global variables, etc.
23
// Called at the beginning of the analysis
27
// Enter your code here
29
// To access some information about FAZIA, use the global pointer gFazia
30
// e.g. to access the list of silicon detetors
31
// KVList *list = gFazia->GetListOfDetectors();
33
//When running in batch mode, the global pointer gBatchSystem gives access
34
//to the batch system running the analysis. You can use this to name files
35
//according to the jobname, for example:
38
// if( gBatchSystem ) // running in batch
39
// my_file = new TFile( Form("%s.root", gBatchSystem->GetJobName()), "create");
40
// else // interactive
41
// my_file = new TFile( "KVFAZIASelectorTemplate.root", "create");
44
//_____________________________________
45
void KVFAZIASelectorTemplate::InitRun(void)
48
// Initialisations for each run
49
// Called at the beginning of each run
53
// Enter your code here
56
// If you want the angles of particles to be calculated using the
57
// centre of each detector (instead of the randomised angles used by default):
58
// GetEvent()->UseMeanAngles();
60
//The run number of the currently analysed run is given by
61
// gFazia->GetCurrentRunNumber();
65
//_____________________________________
66
Bool_t KVFAZIASelectorTemplate::Analysis(void)
70
// The event pointer can be retrieved by a call to GetEvent().
71
// See KVReconstructedEvent documentation for the available methods.
73
// In order to loop over all correctly identified particles in the event
74
// (assuming the corresponding code masks were set in InitRun):
75
// KVReconstructedNucleus* particle;
76
// while ( (particle = (KVReconstructedNucleus* )GetEvent()->GetNextParticle("ok")) ){
77
// int z = particle->GetZ();
82
// Enter your code here
88
//_____________________________________
89
void KVFAZIASelectorTemplate::EndRun(void)
92
// Called at the end of each run
96
// Enter your code here
101
//_____________________________________
102
void KVFAZIASelectorTemplate::EndAnalysis(void)
105
// Global calculations, saving of histograms in files
106
// Called at the end of the analysis
110
// Enter your code here