1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * ALICE Experiment at CERN, All rights reserved. *
5 * Primary Author: Svein Lindal <slindal@fys.uio.no> *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 /// @file AliAnaConvCorrPion.cxx
17 /// @author Svein Lindal
18 /// @brief Class used to run conversion gamma/pion - hadron/jet analysis
22 #include "AliAnaConvCorrPion.h"
23 #include "AliAODTrack.h"
24 #include "TClonesArray.h"
25 #include "AliAODConversionParticle.h"
31 ClassImp(AliAnaConvCorrPion)
33 //________________________________________________________________________
34 AliAnaConvCorrPion::AliAnaConvCorrPion() :
35 AliAnaConvCorrBase("pion_hadron_corr") {
38 //________________________________________________________________________
39 AliAnaConvCorrPion::AliAnaConvCorrPion(TString name) :
40 AliAnaConvCorrBase(name) {
45 //________________________________________________________________________________
46 AliAnaConvCorrPion::~AliAnaConvCorrPion() {
51 ///_______________________________________________________________________________
52 void AliAnaConvCorrPion::GetTrackLabels(const AliAODConversionParticle * pion, const TClonesArray * photons, Int_t* trackLabels) {
53 ///Get the track labels of the electrons reconstructed as gamma forming the pion
55 for(Int_t i = 0; i< 2; i++) {
56 AliAODConversionParticle * gamma = dynamic_cast<AliAODConversionParticle*>(photons->At(pion->GetTrackLabel(i)));
59 for(Int_t j = 0; j< 2; j++) {
60 cout << "index " << i + j + ((i>=j)?1:0) << " " << gamma->GetTrackLabel(j) << endl;
61 trackLabels[ i*2+ j] = gamma->GetTrackLabel(j);
65 AliGammaConversionAODObject * aodO = dynamic_cast<AliGammaConversionAODObject*>(photons->At(pion->GetTrackLabel(i)));
67 trackLabels[i*2] = aodO->GetLabel1();
68 trackLabels[i*2 + 1] = aodO->GetLabel2();
70 cout << "AliAnaConvCorrPion::GetTrackLabels() :: Not good!!!"<<endl;
77 ///__________________________________________________________________________
78 void AliAnaConvCorrPion::CorrelateWithHadrons(AliAODConversionParticle * pion, const TClonesArray * tracks, const Bool_t isolated, const Int_t nSpawn, const Int_t * const spawn) {
79 //See header file for documentation
81 FillTriggerCounters(pion->Pt(), isolated);
85 for(int ij = 0; ij < tracks->GetEntriesFast(); ij++) {
86 AliAODTrack * track = dynamic_cast<AliAODTrack*>(tracks->At(ij));
88 if(pion->IsMySpawn(track->GetID(), nSpawn, spawn)) continue;
90 if (track->Pt() < GetCorrelatedPt() ) continue;
92 FillHistograms(pion->Pt(), track->Pt(), GetDPhi(pion->Phi() - track->Phi()), pion->Eta() - track->Eta(), isolated);