# Local reconstruction in cells

There are two ways

## Map correction with volume tracks

Studied by Valeri, four plates at the times, correcting and computing

## Mapping together small cells

Cells can be processed in parallel with HTCondor. First sub and sh scripts have been written, but they mostlly use link.rootrc and creates hundreds of files! Not viable in the long terms.

The files then can be merged together.

The procedure is:

* create symbolic link to tracks.raw\.root as usual;
* copy the link.rootrc files from <https://github.com/SND-LHC/emu_reco_analysis/blob/master/linkingmap/firstlink.rootrc> and [https://github.com/SND-LHC/emu\_reco\_analysis/blob/master/linkingmap/secondlink.rootrc](https://github.com/SND-LHC/emu_reco_analysis/blob/master/linkingmap/firstlink.rootrc);
* copy <https://github.com/SND-LHC/emu_reco_analysis/blob/master/linkingmap/firstlinking_cell.sh> and <https://github.com/SND-LHC/emu_reco_analysis/blob/master/linkingmap/secondlinking_cell.sh>
* check that the files options are correct for the analyzed brick
* copy firstlink.rootrc in link.rootrc&#x20;
* Submit in condor <https://github.com/SND-LHC/emu_reco_analysis/blob/master/condor_scripts/condorlinking_first.sub>
* Check if files have been produced correctly with <https://github.com/SND-LHC/emu_reco_analysis/blob/master/linkingmap/filecheck.sh>. Eventually rerun condor for missing files with <https://github.com/SND-LHC/emu_reco_analysis/blob/master/condor_scripts/condorlinking_first_reco.sub>
* copy secondlink.rootrc in link.rootrc
* Submit in condor <https://github.com/SND-LHC/emu_reco_analysis/blob/master/condor_scripts/condorlinking_second.sub>
* Again, check files with <https://github.com/SND-LHC/emu_reco_analysis/blob/master/linkingmap/filecheck_secondlinking.sh>. Eventually, rerun condor with <https://github.com/SND-LHC/emu_reco_analysis/blob/master/condor_scripts/condorlinking_second.sub>
* Merge linked files with <https://github.com/SND-LHC/emu_reco_analysis/blob/master/condor_scripts/merge_cells.sub>
* Create a symbolic link to the merged file with <https://github.com/SND-LHC/emu_reco_analysis/blob/master/run1analysis/recoparameters/create_mergedcoupleslink_miccern.sh>;

## Overlapping cells

Cells must overlap (about 2.5 mm for 1 cm cell), at least during alignment and tracking!

Otherwise we lose a lot of tracks going from a cell to another!

Passing tracks can be actually used to match overlapping cells together, so the corrections go smootly from a cell to another.

## Cleaning

Due to the high number of created files, please remove the files after the merge and quality check

Monitor eos quota

export EOS\_MGM\_URL=root://eospublic.cern.ch

eos quota /eos/experiment/sndlhc
