1 /////////////////////////////////////////////////////////////////////////////////////
3 // AliFemtoPairCutPt - a pair cut which checks if the sum of the transverse //
4 // momenta of two particles fit within given range //
5 // Authors: Malgorzata Janik, Warsaw University of Technology, majanik@cern.ch //
6 // Lukasz Graczykowski, Warsaw University of Technology, lgraczyk@cern.ch //
8 /////////////////////////////////////////////////////////////////////////////////////
10 #include "AliFemtoPairCutPt.h"
16 ClassImp(AliFemtoPairCutPt)
20 AliFemtoPairCutPt::AliFemtoPairCutPt():
30 AliFemtoPairCutPt::AliFemtoPairCutPt(double lo, double hi):
41 AliFemtoPairCutPt::AliFemtoPairCutPt(const AliFemtoPairCutPt& c) :
48 fSumPtMin = c.fSumPtMin;
49 fSumPtMax = c.fSumPtMax;
51 AliFemtoPairCutPt& AliFemtoPairCutPt::operator=(const AliFemtoPairCutPt& c)
54 fSumPtMin = c.fSumPtMin;
55 fSumPtMax = c.fSumPtMax;
63 AliFemtoPairCutPt::~AliFemtoPairCutPt(){
67 bool AliFemtoPairCutPt::Pass(const AliFemtoPair* pair){
71 double pt1 = pair->Track1()->Track()->Pt();
72 double pt2 = pair->Track2()->Track()->Pt();
74 double pt_sum = pt1 + pt2;
76 if(pt_sum >= fSumPtMin && pt_sum <= fSumPtMax)
90 AliFemtoString AliFemtoPairCutPt::Report(){
91 // Prepare a report from the execution
92 string stemp = "AliFemtoPairCutPt Pair Cut\n";
95 snprintf(ctemp,100,"Number of pairs which passed:\t%ld Number which failed:\t%ld\n",(long int) fNPairsPassed,(long int) fNPairsFailed);
97 AliFemtoString returnThis = stemp;
101 TList *AliFemtoPairCutPt::ListSettings()
103 // return a list of settings in a writable form
104 TList *tListSetttings = new TList();
106 snprintf(buf, 200, "AliFemtoPairCutPt.sumptmin=%f", fSumPtMin);
107 snprintf(buf, 200, "AliFemtoPairCutPr.sumptmax=%f", fSumPtMax);
108 tListSetttings->AddLast(new TObjString(buf));
110 return tListSetttings;
113 void AliFemtoPairCutPt::SetMinSumPt(Double_t sumptmin)
115 fSumPtMin = sumptmin;
119 void AliFemtoPairCutPt::SetMaxSumPt(Double_t sumptmax)
121 fSumPtMax = sumptmax;