analysis code and AliMuonForwardTrackPair updated
authorauras <auras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Sep 2012 09:37:22 +0000 (09:37 +0000)
committerauras <auras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Sep 2012 09:37:22 +0000 (09:37 +0000)
MFT/AliMuonForwardTrackAnalysis.C
MFT/AliMuonForwardTrackAnalysis.cxx
MFT/AliMuonForwardTrackAnalysis.h
MFT/AliMuonForwardTrackPair.cxx
MFT/AliMuonForwardTrackPair.h
MFT/Config.C
MFT/runSimulation.C

index 84d01c6..909c1dc 100644 (file)
@@ -1,49 +1,62 @@
-enum {kNoOption, kPionsKaons, kResonanceOnly};
+enum {kNoOption, kResonanceOnly};
 
-//================================================================================================================================
+const Double_t mJpsi = TDatabasePDG::Instance()->GetParticle("J/psi")->Mass();
+
+//=============================================================================================================================================================
 
-void AliMuonForwardTrackAnalysis(const Char_t *readDir= ".",
-                                Int_t option = kNoOption,
-                                Int_t nMassBin = 100, 
-                                Double_t massMin = 0.,
-                                Double_t massMax = 10.,
-                                Bool_t useCutOnOffsetChi2 = kFALSE,
-                                Int_t maxNWrongClusters = 999,
-                                const Char_t *outDir = ".",
-                                Bool_t singleMuonAnalysis = kTRUE,
-                                Bool_t muonPairAnalysis = kTRUE,
+void AliMuonForwardTrackAnalysis(const Char_t *readDir= ".",                       // the directory with the MuonGlobalTracks.root and geometry.root files
+                                Int_t option = kNoOption,                         // for resonance analysis: kResonanceOnly 
+                                Double_t massMin = 0.,                            // lower limit for the cut on dimuon mass
+                                Double_t massMax = 10.,                           // upper limit for the cut on dimuon mass
+                                Double_t maxChi2SingleMuons = 1.5,                // upper limit for the cut on the single muon chi2
+                                Double_t maxOffsetSingleMuons = 250.,             // upper limit for the cut on the single muon offset w.r.t. the primary vtx
+                                Bool_t correlateCutOnOffsetChi2 = kTRUE,          // if true, the cur region in the chi2-offset plane for single muons is a quadrant aorund the origin
+                                Double_t maxWOffsetMuonPairsAtPrimaryVtx = 1.e9,  // upper limit for the cut on weighted offset of dimuond w.r.t. the primary vtx
+                                Double_t maxWOffsetMuonPairsAtPCA = 1.e9,         // upper limit for the cut on weighted offset of dimuond w.r.t. their PCA
+                                Double_t maxDistancePrimaryVtxPCA = 1.e9,         // upper limit for the cut on the distance between primary vtx and PCA
+                                Double_t minPCAQuality = 0.,                      // lower limit for the cut on the PCA quality
+                                Int_t triggerLevel = 1,                           // level of the trigger both muons must satisfy
+                                Int_t maxNWrongClusters = 999,                    // maximum number of wrong MFT clusters for a global muon track
+                                const Char_t *outDir = ".",                       // directory where the output file will be created
+                                Bool_t singleMuonAnalysis = kTRUE,                // if true, the aalysis of single muons will be performed
+                                Bool_t muonPairAnalysis = kTRUE,                  // if true, the aalysis of muon pairs will be performed
                                 Int_t firstEvent = -1,
                                 Int_t lastEvent = -1, 
-                                Int_t myRandom = 0,
-                                Double_t ptMinSingleMuons = 0.0,
-                                Bool_t evalDimuonVtxResolution=kFALSE) {
+                                Int_t myRandom = 0,                               // number which will tag the name of the output file
+                                Double_t ptMinSingleMuons = 0.0,                  // lower limit for the cut on the single muon pt
+                                Double_t trueMass = mJpsi,                        // used to evaluate the pseudo proper decay length, usually for J/psi only
+                                Bool_t evalDimuonVtxResolution=kFALSE) {          // to be set true only if prompt dimuon sources are analyzed
   
   gROOT -> LoadMacro("./AliMuonForwardTrackAnalysis.cxx+");
   //  AliLog::SetClassDebugLevel("AliMuonForwardTrackPair", 1);
   //  AliLog::SetClassDebugLevel("AliMuonForwardTrackAnalysis", 1);
 
-  //  TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG, AliMagF::kBeamTypeAA, 2750.));
-  //  TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG, AliMagF::kBeamTypepp, 7000.));
   TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG));
   
   AliMuonForwardTrackAnalysis *myAnalysis = new AliMuonForwardTrackAnalysis();
   myAnalysis->ReadEvents(firstEvent, lastEvent);
   myAnalysis->SetInputDir(readDir);
   myAnalysis->SetOutputDir(outDir);
-  myAnalysis->SetMassRange(nMassBin, massMin, massMax);
+  myAnalysis->SetMassRange(massMin, massMax);
+  myAnalysis->SetTrueMass(trueMass);
   myAnalysis->SetSingleMuonAnalysis(singleMuonAnalysis);
   myAnalysis->SetMuonPairAnalysis(muonPairAnalysis);
   myAnalysis->SetOption(option);
+
   myAnalysis->SetMaxNWrongClustersMC(maxNWrongClusters);
-  myAnalysis->SetPtMinSingleMuons(ptMinSingleMuons);
-  myAnalysis->UseCutOnOffsetChi2(useCutOnOffsetChi2);
+  myAnalysis->SetMinPtSingleMuons(ptMinSingleMuons);
+  myAnalysis->SetMaxChi2SingleMuons(maxChi2SingleMuons);
+  myAnalysis->SetMaxOffsetSingleMuons(maxOffsetSingleMuons);
+  myAnalysis->CorrelateCutOnOffsetChi2(correlateCutOnOffsetChi2);
+
+  myAnalysis->SetMaxWOffsetMuonPairsAtPrimaryVtx(maxWOffsetMuonPairsAtPrimaryVtx);
+  myAnalysis->SetMaxWOffsetMuonPairsAtPCA(maxWOffsetMuonPairsAtPCA);
+  myAnalysis->SetMaxDistancePrimaryVtxPCA(maxDistancePrimaryVtxPCA);
+  myAnalysis->SetMinPCAQuality(minPCAQuality);
 
-  myAnalysis->SetPtDimuRange(5, 0., 5.);
-  myAnalysis->SetMatchTrigger(kTRUE);
-  myAnalysis->UseBransonForCut(kFALSE);
-  myAnalysis->UseBransonForKinematics(kFALSE);
+  myAnalysis->SetMatchTrigger(triggerLevel);
 
-  myAnalysis->EvalDimuonVtxResolution(evalDimuonVtxResolution);    // only with prompt quarkonia
+  myAnalysis->EvalDimuonVtxResolution(evalDimuonVtxResolution);    // it should be true only with prompt dimuon sources
 
   myAnalysis->Init("MuonGlobalTracks.root");
 
index c781945..65c9bd8 100644 (file)
@@ -63,28 +63,32 @@ AliMuonForwardTrackAnalysis::AliMuonForwardTrackAnalysis():
   fHistErrorSingleMuonsX(0x0),
   fHistErrorSingleMuonsY(0x0),
   fHistZOriginSingleMuonsMC(0x0),
-  fHistZROriginSingleMuonsMC(0x0),
-  fHistSingleMuonsPtRapidityMC(0x0),
+  fHistZROriginSingleMuonsMC(0x0), 
+  fHistSingleMuonsPtRapidity(0x0), 
   fHistSingleMuonsOffsetChi2(0x0),
   fHistRapidityPtMuonPairs(0x0),
-  fHistMassMuonPairsVsPt(0),
-  fHistMassMuonPairsWithoutMFTVsPt(0),
-  fHistMassMuonPairsVsPtLSp(0),
-  fHistMassMuonPairsWithoutMFTVsPtLSp(0),
-  fHistMassMuonPairsVsPtLSm(0),
-  fHistMassMuonPairsWithoutMFTVsPtLSm(0),
-  fEvalDimuonVtxResolution(kFALSE),
-  fNMassBins(10),
-  fNPtDimuBins(1000),
+  fHistMassMuonPairsMCVsPt(0x0),
+  fHistMassMuonPairsVsPt(0x0),
+  fHistMassMuonPairsWithoutMFTVsPt(0x0),
+  fHistMassMuonPairsVsPtLSp(0x0),
+  fHistMassMuonPairsWithoutMFTVsPtLSp(0x0),
+  fHistMassMuonPairsVsPtLSm(0x0),
+  fHistMassMuonPairsWithoutMFTVsPtLSm(0x0),
+  fHistWOffsetMuonPairsAtPrimaryVtxVsPt(0x0),
+  fHistWOffsetMuonPairsAtPCAVsPt(0x0),
+  fHistDistancePrimaryVtxPCAVsPt(0x0),
+  fHistPCAQualityVsPt(0x0),
+  fHistPseudoProperDecayLengthVsPt(0x0),
+  fHistDimuonVtxResolutionXVsPt(0x0),
+  fHistDimuonVtxResolutionYVsPt(0x0),
+  fHistDimuonVtxResolutionZVsPt(0x0),
+  fTrueMass(0.),
   fMassMin(0),
