]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/AliAnaGammaCorrelation.cxx
New class for particle selection
[u/mrichter/AliRoot.git] / PWG4 / AliAnaGammaCorrelation.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
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 /* $Id$ */
16
17 /* History of cvs commits:
18  *
19  * $Log$
20  * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
21  * new analysis classes in the the new analysis framework
22  *
23  *
24  */
25
26 //_________________________________________________________________________
27 // Base class for the analysis of gamma correlations  
28 //*-- Author: Gustavo Conesa (LNF-INFN) 
29 //////////////////////////////////////////////////////////////////////////////
30
31
32 // --- ROOT system ---
33
34 #include <TParticle.h>
35 #include <TH2.h>
36
37 //---- AliRoot system ----
38 #include "AliAnaGammaCorrelation.h" 
39 #include "AliNeutralMesonSelection.h" 
40 #include "Riostream.h"
41 #include "AliLog.h"
42
43 ClassImp(AliAnaGammaCorrelation)
44
45
46 //____________________________________________________________________________
47   AliAnaGammaCorrelation::AliAnaGammaCorrelation() : 
48     TObject(), fOutputContainer(0x0),   
49     fNeutralMesonSelection(0x0), fCorrelationType(0),
50     fJetsOnlyInCTS(0),
51     fMinPtHadron(0),
52     fDeltaPhiMaxCut(0.), fDeltaPhiMinCut(0.), 
53     fRatioMaxCut(0.), fRatioMinCut(0.)
54 {
55   //Default Ctor
56
57   //Initialize parameters
58
59   if(!fNeutralMesonSelection)
60     fNeutralMesonSelection = new AliNeutralMesonSelection();
61   
62   //Initialize parameters
63   InitParameters();
64 }
65
66 //____________________________________________________________________________
67 AliAnaGammaCorrelation::AliAnaGammaCorrelation(const AliAnaGammaCorrelation & g) :   
68   TObject(), fOutputContainer(g.fOutputContainer),  
69   fNeutralMesonSelection(g.fNeutralMesonSelection),
70   fCorrelationType(g.fCorrelationType),
71   fJetsOnlyInCTS(g.fJetsOnlyInCTS), 
72   fMinPtHadron(g.fMinPtHadron),
73   fDeltaPhiMaxCut(g.fDeltaPhiMaxCut), fDeltaPhiMinCut(g.fDeltaPhiMinCut), 
74   fRatioMaxCut(g.fRatioMaxCut), fRatioMinCut(g.fRatioMinCut) 
75 {
76   // cpy ctor
77
78 }
79
80 //_________________________________________________________________________
81 AliAnaGammaCorrelation & AliAnaGammaCorrelation::operator = (const AliAnaGammaCorrelation & source)
82 {
83   // assignment operator
84
85   if(this == &source)return *this;
86   ((TObject *)this)->operator=(source);
87
88   fOutputContainer = source.fOutputContainer;  
89   fNeutralMesonSelection = source.fNeutralMesonSelection ;
90   fCorrelationType = source.fCorrelationType;
91   fJetsOnlyInCTS = source.fJetsOnlyInCTS ;
92
93   fMinPtHadron = source.fMinPtHadron ;
94   fDeltaPhiMaxCut = source.fDeltaPhiMaxCut ; fDeltaPhiMinCut = source.fDeltaPhiMinCut ; 
95   fRatioMaxCut = source.fRatioMaxCut ; fRatioMinCut = source.fRatioMinCut ; 
96
97
98
99   return *this;
100
101 }
102
103 //____________________________________________________________________________
104 AliAnaGammaCorrelation::~AliAnaGammaCorrelation() 
105 {
106   // Remove all pointers
107   fOutputContainer->Clear();
108   delete fOutputContainer;
109
110   delete fNeutralMesonSelection ;
111  
112 }
113
114  //____________________________________________________________________________
115 void AliAnaGammaCorrelation::InitParameters()
116 {
117  
118   //Initialize the parameters of the analysis.
119   fCorrelationType = kHadron ;
120   //-----------kHadron----------------
121   fMinPtHadron = 0.   ;
122   //-----------kHadron & kJetLeadCone----------------
123   fJetsOnlyInCTS = kFALSE ;
124   fDeltaPhiMaxCut      = 4.5;
125   fDeltaPhiMinCut      = 1.5 ;
126   //-----------kJetLeadCone----------------
127   fRatioMaxCut = 1.0 ; 
128   fRatioMinCut = 0.1 ; 
129
130 }
131
132 //__________________________________________________________________
133 void AliAnaGammaCorrelation::Print(const Option_t * opt) const
134 {
135
136   //Print some relevant parameters set for the analysis
137   if(! opt)
138     return;
139   
140   Info("Print", "%s %s", GetName(), GetTitle() ) ;
141   printf("Correlation           =     %d\n", fCorrelationType) ;  
142   
143   printf("pT Hadron       >    %f\n", fMinPtHadron) ; 
144   printf("Phi gamma-Hadron      <     %f\n", fDeltaPhiMaxCut) ; 
145   printf("Phi gamma-Hadron      >     %f\n", fDeltaPhiMinCut) ;
146   printf("Ratio pt hadron/gamma      <     %f\n", fRatioMaxCut) ; 
147   printf("Ratio pt hadron/gamma      >     %f\n", fRatioMinCut) ;
148
149