b81217564c500c00b285764753be0c5cb9c0540d
[u/mrichter/AliRoot.git] / MFT / AliMuonForwardTrackAnalysis.C
1 enum {kNoOption, kOpenFlavor, kResonanceOnly};
2
3 //================================================================================================================================
4
5 void 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 = 0,
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->SetPtDimuRange(10, 0., 5.);
33   myAnalysis->SetSingleMuonAnalysis(singleMuonAnalysis);
34   myAnalysis->SetMuonPairAnalysis(muonPairAnalysis);
35   myAnalysis->SetOption(option);
36   myAnalysis->SetMatchTrigger(kTRUE);
37   myAnalysis->SetMaxNWrongClustersMC(maxNWrongClusters);
38   myAnalysis->SetPtMinSingleMuons(ptMinSingleMuons);
39
40   myAnalysis->UseCutOnOffsetChi2(kFALSE);        // cut on the single muons
41
42   myAnalysis->UseBransonForCut(kFALSE);
43   myAnalysis->UseBransonForKinematics(kFALSE);
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