Added option to switch on/off Branson correction in the matching stage. Analysis...
[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->SetSingleMuonAnalysis(singleMuonAnalysis);
33   myAnalysis->SetMuonPairAnalysis(muonPairAnalysis);
34   myAnalysis->SetOption(option);
35   myAnalysis->SetMatchTrigger(kTRUE);
36   myAnalysis->SetMaxNWrongClustersMC(maxNWrongClusters);
37   myAnalysis->SetPtMinSingleMuons(ptMinSingleMuons);
38   myAnalysis->UseCutOnOffsetChi2(kFALSE);
39   myAnalysis->UseBransonForCut(kFALSE);
40   myAnalysis->UseBransonForKinematics(kFALSE);
41
42   myAnalysis->Init("MuonGlobalTracks.root");
43
44   while (myAnalysis->LoadNextEvent()) continue;
45
46   myAnalysis->Terminate(Form("outFiles/outFile.%d.%d.%d.root", myAnalysis->GetFirstEvent(), myAnalysis->GetLastEvent(), myRandom));
47
48 }
49
50 //================================================================================================================================
51