]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/sim/Reconstruct.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / sim / Reconstruct.C
1 /**
2  * @file   Reconstruct.C
3  * @author Christian Holm Christensen <cholm@nbi.dk>
4  * @date   Wed Oct 15 13:27:45 2014
5  * 
6  * @brief  Steering script for the reconstruction 
7  */
8 /** 
9  * Run the reconstruction 
10  * 
11  * @param run Run number 
12  */
13 void Reconstruct(UInt_t run) 
14 {
15   // -----------------------------------------------------------------
16   // 
17   // - Get GRP parameters.  Defines global "grp" as a pointer to GRPData
18   // - Load base class definitions in BaseConfig.C
19   // - Get which detectors are turned on in "detCfg". 
20   // - Create the OCDB configuration object "ocdbCfg"
21   // 
22   gROOT->Macro(Form("GRP.C(%d)", run));
23   gROOT->Macro("BaseConfig.C");
24   gROOT->Macro("DetConfig.C"); 
25   gROOT->Macro("OCDBConfig.C"); 
26
27   // --- Get GRP to deduce collision system --------------------------
28   Bool_t         isAA  = grp->IsAA();
29   Bool_t         is10h = grp->period.EqualTo("LHC10h");
30  
31   // -----------------------------------------------------------------
32   // 
33   // Basic setup 
34   //
35   AliReconstruction reco;
36   TString enable;  
37   detCfg->GetRecoString(enable);
38   // if (is10h) enable.ReplaceAll("MUON", "");
39   reco.SetRunReconstruction(enable);
40
41   // -----------------------------------------------------------------
42   //
43   // switch off cleanESD, write ESDfriends and Alignment data, clean
44   // up rec-points (except for ITS)
45   // 
46   reco.SetCleanESD(kFALSE);
47   reco.SetWriteESDfriend();
48   reco.SetFractionFriends(.1);
49   reco.SetWriteAlignmentData();
50   TString clean(enable); clean.ReplaceAll("ITS", "");
51   reco.SetDeleteRecPoints(clean);
52
53   // -----------------------------------------------------------------
54   //
55   // ITS Efficiency and tracking errors
56   // 
57   reco.SetRunPlaneEff(kTRUE);
58   reco.SetUseTrackingErrorsForAlignment("ITS");
59   
60   // -----------------------------------------------------------------
61   //
62   // Raw OCDB
63   //
64   AliCDBManager* man = AliCDBManager::Instance();
65   man->SetDefaultStorageFromRun(grp->run);
66   ocdbCfg->Init(false);
67
68   // -----------------------------------------------------------------
69   // 
70   // Specific reconstruction parameters 
71   // 
72   // --- ZDC ---------------------------------------------------------
73   // ZDC for 2010 the following is needed 
74   // (https://savannah.cern.ch/task/?func=detailitem&item_id=33180#comment46)
75   if (is10h)
76     reco.SetRecoParam("ZDC",AliZDCRecoParamPbPb::GetHighFluxParam(2760));
77
78   // --- Override some settings in the ITS reco ----------------------
79   // 
80   // This was needed for the ITS stand-alone tracks to be produced in
81   // LHC14b8a and LHC14b8b.  However, using the LowMult reco-param
82   // object for all events means using AliITSVertexer3D irrespective
83   // of multiplicity.  AliITSVertexer3D can use more than 4GB of
84   // memory for central Hijing events, which means that the jobs are
85   // likely to hit the 8GB hard limit.
86   if (false && is10h) {
87     printf("Overriding ITS/Calib/RecoParam for run %d to do "
88            "reco even in absence of trigger\n", grp->run);
89     man->SetRun(grp->run);
90     AliCDBEntry*     entry  = man->Get("ITS/Calib/RecoParam");
91     TObjArray*       array  = static_cast<TObjArray*>(entry->GetObject());
92     AliITSRecoParam* par    = static_cast<AliITSRecoParam*>(array->RemoveAt(1));
93     par->SetSkipSubdetsNotInTriggerCluster(kFALSE);
94     reco.SetRecoParam("ITS",par);
95   }
96   TString host(gSystem->HostName());
97   Bool_t  cholm = host.BeginsWith("hehi");
98   if (cholm) {
99     Warning("Reconstruct", "Disabling check of TPC reco-params");
100     reco.RemCheckRecoCDBvsSimuCDB("TPC/Calib/RecoParam");
101   }
102   
103   // -----------------------------------------------------------------
104   // 
105   // Do not run QA in PbPb 
106   if (isAA) reco.SetRunQA(":");
107
108   // -------------------------------------------------------
109   // 
110   // Now run 
111   // 
112   TStopwatch timer;
113   timer.Start();
114   reco.Run();
115   timer.Stop();
116   timer.Print();
117 }
118 // 
119 // EOF
120 //