AddTimeStamp was always increasing track length but accounting
[u/mrichter/AliRoot.git] / MFT / AliMuonForwardTrackAnalysis.C
1 enum {kNoOption, kPionsKaons, 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                                  Bool_t useCutOnOffsetChi2 = kFALSE,
11                                  Int_t maxNWrongClusters = 999,
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, 
17                                  Int_t myRandom = 0,
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);
36   myAnalysis->SetMaxNWrongClustersMC(maxNWrongClusters);
37   myAnalysis->SetPtMinSingleMuons(ptMinSingleMuons);
38   myAnalysis->UseCutOnOffsetChi2(useCutOnOffsetChi2);
39
40   myAnalysis->SetPtDimuRange(10, 0., 5.);
41   myAnalysis->SetMatchTrigger(kTRUE);
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