]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/GammaConv/AliAnaConvCorrPion.cxx
changed cutnumbers, submitted sveins changes
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnaConvCorrPion.cxx
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 "TH2D.h"
23 #include "AliAnaConvCorrPion.h"
24 //#include "AliAODTrack.h"
25 #include "TClonesArray.h"
26 #include "AliAODConversionParticle.h"
27 #include <AliLog.h>
28
29 //#include "AliAODConversionMother.h"
30 //#include "AliAODConversionPhoton.h"
31 //#include "THnSparse.h"
32 //#include "TH2F.h"
33
34 #include <iostream>
35
36
37 using namespace std;
38 ClassImp(AliAnaConvCorrPion)
39
40 //________________________________________________________________________________
41 AliAnaConvCorrPion::AliAnaConvCorrPion() :
42 AliAnaConvCorrBase("pion_hadron_corr", "Pion dPhi"),
43 //hTriggerPtvsMass(NULL),
44   fAxisM()
45 {
46   //consctructor
47   InitMassAxis();
48 }
49 //________________________________________________________________________________
50 AliAnaConvCorrPion::AliAnaConvCorrPion(TString name, TString title = "Pion Corr") :
51   AliAnaConvCorrBase(name, title),
52   //hTriggerPtvsMass(NULL),
53   fAxisM()
54 {
55   //consctructor
56   InitMassAxis();
57 }
58
59
60 //________________________________________________________________________________
61 AliAnaConvCorrPion::~AliAnaConvCorrPion() {
62   //destructor
63 }
64
65 //________________________________________________________________________________
66 void AliAnaConvCorrPion::InitMassAxis() {
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");
70   GetAxisList().AddAt(&fAxisM, 4);
71   GetTrackAxisList().AddAt(&fAxisM, 3);
72   GetTrigAxisList().AddAt(&fAxisM, 2);
73 }
74
75 ///________________________________________________________________________________
76 void AliAnaConvCorrPion::CreateHistograms() {
77   //Create histograms
78   CreateBaseHistograms();
79  
80   hTriggerPtvsMass[0] = new TH2D(Form("hTriggerPtvsMass_all_%s", GetName()), "Pt vs Mass all pizero", 400, 0, .400, GetAxistPt().GetNbins(), GetAxistPt().GetXbins()->GetArray());
81   hTriggerPtvsMass[1] = new TH2D("hTriggerPtvsMass_leadingcone", "Pt vs Mass leading cone", 1, 0, .400, 1, 0, 100);
82   hTriggerPtvsMass[2] = new TH2D("hTriggerPtvsMass_leadingevent", "Pt vs Mass leading event", 1, 0, .400, 1, 0, 100);
83   GetHistograms()->Add(hTriggerPtvsMass[0]);
84   //GetHistograms()->Add(hTriggerPtvsMass[1]);
85   //GetHistograms()->Add(hTriggerPtvsMass[2]);
86 }
87
88
89 ///________________________________________________________________________________
90 void AliAnaConvCorrPion::FillTriggerCounters(const AliAODConversionParticle * particle, Int_t leading) {
91   //Fill histograms counting triggers
92   //fHNTriggers[leading]->Fill(particle->Pt());
93   AliDebug(AliLog::kDebug + 5, Form("Fill trigger countder %f %f", particle->M(), particle->Pt()));
94   hTriggerPtvsMass[leading]->Fill(particle->M(), particle->Pt());
95 }
96
97 //________________________________________________________________________________
98 // void AliAnaConvCorrPion::Process(TClonesArray * pions, TClonesArray * photons, TClonesArray * tracks) {
99
100 //   for(Int_t ip = 0; ip < pions->GetEntriesFast(); ip++) {
101
102 //      AliAODConversionParticle * pion = static_cast<AliAODConversionParticle*>(pions->UncheckedAt(ip));
103         
104 //      Int_t tIDs[4] = {-1, -1, -1, -1};
105 //      AliAODConversionParticle * photon1 = static_cast<AliAODConversionParticle*>(photons->UncheckedAt(pion->GetLabel(0)));
106 //      tIDs[0] =  photon1->GetLabel(0);
107 //      tIDs[1] =  photon1->GetLabel(1);
108 //      AliAODConversionParticle * photon2 = static_cast<AliAODConversionParticle*>(photons->UncheckedAt(pion->GetLabel(1)));
109 //      tIDs[2] =  photon2->GetLabel(0);
110 //      tIDs[3] =  photon2->GetLabel(1);
111         
112 //      CorrelateWithTracks(static_cast<AliAODConversionParticle*>(pion), tracks, tIDs, kFALSE);
113 //   }
114 // }
115