]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.cxx
More coding rule conformance
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemto / AliFemtoQinvCorrFctn.cxx
index 4dbdf69e2b0a2f6d9b762bf8f8170a54b234a3e4..31737daf82a343a0ba39e07207dd79acebb3872c 100644 (file)
@@ -1,47 +1,9 @@
-/***************************************************************************
- *
- * $Id$
- *
- * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu
- ***************************************************************************
- *
- * Description: part of STAR HBT Framework: AliFemtoMaker package
- *   a simple Q-invariant correlation function           
- *
- ***************************************************************************
- *
- * $Log$
- * Revision 1.2  2007/05/03 09:40:42  akisiel
- * Fixing Effective C++ warnings
- *
- * Revision 1.1.1.1  2007/04/25 15:38:41  panos
- * Importing the HBT code dir
- *
- * Revision 1.1.1.1  2007/03/07 10:14:49  mchojnacki
- * First version on CVS
- *
- * Revision 1.4  2000/01/25 17:34:45  laue
- * I. In order to run the stand alone version of the AliFemtoMaker the following
- * changes have been done:
- * a) all ClassDefs and ClassImps have been put into #ifdef __ROOT__ statements
- * b) unnecessary includes of StMaker.h have been removed
- * c) the subdirectory AliFemtoMaker/doc/Make has been created including everything
- * needed for the stand alone version
- *
- * II. To reduce the amount of compiler warning
- * a) some variables have been type casted
- * b) some destructors have been declared as virtual
- *
- * Revision 1.3  1999/07/29 02:47:09  lisa
- * 1) add OpeningAngle correlation function 2) add AliFemtoMcEventReader 3) make histos in CorrFctns do errors correctly
- *
- * Revision 1.2  1999/07/06 22:33:20  lisa
- * Adjusted all to work in pro and new - dev itself is broken
- *
- * Revision 1.1.1.1  1999/06/29 16:02:57  lisa
- * Installation of AliFemtoMaker
- *
- **************************************************************************/
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// AliFemtoQinvCorrFctn:                                                 //
+// a simple Q-invariant correlation function                             // 
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
 
 #include "AliFemtoQinvCorrFctn.h"
 //#include "AliFemtoHisto.h"
@@ -59,19 +21,19 @@ AliFemtoQinvCorrFctn::AliFemtoQinvCorrFctn(char* title, const int& nbins, const
 {
   // set up numerator
   //  title = "Num Qinv (MeV/c)";
-  char TitNum[100] = "Num";
-  strcat(TitNum,title);
-  fNumerator = new TH1D(TitNum,title,nbins,QinvLo,QinvHi);
+  char tTitNum[100] = "Num";
+  strcat(tTitNum,title);
+  fNumerator = new TH1D(tTitNum,title,nbins,QinvLo,QinvHi);
   // set up denominator
   //title = "Den Qinv (MeV/c)";
-  char TitDen[100] = "Den";
-  strcat(TitDen,title);
-  fDenominator = new TH1D(TitDen,title,nbins,QinvLo,QinvHi);
+  char tTitDen[100] = "Den";
+  strcat(tTitDen,title);
+  fDenominator = new TH1D(tTitDen,title,nbins,QinvLo,QinvHi);
   // set up ratio
   //title = "Ratio Qinv (MeV/c)";
-  char TitRat[100] = "Rat";
-  strcat(TitRat,title);
-  fRatio = new TH1D(TitRat,title,nbins,QinvLo,QinvHi);
+  char tTitRat[100] = "Rat";
+  strcat(tTitRat,title);
+  fRatio = new TH1D(tTitRat,title,nbins,QinvLo,QinvHi);
   // this next bit is unfortunately needed so that we can have many histos of same "title"
   // it is neccessary if we typedef TH1D to TH1d (which we do)
   //fNumerator->SetDirectory(0);
@@ -91,12 +53,14 @@ AliFemtoQinvCorrFctn::AliFemtoQinvCorrFctn(const AliFemtoQinvCorrFctn& aCorrFctn
   fDenominator(0),
   fRatio(0)
 {
+  // copy constructor
   fNumerator = new TH1D(*aCorrFctn.fNumerator);
   fDenominator = new TH1D(*aCorrFctn.fDenominator);
   fRatio = new TH1D(*aCorrFctn.fRatio);
 }
 //____________________________
 AliFemtoQinvCorrFctn::~AliFemtoQinvCorrFctn(){
+  // destructor
   delete fNumerator;
   delete fDenominator;
   delete fRatio;
@@ -104,6 +68,7 @@ AliFemtoQinvCorrFctn::~AliFemtoQinvCorrFctn(){
 //_________________________
 AliFemtoQinvCorrFctn& AliFemtoQinvCorrFctn::operator=(const AliFemtoQinvCorrFctn& aCorrFctn)
 {
+  // assignment operator
   if (this == &aCorrFctn)
     return *this;
 
@@ -132,6 +97,7 @@ void AliFemtoQinvCorrFctn::Finish(){
 
 //____________________________
 AliFemtoString AliFemtoQinvCorrFctn::Report(){
+  // construct report
   string stemp = "Qinv Correlation Function Report:\n";
   char ctemp[100];
   sprintf(ctemp,"Number of entries in numerator:\t%E\n",fNumerator->GetEntries());
@@ -146,16 +112,18 @@ AliFemtoString AliFemtoQinvCorrFctn::Report(){
 }
 //____________________________
 void AliFemtoQinvCorrFctn::AddRealPair(AliFemtoPair* pair){
-  double Qinv = fabs(pair->QInv());   // note - qInv() will be negative for identical pairs...
-  fNumerator->Fill(Qinv);
-  //  cout << "AliFemtoQinvCorrFctn::AddRealPair : " << pair->qInv() << " " << Qinv <<
+  // add true pair
+  double tQinv = fabs(pair->QInv());   // note - qInv() will be negative for identical pairs...
+  fNumerator->Fill(tQinv);
+  //  cout << "AliFemtoQinvCorrFctn::AddRealPair : " << pair->qInv() << " " << tQinv <<
   //" " << pair->track1().FourMomentum() << " " << pair->track2().FourMomentum() << endl;
 }
 //____________________________
 void AliFemtoQinvCorrFctn::AddMixedPair(AliFemtoPair* pair){
+  // add mixed (background) pair
   double weight = 1.0;
-  double Qinv = fabs(pair->QInv());   // note - qInv() will be negative for identical pairs...
-  fDenominator->Fill(Qinv,weight);
+  double tQinv = fabs(pair->QInv());   // note - qInv() will be negative for identical pairs...
+  fDenominator->Fill(tQinv,weight);
 }