More coding rule conformance
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 May 2007 10:38:25 +0000 (10:38 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 May 2007 10:38:25 +0000 (10:38 +0000)
18 files changed:
PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicTrackCut.cxx
PWG2/FEMTOSCOPY/AliFemto/AliFemtoBasicTrackCut.h
PWG2/FEMTOSCOPY/AliFemto/AliFemtoCoulomb.cxx
PWG2/FEMTOSCOPY/AliFemto/AliFemtoCoulomb.h
PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignAnalysis.cxx
PWG2/FEMTOSCOPY/AliFemto/AliFemtoLikeSignAnalysis.h
PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.cxx
PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVectorHideAway.cxx
PWG2/FEMTOSCOPY/AliFemto/AliFemtoPicoEventCollectionVectorHideAway.h
PWG2/FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.cxx
PWG2/FEMTOSCOPY/AliFemto/AliFemtoQinvCorrFctn.h
PWG2/FEMTOSCOPY/AliFemto/AliFmHelix.h
PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoESDTrackCut.cxx
PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoESDTrackCut.h
PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoModelCorrFctnSource.cxx
PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoModelCorrFctnSource.h
PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoShareQualityCorrFctn.cxx
PWG2/FEMTOSCOPY/AliFemtoUser/AliFemtoShareQualityCorrFctn.h

index 6508434..1e52790 100644 (file)
@@ -18,6 +18,7 @@ AliFemtoBasicTrackCut::AliFemtoBasicTrackCut():
   fNTracksPassed(0),
   fNTracksFailed(0)
 {
+  // Default constructor
   fNTracksPassed = fNTracksFailed = 0;
   fCharge = 1;  // takes both charges 0
   fNSigmaPion[0] = -100.0;   fNSigmaPion[1] = 100.0;
@@ -35,7 +36,9 @@ AliFemtoBasicTrackCut::AliFemtoBasicTrackCut():
 //}
 //------------------------------
 bool AliFemtoBasicTrackCut::Pass(const AliFemtoTrack* track){
-
+  // test the particle and return 
+  // true if it meets all the criteria
+  // false if it doesn't meet at least one of the criteria
 
   //  return true ;  // THIS CUT IS A STHBTDUMMY!!
 
@@ -60,11 +63,11 @@ bool AliFemtoBasicTrackCut::Pass(const AliFemtoTrack* track){
     goodPID = (goodPID&&(track->Charge() == fCharge));
   }
   if (goodPID){
-    float TEnergy = ::sqrt(track->P().mag2()+fMass*fMass);
-    float TRapidity = 0.5*::log((TEnergy+track->P().z())/
-                           (TEnergy-track->P().z()));
+    float tEnergy = ::sqrt(track->P().mag2()+fMass*fMass);
+    float tRapidity = 0.5*::log((tEnergy+track->P().z())/
+                           (tEnergy-track->P().z()));
 
-    float Pt = ::sqrt((track->P().x())*(track->P().x())+
+    float tPt = ::sqrt((track->P().x())*(track->P().x())+
                     (track->P().y())*(track->P().y()));
 
     
@@ -74,8 +77,8 @@ bool AliFemtoBasicTrackCut::Pass(const AliFemtoTrack* track){
       cout << " * fDCA[1] " << fDCA[1];
       cout << " * track->DCAxy " << track->DCAxy();
       cout << " * NHits " <<  (track->NHits() > fNHits[0]) && (track->NHits() < fNHits[1]); 
-      cout << " * Pt " << (Pt > fPt[0]) && (Pt < fPt[1]);
-      cout << " * y " << (TRapidity > fRapidity[0]) && (TRapidity < fRapidity[1]);
+      cout << " * tPt " << (tPt > fPt[0]) && (tPt < fPt[1]);
+      cout << " * y " << (tRapidity > fRapidity[0]) && (tRapidity < fRapidity[1]);
       cout << endl;
     */
 
@@ -84,15 +87,15 @@ bool AliFemtoBasicTrackCut::Pass(const AliFemtoTrack* track){
      //  (track->DCAxy()  < fDCA[1]) &&
   //     (track->NHits() > fNHits[0]) &&
     //   (track->NHits() < fNHits[1]) &&
-       (Pt             > fPt[0]) &&
-       (Pt             < fPt[1]) &&
-       (TRapidity      > fRapidity[0]) &&
-       (TRapidity      < fRapidity[1]))&&
+       (tPt             > fPt[0]) &&
+       (tPt             < fPt[1]) &&
+       (tRapidity      > fRapidity[0]) &&
+       (tRapidity      < fRapidity[1]))&&
        (track->PidProbPion()>0.5)&&//moje
        (track->PidProbMuon()<0.47)&&//moje
        (track->Label()>0);//moje
 
-    //    cout << track->DCAxy() << " " << track->NHits() << " " << Pt << " " << TRapidity << " " << TEnergy << endl;
+    //    cout << track->DCAxy() << " " << track->NHits() << " " << Pt << " " << tRapidity << " " << tEnergy << endl;
 
     goodTrack ? fNTracksPassed++ : fNTracksFailed++;
     return (goodTrack);
@@ -104,28 +107,29 @@ bool AliFemtoBasicTrackCut::Pass(const AliFemtoTrack* track){
 }
 //------------------------------
 AliFemtoString AliFemtoBasicTrackCut::Report(){
-  string Stemp;
-  char Ctemp[100];
-  sprintf(Ctemp,"Particle mass:\t%E\n",this->Mass());
-  Stemp=Ctemp;
-  sprintf(Ctemp,"Particle charge:\t%d\n",fCharge);
-  Stemp=Ctemp;
-  sprintf(Ctemp,"Particle Nsigma from pion:\t%E - %E\n",fNSigmaPion[0],fNSigmaPion[1]);
-  Stemp+=Ctemp;
-  sprintf(Ctemp,"Particle Nsigma from kaon:\t%E - %E\n",fNSigmaKaon[0],fNSigmaKaon[1]);
-  Stemp+=Ctemp;
-  sprintf(Ctemp,"Particle Nsigma from proton:\t%E - %E\n",fNSigmaProton[0],fNSigmaProton[1]);
-  Stemp+=Ctemp;
-  sprintf(Ctemp,"Particle #hits:\t%d - %d\n",fNHits[0],fNHits[1]);
-  Stemp+=Ctemp;
-  sprintf(Ctemp,"Particle pT:\t%E - %E\n",fPt[0],fPt[1]);
-  Stemp+=Ctemp;
-  sprintf(Ctemp,"Particle rapidity:\t%E - %E\n",fRapidity[0],fRapidity[1]);
-  Stemp+=Ctemp;
-  sprintf(Ctemp,"Particle DCA:\t%E - %E\n",fDCA[0],fDCA[1]);
-  Stemp+=Ctemp;
-  sprintf(Ctemp,"Number of tracks which passed:\t%ld  Number which failed:\t%ld\n",fNTracksPassed,fNTracksFailed);
-  Stemp += Ctemp;
-  AliFemtoString returnThis = Stemp;
+  // construct report
+  string tStemp;
+  char tCtemp[100];
+  sprintf(tCtemp,"Particle mass:\t%E\n",this->Mass());
+  tStemp=tCtemp;
+  sprintf(tCtemp,"Particle charge:\t%d\n",fCharge);
+  tStemp=tCtemp;
+  sprintf(tCtemp,"Particle Nsigma from pion:\t%E - %E\n",fNSigmaPion[0],fNSigmaPion[1]);
+  tStemp+=tCtemp;
+  sprintf(tCtemp,"Particle Nsigma from kaon:\t%E - %E\n",fNSigmaKaon[0],fNSigmaKaon[1]);
+  tStemp+=tCtemp;
+  sprintf(tCtemp,"Particle Nsigma from proton:\t%E - %E\n",fNSigmaProton[0],fNSigmaProton[1]);
+  tStemp+=tCtemp;
+  sprintf(tCtemp,"Particle #hits:\t%d - %d\n",fNHits[0],fNHits[1]);
+  tStemp+=tCtemp;
+  sprintf(tCtemp,"Particle pT:\t%E - %E\n",fPt[0],fPt[1]);
+  tStemp+=tCtemp;
+  sprintf(tCtemp,"Particle rapidity:\t%E - %E\n",fRapidity[0],fRapidity[1]);
+  tStemp+=tCtemp;
+  sprintf(tCtemp,"Particle DCA:\t%E - %E\n",fDCA[0],fDCA[1]);
+  tStemp+=tCtemp;
+  sprintf(tCtemp,"Number of tracks which passed:\t%ld  Number which failed:\t%ld\n",fNTracksPassed,fNTracksFailed);
+  tStemp += tCtemp;
+  AliFemtoString returnThis = tStemp;
   return returnThis;
 }
index 9d9a3de..40b8abd 100644 (file)
@@ -6,8 +6,8 @@
 //                                                                            //
 ////////////////////////////////////////////////////////////////////////////////
 
-#ifndef AliFemtoBasicTrackCut_hh
-#define AliFemtoBasicTrackCut_hh
+#ifndef ALIFEMTOBASICTRACKCUT_H
+#define ALIFEMTOBASICTRACKCUT_H
 
 //#ifndef StMaker_H
 //#include "StMaker.h"
@@ -22,7 +22,7 @@ public:
   AliFemtoBasicTrackCut();
   //~mikesTrackCut();
 
-  virtual bool Pass(const AliFemtoTrack*);
+  virtual bool Pass(const AliFemtoTrack* tr);
 
   virtual AliFemtoString Report();
 
@@ -35,22 +35,22 @@ public:
   void SetPt(const float& lo, const float& hi);
   void SetRapidity(const float& lo, const float& hi);
   void SetDCA(const float& lo, const float& hi);
-  void SetCharge(const int&);
+  void SetCharge(const int& ch);
 
 
 private:   // here are the quantities I want to cut on...
 
-  int               fCharge;
-  float             fNSigmaPion[2];
-  float             fNSigmaKaon[2];
-  float             fNSigmaProton[2];
-  int               fNHits[2];
-  float             fPt[2];
-  float             fRapidity[2];
-  float             fDCA[2];
-
-  long              fNTracksPassed;
-  long              fNTracksFailed;
+  int               fCharge;             // charge of the track
+  float             fNSigmaPion[2];      // bounds for nsigma dEdx from pion band 
+  float             fNSigmaKaon[2];      // bounds for nsigma dEdx from kaon band
+  float             fNSigmaProton[2];    // bounds for nsigma dEdx from proton band
+  int               fNHits[2];           // bounds for number of hits
+  float             fPt[2];              // bounds for transverse momentum
+  float             fRapidity[2];        // bounds for rapidity
+  float             fDCA[2];             // bounds for DCA to primary vertex
+
+  long              fNTracksPassed;      // passed tracks counter
+  long              fNTracksFailed;      // falied tracks counter
 
 #ifdef __ROOT__ 
   ClassDef(AliFemtoBasicTrackCut, 1)
index 4cb9c85..e23492e 100644 (file)
@@ -1,56 +1,12 @@
-/***************************************************************************
- *
- * $Id$
- *
- * Author: Randy Wells, Ohio State, rcwells@mps.ohio-state.edu
- ***************************************************************************
- *
- * Description: part of STAR HBT Framework: AliFemtoMaker package
- *    This is a Coulomb correction class which
- *  1. Reads in the dat from a file
- *  2. Performs a linear interpolation in R and creates any array of interpolations
- *  3. Interpolates in eta and returns the Coulomb correction to user
- *
- ***************************************************************************
- *
- * $Log$
- * Revision 1.4  2007/05/03 09:42:29  akisiel
- * Fixing Effective C++ warnings
- *
- * Revision 1.3  2007/04/27 07:24:34  akisiel
- * Make revisions needed for compilation from the main AliRoot tree
- *
- * 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.17  2003/09/02 17:58:32  perev
- * gcc 3.2 updates + WarnOff
- *
- * Revision 1.16  2003/02/04 21:10:31  magestro
- * Cleaned up a couple functions
- *
- * Revision 1.15  2003/01/31 19:44:00  magestro
- * Cleared up simple compiler warnings on i386_linux24
- *
- * Revision 1.14  2000/10/26 19:48:54  rcwells
- * Added functionality for Coulomb correction of <qInv> in 3D correltions
- *
- * Revision 1.13  2000/07/16 21:38:22  laue
- * AliFemtoCoulomb.cxx AliFemtoSectoredAnalysis.cxx : updated for standalone version
- * AliFemtoV0.cc AliFemtoV0.h : some cast to prevent compiling warnings
- * AliFemtoParticle.cc AliFemtoParticle.h : pointers mTrack,mV0 initialized to 0
- * AliFemtoIOBinary.cc : some printouts in #ifdef STHBTDEBUG
- * AliFemtoEvent.cc : B-Field set to 0.25Tesla, we have to think about a better
- *                 solution
- *
- * Revision 1.12  2000/05/31 20:12:53  rcwells
- * Modified AliFemtoCoulomb for Id and Log entries
- *
- *
- **************************************************************************/
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// AliFemtoCoulomb: This is a Coulomb correction class which             //
+//  1. Reads in the dat from a file                                      //  
+//  2. Performs a linear interpolation in R and creates any array of     //
+//     interpolations                                                    //
+//  3. Interpolates in eta and returns the Coulomb correction to user    //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
 
 #include "AliFemtoCoulomb.h"
 //#include "Stiostream.h"
@@ -68,6 +24,7 @@ AliFemtoCoulomb::AliFemtoCoulomb() :
   fZ1Z2(1.0),
   fNLines(0)
 {
+  // Default constructor
   fFile = "/afs/rhic/star/hbt/coul/AliFemtoCorrectionFiles/correctionpp.dat";
   if (!fFile) {
     cout << " No file, dummy!" << endl;
@@ -82,6 +39,7 @@ AliFemtoCoulomb::AliFemtoCoulomb(const AliFemtoCoulomb& aCoul) :
   fZ1Z2(aCoul.fZ1Z2),
   fNLines(0)
 {
+  // copy constructor
   CreateLookupTable(fRadius);
 }
 
@@ -91,6 +49,7 @@ AliFemtoCoulomb::AliFemtoCoulomb(const char* readFile, const double& radius, con
   fZ1Z2(0),
   fNLines(0)
 {
+  // constructor with explicit filename
   fFile = readFile;
   fRadius = radius;
   CreateLookupTable(fRadius);
@@ -99,11 +58,12 @@ AliFemtoCoulomb::AliFemtoCoulomb(const char* readFile, const double& radius, con
 }
 
 AliFemtoCoulomb::~AliFemtoCoulomb() {
-
+  // destructor
 }
 
 AliFemtoCoulomb& AliFemtoCoulomb::operator=(const AliFemtoCoulomb& aCoul)
 {
+  // assignment operator
   if (this == &aCoul)
     return *this;
 
@@ -118,16 +78,19 @@ AliFemtoCoulomb& AliFemtoCoulomb::operator=(const AliFemtoCoulomb& aCoul)
 
 
 void AliFemtoCoulomb::SetRadius(const double& radius) {
+  // set the coulomb radius
   cout << " AliFemtoCoulomb::setRadius() " << endl;
   fRadius = radius;
   CreateLookupTable(fRadius);
 }
 
-double AliFemtoCoulomb::GetRadius() {
+double AliFemtoCoulomb::GetRadius() const {
+  // return coulomb radius
   return (fRadius);
 }
 
 void AliFemtoCoulomb::SetFile(const char* readFile) {
+  // set the filename with coulomb calculations
   cout << " AliFemtoCoulomb::SetFile() " << endl;
   fFile = readFile;
   // Create new lookup table since file has changed
@@ -137,6 +100,7 @@ void AliFemtoCoulomb::SetFile(const char* readFile) {
 }
 
 void AliFemtoCoulomb::SetChargeProduct(const double& charge) {
+  // set pair charge
   cout << " AliFemtoCoulomb::SetChargeProduct() " << endl;
   if ( fZ1Z2!=charge ) { 
     fZ1Z2 = charge;
@@ -151,9 +115,9 @@ void AliFemtoCoulomb::SetChargeProduct(const double& charge) {
 }
 
 void AliFemtoCoulomb::CreateLookupTable(const double& radius) {
-  cout << " AliFemtoCoulomb::CreateLookupTable() " << endl;
   // Read radii from fFile
   // Create array(pair) of linear interpolation between radii
+  cout << " AliFemtoCoulomb::CreateLookupTable() " << endl;
 
   if (radius<0.0) {
     cout << " AliFemtoCoulomb::CreateLookupTable -> NEGATIVE RADIUS " << endl;
@@ -173,33 +137,33 @@ void AliFemtoCoulomb::CreateLookupTable(const double& radius) {
 
   static char tempstring[2001];
   static float radii[2000];
-  static int NRadii = 0;
-  NRadii = 0;
+  static int tNRadii = 0;
+  tNRadii = 0;
   if (!mystream.getline(tempstring,2000)) {
     cout << "Could not read radii from file" << endl;
     assert(0);
   }
   for (unsigned int ii=0; ii<strlen(tempstring); ii++) {
     while (tempstring[ii]==' ') ii++;
-    sscanf(&tempstring[ii++],"%f",&radii[++NRadii]);
+    sscanf(&tempstring[ii++],"%f",&radii[++tNRadii]);
     while ( tempstring[ii]!=' ' && (ii)<strlen(tempstring) )ii++;
   }
-  cout << " Read " << NRadii << " radii from file" << endl;
-
-  static double LowRadius = -1.0;
-  static double HighRadius = -1.0;
-  static int LowIndex = 0;
-  LowRadius = -1.0;
-  HighRadius = -1.0;
-  LowIndex = 0;
-  for(int iii=1; iii<=NRadii-1; iii++) { // Loop to one less than #radii
+  cout << " Read " << tNRadii << " radii from file" << endl;
+
+  static double tLowRadius = -1.0;
+  static double tHighRadius = -1.0;
+  static int tLowIndex = 0;
+  tLowRadius = -1.0;
+  tHighRadius = -1.0;
+  tLowIndex = 0;
+  for(int iii=1; iii<=tNRadii-1; iii++) { // Loop to one less than #radii
     if ( radius >= radii[iii] && radius <= radii[iii+1] ) {
-      LowRadius = radii[iii];
-      HighRadius = radii[iii+1];
-      LowIndex = iii;
+      tLowRadius = radii[iii];
+      tHighRadius = radii[iii+1];
+      tLowIndex = iii;
     }
   }
-  if ( (LowRadius < 0.0) || (HighRadius < 0.0) ) {
+  if ( (tLowRadius < 0.0) || (tHighRadius < 0.0) ) {
     cout << "AliFemtoCoulomb::CreateLookupTable --> Problem interpolating radius" << endl;
     cout << "  Check range of radii in lookup file...." << endl;
     cerr << "AliFemtoCoulomb::CreateLookupTable --> Problem interpolating radius" << endl;
@@ -207,20 +171,20 @@ void AliFemtoCoulomb::CreateLookupTable(const double& radius) {
     assert(0);
   }
 
-  static double corr[100];           // array of corrections ... must be > NRadii
+  static double corr[100];           // array of corrections ... must be > tNRadii
   fNLines = 0;
   static double tempEta = 0;
   tempEta = 0;
   while (mystream >> tempEta) {
-    for (int i=1; i<=NRadii; i++) {
+    for (int i=1; i<=tNRadii; i++) {
       mystream >> corr[i];
     }
-    static double LowCoulomb = 0;
-    static double HighCoulomb = 0;
+    static double tLowCoulomb = 0;
+    static double tHighCoulomb = 0;
     static double nCorr = 0;
-    LowCoulomb = corr[LowIndex];
-    HighCoulomb = corr[LowIndex+1];
-    nCorr = ( (radius-LowRadius)*HighCoulomb+(HighRadius-radius)*LowCoulomb )/(HighRadius-LowRadius);
+    tLowCoulomb = corr[tLowIndex];
+    tHighCoulomb = corr[tLowIndex+1];
+    nCorr = ( (radius-tLowRadius)*tHighCoulomb+(tHighRadius-radius)*tLowCoulomb )/(tHighRadius-tLowRadius);
       fEta[fNLines] = tempEta;     // Eta
       fCoulomb[fNLines] = nCorr;   // Interpolated Coulomb correction for radius
       fNLines++;
@@ -244,16 +208,16 @@ double AliFemtoCoulomb::CoulombCorrect(const double& eta) {
     assert(0);
   }
 
-  static double Corr = 0;
-  Corr = -1.0;
+  static double tCorr = 0;
+  tCorr = -1.0;
   
   if ( (eta>fEta[0]) && (fEta[0]>0.0) ) {
-    Corr = fCoulomb[0];
-    return (Corr);
+    tCorr = fCoulomb[0];
+    return (tCorr);
   }
   if ( (eta<fEta[fNLines-1]) && (fEta[fNLines-1]<0.0) ) {
-    Corr = fCoulomb[fNLines-1];
-    return (Corr);
+    tCorr = fCoulomb[fNLines-1];
+    return (tCorr);
   }
   // This is a binary search for the bracketing pair of data points
   static int high = 0;
@@ -279,26 +243,26 @@ double AliFemtoCoulomb::CoulombCorrect(const double& eta) {
   }
   // Make sure we found the right one
   if ( (fEta[low] >= eta) && (eta >= fEta[low+1]) ) {
-    static double LowEta = 0;
-    static double HighEta = 0;    
-    static double LowCoulomb = 0;
-    static double HighCoulomb = 0;
-    LowEta = fEta[low];
-    HighEta = fEta[low+1];    
-    LowCoulomb = fCoulomb[low];
-    HighCoulomb = fCoulomb[low+1];
-    //      cout << LowEta << " *** Eta *** " << HighEta << endl;
-    //      cout << LowCoulomb << " *** Coulomb *** " << HighCoulomb << endl;
-    Corr = ( (eta-LowEta)*HighCoulomb+(HighEta-eta)*LowCoulomb )/(HighEta-LowEta);
+    static double tLowEta = 0;
+    static double tHighEta = 0;    
+    static double tLowCoulomb = 0;
+    static double tHighCoulomb = 0;
+    tLowEta = fEta[low];
+    tHighEta = fEta[low+1];    
+    tLowCoulomb = fCoulomb[low];
+    tHighCoulomb = fCoulomb[low+1];
+    //      cout << tLowEta << " *** Eta *** " << tHighEta << endl;
+    //      cout << tLowCoulomb << " *** Coulomb *** " << tHighCoulomb << endl;
+    tCorr = ( (eta-tLowEta)*tHighCoulomb+(tHighEta-eta)*tLowCoulomb )/(tHighEta-tLowEta);
   }
-  if (Corr<0.0) {
+  if (tCorr<0.0) {
     cout << "AliFemtoCoulomb::CoulombCorrect(eta) --> No correction" << endl;
     cout << "  Check range of eta in file: Input eta  " << eta << endl;
     cerr << "AliFemtoCoulomb::CoulombCorrect(eta) --> No correction" << endl;
     cerr << "  Check range of eta in file: Input eta  " << eta << endl;
     assert(0);
   } 
-  return (Corr);
+  return (tCorr);
 
 }
 
@@ -342,17 +306,18 @@ double AliFemtoCoulomb::CoulombCorrect(const AliFemtoPair* pair, const double& r
 }
 
 double AliFemtoCoulomb::Eta(const AliFemtoPair* pair) {
+  // calculate eta
   static double px1,py1,pz1,px2,py2,pz2;
   static double px1new,py1new,pz1new;
   static double px2new,py2new,pz2new;
   static double vx1cms,vy1cms,vz1cms;
   static double vx2cms,vy2cms,vz2cms;
-  static double VcmsX,VcmsY,VcmsZ;
+  static double tVcmsX,tVcmsY,tVcmsZ;
   static double dv = 0.0;
   static double e1,e2,e1new,e2new;
   static double psi,theta;
   static double beta,gamma;
-  static double VcmsXnew;
+  static double tVcmsXnew;
 
   px1 = pair->Track1()->FourMomentum().px();
   py1 = pair->Track1()->FourMomentum().py();
@@ -363,18 +328,18 @@ double AliFemtoCoulomb::Eta(const AliFemtoPair* pair) {
   pz2 = pair->Track2()->FourMomentum().pz();
   e2 = pair->Track2()->FourMomentum().e();
   
-  VcmsX = ( px1+px2 )/( e1+e2 );
-  VcmsY = ( py1+py2 )/( e1+e2 );
-  VcmsZ = ( pz1+pz2 )/( e1+e2 );
-  // Rotate Vcms to x-direction
-  psi = atan(VcmsY/VcmsX);
-  VcmsXnew = VcmsX*cos(psi)+VcmsY*sin(psi);
-  VcmsX = VcmsXnew;
-  theta = atan(VcmsZ/VcmsX);
-  VcmsXnew = VcmsX*cos(theta)+VcmsZ*sin(theta);
-  VcmsX = VcmsXnew;
+  tVcmsX = ( px1+px2 )/( e1+e2 );
+  tVcmsY = ( py1+py2 )/( e1+e2 );
+  tVcmsZ = ( pz1+pz2 )/( e1+e2 );
+  // Rotate tVcms to x-direction
+  psi = atan(tVcmsY/tVcmsX);
+  tVcmsXnew = tVcmsX*cos(psi)+tVcmsY*sin(psi);
+  tVcmsX = tVcmsXnew;
+  theta = atan(tVcmsZ/tVcmsX);
+  tVcmsXnew = tVcmsX*cos(theta)+tVcmsZ*sin(theta);
+  tVcmsX = tVcmsXnew;
   // Gamma and Beta
-  beta = VcmsX;
+  beta = tVcmsX;
   gamma = 1.0/::sqrt( 1.0-beta*beta );
 
   // Rotate p1 and p2 to new frame
@@ -422,19 +387,21 @@ double AliFemtoCoulomb::Eta(const AliFemtoPair* pair) {
 
 TH1D* AliFemtoCoulomb::CorrectionHistogram(const double& mass1, const double& mass2, const int& nBins, 
                                                const double& low, const double& high) {
+  // return correction histogram
+
   if ( mass1!=mass2 ) {
     cout << "Masses not equal ... try again.  No histogram created." << endl;
     assert(0);
   }
   TH1D* correction = new TH1D("correction","Coulomb correction",nBins,low,high);
-  const double reducedMass = mass1*mass2/(mass1+mass2);
+  const double kReducedMass = mass1*mass2/(mass1+mass2);
   double qInv = low;
   //double dQinv = (high-low)/( (double)nBins );
   double eta;
   for (int ii=1; ii<=nBins; ii++) 
     {
       qInv = correction->GetBinCenter(ii);
-      eta = 2.0*fZ1Z2*reducedMass*fine_structure_const/( qInv );
+      eta = 2.0*fZ1Z2*kReducedMass*fine_structure_const/( qInv );
       CoulombCorrect( eta );
       correction->Fill( qInv, CoulombCorrect(eta,fRadius) );
     }
@@ -444,18 +411,18 @@ TH1D* AliFemtoCoulomb::CorrectionHistogram(const double& mass1, const double& ma
 
 #ifdef __ROOT__
 TH1D* AliFemtoCoulomb::CorrectionHistogram(const TH1D* histo, const double mass) {
-
+  // return correction histogram - 1D case
   TH1D* correction = (TH1D*) ((TH1D*)histo)->Clone();
   correction->Reset();
   correction->SetDirectory(0);
   int    nBins = correction->GetXaxis()->GetNbins();
-  const double reducedMass = 0.5*mass;
+  const double kReducedMass = 0.5*mass;
   double qInv;
   double eta;
   for (int ii=1; ii<=nBins; ii++) 
     {
       qInv = correction->GetBinCenter(ii);
-      eta = 2.0*fZ1Z2*reducedMass*fine_structure_const/( qInv );
+      eta = 2.0*fZ1Z2*kReducedMass*fine_structure_const/( qInv );
       correction->Fill( qInv, CoulombCorrect(eta,fRadius) );
     }
 
@@ -463,14 +430,14 @@ TH1D* AliFemtoCoulomb::CorrectionHistogram(const TH1D* histo, const double mass)
 }
 
 TH3D* AliFemtoCoulomb::CorrectionHistogram(const TH3D* histo, const double mass) {
-
+  // return correction histogram - 3D case
   TH3D* correction = (TH3D*) ((TH3D*)histo)->Clone();
   correction->Reset();
   correction->SetDirectory(0);
   int    nBinsX = correction->GetXaxis()->GetNbins();
   int    nBinsY = correction->GetYaxis()->GetNbins();
   int    nBinsZ = correction->GetZaxis()->GetNbins();
-  const double reducedMass = 0.5*mass;
+  const double kReducedMass = 0.5*mass;
   double eta;
   double qInv;
   int binNumber;
@@ -479,7 +446,7 @@ TH3D* AliFemtoCoulomb::CorrectionHistogram(const TH3D* histo, const double mass)
       for (int iv=1; iv<=nBinsZ; iv++) {
        binNumber = histo->GetBin(ii,iii,iv);
        qInv = histo->GetBinContent(binNumber);
-       eta = 2.0*fZ1Z2*reducedMass*fine_structure_const/( qInv );
+       eta = 2.0*fZ1Z2*kReducedMass*fine_structure_const/( qInv );
        correction->SetBinContent(binNumber, CoulombCorrect(eta,fRadius) );
       }
     }
@@ -490,9 +457,10 @@ TH3D* AliFemtoCoulomb::CorrectionHistogram(const TH3D* histo, const double mass)
 
 double AliFemtoCoulomb::CoulombCorrect(const double& mass, const double& charge,
                                    const double& radius, const double& qInv) {
+  // return correction factor
   fRadius = radius;
   fZ1Z2 = charge;
-  const double reducedMass = 0.5*mass; // must be same mass particles
-  double eta = 2.0*fZ1Z2*reducedMass*fine_structure_const/( qInv );
+  const double kReducedMass = 0.5*mass; // must be same mass particles
+  double eta = 2.0*fZ1Z2*kReducedMass*fine_structure_const/( qInv );
   return ( CoulombCorrect(eta,fRadius) );
 }
index 986980e..468ab2b 100644 (file)
@@ -1,50 +1,15 @@
-/***************************************************************************
- *
- * $Id$
- *
- * Author: Randy Wells, Ohio State, rcwells@mps.ohio-state.edu
- ***************************************************************************
- *
- * Description: part of STAR HBT Framework: AliFemtoMaker package
- *    This is a Coulomb correction class which
- *  1. Reads in the dat from a file
- *  2. Performs a linear interpolation in R and creates any array of interpolations
- *  3. Interpolates in eta and returns the Coulomb correction to user
- *
- ***************************************************************************
- *
- * $Log$
- * Revision 1.2  2007/05/03 09:42:29  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.12  2000/10/26 19:48:54  rcwells
- * Added functionality for Coulomb correction of <qInv> in 3D correltions
- *
- * Revision 1.11  2000/08/02 01:25:12  lisa
- * Add Coulomb correction capability to 3D Bertsch-Pratt CorrFctn
- *
- * Revision 1.10  2000/07/16 21:38:22  laue
- * AliFemtoCoulomb.cxx AliFemtoSectoredAnalysis.cxx : updated for standalone version
- * AliFemtoV0.cc AliFemtoV0.h : some cast to prevent compiling warnings
- * AliFemtoParticle.cc AliFemtoParticle.h : pointers mTrack,mV0 initialized to 0
- * AliFemtoIOBinary.cc : some printouts in #ifdef STHBTDEBUG
- * AliFemtoEvent.cc : B-Field set to 0.25Tesla, we have to think about a better
- *                 solution
- *
- * Revision 1.9  2000/05/31 20:12:53  rcwells
- * Modified AliFemtoCoulomb for Id and Log entries
- *
- *
- **************************************************************************/
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// AliFemtoCoulomb: This is a Coulomb correction class which             //
+//  1. Reads in the dat from a file                                      //  
+//  2. Performs a linear interpolation in R and creates any array of     //
+//     interpolations                                                    //
+//  3. Interpolates in eta and returns the Coulomb correction to user    //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
 
-#ifndef AliFemtoCoulomb_HH
-#define AliFemtoCoulomb_HH
+#ifndef ALIFEMTOCOULOMB_H
+#define ALIFEMTOCOULOMB_H
 
 #include <stdio.h>
 #include "AliFemtoTypes.h"
@@ -64,7 +29,7 @@ public:
   AliFemtoCoulomb& operator=(const AliFemtoCoulomb& aCoul);
 
   void SetRadius(const double& radius);
-  double GetRadius();
+  double GetRadius() const;
   void SetFile(const char *readFile);
   void SetChargeProduct(const double& charge);
 
@@ -82,7 +47,7 @@ public:
   TH3D* CorrectionHistogram(const TH3D*, const double);
 #endif
 private:
-  double Eta(const AliFemtoPair* pair);                // Calculates eta
+  double Eta(const AliFemtoPair* pair);          // Calculates eta
   void CreateLookupTable(const double& radius);  // Creates look-up table
   const char* fFile;                             // File to interpolate corrections from    
   double fRadius;                                // Radius from previous iteration
index 56359cc..0ed5039 100644 (file)
@@ -1,16 +1,9 @@
-/***************************************************************************
- *
- * $Id$
- *
- * Author: Frank Laue, Ohio State, Laue@mps.ohio-state.edu
- ***************************************************************************
- *
- * Description: part of STAR HBT Framework: AliFemtoMaker package
- *      This is the Class for Analysis objects.  Each of the simultaneous
- *      Analyses running should have one of these instantiated.  They link
- *      into the Manager in an Analysis Collection.
- *
- ***************************************************************************/
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// This is an analysis which calculated the background from like sign    //
+// pairs in the same event                                               //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
 
 #include "AliFemtoLikeSignAnalysis.h"
 #include "AliFemtoParticleCollection.h"
@@ -37,6 +30,7 @@ AliFemtoLikeSignAnalysis::AliFemtoLikeSignAnalysis(unsigned int bins, double min
   fOverFlow(0),  
   fUnderFlow(0)  
 {
+  // standard constructor
   fVertexBins = bins;
   fVertexZ[0] = min;
   fVertexZ[1] = max;
@@ -53,6 +47,7 @@ AliFemtoLikeSignAnalysis::AliFemtoLikeSignAnalysis(const AliFemtoLikeSignAnalysi
   fOverFlow(0),  
   fUnderFlow(0)  
 {
+  // copy constructor
   fVertexBins = a.fVertexBins; 
   fVertexZ[0] = a.fVertexZ[0]; 
   fVertexZ[1] = a.fVertexZ[1];
@@ -63,22 +58,24 @@ AliFemtoLikeSignAnalysis::AliFemtoLikeSignAnalysis(const AliFemtoLikeSignAnalysi
  }
 //____________________________ 
 AliFemtoLikeSignAnalysis::~AliFemtoLikeSignAnalysis(){
+  // destructor
   delete fPicoEventCollectionVectorHideAway; fPicoEventCollectionVectorHideAway=0;
 }
 //____________________________
 AliFemtoString AliFemtoLikeSignAnalysis::Report()
 {  
-  char Ctemp[200];
+  // prepare report
+  char tCtemp[200];
   cout << "AliFemtoLikeSignAnalysis - constructing Report..."<<endl;
   AliFemtoString temp = "-----------\nHbt Analysis Report:\n";
-  sprintf(Ctemp,"Events are mixed in %d bins in the range %E cm to %E cm.\n",fVertexBins,fVertexZ[0],fVertexZ[1]);
-  temp += Ctemp;
-  sprintf(Ctemp,"Events underflowing: %d\n",fUnderFlow);
-  temp += Ctemp;
-  sprintf(Ctemp,"Events overflowing: %d\n",fOverFlow);
-  temp += Ctemp;
-  sprintf(Ctemp,"Now adding AliFemtoAnalysis(base) Report\n");
-  temp += Ctemp; 
+  sprintf(tCtemp,"Events are mixed in %d bins in the range %E cm to %E cm.\n",fVertexBins,fVertexZ[0],fVertexZ[1]);
+  temp += tCtemp;
+  sprintf(tCtemp,"Events underflowing: %d\n",fUnderFlow);
+  temp += tCtemp;
+  sprintf(tCtemp,"Events overflowing: %d\n",fOverFlow);
+  temp += tCtemp;
+  sprintf(tCtemp,"Now adding AliFemtoAnalysis(base) Report\n");
+  temp += tCtemp; 
   temp += "Adding AliFemtoAnalysis(base) Report now:\n";
   temp += AliFemtoAnalysis::Report();
   temp += "-------------\n";
@@ -87,6 +84,7 @@ AliFemtoString AliFemtoLikeSignAnalysis::Report()
 }
 //_________________________
 void AliFemtoLikeSignAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
+  // perform all the analysis tasks for a single event
   // get right mixing buffer
   double vertexZ = hbtEvent->PrimVertPos().z();
   fMixingBuffer = fPicoEventCollectionVectorHideAway->PicoEventCollection(vertexZ); 
@@ -125,42 +123,42 @@ void AliFemtoLikeSignAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
       // Fabrice points out that we do not need to keep creating/deleting pairs all the time
       // We only ever need ONE pair, and we can just keep changing internal pointers
       // this should help speed things up
-      AliFemtoPair* ThePair = new AliFemtoPair;
+      AliFemtoPair* tThePair = new AliFemtoPair;
       
-      AliFemtoParticleIterator PartIter1;
-      AliFemtoParticleIterator PartIter2;
-      AliFemtoCorrFctnIterator CorrFctnIter;
-      AliFemtoParticleIterator StartOuterLoop = picoEvent->FirstParticleCollection()->begin();  // always
-      AliFemtoParticleIterator EndOuterLoop   = picoEvent->FirstParticleCollection()->end();    // will be one less if identical
-      AliFemtoParticleIterator StartInnerLoop;
-      AliFemtoParticleIterator EndInnerLoop;
+      AliFemtoParticleIterator tPartIter1;
+      AliFemtoParticleIterator tPartIter2;
+      AliFemtoCorrFctnIterator tCorrFctnIter;
+      AliFemtoParticleIterator tStartOuterLoop = picoEvent->FirstParticleCollection()->begin();  // always
+      AliFemtoParticleIterator tEndOuterLoop   = picoEvent->FirstParticleCollection()->end();    // will be one less if identical
+      AliFemtoParticleIterator tStartInnerLoop;
+      AliFemtoParticleIterator tEndInnerLoop;
       if (AnalyzeIdenticalParticles()) {             // only use First collection
-       EndOuterLoop--;                                               // outer loop goes to next-to-last particle in First collection
-       EndInnerLoop = picoEvent->FirstParticleCollection()->end() ;  // inner loop goes to last particle in First collection
+       tEndOuterLoop--;                                               // outer loop goes to next-to-last particle in First collection
+       tEndInnerLoop = picoEvent->FirstParticleCollection()->end() ;  // inner loop goes to last particle in First collection
       }
       else {                                                          // nonidentical - loop over First and Second collections
-       StartInnerLoop = picoEvent->SecondParticleCollection()->begin(); // inner loop starts at first particle in Second collection
-       EndInnerLoop   = picoEvent->SecondParticleCollection()->end() ;  // inner loop goes to last particle in Second collection
+       tStartInnerLoop = picoEvent->SecondParticleCollection()->begin(); // inner loop starts at first particle in Second collection
+       tEndInnerLoop   = picoEvent->SecondParticleCollection()->end() ;  // inner loop goes to last particle in Second collection
       }
       // real pairs
-      for (PartIter1=StartOuterLoop;PartIter1!=EndOuterLoop;PartIter1++){
+      for (tPartIter1=tStartOuterLoop;tPartIter1!=tEndOuterLoop;tPartIter1++){
        if (AnalyzeIdenticalParticles()){
-         StartInnerLoop = PartIter1;
-         StartInnerLoop++;
+         tStartInnerLoop = tPartIter1;
+         tStartInnerLoop++;
        }
-       ThePair->SetTrack1(*PartIter1);
-       for (PartIter2 = StartInnerLoop; PartIter2!=EndInnerLoop;PartIter2++){
-         ThePair->SetTrack2(*PartIter2);
+       tThePair->SetTrack1(*tPartIter1);
+       for (tPartIter2 = tStartInnerLoop; tPartIter2!=tEndInnerLoop;tPartIter2++){
+         tThePair->SetTrack2(*tPartIter2);
          // The following lines have to be uncommented if you want pairCutMonitors
          // they are not in for speed reasons
-         // bool tmpPassPair = mPairCut->Pass(ThePair);
-          // mPairCut->FillCutMonitor(ThePair, tmpPassPair);
+         // bool tmpPassPair = mPairCut->Pass(tThePair);
+          // mPairCut->FillCutMonitor(tThePair, tmpPassPair);
          // if ( tmpPassPair ) {
-         if (fPairCut->Pass(ThePair)){
-           for (CorrFctnIter=fCorrFctnCollection->begin();
-                CorrFctnIter!=fCorrFctnCollection->end();CorrFctnIter++){
-             AliFemtoLikeSignCorrFctn* CorrFctn = dynamic_cast<AliFemtoLikeSignCorrFctn*>(*CorrFctnIter);
-             if (CorrFctn) CorrFctn->AddRealPair(ThePair);
+         if (fPairCut->Pass(tThePair)){
+           for (tCorrFctnIter=fCorrFctnCollection->begin();
+                tCorrFctnIter!=fCorrFctnCollection->end();tCorrFctnIter++){
+             AliFemtoLikeSignCorrFctn* tCorrFctn = dynamic_cast<AliFemtoLikeSignCorrFctn*>(*tCorrFctnIter);
+             if (tCorrFctn) tCorrFctn->AddRealPair(tThePair);
            }
          }  // if passed pair cut
        }    // loop over second particle
@@ -173,24 +171,24 @@ void AliFemtoLikeSignAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
       AliFemtoParticleIterator prevIter;
 
       // like sign first partilce collection pairs
-      prevIter = EndOuterLoop;
+      prevIter = tEndOuterLoop;
       prevIter--;
-      for (PartIter1=StartOuterLoop;PartIter1!=prevIter;PartIter1++){
-       ThePair->SetTrack1(*PartIter1);
-       nextIter = PartIter1;
+      for (tPartIter1=tStartOuterLoop;tPartIter1!=prevIter;tPartIter1++){
+       tThePair->SetTrack1(*tPartIter1);
+       nextIter = tPartIter1;
        nextIter++;
-       for (PartIter2 = nextIter; PartIter2!=EndOuterLoop;PartIter2++){
-         ThePair->SetTrack2(*PartIter2);
+       for (tPartIter2 = nextIter; tPartIter2!=tEndOuterLoop;tPartIter2++){
+         tThePair->SetTrack2(*tPartIter2);
          // The following lines have to be uncommented if you want pairCutMonitors
          // they are not in for speed reasons
-         // bool tmpPassPair = mPairCut->Pass(ThePair);
-          // mPairCut->FillCutMonitor(ThePair, tmpPassPair);
+         // bool tmpPassPair = mPairCut->Pass(tThePair);
+          // mPairCut->FillCutMonitor(tThePair, tmpPassPair);
          // if ( tmpPassPair ) {
-         if (fPairCut->Pass(ThePair)){
-           for (CorrFctnIter=fCorrFctnCollection->begin();
-                CorrFctnIter!=fCorrFctnCollection->end();CorrFctnIter++){
-             AliFemtoLikeSignCorrFctn* CorrFctn = dynamic_cast<AliFemtoLikeSignCorrFctn*>(*CorrFctnIter);
-             if (CorrFctn) CorrFctn->AddLikeSignPositivePair(ThePair);
+         if (fPairCut->Pass(tThePair)){
+           for (tCorrFctnIter=fCorrFctnCollection->begin();
+                tCorrFctnIter!=fCorrFctnCollection->end();tCorrFctnIter++){
+             AliFemtoLikeSignCorrFctn* CorrFctn = dynamic_cast<AliFemtoLikeSignCorrFctn*>(*tCorrFctnIter);
+             if (CorrFctn) CorrFctn->AddLikeSignPositivePair(tThePair);
            }
          }  // if passed pair cut
        }    // loop over second particle
@@ -199,24 +197,24 @@ void AliFemtoLikeSignAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
       cout << "AliFemtoLikeSignAnalysis::ProcessEvent() - like sign first collection done" << endl;
 #endif
       // like sign second partilce collection pairs
-      prevIter = EndInnerLoop;
+      prevIter = tEndInnerLoop;
       prevIter--;
-      for (PartIter1=StartInnerLoop;PartIter1!=prevIter;PartIter1++){
-       ThePair->SetTrack1(*PartIter1);
-       nextIter = PartIter1;
+      for (tPartIter1=tStartInnerLoop;tPartIter1!=prevIter;tPartIter1++){
+       tThePair->SetTrack1(*tPartIter1);
+       nextIter = tPartIter1;
        nextIter++;
-       for (PartIter2 = nextIter; PartIter2!=EndInnerLoop;PartIter2++){
-         ThePair->SetTrack2(*PartIter2);
+       for (tPartIter2 = nextIter; tPartIter2!=tEndInnerLoop;tPartIter2++){
+         tThePair->SetTrack2(*tPartIter2);
          // The following lines have to be uncommented if you want pairCutMonitors
          // they are not in for speed reasons
-         // bool tmpPassPair = mPairCut->Pass(ThePair);
-          // mPairCut->FillCutMonitor(ThePair, tmpPassPair);
+         // bool tmpPassPair = mPairCut->Pass(tThePair);
+          // mPairCut->FillCutMonitor(tThePair, tmpPassPair);
          // if ( tmpPassPair ) {
-         if (fPairCut->Pass(ThePair)){
-           for (CorrFctnIter=fCorrFctnCollection->begin();
-                CorrFctnIter!=fCorrFctnCollection->end();CorrFctnIter++){
-             AliFemtoLikeSignCorrFctn* CorrFctn = dynamic_cast<AliFemtoLikeSignCorrFctn*>(*CorrFctnIter);
-             if (CorrFctn) CorrFctn->AddLikeSignNegativePair(ThePair);
+         if (fPairCut->Pass(tThePair)){
+           for (tCorrFctnIter=fCorrFctnCollection->begin();
+                tCorrFctnIter!=fCorrFctnCollection->end();tCorrFctnIter++){
+             AliFemtoLikeSignCorrFctn* tCorrFctn = dynamic_cast<AliFemtoLikeSignCorrFctn*>(*tCorrFctnIter);
+             if (tCorrFctn) tCorrFctn->AddLikeSignNegativePair(tThePair);
            }
          }  // if passed pair cut
        }    // loop over second particle
@@ -234,33 +232,33 @@ void AliFemtoLikeSignAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
        cout << "Mixing Buffer not full -gotta wait " << MixingBuffer()->size() << endl;
       }
       if (MixingBufferFull()){
-       StartOuterLoop = picoEvent->FirstParticleCollection()->begin();
-       EndOuterLoop   = picoEvent->FirstParticleCollection()->end();
+       tStartOuterLoop = picoEvent->FirstParticleCollection()->begin();
+       tEndOuterLoop   = picoEvent->FirstParticleCollection()->end();
        AliFemtoPicoEvent* storedEvent;
        AliFemtoPicoEventIterator picoEventIter;
        for (picoEventIter=MixingBuffer()->begin();picoEventIter!=MixingBuffer()->end();picoEventIter++){
          storedEvent = *picoEventIter;
          if (AnalyzeIdenticalParticles()){
-           StartInnerLoop = storedEvent->FirstParticleCollection()->begin();
-           EndInnerLoop = storedEvent->FirstParticleCollection()->end();
+           tStartInnerLoop = storedEvent->FirstParticleCollection()->begin();
+           tEndInnerLoop = storedEvent->FirstParticleCollection()->end();
          }
          else{
-           StartInnerLoop = storedEvent->SecondParticleCollection()->begin();
-           EndInnerLoop = storedEvent->SecondParticleCollection()->end();
+           tStartInnerLoop = storedEvent->SecondParticleCollection()->begin();
+           tEndInnerLoop = storedEvent->SecondParticleCollection()->end();
          }
-         for (PartIter1=StartOuterLoop;PartIter1!=EndOuterLoop;PartIter1++){
-           ThePair->SetTrack1(*PartIter1);
-           for (PartIter2=StartInnerLoop;PartIter2!=EndInnerLoop;PartIter2++){
-             ThePair->SetTrack2(*PartIter2);
-             // testing...           cout << "ThePair defined... going to pair cut... ";
-             if (fPairCut->Pass(ThePair)){
-               // testing...           cout << " ThePair passed PairCut... ";
-               for (CorrFctnIter=fCorrFctnCollection->begin();
-                    CorrFctnIter!=fCorrFctnCollection->end();CorrFctnIter++){
-                 AliFemtoLikeSignCorrFctn* CorrFctn = dynamic_cast<AliFemtoLikeSignCorrFctn*>(*CorrFctnIter);
-                 if (CorrFctn) { 
-                   CorrFctn->AddMixedPair(ThePair);
-                   //cout << " ThePair has been added to MixedPair method " << endl;
+         for (tPartIter1=tStartOuterLoop;tPartIter1!=tEndOuterLoop;tPartIter1++){
+           tThePair->SetTrack1(*tPartIter1);
+           for (tPartIter2=tStartInnerLoop;tPartIter2!=tEndInnerLoop;tPartIter2++){
+             tThePair->SetTrack2(*tPartIter2);
+             // testing...           cout << "tThePair defined... going to pair cut... ";
+             if (fPairCut->Pass(tThePair)){
+               // testing...           cout << " tThePair passed PairCut... ";
+               for (tCorrFctnIter=fCorrFctnCollection->begin();
+                    tCorrFctnIter!=fCorrFctnCollection->end();tCorrFctnIter++){
+                 AliFemtoLikeSignCorrFctn* tCorrFctn = dynamic_cast<AliFemtoLikeSignCorrFctn*>(*tCorrFctnIter);
+                 if (tCorrFctn) { 
+                   tCorrFctn->AddMixedPair(tThePair);
+                   //cout << " tThePair has been added to MixedPair method " << endl;
                  }
                }
              }  // if passed pair cut
@@ -272,7 +270,7 @@ void AliFemtoLikeSignAnalysis::ProcessEvent(const AliFemtoEvent* hbtEvent) {
        delete MixingBuffer()->back();
        MixingBuffer()->pop_back();
       }  // if mixing buffer is full
-      delete ThePair;
+      delete tThePair;
       MixingBuffer()->push_front(picoEvent);  // store the current pico-event in buffer
     }   // if currentEvent is accepted by currentAnalysis
     EventEnd(hbtEvent);  // cleanup for EbyE 
index 54249ee..88f0224 100644 (file)
@@ -1,12 +1,11 @@
-/***************************************************************************
- *      This is an analysis which calculated the background from like sign
- *      pairs in the same event
- *      Frank Laue, Ohio State, 2000
- ***************************************************************************/
-
-
-#ifndef AliFemtoLikeSignAnalysis_hh
-#define AliFemtoLikeSignAnalysis_hh
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// This is an analysis which calculated the background from like sign    //
+// pairs in the same event                                               //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
+#ifndef ALIFEMTOLIKESIGNANALYSIS_H
+#define ALIFEMTOLIKESIGNANALYSIS_H
 //#ifndef StMaker_H
 //#include "StMaker.h"
 //#endif
index 4ec0805..c5c81eb 100644 (file)
@@ -68,19 +68,101 @@ void AliFemtoModelManager::AcceptWeightGenerator(AliFemtoModelWeightGenerator *a
 //_____________________________________________
 Double_t AliFemtoModelManager::GetWeight(AliFemtoPair *aPair)
 {
+  if (!fWeightGenerator) {
+    cout << "No weight generator set! Cannot calculate weight" << endl;
+    exit(0);
+  }
   // Return femtoscopic weight for a fiven pair
   if (fCreateCopyHiddenInfo) {
+    // Try to gess particle masses and pid from the weight generator
+    Double_t tMass1, tMass2;
+    Int_t tPid1, tPid2;
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusPionPlus) {
+      tMass1 = 0.13957;
+      tMass2 = 0.13957;
+      tPid1 = 211;
+      tPid2 = 211;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusPionMinus) {
+      tMass1 = 0.13957;
+      tMass2 = 0.13957;
+      tPid1 = 211;
+      tPid2 = -211;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkKaonPlusKaonPlus) {
+      tMass1 = 0.493677;
+      tMass2 = 0.493677;
+      tPid1 = 321;
+      tPid2 = 321;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkKaonPlusKaonMinus) {
+      tMass1 = 0.493677;
+      tMass2 = 0.493677;
+      tPid1 = 321;
+      tPid2 = -321;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkProtonProton) {
+      tMass1 = 0.938272;
+      tMass2 = 0.938272;
+      tPid1 = 2212;
+      tPid2 = 2212;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkProtonAntiproton) {
+      tMass1 = 0.938272;
+      tMass2 = 0.938272;
+      tPid1 = 2212;
+      tPid2 = -2212;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusKaonPlus) {
+      tMass1 = 0.13957;
+      tMass2 = 0.493677;
+      tPid1 = 211;
+      tPid2 = 321;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusKaonMinus) {
+      tMass1 = 0.13957;
+      tMass2 = 0.493677;
+      tPid1 = 211;
+      tPid2 = -321;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusProton) {
+      tMass1 = 0.13957;
+      tMass2 = 0.938272;
+      tPid1 = 211;
+      tPid2 = 2212;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusAntiproton) {
+      tMass1 = 0.13957;
+      tMass2 = 0.938272;
+      tPid1 = 211;
+      tPid2 = -2212;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkKaonPlusProton) {
+      tMass1 = 0.493677;
+      tMass2 = 0.938272;
+      tPid1 = 321;
+      tPid2 = 2212;
+    }
+    if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkKaonPlusAntiproton) {
+      tMass1 = 0.493677;
+      tMass2 = 0.938272;
+      tPid1 = 321;
+      tPid2 = -2212;
+    }
+
     if (!(aPair->Track1()->HiddenInfo())) {
       AliFemtoModelHiddenInfo *inf1 = new AliFemtoModelHiddenInfo();
       inf1->SetTrueMomentum(aPair->Track1()->Track()->P());
-      inf1->SetMass(0.13957);
+      inf1->SetMass(tMass1);
+      inf1->SetPDGPid(tPid1);
       aPair->Track1()->SetHiddenInfo(inf1);
       delete inf1;
     }
     if (!(aPair->Track2()->HiddenInfo())) {
       AliFemtoModelHiddenInfo *inf2 = new AliFemtoModelHiddenInfo();
       inf2->SetTrueMomentum(aPair->Track2()->Track()->P());
-      inf2->SetMass(0.13957);
+      inf2->SetMass(tMass2);
+      inf2->SetPDGPid(tPid2);
       aPair->Track2()->SetHiddenInfo(inf2);
       delete inf2;
     }
index a48e9ed..fabf663 100644 (file)
@@ -1,36 +1,10 @@
-/***************************************************************************
- *
- * $Id$
- *
- * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu
- ***************************************************************************
- *
- * Description: part of STAR HBT Framework: AliFemtoMaker package
- *
- ***************************************************************************
- *
- * $Log$
- * Revision 1.2  2007/05/03 09:42:29  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.3  2002/11/01 20:45:53  magestro
- * Fixed bug in 3rd dimension of event collection vector, probably never encountered
- *
- * Revision 1.2  2001/11/11 18:34:13  laue
- * AliFemtoPicoEventCollectionVectorHideAway: updated for 3d grid
- * AliFemtoVertexMultAnalysis: new
- *
- * Revision 1.1  2000/07/16 21:44:11  laue
- * Collection and analysis for vertex dependent event mixing
- *
- *
- **************************************************************************/
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// AliFemtoPicoEventCollectionVectorHideAway: a helper class for         //
+// managing many mixing buffers with up to three variables used for      //
+// binning.                                                              //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
 #include "AliFemtoPicoEventCollectionVectorHideAway.h"
 
 // -----------------------------------
@@ -45,6 +19,7 @@ AliFemtoPicoEventCollectionVectorHideAway::AliFemtoPicoEventCollectionVectorHide
   fCollection(0),
   fCollectionVector(0)
 {
+  // basic constructor
   fBinsTot = fBinsx * fBinsy * fBinsz;
   fStepx=0;  fStepx = (fMaxx-fMinx)/fBinsx;
   fStepy=0;  fStepy = (fMaxy-fMiny)/fBinsy;
@@ -60,6 +35,7 @@ AliFemtoPicoEventCollectionVectorHideAway::AliFemtoPicoEventCollectionVectorHide
 }
 // -----------------------------------
 AliFemtoPicoEventCollection* AliFemtoPicoEventCollectionVectorHideAway::PicoEventCollection(int ix, int iy, int iz) { 
+  // return mixing event collection from a given bin
   if ( ix<0 || ix >= fBinsx) return 0;
   if ( iy<0 || iy >= fBinsy) return 0;
   if ( iz<0 || iz >= fBinsz) return 0;
@@ -70,6 +46,7 @@ AliFemtoPicoEventCollection* AliFemtoPicoEventCollectionVectorHideAway::PicoEven
 }
 // -----------------------------------
 AliFemtoPicoEventCollection* AliFemtoPicoEventCollectionVectorHideAway::PicoEventCollection(double x, double y, double z) {
+  // return mixing event collection for given values on x, y, z axes
   int ix,iy,iz;
   ix=0;iy=0;iz=0;
 
@@ -89,7 +66,7 @@ AliFemtoPicoEventCollectionVectorHideAway::AliFemtoPicoEventCollectionVectorHide
   fCollection(0),
   fCollectionVector(0)
 {
-
+  // copy constructor
   fBinsTot = aColl.fBinsTot;
   fBinsx = aColl.fBinsx;
   fBinsy = aColl.fBinsy;
@@ -113,11 +90,13 @@ AliFemtoPicoEventCollectionVectorHideAway::AliFemtoPicoEventCollectionVectorHide
 //___________________________________
 AliFemtoPicoEventCollectionVectorHideAway::~AliFemtoPicoEventCollectionVectorHideAway()
 {
+  // destructor
   fCollectionVector.clear();
 }
 //___________________________________
 AliFemtoPicoEventCollectionVectorHideAway& AliFemtoPicoEventCollectionVectorHideAway::operator=(const AliFemtoPicoEventCollectionVectorHideAway& aColl)
 {
+  // assignment operator
   if (this == &aColl)
     return *this;
 
index b68c6c9..631d326 100644 (file)
@@ -1,38 +1,13 @@
-/***************************************************************************
- *
- * $Id$
- *
- * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu
- ***************************************************************************
- *
- * Description: part of STAR HBT Framework: AliFemtoMaker package
- *
- ***************************************************************************
- *
- * $Log$
- * Revision 1.2  2007/05/03 09:42:29  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.3  2002/02/04 18:58:33  laue
- * *** empty log message ***
- *
- * Revision 1.2  2001/11/11 18:34:13  laue
- * AliFemtoPicoEventCollectionVectorHideAway: updated for 3d grid
- * AliFemtoVertexMultAnalysis: new
- *
- * Revision 1.1  2000/07/16 21:44:11  laue
- * Collection and analysis for vertex dependent event mixing
- *
- *
- **************************************************************************/
-#ifndef AliFemtoPicoEventCollectionVectorHideAway_hh
-#define AliFemtoPicoEventCollectionVectorHideAway_hh
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// AliFemtoPicoEventCollectionVectorHideAway: a helper class for         //
+// managing many mixing buffers with up to three variables used for      //
+// binning.                                                              //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef ALIFEMTOPICOEVENTCOLLECTIONVECTORHIDEAWAY_H
+#define ALIFEMTOPICOEVENTCOLLECTIONVECTORHIDEAWAY_H
 #include "AliFemtoPicoEvent.h"
 #include "AliFemtoPicoEventCollection.h"
 #include "AliFemtoPicoEventCollectionVector.h"
@@ -49,22 +24,22 @@ using std::list;
 class AliFemtoPicoEventCollectionVectorHideAway {
 public:
   AliFemtoPicoEventCollectionVectorHideAway(int bx=1, double lx=-FLT_MAX, double ux=FLT_MAX,
-                                        int by=1, double ly=-FLT_MAX, double uy=FLT_MAX,
-                                        int bz=1, double lz=-FLT_MAX, double uz=FLT_MAX);
+                                           int by=1, double ly=-FLT_MAX, double uy=FLT_MAX,
+                                           int bz=1, double lz=-FLT_MAX, double uz=FLT_MAX);
   AliFemtoPicoEventCollectionVectorHideAway(const AliFemtoPicoEventCollectionVectorHideAway& aColl);
   ~AliFemtoPicoEventCollectionVectorHideAway();
   AliFemtoPicoEventCollectionVectorHideAway& operator=(const AliFemtoPicoEventCollectionVectorHideAway& aColl);
 
-  AliFemtoPicoEventCollection* PicoEventCollection(int, int, int);
+  AliFemtoPicoEventCollection* PicoEventCollection(int bx, int by, int bz);
   AliFemtoPicoEventCollection* PicoEventCollection(double x, double y=0, double z=0);
 private:
-  int fBinsTot;
-  int fBinsx,fBinsy,fBinsz;
-  double fMinx,fMiny,fMinz;
-  double fMaxx,fMaxy,fMaxz;
-  double fStepx,fStepy,fStepz;
-  AliFemtoPicoEventCollection* fCollection;
-  AliFemtoPicoEventCollectionVector fCollectionVector;
+  int fBinsTot;                                        // Total number of bins 
+  int fBinsx,fBinsy,fBinsz;                            // Number of bins on x, y, z axis
+  double fMinx,fMiny,fMinz;                            // Minima on x, y, z axis
+  double fMaxx,fMaxy,fMaxz;                            // Maxima on x, y, z axis
+  double fStepx,fStepy,fStepz;                         // Steps on x, y, z axis
+  AliFemtoPicoEventCollection* fCollection;            // Pico event collection
+  AliFemtoPicoEventCollectionVector fCollectionVector; // Collection vector
 };
 
 #endif
index 4dbdf69..31737da 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);
 }
 
 
index 98c094b..252fb5b 100644 (file)
@@ -11,6 +11,9 @@
  ***************************************************************************
  *
  * $Log$
+ * Revision 1.1  2007/05/16 10:22:11  akisiel
+ * Making the directory structure of AliFemto flat. All files go into one common directory
+ *
  * Revision 1.2  2007/05/03 09:40:42  akisiel
  * Fixing Effective C++ warnings
  *
@@ -40,8 +43,8 @@
  *
  **************************************************************************/
 
-#ifndef AliFemtoQinvCorrFctn_hh
-#define AliFemtoQinvCorrFctn_hh
+#ifndef ALIFEMTOQINVCORRFCTN_H
+#define ALIFEMTOQINVCORRFCTN_H
 
 #include "TH1D.h"
 #include "AliFemtoCorrFctn.h"
@@ -55,8 +58,8 @@ public:
   AliFemtoQinvCorrFctn& operator=(const AliFemtoQinvCorrFctn& aCorrFctn);
 
   virtual AliFemtoString Report();
-  virtual void AddRealPair(AliFemtoPair*);
-  virtual void AddMixedPair(AliFemtoPair*);
+  virtual void AddRealPair(AliFemtoPair* aPair);
+  virtual void AddMixedPair(AliFemtoPair* aPair);
 
   virtual void Finish();
 
@@ -65,9 +68,9 @@ public:
   TH1D* Ratio();
 
 private:
-  TH1D* fNumerator;
-  TH1D* fDenominator;
-  TH1D* fRatio;
+  TH1D* fNumerator;          // numerator - real pairs
+  TH1D* fDenominator;        // denominator - mixed pairs
+  TH1D* fRatio;              // ratio - correlation function
 
 #ifdef __ROOT__
   ClassDef(AliFemtoQinvCorrFctn, 1)
index bf35e42..77c246a 100644 (file)
@@ -80,7 +80,7 @@ public:
     /// move the origin along the helix to s which becomes then s=0
     virtual void MoveOrigin(double s);
     
-    static const double fgkNoSolution;
+    static const double fgkNoSolution;  // coinstant indicating lack of solution
     
 protected:
     AliFmHelix();
index 10147e8..4e5bd02 100644 (file)
@@ -11,6 +11,9 @@
  ***************************************************************************
  *
  * $Log$
+ * Revision 1.1  2007/05/16 10:25:06  akisiel
+ * Making the directory structure of AliFemtoUser flat. All files go into one common directory
+ *
  * Revision 1.4  2007/05/03 09:46:10  akisiel
  * Fixing Effective C++ warnings
  *
@@ -42,27 +45,28 @@ ClassImp(AliFemtoESDTrackCut)
 #endif
 
 AliFemtoESDTrackCut::AliFemtoESDTrackCut() :
-  fCharge(0),
-  fLabel(0),
-  fStatus(0),
-  fminTPCclsF(0),
-  fminITScls(0),
-  fNTracksPassed(0),
-  fNTracksFailed(0)
+    fCharge(0),
+    fLabel(0),
+    fStatus(0),
+    fminTPCclsF(0),
+    fminITScls(0),
+    fNTracksPassed(0),
+    fNTracksFailed(0)
 {
-    fNTracksPassed = fNTracksFailed = 0;
-    fCharge = 0;  // takes both charges 0
-    fPt[0]=0.0;              fPt[1] = 100.0;//100
-    fRapidity[0]=-2;       fRapidity[1]=2;//-2 2
-    fPidProbElectron[0]=-1;fPidProbElectron[1]=2;
-    fPidProbPion[0]=-1;    fPidProbPion[1]=2;
-    fPidProbKaon[0]=-1;fPidProbKaon[1]=2;
-    fPidProbProton[0]=-1;fPidProbProton[1]=2;
-    fPidProbMuon[0]=-1;fPidProbMuon[1]=2;
-    fLabel=false;
-    fStatus=0;
-    fminTPCclsF=0;
-    fminITScls=0;
+  // Default constructor
+  fNTracksPassed = fNTracksFailed = 0;
+  fCharge = 0;  // takes both charges 0
+  fPt[0]=0.0;              fPt[1] = 100.0;//100
+  fRapidity[0]=-2;       fRapidity[1]=2;//-2 2
+  fPidProbElectron[0]=-1;fPidProbElectron[1]=2;
+  fPidProbPion[0]=-1;    fPidProbPion[1]=2;
+  fPidProbKaon[0]=-1;fPidProbKaon[1]=2;
+  fPidProbProton[0]=-1;fPidProbProton[1]=2;
+  fPidProbMuon[0]=-1;fPidProbMuon[1]=2;
+  fLabel=false;
+  fStatus=0;
+  fminTPCclsF=0;
+  fminITScls=0;
     
 }
 //------------------------------
@@ -72,135 +76,139 @@ AliFemtoESDTrackCut::AliFemtoESDTrackCut() :
 //------------------------------
 bool AliFemtoESDTrackCut::Pass(const AliFemtoTrack* track)
 {
-    //cout<<"AliFemtoESD  cut"<<endl;
-    //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
-    if (fStatus!=0)
+  // test the particle and return 
+  // true if it meets all the criteria
+  // false if it doesn't meet at least one of the criteria
+  
+  //cout<<"AliFemtoESD  cut"<<endl;
+  //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
+  if (fStatus!=0)
     {
-       //cout<<" status "<<track->Label()<<" "<<track->Flags()<<" "<<track->TPCnclsF()<<" "<<track->ITSncls()<<endl;
-       if ((track->Flags()&fStatus)!=fStatus)
+      //cout<<" status "<<track->Label()<<" "<<track->Flags()<<" "<<track->TPCnclsF()<<" "<<track->ITSncls()<<endl;
+      if ((track->Flags()&fStatus)!=fStatus)
        {
          //  cout<<track->Flags()<<" "<<fStatus<<" no go through status"<<endl;
-           return false;
+         return false;
        }
        
     }
-    if (fminTPCclsF>track->TPCnclsF())
+  if (fminTPCclsF>track->TPCnclsF())
     {
-       //cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
-       return false;
+      //cout<<" No go because TPC Number of ClsF"<<fminTPCclsF<< " "<<track->TPCnclsF()<<endl;
+      return false;
     }
-    if (fminITScls>track->ITSncls())
+  if (fminITScls>track->ITSncls())
     {
-       //cout<<" No go because ITS Number of Cls"<<fminITScls<< " "<<track->ITSncls()<<endl;
-       return false;
+      //cout<<" No go because ITS Number of Cls"<<fminITScls<< " "<<track->ITSncls()<<endl;
+      return false;
     }
        
-    if (fLabel)
+  if (fLabel)
     {
-       //cout<<"labels"<<endl;
-       if(track->Label()<0)
+      //cout<<"labels"<<endl;
+      if(track->Label()<0)
        {
-           fNTracksFailed++;
-        //   cout<<"No Go Through the cut"<<endl;
+         fNTracksFailed++;
+         //   cout<<"No Go Through the cut"<<endl;
          //  cout<<fLabel<<" Label="<<track->Label()<<endl;
-           return false;
+         return false;
        }    
     }
-    if (fCharge!=0)
+  if (fCharge!=0)
     {              
-        //cout<<"AliFemtoESD  cut ch "<<endl;
-         //cout<<fCharge<<" Charge="<<track->Charge()<<endl;
-       if (track->Charge()!= fCharge)  
+      //cout<<"AliFemtoESD  cut ch "<<endl;
+      //cout<<fCharge<<" Charge="<<track->Charge()<<endl;
+      if (track->Charge()!= fCharge)   
        {
-           fNTracksFailed++;
+         fNTracksFailed++;
          //  cout<<"No Go Through the cut"<<endl;
-          // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
-           return false;
+         // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
+         return false;
        }
     }
-    float TEnergy = ::sqrt(track->P().mag2()+fMass*fMass);
-    float TRapidity = 0.5*::log((TEnergy+track->P().z())/(TEnergy-track->P().z()));
-    float Pt = ::sqrt((track->P().x())*(track->P().x())+(track->P().y())*(track->P().y()));
-    if ((TRapidity<fRapidity[0])||(TRapidity>fRapidity[1]))
+  float tEnergy = ::sqrt(track->P().mag2()+fMass*fMass);
+  float tRapidity = 0.5*::log((tEnergy+track->P().z())/(tEnergy-track->P().z()));
+  float tPt = ::sqrt((track->P().x())*(track->P().x())+(track->P().y())*(track->P().y()));
+  if ((tRapidity<fRapidity[0])||(tRapidity>fRapidity[1]))
     {
-       fNTracksFailed++;
-       //cout<<"No Go Through the cut"<<endl;   
-       //cout<<fRapidity[0]<<" < Rapidity ="<<TRapidity<<" <"<<fRapidity[1]<<endl;
-       return false;
+      fNTracksFailed++;
+      //cout<<"No Go Through the cut"<<endl;   
+      //cout<<fRapidity[0]<<" < Rapidity ="<<tRapidity<<" <"<<fRapidity[1]<<endl;
+      return false;
     }
-    if ((Pt<fPt[0])||(Pt>fPt[1]))
+  if ((tPt<fPt[0])||(tPt>fPt[1]))
     {
-       fNTracksFailed++;
-       //cout<<"No Go Through the cut"<<endl;
-       //cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
-       return false;
+      fNTracksFailed++;
+      //cout<<"No Go Through the cut"<<endl;
+      //cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
+      return false;
     }
-    if ((track->PidProbElectron()<fPidProbElectron[0])||(track->PidProbElectron()>fPidProbElectron[1]))
+  if ((track->PidProbElectron()<fPidProbElectron[0])||(track->PidProbElectron()>fPidProbElectron[1]))
     {
-       fNTracksFailed++;
-       //cout<<"No Go Through the cut"<<endl;
-       //cout<<fPidProbElectron[0]<<" < e ="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
-       return false;
+      fNTracksFailed++;
+      //cout<<"No Go Through the cut"<<endl;
+      //cout<<fPidProbElectron[0]<<" < e ="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
+      return false;
     }
-    if ((track->PidProbPion()<fPidProbPion[0])||(track->PidProbPion()>fPidProbPion[1]))
+  if ((track->PidProbPion()<fPidProbPion[0])||(track->PidProbPion()>fPidProbPion[1]))
     {
-       fNTracksFailed++;
-       //cout<<"No Go Through the cut"<<endl;
-       //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
-       return false;
+      fNTracksFailed++;
+      //cout<<"No Go Through the cut"<<endl;
+      //cout<<fPidProbPion[0]<<" < pi ="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
+      return false;
     }
-    if ((track->PidProbKaon()<fPidProbKaon[0])||(track->PidProbKaon()>fPidProbKaon[1]))
+  if ((track->PidProbKaon()<fPidProbKaon[0])||(track->PidProbKaon()>fPidProbKaon[1]))
     {
-       fNTracksFailed++;
-       //cout<<"No Go Through the cut"<<endl;
-       //cout<<fPidProbKaon[0]<<" < k ="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
-       return false;
+      fNTracksFailed++;
+      //cout<<"No Go Through the cut"<<endl;
+      //cout<<fPidProbKaon[0]<<" < k ="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
+      return false;
     }
-    if ((track->PidProbProton()<fPidProbProton[0])||(track->PidProbProton()>fPidProbProton[1]))
+  if ((track->PidProbProton()<fPidProbProton[0])||(track->PidProbProton()>fPidProbProton[1]))
     {
-       fNTracksFailed++;
-       //cout<<"No Go Through the cut"<<endl;
-       //cout<<fPidProbProton[0]<<" < p  ="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
-       return false;
+      fNTracksFailed++;
+      //cout<<"No Go Through the cut"<<endl;
+      //cout<<fPidProbProton[0]<<" < p  ="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
+      return false;
     }
-    if ((track->PidProbMuon()<fPidProbMuon[0])||(track->PidProbMuon()>fPidProbMuon[1]))
+  if ((track->PidProbMuon()<fPidProbMuon[0])||(track->PidProbMuon()>fPidProbMuon[1]))
     {
-       fNTracksFailed++;
-       //cout<<"No Go Through the cut"<<endl;
-       //cout<<fPidProbMuon[0]<<" <  mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
-       return false;
+      fNTracksFailed++;
+      //cout<<"No Go Through the cut"<<endl;
+      //cout<<fPidProbMuon[0]<<" <  mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
+      return false;
     }
   
-   // cout<<"Go Through the cut"<<endl;
-   // cout<<fLabel<<" Label="<<track->Label()<<endl;
-   // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
-    // cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
-    //cout<<fRapidity[0]<<" < Rapidity ="<<TRapidity<<" <"<<fRapidity[1]<<endl;
-    //cout<<fPidProbElectron[0]<<" <  e="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
-    //cout<<fPidProbPion[0]<<" <  pi="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
-    //cout<<fPidProbKaon[0]<<" <  k="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
-    //cout<<fPidProbProton[0]<<" <  p="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
-    //cout<<fPidProbMuon[0]<<" <  mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
-    fNTracksPassed++ ;
-    return true;
+  // cout<<"Go Through the cut"<<endl;
+  // cout<<fLabel<<" Label="<<track->Label()<<endl;
+  // cout<<fCharge<<" Charge="<<track->Charge()<<endl;
+  // cout<<fPt[0]<<" < Pt ="<<Pt<<" <"<<fPt[1]<<endl;
+  //cout<<fRapidity[0]<<" < Rapidity ="<<tRapidity<<" <"<<fRapidity[1]<<endl;
+  //cout<<fPidProbElectron[0]<<" <  e="<<track->PidProbElectron()<<" <"<<fPidProbElectron[1]<<endl;
+  //cout<<fPidProbPion[0]<<" <  pi="<<track->PidProbPion()<<" <"<<fPidProbPion[1]<<endl;
+  //cout<<fPidProbKaon[0]<<" <  k="<<track->PidProbKaon()<<" <"<<fPidProbKaon[1]<<endl;
+  //cout<<fPidProbProton[0]<<" <  p="<<track->PidProbProton()<<" <"<<fPidProbProton[1]<<endl;
+  //cout<<fPidProbMuon[0]<<" <  mi="<<track->PidProbMuon()<<" <"<<fPidProbMuon[1]<<endl;
+  fNTracksPassed++ ;
+  return true;
     
     
 }
 //------------------------------
 AliFemtoString AliFemtoESDTrackCut::Report()
 {
-    string Stemp;
-    char Ctemp[100];
-    sprintf(Ctemp,"Particle mass:\t%E\n",this->Mass());
-    Stemp=Ctemp;
-    sprintf(Ctemp,"Particle charge:\t%d\n",fCharge);
-    Stemp+=Ctemp;
-    sprintf(Ctemp,"Particle pT:\t%E - %E\n",fPt[0],fPt[1]);
-    Stemp+=Ctemp;
-    sprintf(Ctemp,"Particle rapidity:\t%E - %E\n",fRapidity[0],fRapidity[1]);
-    Stemp+=Ctemp;
-    sprintf(Ctemp,"Number of tracks which passed:\t%ld  Number which failed:\t%ld\n",fNTracksPassed,fNTracksFailed);
-    Stemp += Ctemp;
-    AliFemtoString returnThis = Stemp;
-    return returnThis;
+  string tStemp;
+  char tCtemp[100];
+  sprintf(tCtemp,"Particle mass:\t%E\n",this->Mass());
+  tStemp=tCtemp;
+  sprintf(tCtemp,"Particle charge:\t%d\n",fCharge);
+  tStemp+=tCtemp;
+  sprintf(tCtemp,"Particle pT:\t%E - %E\n",fPt[0],fPt[1]);
+  tStemp+=tCtemp;
+  sprintf(tCtemp,"Particle rapidity:\t%E - %E\n",fRapidity[0],fRapidity[1]);
+  tStemp+=tCtemp;
+  sprintf(tCtemp,"Number of tracks which passed:\t%ld  Number which failed:\t%ld\n",fNTracksPassed,fNTracksFailed);
+  tStemp += tCtemp;
+  AliFemtoString returnThis = tStemp;
+  return returnThis;
 }
index d3e240a..50359a2 100644 (file)
@@ -1,35 +1,15 @@
-/***************************************************************************
- *
- * $Id$
- *
- * 
- ***************************************************************************
- *
- * 
- *              
- *
- ***************************************************************************
- *
- * $Log$
- * Revision 1.1.1.1  2007/04/25 15:38:41  panos
- * Importing the HBT code dir
- *
- * Revision 1.4  2007/03/20 09:37:13  mchojnacki
- * *** empty log message ***
- *
- * Revision 1.3  2007/03/13 15:30:03  mchojnacki
- * adding reader for simulated data
- *
- * Revision 1.2  2007/03/08 14:58:03  mchojnacki
- * adding some alice stuff
- *
- * Revision 1.1.1.1  2007/03/07 10:14:49  mchojnacki
- * First version on CVS
- *
- **************************************************************************/
+///////////////////////////////////////////////////////////////////////////
+//                                                                       //
+// AliFemtoESDTrackCut: A basic track cut that used information from     //
+// ALICE ESD to accept or reject the track.                              //  
+// Enables the selection on charge, transverse momentum, rapidity,       //
+// pid probabilities, number of ITS and TPC clusters                     //
+// Author: Marek Chojnacki (WUT), mchojnacki@knf.pw.edu.pl               //
+//                                                                       //
+///////////////////////////////////////////////////////////////////////////
 
-#ifndef AliFemtoESDTrackCut_hh
-#define AliFemtoESDTrackCut_hh
+#ifndef ALIFEMTOESDTRACKCUT_H
+#define ALIFEMTOESDTRACKCUT_H
 
 //#ifndef StMaker_H
 //#include "StMaker.h"
 class AliFemtoESDTrackCut : public AliFemtoTrackCut 
 {
 
-    public:
-           AliFemtoESDTrackCut();
-          //~AliFemtoESDTrackCut();
+ public:
+  AliFemtoESDTrackCut();
+  //~AliFemtoESDTrackCut();
 
-          virtual bool Pass(const AliFemtoTrack*);
+  virtual bool Pass(const AliFemtoTrack* aTrack);
 
-          virtual AliFemtoString Report();
+  virtual AliFemtoString Report();
 
-          void SetPt(const float& lo, const float& hi);
-          void SetRapidity(const float& lo, const float& hi);
-          void SetCharge(const int&);
-          void SetPidProbElectron(const float& lo, const float& hi);
-          void SetPidProbPion(const float& lo, const float& hi);
-          void SetPidProbKaon(const float& lo, const float& hi);
-          void SetPidProbProton(const float& lo, const float& hi);
-          void SetPidProbMuon(const float& lo, const float& hi);
-          void SetLabel(const bool& flag);
-          void SetStatus(const long& );
-          void SetminTPCclsF(const short& );
-          void SetminITScls(const int& );
+  void SetPt(const float& lo, const float& hi);
+  void SetRapidity(const float& lo, const float& hi);
+  void SetCharge(const int&);
+  void SetPidProbElectron(const float& lo, const float& hi);
+  void SetPidProbPion(const float& lo, const float& hi);
+  void SetPidProbKaon(const float& lo, const float& hi);
+  void SetPidProbProton(const float& lo, const float& hi);
+  void SetPidProbMuon(const float& lo, const float& hi);
+  void SetLabel(const bool& flag);
+  void SetStatus(const long& w);
+  void SetminTPCclsF(const short& s);
+  void SetminITScls(const int& s);
   
-          private:   // here are the quantities I want to cut on...
+ private:   // here are the quantities I want to cut on...
 
-          int               fCharge;
-          float             fPt[2];
-          float             fRapidity[2];
-          float             fPidProbElectron[2]; // new
-          float             fPidProbPion[2]; // new
-          float             fPidProbKaon[2]; // new
-          float             fPidProbProton[2]; // new
-          float             fPidProbMuon[2]; //new 
-          bool              fLabel;//if true label<0 will not pass throught 
-          long              fStatus;//staus flag
-          short             fminTPCclsF;//min number of findable clusters in the TPC
-          int               fminITScls;//min number of clusters assigned in the ITS 
-          long              fNTracksPassed;
-          long              fNTracksFailed;
+  int               fCharge;             // particle charge
+  float             fPt[2];              // bounds for transverse momentum
+  float             fRapidity[2];        // bounds for rapidity
+  float             fPidProbElectron[2]; // bounds for electron probability
+  float             fPidProbPion[2];     // bounds for pion probability
+  float             fPidProbKaon[2];     // bounds for kaon probability
+  float             fPidProbProton[2];   // bounds for proton probability
+  float             fPidProbMuon[2];     // bounds for muon probability 
+  bool              fLabel;              // if true label<0 will not pass throught 
+  long              fStatus;             // staus flag
+  short             fminTPCclsF;         // min number of findable clusters in the TPC
+  int               fminITScls;          // min number of clusters assigned in the ITS 
+  long              fNTracksPassed;      // passed tracks count
+  long              fNTracksFailed;      // failed tracks count
 
 #ifdef __ROOT__ 
   ClassDef(AliFemtoESDTrackCut, 1)
 #endif
-};
+    };
 
 
 inline void AliFemtoESDTrackCut::SetPt(const float& lo, const float& hi){fPt[0]=lo; fPt[1]=hi;}
index b45a083..a9c5b91 100644 (file)
@@ -23,6 +23,25 @@ AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource():
   fHistRStar(0),
   fHistdNdR(0)
 {
+  // default constructor
+  char buf[100];
+  char title[100] = "CFSource";
+  sprintf(buf, "%sOut", title);
+  fHistROut = new TH1D(buf,buf,100,-50.0,50.0);
+  sprintf(buf, "%sSide", title);
+  fHistRSide = new TH1D(buf,buf,100,-50.0,50.0);
+  sprintf(buf, "%sLong", title);
+  fHistRLong = new TH1D(buf,buf,100,-50.0,50.0);
+  sprintf(buf, "%sInv", title);
+  fHistRStar = new TH1D(buf,buf,100,-50.0,50.0);
+  sprintf(buf, "%sdNdR", title);
+  fHistdNdR = new TH1D(buf,buf,100,-50.0,50.0);
+
+  fHistROut->Sumw2();
+  fHistRSide->Sumw2();
+  fHistRLong->Sumw2();
+  fHistRStar->Sumw2();
+  fHistdNdR->Sumw2();
 }
 //_______________________
 AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource(const char *title, Int_t aNbins, Double_t aQinvLo, Double_t aQinvHi):
@@ -33,6 +52,7 @@ AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource(const char *title, Int_
   fHistRStar(0),
   fHistdNdR(0)
 {
+  // basic constructor
   char buf[100];
   sprintf(buf, "%sOut", title);
   fHistROut = new TH1D(buf,buf,100,-50.0,50.0);
@@ -60,6 +80,7 @@ AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource(const AliFemtoModelCorr
   fHistRStar(0),
   fHistdNdR(0)
 {
+  // copy constructor
   fHistROut = new TH1D (*aCorrFctn.fHistROut);
   fHistRSide = new TH1D(*aCorrFctn.fHistRSide);
   fHistRLong = new TH1D(*aCorrFctn.fHistRLong);
@@ -69,6 +90,7 @@ AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource(const AliFemtoModelCorr
 //_______________________
 AliFemtoModelCorrFctnSource::~AliFemtoModelCorrFctnSource()
 {
+  // destructor
   if (fHistROut) delete fHistROut;
   if (fHistRSide) delete fHistRSide;
   if (fHistRLong) delete fHistRLong;
@@ -82,6 +104,7 @@ AliFemtoModelCorrFctnSource::~AliFemtoModelCorrFctnSource()
 //_______________________
 AliFemtoModelCorrFctnSource& AliFemtoModelCorrFctnSource::operator=(const AliFemtoModelCorrFctnSource& aCorrFctn)
 {
+  // assignment operator
   if (this == &aCorrFctn) 
     return *this;
   if (aCorrFctn.fHistROut)
@@ -105,6 +128,7 @@ AliFemtoModelCorrFctnSource& AliFemtoModelCorrFctnSource::operator=(const AliFem
 //_______________________
 AliFemtoString AliFemtoModelCorrFctnSource::Report()
 {
+  // construct report
   AliFemtoString tStr = "AliFemtoModelCorrFctnSource report";
 
   return tStr;
@@ -113,12 +137,15 @@ AliFemtoString AliFemtoModelCorrFctnSource::Report()
 //_______________________
 void AliFemtoModelCorrFctnSource::AddRealPair(AliFemtoPair* aPair)
 {
+  // add real (effect) pair
   AliFemtoModelCorrFctn::AddRealPair(aPair);
 }
 //_______________________
 void AliFemtoModelCorrFctnSource::AddMixedPair(AliFemtoPair* aPair)
 {
+  // add mixed (background) pair
   AliFemtoModelCorrFctn::AddMixedPair(aPair);
+  // save the generated positions
   fHistROut->Fill (fManager->GetWeightGenerator()->GetRStarOut());
   fHistRSide->Fill(fManager->GetWeightGenerator()->GetRStarSide());
   fHistRLong->Fill(fManager->GetWeightGenerator()->GetRStarLong());
@@ -128,6 +155,7 @@ void AliFemtoModelCorrFctnSource::AddMixedPair(AliFemtoPair* aPair)
 //_______________________
 void AliFemtoModelCorrFctnSource::Write()
 {
+  // write out all the histograms
   fHistROut->Write();
   fHistRSide->Write();
   fHistRLong->Write();
@@ -139,6 +167,7 @@ void AliFemtoModelCorrFctnSource::Write()
 //_______________________
 AliFemtoModelCorrFctn* AliFemtoModelCorrFctnSource::Clone()
 {
+  // Clone the correlation function
   AliFemtoModelCorrFctnSource *tCopy = new AliFemtoModelCorrFctnSource(*this);
   
   return tCopy;
index f57328c..dda269a 100644 (file)
@@ -6,8 +6,8 @@
 /// Authors: Adam Kisiel, kisiel@mps.ohio-state.edu                          ///
 ///                                                                          ///
 ////////////////////////////////////////////////////////////////////////////////
-#ifndef AliFemtoModelCorrFctnSource_hh
-#define AliFemtoModelCorrFctnSource_hh
+#ifndef ALIFEMTOMODELCORRFCTNSOURCE_H
+#define ALIFEMTOMODELCORRFCTNSOURCE_H
 
 #include "AliFemtoCorrFctn.h"
 #include "AliFemtoPair.h"
@@ -35,11 +35,11 @@ public:
 
 protected:
 
-  TH1D *fHistROut;
-  TH1D *fHistRSide;
-  TH1D *fHistRLong;
-  TH1D *fHistRStar;
-  TH1D *fHistdNdR;
+  TH1D *fHistROut;     // Distribution of Rout
+  TH1D *fHistRSide;    // Distribution of Rside
+  TH1D *fHistRLong;    // Distribution of Rlong
+  TH1D *fHistRStar;    // Distribution of RStar
+  TH1D *fHistdNdR;     // Distribution of RStar weighted by Jacobian 
 
 private:
 
index a98a55e..c9dc4f7 100644 (file)
@@ -23,23 +23,23 @@ AliFemtoShareQualityCorrFctn::AliFemtoShareQualityCorrFctn(char* title, const in
 {
   // set up numerator
   //  title = "Num Qinv (MeV/c)";
-  char TitNum[100] = "NumShare";
-  strcat(TitNum,title);
-  fShareNumerator = new TH2D(TitNum,title,nbins,QinvLo,QinvHi,50,0.0,1.00001);
+  char tTitNum[100] = "NumShare";
+  strcat(tTitNum,title);
+  fShareNumerator = new TH2D(tTitNum,title,nbins,QinvLo,QinvHi,50,0.0,1.00001);
   // set up denominator
   //title = "Den Qinv (MeV/c)";
-  char TitDen[100] = "DenShare";
-  strcat(TitDen,title);
-  fShareDenominator = new TH2D(TitDen,title,nbins,QinvLo,QinvHi,50,0.0,1.00001);
+  char tTitDen[100] = "DenShare";
+  strcat(tTitDen,title);
+  fShareDenominator = new TH2D(tTitDen,title,nbins,QinvLo,QinvHi,50,0.0,1.00001);
 
-  char Tit2Num[100] = "NumQuality";
-  strcat(Tit2Num,title);
-  fQualityNumerator = new TH2D(Tit2Num,title,nbins,QinvLo,QinvHi,75,-0.500001,1.000001);
+  char tTit2Num[100] = "NumQuality";
+  strcat(tTit2Num,title);
+  fQualityNumerator = new TH2D(tTit2Num,title,nbins,QinvLo,QinvHi,75,-0.500001,1.000001);
   // set up denominator
   //title = "Den Qinv (MeV/c)";
-  char Tit2Den[100] = "DenQuality";
-  strcat(Tit2Den,title);
-  fQualityDenominator = new TH2D(Tit2Den,title,nbins,QinvLo,QinvHi,75,-0.500001,1.000001);
+  char tTit2Den[100] = "DenQuality";
+  strcat(tTit2Den,title);
+  fQualityDenominator = new TH2D(tTit2Den,title,nbins,QinvLo,QinvHi,75,-0.500001,1.000001);
   // set up ratio
   //title = "Ratio Qinv (MeV/c)";
   // this next bit is unfortunately needed so that we can have many histos of same "title"
@@ -63,6 +63,7 @@ AliFemtoShareQualityCorrFctn::AliFemtoShareQualityCorrFctn(const AliFemtoShareQu
   fQualityNumerator(0),
   fQualityDenominator(0)
 {
+  // copy constructor
   if (aCorrFctn.fShareNumerator)
     fShareNumerator = new TH2D(*aCorrFctn.fShareNumerator);
   if (aCorrFctn.fShareDenominator)
@@ -74,6 +75,7 @@ AliFemtoShareQualityCorrFctn::AliFemtoShareQualityCorrFctn(const AliFemtoShareQu
 }
 //____________________________
 AliFemtoShareQualityCorrFctn::~AliFemtoShareQualityCorrFctn(){
+  // destructor
   delete fShareNumerator;
   delete fShareDenominator;
   delete fQualityNumerator;
@@ -82,6 +84,7 @@ AliFemtoShareQualityCorrFctn::~AliFemtoShareQualityCorrFctn(){
 //_________________________
 AliFemtoShareQualityCorrFctn& AliFemtoShareQualityCorrFctn::operator=(const AliFemtoShareQualityCorrFctn& aCorrFctn)
 {
+  // assignment operator
   if (this == &aCorrFctn)
     return *this;
 
@@ -118,6 +121,7 @@ void AliFemtoShareQualityCorrFctn::Finish(){
 
 //____________________________
 AliFemtoString AliFemtoShareQualityCorrFctn::Report(){
+  // create report
   string stemp = "Qinv Correlation Function Report:\n";
   char ctemp[100];
   sprintf(ctemp,"Number of entries in numerator:\t%E\n",fShareNumerator->GetEntries());
@@ -130,7 +134,8 @@ AliFemtoString AliFemtoShareQualityCorrFctn::Report(){
 }
 //____________________________
 void AliFemtoShareQualityCorrFctn::AddRealPair( AliFemtoPair* pair){
-  double Qinv = fabs(pair->QInv());   // note - qInv() will be negative for identical pairs...
+  // add real (effect) pair
+  double tQinv = fabs(pair->QInv());   // note - qInv() will be negative for identical pairs...
   Int_t nh = 0;
   Int_t an = 0;
   Int_t ns = 0;
@@ -143,7 +148,7 @@ void AliFemtoShareQualityCorrFctn::AddRealPair( AliFemtoPair* pair){
       if (pair->Track1()->Track()->TPCsharing().TestBitNumber(imap) &&
          pair->Track2()->Track()->TPCsharing().TestBitNumber(imap))
        {
-         if (Qinv < 0.01) {
+         if (tQinv < 0.01) {
            cout << "Shared cluster in row " << imap << endl; 
          }
          an++;
@@ -164,8 +169,8 @@ void AliFemtoShareQualityCorrFctn::AddRealPair( AliFemtoPair* pair){
       nh++;
     }
   }
-  if (Qinv < 0.01) {
-    cout << "Qinv of the pair is " << Qinv << endl;
+  if (tQinv < 0.01) {
+    cout << "Qinv of the pair is " << tQinv << endl;
     cout << "Clusters: " << endl;
     for (unsigned int imap=0; imap<pair->Track1()->Track()->TPCclusters().GetNbits(); imap++) {
       cout << imap ;
@@ -190,19 +195,20 @@ void AliFemtoShareQualityCorrFctn::AddRealPair( AliFemtoPair* pair){
     hsfval = ns*1.0/nh;
   }
 
-  if (Qinv < 0.01) {
+  if (tQinv < 0.01) {
     cout << "Quality  Sharity " << hsmval << " " << hsfval << " " << pair->Track1()->Track() << " " << pair->Track2()->Track() << endl;
   }
 
-  fShareNumerator->Fill(Qinv, hsfval);
-  fQualityNumerator->Fill(Qinv, hsmval);
-  //  cout << "AliFemtoShareQualityCorrFctn::AddRealPair : " << pair->qInv() << " " << Qinv <<
+  fShareNumerator->Fill(tQinv, hsfval);
+  fQualityNumerator->Fill(tQinv, hsmval);
+  //  cout << "AliFemtoShareQualityCorrFctn::AddRealPair : " << pair->qInv() << " " << tQinv <<
   //" " << pair->Track1().FourMomentum() << " " << pair->Track2().FourMomentum() << endl;
 }
 //____________________________
 void AliFemtoShareQualityCorrFctn::AddMixedPair( AliFemtoPair* pair){
+  // add mixed (background) pair
   double weight = 1.0;
-  double Qinv = fabs(pair->QInv());   // note - qInv() will be negative for identical pairs...
+  double tQinv = fabs(pair->QInv());   // note - qInv() will be negative for identical pairs...
   Int_t nh = 0;
   Int_t an = 0;
   Int_t ns = 0;
@@ -246,8 +252,8 @@ void AliFemtoShareQualityCorrFctn::AddMixedPair( AliFemtoPair* pair){
     hsfval = ns*1.0/nh;
   }
 
-  fShareDenominator->Fill(Qinv,hsfval,weight);
-  fQualityDenominator->Fill(Qinv,hsmval,weight);
+  fShareDenominator->Fill(tQinv,hsfval,weight);
+  fQualityDenominator->Fill(tQinv,hsmval,weight);
 }
 
 
index 36c5678..ec644f7 100644 (file)
@@ -22,19 +22,19 @@ public:
   AliFemtoShareQualityCorrFctn& operator=(const AliFemtoShareQualityCorrFctn& aCorrFctn);
 
   virtual AliFemtoString Report();
-  virtual void AddRealPair(AliFemtoPair*);
-  virtual void AddMixedPair(AliFemtoPair*);
+  virtual void AddRealPair(AliFemtoPair* aPair);
+  virtual void AddMixedPair(AliFemtoPair* aPair);
 
   virtual void Finish();
 
   void WriteHistos();
 private:
   
-  TH2D *fShareNumerator;
-  TH2D *fShareDenominator;
-
-  TH2D *fQualityNumerator;
-  TH2D *fQualityDenominator;
+  TH2D *fShareNumerator;        // Share fraction for real pairs
+  TH2D *fShareDenominator;      // share fraction for mixed pairs
+  TH2D *fQualityNumerator;      // quality for real pairs
+  TH2D *fQualityDenominator;    // quality for mixed pairs 
 
 #ifdef __ROOT__
   ClassDef(AliFemtoShareQualityCorrFctn, 1)