Various upgrades and bug fixes etc
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis / SubmitFMDCorrections.C
CommitLineData
507687cd 1void SubmitFMDCorrections(const Char_t* filename, Bool_t store, Float_t energy, Int_t trigger, Float_t mag, Int_t collsystem,Bool_t inelGtZero=kFALSE) {
4b8bdb60 2
3 gSystem->Load("libANALYSIS");
4 gSystem->Load("libANALYSISalice");
5 gSystem->Load("libPWG0base");
6 gSystem->Load("libPWG2forward");
7
8 AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
9
10 if(energy == 900)
11 pars->SetEnergy(AliFMDAnaParameters::k900);
12 else if(energy == 7000)
13 pars->SetEnergy(AliFMDAnaParameters::k7000);
14 else if(energy == 10000)
15 pars->SetEnergy(AliFMDAnaParameters::k10000);
16 else if(energy == 14000)
17 pars->SetEnergy(AliFMDAnaParameters::k14000);
18 else if(energy == 5500)
19 pars->SetEnergy(AliFMDAnaParameters::k5500);
20
21 if(trigger == 0)
22 pars->SetTriggerDefinition(AliFMDAnaParameters::kMB1);
23 else if(trigger == 1)
24 pars->SetTriggerDefinition(AliFMDAnaParameters::kMB2);
25
26 if(mag==0)
27 pars->SetMagField(AliFMDAnaParameters::k0G);
28 else if(mag==1)
29 pars->SetMagField(AliFMDAnaParameters::k5G);
30
31 if(collsystem == 0)
32 pars->SetCollisionSystem(AliFMDAnaParameters::kPP);
33 else if(collsystem == 1)
34 pars->SetCollisionSystem(AliFMDAnaParameters::kPbPb);
35
507687cd 36
37 pars->SetInelGtZero(inelGtZero);
4b8bdb60 38 pars->PrintStatus();
39
40 std::cout<<"creating background object"<<std::endl;
41 AliFMDAnalysisTaskGenerateCorrection t;
42
43 t.ReadFromFile(filename,store,0);
44 std::cout<<"object created in backgroundFromFile.root "<<std::flush;
45 if(store)
46 std::cout<<" - and stored!"<<std::endl;
47 else
48 std::cout<<" - and not stored!"<<std::endl;
49}