]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITStestPIDV2.sh
Fix in AliITS::MakeBranchR since fRecPoints is no longer persistent
[u/mrichter/AliRoot.git] / ITS / AliITStestPIDV2.sh
1 #!/bin/sh
2 # 12 May 2003,Dubna
3 # This script processes the following steps for n events (AliRoot v3-09-08,
4 # root v3.05/04)
5 # (use the parameter n):
6 # - the TPC and ITS slow simulation (hits+digits+clusters),
7 # - the TPC+ITS tracking,
8 # - the TPC and ITS PID
9 # - the AliITStracksPidV2.root is created with the following information:
10 #    fGlab - track number
11 #    fPcode - particle code after the TPC PID
12 #    fMom   - particle momentum      (from the AliTPCtracks.root)
13 #    fLam   - particle lambder angle (from the AliTPCtracks.root)
14 #    fPhi   - particle phi angle     (from the AliTPCtracks.root)
15 #    fSignal- TPC signal (mips)
16 #    fWpi   - the PID weight for the identified pion
17 #    fWk    - the PID weight for the identified kaon
18 #    fWp    - the PID weight for the identified proton
19 #       (the weghts are tuned for the HIJING events)
20 # and the AliITSScanPIDV2.C is the example of macros to read the PID
21 # information.
22 # See ITSPIDplot.ps after run of this script.
23
24 if [ $# = 0   ]; then nev=1; else nev=$1; fi
25 if [ $nev = 0 ]; then nev=1; fi
26 #
27 # delete eventual old files from the last run
28 echo "Start simulation for " $nev " event(s)"
29 $ALICE_ROOT/ITS/AliITSDeleteOldFiles.sh
30 #
31 # run the hit generation
32 aliroot -q -b "$ALICE_ROOT/macros/grun.C($nev)"  
33 # digitize TPC
34 aliroot -q -b "$ALICE_ROOT/TPC/AliTPCHits2Digits.C($nev)" 
35 # TPC tracking
36 ln -s galice.root digits.root
37 aliroot -q -b "$ALICE_ROOT/TPC/AliTPCFindClustersMI.C($nev)" 
38 aliroot -b <<EOI
39 .L $ALICE_ROOT/TPC/AliTPCFindTracksMI.C
40 AliTPCFindTracks($nev);
41 .q
42 EOI
43 #
44 # digitize ITS
45 aliroot -q -b "$ALICE_ROOT/ITS/AliITSHits2SDigits.C"
46 aliroot -q -b "$ALICE_ROOT/ITS/AliITSSDigits2Digits.C"
47 # ITS-TPC tracking
48 aliroot -q -b "$ALICE_ROOT/ITS/AliITSFindClustersV2.C('s',$nev)"
49 aliroot -b <<EOI
50 TFile *inkin = TFile::Open("galice.root");
51 if (!inkin->IsOpen()) cerr<<"Can't open galice.root !\n";               
52 if (gAlice) {delete gAlice; gAlice=0;}
53                                   
54 gAlice = (AliRun*)inkin->Get("gAlice");
55 cout<<"AliRun object found on file "<<gAlice<<endl;
56 cout<<"!!!! field ="<<gAlice->Field()->SolenoidField()<<endl;
57 AliKalmanTrack::SetConvConst(1000/0.299792458/gAlice->Field()->SolenoidField());
58 inkin->Close();
59 .x $ALICE_ROOT/ITS/AliITSFindTracksV2.C($nev);
60 .q
61 EOI
62 #
63 # Do the PID procedure for the ITS. The output file AliITStrackV2Pid.root is
64 # created with the information for each track:
65 aliroot -q -b "$ALICE_ROOT/ITS/AliITSSavePIDV2.C(0,$[$nev-1])"
66 aliroot -q -b "$ALICE_ROOT/ITS/AliITSScanPIDV2.C(0,$[$nev-1])"
67
68
69