]>
Commit | Line | Data |
---|---|---|
fc7e3b59 | 1 | /************************************************************************** |
2 | * This file is property of and copyright by the ALICE HLT Project * | |
3 | * ALICE Experiment at CERN, All rights reserved. * | |
4 | * * | |
5 | * Primary Author: Svein Lindal <slindal@fys.uio.no> * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
16 | /// @file AliAnaConvCorrPion.cxx | |
17 | /// @author Svein Lindal | |
18 | /// @brief Class used to run conversion gamma/pion - hadron/jet analysis | |
19 | ||
20 | ||
21 | ||
22 | #include "AliAnaConvCorrPion.h" | |
23 | #include "AliAODTrack.h" | |
24 | #include "TClonesArray.h" | |
25 | #include "AliAODConversionParticle.h" | |
811b0806 | 26 | #include "THnSparse.h" |
27 | #include "TH2F.h" | |
fc7e3b59 | 28 | |
29 | #include <iostream> | |
30 | ||
31 | ||
32 | using namespace std; | |
33 | ClassImp(AliAnaConvCorrPion) | |
34 | ||
811b0806 | 35 | //________________________________________________________________________________ |
fc7e3b59 | 36 | AliAnaConvCorrPion::AliAnaConvCorrPion() : |
811b0806 | 37 | AliAnaConvCorrBase("pion_hadron_corr"), |
38 | fhdPhiVsInvMassPi0(NULL), | |
39 | fhdPhiVsInvMassEta(NULL), | |
40 | fhPtVsInvMass(NULL) | |
41 | { | |
fc7e3b59 | 42 | //consctructor |
43 | } | |
811b0806 | 44 | //________________________________________________________________________________ |
fc7e3b59 | 45 | AliAnaConvCorrPion::AliAnaConvCorrPion(TString name) : |
811b0806 | 46 | AliAnaConvCorrBase(name), |
47 | fhdPhiVsInvMassPi0(NULL), | |
48 | fhdPhiVsInvMassEta(NULL), | |
49 | fhPtVsInvMass(NULL) | |
50 | { | |
fc7e3b59 | 51 | //consctructor |
52 | } | |
53 | ||
54 | ||
55 | //________________________________________________________________________________ | |
56 | AliAnaConvCorrPion::~AliAnaConvCorrPion() { | |
57 | //destructor | |
58 | } | |
59 | ||
811b0806 | 60 | ///________________________________________________________________________________ |
61 | void AliAnaConvCorrPion::CreateHistograms() { | |
62 | //Create histograms | |
63 | CreateBaseHistograms(); | |
64 | ||
65 | const Int_t dim = 4; | |
66 | Int_t bins[dim] = {200, 200, 32, 14}; | |
67 | Double_t min[dim] = {0, 0, -TMath::PiOver2(), 0.1}; | |
68 | Double_t max[dim] = {100, 100, 3*TMath::PiOver2(), 0.17}; | |
69 | ||
70 | fhdPhiVsInvMassPi0 = new THnSparseF("fhdPhiVsInvMassPi0", "fhdPhiVsInvMassPi0", dim, bins, min, max); | |
71 | ||
72 | min[3] = 450; | |
73 | max[3] = 650; | |
74 | bins[3] = 20; | |
75 | fhdPhiVsInvMassEta = new THnSparseF("fhdPhiVsInvMassEta", "fhdPhiVsInvMassEta", dim, bins, min, max); | |
76 | fhPtVsInvMass = new TH2F("fhPtVsInvMass", "Pt Vs inv mass", GetTriggerBins()->GetSize() -1, GetTriggerBins()->GetArray(), 400, 0, 1); | |
77 | ||
78 | GetHistograms()->Add(fhPtVsInvMass); | |
79 | GetHistograms()->Add(fhdPhiVsInvMassPi0); | |
80 | GetHistograms()->Add(fhdPhiVsInvMassEta); | |
fc7e3b59 | 81 | |
811b0806 | 82 | } |
83 | ||
84 | ///________________________________________________________________________________ | |
fc7e3b59 | 85 | void AliAnaConvCorrPion::GetTrackLabels(const AliAODConversionParticle * pion, const TClonesArray * photons, Int_t* trackLabels) { |
86 | ///Get the track labels of the electrons reconstructed as gamma forming the pion | |
87 | ||
88 | for(Int_t i = 0; i< 2; i++) { | |
89 | AliAODConversionParticle * gamma = dynamic_cast<AliAODConversionParticle*>(photons->At(pion->GetTrackLabel(i))); | |
90 | ||
91 | if(gamma) { | |
92 | for(Int_t j = 0; j< 2; j++) { | |
93 | cout << "index " << i + j + ((i>=j)?1:0) << " " << gamma->GetTrackLabel(j) << endl; | |
94 | trackLabels[ i*2+ j] = gamma->GetTrackLabel(j); | |
95 | } | |
96 | ||
97 | } else { | |
98 | AliGammaConversionAODObject * aodO = dynamic_cast<AliGammaConversionAODObject*>(photons->At(pion->GetTrackLabel(i))); | |
99 | if(aodO) { | |
100 | trackLabels[i*2] = aodO->GetLabel1(); | |
101 | trackLabels[i*2 + 1] = aodO->GetLabel2(); | |
102 | } else { | |
103 | cout << "AliAnaConvCorrPion::GetTrackLabels() :: Not good!!!"<<endl; | |
104 | } | |
105 | } | |
106 | } | |
107 | } | |
108 | ||
109 | ||
811b0806 | 110 | ///________________________________________________________________________________ |
fc7e3b59 | 111 | void AliAnaConvCorrPion::CorrelateWithHadrons(AliAODConversionParticle * pion, const TClonesArray * tracks, const Bool_t isolated, const Int_t nSpawn, const Int_t * const spawn) { |
112 | //See header file for documentation | |
113 | ||
811b0806 | 114 | fhPtVsInvMass->Fill(pion->Pt(), pion->M()); |
fc7e3b59 | 115 | FillTriggerCounters(pion->Pt(), isolated); |
811b0806 | 116 | |
fc7e3b59 | 117 | if (tracks) { |
118 | for(int ij = 0; ij < tracks->GetEntriesFast(); ij++) { | |
119 | AliAODTrack * track = dynamic_cast<AliAODTrack*>(tracks->At(ij)); | |
120 | if(track) { | |
121 | if(pion->IsMySpawn(track->GetID(), nSpawn, spawn)) continue; | |
122 | ||
811b0806 | 123 | // if (track->Pt() < GetCorrelatedPt() ) continue; |
124 | Double_t x[4] = {pion->Pt(), track->Pt(), GetDPhi(pion->Phi() - track->Phi()), TMath::Abs(pion->M()) }; | |
125 | if( (pion->M() > 0.1) && (pion->M() < 0.17) ){ | |
126 | fhdPhiVsInvMassPi0->Fill(x); | |
127 | } else if ((pion->M() > 0.5) && (pion->M() < 0.6 ) ) { | |
128 | fhdPhiVsInvMassEta->Fill(x); | |
129 | } | |
fc7e3b59 | 130 | FillHistograms(pion->Pt(), track->Pt(), GetDPhi(pion->Phi() - track->Phi()), pion->Eta() - track->Eta(), isolated); |
fc7e3b59 | 131 | } |
132 | } | |
133 | } | |
134 | } |