fixing rule violations
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / ConvCorrelations / 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
296f4e9c 22#include "TH2D.h"
fc7e3b59 23#include "AliAnaConvCorrPion.h"
296f4e9c 24//#include "AliAODTrack.h"
fc7e3b59 25#include "TClonesArray.h"
296f4e9c 26#include "AliAODConversionParticle.h"
27//#include "AliAODConversionMother.h"
28//#include "AliAODConversionPhoton.h"
29//#include "THnSparse.h"
30//#include "TH2F.h"
fc7e3b59 31
32#include <iostream>
33
34
35using namespace std;
36ClassImp(AliAnaConvCorrPion)
37
811b0806 38//________________________________________________________________________________
fc7e3b59 39AliAnaConvCorrPion::AliAnaConvCorrPion() :
296f4e9c 40AliAnaConvCorrBase("pion_hadron_corr", "Pion dPhi"),
41 hTriggerPtvsMass(NULL),
42 fAxisM()
811b0806 43{
fc7e3b59 44 //consctructor
296f4e9c 45 InitMassAxis();
fc7e3b59 46}
811b0806 47//________________________________________________________________________________
296f4e9c 48AliAnaConvCorrPion::AliAnaConvCorrPion(TString name, TString title = "Pion Corr") :
49 AliAnaConvCorrBase(name, title),
50 hTriggerPtvsMass(NULL),
51 fAxisM()
811b0806 52{
fc7e3b59 53 //consctructor
296f4e9c 54 InitMassAxis();
fc7e3b59 55}
56
57
58//________________________________________________________________________________
59AliAnaConvCorrPion::~AliAnaConvCorrPion() {
60 //destructor
61}
3b77b2d1 62
3bff49c3 63//________________________________________________________________________________
296f4e9c 64void AliAnaConvCorrPion::InitMassAxis() {
201850ad 65 //Init mass axis
66
296f4e9c 67 Double_t mbins[7] = {0.1, 0.11, 0.12, 0.15, 0.16, 0.18, 0.2};
68 fAxisM.Set(6, mbins);
69 fAxisM.SetNameTitle("InvMass", "invariant mass");
3bff49c3 70 GetAxisList().AddAt(&fAxisM, 5);
71 GetTrackAxisList().AddAt(&fAxisM, 5);
72 GetTrigAxisList().AddAt(&fAxisM, 4);
296f4e9c 73}
74
811b0806 75///________________________________________________________________________________
76void AliAnaConvCorrPion::CreateHistograms() {
77 //Create histograms
78 CreateBaseHistograms();
296f4e9c 79 hTriggerPtvsMass = new TH2D("hTriggerPtvsMass", "Pt vs Mass", 400, 0, .400, GetAxistPt().GetNbins(), GetAxistPt().GetXbins()->GetArray());
80 GetHistograms()->Add(hTriggerPtvsMass);
811b0806 81}
82
296f4e9c 83
811b0806 84///________________________________________________________________________________
296f4e9c 85void AliAnaConvCorrPion::FillTriggerCounters(const AliAODConversionParticle * particle, Bool_t isolated) {
86 //Fill histograms counting triggers
87 fHNTriggers[isolated]->Fill(particle->Pt());
88 hTriggerPtvsMass->Fill(particle->M(), particle->Pt());
fc7e3b59 89}
fc7e3b59 90
296f4e9c 91//________________________________________________________________________________
92// void AliAnaConvCorrPion::Process(TClonesArray * pions, TClonesArray * photons, TClonesArray * tracks) {
93
94// for(Int_t ip = 0; ip < pions->GetEntriesFast(); ip++) {
95
96// AliAODConversionParticle * pion = static_cast<AliAODConversionParticle*>(pions->UncheckedAt(ip));
fc7e3b59 97
296f4e9c 98// Int_t tIDs[4] = {-1, -1, -1, -1};
99// AliAODConversionParticle * photon1 = static_cast<AliAODConversionParticle*>(photons->UncheckedAt(pion->GetLabel(0)));
100// tIDs[0] = photon1->GetLabel(0);
101// tIDs[1] = photon1->GetLabel(1);
102// AliAODConversionParticle * photon2 = static_cast<AliAODConversionParticle*>(photons->UncheckedAt(pion->GetLabel(1)));
103// tIDs[2] = photon2->GetLabel(0);
104// tIDs[3] = photon2->GetLabel(1);
105
106// CorrelateWithTracks(static_cast<AliAODConversionParticle*>(pion), tracks, tIDs, kFALSE);
107// }
108// }
109