]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
comments added
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 May 2001 22:01:40 +0000 (22:01 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 May 2001 22:01:40 +0000 (22:01 +0000)
17 files changed:
PHOS/AliPHOS.cxx
PHOS/AliPHOSClusterizerv1.cxx
PHOS/AliPHOSCpvRecPoint.cxx
PHOS/AliPHOSDebug.cxx
PHOS/AliPHOSDigit.cxx
PHOS/AliPHOSDigitizer.cxx
PHOS/AliPHOSEmcRecPoint.cxx
PHOS/AliPHOSFastRecParticle.cxx
PHOS/AliPHOSGeometry.cxx
PHOS/AliPHOSIndexToObject.cxx
PHOS/AliPHOSPID.cxx
PHOS/AliPHOSPIDv1.cxx
PHOS/AliPHOSPpsdRecPoint.cxx
PHOS/AliPHOSReconstructioner.cxx
PHOS/AliPHOSSDigitizer.cxx
PHOS/AliPHOSTrackSegmentMaker.cxx
PHOS/AliPHOSTrackSegmentMakerv1.cxx

index 3437832ec1756baf529a15953f3d0d44cf9179b0..8e622f37872f9fdc5acb6415e4eeaff4ae1f80ba 100644 (file)
@@ -306,7 +306,7 @@ void AliPHOS::CreateMaterials()
 //____________________________________________________________________________
 void AliPHOS::SetTreeAddress()
 { 
 //____________________________________________________________________________
 void AliPHOS::SetTreeAddress()
 { 
-
+  // called by AliRun
 
   // TBranch *branch;
   //  AliDetector::SetTreeAddress();
 
   // TBranch *branch;
   //  AliDetector::SetTreeAddress();
index b7bda26baaa180450a020e12f99d735a27d0c49a..e86bd3d72d328102880c16ad5a14c8e100a6c574 100644 (file)
 //*-- Author: Yves Schutz (SUBATECH)  & Dmitri Peressounko (SUBATECH & Kurchatov Institute)
 //////////////////////////////////////////////////////////////////////////////
 //  Clusterization class. Performs clusterization (collects neighbouring active cells) and 
 //*-- Author: Yves Schutz (SUBATECH)  & Dmitri Peressounko (SUBATECH & Kurchatov Institute)
 //////////////////////////////////////////////////////////////////////////////
 //  Clusterization class. Performs clusterization (collects neighbouring active cells) and 
-//  unfolding of the clusters with several local maxima.  
-//  results are stored in TreeR#, branches PHOSEmcRP (EMC recPoints),
+//  unfolds the clusters having several local maxima.  
+//  Results are stored in TreeR#, branches PHOSEmcRP (EMC recPoints),
 //  PHOSCpvRP (CPV RecPoints) and AliPHOSClusterizer (Clusterizer with all 
 //  parameters including input digits branch title, thresholds etc.)
 //  PHOSCpvRP (CPV RecPoints) and AliPHOSClusterizer (Clusterizer with all 
 //  parameters including input digits branch title, thresholds etc.)
-//  This TTask normally called from Reconstructioner, but as well can be used it in 
-//  standalone mode:
-// root [0] AliPHOSClusterizerv1 * cl = new AliPHOSClusterizerv1("galice.root")  
-// Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
+//  This TTask is normally called from Reconstructioner, but can as well be used in 
+//  standalone mode.
+// Use Case:
+//  root [0] AliPHOSClusterizerv1 * cl = new AliPHOSClusterizerv1("galice.root")  
+//  Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
 //               //reads gAlice from header file "..."                      
 //               //reads gAlice from header file "..."                      
-// root [1] cl->ExecuteTask()  
+//  root [1] cl->ExecuteTask()  
 //               //finds RecPoints in all events stored in galice.root
 //               //finds RecPoints in all events stored in galice.root
-// root [2] cl->SetDigitsBranch("digits2") 
+//  root [2] cl->SetDigitsBranch("digits2") 
 //               //sets another title for Digitis (input) branch
 //               //sets another title for Digitis (input) branch
-// root [3] cl->SetRecPointsBranch("recp2")  
+//  root [3] cl->SetRecPointsBranch("recp2")  
 //               //sets another title four output branches
 //               //sets another title four output branches
-// root [4] cl->SetEmcLocalMaxCut(0.03)  
+//  root [4] cl->SetEmcLocalMaxCut(0.03)  
 //               //set clusterization parameters
 //               //set clusterization parameters
-// root [5] cl->ExecuteTask("deb all time")  
+//  root [5] cl->ExecuteTask("deb all time")  
 //               //once more finds RecPoints options are 
 //               // deb - print number of found rec points
 //               // deb all - print number of found RecPoints and some their characteristics 
 //               //once more finds RecPoints options are 
 //               // deb - print number of found rec points
 //               // deb all - print number of found RecPoints and some their characteristics 
@@ -115,6 +116,7 @@ ClassImp(AliPHOSClusterizerv1)
 //____________________________________________________________________________
 AliPHOSClusterizerv1::AliPHOSClusterizerv1(const char* headerFile,const char* digitsFile):AliPHOSClusterizer()
 {
 //____________________________________________________________________________
 AliPHOSClusterizerv1::AliPHOSClusterizerv1(const char* headerFile,const char* digitsFile):AliPHOSClusterizer()
 {
+  // ctor with the indication of the file where header Tree and digits Tree are stored
   SetName("AliPHOSClusterizer");
   SetTitle("Version 1") ;
   
   SetName("AliPHOSClusterizer");
   SetTitle("Version 1") ;
   
@@ -167,8 +169,9 @@ AliPHOSClusterizerv1::AliPHOSClusterizerv1(const char* headerFile,const char* di
 
 }
 //____________________________________________________________________________
 
 }
 //____________________________________________________________________________
-void AliPHOSClusterizerv1::Exec(Option_t * option){
-  // Steerign function
+void AliPHOSClusterizerv1::Exec(Option_t * option)
+{
+  // Steering function
 
   if(!fIsInitialized) Init() ;
 
 
   if(!fIsInitialized) Init() ;
 
@@ -204,7 +207,7 @@ Bool_t AliPHOSClusterizerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * maxAt, Fl
                                    Int_t nPar, Float_t * fitparameters)
 { 
   // Calls TMinuit to fit the energy distribution of a cluster with several maxima 
                                    Int_t nPar, Float_t * fitparameters)
 { 
   // Calls TMinuit to fit the energy distribution of a cluster with several maxima 
-  // the initial values for fitting procedure are set in the positions of local maxima.
+  // The initial values for fitting procedure are set equal to the positions of local maxima.
   // Cluster will be fitted as a superposition of nPar/3 electromagnetic showers
 
   gMinuit->mncler();                     // Reset Minuit's list of paramters
   // Cluster will be fitted as a superposition of nPar/3 electromagnetic showers
 
   gMinuit->mncler();                     // Reset Minuit's list of paramters
@@ -288,30 +291,31 @@ Bool_t AliPHOSClusterizerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * maxAt, Fl
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-void AliPHOSClusterizerv1::Init(){
+void AliPHOSClusterizerv1::Init()
+{
   //Make all memory allocations which can not be done in default constructor.
   if(!fIsInitialized){
     if(fHeaderFileName.IsNull())
       fHeaderFileName = "galice.root" ;
     
   //Make all memory allocations which can not be done in default constructor.
   if(!fIsInitialized){
     if(fHeaderFileName.IsNull())
       fHeaderFileName = "galice.root" ;
     
-
+    
     TFile * file = (TFile*) gROOT->GetFile(fHeaderFileName.Data() ) ;
     TFile * file = (TFile*) gROOT->GetFile(fHeaderFileName.Data() ) ;
-
+    
     if(file == 0){
       file = new TFile(fHeaderFileName.Data(),"update") ;
       gAlice = (AliRun *) file->Get("gAlice") ;
     }
     if(file == 0){
       file = new TFile(fHeaderFileName.Data(),"update") ;
       gAlice = (AliRun *) file->Get("gAlice") ;
     }
-
+     
     AliPHOS * phos = (AliPHOS *) gAlice->GetDetector("PHOS") ;    
     fGeom  = AliPHOSGeometry::GetInstance(phos->GetGeometry()->GetName(),phos->GetGeometry()->GetTitle() );
     AliPHOS * phos = (AliPHOS *) gAlice->GetDetector("PHOS") ;    
     fGeom  = AliPHOSGeometry::GetInstance(phos->GetGeometry()->GetName(),phos->GetGeometry()->GetTitle() );
-
+    
     fDigits = new TClonesArray("AliPHOSDigit",10) ;
     fDigitizer = new AliPHOSDigitizer() ;
     fEmcRecPoints = new TObjArray(200) ;
     fCpvRecPoints = new TObjArray(200) ;
     fEmcRecPoints->SetOwner();          // This lets Clear() really detete rec.points in array
     fCpvRecPoints->SetOwner();
     fDigits = new TClonesArray("AliPHOSDigit",10) ;
     fDigitizer = new AliPHOSDigitizer() ;
     fEmcRecPoints = new TObjArray(200) ;
     fCpvRecPoints = new TObjArray(200) ;
     fEmcRecPoints->SetOwner();          // This lets Clear() really detete rec.points in array
     fCpvRecPoints->SetOwner();
-     
+    
     if(!gMinuit) gMinuit = new TMinuit(100) ;
 
     // add Task to //root/Tasks folder
     if(!gMinuit) gMinuit = new TMinuit(100) ;
 
     // add Task to //root/Tasks folder
@@ -327,7 +331,7 @@ Int_t AliPHOSClusterizerv1::AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)c
   // Gives the neighbourness of two digits = 0 are not neighbour but continue searching 
   //                                       = 1 are neighbour
   //                                       = 2 are not neighbour but do not continue searching
   // Gives the neighbourness of two digits = 0 are not neighbour but continue searching 
   //                                       = 1 are neighbour
   //                                       = 2 are not neighbour but do not continue searching
-  // neighbours are defined as digits having at least common vertex 
+  // neighbours are defined as digits having at least common vertex 
   // The order of d1 and d2 is important: first (d1) should be a digit already in a cluster 
   //                                      which is compared to a digit (d2)  not yet in a cluster  
 
   // The order of d1 and d2 is important: first (d1) should be a digit already in a cluster 
   //                                      which is compared to a digit (d2)  not yet in a cluster  
 
@@ -413,8 +417,9 @@ Bool_t AliPHOSClusterizerv1::IsInCpv(AliPHOSDigit * digit) const
   return rv ; 
 }
 //____________________________________________________________________________
   return rv ; 
 }
 //____________________________________________________________________________
-Bool_t AliPHOSClusterizerv1::ReadDigits(){
-  //reads digitis with specified title from TreeD
+Bool_t AliPHOSClusterizerv1::ReadDigits()
+ {
+   // reads digitis with specified title from TreeD
 
   fNumberOfEmcClusters  = 0 ;
   fNumberOfCpvClusters  = 0 ;
 
   fNumberOfEmcClusters  = 0 ;
   fNumberOfCpvClusters  = 0 ;
@@ -478,10 +483,12 @@ Bool_t AliPHOSClusterizerv1::ReadDigits(){
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-void AliPHOSClusterizerv1::WriteRecPoints(){
-  // checks, if PHOSEmcRP etc. branches with given title already exist, 
-  // exits without writing, otherwise create new branches with given title
-  // fills and wrights TreeR.
+void AliPHOSClusterizerv1::WriteRecPoints()
+{
+  // Checks, if PHOSEmcRP etc. branches with given title already exist, 
+  // if yes exits without writing, 
+  // else creates new branches with given title
+  // fills and writes into TreeR.
   
   Int_t index ;
   //Evaluate poisition, dispersion and other RecPoint properties...
   
   Int_t index ;
   //Evaluate poisition, dispersion and other RecPoint properties...
@@ -729,11 +736,12 @@ void AliPHOSClusterizerv1::MakeClusters()
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-void AliPHOSClusterizerv1::MakeUnfolding(){
-  //Unfolds clusters using the shape of ElectroMagnetic shower
+void AliPHOSClusterizerv1::MakeUnfolding()
+{
+  // Unfolds clusters using the shape of an ElectroMagnetic shower
   // Performs unfolding of all EMC/CPV but NOT ppsd clusters
 
   // Performs unfolding of all EMC/CPV but NOT ppsd clusters
 
-  //Unfold first EMC clusters 
+  // Unfold first EMC clusters 
   if(fNumberOfEmcClusters > 0){
 
     Int_t nModulesToUnfold = fGeom->GetNModules() ; 
   if(fNumberOfEmcClusters > 0){
 
     Int_t nModulesToUnfold = fGeom->GetNModules() ; 
@@ -764,10 +772,10 @@ void AliPHOSClusterizerv1::MakeUnfolding(){
       delete[] maxAtEnergy ; 
     }
   } 
       delete[] maxAtEnergy ; 
     }
   } 
-  //Unfolding of EMC clusters finished
+  // Unfolding of EMC clusters finished
 
 
 
 
-  //Unfold now CPV clusters
+  // Unfold now CPV clusters
   if(fNumberOfCpvClusters > 0){
     
     Int_t nModulesToUnfold = fGeom->GetNCPVModules() ;
   if(fNumberOfCpvClusters > 0){
     
     Int_t nModulesToUnfold = fGeom->GetNCPVModules() ;
@@ -809,7 +817,7 @@ void AliPHOSClusterizerv1::MakeUnfolding(){
 Double_t  AliPHOSClusterizerv1::ShowerShape(Double_t r)
 { 
   // Shape of the shower (see PHOS TDR)
 Double_t  AliPHOSClusterizerv1::ShowerShape(Double_t r)
 { 
   // Shape of the shower (see PHOS TDR)
-  // If you change this function, change also the gradien evaluation  in ChiSquare()
+  // If you change this function, change also the gradient evaluation in ChiSquare()
 
   Double_t r4    = r*r*r*r ;
   Double_t r295  = TMath::Power(r, 2.95) ;
 
   Double_t r4    = r*r*r*r ;
   Double_t r295  = TMath::Power(r, 2.95) ;
@@ -923,7 +931,7 @@ void  AliPHOSClusterizerv1::UnfoldCluster(AliPHOSEmcRecPoint * iniEmc,
 //_____________________________________________________________________________
 void AliPHOSClusterizerv1::UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag)
 {
 //_____________________________________________________________________________
 void AliPHOSClusterizerv1::UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag)
 {
-  // Calculates th Chi square for the cluster unfolding minimization
+  // Calculates the Chi square for the cluster unfolding minimization
   // Number of parameters, Gradient, Chi squared, parameters, what to do
 
 
   // Number of parameters, Gradient, Chi squared, parameters, what to do
 
 
@@ -1023,6 +1031,7 @@ void AliPHOSClusterizerv1::UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Dou
 //____________________________________________________________________________
 void AliPHOSClusterizerv1::Print(Option_t * option)const
 {
 //____________________________________________________________________________
 void AliPHOSClusterizerv1::Print(Option_t * option)const
 {
+  // Prints the parameters of the clusterizer
   if(fIsInitialized){
     
     // Print parameters
   if(fIsInitialized){
     
     // Print parameters
@@ -1051,8 +1060,9 @@ void AliPHOSClusterizerv1::Print(Option_t * option)const
     cout << " AliPHOSClusterizerv1 not initialized " << endl ;
 }
 //____________________________________________________________________________
     cout << " AliPHOSClusterizerv1 not initialized " << endl ;
 }
 //____________________________________________________________________________
-void AliPHOSClusterizerv1::PrintRecPoints(Option_t * option){
-  //Prints list of RecPoints produced at the current pass of AliPHOSClusterizer
+void AliPHOSClusterizerv1::PrintRecPoints(Option_t * option)
+{
+  // Prints list of RecPoints produced at the current pass of AliPHOSClusterizer
 
   cout << "AliPHOSClusterizerv1: " << endl ;
   cout << "       Found "<< fEmcRecPoints->GetEntriesFast() << " EMC Rec Points and " 
 
   cout << "AliPHOSClusterizerv1: " << endl ;
   cout << "       Found "<< fEmcRecPoints->GetEntriesFast() << " EMC Rec Points and " 
index 7c10e0833c775155d7fb677180fceb9ad9c7d2bc..1a92baa87bbe9b8c3203a2be97bdf97fc09533e1 100644 (file)
@@ -243,7 +243,9 @@ void AliPHOSCpvRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py)
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-void AliPHOSCpvRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits){
+void AliPHOSCpvRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits)
+{
+  // wraps other methods
   AliPHOSEmcRecPoint::EvalAll(logWeight,digits) ;
   EvalClusterLengths(digits) ;
 }
   AliPHOSEmcRecPoint::EvalAll(logWeight,digits) ;
   EvalClusterLengths(digits) ;
 }
index 2e74fbe219030ac90be658f2d32a2bdc75567ebd..a2019ae54410f604c706bedbe4cb2ed4d9371e46 100644 (file)
@@ -211,8 +211,10 @@ void AliPHOSv1::AddHit(Int_t shunt, Int_t primary, Int_t tracknumber, Int_t Id,
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-void AliPHOSv1::Hits2SDigits(){
-  //Collects all hits in the same active volume into digit
+void AliPHOSv1::Hits2SDigits()
+{
+  // Collects all hits in the same active volume into digit
+  // OBSOLETE replace by SDigitizer
 
   Int_t i ;
   Int_t j ; 
 
   Int_t i ;
   Int_t j ; 
@@ -274,10 +276,11 @@ void AliPHOSv1::Hits2SDigits(){
 
 }
 //____________________________________________________________________________
 
 }
 //____________________________________________________________________________
-void AliPHOSv1::SDigits2Digits(){
-  //Adds noise to the summable digits and removes everething below thresholds
-  //Note, that sDigits should be SORTED in accordance with abs ID.
-
+void AliPHOSv1::SDigits2Digits()
+{
+  // Adds noise to the summable digits and removes everething below thresholds
+  // Note, that sDigits should be SORTED in accordance with abs ID.
+  // OBSOLETE Replaced by Digitzer
 
   gAlice->TreeS()->GetEvent(0) ;
 
 
   gAlice->TreeS()->GetEvent(0) ;
 
@@ -357,6 +360,7 @@ void AliPHOSv1::SDigits2Digits(){
 //___________________________________________________________________________
 void AliPHOSv1::MakeBranch(Option_t* opt, char *file)
 { 
 //___________________________________________________________________________
 void AliPHOSv1::MakeBranch(Option_t* opt, char *file)
 { 
+  // Called by AliRun
 
   char *cH ; 
   // Create new branche in the current Root Tree in the digit Tree
 
   char *cH ; 
   // Create new branche in the current Root Tree in the digit Tree
index 8857742736a8555f8a244c91e489841e6924a8e5..83ac5d132dbc5665e9cebe8f8da0e72b84f7baf9 100644 (file)
@@ -20,8 +20,6 @@
 //              energy
 //              3 identifiers for the primary particle(s) at the origine of the digit
 //  The digits are made in FinishEvent() by summing all the hits in a single PHOS crystal or PPSD gas cell
 //              energy
 //              3 identifiers for the primary particle(s) at the origine of the digit
 //  The digits are made in FinishEvent() by summing all the hits in a single PHOS crystal or PPSD gas cell
-//  It would be nice to replace the 3 identifiers by an array, but, because digits are kept in a TClonesQArray,
-//   it is not possible to stream such an array... (beyond my understqnding!)
 //
 //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
 
 //
 //*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
 
@@ -130,8 +128,9 @@ Int_t AliPHOSDigit::GetPrimary(Int_t index) const
   
 }
 //____________________________________________________________________________
   
 }
 //____________________________________________________________________________
-void AliPHOSDigit::ShiftPrimary(Int_t shift){
-  //shifts primary nimber to BIG offset, to separate primary in different TreeK
+void AliPHOSDigit::ShiftPrimary(Int_t shift)
+{
+  //shifts primary number to BIG offset, to separate primary in different TreeK
   Int_t index  ;
   for(index = 0; index <fNprimary; index ++ ){
     fPrimary[index] = fPrimary[index]+ shift * 10000000   ;
   Int_t index  ;
   for(index = 0; index <fNprimary; index ++ ){
     fPrimary[index] = fPrimary[index]+ shift * 10000000   ;
index 51f8b2fd9a6e0f3a8bdcaca733b8db274f811b47..709ba51354ff8bf597186630ebf9a9d62e538ff2 100644 (file)
 //_________________________________________________________________________
 //*-- Author :  Dmitri Peressounko (SUBATECH & Kurchatov Institute) 
 //////////////////////////////////////////////////////////////////////////////
 //_________________________________________________________________________
 //*-- Author :  Dmitri Peressounko (SUBATECH & Kurchatov Institute) 
 //////////////////////////////////////////////////////////////////////////////
-// Class performs digitization of Summable digits (in the PHOS case this is just
-// sum of contributions of all primary particles into given cell). 
+// This TTask performs digitization of Summable digits (in the PHOS case it is just
+// the sum of contributions from all primary particles into a given cell). 
 // In addition it performs mixing of summable digits from different events.
 //
 // For each event two branches are created in TreeD:
 //   "PHOS" - list of digits
 //   "AliPHOSDigitizer" - AliPHOSDigitizer with all parameters used in digitization
 //
 // In addition it performs mixing of summable digits from different events.
 //
 // For each event two branches are created in TreeD:
 //   "PHOS" - list of digits
 //   "AliPHOSDigitizer" - AliPHOSDigitizer with all parameters used in digitization
 //
-// Note, that one cset title for new digits branch, and repeat digitization with
+// Note, that one can set a title for new digits branch, and repeat digitization with
 // another set of parameters.
 //
 // another set of parameters.
 //
-// Examples of use:
+// Use case:
 // root[0] AliPHOSDigitizer * d = new AliPHOSDigitizer() ;
 // root[1] d->ExecuteTask()             
 // Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
 // root[0] AliPHOSDigitizer * d = new AliPHOSDigitizer() ;
 // root[1] d->ExecuteTask()             
 // Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
@@ -39,9 +39,9 @@
 //                       // Will read sdigits from galice1.root
 // root[3] d1->MixWith("galice2.root")       
 // Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
 //                       // Will read sdigits from galice1.root
 // root[3] d1->MixWith("galice2.root")       
 // Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
-//                       // Reads another portion of sdigits from galice2.root
+//                       // Reads another set of sdigits from galice2.root
 // root[3] d1->MixWith("galice3.root")       
 // root[3] d1->MixWith("galice3.root")       
-//                       // Reads another portion of sdigits from galice3.root
+//                       // Reads another set of sdigits from galice3.root
 // root[4] d->ExecuteTask("deb timing")    
 //                       // Reads SDigits from files galice1.root, galice2.root ....
 //                       // mixes them and stores produced Digits in file galice1.root          
 // root[4] d->ExecuteTask("deb timing")    
 //                       // Reads SDigits from files galice1.root, galice2.root ....
 //                       // mixes them and stores produced Digits in file galice1.root          
@@ -96,9 +96,10 @@ ClassImp(AliPHOSDigitizer)
 
 }
 //____________________________________________________________________________ 
 
 }
 //____________________________________________________________________________ 
-void AliPHOSDigitizer::Init(){
-// Makes all memory allocations
-
+void AliPHOSDigitizer::Init()
+{
+  // Makes all memory allocations
+  
   if(!fInitialized){
     
     fHeaderFiles  = new TClonesArray("TObjString",1) ;
   if(!fInitialized){
     
     fHeaderFiles  = new TClonesArray("TObjString",1) ;
@@ -141,7 +142,6 @@ void AliPHOSDigitizer::Init(){
     
     fInitialized = kTRUE ;
   }
     
     fInitialized = kTRUE ;
   }
-  
 }
 
 //____________________________________________________________________________ 
 }
 
 //____________________________________________________________________________ 
@@ -211,8 +211,9 @@ AliPHOSDigitizer::AliPHOSDigitizer(const char *headerFile,const char *sDigitsTit
   if(fDigits)       delete fDigits ;
 }
 //____________________________________________________________________________
   if(fDigits)       delete fDigits ;
 }
 //____________________________________________________________________________
-void AliPHOSDigitizer::Reset() { 
-  //sets current event number to the first simulated event
+void AliPHOSDigitizer::Reset() 
+{ 
+  // sets current event number to the first simulated event
 
   if(!fInitialized)
     Init() ;
 
   if(!fInitialized)
     Init() ;
@@ -223,13 +224,13 @@ void AliPHOSDigitizer::Reset() {
   
 }
 //____________________________________________________________________________
   
 }
 //____________________________________________________________________________
-Bool_t AliPHOSDigitizer::Combinator() 
-
-  //Makes all desirable combinations Signal+Background,
-  // returns kFALSE when all combinations are made
-  // May be useful to introduce some options like "One-to-One", "All-to-One" and "All-to-All" ?
+Bool_t AliPHOSDigitizer::Combinator() 
+{ 
+  // Makes all desirable combinations of Signal+Background,
+  // returns kFALSE when all combinations are made.
+  // May be useful to introduce options like "One-to-One", "All-to-One" and "All-to-All" ?
 
 
-  //realizing "One-to-One" option...
+  // realizing "One-to-One" option...
 
   if(!fInitialized)
     Init() ;
 
   if(!fInitialized)
     Init() ;
@@ -252,14 +253,15 @@ Bool_t AliPHOSDigitizer::Combinator() {
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-void AliPHOSDigitizer::Digitize(Option_t *option) { 
-
-  // Makes the digitization of the collected summable digits
-  // for this it first creates the array of all PHOS modules
-  // filled with noise (different for EMC, CPV and PPSD) and
-  // after that adds contributions from SDigits. This design 
-  // helps to avoid scanning over the list of digits to add 
-  // contribution of any new SDigit.
+void AliPHOSDigitizer::Digitize(Option_t *option) 
+{ 
+  
+  // Makes the digitization of the collected summable digits.
+  //  It first creates the array of all PHOS modules
+  //  filled with noise (different for EMC, CPV and PPSD) and
+  //  then adds contributions from SDigits. 
+  // This design avoids scanning over the list of digits to add 
+  // contribution to new SDigits only.
 
   if(!fInitialized)
     Init() ;
 
   if(!fInitialized)
     Init() ;
@@ -356,13 +358,16 @@ void AliPHOSDigitizer::Digitize(Option_t *option) {
   }
 }
 //____________________________________________________________________________
   }
 }
 //____________________________________________________________________________
-void AliPHOSDigitizer::WriteDigits(){
+void AliPHOSDigitizer::WriteDigits()
+{
 
 
-  // Made TreeD in the output file. Check if branch already exists: if yes, exits 
-  // without writing: ROOT TTree does not suppert overwriting/updating of the 
-  // already existing branches. Creates branch with Digits, named "PHOS", title "...",
-  // and branch "AliPHOSDigitizer", with the same title to keep all the parameters
-  // and names of files, from which digits are made.
+  // Makes TreeD in the output file. 
+  // Check if branch already exists: 
+  //   if yes, exit without writing: ROOT TTree does not support overwriting/updating of 
+  //      already existing branches. 
+  //   else creates branch with Digits, named "PHOS", title "...",
+  //      and branch "AliPHOSDigitizer", with the same title to keep all the parameters
+  //      and names of files, from which digits are made.
 
   gAlice->GetEvent(fIevent->At(0)) ;  // Suitable only for One-To-One mixing
   gAlice->SetEvent(fIevent->At(0)) ;  // for all-to-all will produce a lot of branches in TreeD
 
   gAlice->GetEvent(fIevent->At(0)) ;  // Suitable only for One-To-One mixing
   gAlice->SetEvent(fIevent->At(0)) ;  // for all-to-all will produce a lot of branches in TreeD
@@ -459,7 +464,8 @@ void AliPHOSDigitizer::WriteDigits(){
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-void AliPHOSDigitizer::Exec(Option_t *option) { 
+void AliPHOSDigitizer::Exec(Option_t *option) 
+{ 
   // Managing method
 
   if(!fInitialized)    Init() ;
   // Managing method
 
   if(!fInitialized)    Init() ;
@@ -494,8 +500,9 @@ void AliPHOSDigitizer::Exec(Option_t *option) {
 }
 
 //__________________________________________________________________
 }
 
 //__________________________________________________________________
-Bool_t AliPHOSDigitizer::ReadSDigits(){
-// Reads summable digits from the opened files for the particular set of events given by fIevent
+Bool_t AliPHOSDigitizer::ReadSDigits()
+{
+  // Reads summable digits from the opened files for the particular set of events given by fIevent
 
   if(!fInitialized)    Init() ;
 
 
   if(!fInitialized)    Init() ;
 
@@ -586,15 +593,17 @@ Bool_t AliPHOSDigitizer::ReadSDigits(){
 
 }
 //__________________________________________________________________
 
 }
 //__________________________________________________________________
-void AliPHOSDigitizer::MixWith(char* HeaderFile, char* sDigitsTitle){
-  // Alows produce digits by superimposing background and signal event.
+void AliPHOSDigitizer::MixWith(char* HeaderFile, char* sDigitsTitle)
+{
+  // Alows to produce digits by superimposing background and signal event.
   // It is assumed, that headers file with SIGNAL events is opened in 
   // It is assumed, that headers file with SIGNAL events is opened in 
-  // constructor, and now we set the BACKGROUND event, with which we 
-  // will mix. Thus we avoid writing (changing) huge and expencive 
+  // the constructor. 
+  // Sets the BACKGROUND event, with which the SIGNAL event is to be mixed 
+  // Thus we avoid writing (changing) huge and expensive 
   // backgound files: all output will be writen into SIGNAL, i.e. 
   // opened in constructor file. 
   //
   // backgound files: all output will be writen into SIGNAL, i.e. 
   // opened in constructor file. 
   //
-  // One can open as many files to mix with as one wants.
+  // One can open as many files to mix with as one needs.
 
 
   if(!fInitialized)
 
 
   if(!fInitialized)
@@ -649,8 +658,9 @@ void AliPHOSDigitizer::MixWith(char* HeaderFile, char* sDigitsTitle){
   
 }
 //__________________________________________________________________
   
 }
 //__________________________________________________________________
-void AliPHOSDigitizer::Print(Option_t* option)const {
-  
+void AliPHOSDigitizer::Print(Option_t* option)const 
+{
+  // Prints the parameters of the digitizer  
   if(fInitialized){
     
     cout << "------------------- "<< GetName() << " -------------" << endl ;
   if(fInitialized){
     
     cout << "------------------- "<< GetName() << " -------------" << endl ;
@@ -678,8 +688,10 @@ void AliPHOSDigitizer::Print(Option_t* option)const {
   
 }
 //__________________________________________________________________
   
 }
 //__________________________________________________________________
-void AliPHOSDigitizer::PrintDigits(Option_t * option){
-    
+void AliPHOSDigitizer::PrintDigits(Option_t * option)
+{
+  // Prints the list of produced digits
+
   cout << "AliPHOSDigitiser:"<< endl ;
   cout << "       Number of entries in Digits list " << fDigits->GetEntriesFast() << endl ;
   cout << endl ;
   cout << "AliPHOSDigitiser:"<< endl ;
   cout << "       Number of entries in Digits list " << fDigits->GetEntriesFast() << endl ;
   cout << endl ;
@@ -704,7 +716,8 @@ void AliPHOSDigitizer::PrintDigits(Option_t * option){
   }
 }
 //__________________________________________________________________
   }
 }
 //__________________________________________________________________
-void AliPHOSDigitizer::SetSDigitsBranch(const char* title){
+void AliPHOSDigitizer::SetSDigitsBranch(const char* title)
+{
   // we set title (comment) of the SDigits branch in the first! header file
   if(!fInitialized)    Init() ;
 
   // we set title (comment) of the SDigits branch in the first! header file
   if(!fInitialized)    Init() ;
 
@@ -712,7 +725,8 @@ void AliPHOSDigitizer::SetSDigitsBranch(const char* title){
 
 }
 //__________________________________________________________________
 
 }
 //__________________________________________________________________
-void AliPHOSDigitizer::SetDigitsBranch(const char* title){
+void AliPHOSDigitizer::SetDigitsBranch(const char* title)
+{
   //Sets the title (comment) of the branch to which Digits branch
   if(!fInitialized)    Init() ;
   
   //Sets the title (comment) of the branch to which Digits branch
   if(!fInitialized)    Init() ;
   
index 0aa85a12f650ba465a335c3789da1f07c8c6c178..0bc8ebad62901a5087df8fc8bd65a9ee0b40f57c 100644 (file)
@@ -59,6 +59,7 @@ AliPHOSEmcRecPoint::AliPHOSEmcRecPoint() : AliPHOSRecPoint()
 AliPHOSEmcRecPoint::~AliPHOSEmcRecPoint()
 {
   // dtor
 AliPHOSEmcRecPoint::~AliPHOSEmcRecPoint()
 {
   // dtor
+
   if ( fEnergyList )
     delete[] fEnergyList ; 
 }
   if ( fEnergyList )
     delete[] fEnergyList ; 
 }
@@ -67,7 +68,7 @@ AliPHOSEmcRecPoint::~AliPHOSEmcRecPoint()
 void AliPHOSEmcRecPoint::AddDigit(AliPHOSDigit & digit, Float_t Energy)
 {
   // Adds a digit to the RecPoint
 void AliPHOSEmcRecPoint::AddDigit(AliPHOSDigit & digit, Float_t Energy)
 {
   // Adds a digit to the RecPoint
-  //  and accumulates the total amplitude and the multiplicity 
+  // and accumulates the total amplitude and the multiplicity 
   
   if(fEnergyList == 0)
     fEnergyList =  new Float_t[fMaxDigit]; 
   
   if(fEnergyList == 0)
     fEnergyList =  new Float_t[fMaxDigit]; 
@@ -109,7 +110,7 @@ void AliPHOSEmcRecPoint::AddDigit(AliPHOSDigit & digit, Float_t Energy)
 //____________________________________________________________________________
 Bool_t AliPHOSEmcRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 ) const
 {
 //____________________________________________________________________________
 Bool_t AliPHOSEmcRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 ) const
 {
-  // Tells if (true) or not (false) two digits are neighbors)
+  // Tells if (true) or not (false) two digits are neighbors
   
   Bool_t aren = kFALSE ;
   
   
   Bool_t aren = kFALSE ;
   
@@ -320,9 +321,9 @@ void  AliPHOSEmcRecPoint::EvalDispersion(Float_t logWeight,TClonesArray * digits
 //______________________________________________________________________________
 void AliPHOSEmcRecPoint::EvalCoreEnergy(TClonesArray * digits)
 {
 //______________________________________________________________________________
 void AliPHOSEmcRecPoint::EvalCoreEnergy(TClonesArray * digits)
 {
-  //This function calculates energy in the core, 
-  //i.e. within radius rad = 3cm. Beyond this radius
-  //in accoradnce with shower profile energy deposition 
+  // This function calculates energy in the core, 
+  // i.e. within a radius rad = 3cm around the center. Beyond this radius
+  // in accordance with shower profile the energy deposition 
   // should be less than 2%
 
   Float_t coreRadius = 3 ;
   // should be less than 2%
 
   Float_t coreRadius = 3 ;
@@ -417,6 +418,7 @@ void  AliPHOSEmcRecPoint::EvalElipsAxis(Float_t logWeight,TClonesArray * digits)
 //____________________________________________________________________________
 void AliPHOSEmcRecPoint::EvalAll(Float_t logWeight, TClonesArray * digits )
 {
 //____________________________________________________________________________
 void AliPHOSEmcRecPoint::EvalAll(Float_t logWeight, TClonesArray * digits )
 {
+  // calculates the various parameters characterizing the RecPoint 
   AliPHOSRecPoint::EvalAll(logWeight,digits) ;
   EvalLocalPosition(logWeight, digits) ;
   EvalElipsAxis(logWeight, digits) ;
   AliPHOSRecPoint::EvalAll(logWeight,digits) ;
   EvalLocalPosition(logWeight, digits) ;
   EvalElipsAxis(logWeight, digits) ;
@@ -427,7 +429,6 @@ void AliPHOSEmcRecPoint::EvalAll(Float_t logWeight, TClonesArray * digits )
 void AliPHOSEmcRecPoint::EvalLocalPosition(Float_t logWeight, TClonesArray * digits)
 {
   // Calculates the center of gravity in the local PHOS-module coordinates 
 void AliPHOSEmcRecPoint::EvalLocalPosition(Float_t logWeight, TClonesArray * digits)
 {
   // Calculates the center of gravity in the local PHOS-module coordinates 
-
   Float_t wtot = 0. ;
  
   Int_t relid[4] ;
   Float_t wtot = 0. ;
  
   Int_t relid[4] ;
@@ -527,7 +528,7 @@ Int_t  AliPHOSEmcRecPoint::GetNumberOfLocalMax(Int_t *  maxAt, Float_t * maxAtEn
                                               Float_t locMaxCut,TClonesArray * digits) const
 { 
   // Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
                                               Float_t locMaxCut,TClonesArray * digits) const
 { 
   // Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
-  //  energy difference between two local maxima
+  // energy difference between two local maxima
 
   AliPHOSDigit * digit ;
   AliPHOSDigit * digitN ;
 
   AliPHOSDigit * digit ;
   AliPHOSDigit * digitN ;
index 3dcbfcc712fafb7f8dd7bd0d8caca1c0241afd6d..177d018993b01270e00575ac20a912c5c07898f2 100644 (file)
@@ -152,11 +152,9 @@ void AliPHOSFastRecParticle::ExecuteEvent(Int_t event, Int_t px, Int_t py)
     delete clustertext ; 
     clustertext = 0 ; 
     gPad->Update() ; 
     delete clustertext ; 
     clustertext = 0 ; 
     gPad->Update() ; 
-   break ;
+    break ;
   }
   }
-  
   }
   }
-
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
@@ -213,7 +211,7 @@ void AliPHOSFastRecParticle::Paint(Option_t *)
 //____________________________________________________________________________
 void AliPHOSFastRecParticle::Print(const char * opt)
 {
 //____________________________________________________________________________
 void AliPHOSFastRecParticle::Print(const char * opt)
 {
-  // Print the typr, energy and momentum
+  // Print the type, energy and momentum of the reconstructed particle
   
   cout << "AliPHOSFastRecParticle > " << "type is  " << Name() << endl 
        << "                     " << "Energy = " << fE << endl 
   
   cout << "AliPHOSFastRecParticle > " << "type is  " << Name() << endl 
        << "                     " << "Energy = " << fE << endl 
index 65d48d617bf38bf0165609e5e3d96988f37152a2..ff4fb6f3eae35df23c5dbac56205102995bf8424 100644 (file)
@@ -44,6 +44,7 @@
 
 ClassImp(AliPHOSGeometry) ;
 
 
 ClassImp(AliPHOSGeometry) ;
 
+// these initialisations are needed for a singleton
 AliPHOSGeometry * AliPHOSGeometry::fgGeom = 0 ;
 Bool_t            AliPHOSGeometry::fgInit = kFALSE ;
 
 AliPHOSGeometry * AliPHOSGeometry::fgGeom = 0 ;
 Bool_t            AliPHOSGeometry::fgInit = kFALSE ;
 
@@ -61,10 +62,12 @@ AliPHOSGeometry::~AliPHOSGeometry(void)
 
 void AliPHOSGeometry::Init(void)
 {
 
 void AliPHOSGeometry::Init(void)
 {
-  // Initializes the PHOS parameters
+  // Initializes the PHOS parameters :
+  //  IHEP is the Protvino CPV (cathode pad chambers)
+  //  GPS2 is the Subatech Pre-Shower (two micromegas sandwiching a passive lead converter)
+  //  MIXT 4 PHOS modules withe the IHEP CPV qnd one PHOS module with the Subatche Pre-Shower
 
 
-  if ( ((strcmp( fName, "default" )) == 0) || 
-       ((strcmp( fName, "GPS2" ))    == 0) ||
+  if ( ((strcmp( fName, "GPS2" ))    == 0) ||
        ((strcmp( fName, "IHEP" ))    == 0) ||
        ((strcmp( fName, "MIXT" ))    == 0) ) {
     fgInit     = kTRUE ; 
        ((strcmp( fName, "IHEP" ))    == 0) ||
        ((strcmp( fName, "MIXT" ))    == 0) ) {
     fgInit     = kTRUE ; 
@@ -106,7 +109,10 @@ void AliPHOSGeometry::Init(void)
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-Float_t AliPHOSGeometry::GetCPVBoxSize(Int_t index)  const { 
+Float_t AliPHOSGeometry::GetCPVBoxSize(Int_t index)  const
+{
+  // returns the coarse dimension CPV depending on the CPV option set
+  
     if      (strcmp(fName,"GPS2") ==0 ) 
       return fGeometryPPSD->GetCPVBoxSize(index);
     else if (strcmp(fName,"IHEP")==0) 
     if      (strcmp(fName,"GPS2") ==0 ) 
       return fGeometryPPSD->GetCPVBoxSize(index);
     else if (strcmp(fName,"IHEP")==0) 
@@ -120,7 +126,8 @@ Float_t AliPHOSGeometry::GetCPVBoxSize(Int_t index)  const {
 //____________________________________________________________________________
 AliPHOSGeometry *  AliPHOSGeometry::GetInstance() 
 { 
 //____________________________________________________________________________
 AliPHOSGeometry *  AliPHOSGeometry::GetInstance() 
 { 
-  // Returns the pointer of the unique instance
+  // Returns the pointer of the unique instance; singleton specific
+  
   return (AliPHOSGeometry *) fgGeom ; 
 }
 
   return (AliPHOSGeometry *) fgGeom ; 
 }
 
@@ -128,6 +135,8 @@ AliPHOSGeometry *  AliPHOSGeometry::GetInstance()
 AliPHOSGeometry *  AliPHOSGeometry::GetInstance(const Text_t* name, const Text_t* title) 
 {
   // Returns the pointer of the unique instance
 AliPHOSGeometry *  AliPHOSGeometry::GetInstance(const Text_t* name, const Text_t* title) 
 {
   // Returns the pointer of the unique instance
+  // Creates it with the specified options (name, title) if it does not exist yet
+
   AliPHOSGeometry * rv = 0  ; 
   if ( fgGeom == 0 ) {
     if ( strcmp(name,"") == 0 ) 
   AliPHOSGeometry * rv = 0  ; 
   if ( fgGeom == 0 ) {
     if ( strcmp(name,"") == 0 ) 
@@ -157,7 +166,7 @@ AliPHOSGeometry *  AliPHOSGeometry::GetInstance(const Text_t* name, const Text_t
 //____________________________________________________________________________
 void AliPHOSGeometry::SetPHOSAngles() 
 { 
 //____________________________________________________________________________
 void AliPHOSGeometry::SetPHOSAngles() 
 { 
-  // Calculates the position in ALICE of the PHOS modules
+  // Calculates the position of the PHOS modules in ALICE global coordinate system
   
   Double_t const kRADDEG = 180.0 / kPI ;
   Float_t pphi =  2 * TMath::ATan( GetOuterBoxSize(0)  / ( 2.0 * GetIPtoOuterCoverDistance() ) ) ;
   
   Double_t const kRADDEG = 180.0 / kPI ;
   Float_t pphi =  2 * TMath::ATan( GetOuterBoxSize(0)  / ( 2.0 * GetIPtoOuterCoverDistance() ) ) ;
@@ -244,7 +253,7 @@ Bool_t AliPHOSGeometry::AbsToRelNumbering(const Int_t AbsId, Int_t * relid)
 //____________________________________________________________________________  
 void AliPHOSGeometry::EmcModuleCoverage(const Int_t mod, Double_t & tm, Double_t & tM, Double_t & pm, Double_t & pM, Option_t * opt) 
 {
 //____________________________________________________________________________  
 void AliPHOSGeometry::EmcModuleCoverage(const Int_t mod, Double_t & tm, Double_t & tM, Double_t & pm, Double_t & pM, Option_t * opt) 
 {
-  // calculates the angular coverage in theta and phi of a EMC module
+  // calculates the angular coverage in theta and phi of one EMC (=PHOS) module
 
  Double_t conv ; 
   if ( opt == Radian() ) 
 
  Double_t conv ; 
   if ( opt == Radian() ) 
@@ -278,7 +287,7 @@ void AliPHOSGeometry::EmcModuleCoverage(const Int_t mod, Double_t & tm, Double_t
 //____________________________________________________________________________  
 void AliPHOSGeometry::EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t * opt) 
 {
 //____________________________________________________________________________  
 void AliPHOSGeometry::EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t * opt) 
 {
-  // calculates the angular coverage in theta and phi of a single crystal in a EMC module
+  // calculates the angular coverage in theta and phi of a single crystal in a EMC(=PHOS) module
 
   Double_t conv ; 
   if ( opt == Radian() ) 
 
   Double_t conv ; 
   if ( opt == Radian() ) 
@@ -300,7 +309,7 @@ void AliPHOSGeometry::EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t
 //____________________________________________________________________________
 void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrix & gmat) const
 {
 //____________________________________________________________________________
 void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrix & gmat) const
 {
-  // Calculates the ALICE global coordinates of a RecPoint and the error matrix
+  // Calculates the coordinates of a RecPoint and the error matrix in the ALICE global coordinate system
  
   AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ;  
   TVector3 localposition ;
  
   AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ;  
   TVector3 localposition ;
@@ -341,7 +350,7 @@ void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TM
 //____________________________________________________________________________
 void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) const 
 {
 //____________________________________________________________________________
 void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) const 
 {
-  // Calculates the ALICE global coordinates of a RecPoint 
+  // Calculates the coordinates of a RecPoint in the ALICE global coordinate system 
 
   AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ;  
   TVector3 localposition ;
 
   AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ;  
   TVector3 localposition ;
@@ -379,8 +388,8 @@ void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) co
 //____________________________________________________________________________
 void AliPHOSGeometry::ImpactOnEmc(const Double_t theta, const Double_t phi, Int_t & ModuleNumber, Double_t & z, Double_t & x) 
 {
 //____________________________________________________________________________
 void AliPHOSGeometry::ImpactOnEmc(const Double_t theta, const Double_t phi, Int_t & ModuleNumber, Double_t & z, Double_t & x) 
 {
-  // calculates the impact coordinates of a neutral particle  
-  // emitted in direction theta and phi in ALICE
+  // calculates the impact coordinates on PHOS of a neutral particle  
+  // emitted in the direction theta and phi in the ALICE global coordinate system
 
   // searches for the PHOS EMC module
   ModuleNumber = 0 ; 
 
   // searches for the PHOS EMC module
   ModuleNumber = 0 ; 
@@ -460,7 +469,7 @@ Bool_t AliPHOSGeometry::RelToAbsNumbering(const Int_t * relid, Int_t &  AbsId)
 
 void AliPHOSGeometry::RelPosInAlice(const Int_t id, TVector3 & pos ) 
 {
 
 void AliPHOSGeometry::RelPosInAlice(const Int_t id, TVector3 & pos ) 
 {
-  // Converts the absolute numbering into the global ALICE coordinates
+  // Converts the absolute numbering into the global ALICE coordinate system
   // It works only for the GPS2 geometry
   
   if (id > 0 && strcmp(fName,"GPS2")==0) { 
   // It works only for the GPS2 geometry
   
   if (id > 0 && strcmp(fName,"GPS2")==0) { 
index 92ecb814de042109a7308b0ae7d09ee67297c49a..a2aa47ec8dcd8fb769bc33bcc27500ad2e83d07f 100644 (file)
 /* $Id:  */
 
 //_________________________________________________________________________
 /* $Id:  */
 
 //_________________________________________________________________________
-//  A singleton. This class should be used on the analysiz stage to get 
+//  A singleton. This class should be used in the analysis stage to get 
 //  reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles,
 //  reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles,
-//  instead of direct reading them from galice.root file. This container 
-//  ensures, that one reads Digits, made of these particular digits RecPoints, 
-//  made of these particlar RecPoints TrackSegments and RecParticles, what is
-//  not trivial if there are several identical branches, but produced with
+//  instead of directly reading them from galice.root file. This container 
+//  ensures, that one reads Digits, made of these particular digits, RecPoints, 
+//  made of these particular RecPoints, TrackSegments and RecParticles. 
+//  This becomes non trivial if there are several identical branches, produced with
 //  different set of parameters. 
 //
 //  different set of parameters. 
 //
-//  An example of use (see as well class AliPHOSAnalyser):
+//  An example of how to use (see also class AliPHOSAnalyser):
 //  AliPHOSIndexToObject * please = AliPHOSIndexToObject::GetInstance("galice.root","RecParticles","") ;
 //  for(Int_t irecp = 0; irecp < please->GimeNRecParticles() ; irecp++)
 //     AliPHOSRecParticle * part = please->GimeRecParticle(1) ;
 //  AliPHOSIndexToObject * please = AliPHOSIndexToObject::GetInstance("galice.root","RecParticles","") ;
 //  for(Int_t irecp = 0; irecp < please->GimeNRecParticles() ; irecp++)
 //     AliPHOSRecParticle * part = please->GimeRecParticle(1) ;
@@ -67,7 +67,7 @@ ClassImp(AliPHOSIndexToObject)
 //____________________________________________________________________________ 
 AliPHOSIndexToObject::AliPHOSIndexToObject(const char* headerFile,const char* branch,const char* branchTitle )
 {
 //____________________________________________________________________________ 
 AliPHOSIndexToObject::AliPHOSIndexToObject(const char* headerFile,const char* branch,const char* branchTitle )
 {
-  //Initiate all lists
+  //Initialize  all lists
   fEvent = 0 ;
 
   fSDigits = new TClonesArray("AliPHOSDigit",100) ;
   fEvent = 0 ;
 
   fSDigits = new TClonesArray("AliPHOSDigit",100) ;
@@ -106,11 +106,12 @@ AliPHOSIndexToObject::AliPHOSIndexToObject(const char* headerFile,const char* br
 
 }
 //____________________________________________________________________________ 
 
 }
 //____________________________________________________________________________ 
-void AliPHOSIndexToObject:: DefineBranchTitles(const char* startBranch,const char* branchTitle){
-
+void AliPHOSIndexToObject:: DefineBranchTitles(const char* startBranch,const char* branchTitle)
+{
+  // Points to the branches of all reconstructed objects with the specified names
   gAlice->GetEvent(0) ;
   gAlice->GetEvent(0) ;
-  //Read all reconstruction classes to extract titles of 
-  //branches, constituing "reconstruction branch"
+  // Read all reconstruction classes to extract titles of 
+  // branches, constituing "reconstruction branch"
   AliPHOSPID * pids[50];  // here AliPHOSPID's will be stored
   Int_t ipids = 0 ;
   AliPHOSTrackSegmentMaker * tsms[50] ; 
   AliPHOSPID * pids[50];  // here AliPHOSPID's will be stored
   Int_t ipids = 0 ;
   AliPHOSTrackSegmentMaker * tsms[50] ; 
@@ -171,8 +172,8 @@ void AliPHOSIndexToObject:: DefineBranchTitles(const char* startBranch,const cha
   }
   gAlice->TreeS()->GetEvent(0) ;
 
   }
   gAlice->TreeS()->GetEvent(0) ;
 
-  //now choose among read Reconstruction classes those,
-  //which constituite "reconstruction branch"
+  // now choose among read Reconstruction classes those,
+  // which constituite "reconstruction branch"
   Bool_t pidDefined = kFALSE ;
   Bool_t tsmDefined = kFALSE ;
   Bool_t cluDefined = kFALSE ;
   Bool_t pidDefined = kFALSE ;
   Bool_t tsmDefined = kFALSE ;
   Bool_t cluDefined = kFALSE ;
@@ -180,7 +181,7 @@ void AliPHOSIndexToObject:: DefineBranchTitles(const char* startBranch,const cha
   Bool_t sdigDefined = kFALSE ;
 
   Int_t index ;
   Bool_t sdigDefined = kFALSE ;
 
   Int_t index ;
-  //First, go from the end (RecParticles) to the beginning(SDigits)
+  // First, go from the end (RecParticles) to the beginning(SDigits)
   if((strcmp(startBranch,"PHOSRP") == 0)||(strcmp(startBranch,"AliPHOSPID") == 0)){
     fRPTitle = branchTitle ;
     for(index = 0; index < ipids ; index++){
   if((strcmp(startBranch,"PHOSRP") == 0)||(strcmp(startBranch,"AliPHOSPID") == 0)){
     fRPTitle = branchTitle ;
     for(index = 0; index < ipids ; index++){
@@ -228,8 +229,8 @@ void AliPHOSIndexToObject:: DefineBranchTitles(const char* startBranch,const cha
     cout << endl ;
   }
 
     cout << endl ;
   }
 
-  //Now we go in the inverse direction: from sdigits to recparticles - for the 
-  //case, if we started decending not from RecParticles, but e.g. from digits
+  // Now we go in the inverse direction: from sdigits to recparticles - for the 
+  // case, if we started decending not from RecParticles, but e.g. from digits
 
   if( !cluDefined ) {
     for(index = 0; index < iclus ; index++)
 
   if( !cluDefined ) {
     for(index = 0; index < iclus ; index++)
@@ -314,7 +315,7 @@ AliPHOSIndexToObject * AliPHOSIndexToObject::GetInstance(const char* headerFile,
 //____________________________________________________________________________ 
 TParticle * AliPHOSIndexToObject::GimePrimary(Int_t index)
 {
 //____________________________________________________________________________ 
 TParticle * AliPHOSIndexToObject::GimePrimary(Int_t index)
 {
-  
+  // retrieves the primary particle indexed by index  
   if(index < 0) 
     return 0 ;
   
   if(index < 0) 
     return 0 ;
   
@@ -376,8 +377,9 @@ void AliPHOSIndexToObject::ReadTreeD(){
   
 }
 //____________________________________________________________________________ 
   
 }
 //____________________________________________________________________________ 
-void AliPHOSIndexToObject::ReadTreeS(){
-  
+void AliPHOSIndexToObject::ReadTreeS()
+{
+  // Reads the contents of SDigits  
   if(gAlice->TreeS()== 0){
     cout <<   "AliPHOSIndexToObject: can not read TreeS " << endl ;
     return ;
   if(gAlice->TreeS()== 0){
     cout <<   "AliPHOSIndexToObject: can not read TreeS " << endl ;
     return ;
@@ -420,7 +422,9 @@ void AliPHOSIndexToObject::ReadTreeS(){
   
 }
 //____________________________________________________________________________ 
   
 }
 //____________________________________________________________________________ 
-void AliPHOSIndexToObject::ReadTreeR(){
+void AliPHOSIndexToObject::ReadTreeR()
+{
+  // Reads the contents of reconstruction Tree
   
   if(gAlice->TreeR()== 0){
     cout <<   "AliPHOSIndexToObject: can not read TreeR " << endl ;
   
   if(gAlice->TreeR()== 0){
     cout <<   "AliPHOSIndexToObject: can not read TreeR " << endl ;
@@ -522,8 +526,9 @@ void AliPHOSIndexToObject::ReadTreeR(){
 
 }
 //____________________________________________________________________________ 
 
 }
 //____________________________________________________________________________ 
-void AliPHOSIndexToObject::ReadPrimaries(){
-  //read specific branches of primaries
+void AliPHOSIndexToObject::ReadPrimaries()
+{
+  // Reads specific branches of primaries
   
   fNPrimaries = gAlice->GetNtrack();
   
   
   fNPrimaries = gAlice->GetNtrack();
   
@@ -597,7 +602,9 @@ void AliPHOSIndexToObject::ReadPrimaries(){
   return ;
 }
 //____________________________________________________________________________ 
   return ;
 }
 //____________________________________________________________________________ 
-void AliPHOSIndexToObject::GetEvent(Int_t event){
+void AliPHOSIndexToObject::GetEvent(Int_t event)
+{
+  // Reads the content of all Tree's S, D and R
   if(event == fEvent) // do nothing
     return ;
     
   if(event == fEvent) // do nothing
     return ;
     
index f8d83cc2ba676143e95dbc268f62ddd0c1026118..b0b73aad4564b1b4645a194a207aa0ff175d1f55 100644 (file)
@@ -45,7 +45,6 @@ ClassImp(AliPHOSPID)
   AliPHOSPID::AliPHOSPID():TTask()
 {
   // ctor
   AliPHOSPID::AliPHOSPID():TTask()
 {
   // ctor
-
 }
 //____________________________________________________________________________
 AliPHOSPID::AliPHOSPID(const char* header,const char * branch ):TTask()
 }
 //____________________________________________________________________________
 AliPHOSPID::AliPHOSPID(const char* header,const char * branch ):TTask()
@@ -55,10 +54,6 @@ AliPHOSPID::AliPHOSPID(const char* header,const char * branch ):TTask()
   abort() ;
 
 }
   abort() ;
 
 }
-
-
-
-
 //____________________________________________________________________________
 AliPHOSPID::~AliPHOSPID()
 {
 //____________________________________________________________________________
 AliPHOSPID::~AliPHOSPID()
 {
index 1dfdea8d373cb9224e594748eba94df4f45d46ec..197a481f550038ec03c649b93400312c32182c5c 100644 (file)
 // Implementation version v1 of the PHOS particle identifier 
 // Particle identification based on the 
 //     - CPV information, 
 // Implementation version v1 of the PHOS particle identifier 
 // Particle identification based on the 
 //     - CPV information, 
-//     - Preshower information (in MIX or GPS2 geometries)
+//     - Preshower information (in MIXT or GPS2 geometries)
 //     - shower width.
 //     - shower width.
-
-// CPV or Preshower cluster should be clother in PHOS plane than fCpvEmcDistance (in cm).
-// This variable can be set by method SetCpvtoEmcDistanceCut(Float_t cut)  
+//
+// CPV or Preshower clusters should be closer in PHOS plane than fCpvEmcDistance (in cm).
+// This parameter can be set by method SetCpvtoEmcDistanceCut(Float_t cut)  
 //
 // One can set desirable ID method by the function SetIdentificationMethod(option).
 //
 // One can set desirable ID method by the function SetIdentificationMethod(option).
-// Now the following options can be used together or separately :
+// Presently the following options can be used together or separately :
 //     - "disp": use dispersion cut on shower width 
 //               (width can be set by method SetDispersionCut(Float_t cut)
 //     - "disp": use dispersion cut on shower width 
 //               (width can be set by method SetDispersionCut(Float_t cut)
-//     - "ell" : use cut on the axis of the ellipse, drown around shower 
+//     - "ell" : use cut on the axis of the ellipse, drawn around shower 
 //       (this cut can be changed by SetShowerProfileCut(char* formula), 
 //        where formula - any function of two variables f(lambda[0],lambda[1]).
 //        Shower is considered as EM if f() > 0 )
 // One can visualize current cuts calling method PlotDispersionCuts().    
 //
 //       (this cut can be changed by SetShowerProfileCut(char* formula), 
 //        where formula - any function of two variables f(lambda[0],lambda[1]).
 //        Shower is considered as EM if f() > 0 )
 // One can visualize current cuts calling method PlotDispersionCuts().    
 //
-// usercase:
-// root [0] AliPHOSPIDv1 * p1 = new AliPHOSPIDv1("galice.root")
-// Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
-// root [1] p1->SetIdentificationMethod("disp ellipse")
-// root [2] p1->ExecuteTask()
-// root [3] AliPHOSPIDv1 * p2 = new AliPHOSPIDv1("galice1.root","ts1")
-// Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
+// use case:
+//  root [0] AliPHOSPIDv1 * p1 = new AliPHOSPIDv1("galice.root")
+//  Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
+//  root [1] p1->SetIdentificationMethod("disp ellipse")
+//  root [2] p1->ExecuteTask()
+//  root [3] AliPHOSPIDv1 * p2 = new AliPHOSPIDv1("galice1.root","ts1")
+//  Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
 //                // reading headers from file galice1.root and TrackSegments 
 //                // with title "ts1"
 //                // reading headers from file galice1.root and TrackSegments 
 //                // with title "ts1"
-// root [4] p2->SetRecParticlesBranch("rp1")
+//  root [4] p2->SetRecParticlesBranch("rp1")
 //                // set file name for the branch RecParticles
 //                // set file name for the branch RecParticles
-// root [5] p2->ExecuteTask("deb all time")
+//  root [5] p2->ExecuteTask("deb all time")
 //                // available options
 //                // "deb" - prints # of reconstructed particles
 //                // "deb all" -  prints # and list of RecParticles
 //                // available options
 //                // "deb" - prints # of reconstructed particles
 //                // "deb all" -  prints # and list of RecParticles
@@ -87,13 +87,14 @@ ClassImp( AliPHOSPIDv1)
 //____________________________________________________________________________
 AliPHOSPIDv1::AliPHOSPIDv1():AliPHOSPID()
 { 
 //____________________________________________________________________________
 AliPHOSPIDv1::AliPHOSPIDv1():AliPHOSPID()
 { 
+  // default ctor
   fIsInitialized = kFALSE ;
 }
 
 //____________________________________________________________________________
 AliPHOSPIDv1::AliPHOSPIDv1(const char * headeFile,const char * tsBranchTitle):AliPHOSPID()
 { 
   fIsInitialized = kFALSE ;
 }
 
 //____________________________________________________________________________
 AliPHOSPIDv1::AliPHOSPIDv1(const char * headeFile,const char * tsBranchTitle):AliPHOSPID()
 { 
-  
+  //ctor with the indication on where to look for the track segments
   fHeaderFileName = headeFile ;
 
   fTSTitle = tsBranchTitle ;
   fHeaderFileName = headeFile ;
 
   fTSTitle = tsBranchTitle ;
@@ -135,12 +136,12 @@ AliPHOSPIDv1::AliPHOSPIDv1(const char * headeFile,const char * tsBranchTitle):Al
 //____________________________________________________________________________
 AliPHOSPIDv1::~AliPHOSPIDv1()
 { 
 //____________________________________________________________________________
 AliPHOSPIDv1::~AliPHOSPIDv1()
 { 
-
+  //dtor 
 }
 //____________________________________________________________________________
 void AliPHOSPIDv1::Init()
 {
 }
 //____________________________________________________________________________
 void AliPHOSPIDv1::Init()
 {
-  // Make all memory allocationa not possible in default constructor
+  // Make all memory allocations that are not possible in default constructor
   if(!fIsInitialized){
     if(fHeaderFileName.IsNull())
       fHeaderFileName = "galice.root" ;
   if(!fIsInitialized){
     if(fHeaderFileName.IsNull())
       fHeaderFileName = "galice.root" ;
@@ -178,7 +179,7 @@ void AliPHOSPIDv1::Init()
 Bool_t AliPHOSPIDv1::ReadTrackSegments()
 {
   // Reads TrackSegments an extracts the title of the RecPoints 
 Bool_t AliPHOSPIDv1::ReadTrackSegments()
 {
   // Reads TrackSegments an extracts the title of the RecPoints 
-  // branch from which TS were made.
+  // branch from which TS were made of.
   // Then reads both TrackSegments and RecPoints.
 
   //Fist read Track Segment Branch and extract RecPointsBranch from fTSMaker
   // Then reads both TrackSegments and RecPoints.
 
   //Fist read Track Segment Branch and extract RecPointsBranch from fTSMaker
@@ -440,7 +441,8 @@ void  AliPHOSPIDv1:: Print(Option_t * option) const
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-void  AliPHOSPIDv1::SetShowerProfileCut(char * formula){
+void  AliPHOSPIDv1::SetShowerProfileCut(char * formula)
+{
   //set shape of the cut on the axis of ellipce, drown around shouer
   //shower considered "narrow" if Formula(lambda[0],lambda[1]) > 0.
   if(fFormula) 
   //set shape of the cut on the axis of ellipce, drown around shouer
   //shower considered "narrow" if Formula(lambda[0],lambda[1]) > 0.
   if(fFormula) 
@@ -528,7 +530,8 @@ void  AliPHOSPIDv1::WriteRecParticles()
 //____________________________________________________________________________
 void  AliPHOSPIDv1::PlotDispersionCuts()const
 {
 //____________________________________________________________________________
 void  AliPHOSPIDv1::PlotDispersionCuts()const
 {
-  TCanvas*  lambdas = new TCanvas("lambdas","Cuts on the elipse axise",200,10,700,500);
+  // produces a plot of the dispersion cut
+  TCanvas*  lambdas = new TCanvas("lambdas","Cuts on the ellipse axis",200,10,700,500);
   
   if(fIDOptions.Contains("ell",TString::kIgnoreCase ) ){
     TF2 * ell = new TF2("Elliptic Cuts",fFormula->GetName(),0,3,0,3) ;
   
   if(fIDOptions.Contains("ell",TString::kIgnoreCase ) ){
     TF2 * ell = new TF2("Elliptic Cuts",fFormula->GetName(),0,3,0,3) ;
@@ -576,7 +579,7 @@ TVector3 AliPHOSPIDv1::GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRec
   emc->GetGlobalPosition(emcglobalpos, dummy) ;
   
  
   emc->GetGlobalPosition(emcglobalpos, dummy) ;
   
  
-  // The following commeneted code becomes valid once the PPSD provides 
+  // The following commented code becomes valid once the PPSD provides 
   // a reasonable position resolution, at least as good as EMC ! 
   //   TVector3 ppsdlglobalpos ;
   //   TVector3 ppsduglobalpos ;
   // a reasonable position resolution, at least as good as EMC ! 
   //   TVector3 ppsdlglobalpos ;
   //   TVector3 ppsduglobalpos ;
@@ -605,8 +608,9 @@ TVector3 AliPHOSPIDv1::GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRec
   return dir ;  
 }
 //____________________________________________________________________________
   return dir ;  
 }
 //____________________________________________________________________________
-void AliPHOSPIDv1::PrintRecParticles(Option_t * option){
-
+void AliPHOSPIDv1::PrintRecParticles(Option_t * option)
+{
+  // Prints the list of reconstructed particles
   cout << "AliPHOSPIDv1: " << endl ;
   cout << "       found " << fRecParticles->GetEntriesFast() << " RecParticles " << endl ;
 
   cout << "AliPHOSPIDv1: " << endl ;
   cout << "       found " << fRecParticles->GetEntriesFast() << " RecParticles " << endl ;
 
index efbfd1290f1789b6b10f4b809bd0db9f3960e466..4c8bcf3dab7393f1a276b0c614c5fa1b55947435 100644 (file)
@@ -169,7 +169,9 @@ Int_t AliPHOSPpsdRecPoint::Compare(const TObject * obj) const
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-void AliPHOSPpsdRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits ){
+void AliPHOSPpsdRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits )
+{
+  // calculates all the characteristics of the RecPoint
   AliPHOSRecPoint::EvalAll(logWeight,digits) ;
   EvalLocalPosition(logWeight,digits) ;
   EvalUp(digits) ;
   AliPHOSRecPoint::EvalAll(logWeight,digits) ;
   EvalLocalPosition(logWeight,digits) ;
   EvalUp(digits) ;
@@ -178,7 +180,7 @@ void AliPHOSPpsdRecPoint::EvalAll(Float_t logWeight,TClonesArray * digits ){
 //____________________________________________________________________________
 void AliPHOSPpsdRecPoint::EvalLocalPosition(Float_t logWeight,TClonesArray * digits )
 {
 //____________________________________________________________________________
 void AliPHOSPpsdRecPoint::EvalLocalPosition(Float_t logWeight,TClonesArray * digits )
 {
-  // Calculates the local position in the PHOS-PPSD-module corrdinates
+  // Calculates the local position in the PHOS-PPSD-module coordinates
   
   Int_t relid[4] ;
 
   
   Int_t relid[4] ;
 
index 4ad362dc5a2c2349154308a694119b49c701ec18..e05530f31f66afefa1041118660c056fcdc86456 100644 (file)
 //_________________________________________________________________________
 //*--
 //*-- Author: Gines Martinez & Yves Schutz (SUBATECH) 
 //_________________________________________________________________________
 //*--
 //*-- Author: Gines Martinez & Yves Schutz (SUBATECH) 
-//*-- Complitely redisigned by Dmitri Peressounko (SUBATECH & RRC KI) March 2001
+//*-- Compleetely redisigned by Dmitri Peressounko (SUBATECH & RRC KI) March 2001
 /////////////////////////////////////////////////////////////////////////////////////
 //  Wrapping class for reconstruction. Allows to produce reconstruction from 
 //  different steps: from previously produced hits,sdigits, etc. Each new reconstruction
 /////////////////////////////////////////////////////////////////////////////////////
 //  Wrapping class for reconstruction. Allows to produce reconstruction from 
 //  different steps: from previously produced hits,sdigits, etc. Each new reconstruction
-//  flow (e.g. gigits, made from them RecPoints, made from them TrackSegments, made from 
-//  them RecParticles) are distinguished by the title of created branches. One can 
-//  use this title as a comment, see user case below. Thanks to getters, one can set 
-//  parameters to reconstruction bricks. The full set of parameters is saved in the 
-//  correspoinding branch: e.g. parameters of clusterizer are stored in branch 
-//  TreeR::AliPHOSClusterizer with the same title as the branch contaning RecPoints 
-//  themself. TTree does not support overwriting, therefore one can not produce several 
+//  flow (e.g. digits, made from them RecPoints, subsequently made TrackSegments, 
+//  subsequently made RecParticles) are distinguished by the title of created branches. One can 
+//  use this title as a comment, see use case below. 
+//  Thanks to getters, one can set 
+//  parameters to reconstruction briks. The full set of parameters is saved in the 
+//  corresponding branch: e.g. parameters of clusterizer are stored in branch 
+//  TreeR::AliPHOSClusterizer with the same title as the branch containing the RecPoints. 
+//  TTree does not support overwriting, therefore one can not produce several 
 //  branches with the same names and titles - use different titles.
 //
 //  branches with the same names and titles - use different titles.
 //
-//  User case: 
+//  Use case: 
 //
 //  root [0] AliPHOSReconstructioner * r = new AliPHOSReconstructioner("galice.root")
 //              //  Set the header file
 //  root [1] r->ExecuteTask() 
 //
 //  root [0] AliPHOSReconstructioner * r = new AliPHOSReconstructioner("galice.root")
 //              //  Set the header file
 //  root [1] r->ExecuteTask() 
-//              //  Make full cheine of reconstruction
+//              //  Make full chain of reconstruction
 //
 //              // One can specify the title for each branch 
 //  root [2] r->SetBranchFileName("RecPoints","RecPoints1") ;
 //
 //              // One can specify the title for each branch 
 //  root [2] r->SetBranchFileName("RecPoints","RecPoints1") ;
@@ -128,7 +129,8 @@ AliPHOSReconstructioner::AliPHOSReconstructioner(const char* headerFile):TTask("
   
 } 
 //____________________________________________________________________________
   
 } 
 //____________________________________________________________________________
-void AliPHOSReconstructioner::Exec(Option_t *option){
+void AliPHOSReconstructioner::Exec(Option_t *option)
+{
   //chesk, if the names of branches, which should be made conicide with already
   //existing
   if(!fIsInitialized)
   //chesk, if the names of branches, which should be made conicide with already
   //existing
   if(!fIsInitialized)
@@ -353,7 +355,7 @@ void AliPHOSReconstructioner::Exec(Option_t *option){
 //____________________________________________________________________________
  void AliPHOSReconstructioner::Init()
 {
 //____________________________________________________________________________
  void AliPHOSReconstructioner::Init()
 {
-  //initiase Reconstructioner if necessary: we can not do this in default constructor
+  // initiliaze Reconstructioner if necessary: we can not do this in default constructor
 
   if(!fIsInitialized){
     // Initialisation
 
   if(!fIsInitialized){
     // Initialisation
@@ -385,7 +387,7 @@ void AliPHOSReconstructioner::Exec(Option_t *option){
 //____________________________________________________________________________
 AliPHOSReconstructioner::~AliPHOSReconstructioner()
 {
 //____________________________________________________________________________
 AliPHOSReconstructioner::~AliPHOSReconstructioner()
 {
-  
+  // dtor  
   if(fSDigitizer)
     delete fSDigitizer ;
   
   if(fSDigitizer)
     delete fSDigitizer ;
   
@@ -444,10 +446,11 @@ void AliPHOSReconstructioner::SetBranchTitle(const char* branch, const char * ti
   
 }
 //____________________________________________________________________________
   
 }
 //____________________________________________________________________________
-void AliPHOSReconstructioner::StartFrom(char * module,char* title){
+void AliPHOSReconstructioner::StartFrom(char * module,char* title)
+{
   // in the next pass of reconstruction (call ExecuteTask()) reconstruction will 
   // in the next pass of reconstruction (call ExecuteTask()) reconstruction will 
-  // start from the module "module", and in the case of nonsero title all 
-  // pruduced branches will have title "title". Recognize the following "modules"
+  // start from the module "module", and in the case of non zero title all 
+  // pruduced branches will have title "title". The following "modules" are recognized
   // "SD" - AliPHOSSDigitizer,
   // "D"  - AliPHOSDigitizer
   // "C"  - AliPHOSClusterizer
   // "SD" - AliPHOSSDigitizer,
   // "D"  - AliPHOSDigitizer
   // "C"  - AliPHOSClusterizer
@@ -518,8 +521,9 @@ void AliPHOSReconstructioner::StartFrom(char * module,char* title){
   delete moduleName;
 }
 //____________________________________________________________________________
   delete moduleName;
 }
 //____________________________________________________________________________
-void AliPHOSReconstructioner::Print(Option_t * option)const {
-  
+void AliPHOSReconstructioner::Print(Option_t * option)const 
+{
+  // Print the parameters of the reconstructioner  
   cout << "-----------------AliPHOSReconstructioner---------------" << endl ;
   cout << " Reconstruction of the header file " <<fHeaderFileName.Data() << endl ;
   cout << " with the following modules: " << endl ;
   cout << "-----------------AliPHOSReconstructioner---------------" << endl ;
   cout << " Reconstruction of the header file " <<fHeaderFileName.Data() << endl ;
   cout << " with the following modules: " << endl ;
index 7e5091298fde6e1bcab9a8252c131dde6d36ee93..e2d13ead974347df3d9bac177f8de60389dae4fb 100644 (file)
 // another set of SDigits with different parameters. Two versions
 // can be distunguished using titles of the branches.
 // User case:
 // another set of SDigits with different parameters. Two versions
 // can be distunguished using titles of the branches.
 // User case:
-// root [0] AliPHOSSDigitizer * s = new AliPHOSSDigitizer("galice.root")
-// Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
-// root [1] s->ExecuteTask()
+//  root [0] AliPHOSSDigitizer * s = new AliPHOSSDigitizer("galice.root")
+//  Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
+//  root [1] s->ExecuteTask()
 //             // Makes SDigitis for all events stored in galice.root
 //             // Makes SDigitis for all events stored in galice.root
-// root [2] s->SetPedestalParameter(0.001)
+//  root [2] s->SetPedestalParameter(0.001)
 //             // One can change parameters of digitization
 //             // One can change parameters of digitization
-// root [3] s->SetSDigitsBranch("Redestal 0.001")
+//  root [3] s->SetSDigitsBranch("Redestal 0.001")
 //             // and write them into the new branch
 //             // and write them into the new branch
-// root [4] s->ExeciteTask("deb all tim")
+//  root [4] s->ExeciteTask("deb all tim")
 //             // available parameters:
 //             deb - print # of produced SDigitis
 //             deb all  - print # and list of produced SDigits
 //             // available parameters:
 //             deb - print # of produced SDigitis
 //             deb all  - print # and list of produced SDigits
@@ -121,8 +121,9 @@ AliPHOSSDigitizer::~AliPHOSSDigitizer()
     delete fHits ;
 }
 //____________________________________________________________________________ 
     delete fHits ;
 }
 //____________________________________________________________________________ 
-void AliPHOSSDigitizer::Init(){
-  //Initialization can not be done in the default constructor
+void AliPHOSSDigitizer::Init()
+{
+  // Initialization can not be done in the default constructor
 
   if(!fIsInitialized){
 
 
   if(!fIsInitialized){
 
@@ -148,8 +149,9 @@ void AliPHOSSDigitizer::Init(){
   }
 }
 //____________________________________________________________________________
   }
 }
 //____________________________________________________________________________
-void AliPHOSSDigitizer::Exec(Option_t *option) { 
-  //Collects all hits in the same active volume into digit
+void AliPHOSSDigitizer::Exec(Option_t *option) 
+{ 
+  // Collects all hits in the same active volume into digit
   
   if(!fIsInitialized)
     Init() ;
   
   if(!fIsInitialized)
     Init() ;
@@ -312,14 +314,17 @@ void AliPHOSSDigitizer::Exec(Option_t *option) {
   
 }
 //__________________________________________________________________
   
 }
 //__________________________________________________________________
-void AliPHOSSDigitizer::SetSDigitsBranch(const char * title ){
-  //Seting title to branch SDigits 
+void AliPHOSSDigitizer::SetSDigitsBranch(const char * title )
+{
+  // Setting title to branch SDigits 
   if(!fSDigitsTitle.IsNull())
     cout << "AliPHOSSdigitizer: changing SDigits file from " <<fSDigitsTitle.Data() << " to " << title << endl ;
   fSDigitsTitle=title ;
 }
 //__________________________________________________________________
   if(!fSDigitsTitle.IsNull())
     cout << "AliPHOSSdigitizer: changing SDigits file from " <<fSDigitsTitle.Data() << " to " << title << endl ;
   fSDigitsTitle=title ;
 }
 //__________________________________________________________________
-void AliPHOSSDigitizer::Print(Option_t* option)const{
+void AliPHOSSDigitizer::Print(Option_t* option)const
+{
+  // Prints parameters of SDigitizer
   cout << "------------------- "<< GetName() << " -------------" << endl ;
   cout << "   Writing SDigitis to branch with title  " << fSDigitsTitle.Data() << endl ;
   cout << "   with digitization parameters  A = " << fA << endl ;
   cout << "------------------- "<< GetName() << " -------------" << endl ;
   cout << "   Writing SDigitis to branch with title  " << fSDigitsTitle.Data() << endl ;
   cout << "   with digitization parameters  A = " << fA << endl ;
@@ -329,15 +334,18 @@ void AliPHOSSDigitizer::Print(Option_t* option)const{
   
 }
 //__________________________________________________________________
   
 }
 //__________________________________________________________________
-Bool_t AliPHOSSDigitizer::operator==( AliPHOSSDigitizer const &sd )const{
+Bool_t AliPHOSSDigitizer::operator==( AliPHOSSDigitizer const &sd )const
+{
+  // SDigitizer are identical if the same threshold is in use
   if( (fA==sd.fA)&&(fB==sd.fB)&&(fPrimThreshold==sd.fPrimThreshold))
     return kTRUE ;
   else
     return kFALSE ;
 }
 //__________________________________________________________________
   if( (fA==sd.fA)&&(fB==sd.fB)&&(fPrimThreshold==sd.fPrimThreshold))
     return kTRUE ;
   else
     return kFALSE ;
 }
 //__________________________________________________________________
-void AliPHOSSDigitizer::PrintSDigits(Option_t * option){
-  //Prints list of digits produced at the current pass of AliPHOSDigitizer
+void AliPHOSSDigitizer::PrintSDigits(Option_t * option)
+{
+  // Prints list of digits produced in the current pass of AliPHOSDigitizer
   
   cout << "AliPHOSSDigitizer: " << endl ;
   cout << "       Number of entries in SDigits list  " << fSDigits->GetEntriesFast() << endl ;
   
   cout << "AliPHOSSDigitizer: " << endl ;
   cout << "       Number of entries in SDigits list  " << fSDigits->GetEntriesFast() << endl ;
index 34a900189f1c875e70ddd3f6110fdd205dbe2104..70e15e7a998c255891a21acdec66245290c72b2b 100644 (file)
@@ -44,7 +44,5 @@ ClassImp( AliPHOSTrackSegmentMaker)
 //____________________________________________________________________________
 AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(char * header,char * branch): TTask("AliPHOSTrackSegmentMaker","")
 {
 //____________________________________________________________________________
 AliPHOSTrackSegmentMaker::AliPHOSTrackSegmentMaker(char * header,char * branch): TTask("AliPHOSTrackSegmentMaker","")
 {
-
-
 }
 
 }
 
index a2cab4beccc3c68c8a7b55bc173d64e685f69f12..a43d19f977ef38da5f1f43ff0c259439749c488b 100644 (file)
 // Implementation version 1 of algorithm class to construct PHOS track segments
 // Track segment for PHOS is list of 
 //        EMC RecPoint + (possibly) CPV RecPoint + (possibly) PPSD RecPoint
 // Implementation version 1 of algorithm class to construct PHOS track segments
 // Track segment for PHOS is list of 
 //        EMC RecPoint + (possibly) CPV RecPoint + (possibly) PPSD RecPoint
-// To find TrackSegments we do the following: for each EMC RecPoints we look at
-// CPV/PPSD RecPoints in the radious fR0. If there is such a CPV RecPoint, 
-// we make "Link" it is just indexes of EMC and CPV/PPSD RecPoint and distance
-// between them in the PHOS plane. Then we sort "Links" and starting from the 
-// least "Link" pointing to the unassined EMC and CPV RecPoints assing them to 
-// new TrackSegment. If there is no CPV/PPSD RecPoint we make TrackSegment 
-// consisting from EMC along. There is no TrackSegments without EMC RecPoint.
+// To find TrackSegments we do the following: 
+//  for each EMC RecPoints we look at
+//   CPV/PPSD RecPoints in the radious fR0. 
+//  If there is such a CPV RecPoint, 
+//   we make "Link" it is just indexes of EMC and CPV/PPSD RecPoint and distance
+//   between them in the PHOS plane. 
+//  Then we sort "Links" and starting from the 
+//   least "Link" pointing to the unassined EMC and CPV RecPoints assing them to 
+//   new TrackSegment. 
+// If there is no CPV/PPSD RecPoint we make TrackSegment 
+// consisting from EMC alone. There is no TrackSegments without EMC RecPoint.
 //
 // In principle this class should be called from AliPHOSReconstructioner, but 
 //
 // In principle this class should be called from AliPHOSReconstructioner, but 
-// one can use it as well in standalong mode.
-// User case:
-// root [0] AliPHOSTrackSegmentMakerv1 * t = new AliPHOSTrackSegmentMaker("galice.root")
-// Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
-// root [1] t->ExecuteTask()
-// root [2] t->SetMaxEmcPpsdDistance(5)
-// root [3] t->SetTrackSegmentsBranch("max distance 5 cm")
-// root [4] t->ExecuteTask("deb all time") 
+// one can use it as well in standalone mode.
+// Use  case:
+//  root [0] AliPHOSTrackSegmentMakerv1 * t = new AliPHOSTrackSegmentMaker("galice.root")
+//  Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
+//  root [1] t->ExecuteTask()
+//  root [2] t->SetMaxEmcPpsdDistance(5)
+//  root [3] t->SetTrackSegmentsBranch("max distance 5 cm")
+//  root [4] t->ExecuteTask("deb all time") 
 //                 
 //*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
 //
 //                 
 //*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
 //
@@ -121,8 +125,9 @@ AliPHOSTrackSegmentMaker()
 
 }
 //____________________________________________________________________________
 
 }
 //____________________________________________________________________________
-void  AliPHOSTrackSegmentMakerv1::Init(){
-  //Make all memory allokations not possible in default constructor
+void  AliPHOSTrackSegmentMakerv1::Init()
+{
+  // Make all memory allocations that are not possible in default constructor
 
   if(!fIsInitialized){
     if(fHeaderFileName.IsNull())
 
   if(!fIsInitialized){
     if(fHeaderFileName.IsNull())
@@ -208,7 +213,7 @@ void  AliPHOSTrackSegmentMakerv1::FillOneModule()
 Float_t  AliPHOSTrackSegmentMakerv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * emcClu,AliPHOSRecPoint * cpvClu, Bool_t &toofar)
 {
   // Calculates the distance between the EMC RecPoint and the PPSD RecPoint
 Float_t  AliPHOSTrackSegmentMakerv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * emcClu,AliPHOSRecPoint * cpvClu, Bool_t &toofar)
 {
   // Calculates the distance between the EMC RecPoint and the PPSD RecPoint
-  //clusters are sorted in "rows" and "columns" of width 1 cm
+  // Clusters are sorted in "rows" and "columns" of width 1 cm
 
   Float_t delta = 1 ;  // Width of the rows in sorting of RecPoints (in cm)
                        // if you change this value, change it as well in xxxRecPoint::Compare()
 
   Float_t delta = 1 ;  // Width of the rows in sorting of RecPoints (in cm)
                        // if you change this value, change it as well in xxxRecPoint::Compare()
@@ -296,7 +301,7 @@ void  AliPHOSTrackSegmentMakerv1::MakeLinks()
 void  AliPHOSTrackSegmentMakerv1::MakePairs()
 { 
   // Using the previously made list of "links", we found the smallest link - i.e. 
 void  AliPHOSTrackSegmentMakerv1::MakePairs()
 { 
   // Using the previously made list of "links", we found the smallest link - i.e. 
-  // link with the least distance betwing EMC and CPV and pointing to still 
+  // link with the least distance between EMC and CPV and pointing to still 
   // unassigned RecParticles. We assign these RecPoints to TrackSegment and 
   // remove them from the list of "unassigned". 
   
   // unassigned RecParticles. We assign these RecPoints to TrackSegment and 
   // remove them from the list of "unassigned". 
   
@@ -392,7 +397,7 @@ void  AliPHOSTrackSegmentMakerv1::MakePairs()
 //____________________________________________________________________________
 void  AliPHOSTrackSegmentMakerv1::Exec(Option_t * option)
 {
 //____________________________________________________________________________
 void  AliPHOSTrackSegmentMakerv1::Exec(Option_t * option)
 {
-  //STEERing method
+  // STEERing method
 
   if(! fIsInitialized) Init() ;
 
 
   if(! fIsInitialized) Init() ;
 
@@ -431,7 +436,9 @@ void  AliPHOSTrackSegmentMakerv1::Exec(Option_t * option)
 
 }
 //____________________________________________________________________________
 
 }
 //____________________________________________________________________________
-void AliPHOSTrackSegmentMakerv1::Print(Option_t * option)const {
+void AliPHOSTrackSegmentMakerv1::Print(Option_t * option)const 
+{
+  // Prints the parameters of track segment maker
   if(fIsInitialized){
     cout <<  "======== AliPHOSTrackSegmentMakerv1 ========" << endl ;
     cout <<  "Making Track segments "<< endl ;
   if(fIsInitialized){
     cout <<  "======== AliPHOSTrackSegmentMakerv1 ========" << endl ;
     cout <<  "Making Track segments "<< endl ;
@@ -446,9 +453,10 @@ void AliPHOSTrackSegmentMakerv1::Print(Option_t * option)const {
     cout << "AliPHOSTrackSegmentMakerv1 not initialized " << endl ;
 }
 //____________________________________________________________________________
     cout << "AliPHOSTrackSegmentMakerv1 not initialized " << endl ;
 }
 //____________________________________________________________________________
-Bool_t AliPHOSTrackSegmentMakerv1::ReadRecPoints(){
+Bool_t AliPHOSTrackSegmentMakerv1::ReadRecPoints()
+{
   // Reads Emc and CPV recPoints with given title (fRecPointsBranchTitle) 
   // Reads Emc and CPV recPoints with given title (fRecPointsBranchTitle) 
-  // made priveously with Clusterizer.
+  // made previously with Clusterizer.
 
 
   //Make some initializations 
 
 
   //Make some initializations 
@@ -532,13 +540,14 @@ Bool_t AliPHOSTrackSegmentMakerv1::ReadRecPoints(){
   
 }
 //____________________________________________________________________________
   
 }
 //____________________________________________________________________________
-void AliPHOSTrackSegmentMakerv1::WriteTrackSegments(){
+void AliPHOSTrackSegmentMakerv1::WriteTrackSegments()
+{
   // Writes found TrackSegments to TreeR. Creates branches 
   // "PHOSTS" and "AliPHOSTrackSegmentMaker" with the same title.
   // In the former branch found TrackSegments are stored, while 
   // in the latter all parameters, with which TS were made. 
   // ROOT does not allow overwriting existing branches, therefore
   // Writes found TrackSegments to TreeR. Creates branches 
   // "PHOSTS" and "AliPHOSTrackSegmentMaker" with the same title.
   // In the former branch found TrackSegments are stored, while 
   // in the latter all parameters, with which TS were made. 
   // ROOT does not allow overwriting existing branches, therefore
-  // first we chesk, if branches with the same title alredy exist.
+  // first we check, if branches with the same title already exist.
   // If yes - exits without writing.
   
   //First, check, if branches already exist
   // If yes - exits without writing.
   
   //First, check, if branches already exist
@@ -620,7 +629,8 @@ void AliPHOSTrackSegmentMakerv1::WriteTrackSegments(){
 
 
 //____________________________________________________________________________
 
 
 //____________________________________________________________________________
-void AliPHOSTrackSegmentMakerv1::PrintTrackSegments(Option_t * option){
+void AliPHOSTrackSegmentMakerv1::PrintTrackSegments(Option_t * option)
+{
   // option deb - prints # of found TrackSegments
   // option deb all - prints as well indexed of found RecParticles assigned to the TS
 
   // option deb - prints # of found TrackSegments
   // option deb all - prints as well indexed of found RecParticles assigned to the TS