====== Instalation ====== 1. mkdir build 2. cd build 3. cmake .. 4. cmake -i (set CMAKE_BUILD_TYPE in Release) 5. make -j ====== Run ====== CA - procces all events from "build/Events" directory CA -perf - print performances CA N - procces only event with number N CA -ev N - -//-//- CA -ev N1 N2 - procces only events with numbers N1,N1+1,..,N2 CA -dir [dirPath] - procces all events from [directory] directory examples: ./CA -ev 0 9 -dir "/d/cbm02/ikulakov/STAP/mbias_0maps_08deg_1000ev_MCInOut_13032012" -perf ./CA_parallel -ev 0 999 -dir "/d/cbm02/ikulakov/STAP/mbias_0maps_015deg_1000ev_13032012" -nThreads 20 -Step 20 -iSocket 0 ./CA_parallel_OMP -ev 0 999 -dir "/d/cbm02/ikulakov/STAP/mbias_0maps_015deg_1000ev_13032012" -nThreads 20 -Step 20 -iSocket 0 ======== Scalability ========= 0. Set up threadNumberToCpuMap in CA_parallel.cpp. This map shows in which order cpu cores will be used. 1. Compile CA_parallel target according to instructions in "Install" section. 2. Set up and run scalability script: ITBB_1socket.sh cd QA/Scalability edit ITBB_1socket.sh: set NTHREADS = nCores set COMPNAME set INPUTDATA to input data folder name . ITBB_1socket.sh 3. Build scalability plot: edit make_timehisto_minbias.C: set NCores set CompName (same as in the script) also you may need to change MaxSpeed to fit points in the plot ranges root -l make_timehisto_minbias.C -q -b see result at scal_minbias_1000_ITBB_gcc_STS_0-8.pdf ======= tested with: 2 x X5550 @ 2.67GHz =========== input data ============ 1. geo_algo.txt The simplified geometry information, which is used by algorithm. This includes stations positions, sizes, radiation length, resolution, strip orientation and magnetic field approximation. To get more detailed picture about the file content one can look into code/L1Algo/L1Algo.cxx, L1Algo::Init function, which fill the geometry classes. 2. data_algo.txt The main input data for algorithm. This is hits data. Hits are stored in compresed format. Each hit contains pointer (index in an array) to the two strips and z position. The front and back strips positions are stored in this file as well. Also all possible z possitions are stored here. To get more detailed picture about the file content one can look into L1AlgoInputData.cxx, code/L1AlgoInputData/L1AlgoInputData::ReadHitsFromFile, which fill the hits. 3. data_perfo.txt The input MC data for performance check (QA). There are MCPoints (parameters), MCTracks (vertex parameters, MCPoints and hits indices) and MCPoints-Hits matching array are stored. Also hits in a usefull for QA format are stored. To get more detailed picture about the file content one can look into code/Performance/L1AlgoInputMCData.cxx, L1AlgoInputMCData::ReadMCDataFromFile, which fill the mcPoints, mcTracks and the MCPoints-Hits matching array. More details: CBM uses cartesian coordinate system. Where OZ axis is along the beam, from target to detectors, OY is vertical (up), OX is horisontal. 1. 2. data_algo.txt Structure is: Event: 0 [Event0Info] Event: 1 [Event1Info] ... here [EventInfo] is: NFrontStrips FrontStrip0 FrontStrip1 ... NBackStrips BackStrip0 ... NZPos ZPos0 ... NFrontFlags FrontFlag0 ... FBackFlags BackFlag0 ... NHits [Hit0Info] ... HitsOnStation0StartIndex HitsOnStation1StartIndex ... HitsOnStation20StartIndex HitsOnStation0StopIndex HitsOnStation1StopIndex ... HitsOnStation20StopIndex here FrontStrip is a possition of the front strip (in a coor.system with axis perpendicular to the strip) same for BackStrip ZPos is a possition of some module. Therefore all ZPos are a all possible z coordinates FrontFlags corresponds to strips and are basicaly iStripStation*4 HitsOnStation[i]StartIndex - is the index of the first hit on i-station. HitsOnStation[i]StopIndex - is the index of the last hit on i-station + 1. if i >= NStations, then these numbers are 0 [HitInfo] is: iFStrip iBStrip iZPos which are indices of front and strip positions and z positions, in the lists written above 3. data_perfo.txt has same event structure Event: 0 [Event0Info] Event: 1 [Event1Info] [EventInfo] is: NMCPoints [MCPoint0] ... NMCTracks [MCTrack0] ... NHitRef [HitRef0] ... NHitStore [HitStore0] ... NHitInfo [HitInfo0] ... MCPoints - are created by simulation points on the detector planes. According to then hits are simulated. [MCPoint] is: xIn yIn zIn pxIn pyIn pzIn xOut yOut zOut pxOut pyOut pzOut p q M PDG ID MotherID iStation NHits hitId0 hitId1 ... x y z px py pz is the MCPoint position and momentum of the MCtrack in this point. There are two points are stored: when MCTrack inputs in the station material and goes out of it - In and Out points p - is momentum of the MCTrack at this point q - is charge of the MCTrack M - is mass of the MCTrack PDG - is PDG of the MCTrack ID - is index of the MCTrack motherID - is index of MCTrack of mother particle for the current MCTrack. For primary tracks this is -1. iStation - is station the MCPoint is placed on NHits - number of hits associated with the MCPoint hitId0 - index of the first hit associated with the MCPoint [MCTrack] - is: x y z px py pz p q M PDG ID MotherID NHits hitId0 ... NMCPoints pointId0 ... NMCContStations NHitContStations maxNStaMC maxNSensorMC nStations x y z px py pz - is coordinates and momentum at the point of creation (decay of the mother particle) p q M PDG ID MotherID - same as for MCPoints NHits - number of hits assosiated with the MCTrack. hitId0 - index of first hit assosiated with the MCTrack NMCPoints - number of MCPoints assosiated with the MCTrack. pointId0 - index of first MCPoint of the MCTrack NMCContStations - max number of continuous stations, which have MCPoints (from current MCTrack). NHitContStations - same for hits maxNStaMC - max number of MCPoints on station (from current MCTrack) maxNSensorMC - same for sensor on station nStations - number of stations MCTrack has Hits on (so it is same as NHitContStations, but no continuousness condition) HitRef0 - is index of MCPoint assosiated with 0-s hit =========== code structure ============ CMakeLists.txt code/* - CMake files Output - out data QA - root-macroses histogram based on outdata building QA/Scalability - shell scripts and root-macroses for scalability building CA.cpp CA_parallel.cpp CA_parallel_OpenMP.cpp - main files for different executions filies( scalar version, parallelization with ITBB and parallelization with OpenMP respectively). They read data and run the algorithm on it. code - code of the FLES package code/TaskManager.* - the class, which executes all stages of event reconstruction consequtively. code/L1InputData - classes, which contains input data - hits and geometry code/Parallelization - headers used for parallelization code/vectors - headers used for vectorization code/L1Algo - the Track Reconstruction algoritm. Including KFTrackFit code/KFParticle - the Particle Reconstruction algorithms. code/Performance - Quality Assurance code code/Common/CbmL1Track.h - class, which is used for conversion of tracks given after track finder code/Common/RootTypesDef.h - redefinition of root types, in order to make code common for standalone and CBMROOT code/Common/TStopwatch.h - timers CbmL1Def.h - definitions, which used by different classes code/L1Algo/L1Algo.* - class, which contains track finder input data and algorithms code/L1Algo/L1CATrackFinder.cxx - the main function implementing track finder code/L1Algo/L1CAMergeClones.cxx - track merger, which used by track finder code/L1Algo/L1TrackExtender.cxx - track extender, which is used in order to add additional hits to formed track-candidates (implements extrapolation of track-candidate and hits search) code/L1Algo/L1TrackFitter.cxx - track fitter, which is used after CA Track Finder functions of KF algorithm used in CA Track Finder: code/L1Algo/L1Extrapolation.h code/L1Algo/L1AddMaterial.h code/L1Algo/L1Filtration.h input hit data: code/L1Algo/L1Strip.h code/L1Algo/L1StsHit.h output data: code/L1Algo/L1Track.h code/L1Algo/L1TrackPar.h classes for track candidates: code/L1Algo/L1Triplet.h code/L1Algo/L1Branch.h classes with different geometry information: code/L1Algo/L1Field.h code/L1Algo/L1MaterialInfo.h code/L1Algo/L1UMeasurementInfo.h code/L1Algo/L1XYMeasurementInfo.h code/L1Algo/L1Station.h classes which is used for temporal storage code/L1Algo/L1HitPoint.h code/L1Algo/L1Portion.h code/L1Algo/L1HitsSortHelper.* code/L1Algo/L1Timer.h - timers functional, used for debugin code/L1Algo/L1AlgoTBB.h - ITBB implementation (old one, is not used currently) =================================== Convert ==================== ====== Compilation ====== 1. mkdir build 2. cd build 3. cmake .. 4. cmake -i (set CMAKE_BUILD_TYPE in Release) 5. make convert -j ====== Run ====== ./runConvert N1 N2 - create N2 events, each of these consists from N1 packed events edit this script to change source and target directories