README.md 5.7 KB
Newer Older
Riccardo Longo's avatar
Riccardo Longo committed
1
2
3
#### Joint ZeroDegree Calorimeter Prototype Analysis --- JCaPA           
#### Created by Y.Kulinich, R.Longo and C.Lantz on 12/12/2018 #### 
#### Migrated from CERN to UIUC Gitlab on 14th February 2019 ####
4
5
6
                                                                                                                                                 
Basic structure defined and discussed during the Thursday meeting on 12/13/2018 

Riccardo Longo's avatar
Riccardo Longo committed
7
JCaPA   
Riccardo Longo's avatar
Riccardo Longo committed
8
     Analysis   
Riccardo Longo's avatar
Riccardo Longo committed
9
10
11
          include    
          src   
          userFunctions   
Riccardo Longo's avatar
Riccardo Longo committed
12
     MonteCarlo    
Riccardo Longo's avatar
Riccardo Longo committed
13
     2018_Utils (empty for the moment)    
14

Riccardo Longo's avatar
Riccardo Longo committed
15
The project is cmake based, so you need a reasonably new cmake version ( version > 2.8 )   
16
17
The standalone Analysis part requires only a root installation (https://root.cern.ch) and a xerces-c installation (http://xerces.apache.org). 
Please note that xerces-c is usually available via your package installer (so easy to get installed). 
Riccardo Longo's avatar
Riccardo Longo committed
18
19
20
The MC part will be conditional since it requires additional software as Geant4 and all its dependencies   
The corresponding README part will be written once MC will be included.    
The 2018_Utils folder will be meant to contain useful files for 2018 test beam analysis (e.g. Summary of various scans etc)   
21
22
23

#### CMake and installation ####
To install the software using cmake will be trivial. 
Riccardo Longo's avatar
Riccardo Longo committed
24
In the same folder where you have JZCaPA, just do
25

Riccardo Longo's avatar
Riccardo Longo committed
26
mkdir JZCaPA_BUILD
Riccardo Longo's avatar
Riccardo Longo committed
27

Riccardo Longo's avatar
Riccardo Longo committed
28
mkdir JZCaPA_INSTALL 
29
30

at this stage, remember to add to your environment
Riccardo Longo's avatar
Riccardo Longo committed
31

Riccardo Longo's avatar
Riccardo Longo committed
32
export JZCaPA=/path/to/your/JCaPA_INSTALL
33

Riccardo Longo's avatar
Riccardo Longo committed
34
cd JZCaPA_BUILD
Riccardo Longo's avatar
Riccardo Longo committed
35

Riccardo Longo's avatar
Riccardo Longo committed
36
cmake -DCMAKE_INSTALL_PREFIX=../JZCaPA_INSTALL/ ../JZCaPA
Riccardo Longo's avatar
Riccardo Longo committed
37

38
make -j8 
Riccardo Longo's avatar
Riccardo Longo committed
39

40
41
42
43
44
45
46
47
48
49
50
make install 

please remember to re-make & make install every time you change the source code 

#### Analysis ####
Each user can implement his/her own analysis creating a new userFunction.cpp in Analysis/userFunctions folder. 
Please check AnalysisExample.cpp if you're looking for a basic template. 

Two main classes are provided at the moment: 
- DataReader 
- WFAnalysis (inherits from Analysis.h)
Riccardo Longo's avatar
Riccardo Longo committed
51
52

They are well commented by Yakov for each available method.     
Riccardo Longo's avatar
Riccardo Longo committed
53
A doxygen documentation can also be created following the instruction below.     
54

55
56
57
58
59
60
61
62
63
#### Monte Carlo ####
Monte Carlo folder added on 12/19/2018.    
What's there at the moment is exactly what has been done so far by Mike Phipps (michael.william.phipps@cern.ch). 
The only modifications implemented were to ensure the compatibility with newer Geant4 versions (>= 10.4.3).   
Such changes have been implemented in order to allow also for backward compatibility with older Geant4 versions. 

Please note that MonteCarlo support is *DISABLED* by default. This choice is meant to avoid people not interested in MC to install Geant4 and the other dependencies. 
In order to enable it, add the option 

Riccardo Longo's avatar
Riccardo Longo committed
64
-DJZCaPA_ENABLE_MC=YES 
65
66
67
68

while cmaking. Please note that you need the Geant4 toolkit (and the corresponding dependencies) to successfully enable the MC support. 
More details will come in the future. 

69
#### Doxygen documentation ####
Riccardo Longo's avatar
Riccardo Longo committed
70
71
First, check that doxygen is installed on your machine.   
If it's not the case, just check it out using   
Riccardo Longo's avatar
Riccardo Longo committed
72
By default a folder "doxygen" will also be installed in your JZCaPA_INSTALL folder.   
Riccardo Longo's avatar
Riccardo Longo committed
73
74
To obtain the documentation, just execute   

Riccardo Longo's avatar
Riccardo Longo committed
75
doxygen JZCaPA_doxy.cnf   
Riccardo Longo's avatar
Riccardo Longo committed
76

Riccardo Longo's avatar
Riccardo Longo committed
77
This will generate for you  $JZCaPA/html and $JZCaPA/latex folder.  
Riccardo Longo's avatar
Riccardo Longo committed
78
If you start $JCaPA/html/index.html with your browser, you will get your doxygen docs (surfable).   
Riccardo Longo's avatar
Riccardo Longo committed
79
Alternatively, you can compile the latex static documentation in $JZCaPA/latex 
80
81


82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#### Structure of processed data ####
TTree structure of the processed data is illustrated in the following.

Tree name: "tree".
Inside one can find a variety of branches.
In 2018 we had N = 20 channels read. 5 DRS4 Boards x 4 Channels each. Each channel is configured to output 1024 samples.

Raw data is stored as a vector<float> in branches called 'RawCn' and 'Cn', where n is an element { 0, ..., N-1 }.
Each branch RawCn and Cn will be of size 1024 (corresponding to the number of samples).
Therefore for each event we have N vectors of size 1024.
RawCn corresponds to the "raw" output, what one would see on the DRS scope.
Cn corresponds to processed output, as determined by rdcaqAnalysis.
One can take the RawCn and reprocess it as they wish using JCaPA analysis methods (or implementing new ones). 

Also, in the tree, there are branches that come from rcdaqAnalysis which have information on the output of each channel.
These are branches such as MaxCharge. Lets say there are M of them.
These are vectors of size N, you will have one piece of information for each channel. Be it max charge, or pedestal rms, etc.
Here you have information from rcdaqAnalysis depending on how it was configured. The user can use this and or do their own processing from the raw data.
Depending on how many pieces of processed info are saved from rcdaqAnalysis, you will have M vectors of size N.

Summarizing, there are
N branches of size 1024 for the channel waveforms.
and
M branches of size N for the processed data from rcdaqAnalysis. M is an arbitrary number.
106
 
Riccardo Longo's avatar
Riccardo Longo committed
107
#### XML Setting file support - Beta version #### 
Riccardo Longo's avatar
Riccardo Longo committed
108
Since 29th January you will need to install also xercesc as a dependency to compile JZCaPA. This is rather straight forward on machines where you have root access. 
Riccardo Longo's avatar
Riccardo Longo committed
109
You've just to run 
110

Riccardo Longo's avatar
Riccardo Longo committed
111
112
113
114
your_package_installer install xerces-c 

If you are on a cluster and xerces-c is not installed/available by default, is straightforward to checkout the source from http://xerces.apache.org/xerces-c/download.cgi and compile it following the instructions available on the webpage. 
If you are going for the source installation, please note that, for an easier detection by cmake, it is adviced to define the variables $XERCESC_DIR, $XERCESC_INCLUDE_DIR and $XERCESC_LIBRARY