]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- fix for MC bugs in AliAnalysisTaskGammaCaloConv, fix for trivial bug in AliAnalysis...
authorfbock <friederike.bock@cern.ch>
Tue, 29 Jul 2014 13:41:55 +0000 (15:41 +0200)
committerfbock <friederike.bock@cern.ch>
Tue, 29 Jul 2014 13:41:55 +0000 (15:41 +0200)
PWGGA/GammaConv/AliAnalysisTaskEtaToPiPlPiMiGamma.cxx
PWGGA/GammaConv/AliAnalysisTaskEtaToPiPlPiMiGamma.h
PWGGA/GammaConv/AliAnalysisTaskGammaConvCalo.cxx
PWGGA/GammaConv/AliCaloPhotonCuts.cxx
PWGGA/GammaConv/AliConversionMesonCuts.cxx
PWGGA/GammaConv/AliConversionMesonCuts.h
PWGGA/GammaConv/macros/AddTask_GammaConvEtaPiPlPiMiGamma_pPb.C

index 3927964469859609b9455fd2c167091634492c25..05595937e7676def3993b8145258ea14c51a0f0d 100644 (file)
@@ -1,9 +1,8 @@
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
- * Author: Pedro Gonz??lez, Pedro Ladr??n de Guevara, Ernesto L??pez Torres, *
- *         Eulogio Serradilla, Ana Marin, Friederike Bock                 *
- * Version 2                                                              *
+ * Author: Friederike Bock                                                *
+ * Version 1                                                              *
  *                                                                        *
  * Permission to use, copy, modify and distribute this software and its   *
  * documentation strictly for non-commercial purposes is hereby granted   *
@@ -14,8 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-// Analysis task for pi0->e+e-gamma (Dalitz decay)
-// Analysis task for chic->JPsi+gamma
+// Analysis task for eta->pi+ +pi- gamma (pion Dalitz decay)
 
 #include <vector>
 
@@ -657,9 +655,7 @@ void AliAnalysisTaskEtaToPiPlPiMiGamma::UserExec(Option_t *){
 
        for(Int_t iCut = 0; iCut<fnCuts; iCut++){
                fiCut = iCut;
-               Int_t eventNotAccepted =
-                       ((AliConvEventCuts*)fGammaCutArray->At(iCut))
-                       ->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
+               Int_t eventNotAccepted = ((AliConvEventCuts*)fEventCutArray->At(iCut))->IsEventAcceptedByCut(fV0Reader->GetEventCuts(),fInputEvent,fMCEvent,fIsHeavyIon);
                
                if(eventNotAccepted){
                        //                      cout << "event rejected due to wrong trigger: " <<eventNotAccepted << endl;
@@ -1341,7 +1337,7 @@ void AliAnalysisTaskEtaToPiPlPiMiGamma::ProcessTrueMesonCandidates(AliAODConvers
                Bool_t isTrueEta = kFALSE;
                Int_t gammaMCLabel = TrueGammaCandidate->GetMCParticleLabel(MCStack);
                Int_t gammaMotherLabel = -1;
-               Bool_t gammaEtaCand = kFALSE;
+//             Bool_t gammaEtaCand = kFALSE;
                
                if(gammaMCLabel != -1){ // Gamma is Combinatorial; MC Particles don't belong to the same Mother
                        // Daughters Gamma 0
@@ -1353,7 +1349,7 @@ void AliAnalysisTaskEtaToPiPlPiMiGamma::ProcessTrueMesonCandidates(AliAODConvers
                                if(negativeMC->GetUniqueID() == 5 && positiveMC->GetUniqueID() ==5){ // ... From Conversion ...
                                        if(gammaMC->GetPdgCode() == 22){ // ... with Gamma Mother
                                                gammaMotherLabel=gammaMC->GetFirstMother();
-                                               if( ((TParticle*)MCStack->Particle(gammaMotherLabel))->GetNDaughters() == 3 && ((TParticle*)MCStack->Particle(gammaMotherLabel))->GetPdgCode() == 221 ) gammaEtaCand = kTRUE;
+//                                             if( ((TParticle*)MCStack->Particle(gammaMotherLabel))->GetNDaughters() == 3 && ((TParticle*)MCStack->Particle(gammaMotherLabel))->GetPdgCode() == 221 ) gammaEtaCand = kTRUE;
                                        }
                                }
                        }
index 5c8391161647e81884f89867af799754bc1177d6..7e832d1a63dc47d05b264fc4caf6c28fc90596e8 100644 (file)
@@ -4,7 +4,6 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-// Analysis task for pi0->e+e-gamma (Dalitz decay)
 
 #include "AliAnalysisTaskSE.h"
 #include "AliV0ReaderV1.h"
index 57f61e3001ace11d11eb89c8a3aecbd4dd111cb9..b4f74f2015523824d73a64da345ebfd5b53d2e47 100644 (file)
@@ -1863,12 +1863,14 @@ void AliAnalysisTaskGammaConvCalo::ProcessTruePhotonCandidates(AliAODConversionP
        // pi0 photon
        //Bool_t bpi0 = 0;
        Int_t imother = Photon->GetMother(0);
-       AliMCParticle *McMother = static_cast<AliMCParticle*>(fMCEvent->GetTrack(imother));
-       if(McMother->PdgCode() == 111){
-               fHistoTrueConvPi0GammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
+       if (imother > -1){
+               AliMCParticle *McMother = static_cast<AliMCParticle*>(fMCEvent->GetTrack(imother));
+               if(McMother->PdgCode() == 111){
+                       fHistoTrueConvPi0GammaPt[fiCut]->Fill(TruePhotonCandidate->Pt());
+               }
        }
-  
 }
+
 //________________________________________________________________________
 void AliAnalysisTaskGammaConvCalo::ProcessAODMCParticles()
 {
index 9c1d725b0605060ef68732747ee7826bb349ecd7..84b6dbf868225bb539d976060aeada8ebbe17701 100644 (file)
@@ -520,8 +520,8 @@ Bool_t AliCaloPhotonCuts::ClusterQualityCuts(AliVCluster* cluster, AliVEvent *ev
        cutIndex++;
 
        Double_t minR = 999.0;
-//     // get the minimum radius of tracks to cluster
-//     if(fHistDistanceTrackToClusterBeforeQA || fHistDistanceTrackToClusterAfterQA){
+       // get the minimum radius of tracks to cluster
+       if(fHistDistanceTrackToClusterBeforeQA || fHistDistanceTrackToClusterAfterQA){
 //             Float_t pos[3];
 //             cluster->GetPosition(pos);  // Get cluster position
 //             
@@ -541,11 +541,12 @@ Bool_t AliCaloPhotonCuts::ClusterQualityCuts(AliVCluster* cluster, AliVEvent *ev
 //                     Double_t dphi = -999.0;
 //                     Double_t deta = -999.0;
 //                     AliPicoTrack::GetEtaPhiDiff(trackcluster, cluster, dphi, deta);
+//                     cout << "here" << endl;
 //                     Double_t dr = sqrt(dphi*dphi + deta+deta);
 //                     if(dr < minR)
 //                             minR = dr;
 //             }//loop over tracks
-//     }
+       }
        
        // Fill Histos before Cuts
        if(fHistClusterTimevsEBeforeQA) fHistClusterTimevsEBeforeQA->Fill(cluster->GetTOF(), cluster->E());
@@ -580,19 +581,21 @@ Bool_t AliCaloPhotonCuts::ClusterQualityCuts(AliVCluster* cluster, AliVEvent *ev
 //             TClonesArray *tracks = dynamic_cast<TClonesArray*>(l->FindObject("Tracks"));
 // 
 //             for(int itrack = 0; itrack < NtrMatched; itrack++){
-//             AliVTrack *trackcluster = static_cast<AliVTrack*>(tracks->At(itrack));
-//             if (! trackcluster) {
-//                     AliError(Form("Couldn't get ESD track %d\n", itrack));
-//                     continue;
-//             }
-//             Double_t dphi = -999.0;
-//             Double_t deta = -999.0;
-//             AliPicoTrack::GetEtaPhiDiff(trackcluster, cluster, dphi, deta);
-//             Double_t dr = sqrt(dphi*dphi + deta+deta);
-//             if(dr < fMinDistTrackToCluster){
-//                     return kFALSE;
-//             }
-//             
+//                     AliVTrack *trackcluster = static_cast<AliVTrack*>(tracks->At(itrack));
+//                     if (! trackcluster) {
+//                             AliError(Form("Couldn't get ESD track %d\n", itrack));
+//                             continue;
+//                     }
+//                     Double_t dphi = -999.0;
+//                     Double_t deta = -999.0;
+//                     AliPicoTrack::GetEtaPhiDiff(trackcluster, cluster, dphi, deta);
+//                     cout << "here 2" << endl;
+//                     Double_t dr = sqrt(dphi*dphi + deta+deta);
+//                     if(dr < fMinDistTrackToCluster){
+//                             if(fHistClusterIdentificationCuts)fHistClusterIdentificationCuts->Fill(cutIndex); //2
+//                             return kFALSE;
+//                     }
+//                     
 //             }//loop over tracks
 
        
index 6916dfdd4ac5c136f0043a8e91ac66740dac1b61..05a086ac89c8d3e0b0f6f4c25fda613a5f18e974 100644 (file)
@@ -449,6 +449,61 @@ Bool_t AliConversionMesonCuts::MesonIsSelectedMCEtaPiPlPiMiGamma(TParticle *fMCM
        return kFALSE;
 }
 
+//________________________________________________________________________
+Bool_t AliConversionMesonCuts::MesonIsSelectedMCPiPlPiMiPiZero(TParticle *fMCMother,AliStack *fMCStack, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelNeutPion, Double_t fRapidityShift){
+
+       // Returns true for all pions within acceptance cuts for decay into 2 photons
+       // If bMCDaughtersInAcceptance is selected, it requires in addition that both daughter photons are within acceptance cuts
+
+       if( !fMCStack )return kFALSE;
+
+       if( !(fMCMother->GetPdgCode() == 221 || fMCMother->GetPdgCode() == 223) ) return kFALSE;
+       
+       if( fMCMother->R()>fMaxR ) return kFALSE; // cuts on distance from collision point
+
+       Double_t rapidity = 10.;
+
+       if( fMCMother->Energy() - fMCMother->Pz() == 0 || fMCMother->Energy() + fMCMother->Pz() == 0 ){
+               rapidity=8.-fRapidityShift;
+       }
+       else{
+               rapidity = 0.5*(TMath::Log((fMCMother->Energy()+fMCMother->Pz()) / (fMCMother->Energy()-fMCMother->Pz())))-fRapidityShift;
+       }
+
+       // Rapidity Cut
+       if( abs(rapidity) > fRapidityCutMeson )return kFALSE;
+
+       // Select only -> pi+ pi- pi0
+       if( fMCMother->GetNDaughters() != 3 )return kFALSE;
+
+       TParticle *posPion = 0x0;
+       TParticle *negPion = 0x0;
+       TParticle *neutPion = 0x0;
+
+       for(Int_t index= fMCMother->GetFirstDaughter();index<= fMCMother->GetLastDaughter();index++){
+
+               TParticle* temp = (TParticle*)fMCStack->Particle( index );
+               switch( temp->GetPdgCode() ) {
+               case 211:
+                       posPion      =  temp;
+                       labelPosPion = index;
+                       break;
+               case -211:
+                       negPion      =  temp;
+                       labelNegPion = index;
+                       break;
+               case 111:
+                       neutPion         =  temp;
+                       labelNeutPion    = index;
+                       break;
+               }
+       }
+
+       if( posPion && negPion && neutPion ) return kTRUE;
+       return kFALSE;
+}
+
+
 //________________________________________________________________________
 Bool_t AliConversionMesonCuts::MesonIsSelectedMCChiC(TParticle *fMCMother,AliStack *fMCStack,Int_t & labelelectronChiC, Int_t & labelpositronChiC, Int_t & labelgammaChiC, Double_t fRapidityShift){
    // Returns true for all ChiC within acceptance cuts for decay into JPsi + gamma -> e+ + e- + gamma
index e25ac7bd2e4683930b1e7e8fa09c9c419dfa8259..5109c5281a8c3fc94d5f39379a38e9e00204e11e 100644 (file)
@@ -81,6 +81,7 @@ class AliConversionMesonCuts : public AliAnalysisCuts {
   Bool_t MesonIsSelectedAODMC(AliAODMCParticle *MCMother,TClonesArray *AODMCArray, Double_t fRapidityShift=0.);
   Bool_t MesonIsSelectedMCDalitz(TParticle *fMCMother,AliStack *fMCStack, Int_t &labelelectron, Int_t &labelpositron, Int_t &labelgamma,Double_t fRapidityShift=0.);
   Bool_t MesonIsSelectedMCEtaPiPlPiMiGamma(TParticle *fMCMother,AliStack *fMCStack, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelGamma, Double_t fRapidityShift=0);
+  Bool_t MesonIsSelectedMCPiPlPiMiPiZero(TParticle *fMCMother,AliStack *fMCStack, Int_t &labelNegPion, Int_t &labelPosPion, Int_t &labelNeutPion, Double_t fRapidityShift=0);
   Bool_t MesonIsSelectedMCChiC(TParticle *fMCMother,AliStack *fMCStack, Int_t &, Int_t &, Int_t &, Double_t fRapidityShift=0. );
   void PrintCuts();
   void PrintCutsWithValues();
index b3ceed00c59da5a0db2a36cdda82964caf8f4c2c..4c926a45893ce927425199684655456716b26cc7 100644 (file)
@@ -8,8 +8,6 @@ void AddTask_GammaConvEtaPiPlPiMiGamma_pPb(
                                                                                TString cutnumberAODBranch = "0000000060084001001500000"
                                                                                ) {
 
-       ////////////////////CURRENTLY NOT WORKING ///////////////////////////////
-
        // ================= Load Librariers =================================
        gSystem->Load("libCore.so");  
        gSystem->Load("libTree.so");