Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

ITS3

Upgraded version of the ITS that includes upgraded truly-cylindrical inner barrel. Provided O2 has been compiled with upgrades enabled (ENABLE_UPGRADES=1 aliBuild build O2), it is possible to simulate ITS3 geometry within the o2-sim executable.

Events can be simulated using the o2-sim workflow. To include ITS3 in the simulation, IT3 module must be enabled via the -m IT3 parameter. To include the beam pipe, the module PIPE must be enabled.

The run number is needed to retrieve objects from the CCDB. There are specific ranges of run-numbers, according to the collision system and to the selected geometry if the ITS3 inner barrel:

  • pp collisions:

    • 303901—303999
  • Pb-Pb collisions:

    • 311901—311999

Note: For now the same topology dictionary will be used for both collision-systems Last Update of file here (jira)[https://its.cern.ch/jira/browse/O2-5293]

Simulation

  1. Optional

This just caches the ccdb object to reduce calls in case we are testing.

export IGNORE_VALIDITYCHECK_OF_CCDB_LOCALCACHE=1
export ALICEO2_CCDB_LOCALCACHE=${PWD}/ccdb

Simulate diamond

# append to o2-sim
--configKeyValues="Diamond.width[2]=6.;""

Local Tracking

  1. Optionally, if not provided in the ccdb

Create the general run parameters, see GRPECS.

  1. Simulate

Simulate PIPE and ITS3

o2-sim -g pythia8pp --detectorList ALICE2.1 -m PIPE IT3 --run 303901 -n1000 --field ccdb

In the previous command:

  • -j is used to set the number of threads;
  • -n is used to set the number of events to simulate;
  • -g is used to set the event generator, in this case pythia8hi. To simulate pp collisions one can use pythia8pp.
  • --run is needed to set the run number.
  1. Digitization
o2-sim-digitizer-workflow -b --interactionRate 500000 --run --configKeyValues="HBFUtils.runNumber=303901;" --onlyDet IT3
root -x -l ${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/CheckDigitsITS3.C++
  1. Clusterization with tracking
o2-its3-reco-workflow -b --run --tracking-mode async --configKeyValues "HBFUtils.runNumber=303901;"
root -x -l ${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/CheckClustersITS3.C++
root -x -l ${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/CheckTracksITS3.C++

Global Tracking

TODO

Creating CCDB Objects

!TODO! Create Full geometry + Aligned + GeometryTGeo

# Create Full Geometry
o2-sim --detectorList ALICE2.1 --run 303901 -n0
cp o2sim_geometry.root ${ALICEO2_CCDB_LOCALCACHE}/GLO/Config/Geometry/snapshot.root
o2-create-aligned-geometry-workflow -b --configKeyValues "HBFUtils.startTime=1547978230000" --condition-remap="file://${ALICEO2_CCDB_LOCALCACHE}=GLO/Config/Geometry"
cp o2sim_geometry-aligned.root ${ALICEO2_CCDB_LOCALCACHE}/GLO/Config/GeometryAligned/snapshot.root
cp its_GeometryTGeo.root ${ALICEO2_CCDB_LOCALCACHE}/ITS/Config/Geometry/snapshot.root

or copying the ideal geometry to the aligned one and:

{
      o2::base::GeometryManager::loadGeometry("");
      auto itsTGeo = o2::its::GeometryTGeo::Instance();
      itsTGeo->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::T2L, o2::math_utils::TransformType::L2G, o2::math_utils::TransformType::T2GRot));
      TFile outF("its_GeometryTGeo.root", "recreate");
      outF.WriteObjectAny(itsTGeo, "o2::its::GeometryTGeo", "ccdb_object");
      outF.Close();
      itsTGeo->destroy();
}

Regenerating the TopologyDictionary

  1. Clusterization w/o tracking

First we need to use the clusterizer but ignoring the default TopologyDictionary, we built our own.

o2-its3-reco-workflow -b --tracking-mode off \
    --configKeyValues "HBFUtils.runNumber=303901;" \
    --ignore-cluster-dictionary --run
  1. Creating the TopologyDictionary
root -x -l ${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/CreateDictionariesITS3.C++
cp IT3dictionary.root ${ALICEO2_CCDB_LOCALCACHE}/IT3/Calib/ClusterDictionary/snapshot.root
  1. Rerun Clusterization with new TopologyDictionary
o2-its3-reco-workflow -b --tracking-mode off \
    --configKeyValues "HBFUtils.runNumber=303901;" \
    --condition-remap="file://${ALICEO2_CCDB_LOCALCACHE}=IT3/Calib/ClusterDictionary" \
    --run
  1. Check Clusters
root -x -l '${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/CheckClustersITS3.C++("o2clus_its.root", "o2sim_HitsIT3.root", "o2sim_geometry-aligned.root", "IT3dictionary.root")'
root -x -l '${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/CompareClustersAndDigits.C++("o2clus_its.root", "it3digits.root","IT3dictionary.root", "o2sim_HitsIT3.root", "o2sim_geometry-aligned.root")'
root -x -l '${ALIBUILD_WORK_DIR}/../O2/Detectors/Upgrades/ITS3/macros/test/CheckClusterSize.C++("o2clus_its.root", "o2sim_Kine.root", "IT3dictionary.root", false)'

GRPECS

o2-grp-simgrp-tool createGRPs --detectorList ALICE2.1 --run 303901 --bcPatternFile bcPattern.root --hbfpertf 128 --field -5 --publishto ccdb

Using external generators based on AliRoot

It is also possible to simulate heavy-ion collision using external generators based on AliRoot. In this case, it is necessary to load both O2 and AliROOT (the order is important):

alienv enter O2/latest AliRoot/latest

After that, the option -g external must be used and the file with the definition of the generator and the function to be used must be provided as parameters of the workflow:

o2-sim -j 1  \
-n 10 -g external \
--configKeyValues "Diamond.width[2]=6.;GeneratorExternal.fileName=hijing.C;GeneratorExternal.funcName=hijing(5020, 0, 20)"

The file hijing.C can be found here.

Disabling individual tiles

  1. Create a file input.txt with a comma separated list of disabled tiles.
  2. (optional) Run the macro CreateITS3StaticDeadMap.C and/or visualize with CheckTileNumbering.C
  3. Move the ccdb object into ${ALICEO2_CCDB_LOCALCACHE}/IT3/Calib/DeadMap, this is not optional since there is no default object uploaded
  4. Run digitizer with ITS3Params.useDeadChannelMap=true;, e.g.:
o2-sim-digitizer-workflow --configKeyValues="ITS3Params.useDeadChannelMap=true;"

Alignment studies

Deform hits

  1. Create misalignment parameters with CreateMisalignmentITS3.C
  2. Visualize with ShowCoefficients.C
  3. Run digitizer
o2-sim-digitizer-workflow -b --configKeyValues="ITS3Params.applyMisalignmentHits=true;ITS3Params.misalignmentHitsParams=misparams.root"

Misc

Setup to run SIM+DIGIT+TRACKING

#!/bin/bash

export IGNORE_VALIDITYCHECK_OF_CCDB_LOCALCACHE=1
export ALICEO2_CCDB_LOCALCACHE=$PWD/ccdb

BASE_DIR="batch_"
TOTAL_DIRS=4
SIM_CMD="o2-sim -g pythia8pp --detectorList ALICE2.1 -m IT3 --run 303901 -n2000 --field ccdb -j8"
DIGIT_CMD="o2-sim-digitizer-workflow -b --interactionRate 675000 --run --configKeyValues=\"HBFUtils.runNumber=303901;HBFUtils.nHBFPerTF=32;ITSAlpideParam.roFrameLengthInBC=198\""
RECO_CMD="o2-its3-reco-workflow -b --run --configKeyValues=\"ITSVertexerParam.phiCut=0.5;ITSVertexerParam.clusterContributorsCut=3;ITSVertexerParam.tanLambdaCut=0.2;ITSCATrackerParam.useTrackFollower=0;ITSCATrackerParam.findShortTracks=1;HBFUtils.runNumber=303901;HBFUtils.nHBFPerTF=32;ITSAlpideParam.roFrameLengthInBC=198\" --tracking-mode async"

for ((i = 1; i <= TOTAL_DIRS; i++)); do
    DIR="${BASE_DIR}${i}"

    if [ ! -d "$DIR" ]; then
        mkdir "$DIR"
    fi

    if [ -f "${DIR}/sim_done" ]; then
        echo "Skipping SIM ${DIR} because _done exists."
        continue
    fi

    cd "$DIR"

    echo "Executing SIM command in ${DIR}..."
    eval $SIM_CMD >sim.log

    touch sim_done

    cd ..
done

for ((i = 1; i <= TOTAL_DIRS; i++)); do
    DIR="${BASE_DIR}${i}"

    if [ ! -d "$DIR" ]; then
        mkdir "$DIR"
    fi

    if [ -f "${DIR}/digit_done" ]; then
        echo "Skipping DIGIT ${DIR} because _done exists."
        continue
    fi

    cd "$DIR"

    echo "Executing DIGIT command in ${DIR}..."
    eval $DIGIT_CMD >digit.log

    touch digit_done

    cd ..
done

for ((i = 1; i <= TOTAL_DIRS; i++)); do
    DIR="${BASE_DIR}${i}"

    if [ ! -d "$DIR" ]; then
        mkdir "$DIR"
    fi

    if [ -f "${DIR}/reco_done" ]; then
        echo "Skipping RECO ${DIR} because _done exists."
        continue
    fi

    cd "$DIR"

    echo "Executing RECO command in ${DIR}..."
    eval $RECO_CMD >reco.log

    touch reco_done

    cd ..
done