Correct formula for phi, in case of current local X <0, in GetLocalXat and GetPhiZat
[u/mrichter/AliRoot.git] / ITS / MakeITSRecoParam.C
CommitLineData
5c0d7005 1void MakeITSRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult) {
ed446fa3 2//========================================================================
3//
4// Steering macro for ITS reconstruction parameters
5//
6// Author: A.Dainese
7// Contact: andrea.dainese@lnl.infn.it
8//
9//========================================================================
10
11
12 const char* macroname = "MakeITSRecoParam.C";
13
14 // Activate CDB storage and load geometry from CDB
15 AliCDBManager* cdb = AliCDBManager::Instance();
16 if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://OCDB");
17
5c0d7005 18 TObjArray *recoParamArray = new TObjArray();
19
20 {
21 AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetCosmicTestParam();
22 itsRecoParam->SetFactorSAWindowSizes(20);
23 itsRecoParam->SetClusterErrorsParam(2);
24 itsRecoParam->SetFindV0s(kFALSE);
25 itsRecoParam->SetAddVirtualClustersInDeadZone(kFALSE);
26 itsRecoParam->SetUseAmplitudeInfo(kFALSE);
27 // In case we want to switch off a layer
28 // itsRecoParam->SetLayerToSkip(<N>);
29 // itsRecoParam->SetLayerToSkip(4);
30 // itsRecoParam->SetLayerToSkip(5);
31 itsRecoParam->SetLayerToSkip(2);
32 itsRecoParam->SetLayerToSkip(3);
33 //itsRecoParam->SetSAOnePointTracks();
34 itsRecoParam->SetClusterMisalError(0.1); // [cm]
35 itsRecoParam->SetSAUseAllClusters();
36 itsRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
37 recoParamArray->AddLast(itsRecoParam);
38 }
39 {
40 AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetLowFluxParam();
41 itsRecoParam->SetClusterErrorsParam(2);
42 itsRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
43 recoParamArray->AddLast(itsRecoParam);
44 }
45 {
46 AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetHighFluxParam();
47 itsRecoParam->SetClusterErrorsParam(2);
48 itsRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
49 recoParamArray->AddLast(itsRecoParam);
50 }
51
52 // Set the default
53 Bool_t defaultIsSet = kFALSE;
54 for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
55 AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
56 if (!param) continue;
57 if (default & param->GetEventSpecie()) {
58 param->SetAsDefault();
59 defaultIsSet = kTRUE;
60 }
61 }
62
63 if (!defaultIsSet) {
64 Error(macroname,"The default reconstruction parameters are not set! Exiting...");
ed446fa3 65 return;
ed446fa3 66 }
ed446fa3 67
68 // save in CDB storage
69 AliCDBMetaData *md= new AliCDBMetaData();
70 md->SetResponsible("Andrea Dainese");
71 md->SetComment("Reconstruction parameters ITS");
72 md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
73 md->SetBeamPeriod(0);
74 AliCDBId id("ITS/Calib/RecoParam",0,AliCDBRunRange::Infinity());
5c0d7005 75 cdb->GetDefaultStorage()->Put(recoParamArray,id, md);
ed446fa3 76
77 return;
78}
5c0d7005 79