Tags:
create new tag
view all tags

FIRST Vertex reconstruction software

Getting the code

### a) gather the code. The version under svn is the latest one?

I just did an update - so "rec/trunk/MIMO" is the latest version
(anyhow, not sure if big things changed at all).


### Can you provide us the instructions to run the
simulation/digitization/reconstruction you have already developed?

Run the software

- I use the development version of FLUKA
including a event generator for nuclear interaction <100MeV/n (BME) but
simualtions with FLUKA 2008 should also work.
- You will also need ROOT.


###1) how to generate gsi001_Out.root


File package, compilation, and running (MC directory: sim/trunk/)
- To connect FLUKA with ROOT, you need to move the file lfluka_root
into the FLUKA flutil directory.
- For compilation do the following steps:
- source lib_setup.csh
- ./flulink (compilation of C and FORTAN files)
- For running do:
- $FLUPRO/flutil/rfluka -e fluka_gsi.exe -N0 -M1 gsi

- if you get some errors during compilation with "MEDIUM" something.
This is due to changes in usrsco.f between different FLUKA versions. I
overcame this problem by commenting all the lines in usrsco.f containing
"MEDIUM".

Description of simulation structure and comments
- In the user routines (.f and *.inc) we score the FLUKA quantities of
interest, hand them over to C/C++ (Fluke2Root.cpp) and store them into a
root-file (Evento.
).
- The scored quantities, their variable names and an explanation of
their content can be found in mgdraw.inc.
- After a run you find all the quantities of interest in the root-file.
- If you need some help in configuring the simulation for your needs
tell me.

Reconstruction implemented


An example of how to process the root file for the MIMOSA is the
Analysis program I wrote (rec/trunk/MIMO). It can be very easily changed
and adapted. For the moment it is set to generate graphs of the cluster
sizes, etc from the MIMOSA TB measuements in CT.
It basically shows you how to open the root file, go through it event by
event, and retrieve information you want. This program shows also how to
use the clustering algorithm (TheCluster->GetCluster(&eve);) and the
track finding algorithm (ThePattern->GetPattern(&clu);) of the MIMOSA.

The program uses some files from the /sim/trunk/ directory - so make
sure that it finds them or just copy them in the rec/trunk/MIMO dir.

Before compiling and running you'll need to do some changes:
1 - In Analysis.cpp you should point to the root file you want to read
(TheData->Init).
2 - and you should comment "TheStore->PlotMIMOCluster();" since it needs
some additional experimental data files.
3 - I hope that's all.

Compile and run with "make" + "./Analysis 1" - you should see quite
some output and in the end some plots are generated in GFX/.


### b) isolate the various workflow steps and build a 'modular' code out
of that. We need a class that reads the input and digitize it, a class
that performs the reconstruction and a class for the analysis.

I tried to do the code modular. For the moment the structure is the
following:
- The file "Analysis.cpp" reads the input from the FLUKA ROOT file with
the help of "Evento.*" (or from other sources if changed.)
- the "digitization" (i.e. for each MIMOSA pixel looking if over/below
threshold) for all implemented detectors is already done during the
FLUKA run (in the files: sim/trunk/Sengale.* and sim/trunk/Evento.*).
For instance: the method MI_GetActive(Int_t Number) looks if the energy
deposition in a MIMOSA pixel is over threshold
- the class "Cluster" does the clustering of activated pixel of an
event.
- the class "PatternRec" does the track finding in the four MIMOSA
planes. It also already does a simple track fitting by chisquared (since
I need it for the ranking of the possible hit combinations for the
objective function to give me the best tracks)
- in future there should be a class which does the track fitting with
something like kalman filter and probably involving several detectors -
not only MIMOSA

The reconstruction code is commented - I hope this helps for your
understanding.

Since this is the first time ever I did something with reconstruction
and you are for sure all more experts than me - I'm sure there are some
thing to improve in terms of: code design, algorithms & performance. So
I'm happy about every comment and correction I get! Also: in the
routines I put some TODO's for further development of the algorithms.


I hope this description helps you to get started, but of course, don't
hesitate to ask if in doubt.

-- AlessioSarti - 2011-02-07

Topic revision: r1 - 2011-02-07 - AlessioSarti
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback