/**************************************************************************
* 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 *
* 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>
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;
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
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;
}
}
}
/* 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"
// 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()
{
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
//
// 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());
// 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
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
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();
TString cutnumberAODBranch = "0000000060084001001500000"
) {
- ////////////////////CURRENTLY NOT WORKING ///////////////////////////////
-
// ================= Load Librariers =================================
gSystem->Load("libCore.so");
gSystem->Load("libTree.so");