1 #if !defined( __CINT__) || defined(__MAKECINT__)
6 #include "AliReconstruction.h"
7 #include "../TRD/AliTRDCalibra.h"
8 #include <TStopwatch.h>
14 void AliTRDReconstructandFill()
17 // This macro fills 2d histo or vectors during the reconstruction
18 // If it is vectors, it fits them directly after the reconstruction
19 // and writes the result in the file coeftest.root
25 ////Set the parameters of AliTRDCalibra***************
26 AliTRDCalibra *calibra = AliTRDCalibra::Instance();
28 ////What do you want to use?
29 calibra->SetMITracking(); //Offline tracking
30 //calibra->Setmcmtracking();
33 ////Do you want to try the correction due to the angles of the tracks for mcm tracklets?
34 calibra->SetMcmCorrectAngle();
36 ////What do you want to fill?
37 calibra->SetCH2dOn();//relative gain calibration
38 calibra->SetPH2dOn();//drift velocity and time0 calibration
39 calibra->SetPRF2dOn();//Pad Response Function calibration
42 ////How do you want to store the infos?
43 calibra->SetVector2d();//vector method
44 calibra->SetHisto2d();//2Dhistograms
46 ////Which mode do you want?
47 calibra->SetNz(2,2);//For the PRF z direction
48 calibra->SetNrphi(2,2);//For The PRF rphi direction
49 calibra->SetNz(0,0);//For the gain z direction
50 calibra->SetNrphi(0,0);//For the gain rphi direction
51 calibra->SetNz(1,3);//For the drift velocity and time0 z direction
52 calibra->SetNrphi(1,3);//For the drift velocity and time 0 rphi direction
55 calibra->SetNumberBinCharge(100);
56 calibra->SetNumberBinPRF(20);
59 ////Do you want to accept more tracks?
60 calibra->SetProcent(1.2);//For the gain if one group has a signal above 1.2 the other group then fill
61 calibra->SetDifference(10);//For the drift velocity if one group has at least 10 time bins then fill
62 calibra->SetNumberClusters(18);//For mcm tracklets only fill only with tracklet with at least 18 clusters
64 ////Do you want to take only the middle pad for gain or Vdrift?
65 //calibra->SetTraMaxPad();
67 //Do you want to apply more strict cut on the clusters for the PRF calibration?
68 calibra->SetThresholdClusterPRF1(2);//The neighbors pads must have a signal smaller than 2 ADC counts
69 calibra->SetThresholdClusterPRF2(10);//The 3 pads in the cluster must have a signal above 10 ADC counts
72 ////What do you want to write?
73 calibra->SetWrite(0);//For the gain
74 calibra->SetWrite(1);//For the average pulse height
75 calibra->SetWrite(2);//For the PRF
78 ////If you want to change the name of the file where it is stored (not very good)
79 //calibra->SetWriteName("test.root");
82 //Begin the reconstruction
83 AliReconstruction rec;
84 rec.SetGAliceFile("galice.root");
85 rec.SetLoadAlignFromCDB(kFALSE);
86 rec.SetRunHLTTracking(kFALSE);
88 rec.SetFillTriggerESD(kFALSE);
89 rec.SetRunVertexFinder(kFALSE);
98 ////Fit directly after having filling****
100 ////Do you want to try with less statistics?
101 calibra->SetMinEntries(10);//If there is at least 10 entries in the histo, it will fit
103 ////Do you want to write the result?
104 calibra->SetWriteCoef(0);//gain
105 calibra->SetWriteCoef(1);//time 0 and drift velocity
106 calibra->SetWriteCoef(2);//PRF
108 ////Do you want to change the name of the file (TRD.coefficient.root)?
109 calibra->SetWriteNameCoef("coeftest.root");
111 ////Do you want to see something?
112 calibra->SetDebug(1);
114 ////Do you want to fit?
115 calibra->FitPHOnline();
116 calibra->FitCHOnline();
117 calibra->FitPRFOnline();