]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGJE/EMCALJetTasks/macros/AddTaskJetPreparationWrapper.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / macros / AddTaskJetPreparationWrapper.C
1 void AddTaskJetPreparationWrapper(const char *configstring){
2   AliEMCALConfiguration defaultConfig("defaultConfig");
3   defaultConfig.AddParam("periodstr", new AliJSONString("LHC11h"));
4   defaultConfig.AddParam("pTracksName", new AliJSONString("PicoTracks"));
5   defaultConfig.AddParam("usedMCParticles", new AliJSONString("MCParticlesSelected"));
6   defaultConfig.AddParam("usedClusters", new AliJSONString("CaloClusters"));
7   defaultConfig.AddParam("outClusName", new AliJSONString("CaloClustersCorr"));
8   defaultConfig.AddParam("hadcorr", new AliJSONDouble(2.0));
9   defaultConfig.AddParam("Eexcl", new AliJSONDouble(0.00));
10   defaultConfig.AddParam("phiMatch", new AliJSONDouble(0.03));
11   defaultConfig.AddParam("etaMatch", new AliJSONDouble(0.015));
12   defaultConfig.AddParam("minPtEt", new AliJSONDouble(0.15));
13   defaultConfig.AddParam("pSel", new AliJSONInt(AliVEvent::kAny));
14   defaultConfig.AddParam("trackclus", new AliJSONBool(kTRUE));
15   defaultConfig.AddParam("doHistos", new AliJSONBool(kFALSE));
16   defaultConfig.AddParam("makePicoTracks", new AliJSONBool(kTRUE));
17   defaultConfig.AddParam("makeTrigger", new AliJSONBool(kTRUE));
18   defaultConfig.AddParam("isEMCALTrain", new AliJSONBool(kFALSE));
19   defaultConfig.AddParam("trackeff", new AliJSONDouble(1.0));
20   defaultConfig.AddParam("doAODTrackProp", new AliJSONBool(kTRUE));
21   defaultConfig.AddParam("modifyMatchObjects", new AliJSONBool(kTRUE));
22   defaultConfig.AddParam("doTriggerQA", new AliJSONBool(kTRUE));
23   AliEMCALConfiguration userConfig("userConfig");
24   userConfig.Build(configstring);
25   AliEMCALConfigMatcher combinedConfiguration(&defaultConfig, &userConfig);
26
27   TString periodstr = (static_cast<AliJSONString *>(combinedConfig.GetValue("periodstr")))->GetValue(),
28           pTracksName = (static_cast<AliJSONString *>(combinedConfig.GetValue("pTracksName")))->GetValue(),
29           usedMCParticles = (static_cast<AliJSONString *>(combinedConfig.GetValue("usedMCParticles")))->GetValue(),
30           usedClusters = (static_cast<AliJSONString *>(combinedConfig.GetValue("usedClusters")))->GetValue(),
31           outClusName = (static_cast<AliJSONString *>(combinedConfig.GetValue("outClusName")))->GetValue();
32   Double_t hadcorr = (static_cast<AliJSONDouble *>(combinedConfig.GetValue("hadcorr")))->GetValue(),
33           Eexcl = (static_cast<AliJSONDouble *>(combinedConfig.GetValue("Eexcl")))->GetValue(),
34           phiMatch = (static_cast<AliJSONDouble *>(combinedConfig.GetValue("phiMatch")))->GetValue(),
35           etaMatch = (static_cast<AliJSONDouble *>(combinedConfig.GetValue("etaMatch")))->GetValue(),
36           minPtEt = (static_cast<AliJSONDouble *>(combinedConfig.GetValue("minPtEt")))->GetValue(),
37           trackeff = (static_cast<AliJSONDouble *>(combinedConfig.GetValue("trackeff")))->GetValue();
38   UInt_t pSel = static_cast<UInt_t>((static_cast<AliJSONInt *>(combinedConfig.GetValue("pSel")))->GetValue());
39   Bool_t trackclus = (static_cast<AliJSONBool *>(combinedConfig.GetValue("trackclus")))->GetValue(),
40          doHistos = (static_cast<AliJSONBool *>(combinedConfig.GetValue("doHistos")))->GetValue(),
41          makePicoTracks = (static_cast<AliJSONBool *>(combinedConfig.GetValue("makePicoTracks")))->GetValue(),
42          makeTrigger = (static_cast<AliJSONBool *>(combinedConfig.GetValue("makeTrigger")))->GetValue(),
43          isEMCALTrain = (static_cast<AliJSONBool *>(combinedConfig.GetValue("isEMCALTrain")))->GetValue(),
44          doAODTrackProp = (static_cast<AliJSONBool *>(combinedConfig.GetValue("doAODTrackProp")))->GetValue(),
45          modifyMatchObjects = (static_cast<AliJSONBool *>(combinedConfig.GetValue("modifyMatchObjects")))->GetValue(),
46          doTriggerQA = (static_cast<AliJSONBool *>(combinedConfig.GetValue("doTriggerQA")))->GetValue();
47
48   gROOT->LoadMacro("$ALICE_ROOT/PWGJE/EMCLAJetTasks/macros/AddTaskJetPreparation.C");
49   AddTaskJetPreparation(periodstr.Data(), pTracksName.Data(), usedMCParticles.Data(), usedClusters.Data(), outClusName.Data(),
50       hadcorr, Eexcl, phiMatch, etaMatch, minPtEt, pSel, trackclus, doHistos, makePicoTracks, makeTrigger, isEMCALTrain, trackeff,
51       doAODTrackProp, modifyMatchObjects, doTriggerQA);
52 }