-  fMassMax(10),
-  fPtDimuMin(0),
-  fPtDimuMax(5),
-  fPtAxisDimuons(0),
+  fMassMax(9999),
   fSingleMuonAnalysis(1),
   fMuonPairAnalysis(1),
-  fMatchTrigger(0),
   fOption(0),
+  fTriggerLevel(0),
   fXVertResMC(50.e-4),
   fYVertResMC(50.e-4),
   fZVertResMC(50.e-4),
@@ -95,37 +99,23 @@ AliMuonForwardTrackAnalysis::AliMuonForwardTrackAnalysis():
   fPtMinSingleMuons(0),
   fUseBransonForCut(kFALSE),
   fUseBransonForKinematics(kFALSE),
-  fCutOnOffsetChi2(kFALSE),
-  fCenterOffset(0.), 
-  fCenterChi2(0.), 
-  fScaleOffset(250.), 
-  fScaleChi2(1.5),
-  fRadiusCut(1.)
+  fCorrelateCutOnOffsetChi2(kFALSE),
+  fMaxChi2SingleMuons(1.e9), 
+  fMaxOffsetSingleMuons(1.e9),
+  fMaxWOffsetMuonPairsAtPrimaryVtx(1.e9), 
+  fMaxWOffsetMuonPairsAtPCA(1.e9), 
+  fMaxDistancePrimaryVtxPCA(1.e9), 
+  fMinPCAQuality(0.)
 {
 
   // default constructor
 
-  for (Int_t iPtBin=0; iPtBin<fNMaxPtBinsDimuons+1; iPtBin++) {
-    fHistMassMuonPairs[iPtBin]                                = NULL;
-    fHistMassMuonPairsWithoutMFT[iPtBin]                      = NULL;
-    fHistMassMuonPairsMC[iPtBin]                              = NULL;
-    fHistWOffsetMuonPairsAtPrimaryVtx[iPtBin]                 = NULL;
-    fHistWOffsetMuonPairsAtPCA[iPtBin]                        = NULL;
-    fHistDistancePrimaryVtxPCA[iPtBin]                        = NULL;
-    fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA[iPtBin] = NULL;
-    fHistDimuonVtxResolutionX[iPtBin]                         = NULL;
-    fHistDimuonVtxResolutionY[iPtBin]                         = NULL;
-    fHistDimuonVtxResolutionZ[iPtBin]                         = NULL;
-  }
-
 }
 
 //====================================================================================================================================================
 
 Bool_t AliMuonForwardTrackAnalysis::Init(Char_t *inputFileName) {
 
-  fPtAxisDimuons = new TAxis(fNPtDimuBins, fPtDimuMin, fPtDimuMax);
-
   BookHistos();
 
   TFile *inputFile = new TFile(Form("%s/%s",fInputDir.Data(),inputFileName));
@@ -166,10 +156,9 @@ Bool_t AliMuonForwardTrackAnalysis::Init(Char_t *inputFileName) {
 
   fMuonForwardTrackPairsWithBranson    = new TClonesArray("AliMuonForwardTrackPair",10);
   fMuonForwardTrackPairsWithoutBranson = new TClonesArray("AliMuonForwardTrackPair",10);
-       fMuonForwardTrackPairsWithBranson->SetOwner(kTRUE);
-       fMuonForwardTrackPairsWithoutBranson->SetOwner(kTRUE);
-
-
+  fMuonForwardTrackPairsWithBranson    -> SetOwner(kTRUE);
+  fMuonForwardTrackPairsWithoutBranson -> SetOwner(kTRUE);
+  
   return kTRUE;
 
 }
@@ -186,6 +175,8 @@ Bool_t AliMuonForwardTrackAnalysis::LoadNextEvent() {
   fInputTreeWithoutBranson->GetEvent(fEv);
   AliDebug(2,Form("**** analyzing event # %4d (%3d tracks) ****", fEv, fMuonForwardTracksWithBranson->GetEntriesFast()));
 
+  AliInfo(Form("**** analyzing event # %6d of %6d ****", fEv, fLastEvent));
+
   fPrimaryVtxX = gRandom->Gaus(0., fXVertResMC);
   fPrimaryVtxY = gRandom->Gaus(0., fYVertResMC);
   fPrimaryVtxZ = gRandom->Gaus(0., fZVertResMC);
@@ -205,7 +196,7 @@ Bool_t AliMuonForwardTrackAnalysis::LoadNextEvent() {
     BuildMuonPairs();
     fNPairsAnalyzedOfEvent = 0;
     fNPairsAnalyzedOfEventAfterCut = 0;
-   // fNPairsOfEvent = fMuonForwardTrackPairsWithBranson->GetEntriesFast();
+    fNPairsOfEvent = fMuonForwardTrackPairsWithBranson->GetEntriesFast();
     while (AnalyzeMuonPair()) continue;
   }
 
@@ -235,11 +226,13 @@ Bool_t AliMuonForwardTrackAnalysis::AnalyzeSingleMuon() {
 
   if (fUseBransonForKinematics) fMFTTrack = fMFTTrackWithBranson;
   else fMFTTrack = fMFTTrackWithoutBranson;
-  if (fMatchTrigger && !fMFTTrack->GetMatchTrigger()) return kTRUE;
+  if (fMFTTrack->GetMatchTrigger() < fTriggerLevel) return kTRUE;
   fMCRefTrack = fMFTTrack->GetMCTrackRef();
 
-  if (fOption!=kPionsKaons && !fMCRefTrack) return kTRUE;
-  if (fOption!=kPionsKaons && fMFTTrack->GetNWrongClustersMC()>fMaxNWrongClustersMC) return kTRUE;
+  if (fMaxNWrongClustersMC<6) {
+    if (!fMCRefTrack) return kTRUE;
+    if (fMFTTrack->GetNWrongClustersMC()>fMaxNWrongClustersMC) return kTRUE;
+  }
 
   if (fMCRefTrack) {
     fHistZOriginSingleMuonsMC  -> Fill(-1.*fMCRefTrack->Vz());
@@ -271,9 +264,9 @@ Bool_t AliMuonForwardTrackAnalysis::AnalyzeSingleMuon() {
   fHistOffsetSingleMuonsX -> Fill(1.e4*dX);
   fHistOffsetSingleMuonsY -> Fill(1.e4*dY);
 
-  if (fOption!=kPionsKaons) fHistSingleMuonsPtRapidityMC-> Fill(fMCRefTrack->Y(), fMCRefTrack->Pt());
-  fHistOffsetSingleMuons      -> Fill(1.e4*offset);
-  fHistWOffsetSingleMuons     -> Fill(weightedOffset);
+  fHistSingleMuonsPtRapidity -> Fill(pMu.Rapidity(), pMu.Pt());
+  fHistOffsetSingleMuons     -> Fill(1.e4*offset);
+  fHistWOffsetSingleMuons    -> Fill(weightedOffset);
   Double_t chi2OverNdf = fMFTTrack->GetGlobalChi2()/Double_t(fMFTTrack->GetNMFTClusters()+fMFTTrack->GetNMUONClusters());
   fHistSingleMuonsOffsetChi2  -> Fill(1.e4*offset, chi2OverNdf);
 
@@ -295,20 +288,13 @@ Bool_t AliMuonForwardTrackAnalysis::AnalyzeMuonPair() {
 
   fNPairsAnalyzedOfEvent++;
 
-  Bool_t passedCut = kFALSE;
-  if (fUseBransonForCut) passedCut = PassedCutMuonPair(fMFTTrackPairWithBranson);
-  else passedCut = PassedCutMuonPair(fMFTTrackPairWithoutBranson);
-
-  if (!passedCut) return kTRUE;
-
   if (fUseBransonForKinematics) fMFTTrackPair = fMFTTrackPairWithBranson;
   else fMFTTrackPair = fMFTTrackPairWithoutBranson;
 
   if ( fMFTTrackPair->GetTrack(0)->GetNWrongClustersMC()>fMaxNWrongClustersMC || 
        fMFTTrackPair->GetTrack(1)->GetNWrongClustersMC()>fMaxNWrongClustersMC ) return kTRUE;
 
-  if (fOption==kResonanceOnly && !fMFTTrackPair->IsResonance()) return kTRUE;
-
+  if (fOption==kResonanceOnly && !fMFTTrackPair->IsResonance())   return kTRUE;
   if (fOption==kResonanceOnly && fMFTTrackPair->GetCharge() != 0) return kTRUE;
 
   Double_t pca[3] = {0};
@@ -319,38 +305,29 @@ Bool_t AliMuonForwardTrackAnalysis::AnalyzeMuonPair() {
 
   fMFTTrackPair -> SetKinem(fPrimaryVtxZ);
 
-  Int_t ptBin = fPtAxisDimuons->FindBin(fMFTTrackPair->GetPt());
+  Bool_t passedCut = kFALSE;
+  if (fUseBransonForCut) passedCut = PassedCutMuonPair(fMFTTrackPairWithBranson);
+  else passedCut = PassedCutMuonPair(fMFTTrackPairWithoutBranson);
+
+  if (!passedCut) return kTRUE;
 
-  if (1<=ptBin && ptBin<=fNPtDimuBins) {
-    fHistMassMuonPairs[ptBin]           -> Fill(fMFTTrackPair->GetMass());
-    fHistMassMuonPairsWithoutMFT[ptBin] -> Fill(fMFTTrackPair->GetMassWithoutMFT(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ));
-    if (fOption!=kPionsKaons) fHistMassMuonPairsMC[ptBin] -> Fill(fMFTTrackPair->GetMassMC());
-    fHistWOffsetMuonPairsAtPrimaryVtx[ptBin] -> Fill(fMFTTrackPair->GetWeightedOffset(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ));
-    fHistWOffsetMuonPairsAtPCA[ptBin]        -> Fill(fMFTTrackPair->GetWeightedOffset(pca[0], pca[1], pca[2]));
-    fHistDistancePrimaryVtxPCA[ptBin]        -> Fill(distancePrimaryVtxPCA*1.e4);
-    fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA[ptBin] -> Fill(fMFTTrackPair->GetWeightedOffset(pca[0], pca[1], pca[2]), distancePrimaryVtxPCA*1.e4);
-    if (fEvalDimuonVtxResolution) {
-      fHistDimuonVtxResolutionX[ptBin]->Fill(pca[0]*1.e4);
-      fHistDimuonVtxResolutionY[ptBin]->Fill(pca[1]*1.e4);
-      fHistDimuonVtxResolutionZ[ptBin]->Fill(pca[2]*1.e4);
-    }
-  }
-  fHistMassMuonPairs[0]           -> Fill(fMFTTrackPair->GetMass());
-  fHistMassMuonPairsWithoutMFT[0] -> Fill(fMFTTrackPair->GetMassWithoutMFT(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ));
-  if (fOption!=kPionsKaons) fHistMassMuonPairsMC[0] -> Fill(fMFTTrackPair->GetMassMC());
-  fHistWOffsetMuonPairsAtPrimaryVtx[0] -> Fill(fMFTTrackPair->GetWeightedOffset(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ));
-  fHistWOffsetMuonPairsAtPCA[0]        -> Fill(fMFTTrackPair->GetWeightedOffset(pca[0], pca[1], pca[2]));
-  fHistDistancePrimaryVtxPCA[0]        -> Fill(distancePrimaryVtxPCA*1.e4);
-  fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA[0] -> Fill(fMFTTrackPair->GetWeightedOffset(pca[0], pca[1], pca[2]), distancePrimaryVtxPCA*1.e4);
-  if (fEvalDimuonVtxResolution) {
-    fHistDimuonVtxResolutionX[0]->Fill(pca[0]*1.e4);
-    fHistDimuonVtxResolutionY[0]->Fill(pca[1]*1.e4);
-    fHistDimuonVtxResolutionZ[0]->Fill(pca[2]*1.e4);
-  }
+  // --------------- Filling dimuon histograms --------------------------------
 
   if (fMFTTrackPair->GetCharge() == 0) {
-    fHistMassMuonPairsVsPt           -> Fill(fMFTTrackPair->GetMass(), fMFTTrackPair->GetPt());
-    fHistMassMuonPairsWithoutMFTVsPt -> Fill(fMFTTrackPair->GetMassWithoutMFT(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ), fMFTTrackPair->GetPt());
+    if (fOption==kResonanceOnly) fHistMassMuonPairsMCVsPt -> Fill(fMFTTrackPair->GetMassMC(), fMFTTrackPair->GetPt());
+    fHistMassMuonPairsVsPt                -> Fill(fMFTTrackPair->GetMass(), fMFTTrackPair->GetPt());
+    fHistMassMuonPairsWithoutMFTVsPt      -> Fill(fMFTTrackPair->GetMassWithoutMFT(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ), fMFTTrackPair->GetPt());
+    fHistWOffsetMuonPairsAtPrimaryVtxVsPt -> Fill(fMFTTrackPair->GetWeightedOffset(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ), fMFTTrackPair->GetPt());
+    fHistWOffsetMuonPairsAtPCAVsPt        -> Fill(fMFTTrackPair->GetWeightedOffsetAtPCA(), fMFTTrackPair->GetPt());
+    fHistDistancePrimaryVtxPCAVsPt        -> Fill(distancePrimaryVtxPCA*1.e4, fMFTTrackPair->GetPt());
+    fHistPCAQualityVsPt                   -> Fill(fMFTTrackPair->GetPCAQuality(), fMFTTrackPair->GetPt());
+    if (fOption==kResonanceOnly) fHistPseudoProperDecayLengthVsPt->Fill(GetPseudoProperDecayLength(fMFTTrackPair, fTrueMass), fMFTTrackPair->GetPt());
+    if (fEvalDimuonVtxResolution) {
+      fHistDimuonVtxResolutionXVsPt->Fill(pca[0]*1.e4, fMFTTrackPair->GetPt());
+      fHistDimuonVtxResolutionYVsPt->Fill(pca[1]*1.e4, fMFTTrackPair->GetPt());
+      fHistDimuonVtxResolutionZVsPt->Fill(pca[2]*1.e4, fMFTTrackPair->GetPt());
+    }
+    fHistRapidityPtMuonPairs -> Fill(fMFTTrackPair->GetRapidityMC(), fMFTTrackPair->GetPt());
   } 
   else if (fMFTTrackPair->GetCharge() == -2) {
     fHistMassMuonPairsVsPtLSm           -> Fill(fMFTTrackPair->GetMass(), fMFTTrackPair->GetPt());
@@ -361,9 +338,6 @@ Bool_t AliMuonForwardTrackAnalysis::AnalyzeMuonPair() {
     fHistMassMuonPairsWithoutMFTVsPtLSp -> Fill(fMFTTrackPair->GetMassWithoutMFT(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ), fMFTTrackPair->GetPt());
   }
   
-  if (fOption!=kPionsKaons) fHistRapidityPtMuonPairs -> Fill(fMFTTrackPair->GetRapidityMC(), fMFTTrackPair->GetPt());
-  else fHistRapidityPtMuonPairs -> Fill(fMFTTrackPair->GetRapidity(), fMFTTrackPair->GetPt()); 
-
   AliDebug(1, Form("mass = %f   MC = %f", fMFTTrackPair->GetMass(), fMFTTrackPair->GetMassMC()));
 
   fNPairsAnalyzedOfEventAfterCut++;
@@ -387,8 +361,7 @@ void AliMuonForwardTrackAnalysis::BuildMuonPairs() {
       AliMuonForwardTrack *track0_WithoutBranson = (AliMuonForwardTrack*) fMuonForwardTracksWithoutBranson->At(iTrack);
       AliMuonForwardTrack *track1_WithoutBranson = (AliMuonForwardTrack*) fMuonForwardTracksWithoutBranson->At(jTrack);
 
-      if (fMatchTrigger) if (!track0_WithBranson->GetMatchTrigger() || !track1_WithBranson->GetMatchTrigger()) continue;
-      if (fOption!=kPionsKaons && (!track0_WithBranson->GetMCTrackRef() || !track1_WithBranson->GetMCTrackRef())) continue;
+      if (track0_WithBranson->GetMatchTrigger()<fTriggerLevel || track1_WithBranson->GetMatchTrigger()<fTriggerLevel) continue;
 
       new ((*fMuonForwardTrackPairsWithBranson)[nMuonPairs]) AliMuonForwardTrackPair(track0_WithBranson, track1_WithBranson);
       new ((*fMuonForwardTrackPairsWithoutBranson)[nMuonPairs]) AliMuonForwardTrackPair(track0_WithoutBranson, track1_WithoutBranson);
@@ -410,15 +383,16 @@ Bool_t AliMuonForwardTrackAnalysis::PassedCutSingleMuon(AliMuonForwardTrack *tra
 
   if (track->Pt()<fPtMinSingleMuons) return kFALSE;
   
-  if (fCutOnOffsetChi2) {
-    Double_t offset = 1.e4*track->GetOffset(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ);
-    Double_t chi2OverNdf = track->GetGlobalChi2() / Double_t(track->GetNMFTClusters()+track->GetNMUONClusters()); 
-    offset /= fScaleOffset;
-    chi2OverNdf /= fScaleChi2;
-    offset -= fCenterOffset;
-    chi2OverNdf -= fCenterChi2;
-    //    printf("cut on offset and chi2: returning %d\n", TMath::Sqrt(offset*offset + chi2OverNdf*chi2OverNdf)>fRadiusCut);
-    if (TMath::Sqrt(offset*offset + chi2OverNdf*chi2OverNdf) > fRadiusCut) return kFALSE;
+  Double_t offset = 1.e4*track->GetOffset(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ);
+  Double_t chi2OverNdf = track->GetGlobalChi2() / Double_t(track->GetNMFTClusters()+track->GetNMUONClusters()); 
+  offset /= fMaxOffsetSingleMuons;
+  chi2OverNdf /= fMaxChi2SingleMuons;
+
+  if (fCorrelateCutOnOffsetChi2) {
+    if (TMath::Sqrt(offset*offset + chi2OverNdf*chi2OverNdf) > 1) return kFALSE;
+  }
+  else {
+    if (offset>1 || chi2OverNdf>1) return kFALSE;
   }
 
   return kTRUE;
@@ -429,8 +403,42 @@ Bool_t AliMuonForwardTrackAnalysis::PassedCutSingleMuon(AliMuonForwardTrack *tra
 
 Bool_t AliMuonForwardTrackAnalysis::PassedCutMuonPair(AliMuonForwardTrackPair *pair) {
 
-  return PassedCutSingleMuon(pair->GetTrack(0)) && PassedCutSingleMuon(pair->GetTrack(1));
+  if (!PassedCutSingleMuon(pair->GetTrack(0)) || !PassedCutSingleMuon(pair->GetTrack(1))) return kFALSE;
+
+  if (pair->GetMass()>fMassMax || pair->GetMass()<fMassMin) return kFALSE;
 
+  if (pair->GetWeightedOffset(fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ) > fMaxWOffsetMuonPairsAtPrimaryVtx) return kFALSE;
+  if (pair->GetWeightedOffsetAtPCA() > fMaxWOffsetMuonPairsAtPCA) return kFALSE;
+
+  Double_t pca[3] = {0};
+  pair -> GetPointOfClosestApproach(pca);
+  Double_t distancePrimaryVtxPCA = TMath::Sqrt(TMath::Power(fPrimaryVtxX-pca[0],2)+
+                                              TMath::Power(fPrimaryVtxY-pca[1],2)+
+                                              TMath::Power(fPrimaryVtxZ-pca[2],2));
+
+  if (distancePrimaryVtxPCA > fMaxDistancePrimaryVtxPCA) return kFALSE;
+  if (pair->GetPCAQuality() < fMinPCAQuality) return kFALSE;
+
+  return kTRUE;
+
+}
+
+//====================================================================================================================================================
+
+Double_t AliMuonForwardTrackAnalysis::GetPseudoProperDecayLength(AliMuonForwardTrackPair *pair, Double_t trueMass) {
+
+  Double_t pca[3] = {0};
+  pair -> GetPointOfClosestApproach(pca);
+
+  TVector2 vecVertexPCA(pca[0]-fPrimaryVtxX, pca[1]-fPrimaryVtxY);
+  TVector2 dimuonPt(pair->GetPx(), pair->GetPy());
+  dimuonPt.Unit();
+  
+  Double_t l_xy = vecVertexPCA*dimuonPt;
+  Double_t pseudoProperDecayLength = (l_xy * trueMass / pair->GetPt()) * 1.e4 ; // in micron
+
+  return pseudoProperDecayLength;
+  
 }
 
 //====================================================================================================================================================
@@ -441,41 +449,35 @@ void AliMuonForwardTrackAnalysis::Terminate(Char_t *outputFileName) {
 
   printf("Writing output objects to file %s\n", fileOut->GetName());
 
-  fHistOffsetSingleMuonsX -> Write();
-  fHistOffsetSingleMuonsY -> Write();
-  fHistOffsetSingleMuons  -> Write();
-  fHistWOffsetSingleMuons -> Write();
-  fHistErrorSingleMuonsX  -> Write();
-  fHistErrorSingleMuonsY  -> Write();
+  fHistOffsetSingleMuonsX  -> Write();
+  fHistOffsetSingleMuonsY  -> Write();
+  fHistErrorSingleMuonsX   -> Write();
+  fHistErrorSingleMuonsY   -> Write();
+  fHistOffsetSingleMuons   -> Write();
+  fHistWOffsetSingleMuons  -> Write();
 
-  fHistSingleMuonsPtRapidityMC -> Write();
+  fHistSingleMuonsPtRapidity -> Write();
   fHistSingleMuonsOffsetChi2 -> Write();
-
   fHistZOriginSingleMuonsMC  -> Write();
   fHistZROriginSingleMuonsMC -> Write();
 
-  for (Int_t iPtBin=0; iPtBin<fNPtDimuBins+1; iPtBin++) {
-    fHistMassMuonPairs[iPtBin]                                -> Write();
-    fHistMassMuonPairsWithoutMFT[iPtBin]                      -> Write();
-    fHistMassMuonPairsMC[iPtBin]                              -> Write();
-    fHistWOffsetMuonPairsAtPrimaryVtx[iPtBin]                 -> Write();
-    fHistWOffsetMuonPairsAtPCA[iPtBin]                        -> Write();
-    fHistDistancePrimaryVtxPCA[iPtBin]                        -> Write();
-    fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA[iPtBin] -> Write();
-    if (fEvalDimuonVtxResolution) {
-      fHistDimuonVtxResolutionX[iPtBin] -> Write();
-      fHistDimuonVtxResolutionY[iPtBin] -> Write();
-      fHistDimuonVtxResolutionZ[iPtBin] -> Write();
-    }
+  fHistMassMuonPairsVsPt                -> Write();
+  fHistMassMuonPairsWithoutMFTVsPt      -> Write();
+  fHistMassMuonPairsVsPtLSp             -> Write();
+  fHistMassMuonPairsWithoutMFTVsPtLSp   -> Write();
+  fHistMassMuonPairsVsPtLSm             -> Write();
+  fHistMassMuonPairsWithoutMFTVsPtLSm   -> Write();
+  fHistMassMuonPairsMCVsPt              -> Write();
+  fHistWOffsetMuonPairsAtPrimaryVtxVsPt -> Write();
+  fHistWOffsetMuonPairsAtPCAVsPt        -> Write();
+  fHistDistancePrimaryVtxPCAVsPt        -> Write();
+  fHistPCAQualityVsPt                   -> Write();
+  if (fOption==kResonanceOnly) fHistPseudoProperDecayLengthVsPt->Write();
+  if (fEvalDimuonVtxResolution) {
+    fHistDimuonVtxResolutionXVsPt -> Write();
+    fHistDimuonVtxResolutionYVsPt -> Write();
+    fHistDimuonVtxResolutionZVsPt -> Write();
   }
-
-  fHistMassMuonPairsVsPt           -> Write();
-  fHistMassMuonPairsWithoutMFTVsPt -> Write();
-  fHistMassMuonPairsVsPtLSp           -> Write();
-  fHistMassMuonPairsWithoutMFTVsPtLSp -> Write();
-  fHistMassMuonPairsVsPtLSm           -> Write();
-  fHistMassMuonPairsWithoutMFTVsPtLSm -> Write();
-       
   fHistRapidityPtMuonPairs -> Write();
 
   fileOut -> Close();
@@ -486,6 +488,8 @@ void AliMuonForwardTrackAnalysis::Terminate(Char_t *outputFileName) {
 
 void AliMuonForwardTrackAnalysis::BookHistos() {
 
+  // -------------------- single muons
+
   fHistOffsetSingleMuonsX = new TH1D("fHistOffsetSingleMuonsX", "Offset for single muons along X",  200, -1000, 1000);
   fHistOffsetSingleMuonsY = new TH1D("fHistOffsetSingleMuonsY", "Offset for single muons along Y",  200, -1000, 1000);
   fHistErrorSingleMuonsX  = new TH1D("fHistErrorSingleMuonsX",  "Coordinate Error for single muons along X",  200, 0, 1000);
@@ -493,7 +497,7 @@ void AliMuonForwardTrackAnalysis::BookHistos() {
   fHistOffsetSingleMuons  = new TH1D("fHistOffsetSingleMuons",  "Offset for single muons",          200, 0, 2000);
   fHistWOffsetSingleMuons = new TH1D("fHistWOffsetSingleMuons", "Weighted Offset for single muons", 300, 0, 15);  
 
-  fHistSingleMuonsPtRapidityMC = new TH2D("fHistSingleMuonsPtRapidityMC", "Phase Space for single muons", 100, -4.5, -2., 100, 0., 10.);
+  fHistSingleMuonsPtRapidity = new TH2D("fHistSingleMuonsPtRapidity", "Phase Space for single muons", 100, -4.5, -2., 100, 0., 10.);
   fHistSingleMuonsOffsetChi2 = new TH2D("fHistSingleMuonsOffsetChi2", "Offset vs #chi^{2}/ndf for single muons", 400, 0, 4000, 200, 0, 10);
   fHistZOriginSingleMuonsMC  = new TH1D("fHistZOriginSingleMuonsMC",  "Z origin for single muons (from MC)",   1000, 0., 500.);
   fHistZROriginSingleMuonsMC = new TH2D("fHistZROriginSingleMuonsMC", "Z-R origin for single muons (from MC)", 1000, 0., 500., 1000, 0., 100.);
@@ -505,8 +509,8 @@ void AliMuonForwardTrackAnalysis::BookHistos() {
   fHistOffsetSingleMuons  -> SetXTitle("Offset  [#mum]");
   fHistWOffsetSingleMuons -> SetXTitle("Weighted Offset");
 
-  fHistSingleMuonsPtRapidityMC -> SetXTitle("y^{#mu}");
-  fHistSingleMuonsPtRapidityMC -> SetYTitle("p_{T}^{#mu}  [GeV/c]");
+  fHistSingleMuonsPtRapidity -> SetXTitle("y^{#mu}");
+  fHistSingleMuonsPtRapidity -> SetYTitle("p_{T}^{#mu}  [GeV/c]");
   fHistSingleMuonsOffsetChi2 -> SetXTitle("Offset  [#mum]");
   fHistSingleMuonsOffsetChi2 -> SetYTitle("#chi^{2}/ndf");
 
@@ -521,148 +525,83 @@ void AliMuonForwardTrackAnalysis::BookHistos() {
   fHistOffsetSingleMuons  -> Sumw2();
   fHistWOffsetSingleMuons -> Sumw2();
 
+  fHistSingleMuonsPtRapidity -> Sumw2();
+  fHistSingleMuonsOffsetChi2 -> Sumw2();
   fHistZOriginSingleMuonsMC  -> Sumw2();
   fHistZROriginSingleMuonsMC -> Sumw2();
 
-  fHistSingleMuonsPtRapidityMC -> Sumw2();
-  fHistSingleMuonsOffsetChi2 -> Sumw2();
-    
-  //--------------------------------------------
-
-  for (Int_t iPtBin=0; iPtBin<=fNPtDimuBins+1; iPtBin++) {
-
-    if (!iPtBin) {
-      fHistMassMuonPairs[iPtBin]          = new TH1D(Form("fHistMassMuonPairs_%d",iPtBin),           
-                                                     "Dimuon Mass (MUON+MFT) (All p_{T}^{#mu#mu})",
-                                                     fNMassBins, fMassMin, fMassMax);
-      fHistMassMuonPairsWithoutMFT[iPtBin] = new TH1D(Form("fHistMassMuonPairsWithoutMFT_%d",iPtBin), 
-                                                     "Dimuon Mass (MUON only) (All p_{T}^{#mu#mu})",
-                                                     fNMassBins, fMassMin, fMassMax);
-      fHistMassMuonPairsMC[iPtBin]         = new TH1D(Form("fHistMassMuonPairsMC_%d",iPtBin),         
-                                                     "Dimuon Mass (MC) (All p_{T}^{#mu#mu})",
-                                                     fNMassBins, fMassMin, fMassMax);
-      fHistWOffsetMuonPairsAtPrimaryVtx[iPtBin] = new TH1D(Form("fHistWOffsetMuonPairsAtPrimaryVtx_%d",iPtBin),        
-                                                          "Weighted Offset for Muon Pairs at Primary Vertex (All p_{T}^{#mu#mu})",
-                                                          300, 0, 60);
-      fHistWOffsetMuonPairsAtPCA[iPtBin]        = new TH1D(Form("fHistWOffsetMuonPairsAtPCA_%d",iPtBin),        
-                                                          "Weighted Offset for Muon Pairs at PCA (All p_{T}^{#mu#mu})",
-                                                          300, 0, 60);
-      fHistDistancePrimaryVtxPCA[iPtBin]        = new TH1D(Form("fHistDistancePrimaryVtxPCA_%d",iPtBin),        
-                                                          "Distance between PCA and primary vertex (All p_{T}^{#mu#mu})",
-                                                          1000, 0, 50000);
-      fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA[iPtBin] = new TH2D(Form("fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA_%d",iPtBin),
-                                                                          "DistancePrimaryVtxPCA vs WOffsetMuonPairsAtPCA (All p_{T}^{#mu#mu})",
-                                                                          300, 0, 60, 1000, 0, 50000);
-      if (fEvalDimuonVtxResolution) {
-       fHistDimuonVtxResolutionX[iPtBin] = new TH1D(Form("fHistDimuonVtxResolutionX_%d",iPtBin),        
-                                                    "Dimuon Vtx offset along X (All p_{T}^{#mu#mu})",
-                                                    2000, -1000, 1000);
-       fHistDimuonVtxResolutionY[iPtBin] = new TH1D(Form("fHistDimuonVtxResolutionY_%d",iPtBin),        
-                                                    "Dimuon Vtx offset along Y (All p_{T}^{#mu#mu})",
-                                                    2000, -1000, 1000);
-       fHistDimuonVtxResolutionZ[iPtBin] = new TH1D(Form("fHistDimuonVtxResolutionZ_%d",iPtBin),        
-                                                    "Dimuon Vtx offset along Z (All p_{T}^{#mu#mu})",
-                                                    2000, -10000, 10000);
-      }
-    }
-
-    else {
-      Double_t ptMin = fPtAxisDimuons->GetBinLowEdge(iPtBin);
-      Double_t ptMax = fPtAxisDimuons->GetBinUpEdge(iPtBin);
-      fHistMassMuonPairs[iPtBin]          = new TH1D(Form("fHistMassMuonPairs_%d",iPtBin),           
-                                                     Form("Dimuon Mass (MUON+MFT) (%3.1f < p_{T}^{#mu#mu} < %3.1f GeV/c)",ptMin,ptMax), 
-                                                     fNMassBins, fMassMin, fMassMax);
-      fHistMassMuonPairsWithoutMFT[iPtBin] = new TH1D(Form("fHistMassMuonPairsWithoutMFT_%d",iPtBin), 
-                                                     Form("Dimuon Mass (MUON only) (%3.1f < p_{T}^{#mu#mu} < %3.1f GeV/c)",ptMin,ptMax), 
-                                                     fNMassBins, fMassMin, fMassMax);
-      fHistMassMuonPairsMC[iPtBin]         = new TH1D(Form("fHistMassMuonPairsMC_%d",iPtBin),         
-                                                     Form("Dimuon Mass (MC) (%3.1f < p_{T}^{#mu#mu} < %3.1f GeV/c)",ptMin,ptMax), 
-                                                     fNMassBins, fMassMin, fMassMax);
-      fHistWOffsetMuonPairsAtPrimaryVtx[iPtBin] = new TH1D(Form("fHistWOffsetMuonPairsAtPrimaryVtx_%d",iPtBin),        
-                                                          Form("Weighted Offset for Muon Pairs at Primary Vertex (%3.1f < p_{T}^{#mu#mu} < %3.1f GeV/c)",
-                                                               ptMin,ptMax), 300, 0, 60);
-      fHistWOffsetMuonPairsAtPCA[iPtBin]        = new TH1D(Form("fHistWOffsetMuonPairsAtPCA_%d",iPtBin),        
-                                                          Form("Weighted Offset for Muon Pairs at PCA (%3.1f < p_{T}^{#mu#mu} < %3.1f GeV/c)",
-                                                               ptMin,ptMax), 300, 0, 60);
-      fHistDistancePrimaryVtxPCA[iPtBin]        = new TH1D(Form("fHistDistancePrimaryVtxPCA_%d",iPtBin),        
-                                                          Form("Distance between PCA and primary vertex (%3.1f < p_{T}^{#mu#mu} < %3.1f GeV/c)",
-                                                               ptMin,ptMax), 1000, 0, 50000);
-      fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA[iPtBin] = new TH2D(Form("fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA_%d",iPtBin),
-                                                                          Form("DistancePrimaryVtxPCA vs WOffsetMuonPairsAtPCA (%3.1f < p_{T}^{#mu#mu} < %3.1f GeV/c)",
-                                                                               ptMin,ptMax), 300, 0, 60, 1000, 0, 50000);
-      if (fEvalDimuonVtxResolution) {
-       fHistDimuonVtxResolutionX[iPtBin] = new TH1D(Form("fHistDimuonVtxResolutionX_%d",iPtBin),        
-                                                    Form("Dimuon Vtx offset along X (%3.1f < p_{T}^{#mu#mu} < %3.1f GeV/c)",ptMin,ptMax),
-                                                    2000, -1000, 1000);
-       fHistDimuonVtxResolutionY[iPtBin] = new TH1D(Form("fHistDimuonVtxResolutionY_%d",iPtBin),        
-                                                    Form("Dimuon Vtx offset along Y (%3.1f < p_{T}^{#mu#mu} < %3.1f GeV/c)",ptMin,ptMax),
-                                                    2000, -1000, 1000);
-       fHistDimuonVtxResolutionZ[iPtBin] = new TH1D(Form("fHistDimuonVtxResolutionZ_%d",iPtBin),        
-                                                    Form("Dimuon Vtx offset along Z (%3.1f < p_{T}^{#mu#mu} < %3.1f GeV/c)",ptMin,ptMax),
-                                                    2000, -10000, 10000);
-      }
-    }
+  // -------------------- muon pairs
+
+  Int_t nBinsPt = 20; Double_t ptMin = 0., ptMax = 10.;   // dimuon pt
+
+  fHistMassMuonPairsVsPt               = new TH2D("fHistMassMuonPairsVsPt", "Dimuon Mass (MUON+MFT) vs p_{T}^{#mu#mu}", 1000, 0, 10, nBinsPt, ptMin, ptMax);
+  fHistMassMuonPairsWithoutMFTVsPt      = new TH2D("fHistMassMuonPairsWithoutMFTVsPt", "Dimuon Mass (MUON only) vs p_{T}^{#mu#mu}", 1000, 0, 10, nBinsPt, ptMin, ptMax); 
+  fHistMassMuonPairsVsPtLSp            = new TH2D("fHistMassMuonPairsVsPtLSp", "Dimuon Mass (MUON+MFT) vs p_{T}^{#mu#mu} Like-Sign ++", 1000, 0, 10, nBinsPt, ptMin, ptMax);
+  fHistMassMuonPairsWithoutMFTVsPtLSp   = new TH2D("fHistMassMuonPairsWithoutMFTVsPtLSp", "Dimuon Mass (MUON only) vs p_{T}^{#mu#mu} Like-Sign ++", 1000, 0, 10, nBinsPt, ptMin, ptMax); 
+  fHistMassMuonPairsVsPtLSm            = new TH2D("fHistMassMuonPairsVsPtLSm", "Dimuon Mass (MUON+MFT) vs p_{T}^{#mu#mu} Like-Sign --", 1000, 0, 10, nBinsPt, ptMin, ptMax);
+  fHistMassMuonPairsWithoutMFTVsPtLSm   = new TH2D("fHistMassMuonPairsWithoutMFTVsPtLSm", "Dimuon Mass (MUON only) vs p_{T}^{#mu#mu} Like-Sign --", 1000, 0, 10, nBinsPt, ptMin, ptMax); 
+  fHistMassMuonPairsMCVsPt              = new TH2D("fHistMassMuonPairsMCVsPt", "Dimuon Mass (MC) vs p_{T}^{#mu#mu}", 1000, 0, 10, nBinsPt, ptMin, ptMax); 
+  fHistWOffsetMuonPairsAtPrimaryVtxVsPt = new TH2D("fHistWOffsetMuonPairsAtPrimaryVtxVsPt", "Weighted Offset for Muon Pairs at Primary Vertex vs p_{T}^{#mu#mu}", 300, 0, 60, nBinsPt, ptMin, ptMax);
+  fHistWOffsetMuonPairsAtPCAVsPt        = new TH2D("fHistWOffsetMuonPairsAtPCAVsPt", "Weighted Offset for Muon Pairs at PCA vs p_{T}^{#mu#mu}", 300, 0, 60, nBinsPt, ptMin, ptMax);
+  fHistDistancePrimaryVtxPCAVsPt        = new TH2D("fHistDistancePrimaryVtxPCA_%d", "Distance between PCA and primary vertex vs p_{T}^{#mu#mu}", 1000, 0, 50000, nBinsPt, ptMin, ptMax);
+  fHistPCAQualityVsPt                   = new TH2D("fHistPCAQualityVsPt", "PCA Quality vs p_{T}^{#mu#mu}", 200, 0, 1, nBinsPt, ptMin, ptMax);
+  fHistPseudoProperDecayLengthVsPt      = new TH2D("fHistPseudoProperDecayLengthVsPt", "Pseudo proper decay length vs p_{T}^{#mu#mu}", 1000, -5000, 5000, nBinsPt, ptMin, ptMax);
+  fHistDimuonVtxResolutionXVsPt = new TH2D("fHistDimuonVtxResolutionXVsPt", "Dimuon Vtx offset along X w.r.t. true Vtx vs p_{T}^{#mu#mu}", 2000, -1000, 1000, nBinsPt, ptMin, ptMax);
+  fHistDimuonVtxResolutionYVsPt = new TH2D("fHistDimuonVtxResolutionYVsPt", "Dimuon Vtx offset along Y w.r.t. true Vtx vs p_{T}^{#mu#mu}", 2000, -1000, 1000, nBinsPt, ptMin, ptMax);
+  fHistDimuonVtxResolutionZVsPt = new TH2D("fHistDimuonVtxResolutionZVsPt", "Dimuon Vtx offset along Z w.r.t. true Vtx vs p_{T}^{#mu#mu}", 2000, -1000, 1000, nBinsPt, ptMin, ptMax);
     
-    fHistMassMuonPairs[iPtBin]                -> SetXTitle("Mass  [GeV/c^{2}]");
-    fHistMassMuonPairsWithoutMFT[iPtBin]      -> SetXTitle("Mass  [GeV/c^{2}]");
-    fHistMassMuonPairsMC[iPtBin]              -> SetXTitle("Mass  [GeV/c^{2}]");    
-    fHistWOffsetMuonPairsAtPrimaryVtx[iPtBin] -> SetXTitle("Weighted Offset at Primary Vtx");
-    fHistWOffsetMuonPairsAtPCA[iPtBin]        -> SetXTitle("Weighted Offset at PCA");
-    fHistDistancePrimaryVtxPCA[iPtBin]        -> SetXTitle("PCA - Primary Vtx [#mum]");
-    fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA[iPtBin] -> SetXTitle("Weighted Offset at PCA");
-    fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA[iPtBin] -> SetYTitle("PCA - Primary Vtx [#mum]");
-    if (fEvalDimuonVtxResolution) {
-      fHistDimuonVtxResolutionX[iPtBin] -> SetXTitle("Offset  [#mum]");
-      fHistDimuonVtxResolutionY[iPtBin] -> SetXTitle("Offset  [#mum]");
-      fHistDimuonVtxResolutionZ[iPtBin] -> SetXTitle("Offset  [#mum]");
-    }
-
-    fHistMassMuonPairs[iPtBin]                -> Sumw2();
-    fHistMassMuonPairsWithoutMFT[iPtBin]      -> Sumw2();
-    fHistMassMuonPairsMC[iPtBin]              -> Sumw2();    
-    fHistWOffsetMuonPairsAtPrimaryVtx[iPtBin] -> Sumw2();
-    fHistWOffsetMuonPairsAtPCA[iPtBin]        -> Sumw2();
-    fHistDistancePrimaryVtxPCA[iPtBin]        -> Sumw2();
-    fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA[iPtBin] -> Sumw2();
-    if (fEvalDimuonVtxResolution) {
-      fHistDimuonVtxResolutionX[iPtBin] -> Sumw2();
-      fHistDimuonVtxResolutionY[iPtBin] -> Sumw2();
-      fHistDimuonVtxResolutionZ[iPtBin] -> Sumw2();
-    }
-
-  }
-  
-  fHistMassMuonPairsVsPt           = new TH2D("fHistMassMuonPairsVsPt",           "Dimuon Mass (MUON+MFT) vs p_{T}",  fNMassBins, fMassMin, fMassMax, 20, 0., 10.);
-  fHistMassMuonPairsWithoutMFTVsPt = new TH2D("fHistMassMuonPairsWithoutMFTVsPt", "Dimuon Mass (MUON only) vs p_{T}", fNMassBins, fMassMin, fMassMax, 20, 0., 10.);
-       fHistMassMuonPairsVsPtLSp           = new TH2D("fHistMassMuonPairsVsPtLSp",           "Dimuon Mass (MUON+MFT) vs p_{T} Like sign ++",  fNMassBins, fMassMin, fMassMax, 20, 0., 10.);
-       fHistMassMuonPairsWithoutMFTVsPtLSp = new TH2D("fHistMassMuonPairsWithoutMFTVsPtLSp", "Dimuon Mass (MUON only) vs p_{T} Like sign ++", fNMassBins, fMassMin, fMassMax, 20, 0., 10.);
-       fHistMassMuonPairsVsPtLSm           = new TH2D("fHistMassMuonPairsVsPtLSm",           "Dimuon Mass (MUON+MFT) vs p_{T} Like sign --",  fNMassBins, fMassMin, fMassMax, 20, 0., 10.);
-       fHistMassMuonPairsWithoutMFTVsPtLSm = new TH2D("fHistMassMuonPairsWithoutMFTVsPtLSm", "Dimuon Mass (MUON only) vs p_{T} Like sign --", fNMassBins, fMassMin, fMassMax, 20, 0., 10.);
-       
-  fHistMassMuonPairsVsPt           -> SetXTitle("Mass  [GeV/c^{2}]");
-  fHistMassMuonPairsWithoutMFTVsPt -> SetXTitle("Mass  [GeV/c^{2}]");
-  fHistMassMuonPairsVsPt           -> SetYTitle("p_{T}  [GeV/c]");
-  fHistMassMuonPairsWithoutMFTVsPt -> SetYTitle("p_{T}  [GeV/c]");
-  fHistMassMuonPairsVsPt           -> Sumw2();
-  fHistMassMuonPairsWithoutMFTVsPt -> Sumw2();
-       fHistMassMuonPairsVsPtLSp           -> SetXTitle("Mass  [GeV/c^{2}]");
-       fHistMassMuonPairsWithoutMFTVsPtLSp -> SetXTitle("Mass  [GeV/c^{2}]");
-       fHistMassMuonPairsVsPtLSp           -> SetYTitle("p_{T}  [GeV/c]");
-       fHistMassMuonPairsWithoutMFTVsPtLSp -> SetYTitle("p_{T}  [GeV/c]");
-       fHistMassMuonPairsVsPtLSp           -> Sumw2();
-       fHistMassMuonPairsWithoutMFTVsPtLSp -> Sumw2();
-       fHistMassMuonPairsVsPtLSm           -> SetXTitle("Mass  [GeV/c^{2}]");
-       fHistMassMuonPairsWithoutMFTVsPtLSm -> SetXTitle("Mass  [GeV/c^{2}]");
-       fHistMassMuonPairsVsPtLSm           -> SetYTitle("p_{T}  [GeV/c]");
-       fHistMassMuonPairsWithoutMFTVsPtLSm -> SetYTitle("p_{T}  [GeV/c]");
-       fHistMassMuonPairsVsPtLSm           -> Sumw2();
-       fHistMassMuonPairsWithoutMFTVsPtLSm -> Sumw2();
-       
-  if (fOption==kPionsKaons) fHistRapidityPtMuonPairs = new TH2D("fHistRapidityPtMuonPairs", "Dimuon Phase Space (rec)", 20, -4.5, -2., 20, 0., 10.); 
-  else                      fHistRapidityPtMuonPairs = new TH2D("fHistRapidityPtMuonPairs", "Dimuon Phase Space (MC)", 100, -4.5, -2., 100, 0., 10.); 
-  fHistRapidityPtMuonPairs   -> SetXTitle("Rapidity");
-  fHistRapidityPtMuonPairs   -> SetYTitle("p_{T}  [GeV/c]");
-  fHistRapidityPtMuonPairs   -> Sumw2();
+  fHistMassMuonPairsVsPt                -> SetXTitle("Mass  [GeV/c^{2}]");
+  fHistMassMuonPairsWithoutMFTVsPt      -> SetXTitle("Mass  [GeV/c^{2}]");
+  fHistMassMuonPairsVsPtLSp             -> SetXTitle("Mass  [GeV/c^{2}]");
+  fHistMassMuonPairsWithoutMFTVsPtLSp   -> SetXTitle("Mass  [GeV/c^{2}]");
+  fHistMassMuonPairsVsPtLSm             -> SetXTitle("Mass  [GeV/c^{2}]");
+  fHistMassMuonPairsWithoutMFTVsPtLSm   -> SetXTitle("Mass  [GeV/c^{2}]");
+  fHistMassMuonPairsMCVsPt              -> SetXTitle("Mass  [GeV/c^{2}]");    
+  fHistWOffsetMuonPairsAtPrimaryVtxVsPt -> SetXTitle("Weighted Offset at Primary Vtx");
+  fHistWOffsetMuonPairsAtPCAVsPt        -> SetXTitle("Weighted Offset at PCA");
+  fHistDistancePrimaryVtxPCAVsPt        -> SetXTitle("PCA - Primary Vtx [#mum]");
+  fHistPCAQualityVsPt                   -> SetXTitle("PCA Quality");
+  fHistPseudoProperDecayLengthVsPt      -> SetXTitle("l_{xy}  [#mum]");
+  fHistDimuonVtxResolutionXVsPt         -> SetXTitle("Offset  [#mum]");
+  fHistDimuonVtxResolutionYVsPt         -> SetXTitle("Offset  [#mum]");
+  fHistDimuonVtxResolutionZVsPt         -> SetXTitle("Offset  [#mum]");
+
+  fHistMassMuonPairsVsPt                -> SetYTitle("p_{T}  [GeV/c]");
+  fHistMassMuonPairsWithoutMFTVsPt      -> SetYTitle("p_{T}  [GeV/c]");
+  fHistMassMuonPairsVsPtLSp             -> SetYTitle("p_{T}  [GeV/c]");
+  fHistMassMuonPairsWithoutMFTVsPtLSp   -> SetYTitle("p_{T}  [GeV/c]");
+  fHistMassMuonPairsVsPtLSm             -> SetYTitle("p_{T}  [GeV/c]");
+  fHistMassMuonPairsWithoutMFTVsPtLSm   -> SetYTitle("p_{T}  [GeV/c]");
+  fHistMassMuonPairsMCVsPt              -> SetYTitle("p_{T}  [GeV/c]");
+  fHistWOffsetMuonPairsAtPrimaryVtxVsPt -> SetYTitle("p_{T}  [GeV/c]");
+  fHistWOffsetMuonPairsAtPCAVsPt        -> SetYTitle("p_{T}  [GeV/c]");
+  fHistDistancePrimaryVtxPCAVsPt        -> SetYTitle("p_{T}  [GeV/c]");  
+  fHistPCAQualityVsPt                   -> SetYTitle("p_{T}  [GeV/c]");
+  fHistPseudoProperDecayLengthVsPt      -> SetYTitle("p_{T}  [GeV/c]");
+  fHistDimuonVtxResolutionXVsPt         -> SetYTitle("p_{T}  [GeV/c]");
+  fHistDimuonVtxResolutionYVsPt         -> SetYTitle("p_{T}  [GeV/c]");
+  fHistDimuonVtxResolutionZVsPt         -> SetYTitle("p_{T}  [GeV/c]");
+
+  fHistMassMuonPairsVsPt                -> Sumw2();
+  fHistMassMuonPairsWithoutMFTVsPt      -> Sumw2();
+  fHistMassMuonPairsVsPtLSp             -> Sumw2();
+  fHistMassMuonPairsWithoutMFTVsPtLSp   -> Sumw2();
+  fHistMassMuonPairsVsPtLSm             -> Sumw2();
+  fHistMassMuonPairsWithoutMFTVsPtLSm   -> Sumw2();
+  fHistMassMuonPairsMCVsPt              -> Sumw2();    
+  fHistWOffsetMuonPairsAtPrimaryVtxVsPt -> Sumw2();
+  fHistWOffsetMuonPairsAtPCAVsPt        -> Sumw2();
+  fHistDistancePrimaryVtxPCAVsPt        -> Sumw2();
+  fHistPCAQualityVsPt                   -> Sumw2();
+  fHistPseudoProperDecayLengthVsPt      -> Sumw2();
+  fHistDimuonVtxResolutionXVsPt         -> Sumw2();
+  fHistDimuonVtxResolutionYVsPt         -> Sumw2();
+  fHistDimuonVtxResolutionZVsPt         -> Sumw2();
+
+  fHistRapidityPtMuonPairs = new TH2D("fHistRapidityPtMuonPairs", "Dimuon Phase Space (rec)", 20, -4.5, -2., 20, 0., 10.); 
+  fHistRapidityPtMuonPairs -> SetXTitle("Rapidity");
+  fHistRapidityPtMuonPairs -> SetYTitle("p_{T}  [GeV/c]");
+  fHistRapidityPtMuonPairs -> Sumw2();
 
 }
 
index fb6b789..77d497c 100644 (file)
@@ -31,7 +31,7 @@ class AliMuonForwardTrackAnalysis : public TObject {
 
 public:
 
-  enum {kNoOption, kPionsKaons, kResonanceOnly};
+  enum {kNoOption, kResonanceOnly};
   
   AliMuonForwardTrackAnalysis();
   
@@ -48,11 +48,11 @@ public:
 
   Int_t GetNTracksAnalyzed() { return fNTracksAnalyzed; }
 
-  void SetMassRange(Int_t nBins, Double_t min, Double_t max) { fNMassBins=nBins; fMassMin=min; fMassMax=max; }
-  void SetPtDimuRange(Int_t nBins, Double_t min, Double_t max) { fNPtDimuBins=TMath::Min(nBins,fNMaxPtBinsDimuons) ; fPtDimuMin=min; fPtDimuMax=max; }
+  void SetMassRange(Double_t min, Double_t max) { fMassMin=min; fMassMax=max; }
+  void SetTrueMass(Double_t mass) { fTrueMass = mass; }
   void SetSingleMuonAnalysis(Bool_t singleMuonAnalysis) { fSingleMuonAnalysis = singleMuonAnalysis; }
   void SetMuonPairAnalysis(Bool_t muonPairAnalysis) { fMuonPairAnalysis = muonPairAnalysis; }
-  void SetMatchTrigger(Bool_t matchTrigger) { fMatchTrigger = matchTrigger; }
+  void SetMatchTrigger(Int_t triggerLevel) { fTriggerLevel = triggerLevel; }
 
   Bool_t AnalyzeSingleMuon();
   Bool_t AnalyzeMuonPair();
@@ -66,8 +66,17 @@ public:
   void SetVertResMC(Double_t xRes, Double_t yRes, Double_t zRes) { fXVertResMC=xRes; fYVertResMC=yRes; fZVertResMC=zRes; }
 
   void SetOption(Int_t option) { fOption = option; }
+
   void SetMaxNWrongClustersMC(Int_t nClusters) { fMaxNWrongClustersMC = nClusters; }
-  void SetPtMinSingleMuons(Double_t ptMin) { fPtMinSingleMuons = ptMin; }
+  void SetMinPtSingleMuons(Double_t ptMin) { fPtMinSingleMuons = ptMin; }
+  void SetMaxChi2SingleMuons(Double_t chi2Max) { fMaxChi2SingleMuons = chi2Max; }
+  void SetMaxOffsetSingleMuons(Double_t offsetMax) { fMaxOffsetSingleMuons = offsetMax; }
+  void CorrelateCutOnOffsetChi2(Bool_t option) { fCorrelateCutOnOffsetChi2 = option; }
+
+  void SetMaxWOffsetMuonPairsAtPrimaryVtx(Double_t wOffsetMax) { fMaxWOffsetMuonPairsAtPrimaryVtx = wOffsetMax; }
+  void SetMaxWOffsetMuonPairsAtPCA(Double_t wOffsetMax) { fMaxWOffsetMuonPairsAtPCA = wOffsetMax; }
+  void SetMaxDistancePrimaryVtxPCA(Double_t distanceMax) { fMaxDistancePrimaryVtxPCA = distanceMax; }
+  void SetMinPCAQuality(Double_t minQuality) { fMinPCAQuality = minQuality; }
 
   void ReadEvents(Int_t firstEv, Int_t lastEv) { fFirstEvent = firstEv; fLastEvent = lastEv; }
   Int_t GetFirstEvent() { return fFirstEvent; }
@@ -75,11 +84,10 @@ public:
 
   void UseBransonForCut(Bool_t useBranson) { fUseBransonForCut = useBranson; }
   void UseBransonForKinematics(Bool_t useBranson) { fUseBransonForKinematics = useBranson; }
-  void UseCutOnOffsetChi2(Bool_t useCut) { fCutOnOffsetChi2 = useCut; }
 
-private:
+  Double_t GetPseudoProperDecayLength(AliMuonForwardTrackPair *pair, Double_t trueMass);
 
-  static const Int_t fNMaxPtBinsDimuons = 50;
+private:
 
   TString fInputDir, fOutputDir;
 
@@ -98,47 +106,43 @@ private:
   TH1D *fHistErrorSingleMuonsX, *fHistErrorSingleMuonsY;                                                           //!
   TH1D *fHistZOriginSingleMuonsMC;
   
-  TH2D *fHistZROriginSingleMuonsMC, *fHistSingleMuonsPtRapidityMC;                                                //! 
-  TH2D *fHistSingleMuonsOffsetChi2, *fHistSingleMuonsOffsetChi2_BeforeMFT, *fHistSingleMuonsOffsetChi2_AfterMFT;  //!
-  TGraph *fGraphSingleMuonsOffsetChi2;                                                                            //!
-
-  TH1D *fHistMassMuonPairs[fNMaxPtBinsDimuons+1];                                  //!
-  TH1D *fHistMassMuonPairsWithoutMFT[fNMaxPtBinsDimuons+1];                        //!
-  TH1D *fHistMassMuonPairsMC[fNMaxPtBinsDimuons+1];                                //!
-  TH1D *fHistWOffsetMuonPairsAtPrimaryVtx[fNMaxPtBinsDimuons+1];                   //!
-  TH1D *fHistWOffsetMuonPairsAtPCA[fNMaxPtBinsDimuons+1];                          //!
-  TH1D *fHistDistancePrimaryVtxPCA[fNMaxPtBinsDimuons+1];                          //!
-  TH2D *fHistDistancePrimaryVtxPCAvsWOffsetMuonPairsAtPCA[fNMaxPtBinsDimuons+1];   //!
-  TH1D *fHistDimuonVtxResolutionX[fNMaxPtBinsDimuons+1];                           //!
-  TH1D *fHistDimuonVtxResolutionY[fNMaxPtBinsDimuons+1];                           //!
-  TH1D *fHistDimuonVtxResolutionZ[fNMaxPtBinsDimuons+1];                           //!
-
-  TH2D *fHistRapidityPtMuonPairs;           //!
+  TH2D *fHistZROriginSingleMuonsMC, *fHistSingleMuonsPtRapidity, *fHistSingleMuonsOffsetChi2;   //!
+
+  TH2D *fHistRapidityPtMuonPairs;  //!
  
-  TH2D *fHistMassMuonPairsVsPt;             //!
-  TH2D *fHistMassMuonPairsWithoutMFTVsPt;   //!
-       TH2D *fHistMassMuonPairsVsPtLSp;             //!
-       TH2D *fHistMassMuonPairsWithoutMFTVsPtLSp;   //!
-       TH2D *fHistMassMuonPairsVsPtLSm;             //!
-       TH2D *fHistMassMuonPairsWithoutMFTVsPtLSm;   //!
-       
+  TH2D *fHistMassMuonPairsMCVsPt;              //!
+  TH2D *fHistMassMuonPairsVsPt;                //!
+  TH2D *fHistMassMuonPairsWithoutMFTVsPt;      //!
+  TH2D *fHistMassMuonPairsVsPtLSp;             //!
+  TH2D *fHistMassMuonPairsWithoutMFTVsPtLSp;   //!
+  TH2D *fHistMassMuonPairsVsPtLSm;             //!
+  TH2D *fHistMassMuonPairsWithoutMFTVsPtLSm;   //!
+
+  TH2D *fHistWOffsetMuonPairsAtPrimaryVtxVsPt;    //!
+  TH2D *fHistWOffsetMuonPairsAtPCAVsPt;           //!
+  TH2D *fHistDistancePrimaryVtxPCAVsPt;           //!
+  TH2D *fHistPCAQualityVsPt;                      //!
+  TH2D *fHistPseudoProperDecayLengthVsPt;         //!
+  TH2D *fHistDimuonVtxResolutionXVsPt;            //!
+  TH2D *fHistDimuonVtxResolutionYVsPt;            //!
+  TH2D *fHistDimuonVtxResolutionZVsPt;            //!
+  
   Bool_t fEvalDimuonVtxResolution;
 
-  Int_t fNMassBins, fNPtDimuBins;
-  Double_t fMassMin, fMassMax, fPtDimuMin, fPtDimuMax;
-  TAxis *fPtAxisDimuons;
+  Double_t fTrueMass, fMassMin, fMassMax;
 
-  Bool_t fSingleMuonAnalysis, fMuonPairAnalysis, fMatchTrigger;
-  Int_t fOption;
+  Bool_t fSingleMuonAnalysis, fMuonPairAnalysis;
+  Int_t fOption, fTriggerLevel;
 
   Double_t fXVertResMC, fYVertResMC, fZVertResMC;
   Double_t fPrimaryVtxX, fPrimaryVtxY, fPrimaryVtxZ;
   Int_t fMaxNWrongClustersMC;
   Double_t fPtMinSingleMuons;
 
-  Bool_t fUseBransonForCut, fUseBransonForKinematics, fCutOnOffsetChi2;
+  Bool_t fUseBransonForCut, fUseBransonForKinematics, fCorrelateCutOnOffsetChi2;
 
-  Double_t fCenterOffset, fCenterChi2, fScaleOffset, fScaleChi2, fRadiusCut;
+  Double_t fMaxChi2SingleMuons, fMaxOffsetSingleMuons;
+  Double_t fMaxWOffsetMuonPairsAtPrimaryVtx, fMaxWOffsetMuonPairsAtPCA, fMaxDistancePrimaryVtxPCA, fMinPCAQuality;
 
   ClassDef(AliMuonForwardTrackAnalysis, 1)
 
index f3b08f2..b00a071 100644 (file)
@@ -142,6 +142,29 @@ Double_t AliMuonForwardTrackPair::GetWeightedOffset(Double_t x, Double_t y, Doub
 
 //====================================================================================================================================================
 
+Double_t AliMuonForwardTrackPair::GetWeightedOffsetAtPCA() {
+
+  return GetWeightedOffset(fXPointOfClosestApproach, fYPointOfClosestApproach, fZPointOfClosestApproach);
+
+}
+
+//====================================================================================================================================================
+
+Double_t AliMuonForwardTrackPair::GetPCAQuality() {
+
+  Double_t wOffset_1 = GetTrack(0)->GetWeightedOffset(fXPointOfClosestApproach, fYPointOfClosestApproach, fZPointOfClosestApproach);
+  Double_t wOffset_2 = GetTrack(1)->GetWeightedOffset(fXPointOfClosestApproach, fYPointOfClosestApproach, fZPointOfClosestApproach);
+  
+  Double_t f1 = TMath::Exp(-0.5 * wOffset_1);
+  Double_t f2 = TMath::Exp(-0.5 * wOffset_2);
+
+  if (f1+f2 > 0.) return (2.*f1*f2)/(f1+f2); 
+  else return 0.;
+  
+}
+
+//====================================================================================================================================================
+
 Double_t AliMuonForwardTrackPair::GetMassWithoutMFT(Double_t x, Double_t y, Double_t z, Int_t nClusters) {
 
   Int_t idCluster[2] = {0};
index ab020ae..55944ef 100644 (file)
@@ -55,12 +55,17 @@ public:
   }
 
   Double_t GetWeightedOffset(Double_t x, Double_t y, Double_t z);
+  Double_t GetWeightedOffsetAtPCA();
+  Double_t GetPCAQuality();
   Double_t GetMassWithoutMFT(Double_t x, Double_t y, Double_t z, Int_t nClusters=-1);
   Double_t GetMassMC()     { return fKinemMC.M(); }
   Double_t GetRapidityMC() { return fKinemMC.Rapidity(); }
   Double_t GetPtMC()       { return fKinemMC.Pt(); }
   Double_t GetMass()     { return fKinem.M(); }
   Double_t GetRapidity() { return fKinem.Rapidity(); }
+  Double_t GetPx()       { return fKinem.Px(); }
+  Double_t GetPy()       { return fKinem.Py(); }
+  Double_t GetPz()       { return fKinem.Pz(); }
   Double_t GetPt()       { return fKinem.Pt(); }
 
   Bool_t IsResonance();
index 3dab700..899e8f9 100644 (file)
@@ -99,7 +99,7 @@ void Config() {
 
   AliRunLoader* rl=0x0;
 
-  AliInfo("Config.C: Creating Run Loader ...");
+  printf("Config.C: Creating Run Loader ...");
   rl = AliRunLoader::Open("galice.root", AliConfig::GetDefaultEventFolderName(), "recreate");
   if (rl == 0x0) {
     gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
index 9960f2a..ee092ec 100644 (file)
@@ -10,7 +10,7 @@ void runSimulation(Int_t seed,
   simulator->SetTriggerConfig("MUON");\r
   simulator->SetMakeDigits("MUON MFT");\r
   simulator->SetMakeSDigits("MUON MFT");\r
-  simulator->SetRunQA("ALL");\r
+  simulator->SetRunQA("DetectorList:ActionList");\r
   simulator->SetRunHLT("");\r
 \r
   // MUON Tracker -> local:///$OCDB should reflect the content of alien://folder=/alice\r