added class and macro for the analysis: AliMuonForwardTrackAnalysis.*
[u/mrichter/AliRoot.git] / MFT / AliMuonForwardTrackAnalysis.C
CommitLineData
e806e863 1enum {kNoOption, kOpenFlavor, kResonanceOnly};
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.,
10 const Char_t *outDir = ".",
11 Bool_t singleMuonAnalysis = kTRUE,
12 Bool_t muonPairAnalysis = kTRUE,
13 Int_t firstEvent = -1,
14 Int_t lastEvent = -1,
15 Int_t myRandom,
16 Int_t maxNWrongClusters = 999,
17 Double_t ptMinSingleMuons = 0.0) {
18
19 gROOT -> LoadMacro("./AliMuonForwardTrackAnalysis.cxx+");
20 // AliLog::SetClassDebugLevel("AliMuonForwardTrackPair", 1);
21 // AliLog::SetClassDebugLevel("AliMuonForwardTrackAnalysis", 1);
22
23 // TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG, AliMagF::kBeamTypeAA, 2750.));
24 // TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG, AliMagF::kBeamTypepp, 7000.));
25 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG));
26
27 AliMuonForwardTrackAnalysis *myAnalysis = new AliMuonForwardTrackAnalysis();
28 myAnalysis->ReadEvents(firstEvent, lastEvent);
29 myAnalysis->SetInputDir(readDir);
30 myAnalysis->SetOutputDir(outDir);
31 myAnalysis->SetMassRange(nMassBin, massMin, massMax);
32 myAnalysis->SetSingleMuonAnalysis(singleMuonAnalysis);
33 myAnalysis->SetMuonPairAnalysis(muonPairAnalysis);
34 myAnalysis->SetOption(option);
35 myAnalysis->SetMatchTrigger(kTRUE);
36 myAnalysis->SetMaxNWrongClustersMC(maxNWrongClusters);
37 myAnalysis->SetPtMinSingleMuons(ptMinSingleMuons);
38
39 myAnalysis->Init("MuonGlobalTracks.root");
40
41 while (myAnalysis->LoadNextEvent()) continue;
42
43 myAnalysis->Terminate(Form("outFiles/outFile.%d.%d.%d.root", myAnalysis->GetFirstEvent(), myAnalysis->GetLastEvent(), myRandom));
44
45}
46
47//================================================================================================================================
48