]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/GammaConv/AliAnaConvCorrPion.cxx
Correct phi creation and initialization of gRandom in Toy model
[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
4267afec 22#include "TH2F.h"
fc7e3b59 23#include "AliAnaConvCorrPion.h"
296f4e9c 24#include "AliAODConversionParticle.h"
fc7e3b59 25#include <iostream>
26
27
28using namespace std;
29ClassImp(AliAnaConvCorrPion)
30
811b0806 31//________________________________________________________________________________
fc7e3b59 32AliAnaConvCorrPion::AliAnaConvCorrPion() :
296f4e9c 33AliAnaConvCorrBase("pion_hadron_corr", "Pion dPhi"),
296f4e9c 34 fAxisM()
811b0806 35{
fc7e3b59 36 //consctructor
296f4e9c 37 InitMassAxis();
fc7e3b59 38}
811b0806 39//________________________________________________________________________________
296f4e9c 40AliAnaConvCorrPion::AliAnaConvCorrPion(TString name, TString title = "Pion Corr") :
41 AliAnaConvCorrBase(name, title),
296f4e9c 42 fAxisM()
811b0806 43{
fc7e3b59 44 //consctructor
296f4e9c 45 InitMassAxis();
fc7e3b59 46}
47
48
49//________________________________________________________________________________
50AliAnaConvCorrPion::~AliAnaConvCorrPion() {
51 //destructor
52}
3b77b2d1 53
3bff49c3 54//________________________________________________________________________________
296f4e9c 55void AliAnaConvCorrPion::InitMassAxis() {
201850ad 56 //Init mass axis
57
296f4e9c 58 Double_t mbins[7] = {0.1, 0.11, 0.12, 0.15, 0.16, 0.18, 0.2};
59 fAxisM.Set(6, mbins);
60 fAxisM.SetNameTitle("InvMass", "invariant mass");
3bff49c3 61 GetAxisList().AddAt(&fAxisM, 5);
62 GetTrackAxisList().AddAt(&fAxisM, 5);
63 GetTrigAxisList().AddAt(&fAxisM, 4);
296f4e9c 64}
65
811b0806 66///________________________________________________________________________________
67void AliAnaConvCorrPion::CreateHistograms() {
68 //Create histograms
69 CreateBaseHistograms();
4267afec 70
71 for(Int_t i = 0; i < 3; i++) {
72 TH2F * hpthist = new TH2F(Form("%s_iso_%d_ptVsmass", fName.Data(), i),
73 Form("%s_iso_%d_ptVsmass", fName.Data(), i),
74 400, 0, .400,
75 GetAxistPt().GetNbins(), GetAxistPt().GetXbins()->GetArray());
76 GetHistograms()->Add(hpthist);
77 }
811b0806 78}
79
296f4e9c 80
811b0806 81///________________________________________________________________________________
4267afec 82void AliAnaConvCorrPion::FillTriggerCounters(const AliAODConversionParticle * particle, Int_t isolated) {
296f4e9c 83 //Fill histograms counting triggers
4267afec 84 TH2F *hpt = dynamic_cast<TH2F*>(GetHistograms()->FindObject(Form("%s_iso_%d_ptVsmass", fName.Data(), isolated)));
85 if(hpt) hpt->Fill(particle->M(), particle->Pt());
fc7e3b59 86}