1 /***************************************************************************
5 * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu
6 ***************************************************************************
8 * Description: part of STAR HBT Framework: AliFemtoMaker package
9 * a simple Q-invariant correlation function
11 ***************************************************************************
14 * Revision 1.1.1.1 2007/03/07 10:14:49 mchojnacki
15 * First version on CVS
17 * Revision 1.4 2000/01/25 17:34:45 laue
18 * I. In order to run the stand alone version of the AliFemtoMaker the following
19 * changes have been done:
20 * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements
21 * b) unnecessary includes of StMaker.h have been removed
22 * c) the subdirectory AliFemtoMaker/doc/Make has been created including everything
23 * needed for the stand alone version
25 * II. To reduce the amount of compiler warning
26 * a) some variables have been type casted
27 * b) some destructors have been declared as virtual
29 * Revision 1.3 1999/07/29 02:47:09 lisa
30 * 1) add OpeningAngle correlation function 2) add AliFemtoMcEventReader 3) make histos in CorrFctns do errors correctly
32 * Revision 1.2 1999/07/06 22:33:20 lisa
33 * Adjusted all to work in pro and new - dev itself is broken
35 * Revision 1.1.1.1 1999/06/29 16:02:57 lisa
36 * Installation of AliFemtoMaker
38 **************************************************************************/
40 #include "CorrFctn/AliFemtoQinvCorrFctn.h"
41 //#include "Infrastructure/AliFemtoHisto.h"
45 ClassImp(AliFemtoQinvCorrFctn)
48 //____________________________
49 AliFemtoQinvCorrFctn::AliFemtoQinvCorrFctn(char* title, const int& nbins, const float& QinvLo, const float& QinvHi){
51 // title = "Num Qinv (MeV/c)";
52 char TitNum[100] = "Num";
54 fNumerator = new TH1D(TitNum,title,nbins,QinvLo,QinvHi);
56 //title = "Den Qinv (MeV/c)";
57 char TitDen[100] = "Den";
59 fDenominator = new TH1D(TitDen,title,nbins,QinvLo,QinvHi);
61 //title = "Ratio Qinv (MeV/c)";
62 char TitRat[100] = "Rat";
64 fRatio = new TH1D(TitRat,title,nbins,QinvLo,QinvHi);
65 // this next bit is unfortunately needed so that we can have many histos of same "title"
66 // it is neccessary if we typedef TH1D to TH1d (which we do)
67 //fNumerator->SetDirectory(0);
68 //fDenominator->SetDirectory(0);
69 //fRatio->SetDirectory(0);
71 // to enable error bar calculation...
73 fDenominator->Sumw2();
78 //____________________________
79 AliFemtoQinvCorrFctn::~AliFemtoQinvCorrFctn(){
84 //_________________________
85 void AliFemtoQinvCorrFctn::Finish(){
86 // here is where we should normalize, fit, etc...
87 // we should NOT Draw() the histos (as I had done it below),
88 // since we want to insulate ourselves from root at this level
89 // of the code. Do it instead at root command line with browser.
90 // fNumerator->Draw();
91 //fDenominator->Draw();
93 fRatio->Divide(fNumerator,fDenominator,1.0,1.0);
97 //____________________________
98 AliFemtoString AliFemtoQinvCorrFctn::Report(){
99 string stemp = "Qinv Correlation Function Report:\n";
101 sprintf(ctemp,"Number of entries in numerator:\t%E\n",fNumerator->GetEntries());
103 sprintf(ctemp,"Number of entries in denominator:\t%E\n",fDenominator->GetEntries());
105 sprintf(ctemp,"Number of entries in ratio:\t%E\n",fRatio->GetEntries());
107 // stemp += mCoulombWeight->Report();
108 AliFemtoString returnThis = stemp;
111 //____________________________
112 void AliFemtoQinvCorrFctn::AddRealPair(const AliFemtoPair* pair){
113 double Qinv = fabs(pair->qInv()); // note - qInv() will be negative for identical pairs...
114 fNumerator->Fill(Qinv);
115 // cout << "AliFemtoQinvCorrFctn::AddRealPair : " << pair->qInv() << " " << Qinv <<
116 //" " << pair->track1().FourMomentum() << " " << pair->track2().FourMomentum() << endl;
118 //____________________________
119 void AliFemtoQinvCorrFctn::AddMixedPair(const AliFemtoPair* pair){
121 double Qinv = fabs(pair->qInv()); // note - qInv() will be negative for identical pairs...
122 fDenominator->Fill(Qinv,weight);