updates from Fengchu
[u/mrichter/AliRoot.git] / MFT / AliMuonForwardTrackAnalysis.C
CommitLineData
d8c2cc3e 1enum {kNoOption, kPionsKaons, kResonanceOnly};
e806e863 2
3//================================================================================================================================
4
5void AliMuonForwardTrackAnalysis(const Char_t *readDir= ".",
6 Int_t option = kNoOption,
7 Int_t nMassBin = 100,
8 Double_t massMin = 0.,
9 Double_t massMax = 10.,
bcaf50eb 10 Bool_t useCutOnOffsetChi2 = kFALSE,
11 Int_t maxNWrongClusters = 999,
e806e863 12 const Char_t *outDir = ".",
13 Bool_t singleMuonAnalysis = kTRUE,
14 Bool_t muonPairAnalysis = kTRUE,
15 Int_t firstEvent = -1,
16 Int_t lastEvent = -1,
7e3dd1af 17 Int_t myRandom = 0,
5f74a7f3 18 Double_t ptMinSingleMuons = 0.0,
19 Bool_t evalDimuonVtxResolution=kFALSE) {
e806e863 20
21 gROOT -> LoadMacro("./AliMuonForwardTrackAnalysis.cxx+");
22 // AliLog::SetClassDebugLevel("AliMuonForwardTrackPair", 1);
23 // AliLog::SetClassDebugLevel("AliMuonForwardTrackAnalysis", 1);
24
25 // TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG, AliMagF::kBeamTypeAA, 2750.));
26 // TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG, AliMagF::kBeamTypepp, 7000.));
27 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG));
28
29 AliMuonForwardTrackAnalysis *myAnalysis = new AliMuonForwardTrackAnalysis();
30 myAnalysis->ReadEvents(firstEvent, lastEvent);
31 myAnalysis->SetInputDir(readDir);
32 myAnalysis->SetOutputDir(outDir);
33 myAnalysis->SetMassRange(nMassBin, massMin, massMax);
34 myAnalysis->SetSingleMuonAnalysis(singleMuonAnalysis);
35 myAnalysis->SetMuonPairAnalysis(muonPairAnalysis);
36 myAnalysis->SetOption(option);
e806e863 37 myAnalysis->SetMaxNWrongClustersMC(maxNWrongClusters);
38 myAnalysis->SetPtMinSingleMuons(ptMinSingleMuons);
bcaf50eb 39 myAnalysis->UseCutOnOffsetChi2(useCutOnOffsetChi2);
3b6fd486 40
5f74a7f3 41 myAnalysis->SetPtDimuRange(5, 0., 5.);
bcaf50eb 42 myAnalysis->SetMatchTrigger(kTRUE);
7e3dd1af 43 myAnalysis->UseBransonForCut(kFALSE);
44 myAnalysis->UseBransonForKinematics(kFALSE);
e806e863 45
5f74a7f3 46 myAnalysis->EvalDimuonVtxResolution(evalDimuonVtxResolution); // only with prompt quarkonia
47
e806e863 48 myAnalysis->Init("MuonGlobalTracks.root");
49
50 while (myAnalysis->LoadNextEvent()) continue;
51
52 myAnalysis->Terminate(Form("outFiles/outFile.%d.%d.%d.root", myAnalysis->GetFirstEvent(), myAnalysis->GetLastEvent(), myRandom));
53
54}
55
56//================================================================================================================================
57