changed Resolution, Material, and PhotonQA task to be able to run on the grid
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnaConvCorrPion.cxx
CommitLineData
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
92efd725 22#include "TH2D.h"
fc7e3b59 23#include "AliAnaConvCorrPion.h"
92efd725 24//#include "AliAODTrack.h"
25#include "TClonesArray.h"
296f4e9c 26#include "AliAODConversionParticle.h"
c15c23b8 27#include <AliLog.h>
28
92efd725 29//#include "AliAODConversionMother.h"
30//#include "AliAODConversionPhoton.h"
31//#include "THnSparse.h"
32//#include "TH2F.h"
33
fc7e3b59 34#include <iostream>
35
36
37using namespace std;
38ClassImp(AliAnaConvCorrPion)
39
811b0806 40//________________________________________________________________________________
fc7e3b59 41AliAnaConvCorrPion::AliAnaConvCorrPion() :
296f4e9c 42AliAnaConvCorrBase("pion_hadron_corr", "Pion dPhi"),
92efd725 43//hTriggerPtvsMass(NULL),
296f4e9c 44 fAxisM()
811b0806 45{
fc7e3b59 46 //consctructor
296f4e9c 47 InitMassAxis();
2bf353fb 48 hTriggerPtvsMass[0] = NULL;
49 hTriggerPtvsMass[1] = NULL;
50 hTriggerPtvsMass[2] = NULL;
51
52
53
fc7e3b59 54}
811b0806 55//________________________________________________________________________________
296f4e9c 56AliAnaConvCorrPion::AliAnaConvCorrPion(TString name, TString title = "Pion Corr") :
57 AliAnaConvCorrBase(name, title),
92efd725 58 //hTriggerPtvsMass(NULL),
296f4e9c 59 fAxisM()
811b0806 60{
fc7e3b59 61 //consctructor
296f4e9c 62 InitMassAxis();
2bf353fb 63 hTriggerPtvsMass[0] = NULL;
64 hTriggerPtvsMass[1] = NULL;
65 hTriggerPtvsMass[2] = NULL;
66
67
fc7e3b59 68}
69
70
71//________________________________________________________________________________
72AliAnaConvCorrPion::~AliAnaConvCorrPion() {
73 //destructor
74}
3b77b2d1 75
3bff49c3 76//________________________________________________________________________________
296f4e9c 77void AliAnaConvCorrPion::InitMassAxis() {
78 Double_t mbins[7] = {0.1, 0.11, 0.12, 0.15, 0.16, 0.18, 0.2};
79 fAxisM.Set(6, mbins);
80 fAxisM.SetNameTitle("InvMass", "invariant mass");
c15c23b8 81 GetAxisList().AddAt(&fAxisM, 4);
82 GetTrackAxisList().AddAt(&fAxisM, 3);
83 GetTrigAxisList().AddAt(&fAxisM, 2);
296f4e9c 84}
85
811b0806 86///________________________________________________________________________________
87void AliAnaConvCorrPion::CreateHistograms() {
88 //Create histograms
89 CreateBaseHistograms();
92efd725 90
c15c23b8 91 hTriggerPtvsMass[0] = new TH2D(Form("hTriggerPtvsMass_all_%s", GetName()), "Pt vs Mass all pizero", 400, 0, .400, GetAxistPt().GetNbins(), GetAxistPt().GetXbins()->GetArray());
439cf020 92 hTriggerPtvsMass[1] = NULL;//new TH2D("hTriggerPtvsMass_leadingcone", "Pt vs Mass leading cone", 1, 0, .400, 1, 0, 100);
93 hTriggerPtvsMass[2] = NULL; //new TH2D("hTriggerPtvsMass_leadingevent", "Pt vs Mass leading event", 1, 0, .400, 1, 0, 100);
92efd725 94 GetHistograms()->Add(hTriggerPtvsMass[0]);
c15c23b8 95 //GetHistograms()->Add(hTriggerPtvsMass[1]);
96 //GetHistograms()->Add(hTriggerPtvsMass[2]);
811b0806 97}
98
296f4e9c 99
811b0806 100///________________________________________________________________________________
d9f6f50a 101void AliAnaConvCorrPion::FillTriggerCounters(const AliAODConversionParticle * particle, Int_t leading) {
296f4e9c 102 //Fill histograms counting triggers
92efd725 103 //fHNTriggers[leading]->Fill(particle->Pt());
439cf020 104 (void) leading; ///Not needed any more, but maybe later
c15c23b8 105 AliDebug(AliLog::kDebug + 5, Form("Fill trigger countder %f %f", particle->M(), particle->Pt()));
439cf020 106 hTriggerPtvsMass[0]->Fill(particle->M(), particle->Pt());
fc7e3b59 107}
92efd725 108
109//________________________________________________________________________________
110// void AliAnaConvCorrPion::Process(TClonesArray * pions, TClonesArray * photons, TClonesArray * tracks) {
111
112// for(Int_t ip = 0; ip < pions->GetEntriesFast(); ip++) {
113
114// AliAODConversionParticle * pion = static_cast<AliAODConversionParticle*>(pions->UncheckedAt(ip));
115
116// Int_t tIDs[4] = {-1, -1, -1, -1};
117// AliAODConversionParticle * photon1 = static_cast<AliAODConversionParticle*>(photons->UncheckedAt(pion->GetLabel(0)));
118// tIDs[0] = photon1->GetLabel(0);
119// tIDs[1] = photon1->GetLabel(1);
120// AliAODConversionParticle * photon2 = static_cast<AliAODConversionParticle*>(photons->UncheckedAt(pion->GetLabel(1)));
121// tIDs[2] = photon2->GetLabel(0);
122// tIDs[3] = photon2->GetLabel(1);
123
124// CorrelateWithTracks(static_cast<AliAODConversionParticle*>(pion), tracks, tIDs, kFALSE);
125// }
126// }
127