Analysis code updated
[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,
e806e863 18 Double_t ptMinSingleMuons = 0.0) {
19
20 gROOT -> LoadMacro("./AliMuonForwardTrackAnalysis.cxx+");
21 // AliLog::SetClassDebugLevel("AliMuonForwardTrackPair", 1);
22 // AliLog::SetClassDebugLevel("AliMuonForwardTrackAnalysis", 1);
23
24 // TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG, AliMagF::kBeamTypeAA, 2750.));
25 // TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG, AliMagF::kBeamTypepp, 7000.));
26 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG));
27
28 AliMuonForwardTrackAnalysis *myAnalysis = new AliMuonForwardTrackAnalysis();
29 myAnalysis->ReadEvents(firstEvent, lastEvent);
30 myAnalysis->SetInputDir(readDir);
31 myAnalysis->SetOutputDir(outDir);
32 myAnalysis->SetMassRange(nMassBin, massMin, massMax);
33 myAnalysis->SetSingleMuonAnalysis(singleMuonAnalysis);
34 myAnalysis->SetMuonPairAnalysis(muonPairAnalysis);
35 myAnalysis->SetOption(option);
e806e863 36 myAnalysis->SetMaxNWrongClustersMC(maxNWrongClusters);
37 myAnalysis->SetPtMinSingleMuons(ptMinSingleMuons);
bcaf50eb 38 myAnalysis->UseCutOnOffsetChi2(useCutOnOffsetChi2);
3b6fd486 39
bcaf50eb 40 myAnalysis->SetPtDimuRange(10, 0., 5.);
41 myAnalysis->SetMatchTrigger(kTRUE);
7e3dd1af 42 myAnalysis->UseBransonForCut(kFALSE);
43 myAnalysis->UseBransonForKinematics(kFALSE);
e806e863 44
45 myAnalysis->Init("MuonGlobalTracks.root");
46
47 while (myAnalysis->LoadNextEvent()) continue;
48
49 myAnalysis->Terminate(Form("outFiles/outFile.%d.%d.%d.root", myAnalysis->GetFirstEvent(), myAnalysis->GetLastEvent(), myRandom));
50
51}
52
53//================================================================================================================================
54