]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Improve documentation
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Mar 2000 09:15:45 +0000 (09:15 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 13 Mar 2000 09:15:45 +0000 (09:15 +0000)
51 files changed:
PHOS/AliPHOS.cxx
PHOS/AliPHOS.h
PHOS/AliPHOSAnalyze.cxx
PHOS/AliPHOSAnalyze.h
PHOS/AliPHOSClusterizer.cxx
PHOS/AliPHOSClusterizer.h
PHOS/AliPHOSClusterizerv1.cxx
PHOS/AliPHOSClusterizerv1.h
PHOS/AliPHOSDigit.cxx
PHOS/AliPHOSDigit.h
PHOS/AliPHOSEmcRecPoint.cxx
PHOS/AliPHOSEmcRecPoint.h
PHOS/AliPHOSFastRecParticle.cxx
PHOS/AliPHOSFastRecParticle.h
PHOS/AliPHOSGeometry.cxx
PHOS/AliPHOSGeometry.h
PHOS/AliPHOSHit.cxx
PHOS/AliPHOSHit.h
PHOS/AliPHOSLink.cxx
PHOS/AliPHOSLink.h
PHOS/AliPHOSPID.cxx
PHOS/AliPHOSPID.h
PHOS/AliPHOSPIDv1.cxx
PHOS/AliPHOSPIDv1.h
PHOS/AliPHOSPpsdRecPoint.cxx
PHOS/AliPHOSPpsdRecPoint.h
PHOS/AliPHOSRecParticle.cxx
PHOS/AliPHOSRecParticle.h
PHOS/AliPHOSRecPoint.cxx
PHOS/AliPHOSRecPoint.h
PHOS/AliPHOSReconstructioner.cxx
PHOS/AliPHOSReconstructioner.h
PHOS/AliPHOSTrackSegment.cxx
PHOS/AliPHOSTrackSegment.h
PHOS/AliPHOSTrackSegmentMaker.cxx
PHOS/AliPHOSTrackSegmentMaker.h
PHOS/AliPHOSTrackSegmentMakerv1.cxx
PHOS/AliPHOSTrackSegmentMakerv1.h
PHOS/AliPHOSv0.cxx
PHOS/AliPHOSv0.h
PHOS/AliPHOSv1.cxx
PHOS/AliPHOSv1.h
PHOS/AliPHOSvFast.cxx
PHOS/AliPHOSvFast.h
PHOS/Makefile
PHOS/PHOS-HTML/fastsimulation.html
PHOS/PHOS-HTML/geometry.html
PHOS/PHOS-HTML/index.html
PHOS/PHOSLinkDef.h
PHOS/canevas.cxx
PHOS/canevas.h

index 555f66a2548c56e4df688f90a5d93d7b9acac711..49da2c3a44bbd83c8ded0a159a3f390d74920cb5 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Base Class of PHOS.
-// Only creates the materials
-//*-- Author : Laurent Aphecetche  SUBATECH 
+// Base Class for PHOS description:
+//   PHOS consists of a PbWO4 calorimeter (EMCA) and a gazeous charged 
+//    particles detector (CPV or PPSD).
+//   The only provided method here is CreateMaterials, 
+//    which defines the materials common to all PHOS versions.   
+// 
+//*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH) 
 //////////////////////////////////////////////////////////////////////////////
 
 // --- ROOT system ---
 
 #include "AliPHOS.h"
 #include "AliMC.h"
-//#include "TGeant3.h"
 #include "AliRun.h"
 
 ClassImp(AliPHOS)
 
-//____________________________________________________________________________
-AliPHOS::AliPHOS(const char* name, const char* title) 
-  : AliDetector(name,title) 
-{
-}
-
-//____________________________________________________________________________
-AliPHOS::AliPHOS() : AliDetector()
-{
-}
-
 //____________________________________________________________________________
 AliPHOS::~AliPHOS()
 {
@@ -53,7 +47,8 @@ AliPHOS::~AliPHOS()
 //____________________________________________________________________________
 void AliPHOS::CreateMaterials()
 {
-  // DEFINITION OF PHOS MATERIALS
+  // Definitions of materials to build PHOS and associated tracking media.
+  // media number in idtmed are 699 to 798.
 
   // --- The PbWO4 crystals ---
   Float_t aX[3] = {207.19, 183.85, 16.0} ;
index 17a3b75008253a32954376cee6cb7deb0badbdf0..eed560c7592a37c8aaa447eb9275118a4b14894e 100644 (file)
@@ -5,15 +5,10 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//   Abstract Base Class for PHOS             //
-//  Version SUBATECH                          //
-//  Author  Laurent Aphecetche SUBATECH       //
-//   The only provided method here is         // 
-//   CreateMaterials, which defines the       // 
-//   materials common to all PHOS versions.   // 
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  Base Class for PHOS     
+//                  
+//*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -27,14 +22,14 @@ class AliPHOS : public AliDetector {
 
  public:
 
-  AliPHOS(const char* name, const char* title) ;
-  AliPHOS() ;
+  AliPHOS(const char* name, const char* title): AliDetector(name,title) {} 
+  AliPHOS() : AliDetector() {} 
   virtual ~AliPHOS() ; 
  
-  virtual void CreateMaterials() ;
-  virtual AliPHOSGeometry *  GetGeometry() = 0 ; 
+  virtual void CreateMaterials() ;               // defines the material of the detector
+  virtual AliPHOSGeometry *  GetGeometry() = 0 ; // hands the pointer to the unique geometry object
 
-  ClassDef(AliPHOS,2) // Photon Spectrometer Detector
+  ClassDef(AliPHOS,2) // Photon Spectrometer Detector (base class)
 
 } ;
 
index 64a9190067890698804e768831fae9e190184b01..44ae189b2d3ae451db5f6bfa6c882bb67baa6df4 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Algorythm class to analyze PHOS events
-//*-- Y. Schutz :   SUBATECH 
+// Algorythm class to analyze PHOSv0 events:
+// Construct histograms and displays them.
+// Use the macro EditorBar.C for best access to the functionnalities
+//
+//*-- Author: Y. Schutz (SUBATECH) 
 //////////////////////////////////////////////////////////////////////////////
 
 // --- ROOT system ---
@@ -53,7 +58,7 @@ ClassImp(AliPHOSAnalyze)
 //____________________________________________________________________________
   AliPHOSAnalyze::AliPHOSAnalyze()
 {
-  // ctor
+  // default ctor (useless)
   
   fRootFile = 0 ; 
 }
@@ -61,7 +66,7 @@ ClassImp(AliPHOSAnalyze)
 //____________________________________________________________________________
 AliPHOSAnalyze::AliPHOSAnalyze(Text_t * name)
 {
-  // ctor
+  // ctor: analyze events from root file: name
   
   Bool_t ok = OpenRootFile(name)  ; 
   if ( !ok ) {
@@ -104,6 +109,10 @@ AliPHOSAnalyze::~AliPHOSAnalyze()
 //____________________________________________________________________________
 void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
 {
+  // analyze one single event with id=evt
+
+  TStopwatch ts ; 
+  ts.Start() ; 
   Bool_t ok = Init(evt) ; 
   
   if ( ok ) {
@@ -120,17 +129,26 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
     fPHOS->Reconstruction(fRec);  
     
     // =========== End of reconstruction
+
+    // =========== Write the root file
+
+    fRootFile->Write() ;
     
+    // =========== Finish
+
     cout << "AnalyzeOneEvent > event # " << fEvt << " processed" << endl ;   
   } // ok
   else
     cout << "AnalyzeOneEvent > filed to process event # " << evt << endl ;   
-
+  
+  ts.Stop() ;   cout << "CPU  time = " << ts.CpuTime()   << endl ; 
+  cout << "Real time = " << ts.RealTime()  << endl ; 
 }
 
 //____________________________________________________________________________
- void AliPHOSAnalyze::AnalyzeManyEvents(Int_t Nevents, Int_t module)   // analyzes many events   
+ void AliPHOSAnalyze::AnalyzeManyEvents(Int_t Nevents, Int_t module)    
 {
+  // analyzes Nevents events in a single PHOS module  
 
   if ( fRootFile == 0 ) 
     cout << "AnalyzeManyEvents > " << "Root File not openned" << endl ;  
@@ -224,7 +242,13 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
            {
              if ( recparticle->GetPHOSTrackSegment()->GetPHOSMod() == module )
                { 
-                 cout << "Particle type is " << recparticle->GetType() << endl ;  
+                 cout << "Particle type is " << recparticle->GetType() << endl ; 
+                 Int_t numberofprimaries = 0 ;
+                 Int_t * listofprimaries = recparticle->GetPrimaries(numberofprimaries) ;
+                 cout << "Number of primaries = " << numberofprimaries << endl ; 
+                 Int_t index ;
+                 for ( index = 0 ; index < numberofprimaries ; index++)
+                   cout << "    primary # " << index << " =  " << listofprimaries[index] << endl ;  
                  switch(recparticle->GetType())
                    {
                    case kGAMMA:
@@ -281,6 +305,8 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
 //____________________________________________________________________________
 void  AliPHOSAnalyze::BookingHistograms()
 {
+  // Books the histograms where the results of the analysis are stored (to be changed)
+
   if (fhEmcDigit )         
     delete fhEmcDigit  ;
   if (fhVetoDigit )     
@@ -327,6 +353,10 @@ void  AliPHOSAnalyze::BookingHistograms()
 //____________________________________________________________________________
 Bool_t AliPHOSAnalyze::Init(Int_t evt)
 {
+  // Do a few initializations: open the root file
+  //                           get the AliRun object
+  //                           defines the clusterizer, tracksegment maker and particle identifier
+  //                           sets the associated parameters
 
   Bool_t ok = kTRUE ; 
   
@@ -357,7 +387,7 @@ Bool_t AliPHOSAnalyze::Init(Int_t evt)
 
     fClu =  new AliPHOSClusterizerv1() ; 
     fClu->SetEmcEnergyThreshold(0.030) ; 
-    fClu->SetEmcClusteringThreshold(0.50) ; 
+    fClu->SetEmcClusteringThreshold(1.0) ; 
     fClu->SetPpsdEnergyThreshold    (0.0000002) ; 
     fClu->SetPpsdClusteringThreshold(0.0000001) ; 
     fClu->SetLocalMaxCut(0.03) ;
@@ -403,6 +433,10 @@ Bool_t AliPHOSAnalyze::Init(Int_t evt)
 //____________________________________________________________________________
 void AliPHOSAnalyze::DisplayKineEvent(Int_t evt)
 {
+  // Display particles from the Kine Tree in global Alice (theta, phi) coordinates. 
+  // One PHOS module at the time.
+  // The particle type can be selected.
+  
   if (evt == -999) 
     evt = fEvt ;
 
@@ -473,7 +507,8 @@ void AliPHOSAnalyze::DisplayKineEvent(Int_t evt)
        fGeom->ImpactOnEmc(theta, phi, mod, z, x) ;
        if ( mod == module ) {
          nparticlein++ ; 
-         histoparticle->Fill(phi*kRADDEG, theta*kRADDEG, particle->Energy() ) ; 
+         if (particle->Energy() >  fClu->GetEmcClusteringThreshold()  )
+           histoparticle->Fill(phi*kRADDEG, theta*kRADDEG, particle->Energy() ) ; 
        } 
       } 
     }
@@ -491,6 +526,10 @@ void AliPHOSAnalyze::DisplayKineEvent(Int_t evt)
 //____________________________________________________________________________
 void AliPHOSAnalyze::DisplayRecParticles()
 {
+  // Display reconstructed particles in global Alice(theta, phi) coordinates. 
+  // One PHOS module at the time.
+  // Click on symbols indicate the reconstructed particle type. 
+
   if (fEvt == -999) {
     cout << "DisplayRecParticles > Analyze an event first ... (y/n) " ; 
     Text_t answer[1] ; 
@@ -529,7 +568,14 @@ void AliPHOSAnalyze::DisplayRecParticles()
       Double_t kRADDEG = 180. / TMath::Pi() ; 
       while ( (rp = (AliPHOSRecParticle *)nextRecPart() ) ) {
        AliPHOSTrackSegment * ts = rp->GetPHOSTrackSegment() ; 
-       if ( ts->GetPHOSMod() == module ) {  
+       if ( ts->GetPHOSMod() == module ) {
+         Int_t numberofprimaries = 0 ;
+         Int_t * listofprimaries = rp->GetPrimaries(numberofprimaries) ;
+         cout << "Number of primaries = " << numberofprimaries << endl ; 
+         Int_t index ;
+         for ( index = 0 ; index < numberofprimaries ; index++)
+           cout << "    primary # " << index << " =  " << listofprimaries[index] << endl ;  
+         
          nRecParticlesInModule++ ; 
          Double_t theta = rp->Theta() * kRADDEG ;
          Double_t phi   = rp->Phi() * kRADDEG ;
@@ -558,6 +604,10 @@ void AliPHOSAnalyze::DisplayRecParticles()
 //____________________________________________________________________________
 void AliPHOSAnalyze::DisplayRecPoints()
 {
+  // Display reconstructed points in local PHOS-module (x, z) coordinates. 
+  // One PHOS module at the time.
+  // Click on symbols displays the EMC cluster, or PPSD information.
+
   if (fEvt == -999) {
     cout << "DisplayRecPoints > Analyze an event first ... (y/n) " ; 
     Text_t answer[1] ; 
@@ -709,6 +759,10 @@ void AliPHOSAnalyze::DisplayRecPoints()
 //____________________________________________________________________________
 void AliPHOSAnalyze::DisplayTrackSegments()
 {
+  // Display track segments in local PHOS-module (x, z) coordinates. 
+  // One PHOS module at the time.
+  // One symbol per PHOS subsystem: EMC, upper PPSD, lower PPSD.
+
   if (fEvt == -999) {
     cout << "DisplayTrackSegments > Analyze an event first ... (y/n) " ; 
     Text_t answer[1] ; 
@@ -778,13 +832,17 @@ void AliPHOSAnalyze::DisplayTrackSegments()
 //____________________________________________________________________________
 Bool_t AliPHOSAnalyze::OpenRootFile(Text_t * name)
 {
-  fRootFile   = new TFile(name) ;
+  // Open the root file named "name"
+  
+  fRootFile   = new TFile(name, "update") ;
   return  fRootFile->IsOpen() ; 
 }
 //____________________________________________________________________________
 void AliPHOSAnalyze::SavingHistograms()
 {
-  Text_t outputname[80] ;// = fRootFile->GetName();
+  // Saves the histograms in a root file named "name.analyzed" 
+
+  Text_t outputname[80] ;
   sprintf(outputname,"%s.analyzed",fRootFile->GetName());
   TFile output(outputname,"RECREATE");
   output.cd();
index 35cc8e9603cd4a3aeadbca1a3bc3c0f944548f71..2d5b8aac62f2a646915e886017cbdb910b190fac 100644 (file)
@@ -5,12 +5,9 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  Algorythm class to analyze PHOS events    //
-//  Yves Schutz            SUBATECH           //
-//                                            //  
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  Algorithm class to analyze PHOSv0 events    
+//*-- Author : Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -49,40 +46,40 @@ private:
   
   AliPHOSClusterizer * fClu ;       // a clusterizer 
   Int_t fEvt ;                      // the evt number being processed 
-  AliPHOSGeometry * fGeom         // the PHOS Geometry object
+  AliPHOSGeometry * fGeom ;         // the PHOS Geometry object
   AliPHOSv0 * fPHOS ;               // the PHOS object from the root file 
   AliPHOSPID * fPID ;               // a particle identifier
   AliPHOSReconstructioner * fRec ;  // a reconstructioner  
   TFile * fRootFile ;               // the root file that contains the data
   AliPHOSTrackSegmentMaker * fTrs ; // a tracksegmentmaker ;
-  TH1F * fhEmcDigit        ;   // Histo of digit energies in the Emc 
-  TH1F * fhVetoDigit       ;   // Histo of digit energies in the Veto 
-  TH1F * fhConvertorDigit  ;   // Histo of digit energies in the Convertor
-  TH1F * fhEmcCluster      ;   // Histo of Cluster energies in Emc
-  TH1F * fhVetoCluster     ;   // Histo of Cluster energies in Veto
-  TH1F * fhConvertorCluster;   // Histo of Cluster energies in Convertor
-  TH2F * fhConvertorEmc    ;   // 2d Convertor versus Emc energies
-  TH1F * fhPhotonEnergy    ;   // Spectrum of detected photons
-  TH1F * fhElectronEnergy  ;   // Spectrum of detected electrons
-  TH1F * fhNeutralHadronEnergy   ;   // Spectrum of detected neutral hadron
-  TH1F * fhNeutralEMEnergy   ;   // Spectrum of detected neutral EM
-  TH1F * fhChargedHadronEnergy   ;   // Spectrum of detected charged
-  TH1F * fhPhotonHadronEnergy  ; // Spectrum of detected Photon-Hadron
-  TH1F * fhPhotonPositionX ;   // X distribution of detected photons
-  TH1F * fhElectronPositionX ; // X distribution of detected electrons
-  TH1F * fhNeutralHadronPositionX  ; // X distribution of detected neutral hadron
-  TH1F * fhNeutralEMPositionX  ; // X distribution of detected neutral EM
-  TH1F * fhChargedHadronPositionX  ; // X distribution of detected charged
-  TH1F * fhPhotonHadronPositionX  ; // X distribution of detected Photon-Hadron
-  TH1F * fhPhotonPositionY   ; // Y distribution of detected photons
-  TH1F * fhElectronPositionY ; // Y distribution of detected electrons
-  TH1F * fhNeutralHadronPositionY  ; // Y distribution of detected neutral hadron
-  TH1F * fhNeutralEMPositionY  ; // Y distribution of detected neutral EM
-  TH1F * fhChargedHadronPositionY  ; // Y distribution of detected charged
-  TH1F * fhPhotonHadronPositionY  ; // Y distribution of detected Photon-Hadron
+  TH1F * fhEmcDigit ;               // Histo of digit energies in the Emc 
+  TH1F * fhVetoDigit ;              // Histo of digit energies in the Veto 
+  TH1F * fhConvertorDigit ;         // Histo of digit energies in the Convertor
+  TH1F * fhEmcCluster ;             // Histo of Cluster energies in Emc
+  TH1F * fhVetoCluster ;            // Histo of Cluster energies in Veto
+  TH1F * fhConvertorCluster ;       // Histo of Cluster energies in Convertor
+  TH2F * fhConvertorEmc ;           // 2d Convertor versus Emc energies
+  TH1F * fhPhotonEnergy ;           // Spectrum of detected photons
+  TH1F * fhElectronEnergy ;         // Spectrum of detected electrons
+  TH1F * fhNeutralHadronEnergy    // Spectrum of detected neutral hadron
+  TH1F * fhNeutralEMEnergy ;        // Spectrum of detected neutral EM
+  TH1F * fhChargedHadronEnergy    // Spectrum of detected charged
+  TH1F * fhPhotonHadronEnergy ;     // Spectrum of detected Photon-Hadron
+  TH1F * fhPhotonPositionX ;        // X distribution of detected photons
+  TH1F * fhElectronPositionX ;      // X distribution of detected electrons
+  TH1F * fhNeutralHadronPositionX ; // X distribution of detected neutral hadron
+  TH1F * fhNeutralEMPositionX ;     // X distribution of detected neutral EM
+  TH1F * fhChargedHadronPositionX ; // X distribution of detected charged
+  TH1F * fhPhotonHadronPositionX  // X distribution of detected Photon-Hadron
+  TH1F * fhPhotonPositionY ;        // Y distribution of detected photons
+  TH1F * fhElectronPositionY ;      // Y distribution of detected electrons
+  TH1F * fhNeutralHadronPositionY ; // Y distribution of detected neutral hadron
+  TH1F * fhNeutralEMPositionY ;     // Y distribution of detected neutral EM
+  TH1F * fhChargedHadronPositionY ; // Y distribution of detected charged
+  TH1F * fhPhotonHadronPositionY  // Y distribution of detected Photon-Hadron
 
 
-ClassDef(AliPHOSAnalyze,1)  // PHOS event analyzis , version 1
+ClassDef(AliPHOSAnalyze,1)  // PHOSv0 event analyzis algorithm
 
 };
 
index 5a8ed337977064329bcc1805c7296eab8eb940d8..4a695559560a145771c5886d51b9040b45757825 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// A brief description of the class
-//*-- Author : Yves Schutz  SUBATECH 
+//  Base class for the clusterization algorithm (pure abstract)
+//
+//*-- Author: Yves Schutz  SUBATECH 
 //////////////////////////////////////////////////////////////////////////////
 
 // --- ROOT system ---
index 6d7f5836b3938263337ff0aa9bafd116a798c738..8cfeaca06d7a7976b00e95da662179b6695df877 100644 (file)
@@ -5,14 +5,9 @@
                             
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  Algorithme class for the clusterization   //
-//  interface class                           //
-//  Version SUBATECH                          //
-//  Author Yves Schutz     SUBATECH           //
-//                                            //  
-//   pABC                                     //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  Base class for the clusterization algorithm (pure abstract)
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -25,8 +20,8 @@
 
 #include "AliPHOSDigit.h"
 
-typedef TClonesArray    RecPointsList ; // a cluster has a variable size (see ROOT FAQ)  
-typedef TClonesArray    DigitsList ; //for digits saved on disk
+typedef TClonesArray    RecPointsList ; 
+typedef TClonesArray    DigitsList ;   
 
 class AliPHOSClusterizer : public TObject {
 
@@ -56,7 +51,7 @@ public:
   virtual void SetPpsdClusteringThreshold(Float_t cluth) = 0 ; 
   virtual void SetPpsdEnergyThreshold(Float_t enth) = 0 ; 
  
-  ClassDef(AliPHOSClusterizer,1)  // clusterization interface, version 1
+  ClassDef(AliPHOSClusterizer,1)  // Clusterization algorithm class (abstract base class)
 
 } ;
 
index af7f10c660dc8c819c102c11c1595602805b4d08..ca906bf9249b7146694f2843a873cbdc1ff1c732 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// A brief description of the class
-//*-- Author : Yves Schutz  SUBATECH 
+//  Implementation version 1 of the clusterization algorithm 
+// 
+//*-- Author: Yves Schutz (SUBATECH) 
 //////////////////////////////////////////////////////////////////////////////
 
 // --- ROOT system ---
@@ -40,6 +43,8 @@ ClassImp(AliPHOSClusterizerv1)
 //____________________________________________________________________________
 AliPHOSClusterizerv1::AliPHOSClusterizerv1()
 {
+  // default ctor (to be used)
+
   fA                       = 0.;
   fB                       = 0.01 ;
   fNumberOfEmcClusters     = 0 ; 
@@ -55,9 +60,13 @@ AliPHOSClusterizerv1::AliPHOSClusterizerv1()
 //____________________________________________________________________________
 Int_t AliPHOSClusterizerv1::AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)
 {
-  // neigbours are defined as digits having at least common vertex
-  // The order of A and B in AreNeighbours(A,B) is important: first (A) should be digit 
-  // in cluster, which compared with digits not clusterized yet  
+  // 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
+  // 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  
+
   Int_t rv = 0 ; 
 
   AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
@@ -94,7 +103,7 @@ Int_t AliPHOSClusterizerv1::AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)
 //____________________________________________________________________________
 void AliPHOSClusterizerv1::FillandSort(const DigitsList * dl, TObjArray * tl) 
 {
-  // copies the digits with energy above thershold and sorts the list
+  // Copies the digits with energy above thershold and sorts the list
   // according to increasing Id number
 
   AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
@@ -134,13 +143,18 @@ void AliPHOSClusterizerv1::FillandSort(const DigitsList * dl, TObjArray * tl)
 //____________________________________________________________________________
 void AliPHOSClusterizerv1:: GetNumberOfClustersFound(Int_t * numb) 
 {
- numb[0] = fNumberOfEmcClusters ; 
- numb[1] = fNumberOfPpsdClusters ; 
+  // Fills numb with the number of EMC  (numb[0]) clusters found
+  //                               PPSD (numb[1]) clusters found
+
+  numb[0] = fNumberOfEmcClusters ; 
+  numb[1] = fNumberOfPpsdClusters ; 
 }
 
 //____________________________________________________________________________
 Bool_t AliPHOSClusterizerv1::IsInEmc(AliPHOSDigit * digit) 
 {
+  // Tells if (true) or not (false) the digit is in a PHOS-EMC module
   Bool_t rv = kFALSE ; 
 
   AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;  
@@ -157,7 +171,8 @@ Bool_t AliPHOSClusterizerv1::IsInEmc(AliPHOSDigit * digit)
 //____________________________________________________________________________
 void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * emcl, RecPointsList * ppsdl)
 {
-
+  // Steering method to construct the clusters stored in a list of Reconstructed Points
+  // A cluster is defined as a list of neighbour digits
   
   // Fill and sort the working digits list
   TObjArray tempodigitslist( dl->GetEntries() ) ;
@@ -258,6 +273,8 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * e
 //____________________________________________________________________________
 void AliPHOSClusterizerv1::PrintParameters() 
 {
+  // Print the energy thresholds 
+
   cout << "PHOS Clusterizer version 1 :" << endl 
        << "                       EMC  Clustering threshold = " << fEmcClusteringThreshold << endl
        << "                       EMC  Energy threshold     = " << fEmcEnergyThreshold << endl                  
index 71a352614d7f13251bf9ecd4e9ca422ae54b1b3d..55c9009675dedc7724a10f2aca937ca37de72f63 100644 (file)
@@ -5,14 +5,10 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  Clusterizer implementation version 1      //
-//  algorithme class                          //
-//                                            //
-//  Author Yves Schutz     SUBATECH           //
-//                                            //  
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  Implementation version 1 of the clusterization algorithm                     
+//
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -58,18 +54,18 @@ public:
   
 private:
   
-  Float_t fA ;
-  Float_t fB ;
-  Float_t fEmcClusteringThreshold ; 
-  Float_t fEmcEnergyThreshold ; 
-  Float_t fLocMaxCut ;   
-  Int_t   fNumberOfEmcClusters ; 
-  Int_t   fNumberOfPpsdClusters ; 
-  Float_t fPpsdClusteringThreshold ; 
-  Float_t fPpsdEnergyThreshold ;  
-  Float_t fW0 ;   
+  Float_t fA ;                       // offset of the energy calibration
+  Float_t fB ;                       // gain of the energy calibration
+  Float_t fEmcClusteringThreshold ;  // minimum energy to include a EMC digit in a cluster
+  Float_t fEmcEnergyThreshold ;      // minimum energy of EMC digit to be considered
+  Float_t fLocMaxCut ;               // minimum energy difference to distinguish local maxima in a cluster
+  Int_t   fNumberOfEmcClusters ;     // number of EMC clusters found 
+  Int_t   fNumberOfPpsdClusters ;    // number of PPSD clusters found
+  Float_t fPpsdClusteringThreshold ; // minimum energy to include a PPSD digit in a cluster
+  Float_t fPpsdEnergyThreshold ;     // minimum energy of PPSD digit to be considered
+  Float_t fW0 ;                      // logarithmic weight for the cluster center of gravity calculation
     
-  ClassDef(AliPHOSClusterizerv1,1)  // Clusterizer implementation version 1
+  ClassDef(AliPHOSClusterizerv1,1)  // Clusterizer implementation version 1
 
 };
 
index e6836413128b46ff775f6507eae4cc71a365063c..8c4d922c889092527158a0bef77ec2cd3c3c0025 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Digit class for PHOS that contains an absolute ID and an energy
-//*-- Author : Laurent Aphecetche  SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+//  PHOS digit: Id
+//              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)
+
 
 // --- ROOT system ---
 
 // --- Standard library ---
 
 #include <iostream>
-#include <cassert> 
 
 // --- AliRoot header files ---
 
@@ -35,6 +42,8 @@ ClassImp(AliPHOSDigit)
 //____________________________________________________________________________
   AliPHOSDigit::AliPHOSDigit() 
 {
+  // default ctor 
+
   fNprimary = 0 ;  
   fPrimary1 = -1 ; 
   fPrimary2 = -1 ; 
@@ -44,6 +53,8 @@ ClassImp(AliPHOSDigit)
 //____________________________________________________________________________
 AliPHOSDigit::AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy) 
 {  
+  // ctor with all data 
+
   fId         = id ;
   fAmp        = DigEnergy ;
   fPrimary1   = primary ;
@@ -52,7 +63,9 @@ AliPHOSDigit::AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy)
 
 //____________________________________________________________________________
 AliPHOSDigit::AliPHOSDigit(const AliPHOSDigit & digit) 
-{  
+{
+  // copy ctor
+  
   fId       = digit.fId;
   fAmp      = digit.fAmp ;
   fNprimary = digit.fNprimary ;
@@ -61,14 +74,12 @@ AliPHOSDigit::AliPHOSDigit(const AliPHOSDigit & digit)
   fPrimary3 = digit.fPrimary3 ;
 }
 
-//____________________________________________________________________________
-AliPHOSDigit::~AliPHOSDigit()
-{
-}
-
 //____________________________________________________________________________
 Int_t AliPHOSDigit::Compare(TObject * obj)
 {
+  // Compares two digits with respect to its Id
+  // to sort according increasing Id
+
   Int_t rv ; 
 
   AliPHOSDigit * digit = (AliPHOSDigit *)obj ; 
@@ -89,6 +100,8 @@ Int_t AliPHOSDigit::Compare(TObject * obj)
 //____________________________________________________________________________
 Int_t AliPHOSDigit::GetPrimary(Int_t index) const
 {
+  // Returns the primary particle id index =1,2,3
   Int_t rv = -1 ; 
   if ( index > 3 )
     cout << "AliPHOSDigit  ERROR > only 3 primaries allowed" << endl ; 
@@ -113,6 +126,8 @@ Int_t AliPHOSDigit::GetPrimary(Int_t index) const
 //____________________________________________________________________________
 Bool_t AliPHOSDigit::operator==(AliPHOSDigit const & digit) const 
 {
+  // Two digits are equal if they have the same Id
+  
   if ( fId == digit.fId ) 
     return kTRUE ;
   else 
@@ -122,6 +137,8 @@ Bool_t AliPHOSDigit::operator==(AliPHOSDigit const & digit) const
 //____________________________________________________________________________
 AliPHOSDigit& AliPHOSDigit::operator+(AliPHOSDigit const & digit) 
 {
+  // Adds the amplitude of digits and completes the list of primary particles
+  
   fAmp += digit.fAmp ;
  
   // Here comes something crummy ... but I do not know how to stream pointers
@@ -170,7 +187,12 @@ AliPHOSDigit& AliPHOSDigit::operator+(AliPHOSDigit const & digit)
 //____________________________________________________________________________
 ostream& operator << ( ostream& out , const AliPHOSDigit & digit)
 {
-  out << "ID " << digit.fId << " Energy = " << digit.fAmp ;
+  // Prints the data of the digit
+  
+  out << "ID " << digit.fId << " Energy = " << digit.fAmp << endl 
+      << "Primary 1 = " << digit.fPrimary1 << endl 
+      << "Primary 2 = " << digit.fPrimary2 << endl 
+      << "Primary 3 = " << digit.fPrimary3 << endl ;
 
   return out ;
 }
index 190de898d655920368aff633938fb12f8e798e77..c403f3e44a98017fc164dcef590aedf79bc38dcd 100644 (file)
@@ -5,13 +5,15 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  The digit  class: a list of abs Id, energy//
-//  Version SUBATECH                          //
-//  Author Laurent Aphecetche     SUBATECH    //
-//      comment: added sortable YS            //  
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  PHOS digit: Id
+//              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)
 
 // --- ROOT system ---
 
@@ -30,7 +32,7 @@ public:
   AliPHOSDigit() ;
   AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy) ;
   AliPHOSDigit(const AliPHOSDigit & digit) ;
-  virtual ~AliPHOSDigit() ;  
+  virtual ~AliPHOSDigit(){} 
 
   Bool_t operator==(AliPHOSDigit const &rValue) const;
   AliPHOSDigit& operator+(AliPHOSDigit const &rValue) ;
@@ -50,7 +52,7 @@ private:
   Int_t fPrimary3 ;          // third primary (because I do not know how to stream *fPrimary) 
   Int_t fNprimary ;          // Number of primaries
   
-  ClassDef(AliPHOSDigit,1)   // Digit in PHOS, version 1 
+  ClassDef(AliPHOSDigit,1)   // Digit in PHOS 
 
 } ;
 
index df8047056ea31f32670eb6eab24a250172bcd42f..a1f572689f83999042416cae9e5c90001997807d 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Rec Point in the PHOS EM calorimeter 
-//*-- Author : Dmitri Peressounko RRC KI
-//////////////////////////////////////////////////////////////////////////////
+//  RecPoint implementation for PHOS-EMC 
+//  An EmcRecPoint is a cluster of digits   
+//           
+//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
+
 
 // --- ROOT system ---
 #include "TPad.h"
@@ -52,17 +56,11 @@ AliPHOSEmcRecPoint::AliPHOSEmcRecPoint(Float_t W0, Float_t LocMaxCut)
   fLocPos.SetX(1000000.)  ;      //Local position should be evaluated
 }
 
-//____________________________________________________________________________
-AliPHOSEmcRecPoint::~AliPHOSEmcRecPoint() 
-{
-  // dtor 
-}
-
 //____________________________________________________________________________
 void AliPHOSEmcRecPoint::AddDigit(AliDigitNew & digit, Float_t Energy)
 {
-  // adds a digit to the digits list
-  // and accumulates the total amplitude and the multiplicity 
+  // Adds a digit to the RecPoint
+  //  and accumulates the total amplitude and the multiplicity 
   
   if ( fMulDigit >= fMaxDigit ) { // increase the size of the lists 
     fMaxDigit*=2 ; 
@@ -98,6 +96,7 @@ void AliPHOSEmcRecPoint::AddDigit(AliDigitNew & digit, Float_t Energy)
 //____________________________________________________________________________
 Bool_t AliPHOSEmcRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 ) 
 {
+  // Tells if (true) or not (false) two digits are neighbors)
   
   Bool_t aren = kFALSE ;
   
@@ -120,6 +119,8 @@ Bool_t AliPHOSEmcRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * d
 //____________________________________________________________________________
 Int_t AliPHOSEmcRecPoint::Compare(TObject * obj)
 {
+  // Compares two RecPoints according to their position in the PHOS modules
+
   Int_t rv ; 
 
   AliPHOSEmcRecPoint * clu = (AliPHOSEmcRecPoint *)obj ; 
@@ -158,7 +159,7 @@ Int_t AliPHOSEmcRecPoint::Compare(TObject * obj)
 //______________________________________________________________________________
 void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py)
 {
-  //Execute action corresponding to one event
+  // Execute action corresponding to one event
   //  This member function is called when a AliPHOSRecPoint is clicked with the locator
   //
   //  If Left button is clicked on AliPHOSRecPoint, the digits are switched on    
@@ -259,6 +260,8 @@ void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py)
 //____________________________________________________________________________
 Float_t  AliPHOSEmcRecPoint::GetDispersion() 
 {
+  // Calculates the dispersion of the shower at the origine of the RecPoint
+
   Float_t d    = 0 ;
   Float_t wtot = 0 ;
 
@@ -266,7 +269,6 @@ Float_t  AliPHOSEmcRecPoint::GetDispersion()
   GetLocalPosition(locpos);
   Float_t x = locpos.X() ;
   Float_t z = locpos.Z() ;
-  //  Int_t i = GetPHOSMod() ;
 
   AliPHOSDigit * digit ;
   AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
@@ -292,6 +294,8 @@ Float_t  AliPHOSEmcRecPoint::GetDispersion()
 //____________________________________________________________________________
 void  AliPHOSEmcRecPoint::GetElipsAxis(Float_t * lambda)
 {
+  // Calculates the axis of the shower ellipsoid
+  
   Float_t wtot = 0. ;
   Float_t x    = 0.;
   Float_t z    = 0.;
@@ -332,9 +336,58 @@ void  AliPHOSEmcRecPoint::GetElipsAxis(Float_t * lambda)
   lambda[1] = TMath::Sqrt( 0.5 * (dxx + dzz) - TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz ) ) ;
 }
 
+//____________________________________________________________________________
+void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos)
+{
+  // Calculates the center of gravity in the local PHOS-module coordinates 
+  
+  if( fLocPos.X() < 1000000.) { // already evaluated
+   LPos = fLocPos ;
+   return ;
+  }
+
+  Float_t wtot = 0. ;
+  Int_t relid[4] ;
+
+  Float_t x = 0. ;
+  Float_t z = 0. ;
+  
+  AliPHOSDigit * digit ;
+
+  AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
+
+  Int_t iDigit;
+
+
+  for(iDigit=0; iDigit<fMulDigit; iDigit++) {
+    digit = (AliPHOSDigit *) fDigitsList[iDigit];
+
+    Float_t xi ;
+    Float_t zi ;
+    phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
+    phosgeom->RelPosInModule(relid, xi, zi);
+    Float_t w = TMath::Max( 0., fW0 + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ;
+    x    += xi * w ;
+    z    += zi * w ;
+    wtot += w ;
+
+  }
+
+  x /= wtot ;
+  z /= wtot ;
+  fLocPos.SetX(x)  ;
+  fLocPos.SetY(0.) ;
+  fLocPos.SetZ(z)  ;
+
+  LPos = fLocPos ;
+}
+
 //____________________________________________________________________________
 Float_t AliPHOSEmcRecPoint::GetMaximalEnergy(void)
 {
+  // Finds the maximum energy in the cluster
+  
   Float_t menergy = 0. ;
 
   Int_t iDigit;
@@ -350,6 +403,8 @@ Float_t AliPHOSEmcRecPoint::GetMaximalEnergy(void)
 //____________________________________________________________________________
 Int_t AliPHOSEmcRecPoint::GetMultiplicityAtLevel(Float_t H) 
 {
+  // Calculates the multiplicity of digits with energy larger than H*energy 
+  
   Int_t multipl   = 0 ;
   Int_t iDigit ;
   for(iDigit=0; iDigit<fMulDigit; iDigit++) {
@@ -363,6 +418,9 @@ Int_t AliPHOSEmcRecPoint::GetMultiplicityAtLevel(Float_t H)
 //____________________________________________________________________________
 Int_t  AliPHOSEmcRecPoint::GetNumberOfLocalMax(Int_t *  maxAt, Float_t * maxAtEnergy) 
 { 
+  // Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
+  //  energy difference between two local maxima
+
   AliPHOSDigit * digit ;
   AliPHOSDigit * digitN ;
   
@@ -410,50 +468,6 @@ Int_t  AliPHOSEmcRecPoint::GetNumberOfLocalMax(Int_t *  maxAt, Float_t * maxAtEn
   return iDigitN ;
 }
 
-//____________________________________________________________________________
-void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos)
-{
-  if( fLocPos.X() < 1000000.) { // already evaluated
-   LPos = fLocPos ;
-   return ;
-  }
-
-  Float_t wtot = 0. ;
-  Int_t relid[4] ;
-
-  Float_t x = 0. ;
-  Float_t z = 0. ;
-  
-  AliPHOSDigit * digit ;
-
-  AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
-
-  Int_t iDigit;
-
-
-  for(iDigit=0; iDigit<fMulDigit; iDigit++) {
-    digit = (AliPHOSDigit *) fDigitsList[iDigit];
-
-    Float_t xi ;
-    Float_t zi ;
-    phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
-    phosgeom->RelPosInModule(relid, xi, zi);
-    Float_t w = TMath::Max( 0., fW0 + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ;
-    x    += xi * w ;
-    z    += zi * w ;
-    wtot += w ;
-
-  }
-
-  x /= wtot ;
-  z /= wtot ;
-  fLocPos.SetX(x)  ;
-  fLocPos.SetY(0.) ;
-  fLocPos.SetZ(z)  ;
-
-  LPos = fLocPos ;
-}
 
 // //____________________________________________________________________________
 // AliPHOSEmcRecPoint& AliPHOSEmcRecPoint::operator = (AliPHOSEmcRecPoint Clu) 
@@ -492,6 +506,8 @@ void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos)
 //____________________________________________________________________________
 void AliPHOSEmcRecPoint::Print(Option_t * option) 
 {
+  // Print the list of digits belonging to the cluster
+  
   cout << "AliPHOSEmcRecPoint: " << endl ;
 
   AliPHOSDigit * digit ; 
@@ -520,8 +536,9 @@ void AliPHOSEmcRecPoint::Print(Option_t * option)
 //______________________________________________________________________________
 void AliPHOSEmcRecPoint::Streamer(TBuffer &R__b)
 {
-   // Stream an object of class AliPHOSEmcRecPoint.
-
+  // Stream an object of class AliPHOSEmcRecPoint.
+  // Needed because of the array fEnergyList
+  
    if (R__b.IsReading()) {
       Version_t R__v = R__b.ReadVersion(); if (R__v) { }
       AliPHOSRecPoint::Streamer(R__b);
index d8a9a72cbfa284d81a45944535b2468b960b0645..e040b9e8d98b63bc6785c49c10429fbbbcd7f6a0 100644 (file)
@@ -5,13 +5,11 @@
 
 /* $Id$ */
 
-//////////////////////////////////////////////////
-//  Rec Point in the EM calorimeter of PHOS     //
-//                                              //
-//  Author Dmitri Peressounko RRC KI            //
-//   comment: contains list of AliPHOSDigit's * //  
-//     and evaluates a few average values       //
-//////////////////////////////////////////////////
+//_________________________________________________________________________
+//  RecPoint implementation for PHOS-EMC 
+//  An EmcRecPoint is a cluster of digits   
+//           
+//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
 
 // --- ROOT system ---
 
@@ -30,7 +28,8 @@ public:
 
   AliPHOSEmcRecPoint(){} ;                    
   AliPHOSEmcRecPoint(Float_t W0, Float_t LocMaxCut) ;
-  virtual ~AliPHOSEmcRecPoint() ; 
+  virtual ~AliPHOSEmcRecPoint(){} 
+
   void        AddDigit(AliDigitNew & digit, Float_t Energy) ;  // add a digit to the digits list  
   Int_t       Compare(TObject * obj) ;                         // method for sorting  
   
@@ -57,12 +56,12 @@ private:
 
   Bool_t AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 ) ;
 
-  Float_t  fDelta ;        // parameter used to sort the clusters   
-  Float_t  fLocMaxCut ;    // parameter used for local maximum searc
+  Float_t  fDelta ;        // parameter used to sort the clusters    
+  Float_t  fLocMaxCut ;    // minimum energy difference to distinguish two maxima 
   Float_t * fEnergyList ;  // energy of digits
   Float_t  fW0 ;           // logarithmic weight factor for center of gravity calculation
 
-  ClassDef(AliPHOSEmcRecPoint,1)  // EMC RecPoint, version 1
+  ClassDef(AliPHOSEmcRecPoint,1)  // EMC RecPoint (cluster)
 
 };
 
index 9b9f4e042a9f87f821b25f42a97c6dccc369c818..29ee284a881d6169edc70b6bdd8671bf928d1fd6 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Particle modified by PHOS response to be used by AliPHOSvFast
-//*-- Y. Schutz:   SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+//  A  Particle modified by PHOS response and produced by AliPHOSvFast
+//  To become a general class of AliRoot ?    
+//               
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -35,6 +38,8 @@ ClassImp(AliPHOSFastRecParticle)
 //____________________________________________________________________________
  AliPHOSFastRecParticle::AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp)
 {
+  // copy ctor
+
   fType        = rp.fType ; 
   fPdgCode     = rp.fPdgCode;
   fStatusCode  = rp.fStatusCode;
@@ -60,6 +65,8 @@ ClassImp(AliPHOSFastRecParticle)
 //____________________________________________________________________________
  AliPHOSFastRecParticle::AliPHOSFastRecParticle(const TParticle & pp)
 {
+  // ctor from a TParticle (crummy?!)
   TParticle & pnoconst = const_cast<TParticle &>(pp) ;
   AliPHOSFastRecParticle & p = static_cast<AliPHOSFastRecParticle&>(pnoconst) ;
 
@@ -84,11 +91,6 @@ ClassImp(AliPHOSFastRecParticle)
   fParticlePDG = p.fParticlePDG; 
 }
 
-//____________________________________________________________________________
- AliPHOSFastRecParticle::~AliPHOSFastRecParticle()
-{
-}
-
 //____________________________________________________________________________
 Int_t AliPHOSFastRecParticle::DistancetoPrimitive(Int_t px, Int_t py)
 {
@@ -121,8 +123,7 @@ void AliPHOSFastRecParticle::ExecuteEvent(Int_t event, Int_t px, Int_t py)
 {
   //  Execute action corresponding to one event
   //  This member function is called when a AliPHOSFastRecParticle is clicked with the locator
-  //
-    
+     
   if (!gPad->IsEditable()) 
     return ;
 
@@ -156,9 +157,24 @@ void AliPHOSFastRecParticle::ExecuteEvent(Int_t event, Int_t px, Int_t py)
   }
 
 }
+
+//____________________________________________________________________________
+Int_t * AliPHOSFastRecParticle::GetPrimaries(Int_t & number) 
+{
+  // Retrieves the unique primary particle at the origine of the present reconstruced particle
+
+  number = 1 ; 
+  Int_t * list = new Int_t[1] ;
+  list[0] = fPrimary ; 
+  
+  return list ;
+}
+
 //____________________________________________________________________________
 TString AliPHOSFastRecParticle::Name()
 {
+  // Returns the name of the particle type
+  
   TString  name ; 
   switch (fType) {
   case kGAMMA:
@@ -190,27 +206,29 @@ TString AliPHOSFastRecParticle::Name()
 //______________________________________________________________________________
 void AliPHOSFastRecParticle::Paint(Option_t *)
 {
-// Paint this ALiRecParticle in theta,phi coordinate as a TMarker  with its current attributes
+  // Paint this ALiRecParticle in theta,phi coordinate as a TMarker  with its current attributes
 
   Double_t kRADDEG = 180. / TMath::Pi() ; 
-   Coord_t x = Phi() * kRADDEG     ;
-   Coord_t y = Theta() * kRADDEG     ;
-   Color_t markercolor = 1 ;
-   Size_t  markersize  = 1. ;
-   Style_t markerstyle = 5 ;
-
-   if (!gPad->IsBatch()) {
-     gVirtualX->SetMarkerColor(markercolor) ;
-     gVirtualX->SetMarkerSize (markersize)  ;
-     gVirtualX->SetMarkerStyle(markerstyle) ;
-   }
-   gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
-   gPad->PaintPolyMarker(1,&x,&y,"") ;
+  Coord_t x = Phi() * kRADDEG     ;
+  Coord_t y = Theta() * kRADDEG     ;
+  Color_t markercolor = 1 ;
+  Size_t  markersize  = 1. ;
+  Style_t markerstyle = 5 ;
+  
+  if (!gPad->IsBatch()) {
+    gVirtualX->SetMarkerColor(markercolor) ;
+    gVirtualX->SetMarkerSize (markersize)  ;
+    gVirtualX->SetMarkerStyle(markerstyle) ;
+  }
+  gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+  gPad->PaintPolyMarker(1,&x,&y,"") ;
 }
 
 //____________________________________________________________________________
 void AliPHOSFastRecParticle::Print()
 {
+  // Print the typr, energy and momentum
+  
   cout << "AliPHOSFastRecParticle > " << "type is  " << Name() << endl 
        << "                     " << "Energy = " << fE << endl 
        << "                     " << "Px     = " << fPx << endl 
index e4e026ef978b0aab555209cc4f75af7a21bd1c1e..1a5aa93a45c158b79934769f45cc395842d7700a 100644 (file)
@@ -5,12 +5,11 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  A  Particle modified by PHOS response     //
-//  Yves Schutz SUBATECH                      //
-//  To become a general class of AliRoot ?    //  
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  A  Particle modified by PHOS response and produced by AliPHOSvFast
+//  To become a general class of AliRoot ?    
+//               
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -21,9 +20,8 @@
 
 // --- AliRoot header files ---
 
-//#include "AliPHOSRecParticle.h" 
-
 typedef TClonesArray  FastRecParticlesList ; 
+
 const static Int_t kUNDEFINED     = -1; 
 const static Int_t kGAMMA         = 0 ; 
 const static Int_t kELECTRON      = 1 ;
@@ -42,22 +40,25 @@ public:
   AliPHOSFastRecParticle() {};          // ctor
   AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) ;  // ctor
   AliPHOSFastRecParticle(const TParticle & p) ;  // ctor
-  virtual ~AliPHOSFastRecParticle() ; // dtor
+  virtual ~AliPHOSFastRecParticle(){}  // dtor
 
   virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) ; 
   virtual void Draw(Option_t *option) ;  
-  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ; 
+  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
+  virtual Int_t * GetPrimaries(Int_t & number) ;
   Int_t GetType() { return fType ; } 
   TString Name() ; 
   virtual void Paint(Option_t * option="");
   void Print() ; 
+  void SetPrimary(Int_t index) { fPrimary = index ; }
   void SetType(Int_t type) { fType = type ; } 
 
 protected:
 
-  Int_t fType ;   // identified particle type
+  Int_t fType ;    // particle type obtained by "virtual" reconstruction
+  Int_t fPrimary ; // (unique) primary particle index 
 
-  ClassDef(AliPHOSFastRecParticle,1)  // Reconstructed Particle, version 1
+  ClassDef(AliPHOSFastRecParticle,1)  // Reconstructed Particle produced by the fast simulation 
 
 };
 
index 51c75ff2f072f6b3bb2619ebd3a8d84ae8c9e214..fe087f90a3d898181a6c2a612deeba8aa7f81749 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Geometry class for PHOS version SUBATECH
-//*-- Author : Y. Schutz SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+// Geometry class  for PHOS : singleton  
+// The EMC modules are parametrized so that any configuration can be easily implemented 
+// The title is used to identify the type of CPV used. So far only PPSD implemented
+//                  
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -26,7 +30,6 @@
 // --- Standard library ---
 
 #include <iostream>
-#include <cassert>
 
 // --- AliRoot header files ---
 
@@ -41,6 +44,8 @@ ClassImp(AliPHOSGeometry)
 //____________________________________________________________________________
 AliPHOSGeometry::~AliPHOSGeometry(void)
 {
+  // dtor
+
   fRotMatrixArray->Delete() ; 
   delete fRotMatrixArray ; 
 }
@@ -48,11 +53,12 @@ AliPHOSGeometry::~AliPHOSGeometry(void)
 //____________________________________________________________________________
 Bool_t AliPHOSGeometry::AbsToRelNumbering(const Int_t AbsId, Int_t * relid)
 {
-  // relid[0] = PHOS Module number 1:fNModules 
-  // relid[1] = 0 if PbW04
-  //          = PPSD Module number 1:fNumberOfModulesPhi*fNumberOfModulesZ*2 (2->up and bottom level)
-  // relid[2] = Row number inside a PHOS or PPSD module
-  // relid[3] = Column number inside a PHOS or PPSD module
+  // Converts the absolute numbering into the following array/
+  //  relid[0] = PHOS Module number 1:fNModules 
+  //  relid[1] = 0 if PbW04
+  //           = PPSD Module number 1:fNumberOfModulesPhi*fNumberOfModulesZ*2 (2->up and bottom level)
+  //  relid[2] = Row number inside a PHOS or PPSD module
+  //  relid[3] = Column number inside a PHOS or PPSD module
 
   Bool_t rv  = kTRUE ; 
   Float_t id = AbsId ;
@@ -166,7 +172,8 @@ void AliPHOSGeometry::ImpactOnEmc(const Double_t theta, const Double_t phi, Int_
 //____________________________________________________________________________
 void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrix & gmat)
 {
-
+  // Calculates the ALICE global coordinates of a RecPoint and the error matrix
   AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ;  
   TVector3 localposition ;
 
@@ -206,6 +213,8 @@ void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TM
 //____________________________________________________________________________
 void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos)
 {
+  // Calculates the ALICE global coordinates of a RecPoint 
+
   AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ;  
   TVector3 localposition ;
   tmpPHOS->GetLocalPosition(gpos) ;
@@ -242,6 +251,8 @@ void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos)
 //____________________________________________________________________________
 void AliPHOSGeometry::Init(void)
 {
+  // Initializes the PHOS parameters
+  
   fRotMatrixArray = new TObjArray(fNModules) ; 
 
   cout << "PHOS geometry setup: parameters for option " << fName << " " << fTitle << endl ;
@@ -260,7 +271,7 @@ void AliPHOSGeometry::Init(void)
 //____________________________________________________________________________
 void AliPHOSGeometry::InitPHOS(void)
 {
-     // PHOS 
+  // Initializes the EMC parameters
 
   fNPhi     = 64 ; 
   fNZ       = 64 ; 
@@ -335,7 +346,7 @@ void AliPHOSGeometry::InitPHOS(void)
 //____________________________________________________________________________
 void AliPHOSGeometry::InitPPSD(void)
 {
-    // PPSD
+  // Initializes the PPSD parameters
     
   fAnodeThickness           = 0.0009 ; 
   fAvalancheGap             = 0.01 ; 
@@ -375,12 +386,16 @@ void AliPHOSGeometry::InitPPSD(void)
 //____________________________________________________________________________
 AliPHOSGeometry *  AliPHOSGeometry::GetInstance() 
 { 
+  // Returns the pointer of the unique instance
+  
   return (AliPHOSGeometry *) fGeom ; 
 }
 
 //____________________________________________________________________________
 AliPHOSGeometry *  AliPHOSGeometry::GetInstance(const Text_t* name, const Text_t* title) 
 {
+  // Returns the pointer of the unique instance
+
   AliPHOSGeometry * rv = 0  ; 
   if ( fGeom == 0 ) {
     fGeom = new AliPHOSGeometry(name, title) ; 
@@ -400,9 +415,9 @@ AliPHOSGeometry *  AliPHOSGeometry::GetInstance(const Text_t* name, const Text_t
 //____________________________________________________________________________
 Bool_t AliPHOSGeometry::RelToAbsNumbering(const Int_t * relid, Int_t &  AbsId)
 {
-
-  // AbsId = 1:fNModules * fNPhi * fNZ  -> PbWO4
-  // AbsId = 1:fNModules * 2 * (fNumberOfModulesPhi * fNumberOfModulesZ) * fNumberOfPadsPhi * fNumberOfPadsZ -> PPSD
+  // Converts the relative numbering into the absolute numbering
+  //  AbsId = 1:fNModules * fNPhi * fNZ  -> PbWO4
+  //  AbsId = 1:fNModules * 2 * (fNumberOfModulesPhi * fNumberOfModulesZ) * fNumberOfPadsPhi * fNumberOfPadsZ -> PPSD
 
   Bool_t rv = kTRUE ; 
  
@@ -430,6 +445,8 @@ Bool_t AliPHOSGeometry::RelToAbsNumbering(const Int_t * relid, Int_t &  AbsId)
 
 void AliPHOSGeometry::RelPosInAlice(const Int_t id, TVector3 & pos ) 
 {
+  // Converts the absolute numbering into the global ALICE coordinates
+  
    if (id > 0) { 
 
   Int_t relid[4] ;
@@ -484,6 +501,8 @@ void AliPHOSGeometry::RelPosInAlice(const Int_t id, TVector3 & pos )
 //____________________________________________________________________________
 void AliPHOSGeometry::RelPosInModule(const Int_t * relid, Float_t & x, Float_t & z) 
 {
+  // Converts the relative numbering into the local PHOS-module (x, z) coordinates
+  
   Int_t ppsdmodule  ; 
   Int_t row        = relid[2] ; //offset along z axiz
   Int_t column     = relid[3] ; //offset along x axiz
@@ -511,6 +530,8 @@ void AliPHOSGeometry::RelPosInModule(const Int_t * relid, Float_t & x, Float_t &
 //____________________________________________________________________________
 void AliPHOSGeometry::SetPHOSAngles() 
 { 
+  // Calculates the position in ALICE of the PHOS modules
+  
   Double_t const kRADDEG = 180.0 / kPI ;
   Float_t pphi =  TMath::ATan( fOuterBoxSize[0]  / ( 2.0 * fIPtoOuterCoverDistance ) ) ;
   pphi *= kRADDEG ;
@@ -525,6 +546,7 @@ void AliPHOSGeometry::SetPHOSAngles()
 void AliPHOSGeometry::SetLeadConverterThickness(Float_t e) 
 {
   // should ultimately disappear 
+  
   cout << " AliPHOSGeometry WARNING : You have changed LeadConverterThickness from " 
        << fLeadConverterThickness << " to " << e << endl ;
 
index 1950901437af9394835ac561bca0e7ffeb3246d4..936810af6b880e0eeb5a9feb8e4177f9a4d8263d 100644 (file)
@@ -5,13 +5,12 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  Geometry class  for PHOS : singleton      //
-//  Version SUBATECH                          //
-//  Author  Y. Schutz SUBATECH                //
-//       geometry parametrized for any        //  
-//       shape of modules                     //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Geometry class  for PHOS : singleton  
+// The EMC modules are parametrized so that any configuration can be easily implemented 
+// The title is used to identify the type of CPV used. So far only PPSD implemented
+//                  
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -32,7 +31,7 @@ class AliPHOSGeometry : public AliGeometry {
 
 public: 
 
-  AliPHOSGeometry() {} ;  // must be kept public for root persistency purposes
+  AliPHOSGeometry() {} ;  // must be kept public for root persistency purposes, but should never be called by the outside world
   virtual ~AliPHOSGeometry(void) ; 
   static AliPHOSGeometry * GetInstance(const Text_t* name, const Text_t* title) ; 
   static AliPHOSGeometry * GetInstance() ; 
@@ -50,9 +49,9 @@ public:
 
   // General
 
-  Bool_t AbsToRelNumbering(const Int_t AbsId, Int_t * RelId) ;           // converts the absolute PHOS numbering to a relative 
+  Bool_t AbsToRelNumbering(const Int_t AbsId, Int_t * RelId) ; // converts the absolute PHOS numbering to a relative 
   void EmcModuleCoverage(const Int_t m, Double_t & tm, Double_t & tM, Double_t & pm, Double_t & pM, Option_t * opt = kRadian);    
-                                                                         // calculates the angular coverage in theta and phi of a EMC module
+                                                         // calculates the angular coverage in theta and phi of a EMC module
   void EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t * opt = kRadian) ; 
                                                                          // calculates the angular coverage in theta and phi of a 
                                                                          // single crystal in a EMC module
@@ -77,6 +76,8 @@ public:
   Float_t    GetGapBetweenCrystals(void)          const { return fGapBetweenCrystals ; }
   Float_t    GetIPtoCrystalSurface(void)          const { return fIPtoCrystalSurface ; }
   Float_t    GetIPtoOuterCoverDistance(void)      const { return fIPtoOuterCoverDistance ; }
+  Float_t    GetIPtoPpsdUp(void)                  const { return (fIPtoOuterCoverDistance - fPPSDBoxSize[1] + fPPSDModuleSize[1]/2 ); } 
+  Float_t    GetIPtoPpsdLow(void)                 const { return (fIPtoOuterCoverDistance - fPPSDModuleSize[1]/2 ); } 
   Float_t    GetIPtoTopLidDistance(void)          const { return fIPtoTopLidDistance ; }
   Float_t    GetLowerThermoPlateThickness(void)   const { return fLowerThermoPlateThickness ; }
   Float_t    GetLowerTextolitPlateThickness(void) const { return fLowerTextolitPlateThickness ; }
@@ -188,7 +189,7 @@ private:
 
   static AliPHOSGeometry * fGeom ; // pointer to the unique instance of the singleton 
 
-  ClassDef(AliPHOSGeometry,1)  // PHOS geometry class , version subatech
+  ClassDef(AliPHOSGeometry,1)  // PHOS geometry class 
 
 } ;
 
index afe9fae822117115e665f7b5d185837592a2cc2a..4864a7bf7da6bafcc01b1a33c16744e95680876a 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Hit classes for PHOS
-//*-- Author : Maxim Volkov, RRC KI
-//////////////////////////////////////////////////////////////////////////////
+//  Hits class for PHOS     
+//  A hit in PHOS is the sum of all hits in a single crystal
+//               
+//*-- Author: Maxime Volkov (RRC KI) & Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -25,7 +28,6 @@
 #include <cstring>
 #include <cstdlib>
 #include <strstream>
-#include <cassert>
 
 // --- AliRoot header files ---
 #include "AliPHOSHit.h"
@@ -38,7 +40,8 @@ ClassImp(AliPHOSHit)
 //____________________________________________________________________________
 AliPHOSHit::AliPHOSHit(Int_t primary, Int_t id, Float_t *hits)
 {
-
+  // ctor
+  
    fId         = id ;
    fX          = hits[0] ;
    fY          = hits[1] ;
@@ -50,6 +53,8 @@ AliPHOSHit::AliPHOSHit(Int_t primary, Int_t id, Float_t *hits)
 //____________________________________________________________________________
 Bool_t AliPHOSHit::operator==(AliPHOSHit const &rValue) const
 { 
+  // Two hits are identical if they have the same Id and originate from the same primary
+
   Bool_t rv = kFALSE ; 
 
   if ( fId == rValue.GetId() && fPrimary == rValue.GetPrimary() ) 
@@ -61,6 +66,7 @@ Bool_t AliPHOSHit::operator==(AliPHOSHit const &rValue) const
 //____________________________________________________________________________
 AliPHOSHit AliPHOSHit::operator+(const AliPHOSHit &rValue) const
 {
+  // Add the energy of the hit
   
   AliPHOSHit added(*this);
 
@@ -70,8 +76,6 @@ AliPHOSHit AliPHOSHit::operator+(const AliPHOSHit &rValue) const
 
    added.fELOS += rValue.GetEnergy() ;
     
-   assert ( added.fPrimary == rValue.fPrimary ) ; 
-
    return added;
 
 }
@@ -79,6 +83,8 @@ AliPHOSHit AliPHOSHit::operator+(const AliPHOSHit &rValue) const
 //____________________________________________________________________________
 ostream& operator << (ostream& out, const AliPHOSHit& hit) 
 {
+  // Print out Id and energy 
+  
   out << "AliPHOSHit = " << hit.GetId() << " " << hit.GetEnergy() << endl ;
   return out ;
 }
index d7389999c96dbce56ec3fed0832d3811788156ac..57b911e3508c5960fd6a3dc78201b5417ebdfa64 100644 (file)
@@ -3,22 +3,14 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-////////////////////////////////////////////////
-//  Hits class for PHOS                       //
-//  Version SUBATECH                          //
-//  A hit in PHOS is the sum of all hits in a //
-//  a single crystal due to one ans only one  //  
-//  primary particle                          //
-//  Author M. Volkov, RRC KI                  //
-//  october 1999:                             // 
-//            Modified by Y. Schutz SUBATECH  //
-//  january 2000:                             // 
-//            Modified by Y. Schutz SUBATECH  //
-//            added fPrimary                  //
-////////////////////////////////////////////////
-
 /* $Id$ */
 
+//_________________________________________________________________________
+//  Hits class for PHOS     
+//  A hit in PHOS is the sum of all hits in a single crystal
+//               
+//*-- Author: Maxime Volkov (RRC KI) & Yves Schutz (SUBATECH)
+
 // --- ROOT system ---
 
 // --- AliRoot header files ---
@@ -51,7 +43,7 @@ private:
   Float_t   fELOS ;      // Energy deposited
   Int_t     fPrimary ;   // Primary particles at the origine of the hit
 
-  ClassDef(AliPHOSHit,1)  // Hits object for PHOS
+  ClassDef(AliPHOSHit,1)  // Hit for PHOS
 
 } ;
 
index 1a78b2427211d9ed734e415507c77b61fc07bc56..6391a34009e9d985a229655cd04fbd4a5bad5ddc 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Auxiliary class, used ONLY by AliPHOSTrackSegmentMaker
-//*-- Author : Dmitri Peressounko  SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+//  Algorithm class used only by AliPHOSTrackSegmentMaker 
+//                  
+//*-- Author: Dmitri Peressounko (SUBATECH)
 
 // --- ROOT system ---
 
@@ -30,6 +32,8 @@ ClassImp(AliPHOSLink)
 //____________________________________________________________________________
   AliPHOSLink::AliPHOSLink(Float_t r, Int_t Emc, Int_t Ppsd)
 {
+  // ctor
+
   fR     = r ;  
   fEmcN  = Emc ;
   fPpsdN = Ppsd ;   
@@ -38,6 +42,8 @@ ClassImp(AliPHOSLink)
 //____________________________________________________________________________
 Int_t AliPHOSLink::Compare(TObject * obj)
 {
+  // Compare according to the distance between EMC and PPSD RecPoints in a track segment 
+
   Int_t rv ;
 
   AliPHOSLink * link = (AliPHOSLink *) obj ;
index fa01ce9dee0b1a8d2ea024da6ae15c5b7c3e194c..7d5c5e3a00bfdecefad3ca0ccc4c17dc474f0d62 100644 (file)
@@ -5,13 +5,10 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  Short description                         //
-//  Version SUBATECH                          //
-//  Author Dmitri Peressounko   SUBATECH      //
-//      comment: auxiliary class used   ONLY  //  
-//               by AliPHOSTrackSegmentMaker  //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  Algorithm class used only by AliPHOSTrackSegmentMaker 
+//                  
+//*-- Author: Dmitri Peressounko (SUBATECH)
 
 // --- ROOT system ---
 
@@ -38,9 +35,9 @@ private:
   
   Int_t fEmcN ;  // Emc index
   Int_t fPpsdN ; // Ppsd index 
-  Float_t fR ;   // Distance 
+  Float_t fR ;   // Distance between EMC and PPSD RecPoints in a track segment 
   
-  ClassDef(AliPHOSLink,1)  // description , version 1
+  ClassDef(AliPHOSLink,1)  // Auxilliary algorithm class used by AliPHOSTrackSegmentMaker
 
 };
 
index b7958b7d897cf8dc9c849345e1fd4747b7376754..65456912e09fc5b6c81a11deef7e9ef2c9d7ef8e 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// To identify the type of particle detected in PHOS with or without the help 
-// from other detectors
-//*-- Author : Yves Schutz  SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+//  Algorithm class for the identification of particles detected in PHOS        
+//  base  class                             
+//                  
+//*-- Author: Yves Schutz (SUBATECH)
+
 
 // --- ROOT system ---
 
index f538eb0d1dea7a4ca81754f85a1803807ce829b6..480e6f2577dc924246805cae9953dcba0eb8a48b 100644 (file)
@@ -5,15 +5,11 @@
                             
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  Algorithme class for the identification of//
-//          particles detected in PHOS        //
-//  base  class                               //
-//  Version SUBATECH                          //
-//  Author Yves Schutz     SUBATECH           //
-//                                            //  
-//   pABC                                     //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  Algorithm class for the identification of particles detected in PHOS        
+//  base  class                             
+//                  
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -40,7 +36,7 @@ public:
   virtual void SetShowerProfileCuts(Float_t, Float_t, Float_t, Float_t) {} ; 
   virtual void SetDispersionCutOff(Float_t ) {}    
 
-  ClassDef(AliPHOSPID,1)  // Particle Identifier interface, version 1
+  ClassDef(AliPHOSPID,1)  // Particle Identifier algorithm (base class)
 
 } ;
 
index ec95def00ab9f4ebe945aedce61d22540e30f66e..df6fdfc16420dcfeb89d605556687e482104a8c1 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Algorithm class to identify the type of particle from the PHOS TrackSegment alone 
-//*-- Author : Y. Schutz SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Implementation version v1 of the PHOS particle identifier 
+// Identification is based on information from PPSD and EMC
+//                  
+//*-- Author: Yves Schutz (SUBATECH)
+
 
 // --- ROOT system ---
 
 
 ClassImp( AliPHOSPIDv1) 
 
-
-//____________________________________________________________________________
- AliPHOSPIDv1::AliPHOSPIDv1(): fCutOnDispersion(1.5) 
-
-{
-  // ctor
-
-}
-
-//____________________________________________________________________________
- AliPHOSPIDv1::~AliPHOSPIDv1()
-{ 
-  // dtor
-}
-
-
 //____________________________________________________________________________
 void  AliPHOSPIDv1::MakeParticles(TrackSegmentsList * trsl, RecParticlesList * rpl)
 {
-  // main function, does the job
+  // Makes a RecParticle out of a TrackSegment
 
   TIter next(trsl) ; 
   AliPHOSTrackSegment * tracksegment ; 
@@ -112,6 +100,8 @@ void  AliPHOSPIDv1::MakeParticles(TrackSegmentsList * trsl, RecParticlesList * r
 //____________________________________________________________________________
 void  AliPHOSPIDv1:: Print() 
 {
+  // Print the parameters used for the particle type identification
+  
   cout << "AliPHOSPIDv1 : cuts for the particle idendification based on the shower profile " << endl 
        << fLambda1m << " < value1 < " << fLambda1M << endl 
        << fLambda2m << " < value2 < " << fLambda2M << endl ;  
@@ -121,6 +111,8 @@ void  AliPHOSPIDv1:: Print()
 //____________________________________________________________________________
 void  AliPHOSPIDv1::SetShowerProfileCuts(Float_t l1m, Float_t l1M, Float_t l2m, Float_t l2M)
 {
+  // Modifies the parameters used for the particle type identification
+
   fLambda1m = l1m ; 
   fLambda1M = l1M ; 
   fLambda2m = l2m ; 
index e983074b358a8a6072d2774e4c42546108e1102f..d8be9467450686a29cc1f7cfbc7e0cd3a7911f76 100644 (file)
@@ -5,13 +5,12 @@
 
 /* $Id$ */
 
-///////////////////////////////////////////////////
-//  Particle Identifier   class for PHOS         //
-//  Version SUBATECH                             //
-//  Author Yves Schutz                           //
-//     comment: identify the type of particle    //  
-//              PHOS SubTrack alone              //
-///////////////////////////////////////////////////
+
+//_________________________________________________________________________
+// Implementation version v1 of the PHOS particle identifier 
+// Identification is based on information from PPSD and EMC
+//                  
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -25,8 +24,8 @@ class  AliPHOSPIDv1 : public AliPHOSPID {
 
 public:
 
-  AliPHOSPIDv1() ;                     
-  virtual ~ AliPHOSPIDv1() ; // dtor
+  AliPHOSPIDv1(): fCutOnDispersion(1.5){}                     
+  virtual ~ AliPHOSPIDv1(){} ; // dtor
 
   virtual void MakeParticles(TrackSegmentsList * trsl, RecParticlesList * rpl ) ; // does the job
   void Print() ; 
@@ -36,14 +35,13 @@ public:
  private:
 
   // cuts on the shower profile 
-  Float_t fLambda1m ; // minimum value for first elips axis
-  Float_t fLambda1M ; // maximum value for first elips axis
-  Float_t fLambda2m ; // minimum value for second elips axis
-  Float_t fLambda2M ; // maximum value for second elips axis
-
+  Float_t fLambda1m ;        // minimum value for first elips axis
+  Float_t fLambda1M ;        // maximum value for first elips axis
+  Float_t fLambda2m ;        // minimum value for second elips axis
+  Float_t fLambda2M ;        // maximum value for second elips axis
   Float_t fCutOnDispersion ; // cut on the shower dispersion to distinguish hadronic from EM showers
 
-  ClassDef( AliPHOSPIDv1,1)  // particle identifier implementation , version 1
+  ClassDef( AliPHOSPIDv1,1)  // Particle identifier implementation version 1
 
 };
 
index a904ec4e72408a5abdeea3abba2bc7dd59f54d8f..97afc032c2844bc717056ae8cc87933eca0d08e2 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// RecPoint in the PHOS PPSD: a list of AliPHOSDigit's
-//*-- Author : Yves Schutz  SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+//  A RecPoint (cluster) in the PPSD 
+//  A PPSD RecPoint ends up to be a single digit
+//                
+//*--  Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
+
 #include "TPad.h"
+
 // --- Standard library ---
 
 #include <iostream>
-#include <cassert>
 
 // --- AliRoot header files ---
 
@@ -36,18 +40,14 @@ ClassImp(AliPHOSPpsdRecPoint)
 //____________________________________________________________________________
 AliPHOSPpsdRecPoint::AliPHOSPpsdRecPoint(void)
 { 
+  // ctor
+
   fMulDigit = 0 ;  
   AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;  
   fDelta = geom->GetCrystalSize(0) ; 
   fLocPos.SetX(1000000.)  ;      //Local position should be evaluated
 }
 
-//____________________________________________________________________________
-AliPHOSPpsdRecPoint::~AliPHOSPpsdRecPoint(void) // dtor
-{ 
-  //dtor  
-}
-
 //____________________________________________________________________________
 void AliPHOSPpsdRecPoint::AddDigit(AliDigitNew & digit, Float_t Energy)
 {
@@ -76,12 +76,11 @@ void AliPHOSPpsdRecPoint::AddDigit(AliDigitNew & digit, Float_t Energy)
   fAmp += Energy ; 
 }
 
-
-
-
 //____________________________________________________________________________
 Int_t AliPHOSPpsdRecPoint::Compare(TObject * obj)
 {
+  // Compares according to the position
+  
   Int_t rv ; 
   
   AliPHOSPpsdRecPoint * clu = (AliPHOSPpsdRecPoint *)obj ; 
@@ -154,8 +153,10 @@ Int_t AliPHOSPpsdRecPoint::Compare(TObject * obj)
 }
 
 //____________________________________________________________________________
-void AliPHOSPpsdRecPoint::GetLocalPosition(TVector3 &LPos){
-
+void AliPHOSPpsdRecPoint::GetLocalPosition(TVector3 &LPos)
+{
+  // Calculates the local position in the PHOS-PPSD-module corrdinates
+  
   if( fLocPos.X() < 1000000.) { //allready evaluated
    LPos = fLocPos ;
    return ;
@@ -216,32 +217,35 @@ Bool_t AliPHOSPpsdRecPoint::GetUp()
 //______________________________________________________________________________
 void AliPHOSPpsdRecPoint::Paint(Option_t *)
 {
-//*-*-*-*-*-*-*-*-*-*-*Paint this ALiRecPoint as a TMarker  with its current attributes*-*-*-*-*-*-*
-//*-*                  =============================================
-   TVector3 pos(0.,0.,0.) ;
-   GetLocalPosition(pos) ;
-   Coord_t x = pos.X() ;
-   Coord_t y = pos.Z() ;
-   Color_t markercolor = 1 ;
-   Size_t  markersize  = 1. ;
-   Style_t markerstyle = 2 ;
-   if (GetUp()) 
-     markerstyle = 3 ;
-
-   if (!gPad->IsBatch()) {
-     gVirtualX->SetMarkerColor(markercolor);
-     gVirtualX->SetMarkerSize (markersize);
-     gVirtualX->SetMarkerStyle(markerstyle);
-   }
-   gPad->SetAttMarkerPS(markercolor,markerstyle,markersize);
-   gPad->PaintPolyMarker(1,&x,&y,"");
-
-
+  //*-*-*-*-*-*-*-*-*-*-*Paint this ALiRecPoint as a TMarker  with its current attributes*-*-*-*-*-*-*
+  //*-*                  =============================================
+
+  TVector3 pos(0.,0.,0.) ;
+  GetLocalPosition(pos) ;
+  Coord_t x = pos.X() ;
+  Coord_t y = pos.Z() ;
+  Color_t markercolor = 1 ;
+  Size_t  markersize  = 1. ;
+  Style_t markerstyle = 2 ;
+  if (GetUp()) 
+    markerstyle = 3 ;
+  
+  if (!gPad->IsBatch()) {
+    gVirtualX->SetMarkerColor(markercolor);
+    gVirtualX->SetMarkerSize (markersize);
+    gVirtualX->SetMarkerStyle(markerstyle);
+  }
+  gPad->SetAttMarkerPS(markercolor,markerstyle,markersize);
+  gPad->PaintPolyMarker(1,&x,&y,"");
+  
+  
 }
 
 //____________________________________________________________________________
 void AliPHOSPpsdRecPoint::Print(Option_t * option) 
 {
+  // Print the digits information 
+  
   cout << "AliPHOSPpsdRecPoint: " << endl ;
   
   AliPHOSDigit * digit ; 
@@ -267,35 +271,3 @@ void AliPHOSPpsdRecPoint::Print(Option_t * option)
 }
 
 
-// //____________________________________________________________________________
-// AliPHOSPpsdRecPoint& AliPHOSPpsdRecPoint::operator = (AliPHOSPpsdRecPoint Clu)
-// {
-//  int* DL = Clu.GetDigitsList() ; 
-  
-//   if(fDigitsList) 
-//     delete fDigitsList ;
-
-//   AliPHOSDigit * digit ;
-//   Int_t iDigit;
-
-//   for(iDigit=0; iDigit<fMulDigit; iDigit++) {
-//     digit = (AliPHOSDigit *) DL[iDigit];
-//     AddDigit(*digit) ;
-//   }
-
-//   fDelta = Clu.GetDelta() ; 
-//   delete DL ; 
-
-//   fAmp       = Clu.GetEnergy() ;
-//   fGeom      = Clu.GetGeom() ;
-//   TVector3 LocPos;
-//   Clu.GetLocalPosition(LocPos) ;
-//   fLocPos    = LocPos;
-//   fMulDigit  = Clu.GetMultiplicity() ;
-//   fMaxDigit  = Clu.GetMaximumMultiplicity() ;
-//   fPHOSMod   = Clu.GetPHOSMod() ;
-  
-
-//   return *this ;
-// }
index 93e43a1b8af5ba01ce676507cfbfb97466badb65..c069b011489d024ae3c74d1e0e8e352a84dc8e0d 100644 (file)
@@ -5,13 +5,11 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  Cluster in the PPSD of PHOS               //
-//  Version SUBATECH                          //
-//  Author Yves Schutz     SUBATECH           //
-//      comment: its a list of AliPHOSDigit's //  
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  A RecPoint (cluster) in the PPSD 
+//  A PPSD RecPoint ends up to be a single digit
+//                
+//*--  Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -26,29 +24,28 @@ class AliPHOSPpsdRecPoint : public AliPHOSRecPoint {
 
 public:
 
-  AliPHOSPpsdRecPoint() ;          // ctor   
-  virtual ~AliPHOSPpsdRecPoint() ; // dtor
- void AddDigit(AliDigitNew & digit, Float_t Energy) ;
+  AliPHOSPpsdRecPoint() ;           // ctor   
+  virtual ~AliPHOSPpsdRecPoint(){}  // dtor
+
+  void AddDigit(AliDigitNew & digit, Float_t Energy) ;
   Int_t   Compare(TObject * obj) ;                    // method to sort clusters
 
   Float_t GetDelta(void) {return fDelta ;}
   Int_t   GetMultiplicity(void) const { return fMulDigit ; } 
   Int_t   GetMaximumMultiplicity() { return   fMaxDigit ; } 
   void    GetLocalPosition(TVector3 &LPos) ; // computes the position in the module of the cluster center 
-  Float_t GetTotalEnergy(void) const { return fAmp ; }    // in Ppsd EMC RecPoint Amp = Energy                                        //projection of ALICE axes on PHOS Module, y = 0 .
+  Float_t GetTotalEnergy(void) const { return fAmp ; }    // in Ppsd EMC RecPoint Amp = Energy                             
   Bool_t  GetUp() ;               // true if cluster is in upper ppsd 
   Bool_t  IsEmc(void) {return kFALSE ; } 
   Bool_t  IsSortable() const { return kTRUE ; }
   virtual void  Paint(Option_t * option="");
   void    Print(Option_t * opt = "void") ; 
 
-  //  AliPHOSPpsdRecPoint&  operator = (AliPHOSPpsdRecPoint Clu) ;
-
 private:
 
   Float_t        fDelta ;         // parameter used for sorting
   
-  ClassDef(AliPHOSPpsdRecPoint,1)  // PPSD RecPoint, version 1
+  ClassDef(AliPHOSPpsdRecPoint,1)  // PPSD RecPoint
 
 };
 
index 47bac8c9bf8ed2f39cadfc997b7d41b731405bb8..77ca26ad1905d103b5c727b5aadebae3a7ef641e 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Reconstructed Particle
-//*-- Y. Schutz:   SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+//  A Reconstructed Particle in PHOS    
+//  To become a general class of AliRoot ?        
+//       
+//*-- Author: Yves Schutz (SUBATECH)
+
 
 // --- ROOT system ---
 
@@ -48,8 +52,11 @@ ClassImp(AliPHOSRecParticle)
 //____________________________________________________________________________
  AliPHOSRecParticle::AliPHOSRecParticle(const AliPHOSRecParticle & rp)
 {
+  // copy ctor
+
   fPHOSTrackSegment = new AliPHOSTrackSegment( *( rp.GetPHOSTrackSegment()) ) ; 
   fType             = rp.fType ; 
+
   fPdgCode     = rp.fPdgCode;
   fStatusCode  = rp.fStatusCode;
   fMother[0]   = rp.fMother[0];
@@ -74,8 +81,53 @@ ClassImp(AliPHOSRecParticle)
 //____________________________________________________________________________
  AliPHOSRecParticle::~AliPHOSRecParticle()
 {
+  // dtor
+
   if(!fPHOSTrackSegment) {
     delete fPHOSTrackSegment ;
     fPHOSTrackSegment = 0 ; 
   } 
 }
+
+//____________________________________________________________________________
+Int_t * AliPHOSRecParticle::GetPrimaries(Int_t & number) 
+{
+  // Retrieves all the primary particles at the origine of this reconstructed particle
+
+  Int_t emcnumber = 0 ; 
+  Int_t * emclist = fPHOSTrackSegment->GetPrimariesEmc(emcnumber) ;
+  
+  Int_t ppsdlnumber = 0 ; 
+  Int_t * ppsdllist = fPHOSTrackSegment->GetPrimariesPpsdLow(ppsdlnumber) ;
+  Int_t ppsdunumber = 0 ; 
+  Int_t * ppsdulist = fPHOSTrackSegment->GetPrimariesPpsdUp(ppsdunumber) ;
+
+  number = emcnumber + ppsdlnumber + ppsdunumber ;
+  Int_t * list   = new Int_t[number] ;
+  
+  Int_t index ; 
+  for ( index = 0 ; index < emcnumber ; index++)
+    list[index] = emclist[index] ;
+
+  Int_t jndex ; 
+  for ( jndex = 0 ; jndex < ppsdlnumber ; jndex++) {
+    assert(index < number) ;
+    list[index] = ppsdllist[jndex] ;
+    index++ ; 
+  }
+
+  for ( jndex = 0 ; jndex < ppsdunumber ; jndex++) {
+    assert(index < number) ;
+    list[index] = ppsdulist[jndex] ;
+    index++ ; 
+  }
+
+  cout << "passed 6 " << endl;
+
+  delete emclist ;
+  delete ppsdllist ;
+  delete ppsdulist ;
+
+  return list ; 
+}
index eb0ae1c0ba6c7a04d33ec5c0980f2a31583fc14d..ab35b5a6e6bfffe090013ba3911b8233ccaddb19 100644 (file)
@@ -5,12 +5,11 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  A Reconstructed Particle in PHOS          //
-//  Yves Schutz SUBATECH                      //
-//  To become a general class of AliRoot ?    //  
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  A Reconstructed Particle in PHOS    
+//  To become a general class of AliRoot ?        
+//       
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -34,13 +33,13 @@ public:
   virtual ~AliPHOSRecParticle() ; // dtor
 
   AliPHOSTrackSegment * GetPHOSTrackSegment() const { return fPHOSTrackSegment ; } 
+  virtual Int_t * GetPrimaries(Int_t & number) ;
 
 private:
 
   AliPHOSTrackSegment * fPHOSTrackSegment ; // pointer to the associated track segment in PHOS  
 
-  ClassDef(AliPHOSRecParticle,1)  // Reconstructed Particle, version 1
-
+  ClassDef(AliPHOSRecParticle,1)  // Reconstructed Particle
 };
 
 #endif // AliPHOSRECPARTICLE_H
index 98229f480a12939db71e2f852bb2c7d75fe6bbf6..f5e0168a909e32fe61807c7eaf2bdd0933f69cc0 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// PHOSRecPoint base class deriving from AliRecPoint
-//*-- Author : Gines MARTINEZ  SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+//  Base Class for PHOS Reconstructed Points  
+//                  
+//*-- Author: Gines Martinez (SUBATECH)
 
 // --- ROOT system ---
 #include "TPad.h"
@@ -40,35 +42,30 @@ ClassImp(AliPHOSRecPoint)
 AliPHOSRecPoint::AliPHOSRecPoint()
   : AliRecPoint()
 {
+  // ctor
+
   fGeom =   AliPHOSGeometry::GetInstance() ;
   fPHOSMod = 0;
 }
 
-//____________________________________________________________________________
-AliPHOSRecPoint::~AliPHOSRecPoint()
-{
-  // dtor
-}
-
 //____________________________________________________________________________
 Int_t AliPHOSRecPoint::DistancetoPrimitive(Int_t px, Int_t py)
 {
-  //Compute distance from point px,py to  a AliPHOSRecPoint considered as a Tmarker
-  //  Compute the closest distance of approach from point px,py to this marker.
-  //  The distance is computed in pixels units.
-  //
-
-   TVector3 pos(0.,0.,0.) ;
-   GetLocalPosition( pos) ;
-   Float_t x =  pos.X() ;
-   Float_t y =  pos.Z() ;
-   const Int_t kMaxDiff = 10;
-   Int_t pxm  = gPad->XtoAbsPixel(x);
-   Int_t pym  = gPad->YtoAbsPixel(y);
-   Int_t dist = (px-pxm)*(px-pxm) + (py-pym)*(py-pym);
-
-   if (dist > kMaxDiff) return 9999;
-   return dist;
+  // Compute distance from point px,py to  a AliPHOSRecPoint considered as a Tmarker
+  // Compute the closest distance of approach from point px,py to this marker.
+  // The distance is computed in pixels units.
+
+  TVector3 pos(0.,0.,0.) ;
+  GetLocalPosition( pos) ;
+  Float_t x =  pos.X() ;
+  Float_t y =  pos.Z() ;
+  const Int_t kMaxDiff = 10;
+  Int_t pxm  = gPad->XtoAbsPixel(x);
+  Int_t pym  = gPad->YtoAbsPixel(y);
+  Int_t dist = (px-pxm)*(px-pxm) + (py-pym)*(py-pym);
+  
+  if (dist > kMaxDiff) return 9999;
+  return dist;
 }
 
 //___________________________________________________________________________
@@ -87,76 +84,77 @@ void AliPHOSRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py)
   //
   // If Left button is clicked on AliPHOSRecPoint, the digits are switched on    
   // and switched off when the mouse button is released.
-  //
 
   //  static Int_t pxold, pyold;
 
-   static TGraph *  digitgraph = 0 ;
-   static TPaveText* clustertext = 0 ;
-
-   if (!gPad->IsEditable()) return;
-
-   switch (event) {
-
-
-   case kButton1Down:{
-     AliPHOSDigit * digit ;
-     AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
-     Int_t iDigit;
-     Int_t relid[4] ;
-     Float_t xi[fMulDigit] ;
-     Float_t zi[fMulDigit] ;
-     for(iDigit=0; iDigit<fMulDigit; iDigit++) {
-       digit = (AliPHOSDigit *) fDigitsList[iDigit];
-       phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
-       phosgeom->RelPosInModule(relid, xi[iDigit], zi[iDigit]) ;
-     }
-
-     if (!digitgraph) {
-       digitgraph = new TGraph(fMulDigit,xi,zi);
-       digitgraph-> SetMarkerStyle(5) ; 
-       digitgraph-> SetMarkerSize(1.) ;
-       digitgraph-> SetMarkerColor(1) ;
-       digitgraph-> Draw("P") ;
-     }
-     if (!clustertext) {
+  static TGraph *  digitgraph = 0 ;
+  static TPaveText* clustertext = 0 ;
+  
+  if (!gPad->IsEditable()) return;
   
-       TVector3 pos(0.,0.,0.) ;
-       GetLocalPosition(pos) ;
-       clustertext = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+50,pos.Z()+35,"") ;
-       Text_t  line1[40] ;
-       Text_t  line2[40] ;
-       sprintf(line1,"Energy=%1.2f GeV",GetEnergy()) ;
-       sprintf(line2,"%d Digits",GetDigitsMultiplicity()) ;
-       clustertext ->AddText(line1) ;
-       clustertext ->AddText(line2) ;
-       clustertext ->Draw("");
-     }
-     gPad->Update() ; 
-     Print() ;
+  switch (event) {
+    
+    
+  case kButton1Down:{
+    AliPHOSDigit * digit ;
+    AliPHOSGeometry * phosgeom =  (AliPHOSGeometry *) fGeom ;
+    Int_t iDigit;
+    Int_t relid[4] ;
+    Float_t xi[fMulDigit] ;
+    Float_t zi[fMulDigit] ;
+    
+    for(iDigit=0; iDigit<fMulDigit; iDigit++) {
+      digit = (AliPHOSDigit *) fDigitsList[iDigit];
+      phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
+      phosgeom->RelPosInModule(relid, xi[iDigit], zi[iDigit]) ;
+    }
+    
+    if (!digitgraph) {
+      digitgraph = new TGraph(fMulDigit,xi,zi);
+      digitgraph-> SetMarkerStyle(5) ; 
+      digitgraph-> SetMarkerSize(1.) ;
+      digitgraph-> SetMarkerColor(1) ;
+      digitgraph-> Draw("P") ;
+    }
+    if (!clustertext) {
+      
+      TVector3 pos(0.,0.,0.) ;
+      GetLocalPosition(pos) ;
+      clustertext = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+50,pos.Z()+35,"") ;
+      Text_t  line1[40] ;
+      Text_t  line2[40] ;
+      sprintf(line1,"Energy=%1.2f GeV",GetEnergy()) ;
+      sprintf(line2,"%d Digits",GetDigitsMultiplicity()) ;
+      clustertext ->AddText(line1) ;
+      clustertext ->AddText(line2) ;
+      clustertext ->Draw("");
+    }
+    gPad->Update() ; 
+    Print() ;
+  }
+  
+  break;
+  
+  case kButton1Up:
+    if (digitgraph) {
+      delete digitgraph  ;
+      digitgraph = 0 ;
+    }
+    if (clustertext) {
+      delete clustertext ;
+      clustertext = 0 ;
+    }
+    
+    break;
+    
   }
-
-     break;
-
-   case kButton1Up:
-     if (digitgraph) {
-       delete digitgraph  ;
-       digitgraph = 0 ;
-     }
-     if (clustertext) {
-       delete clustertext ;
-       clustertext = 0 ;
-     }
-     
-     break;
-     
-   }
 }
 
 //____________________________________________________________________________
 Int_t AliPHOSRecPoint::GetPHOSMod()
-{ 
+{
+  // Returns the PHOS module in which the RecPoint is found
   if(fPHOSMod > 0) 
     return fPHOSMod ;
 
@@ -172,11 +170,13 @@ Int_t AliPHOSRecPoint::GetPHOSMod()
 }
 
 //______________________________________________________________________________
-void AliPHOSRecPoint::GetPrimaries(Int_t & number, Int_t * list)
+Int_t * AliPHOSRecPoint::GetPrimaries(Int_t & number)
 {
+  // Constructs the list of primary particles which have contributed to this RecPoint
+  
   AliPHOSDigit * digit ;
   Int_t index ;
-  Int_t maxcounter = 3 ;
+  Int_t maxcounter = 10 ;
   Int_t counter    = 0 ;
   Int_t * tempo    = new Int_t[maxcounter] ;
   
@@ -203,39 +203,36 @@ void AliPHOSRecPoint::GetPrimaries(Int_t & number, Int_t * list)
          break ;
        }
       } // end of check
-      if ( !already) { // store it 
-         tempo[counter] = newprimary ; 
-         counter++ ;
+      if ( !already) { // store it
+       tempo[counter] = newprimary ; 
+       counter++ ;
       } // store it
     } // all primaries in digit
     delete newprimaryarray ; 
   } // all digits
 
   number = counter ; 
-  for ( index = 0 ; index < number ; index ++ )
-    list[index] = tempo[index] ;
-  
-  delete tempo ; 
+  return tempo ; 
 }
 
 //______________________________________________________________________________
 void AliPHOSRecPoint::Paint(Option_t *)
 {
-// Paint this ALiRecPoint as a TMarker  with its current attributes
-
-   TVector3 pos(0.,0.,0.)  ;
-   GetLocalPosition(pos)   ;
-   Coord_t x = pos.X()     ;
-   Coord_t y = pos.Z()     ;
-   Color_t markercolor = 1 ;
-   Size_t  markersize = 1. ;
-   Style_t markerstyle = 5 ;
-
-   if (!gPad->IsBatch()) {
-     gVirtualX->SetMarkerColor(markercolor) ;
-     gVirtualX->SetMarkerSize (markersize)  ;
-     gVirtualX->SetMarkerStyle(markerstyle) ;
-   }
-   gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
-   gPad->PaintPolyMarker(1,&x,&y,"") ;
+  // Paint this ALiRecPoint as a TMarker  with its current attributes
+  
+  TVector3 pos(0.,0.,0.)  ;
+  GetLocalPosition(pos)   ;
+  Coord_t x = pos.X()     ;
+  Coord_t y = pos.Z()     ;
+  Color_t markercolor = 1 ;
+  Size_t  markersize = 1. ;
+  Style_t markerstyle = 5 ;
+  
+  if (!gPad->IsBatch()) {
+    gVirtualX->SetMarkerColor(markercolor) ;
+    gVirtualX->SetMarkerSize (markersize)  ;
+    gVirtualX->SetMarkerStyle(markerstyle) ;
+  }
+  gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+  gPad->PaintPolyMarker(1,&x,&y,"") ;
 }
index 21c8b09e7acadb65073390d238453073a7bc637a..0ec32112a1053b21419ce5814786bedca7738e19 100644 (file)
@@ -3,14 +3,10 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-////////////////////////////////////////////////
-//  Base class for Reconstructed Points       //
-//  in PHOS and PPSD                          //
-//                                            //
-//  Author Gines MARTINEZ    SUBATECH         //
-//                                            //  
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  Base Class for PHOS Reconstructed Points  
+//                  
+//*-- Author: Gines Martinez (SUBATECH)
 
 // --- ROOT system ---
 
 
 #include "AliRecPoint.h"
 
-
 class AliPHOSRecPoint : public AliRecPoint {
 
 public:
 
   AliPHOSRecPoint() ;                   // ctor         
-  virtual ~AliPHOSRecPoint() ;          // dtor
+  virtual ~AliPHOSRecPoint(){}          // dtor
   virtual  void   AddDigit(AliDigitNew & digit, Float_t Energy) = 0 ; 
   virtual Int_t   DistancetoPrimitive(Int_t px, Int_t py);
   virtual void    Draw(Option_t * option="") ;
   virtual void    ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
   virtual Int_t   GetPHOSMod(void) ;
-  virtual void    GetPrimaries(Int_t & number, Int_t * list) ;
+  virtual Int_t * GetPrimaries(Int_t & number) ;
   virtual Bool_t  IsEmc(void){return kTRUE ;} 
   virtual void    Paint(Option_t * option="");
   virtual void    Print(Option_t * opt = "void") {} 
@@ -48,9 +43,9 @@ public:
 
 protected:
   
-  Int_t      fPHOSMod ;
+  Int_t      fPHOSMod ; // PHOS Module number in which the RecPoint is found
 
-  ClassDef(AliPHOSRecPoint,1)
+  ClassDef(AliPHOSRecPoint,1) // RecPoint for PHOS (Base Class)
  
 };
 
index 75e809b48930c5fe8d7211b8a28118c732c2505f..b12b1c84790fe6d29f944b30f33c96c4211bee9b 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// A brief description of the class
-//*-- Author : Gines MARTINEZ  SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+//  Algorithm class for the reconstruction: clusterizer
+//                                          track segment maker
+//                                          particle identifier   
+//                  
+//*-- Author: Gines Martinez & Yves Schutz (SUBATECH)
+
 
 // --- ROOT system ---
 
 
 ClassImp(AliPHOSReconstructioner)
 
-
-//____________________________________________________________________________
-AliPHOSReconstructioner::AliPHOSReconstructioner() 
-{
-  // ctor
-}        
-
 //____________________________________________________________________________
 AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterizer, 
                                                 AliPHOSTrackSegmentMaker * Tracker,
                                                 AliPHOSPID * Pid)
 {
+  // ctor
+  
   fClusterizer        = Clusterizer ;
   fTrackSegmentMaker  = Tracker ;
   fPID                = Pid ; 
 } 
 
-//____________________________________________________________________________
-AliPHOSReconstructioner::~AliPHOSReconstructioner() 
-{
-  // dtor
-}  
 
 //____________________________________________________________________________
  void AliPHOSReconstructioner::Init(AliPHOSClusterizer * Clusterizer, 
@@ -64,19 +59,20 @@ AliPHOSReconstructioner::~AliPHOSReconstructioner()
   fPID                = Pid ; 
 } 
 
-
-
 //____________________________________________________________________________
  void AliPHOSReconstructioner::Make(TClonesArray * dl, RecPointsList * emccl, RecPointsList * ppsdl, 
                                     TrackSegmentsList * trsl, RecParticlesList * rpl)
 {
+  // Launches the Reconstruction process in the sequence: Make the reconstructed poins (clusterize)
+  //                                                      Make the track segments 
+  //                                                      Make the reconstructed particles
 
-  cout << "Clusterizing" << endl;
+  cout << "Start making reconstructed points (clusterizing)" << endl;
   fClusterizer->MakeClusters(dl, emccl, ppsdl);
 
-  cout << "Segment Track  Maker" << endl;
+  cout << "Start making track segments" << endl;
   fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;
 
-  cout << "Particle Maker" << endl;
+  cout << "Start making reconstructed particles" << endl;
   fPID->MakeParticles(trsl, rpl) ; 
 }
index d86019759d4a367ce626f06eb9fea5624394c6e8..217687a6a524ea6db26be51f6840b9225c0cf905 100644 (file)
@@ -5,16 +5,12 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  Algorithme class for the reconstruction   //
-//                                            //
-//  Author Gines MARTINEZ     SUBATECH        //
-//                                            //
-//  january 2000:                             //
-//             added Particle identifier (YS) //
-//                                            //  
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  Algorithm class for the reconstruction: clusterizer
+//                                          track segment maker
+//                                          particle identifier   
+//                  
+//*-- Author: Gines Martinez & Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -32,10 +28,10 @@ class AliPHOSReconstructioner : public TObject {
 
 public:
 
-  AliPHOSReconstructioner(); //ctor            
+  AliPHOSReconstructioner(){} //ctor            
   AliPHOSReconstructioner(AliPHOSClusterizer * Clusterizer, AliPHOSTrackSegmentMaker * Tracker, 
                          AliPHOSPID * Identifier); //ctor            
-  ~AliPHOSReconstructioner(); // dtor
+  ~AliPHOSReconstructioner(){} // dtor
 
   AliPHOSClusterizer * GetClusterizer() { return fClusterizer ; }
   void Init(AliPHOSClusterizer * Clusterizer, AliPHOSTrackSegmentMaker * Tracker, 
@@ -50,7 +46,7 @@ private:
   AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Method for track segments finding
   AliPHOSPID * fPID ;                             // Method for identifying the type of particle
  
-  ClassDef(AliPHOSReconstructioner,1)  // Reconstruction interface , version 1
+  ClassDef(AliPHOSReconstructioner,1)  // Reconstruction algorithm class (Base Class)
 
 }; 
 
index 734e1d067695b7f340221982fb685a4e7a26582b..860fdc47d7e922852b75dba029006b299b349097 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// class of PHOS Sub Track
-//*-- Author : Dmitri Peressounko RRC KI 
-//////////////////////////////////////////////////////////////////////////////
+//  Track segment in PHOS
+//  Can be : 1 EmcRecPoint
+//           1 EmcRecPoint + 1 PPSD
+//           1 EmcRecPoint + 1 PPSD + 1 PPSD     
+//                  
+//*-- Author:  Dmitri Peressounko (RRC KI & SUBATECH)
 
 // --- ROOT system ---
  
@@ -37,7 +42,9 @@ ClassImp(AliPHOSTrackSegment)
 //____________________________________________________________________________
 AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , AliPHOSPpsdRecPoint * ppsdRP1,
                   AliPHOSPpsdRecPoint * ppsdRP2  ) 
-{     
+{
+  // ctor
+
   if( emc )   
     fEmcRecPoint =  emc ;
 
@@ -52,35 +59,32 @@ AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , AliPHOSPpsd
 //____________________________________________________________________________
 AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts) 
 {
+  // Copy ctor
+
   ( (AliPHOSTrackSegment &)ts ).Copy(*this) ; 
 }
 
-//____________________________________________________________________________
-AliPHOSTrackSegment::~AliPHOSTrackSegment() // dtor
-{
-//    fEmcRecPoint.Delete() ;   Not Owners !!!
-//    fPpsdUp.Delete() ;
-//    fPpsdLow.Delete() ;
-}
 
 //____________________________________________________________________________
 void AliPHOSTrackSegment::Copy(TObject & obj) 
 {
+  // Copy of a track segment into another track segment
+
    TObject::Copy(obj) ;
-   ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ; 
-   ( (AliPHOSTrackSegment &)obj ).fPpsdLow     = fPpsdLow ; 
-   ( (AliPHOSTrackSegment &)obj ).fPpsdUp      = fPpsdUp ; 
+   ( (AliPHOSTrackSegment &)obj ).fEmcRecPointId = fEmcRecPointId ; 
+   ( (AliPHOSTrackSegment &)obj ).fPpsdLowId     = fPpsdLowId ; 
+   ( (AliPHOSTrackSegment &)obj ).fPpsdUpId      = fPpsdUpId ; 
 }
 //____________________________________________________________________________
 Int_t AliPHOSTrackSegment::DistancetoPrimitive(Int_t px, Int_t py)
 {
-  //Compute distance from point px,py to  a AliPHOSTrackSegment considered as a Tmarker
-  //  Compute the closest distance of approach from point px,py to this marker.
-  //  The distance is computed in pixels units.
-  //
+  // Compute distance from point px,py to  a AliPHOSTrackSegment considered as a Tmarker
+  // Compute the closest distance of approach from point px,py to this marker.
+  // The distance is computed in pixels units.
+  
   Int_t div = 1 ;  
   TVector3 pos(0.,0.,0.) ;
+  
   fEmcRecPoint->GetLocalPosition( pos) ;
   Float_t x =  pos.X() ;
   Float_t y =  pos.Z() ;
@@ -112,7 +116,7 @@ Int_t AliPHOSTrackSegment::DistancetoPrimitive(Int_t px, Int_t py)
  void AliPHOSTrackSegment::Draw(Option_t *option)
  {
    // Draw this AliPHOSTrackSegment with its current attribute
-
+   
    AppendPad(option);
  }
 
@@ -124,48 +128,48 @@ void AliPHOSTrackSegment::ExecuteEvent(Int_t event, Int_t px, Int_t py)
   //
   //  If Left button is clicked on AliPHOSRecPoint, the digits are switched on    
   //  and switched off when the mouse button is released.
-  //
-   static TPaveText* textTS = 0 ;
-
-   if (!gPad->IsEditable()) 
-     return;
-
-   switch (event) {
-
-   case kButton1Down:{
+  static TPaveText* textTS = 0 ;
+  
+  if (!gPad->IsEditable()) 
+    return;
+  
+  switch (event) {
     
-     if (!textTS) {
+  case kButton1Down:{
+    
+    if (!textTS) {
+      
+      TVector3 pos(0.,0.,0.) ;
+      fEmcRecPoint->GetLocalPosition(pos) ;
+      textTS = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+5,pos.Z()+15,"") ;
+      Text_t  line1[40] ;
+      sprintf(line1,"See RecParticle for ID") ;
+      textTS ->AddText(line1) ;
+      textTS ->Draw("");
+      gPad->Update() ; 
+    }
+  }
+  
+  break;
   
-       TVector3 pos(0.,0.,0.) ;
-       fEmcRecPoint->GetLocalPosition(pos) ;
-       textTS = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+5,pos.Z()+15,"") ;
-       Text_t  line1[40] ;
-       sprintf(line1,"See RecParticle for ID") ;
-       textTS ->AddText(line1) ;
-       textTS ->Draw("");
-       gPad->Update() ; 
-     }
-   }
-
-     break;
-
-   case kButton1Up:
-     if (textTS) {
-       delete textTS ;
-       textTS = 0 ;
-     }
-     break;  
-   }
+  case kButton1Up:
+    if (textTS) {
+      delete textTS ;
+      textTS = 0 ;
+    }
+    break;  
+  }
 }
 
-
 //____________________________________________________________________________
 Float_t AliPHOSTrackSegment::GetDistanceInPHOSPlane()
 {
+  // Calculates the distance between the EMC RecPoint and PPSD RecPoint
+  
   TVector3 vecEmc ;
   fEmcRecPoint->GetLocalPosition(vecEmc) ;
-
+  
   TVector3 vecPpsd ;
   if( fPpsdLow->GetMultiplicity() )  
     fPpsdLow->GetLocalPosition(vecPpsd)  ; 
@@ -181,14 +185,22 @@ Float_t AliPHOSTrackSegment::GetDistanceInPHOSPlane()
 
 //____________________________________________________________________________
 TVector3 AliPHOSTrackSegment::GetMomentumDirection() 
-{   
-  TVector3 dir, tempo ; 
+{ 
+  // Calculates the momentum direction:
+  //   1. if only a EMC RecPoint, direction is given by IP and this RecPoint
+  //   2. if a EMC RecPoint and one PPSD RecPoint, direction is given by the line through the 2 recpoints 
+  //   3. if a EMC RecPoint and two PPSD RecPoints, dirrection is given by the average line through 
+  //      the 2 pairs of recpoints  
+  // However because of the poor position resolution of PPSD the direction is always taken as if we were 
+  //  in case 1.
+
+  TVector3 dir(0,0,0) ; 
   TMatrix mdummy ;
 
   TVector3 posEmc ;
   fEmcRecPoint->GetGlobalPosition(posEmc, mdummy) ;
 
-  // need to correct here for the depth of the shower start point (TDR p 127) ?
+  // Correction for the depth of the shower starting point (TDR p 127) 
 
   Float_t energy = fEmcRecPoint->GetEnergy() ; 
   Float_t para = 0.925 ; 
@@ -202,115 +214,170 @@ TVector3 AliPHOSTrackSegment::GetMomentumDirection()
   Float_t incidencephi = TMath::ATan(localpos.X() / radius) ; 
   Float_t incidencetheta = TMath::ATan(localpos.Z() / radius) ;
  
-  Float_t depthx = - ( para * TMath::Log(energy) + parb ) * TMath::Sin(incidencephi) ; 
-  Float_t depthz = - ( para * TMath::Log(energy) + parb ) * TMath::Sin(incidencetheta) ; 
+  Float_t depthx =  ( para * TMath::Log(energy) + parb ) * TMath::Sin(incidencephi) ; 
+  Float_t depthz =  ( para * TMath::Log(energy) + parb ) * TMath::Sin(incidencetheta) ; 
   
-  TVector3 posPpsdl ;
-  TVector3 posPpsdup ;
+  localpos.SetX(localpos.X() - depthx ) ;
+  localpos.SetZ(localpos.Z() - depthz ) ;
  
-//   if( fPpsdLow ){
-//     fPpsdLow->GetGlobalPosition(posPpsdl, mdummy) ; 
-//     if( !fPpsdUp ) { // draw line trough 2 points
-//       tempo = posEmc - posPpsdl;
-//      }
+  TVector3 emcglobalpos ;
+  TMatrix  dummy ;
 
-//     else { // draw line through 3 points
-//       fPpsdUp->GetGlobalPosition(posPpsdup, mdummy) ;
-//       posPpsdl = 0.5 * ( posPpsdup + posPpsdl ) ; 
-//       dir = posEmc - posPpsdl ;
-//     }
-//   }
-//   else 
-    tempo = posEmc ; 
-    
-  dir.SetX( tempo.X() + depthx ) ;  // assumes that a neutral comes from the vertex
-  dir.SetY( tempo.Y() ) ;  
-  dir.SetZ( -tempo.Z() - depthz ) ; 
+  fEmcRecPoint->GetGlobalPosition(emcglobalpos, dummy) ;
+
+  emcglobalpos.SetX( emcglobalpos.X() - depthx ) ;  
+  emcglobalpos.SetZ( emcglobalpos.Z() - depthz ) ;   
   
+  // The following commeneted code becomes valid once the PPSD provides 
+  // a reasonable position resolution, at least as good as EMC !
+//   TVector3 ppsdlglobalpos ;
+//   TVector3 ppsduglobalpos ;
+
+//   if( fPpsdLow ){ // certainly a photon that has concerted
+        
+//     fPpsdLow->GetGlobalPosition(ppsdlglobalpos, mdummy) ; 
+//     dir = emcglobalpos -  ppsdlglobalpos ; 
+     
+//     if( fPpsdUp ){ // nop looks like a charged
+       
+//        fPpsdUp->GetGlobalPosition(ppsduglobalpos, mdummy) ; 
+//        dir = ( dir +  emcglobalpos -  ppsduglobalpos ) * 0.5 ; 
+//      }
+//   }
+//   else { // looks like a neutral
+
+    dir = emcglobalpos ;  
+//  }
+
+  dir.SetZ( -dir.Z() ) ;   // why ?  
   dir.SetMag(1.) ;
+    
   return dir ;  
 }
 
+//____________________________________________________________________________
+Int_t *  AliPHOSTrackSegment::GetPrimariesEmc(Int_t & number) 
+{ 
+  // Retrieves the primary particle(s) at the origin of the EMC RecPoint
+  
+  Int_t * rv = 0 ; 
+  number = 0 ;
+  if ( fEmcRecPoint )
+    rv =  fEmcRecPoint->GetPrimaries(number) ; 
+
+  return rv ; 
+}
+
+//____________________________________________________________________________
+Int_t *  AliPHOSTrackSegment::GetPrimariesPpsdLow(Int_t & number) 
+{ 
+  // Retrieves the primary particle(s) at the origin of the lower PPSD RecPoint
+  
+  Int_t * rv = 0 ; 
+  number = 0 ;
+  if ( fPpsdLow )
+    rv =  fPpsdLow->GetPrimaries(number) ; 
+
+  return rv ; 
+}
+
+//____________________________________________________________________________
+Int_t *  AliPHOSTrackSegment::GetPrimariesPpsdUp(Int_t & number) 
+{ 
+  // Retrieves the primary particle(s) at the origin of the upper PPSD  RecPoint
+  
+  Int_t * rv = 0 ; 
+  number = 0 ;
+  if ( fPpsdUp )
+    rv =  fPpsdUp->GetPrimaries(number) ; 
+
+  return rv ; 
+}
 
 //____________________________________________________________________________
 void AliPHOSTrackSegment::GetPosition( TVector3 & pos ) 
 {  
-  // Returns positions of hits
+  // Returns position of the EMC RecPoint
+
   TMatrix dummy ;
   fEmcRecPoint->GetGlobalPosition(pos, dummy) ;
 }
 
+
 //______________________________________________________________________________
 void AliPHOSTrackSegment::Paint(Option_t *)
 {
-  //Paint this ALiPHOSTrackSegment as a TMarker  with its current attributes
-
-   TVector3 posemc(999., 999., 999.) ;
-   TVector3 posppsdl(999., 999., 999.) ;
-   TVector3 posppsdu(999., 999., 999.) ;
-
-   fEmcRecPoint->GetLocalPosition(posemc) ;
-   if (fPpsdLow !=0 ) 
-     fPpsdLow->GetLocalPosition(posppsdl) ;
-     if (fPpsdUp !=0 ) 
-       fPpsdUp->GetLocalPosition(posppsdu) ;
-
-   Coord_t xemc   = posemc.X() ;
-   Coord_t yemc   = posemc.Z() ;
-
-   Coord_t yppsdl = posppsdl.Z() ;
-   Coord_t xppsdl = posppsdl.X() ;
-
-   Coord_t yppsdu = posppsdu.Z() ;
-   Coord_t xppsdu = posppsdu.X() ;
-
-   Color_t markercolor = 1 ;
-   Size_t  markersize  = 1.5 ;
-   Style_t markerstyle = 20 ;
-
-   if (!gPad->IsBatch()) {
-     gVirtualX->SetMarkerColor(markercolor) ;
-     gVirtualX->SetMarkerSize (markersize)  ;
-     gVirtualX->SetMarkerStyle(markerstyle) ;
-   }
-   gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
-   gPad->PaintPolyMarker(1, &xemc, &yemc, "") ;
-   
-   if (xppsdl != 999. && yppsdl != 999. ) {
+  // Paint this ALiPHOSTrackSegment as a TMarker  with its current attributes
 
-     markercolor = 2 ;
-     markersize  = 1.25 ;
-     markerstyle = 21 ;
-     
-     if (!gPad->IsBatch()) {
-       gVirtualX->SetMarkerColor(markercolor) ;
-       gVirtualX->SetMarkerSize (markersize)  ;
-       gVirtualX->SetMarkerStyle(markerstyle) ;
-     }
-     gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
-     gPad->PaintPolyMarker(1, &xppsdl, &yppsdl, "") ;
-   }
-
-    if (xppsdu != 999. && yppsdu != 999. ) {
+  TVector3 posemc(999., 999., 999.) ;
+  TVector3 posppsdl(999., 999., 999.) ;
+  TVector3 posppsdu(999., 999., 999.) ;
   
-      markercolor = 3 ;
-      markersize  = 1. ;
-      markerstyle = 22 ;
-      
-      if (!gPad->IsBatch()) {
-       gVirtualX->SetMarkerColor(markercolor) ;
-       gVirtualX->SetMarkerSize (markersize)  ;
-       gVirtualX->SetMarkerStyle(markerstyle) ;
-      }
-      gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
-      gPad->PaintPolyMarker(1, &xppsdu, &yppsdu, "") ;
+  fEmcRecPoint->GetLocalPosition(posemc) ;
+  if (fPpsdLow !=0 ) 
+    fPpsdLow->GetLocalPosition(posppsdl) ;
+  if (fPpsdUp !=0 ) 
+    fPpsdUp->GetLocalPosition(posppsdu) ;
+  
+  Coord_t xemc   = posemc.X() ;
+  Coord_t yemc   = posemc.Z() ;
+  
+  Coord_t yppsdl = posppsdl.Z() ;
+  Coord_t xppsdl = posppsdl.X() ;
+  
+  Coord_t yppsdu = posppsdu.Z() ;
+  Coord_t xppsdu = posppsdu.X() ;
+  
+  Color_t markercolor = 1 ;
+  Size_t  markersize  = 1.5 ;
+  Style_t markerstyle = 20 ;
+  
+  if (!gPad->IsBatch()) {
+    gVirtualX->SetMarkerColor(markercolor) ;
+    gVirtualX->SetMarkerSize (markersize)  ;
+    gVirtualX->SetMarkerStyle(markerstyle) ;
+  }
+  gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+  gPad->PaintPolyMarker(1, &xemc, &yemc, "") ;
+  
+  if (xppsdl != 999. && yppsdl != 999. ) {
+    
+    markercolor = 2 ;
+    markersize  = 1.25 ;
+    markerstyle = 21 ;
+    
+    if (!gPad->IsBatch()) {
+      gVirtualX->SetMarkerColor(markercolor) ;
+      gVirtualX->SetMarkerSize (markersize)  ;
+      gVirtualX->SetMarkerStyle(markerstyle) ;
+    }
+    gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+    gPad->PaintPolyMarker(1, &xppsdl, &yppsdl, "") ;
+  }
+  
+  if (xppsdu != 999. && yppsdu != 999. ) {
+    
+    markercolor = 3 ;
+    markersize  = 1. ;
+    markerstyle = 22 ;
+    
+    if (!gPad->IsBatch()) {
+      gVirtualX->SetMarkerColor(markercolor) ;
+      gVirtualX->SetMarkerSize (markersize)  ;
+      gVirtualX->SetMarkerStyle(markerstyle) ;
     }
+    gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+    gPad->PaintPolyMarker(1, &xppsdu, &yppsdu, "") ;
+  }
 }
 
-
 //____________________________________________________________________________
 void AliPHOSTrackSegment::Print()
 {
+  // Print all information on this track Segment
+  
   cout << "--------AliPHOSTrackSegment-------- "<<endl ;
   cout << "EMC Reconstructed Point: " << fEmcRecPoint << endl;
   
index c72e77664ef395eb9ed27113ef947264ffd12e63..42acd2f2e4a3bf143840134454d0a38acb5dc8d0 100644 (file)
@@ -5,15 +5,13 @@
 
 /* $Id$ */
 
-/////////////////////////////////////////////////
-//  Short description                          //
-//  Version SUBATECH                           //
-//  Author Dmitri Peressounko RRC KI           //
-//      comment: contains pairs (triplets) of  //  
-//               EMC+PPSD(+PPSD) clusters, and //
-//               evaluates particle type,      // 
-//               energy, etc                   //
-/////////////////////////////////////////////////
+//_________________________________________________________________________
+//  Track segment in PHOS
+//  Can be : 1 EmcRecPoint
+//           1 EmcRecPoint + 1 PPSD
+//           1 EmcRecPoint + 1 PPSD + 1 PPSD     
+//                  
+//*-- Author:  Dmitri Peressounko (RRC KI & SUBATECH)
 
 // --- ROOT system ---
 
@@ -31,11 +29,11 @@ class AliPHOSTrackSegment : public TObject  {
 
 public:
 
-  AliPHOSTrackSegment() {}       // ctor 
+  AliPHOSTrackSegment() {}       // ctor 
   AliPHOSTrackSegment(AliPHOSEmcRecPoint * EmcRecPoint , AliPHOSPpsdRecPoint * PpsdUp, 
                      AliPHOSPpsdRecPoint * PpsdLow  ) ; // ctor
   AliPHOSTrackSegment(const AliPHOSTrackSegment & ts) ;  // ctor                   
-  virtual ~AliPHOSTrackSegment() ; // dtor 
+  virtual ~AliPHOSTrackSegment() {} // dtor 
 
   void Copy(TObject & obj) ;  
   virtual Int_t  DistancetoPrimitive(Int_t px, Int_t py);
@@ -47,6 +45,9 @@ public:
   virtual Int_t  GetPHOSMod(void) {return fEmcRecPoint->GetPHOSMod();  }
   TVector3 GetMomentumDirection() ;        // Returns the momentum direction
   void GetPosition( TVector3 & pos ) ;     // Returns positions of hit
+  Int_t * GetPrimariesEmc(Int_t & number) ;
+  Int_t * GetPrimariesPpsdLow(Int_t & number) ;
+  Int_t * GetPrimariesPpsdUp(Int_t & number) ;
   AliPHOSEmcRecPoint * GetEmcRecPoint() const { return fEmcRecPoint ; } 
   AliPHOSPpsdRecPoint * GetPpsdLow() const { return fPpsdLow ; } 
   AliPHOSPpsdRecPoint * GetPpsdUp() const { return fPpsdUp ; } 
@@ -56,12 +57,14 @@ public:
   
 private:
   
-  AliPHOSEmcRecPoint  * fEmcRecPoint ;
-  AliPHOSPpsdRecPoint * fPpsdLow ;
-  AliPHOSPpsdRecPoint * fPpsdUp ;
-  
+  AliPHOSEmcRecPoint  * fEmcRecPoint ; //! The EMC reconstructed point
+  AliPHOSPpsdRecPoint * fPpsdLow ;     //! The PPSD reconstructed point from the lower layer
+  AliPHOSPpsdRecPoint * fPpsdUp ;      //! The PPSD reconstructed point from the upper layer
+  Int_t fEmcRecPointId ; // The EMC reconstructed point Id in the list
+  Int_t fPpsdLowId ;     // The PPSD reconstructed point from the lower layer Id in the list
+  Int_t fPpsdUpId ;      // The PPSD reconstructed point from the upper layer Id in the list
 
-  ClassDef(AliPHOSTrackSegment,1)  // description , version 1
+  ClassDef(AliPHOSTrackSegment,1)  // Track segment in PHOS
 
 };
 
index 21a404df8126ee4903b7516e59474e26e5438c60..7715aad11b442e26084cf472cdaeeffb8bb32f47 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// A brief description of the class
-//*-- Author : Yves Schutz  SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+// Algorithm Base class to construct PHOS track segments
+// Associates EMC and PPSD clusters
+// Unfolds the EMC cluster   
+//                  
+//*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
+
 
 // --- ROOT system ---
 
@@ -39,9 +44,9 @@ ClassImp( AliPHOSTrackSegmentMaker)
 
 
 //____________________________________________________________________________
- AliPHOSTrackSegmentMaker:: AliPHOSTrackSegmentMaker() // ctor
+ AliPHOSTrackSegmentMaker:: AliPHOSTrackSegmentMaker() : fNTrackSegments(0)
 {
-
+  // ctor
 }
 
 
index 21f5be0c006fcef40dcab8cb6b8da41554d1962b..ef10a124bf8b123026c28d26512e5e8474592a22 100644 (file)
@@ -5,13 +5,12 @@
 
 /* $Id$ */
 
-///////////////////////////////////////////////////
-//  Subtrackin class for PHOS                    //
-//  Version SUBATECH                             //
-//  Author Dmitri Peressounko RRC Ki             //
-//     comment: finds pairs of clusters EMC+PPSD //  
-//              performs unfolding.              //
-///////////////////////////////////////////////////
+//_________________________________________________________________________
+// Algorithm Base class to construct PHOS track segments
+// Associates EMC and PPSD clusters
+// Unfolds the EMC cluster   
+//                  
+//*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
 
 // --- ROOT system ---
 
@@ -24,7 +23,7 @@
 #include "AliPHOSEmcRecPoint.h"
 #include "AliPHOSPpsdRecPoint.h"
 
-typedef TObjArray TrackSegmentsList ;
+typedef TClonesArray TrackSegmentsList ;
 
 class  AliPHOSTrackSegmentMaker : public TObject {
 
@@ -39,8 +38,12 @@ public:
   virtual void SetMaxEmcPpsdDistance(Float_t r) = 0 ; 
   virtual void SetUnfoldFlag() = 0 ;
   virtual void UnsetUnfoldFlag() = 0 ;
-
-  ClassDef( AliPHOSTrackSegmentMaker,1)  // subtracking implementation , version 1
+  
+ protected:
+  
+  Int_t fNTrackSegments ; // number of track segments found 
+  
+  ClassDef( AliPHOSTrackSegmentMaker,1)  // Algorithm class to make PHOS track segments (Base Class)
 
 };
 
index 520f04786fee443bfacd86b6a65cf8f858eb3302..77c16f262d3115df16451237b38a0d6c90be3529 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Algorithm class to construct track segments connection RecPoints in 
-// EMCA and Ppsd. Unfolds also the clusters in EMCA. 
-//*-- Author : D. Peressounko  SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+// Implementation version 1 of algorithm class to construct PHOS track segments
+// Associates EMC and PPSD clusters
+// Unfolds the EMC cluster   
+//                  
+//*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
+//
 
 // --- ROOT system ---
 
@@ -44,9 +48,10 @@ ClassImp( AliPHOSTrackSegmentMakerv1)
 
 
 //____________________________________________________________________________
- AliPHOSTrackSegmentMakerv1::AliPHOSTrackSegmentMakerv1() 
+ AliPHOSTrackSegmentMakerv1::AliPHOSTrackSegmentMakerv1() : AliPHOSTrackSegmentMaker()
 {
   // ctor
+
   fR0 = 4. ;   
   AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
   //clusters are sorted in "rows" and "columns" of width geom->GetCrystalSize(0),
@@ -59,13 +64,15 @@ ClassImp( AliPHOSTrackSegmentMakerv1)
  AliPHOSTrackSegmentMakerv1::~AliPHOSTrackSegmentMakerv1()
 { 
   // dtor
-  delete fMinuit ; 
+   delete fMinuit ; 
 }
+
 //____________________________________________________________________________
 Bool_t  AliPHOSTrackSegmentMakerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * maxAt, Float_t * maxAtEnergy,
                                    Int_t nPar, Float_t * fitparameters)
 { 
-  // Calls TMinuit for fitting cluster with several maxima 
+  // Calls TMinuit to fit the energy distribution of a cluster with several maxima 
 
   AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
 
@@ -139,7 +146,7 @@ Bool_t  AliPHOSTrackSegmentMakerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * ma
 }
 
 //____________________________________________________________________________
-void  AliPHOSTrackSegmentMakerv1::FillOneModule(DigitsList * Dl, RecPointsList * emcIn, TObjArray * emcOut, 
+void  AliPHOSTrackSegmentMakerv1::FillOneModule(DigitsList * dl, RecPointsList * emcIn, TObjArray * emcOut, 
                                        RecPointsList * ppsdIn, TObjArray * ppsdOutUp,
                                        TObjArray * ppsdOutLow, Int_t & phosmod, Int_t & emcStopedAt, 
                                        Int_t & ppsdStopedAt)
@@ -165,7 +172,7 @@ void  AliPHOSTrackSegmentMakerv1::FillOneModule(DigitsList * Dl, RecPointsList *
     if(nMax <= 1 )     // if cluster is very flat (no pronounced maximum) then nMax = 0 
       emcOut->Add(emcRecPoint) ;
     else if (fUnfoldFlag) {
-      UnfoldClusters(Dl, emcIn, emcRecPoint, nMax, maxAt, maxAtEnergy, emcOut) ;
+      UnfoldClusters(dl, emcIn, emcRecPoint, nMax, maxAt, maxAtEnergy, emcOut) ;
       emcIn->Remove(emcRecPoint); 
       emcIn->Compress() ;
       nEmcUnfolded-- ;
@@ -192,6 +199,8 @@ void  AliPHOSTrackSegmentMakerv1::FillOneModule(DigitsList * Dl, RecPointsList *
 //____________________________________________________________________________
 Float_t  AliPHOSTrackSegmentMakerv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * emcclu,AliPHOSPpsdRecPoint * PpsdClu, Bool_t &toofar)
 {
+  // Calculates the distance between the EMC RecPoint and the PPSD RecPoint
   Float_t r = fR0 ;
  
   TVector3 vecEmc ;
@@ -227,8 +236,8 @@ void  AliPHOSTrackSegmentMakerv1::MakeLinks(TObjArray * emcRecPoints, TObjArray
                                     TObjArray * ppsdRecPointsLow, TClonesArray * linklowArray, 
                                     TClonesArray *linkupArray) 
 { 
-  //Finds distanses (links) between all EMC and PPSD clusters, which are not further from each other than fR0 
-
+  // Finds distances (links) between all EMC and PPSD clusters, which are not further apart from each other than fR0 
+  
   TIter nextEmc(emcRecPoints) ;
   Int_t iEmcClu = 0 ; 
   
@@ -314,8 +323,10 @@ void  AliPHOSTrackSegmentMakerv1::MakePairs(TObjArray * emcRecPoints, TObjArray
         } // while nextUp
         
         nextUp.Reset();
-         AliPHOSTrackSegment * subtr = new AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
-        trsl->Add(subtr) ;  
+//          AliPHOSTrackSegment * subtr = new AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
+//      trsl->Add(subtr) ;  
+        new( (*trsl)[fNTrackSegments] ) AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
+        fNTrackSegments++ ;
         emcRecPoints->AddAt(nullpointer,linkLow->GetEmc()) ;     
         ppsdRecPointsLow->AddAt(nullpointer,linkLow->GetPpsd()) ;
         
@@ -340,9 +351,12 @@ void  AliPHOSTrackSegmentMakerv1::MakePairs(TObjArray * emcRecPoints, TObjArray
       }
       
     }
-    AliPHOSTrackSegment * subtr = new AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
-    trsl->Add(subtr) ;   
+//     AliPHOSTrackSegment * subtr = new AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
+//     trsl->Add(subtr) ;   
+    new( (*trsl)[fNTrackSegments] ) AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
+    fNTrackSegments++ ;
+    
+
     if(ppsdUp)  
       ppsdRecPointsUp->AddAt(nullpointer,linkUp->GetPpsd()) ;
   }
@@ -350,10 +364,10 @@ void  AliPHOSTrackSegmentMakerv1::MakePairs(TObjArray * emcRecPoints, TObjArray
 }
 
 //____________________________________________________________________________
-void  AliPHOSTrackSegmentMakerv1::MakeTrackSegments(DigitsList * DL, RecPointsList * emcl, 
+void  AliPHOSTrackSegmentMakerv1::MakeTrackSegments(DigitsList * dl, RecPointsList * emcl, 
                                        RecPointsList * ppsdl, TrackSegmentsList * trsl)
 {
-  // main function, does the job
+  // Makes the track segments out of the list of EMC and PPSD Recpoints and stores them in a list
 
   Int_t phosmod      = 1 ;
   Int_t emcStopedAt  = 0 ; 
@@ -371,7 +385,7 @@ void  AliPHOSTrackSegmentMakerv1::MakeTrackSegments(DigitsList * DL, RecPointsLi
   
   while(phosmod <= geom->GetNModules() ){
     
-    FillOneModule(DL, emcl, emcRecPoints, ppsdl, ppsdRecPointsUp, ppsdRecPointsLow, phosmod, emcStopedAt, ppsdStopedAt) ;
+    FillOneModule(dl, emcl, emcRecPoints, ppsdl, ppsdRecPointsUp, ppsdRecPointsLow, phosmod, emcStopedAt, ppsdStopedAt) ;
 
     MakeLinks(emcRecPoints, ppsdRecPointsUp, ppsdRecPointsLow, linklowArray, linkupArray) ; 
 
@@ -408,7 +422,9 @@ void  AliPHOSTrackSegmentMakerv1::MakeTrackSegments(DigitsList * DL, RecPointsLi
 //____________________________________________________________________________
 Double_t  AliPHOSTrackSegmentMakerv1::ShowerShape(Double_t r)
 { 
-// If you change this function, change also gradiend evaluation  in ChiSquare()
+  // Shape of the shower (see PHOS TDR)
+  // If you change this function, change also the gradien evaluation  in ChiSquare()
+
   Double_t r4    = r*r*r*r ;
   Double_t r295  = TMath::Power(r, 2.95) ;
   Double_t shape = TMath::Exp( -r4 * (1. / (2.32 + 0.26 * r4) + 0.0316 / (1 + 0.0652 * r295) ) ) ;
@@ -416,11 +432,12 @@ Double_t  AliPHOSTrackSegmentMakerv1::ShowerShape(Double_t r)
 }
 
 //____________________________________________________________________________
-void  AliPHOSTrackSegmentMakerv1::UnfoldClusters(DigitsList * DL, RecPointsList * emcIn,  AliPHOSEmcRecPoint * iniEmc, 
+void  AliPHOSTrackSegmentMakerv1::UnfoldClusters(DigitsList * dl, RecPointsList * emcIn,  AliPHOSEmcRecPoint * iniEmc, 
                                         Int_t nMax, int * maxAt, Float_t * maxAtEnergy, TObjArray * emcList)
 { 
-  // fits cluster with nMax overlapping showers 
-  
+  // Performs the unfolding of a cluster with nMax overlapping showers 
+  // This is time consuming (use the (Un)SetUnfolFlag()  )
+
   Int_t nPar = 3 * nMax ;
   Float_t fitparameters[nPar] ;
   AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
@@ -464,7 +481,7 @@ void  AliPHOSTrackSegmentMakerv1::UnfoldClusters(DigitsList * DL, RecPointsList
       iparam += 3 ;
       distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar)  ;
       distance =  TMath::Sqrt(distance) ;
-      efit[iDigit] += epar * ShowerShape(distance) ;
+      efit[iDigit] += epar * AliPHOSTrackSegmentMakerv1::ShowerShape(distance) ;
     }
   }
 
@@ -485,7 +502,7 @@ void  AliPHOSTrackSegmentMakerv1::UnfoldClusters(DigitsList * DL, RecPointsList
       geom->RelPosInModule(relid, xDigit, zDigit) ;
       distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar)  ;
       distance =  TMath::Sqrt(distance) ;
-      ratio = epar * ShowerShape(distance) / efit[iDigit] ; 
+      ratio = epar * AliPHOSTrackSegmentMakerv1::ShowerShape(distance) / efit[iDigit] ; 
       eDigit = emcEnergies[iDigit] * ratio ;
       emcRP->AddDigit( *digit, eDigit ) ;
     }
@@ -498,8 +515,8 @@ void  AliPHOSTrackSegmentMakerv1::UnfoldClusters(DigitsList * DL, RecPointsList
 //______________________________________________________________________________
 void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag)
 {
-
-// Number of parameters, Gradient, Chi squared, parameters, what to do
+  // Calculates th Chi square for the cluster unfolding minimization
+  // Number of parameters, Gradient, Chi squared, parameters, what to do
 
   AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
 
index 96031c879ba8a653ce59c3e5fbdb2f4b138abfb5..dd45e5ea14cccac654da1acd1f21d4904281ef85 100644 (file)
@@ -5,13 +5,12 @@
 
 /* $Id$ */
 
-///////////////////////////////////////////////////
-//  Track Segment Maker class for PHOS           //
-//  Version SUBATECH                             //
-//  Author Dmitri Peressounko RRC Ki             //
-//     comment: finds pairs of clusters EMC+PPSD //  
-//              performs unfolding.              //
-///////////////////////////////////////////////////
+//_________________________________________________________________________
+// Implementation version 1 of algorithm class to construct PHOS track segments
+// Associates EMC and PPSD clusters
+// Unfolds the EMC cluster   
+//                  
+//*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
 
 // --- ROOT system ---
 
@@ -55,12 +54,12 @@ public:
 
 private:
 
-  Float_t fDelta ;    // parameter used for sorting
-  TMinuit * fMinuit ; // Minuit object needed by cluster unfolding
-  Float_t fR0 ;
-  Bool_t fUnfoldFlag ;// Directive to unfold or not the clusters in case of multiple maxima
+  Float_t fDelta ;     // parameter used for sorting
+  TMinuit * fMinuit ;  // Minuit object needed by cluster unfolding
+  Float_t fR0 ;        // Maximum distance between a EMC RecPoint and a PPSD RecPoint   
+  Bool_t fUnfoldFlag ; // Directive to unfold or not the clusters in case of multiple maxima
 
-  ClassDef( AliPHOSTrackSegmentMakerv1,1)  // track segment maker implementation , version 1
+  ClassDef( AliPHOSTrackSegmentMakerv1,1)  // Implementation version 1 of algorithm class to make PHOS track segments 
 
 };
 
index ab4eba18c739ba0dda9c54ce93f081ddb9095e2b..62bfc0039cb4908ed9e4080e85c97d76f10d21a8 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Manager class for PHOS version SUBATECH
-//*-- Author : Y. Schutz SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+// Implementation version v0 of PHOS Manager class 
+// Layout EMC + PPSD has name GPS2  
+//                  
+//*-- Author: Yves Schutz (SUBATECH)
+
 
 // --- ROOT system ---
 
@@ -46,6 +50,7 @@ ClassImp(AliPHOSv0)
 //____________________________________________________________________________
 AliPHOSv0::AliPHOSv0()
 {
+  // ctor
   fNTmpHits = 0 ; 
   fTmpHits  = 0 ; 
 }
@@ -54,7 +59,8 @@ AliPHOSv0::AliPHOSv0()
 AliPHOSv0::AliPHOSv0(const char *name, const char *title):
   AliPHOS(name,title)
 {
-  
+  // ctor : title is used to identify the layout
+  //        GPS2 = 5 modules (EMC + PPSD)   
   // We use 2 arrays of hits :
   //
   //   - fHits (the "normal" one), which retains the hits associated with
@@ -92,7 +98,8 @@ AliPHOSv0::AliPHOSv0(const char *name, const char *title):
 AliPHOSv0::AliPHOSv0(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title):
   AliPHOS(name,title)
 {
-  
+  // ctor : title is used to identify the layout
+  //        GPS2 = 5 modules (EMC + PPSD)   
   // We use 2 arrays of hits :
   //
   //   - fHits (the "normal" one), which retains the hits associated with
@@ -101,6 +108,7 @@ AliPHOSv0::AliPHOSv0(AliPHOSReconstructioner * Reconstructioner, const char *nam
   //
   //   - fTmpHits, which retains all the hits of the current event. It 
   //     is used for the digitization part.
+
   fPinElectronicNoise = 0.010 ;
   fHits   = new TClonesArray("AliPHOSHit",100) ;
   fDigits = new TClonesArray("AliPHOSDigit",100) ;
@@ -126,6 +134,8 @@ AliPHOSv0::AliPHOSv0(AliPHOSReconstructioner * Reconstructioner, const char *nam
 //____________________________________________________________________________
 AliPHOSv0::~AliPHOSv0()
 {
+  // dtor
+
   fTmpHits->Delete() ; 
   delete fTmpHits ;
   fTmpHits = 0 ; 
@@ -146,6 +156,10 @@ AliPHOSv0::~AliPHOSv0()
 //____________________________________________________________________________
 void AliPHOSv0::AddHit(Int_t primary, Int_t Id, Float_t * hits)
 {
+  // Add a hit to the hit list.
+  // A PHOS hit is the sum of all hits in a single crystal
+  //   or in a single PPSD gas cell
+
   Int_t hitCounter ;
   TClonesArray &ltmphits = *fTmpHits ;
   AliPHOSHit *newHit ;
@@ -188,6 +202,36 @@ void AliPHOSv0::AddHit(Int_t primary, Int_t Id, Float_t * hits)
 //____________________________________________________________________________
 void AliPHOSv0::BuildGeometry()
 {
+  // Build the PHOS geometry for the ROOT display
+  //BEGIN_HTML
+  /*
+    <H2>
+     PHOS in ALICE displayed by root
+    </H2>
+    <UL>
+    <LI> All Views
+    <P>
+    <CENTER>
+    <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif"> 
+    </CENTER></P></LI>
+    <LI> Front View
+    <P>
+    <CENTER>
+    <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif"> 
+    </CENTER></P></LI>
+     <LI> 3D View 1
+    <P>
+    <CENTER>
+    <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif"> 
+    </CENTER></P></LI>
+    <LI> 3D View 2
+    <P>
+    <CENTER>
+    <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif"> 
+    </CENTER></P></LI>
+    </UL>
+  */
+  //END_HTML  
 
   this->BuildGeometryforPHOS() ; 
   if ( ( strcmp(fGeom->GetName(), "GPS2" ) == 0 ) ) 
@@ -200,7 +244,7 @@ void AliPHOSv0::BuildGeometry()
 //____________________________________________________________________________
 void AliPHOSv0:: BuildGeometryforPHOS(void)
 {
- // Build the PHOS geometry for the ROOT display
+ // Build the PHOS-EMC geometry for the ROOT display
 
   const Int_t kColorPHOS = kRed ;
   const Int_t kColorXTAL = kBlue ;
@@ -299,8 +343,26 @@ void AliPHOSv0:: BuildGeometryforPHOS(void)
 //____________________________________________________________________________
 void AliPHOSv0:: BuildGeometryforPPSD(void)
 {
- //  Build the PPSD geometry for the ROOT display
-
+ //  Build the PHOS-PPSD geometry for the ROOT display
+ //BEGIN_HTML
+  /*
+    <H2>
+     PPSD displayed by root
+    </H2>
+    <UL>
+    <LI> Zoom on PPSD: Front View
+    <P>
+    <CENTER>
+    <IMG Align=BOTTOM ALT="PPSD Front View" SRC="../images/AliPHOSv0PPSDFrontView.gif"> 
+    </CENTER></P></LI>
+    <LI> Zoom on PPSD: Perspective View
+    <P>
+    <CENTER>
+    <IMG Align=BOTTOM ALT="PPSD Prespective View" SRC="../images/AliPHOSv0PPSDPerspectiveView.gif"> 
+    </CENTER></P></LI>
+    </UL>
+  */
+  //END_HTML  
   Double_t const kRADDEG = 180.0 / kPI ;
 
   const Int_t kColorPHOS = kRed ;
@@ -541,6 +603,7 @@ void AliPHOSv0:: BuildGeometryforPPSD(void)
 //____________________________________________________________________________
 void AliPHOSv0::CreateGeometry()
 {
+  // Create the PHOS geometry for Geant
 
   AliPHOSv0 *phostmp = (AliPHOSv0*)gAlice->GetModule("PHOS") ;
 
@@ -550,7 +613,6 @@ void AliPHOSv0::CreateGeometry()
     return;
     
   }
-
   // Get pointer to the array containing media indeces
   Int_t *idtmed = fIdtmed->GetArray() - 699 ;
 
@@ -591,7 +653,19 @@ void AliPHOSv0::CreateGeometry()
 //____________________________________________________________________________
 void AliPHOSv0::CreateGeometryforPHOS()
 {
-  // Get pointer to the array containing media indeces
+  // Create the PHOS-EMC geometry for GEANT
+    //BEGIN_HTML
+  /*
+    <H2>
+    Geant3 geometry tree of PHOS-EMC in ALICE
+    </H2>
+    <P><CENTER>
+    <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif"> 
+    </CENTER><P>
+  */
+  //END_HTML  
+  
+  // Get pointer to the array containing media indexes
   Int_t *idtmed = fIdtmed->GetArray() - 699 ;
 
   // ---
@@ -847,7 +921,20 @@ void AliPHOSv0::CreateGeometryforPHOS()
 //____________________________________________________________________________
 void AliPHOSv0::CreateGeometryforPPSD()
 {
-  // Get pointer to the array containing media indeces
+  // Create the PHOS-PPSD geometry for GEANT
+
+  //BEGIN_HTML
+  /*
+    <H2>
+    Geant3 geometry tree of PHOS-PPSD in ALICE
+    </H2>
+    <P><CENTER>
+    <IMG Align=BOTTOM ALT="PPSD geant tree" SRC="../images/PPSDinAlice.gif"> 
+    </CENTER><P>
+  */
+  //END_HTML  
+
+  // Get pointer to the array containing media indexes
   Int_t *idtmed = fIdtmed->GetArray() - 699 ;
   
   // The box containing all ppsd's for one PHOS module filled with air 
@@ -1034,7 +1121,10 @@ void AliPHOSv0::CreateGeometryforPPSD()
 }
 
 //___________________________________________________________________________
-Int_t AliPHOSv0::Digitize(Float_t Energy){
+Int_t AliPHOSv0::Digitize(Float_t Energy)
+{
+  // Applies the energy calibration
+  
   Float_t fB = 100000000. ;
   Float_t fA = 0. ;
   Int_t chan = Int_t(fA + Energy*fB ) ;
@@ -1043,8 +1133,10 @@ Int_t AliPHOSv0::Digitize(Float_t Energy){
 //___________________________________________________________________________
 void AliPHOSv0::FinishEvent()
 {
-//    cout << "//_____________________________________________________" << endl ;
-//    cout << "<I> AliPHOSv0::FinishEvent() -- Starting digitalization" << endl ;
+  // Makes the digits from the sum of summed hit in a single crystal or PPSD gas cell
+  // Adds to the energy the electronic noise
+  // Keeps digits with energy above fDigitThreshold
+
   Int_t i ;
   Int_t relid[4];
   Int_t j ; 
@@ -1053,7 +1145,7 @@ void AliPHOSv0::FinishEvent()
   AliPHOSDigit * newdigit ;
   AliPHOSDigit * curdigit ;
   Bool_t deja = kFALSE ; 
-
+  
   for ( i = 0 ; i < fNTmpHits ; i++ ) {
     hit = (AliPHOSHit*)fTmpHits->At(i) ;
     newdigit = new AliPHOSDigit( hit->GetPrimary(), hit->GetId(), Digitize( hit->GetEnergy() ) ) ;
@@ -1100,7 +1192,8 @@ void AliPHOSv0::FinishEvent()
 //____________________________________________________________________________
 void AliPHOSv0::Init(void)
 {
+  // Just prints an information message
+  
   Int_t i;
 
   printf("\n");
@@ -1119,10 +1212,8 @@ void AliPHOSv0::Init(void)
 //___________________________________________________________________________
 void AliPHOSv0::MakeBranch(Option_t* opt)
 {  
-  //
-  // Create a new branch in the current Root Tree
-  // The branch of fHits is automatically split
-  //
+  // Create new branche in the current Root Tree in the digit Tree
+
   AliDetector::MakeBranch(opt) ;
   
   char branchname[10];
@@ -1132,54 +1223,86 @@ void AliPHOSv0::MakeBranch(Option_t* opt)
   if (fDigits && gAlice->TreeD() && cdD) {
     gAlice->TreeD()->Branch(branchname,&fDigits, fBufferSize);
   }
-  char *cdR = strstr(opt,"R");
-  if (fRecParticles && gAlice->TreeR() && cdR) {
-    gAlice->TreeR()->Branch(branchname, &fRecParticles, fBufferSize);
-  }
 }
 
 //_____________________________________________________________________________
 void AliPHOSv0::Reconstruction(AliPHOSReconstructioner * Reconstructioner)
 { 
-  // reinitializes the existing RecPoint Lists and steers the reconstruction processes
-
+  // 1. Reinitializes the existing RecPoint, TrackSegment, and RecParticles Lists and 
+  // 2. Creates a branch in TreeR for each list
+  // 3. Steers the reconstruction processes
+  // 4. Saves the 3 lists in TreeR
+  // 5. Write the Tree to File
+  
   fReconstructioner = Reconstructioner ;
+  
+  char branchname[10] ;
 
+  // 1.
+  
   if (fEmcClusters) { 
     fEmcClusters->Delete() ; 
     delete fEmcClusters ;
     fEmcClusters = 0 ; 
   }
   fEmcClusters= new RecPointsList("AliPHOSEmcRecPoint", 100) ;
+  if ( fEmcClusters && gAlice->TreeR() ) {
+    sprintf(branchname,"%sERP",GetName()) ;
+    gAlice->TreeR()->Branch(branchname, &fEmcClusters, fBufferSize);
+  }
+
   if (fPpsdClusters) { 
     fPpsdClusters->Delete() ; 
     delete fPpsdClusters ; 
     fPpsdClusters = 0 ; 
   }
   fPpsdClusters = new RecPointsList("AliPHOSPpsdRecPoint", 100) ;
+  if ( fPpsdClusters && gAlice->TreeR() ) {
+     sprintf(branchname,"%sPRP",GetName()) ;
+     gAlice->TreeR()->Branch(branchname, &fPpsdClusters, fBufferSize);
+ }
 
-  if (fTrackSegments) {  
+  if (fTrackSegments) { 
    fTrackSegments->Delete() ; 
     delete fTrackSegments ; 
     fTrackSegments = 0 ; 
   }
-  fTrackSegments = new TrackSegmentsList(100) ;
+  fTrackSegments = new TrackSegmentsList("AliPHOSTrackSegment", 100) ;
+  if ( fTrackSegments && gAlice->TreeR() ) { 
+    sprintf(branchname,"%sTS",GetName()) ;
+    gAlice->TreeR()->Branch(branchname, &fTrackSegments, fBufferSize);
+  }
+
  if (fRecParticles) {  
    fRecParticles->Delete() ; 
     delete fRecParticles ; 
     fRecParticles = 0 ; 
   }
   fRecParticles = new RecParticlesList("AliPHOSRecParticle", 100) ;
+  if ( fRecParticles && gAlice->TreeR() ) { 
+    sprintf(branchname,"%sRP",GetName()) ;
+    gAlice->TreeR()->Branch(branchname, &fRecParticles, fBufferSize);
+  }
+  
+  // 3.
 
   fReconstructioner->Make(fDigits, fEmcClusters, fPpsdClusters, fTrackSegments, fRecParticles);
 
+  // 4.
+
+  gAlice->TreeR()->Fill() ;
+  // 5.
+
+  gAlice->TreeR()->Write() ;
+  
 }
 
 //____________________________________________________________________________
 void AliPHOSv0::StepManager(void)
 {
+  // Accumulates hits as long as the track stays in a single crystal or PPSD gas Cell
+
   Int_t          relid[4] ;      // (box, layer, row, column) indices
   Float_t        xyze[4] ;       // position wrt MRS and energy deposited
   TLorentzVector pos ;
@@ -1187,9 +1310,8 @@ void AliPHOSv0::StepManager(void)
 
   Int_t primary =  gAlice->GetPrimary( gAlice->CurrentTrack() ); 
   TString name = fGeom->GetName() ; 
-
   if ( name == "GPS2" ) { // the CPV is a PPSD
-    if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") )
+    if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") ) // We are inside a gas cell 
     {
       gMC->TrackPosition(pos) ;
       xyze[0] = pos[0] ;
index 5ebc9a36e0412ec1419f99026960c1d27b9649f8..f41c243c07206406515a5699a4e42ee25f3d2d78 100644 (file)
@@ -3,13 +3,11 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-////////////////////////////////////////////////
-//  Manager class  for PHOS                   //
-//  Version SUBATECH                          //
-//  Author  Y. Schutz SUBATECH                //
-//       geometry parametrized for any        //  
-//       shape of modules                     //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Implementation version v0 of PHOS Manager class 
+// Layout EMC + PPSD has name GPS2  
+//                  
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 #include "TClonesArray.h"
@@ -55,19 +53,19 @@ public:
   
 protected:
 
-  Float_t fDigitThreshold ;             // Threshold for the digit registration 
-  RecPointsList * fEmcClusters ;        // The RecPoints (clusters) list in EMC 
-  AliPHOSGeometry * fGeom ;             // geometry definition
-  Int_t fNTmpHits ;                     //!  used internally for digitalization
-  Float_t fPinElectronicNoise  ;       // Electronic Noise in the PIN
-  RecPointsList * fPpsdClusters ;       // The RecPoints (clusters) list in PPSD 
-  AliPHOSReconstructioner * fReconstructioner ; // Reconstrutioner of the PHOS event: Clusterization and subtracking procedures
-  TClonesArray * fTmpHits ;             //!  used internally for digitalization 
+  Float_t fDigitThreshold ;                       // Threshold for the digit registration 
+  RecPointsList * fEmcClusters ;                  // The RecPoints (clusters) list in EMC 
+  AliPHOSGeometry * fGeom ;                       // Geometry definition
+  Int_t fNTmpHits ;                               //!  Used internally for digitalization
+  Float_t fPinElectronicNoise  ;                  // Electronic Noise in the PIN
+  RecPointsList * fPpsdClusters ;                 // The RecPoints (clusters) list in PPSD 
+  AliPHOSReconstructioner * fReconstructioner ;   // Reconstrutioner of the PHOS event: Clusterization and subtracking procedures
+  TClonesArray * fTmpHits ;                       //!  Used internally for digitalization 
   AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Reconstructioner of the PHOS track segment: 2 x PPSD + 1 x EMC
-  TrackSegmentsList * fTrackSegments ;  // The TrackSegment list in PHOS
-  RecParticlesList * fRecParticles ;    // The reconstructed particles list in PHOS
+  TrackSegmentsList * fTrackSegments ;            // The TrackSegment list in PHOS
+  RecParticlesList * fRecParticles ;              // The reconstructed particles list in PHOS
 
-  ClassDef(AliPHOSv0,1)  // PHOS main class , version subatech
+  ClassDef(AliPHOSv0,1)  // Implementation of PHOS manager class for layout EMC+PPSD
 
 };
 
index 49a66670822cd9be447f51b20d010a732c7b2556..e58fea5d82887739f658daf2642ce8038e4afd48 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Manager class for PHOS version SUBATECH
-//*-- Author : Odd Harald Oddland & Gines Martinez  Feb-2000 
-// The main goal of this version of AliPHOS is to calculted the 
-// induced charged in the PIN diode, taking into account light
-// tracking in the PbWO4 crystal, induced signal in the 
-// PIN due to MIPS particle and electronic noise.
-// In this respect, this class derived from AliPHOSv0 and 
-// only the StepManager function has been "surcharged"
-//////////////////////////////////////////////////////////////////////////////
+// Implementation version v0 of PHOS Manager class 
+// Layout EMC + PPSD has name GPS2  
+// The main goal of this version of AliPHOS is to calculte the 
+//  induced charged in the PIN diode, taking into account light
+//  tracking in the PbWO4 crystal, induced signal in the 
+//  PIN due to MIPS particle and electronic noise.
+// This is done in the StepManager 
+//                  
+//*-- Author:  Odd Harald Oddland & Gines Martinez (SUBATECH)
+
 
 // --- ROOT system ---
 #include "TRandom.h"
@@ -33,7 +36,6 @@
 #include <cstring>
 #include <cstdlib>
 #include <strstream>
-#include <cassert>
 
 // --- AliRoot header files ---
 
 
 ClassImp(AliPHOSv1)
 
-//____________________________________________________________________________
-  AliPHOSv1::AliPHOSv1() :
-    AliPHOSv0()
-{ 
-}
-
 //____________________________________________________________________________
 AliPHOSv1::AliPHOSv1(const char *name, const char *title):
   AliPHOSv0(name,title)
 {
+  // ctor 
+
+  // Number of electrons created in the PIN due to light collected in the PbWo4 crystal is calculated using 
+  // following formula
+  // NumberOfElectrons = EnergyLost * LightYield * PINEfficiency * 
+  //                     exp (-LightYieldAttenuation * DistanceToPINdiodeFromTheHit) *
+  //                     RecalibrationFactor ;
+  // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV fromValery Antonenko
+  // PINEfficiency is 0.1875 from Odd Harald Odland work
+  // k_0 is 0.0045 from Valery Antonenko 
+
   fLightYieldMean = 700000. ;
   fIntrinsicPINEfficiency = 0.1875 ;
   fLightYieldAttenuation = 0.0045 ;
   fRecalibrationFactor = 6.2 / fLightYieldMean ;
   fElectronsPerGeV = 2.77e+8 ; 
 }
+
 //____________________________________________________________________________
 AliPHOSv1::AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title):
   AliPHOSv0(Reconstructioner,name,title)
-{ 
+{
+  // ctor 
+
+  // Number of electrons created in the PIN due to light collected in the PbWo4 crystal is calculated using 
+  // following formula
+  // NumberOfElectrons = EnergyLost * LightYield * PINEfficiency * 
+  //                     exp (-LightYieldAttenuation * DistanceToPINdiodeFromTheHit) *
+  //                     RecalibrationFactor ;
+  // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV fromValery Antonenko
+  // PINEfficiency is 0.1875 from Odd Harald Odland work
+  // k_0 is 0.0045 from Valery Antonenko 
+
   fLightYieldMean = 700000.;
   fIntrinsicPINEfficiency = 0.1875 ;
   fLightYieldAttenuation = 0.0045 ;
   fRecalibrationFactor = 6.2 / fLightYieldMean ;
-  fElectronsPerGeV = 2.77e+8 ; // Odd Harald work
+  fElectronsPerGeV = 2.77e+8 ;
 }
 
-//____________________________________________________________________________
-AliPHOSv1::~AliPHOSv1() 
-{ 
-}
-
-//____________________________________________________________________________
-
-
-
-
-
-
 //____________________________________________________________________________
 void AliPHOSv1::StepManager(void)
 {
+  // Accumulates hits as long as the track stays in a single crystal or PPSD gas Cell
+  // Adds the energy deposited in the PIN diode
+
   Int_t          relid[4] ;      // (box, layer, row, column) indices
   Float_t        xyze[4] ;       // position wrt MRS and energy deposited
   TLorentzVector pos ;
   Int_t copy;
-  Float_t        lightyield ;  // Light Yield per GeV
-  Float_t        nElectrons ; // Number of electrons in the PIN diode
+  Float_t        lightyield ;   // Light Yield per GeV
+  Float_t        nElectrons ;   // Number of electrons in the PIN diode
   TString name = fGeom->GetName() ; 
   Float_t        global[3] ;
   Float_t        local[3] ;
@@ -102,8 +111,7 @@ void AliPHOSv1::StepManager(void)
   Int_t primary =  gAlice->GetPrimary( gAlice->CurrentTrack() ); 
 
   if ( name == "GPS2" ) { // the CPV is a PPSD
-    if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") )
-    //     if( strcmp ( gMC->CurrentVolName(), "GCEL" ) == 0 )  // We are inside a gas cell 
+    if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") ) // We are inside a gas cell 
     {
       gMC->TrackPosition(pos) ;
       xyze[0] = pos[0] ;
@@ -132,8 +140,7 @@ void AliPHOSv1::StepManager(void)
      } // We are inside the gas of the CPV  
    } // GPS2 configuration
   
-   if(gMC->CurrentVolID(copy) == gMC->VolId("PXTL") ) 
-  //      if( strcmp ( gMC->CurrentVolName(), "PXTL" ) == 0 ) { //  We are inside a PWO crystal
+  if(gMC->CurrentVolID(copy) == gMC->VolId("PXTL") )//  We are inside a PBWO crystal 
      {
        gMC->TrackPosition(pos) ;
        xyze[0] = pos[0] ;
@@ -181,7 +188,7 @@ void AliPHOSv1::StepManager(void)
 
        if ( xyze[3] != 0 ) {
           gMC->CurrentVolOffID(11, relid[0]) ; // get the PHOS module number ;
-          relid[1] = 0   ;                    // means PW04and PIN
+          relid[1] = 0   ;                    // means PW04 and PIN
           gMC->CurrentVolOffID(5, relid[2]) ; // get the row number inside the module
           gMC->CurrentVolOffID(4, relid[3]) ; // get the cell number inside the module
 
index 80357f31c84573359e8da051a228004d3c2a8021..d843edb7e6707e7c01689737c894dd79b6e34382 100644 (file)
@@ -3,18 +3,16 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-////////////////////////////////////////////////
-//  Manager class  for PHOS                   //
-//  Version SUBATECH
-//  Author : Odd Harald Oddland & 
-//           Gines Martinez        Feb-2000 
-// The main goal of this version of AliPHOS is to calculted the 
-// induced charged in the PIN diode, taking into account light
-// tracking in the PbWO4 crystal, induced signal in the 
-// PIN due to MIPS particle and electronic noise.
-// In this respect, this class derived from AliPHOSv0 and 
-// only the StepManager function has been "surcharged"
-////////////////////////////////////////////////////////////////////            
+//_________________________________________________________________________
+// Implementation version v0 of PHOS Manager class 
+// Layout EMC + PPSD has name GPS2  
+// The main goal of this version of AliPHOS is to calculte the 
+//  induced charged in the PIN diode, taking into account light
+//  tracking in the PbWO4 crystal, induced signal in the 
+//  PIN due to MIPS particle and electronic noise.
+// This is done in the StepManager 
+//                  
+//*-- Author:  Odd Harald Oddland & Gines Martinez (SUBATECH)
 
 // --- ROOT system ---
 
@@ -27,32 +25,23 @@ class AliPHOSv1 : public AliPHOSv0 {
 
 public:
 
-  AliPHOSv1(void) ;
+  AliPHOSv1(void) : AliPHOSv0() {} // ctor 
   AliPHOSv1(const char *name, const char *title="") ;
   AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title="") ;
-  virtual ~AliPHOSv1(void) ;
+  virtual ~AliPHOSv1(void) {} 
                             
   virtual void   StepManager(void) ;                                // does the tracking through PHOS and a preliminary digitalization
  
   
 private:
-  //
-  // Number of electrons created in the PIN due to light collected in the PbWo4 crystal is calculated using 
-  // following formula
-  // NumberOfElectrons = EnergyLost * LightYield * PINEfficiency * 
-  //                     exp (-LightYieldAttenuation * DistanceToPINdiodeFromTheHit) *
-  //                     RecalibrationFactor ;
-  // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV fromValery Antonenko
-  // PINEfficiency is 0.1875 from Odd Harald Odland work
-  // k_0 is 0.0045 from Valery Antonenko 
-  //
-  Float_t fLightYieldMean ;   // Mean of the Poisson distribution which is the mean lightyield in the PbOW4 xtal per GeV
-  Float_t fIntrinsicPINEfficiency ;    
-  Float_t fLightYieldAttenuation ; 
-  Float_t fRecalibrationFactor ;
-  Float_t fElectronsPerGeV ;   //Number of electrons per GeV created in the PIN by a ionizing particle
-
-  ClassDef(AliPHOSv1,1)  // PHOS v1 main class , version subatech with light transportation, MIPS in PIN and electronic noise
+  
+  Float_t fLightYieldMean ;         // Mean lightyield in the PbOW4 xtal per GeV (Poisson distribution)
+  Float_t fIntrinsicPINEfficiency ; // Photo efficiency of the PIN diode   
+  Float_t fLightYieldAttenuation ;  // Attenuation of the light through the crystal
+  Float_t fRecalibrationFactor ;    // Recalibration factor
+  Float_t fElectronsPerGeV ;        // Number of electrons per GeV created in the PIN by a ionizing particle
+
+  ClassDef(AliPHOSv1,1)  // Implementation of PHOS manager class for layout EMC+PPSD with light transport, MIPS in PIN and electronic noise
 
 };
 
index 88f98edbb6c374fb5c84359c6a7e8846ce99eea9..e62ff687f259b3bf354cee6b742b1801c365ad28 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Manager class for PHOS version for fast simulations
-//*-- Author : Y. Schutz SUBATECH 
-//////////////////////////////////////////////////////////////////////////////
+// Implementation of the PHOS manager class for fast simulations     
+// Tracks particles until the reach a grossly designed PHOS module
+// Modify the particles property (momentum, energy, type) according to
+//  the PHOS response function. The result is called a virtual reconstructed
+//  particle.                
+//
+//*-- Author: Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
@@ -27,7 +33,6 @@
 // --- Standard library ---
 
 #include <cstdio>
-#include <cassert>
 
 // --- AliRoot header files ---
 
@@ -40,6 +45,8 @@ ClassImp(AliPHOSvFast)
 //____________________________________________________________________________
 AliPHOSvFast::AliPHOSvFast()
 {
+  // ctor
+
   fFastRecParticles = 0 ; 
   fNRecParticles = 0 ; 
 }
@@ -48,6 +55,8 @@ AliPHOSvFast::AliPHOSvFast()
 AliPHOSvFast::AliPHOSvFast(const char *name, const char *title):
   AliPHOS(name,title)
 {
+  // ctor
+
   // gets an instance of the geometry parameters class  
    
   fGeom =  AliPHOSGeometry::GetInstance(title, "") ; 
@@ -78,6 +87,7 @@ AliPHOSvFast::AliPHOSvFast(const char *name, const char *title):
 //____________________________________________________________________________
 AliPHOSvFast::~AliPHOSvFast()
 {
+  // dtor
  
   fFastRecParticles->Delete() ; 
   delete fFastRecParticles ;
@@ -88,6 +98,8 @@ AliPHOSvFast::~AliPHOSvFast()
 //____________________________________________________________________________
 void AliPHOSvFast::AddRecParticle(const AliPHOSFastRecParticle & rp)
 {  
+  // Add a virtually reconstructed particle to the list 
+
   new( (*fFastRecParticles)[fNRecParticles] ) AliPHOSFastRecParticle(rp) ;
   fNRecParticles++ ; 
 }
@@ -95,9 +107,25 @@ void AliPHOSvFast::AddRecParticle(const AliPHOSFastRecParticle & rp)
 //____________________________________________________________________________
 void AliPHOSvFast::BuildGeometry()
 {
-
   // Build the PHOS geometry for the ROOT display
-  
+   //BEGIN_HTML
+  /*
+    <H2>
+     PHOS FAST in ALICE displayed by root
+    </H2>
+    <H4> All Views </H4>
+    <P>
+    <CENTER>
+    <IMG Align=BOTTOM ALT="Fast All Views" SRC="../images/AliPHOSvFastAllViews.gif"> 
+    </CENTER></P>
+    <H4> Front View </H4>
+    <P>
+    <CENTER>
+    <IMG Align=BOTTOM ALT="Fast Front View" SRC="../images/AliPHOSvFastFrontView.gif"> 
+    </CENTER></P>
+  */
+  //END_HTML  
   const Int_t kColorPHOS = kRed ;
   
   Double_t const kRADDEG = 180.0 / kPI ;
@@ -108,9 +136,9 @@ void AliPHOSvFast::BuildGeometry()
   
   // position PHOS into ALICE
 
-  Float_t r = fGeom->GetIPtoOuterCoverDistance() + GetBigBox(1) / 2.0 ;
+  Float_t r = fGeom->GetIPtoCrystalSurface() + GetBigBox(1) / 2.0 ;
   Int_t number = 988 ; 
-  Float_t pphi =  TMath::ATan( GetBigBox(0)  / ( 2.0 * fGeom->GetIPtoOuterCoverDistance() ) ) ;
+  Float_t pphi =  TMath::ATan( GetBigBox(0)  / ( 2.0 * fGeom->GetIPtoCrystalSurface() ) ) ;
   pphi *= kRADDEG ;
   TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
  
@@ -136,9 +164,10 @@ void AliPHOSvFast::BuildGeometry()
 //____________________________________________________________________________
 void AliPHOSvFast::CreateGeometry()
 {
-
+  // Create the geometry for GEANT
+  
   AliPHOSvFast *phostmp = (AliPHOSvFast*)gAlice->GetModule("PHOS") ;
-
+  
   if ( phostmp == NULL ) {
     
     fprintf(stderr, "PHOS detector not found!\n") ;
@@ -166,7 +195,7 @@ void AliPHOSvFast::CreateGeometry()
     Float_t angle = fGeom->GetPHOSAngle(i) ;
     AliMatrix(idrotm[i-1], 90.0, angle, 90.0, 90.0+angle, 0.0, 0.0) ;
  
-    Float_t r = fGeom->GetIPtoOuterCoverDistance() + GetBigBox(1) / 2.0 ;
+    Float_t r = fGeom->GetIPtoCrystalSurface() + GetBigBox(1) / 2.0 ;
 
     Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ;
     Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ;
@@ -180,7 +209,8 @@ void AliPHOSvFast::CreateGeometry()
 //____________________________________________________________________________
 void AliPHOSvFast::Init(void)
 {
+  // Prints out an information message
+  
   Int_t i;
 
   printf("\n");
@@ -199,6 +229,8 @@ void AliPHOSvFast::Init(void)
 //___________________________________________________________________________
 Float_t AliPHOSvFast::GetBigBox(Int_t index)
 {
+  // Get the X, Y or Z dimension of the box describing a PHOS module
+  
   Float_t rv = 0 ; 
 
   switch (index) {
@@ -218,8 +250,7 @@ Float_t AliPHOSvFast::GetBigBox(Int_t index)
 //___________________________________________________________________________
 void AliPHOSvFast::MakeBranch(Option_t* opt)
 {  
-  //
-  // Create a new branch in the current Root Tree
+  // Create new branch in the current reconstructed Root Tree
  
   AliDetector::MakeBranch(opt) ;
   
@@ -235,6 +266,9 @@ void AliPHOSvFast::MakeBranch(Option_t* opt)
 //____________________________________________________________________________
 Double_t AliPHOSvFast::MakeEnergy(const Double_t energy)
 {  
+  // Smears the energy according to the energy dependent energy resolution.
+  // A gaussian distribution is assumed
+
   Double_t sigma  = SigmaE(energy) ; 
   return  fRan.Gaus(energy, sigma) ;   
 }
@@ -242,6 +276,9 @@ Double_t AliPHOSvFast::MakeEnergy(const Double_t energy)
 //____________________________________________________________________________
 TVector3 AliPHOSvFast::MakePosition(const Double_t energy, const TVector3 pos, const Double_t theta, const Double_t phi)
 {
+  // Smears the impact position according to the energy dependent position resolution
+  // A gaussian position distribution is assumed
+
   TVector3 newpos ;
   Double_t sigma = SigmaP( energy, theta*180./TMath::Pi() ) ;
   Double_t x = fRan.Gaus( pos.X(), sigma ) ;
@@ -259,8 +296,10 @@ TVector3 AliPHOSvFast::MakePosition(const Double_t energy, const TVector3 pos, c
 //____________________________________________________________________________
 void AliPHOSvFast::MakeRecParticle(const Int_t modid, const TVector3 pos, AliPHOSFastRecParticle & rp)
 {
-  // get the detected type of particle
+  // Modify the primary particle properties according
+  //  1. the response function of PHOS
+  //  2. the performance of the EMC+PPSD setup
+  
   Int_t type = MakeType( rp ) ;
   rp.SetType(type) ;
 
@@ -293,6 +332,8 @@ void AliPHOSvFast::MakeRecParticle(const Int_t modid, const TVector3 pos, AliPHO
 //____________________________________________________________________________
 Int_t AliPHOSvFast::MakeType(AliPHOSFastRecParticle & rp )
 {
+  // Generate a particle type using the performance of the EMC+PPSD setup
+
   Int_t rv =  kUNDEFINED ;
   Int_t charge = (Int_t)rp.GetPDG()->Charge() ;
   Int_t test ; 
@@ -366,12 +407,16 @@ Int_t AliPHOSvFast::MakeType(AliPHOSFastRecParticle & rp )
 //___________________________________________________________________________
 void AliPHOSvFast::ResetPoints()
 {
+  // This overloads the method in AliDetector
+  
   ResetFastRecParticles() ; 
 }
 
 //___________________________________________________________________________
 void AliPHOSvFast::ResetFastRecParticles()
 {
+  // Resets the list of virtual reconstructed particles
   if (fFastRecParticles) 
     fFastRecParticles->Clear() ;
   fNRecParticles = 0 ; 
@@ -380,7 +425,8 @@ void AliPHOSvFast::ResetFastRecParticles()
 //___________________________________________________________________________
 void AliPHOSvFast::SetBigBox(Int_t index, Float_t value)
 {
-
+  // Set the size of the Box describing a PHOS module
+  
   switch (index) {
   case 0:
     fBigBoxX = value ; 
@@ -398,6 +444,8 @@ void AliPHOSvFast::SetBigBox(Int_t index, Float_t value)
 //____________________________________________________________________________
 Double_t AliPHOSvFast::SigmaE(Double_t energy)
 {
+  // Calculates the energy dependent energy resolution
+  
   Double_t rv = -1 ; 
   
   rv = TMath::Sqrt( TMath::Power(fResPara1/energy, 2) 
@@ -410,7 +458,8 @@ Double_t AliPHOSvFast::SigmaE(Double_t energy)
 //____________________________________________________________________________
 Double_t AliPHOSvFast::SigmaP(Double_t energy, Int_t incidence)
 {
+  // Calculates the energy dependent position resolution 
+
   Double_t paraA = fPosParaA0 + fPosParaA1 * incidence ; 
   Double_t paraB = fPosParaB0 + fPosParaB1 * incidence + fPosParaB2 * incidence * incidence ; 
 
@@ -420,7 +469,8 @@ Double_t AliPHOSvFast::SigmaP(Double_t energy, Int_t incidence)
 //____________________________________________________________________________
 void AliPHOSvFast::StepManager(void)
 {
-
+  // Only verifies if the particle reaches PHOS and stops the tracking 
+  
   Int_t primary =  gAlice->GetPrimary( gAlice->CurrentTrack() ); 
   TLorentzVector lv ; 
   gMC->TrackPosition(lv) ;
@@ -434,6 +484,7 @@ void AliPHOSvFast::StepManager(void)
   TParticle * part = (TParticle *)particlelist->At(primary) ;  
 
   AliPHOSFastRecParticle rp(*part) ;
+  rp.SetPrimary(primary) ; 
 
   // Adds the response of PHOS to the particle
 
index a61c391d847f49553303987427c8cf0e499f3ae1..90a2c790dd90600bcc9f045347c523dae4140d0c 100644 (file)
@@ -3,16 +3,17 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-////////////////////////////////////////////////
-//  Manager class  for PHOS                   //
-//  Version SUBATECH                          //
-//  Author  Y. Schutz SUBATECH                //
-//       This is the class to be used for     //  
-//       fast simulations                     //
-////////////////////////////////////////////////
-
 /* $Id$ */
 
+//_________________________________________________________________________
+// Implementation of the PHOS manager class for fast simulations     
+// Tracks particles until the reach a grossly designed PHOS module
+// Modify the particles property (momentum, energy, type) according to
+//  the PHOS response function. The result is called a virtual reconstructed
+//  particle.                                
+//                  
+//*-- Author: Yves Schutz (SUBATECH)
+
 // --- ROOT system ---
 #include "TClonesArray.h"
 #include "TRandom.h"
@@ -70,7 +71,7 @@ private:
   Double_t fPosParaB1 ;                      // parameter for the position resolution 
   Double_t fPosParaB2 ;                      // parameter for the position resolution
 
-  ClassDef(AliPHOSvFast,1)  // PHOS main class , version for fast simulation
+  ClassDef(AliPHOSvFast,1)  //  Implementation of the PHOS manager class for fast simulations  
 
 };
 
index 2bdde88b0c6708d0cd47ffd9203c1640809c7883..d7e248ddc11685e766d0bf0230cd8b4ecaf095c2 100644 (file)
@@ -11,13 +11,14 @@ PACKAGE = PHOS
 
 SRCS          =    AliPHOS.cxx AliPHOSv0.cxx AliPHOSv1.cxx AliPHOSHit.cxx \
                    AliPHOSGeometry.cxx \
-                   AliPHOSDigit.cxx \
+                   AliPHOSDigit.cxx  \
                    AliPHOSRecPoint.cxx AliPHOSEmcRecPoint.cxx AliPHOSPpsdRecPoint.cxx \
                   AliPHOSClusterizer.cxx AliPHOSClusterizerv1.cxx  AliPHOSLink.cxx \
                   AliPHOSReconstructioner.cxx  AliPHOSTrackSegment.cxx \
                    AliPHOSTrackSegmentMaker.cxx AliPHOSTrackSegmentMakerv1.cxx \
                    AliPHOSRecParticle.cxx AliPHOSPID.cxx AliPHOSPIDv1.cxx \
-                   AliPHOSAnalyze.cxx  AliPHOSvFast.cxx AliPHOSFastRecParticle.cxx
+                   AliPHOSAnalyze.cxx  AliPHOSvFast.cxx AliPHOSFastRecParticle.cxx \
+                   AliPHOSArray.cxx
 
 
 # C++ Headers
index 94ad19047898285e112072acdb5a2d7924fa8f20..fee92c90041ebd567e036ddba99033e447b64325 100644 (file)
@@ -19,8 +19,30 @@ that each sub-detector makes a Use Case for a fast simulation scheme. Here is wh
 <P>
 
 <center><img SRC="usecasefastsimulation.gif" ALT="[Use Case for fast simulation]" height=425 width=483></center>
+<P>
+This has been implemented in a new class <a href="html/AliPHOSvFast.html"> AliPHOSvFast </a> ( <a href="html/AliPHOSvFast_Tree.ps"> 
+inheritance tree </a> ). The synopsis goes as follow :
+<br> <br>
+<pre class="code">      
+      AliPHOSvFast::AliDetector
+      
+      <b>CreateGeometry() </b> {
+
+       describes the coarse outline of PHOS as 5 boxes }
+
+      <b>StepManager()</b> {
+
+       when particle reaches PHOS {
+         stop the tracking
+         modifiy the attributes (energy, momentum, type) of the primary particle according to the PHOS response
+         construct a "virtual" reconstructed particle }
+       save the reconstructed particle in a list }
 
+      <b>FinishEvent()</b> {
 
+        write the list in TreeR
+        write the TreeR to file }
+</pre>
 <hr>
 <address class="left">
 &copy; <a href="mailto:schutz@in2p3.fr">Groupe Photons Subatech</a> <a href="http://www-subatech.in2p3.fr/~photons/subatech/en_index.shtml">[Go
@@ -29,7 +51,7 @@ to the GPS Home Page]</a></address>
 <address class="right"> 
 <!-- Created: Tue Oct 26 19:52:56 CEST 1999 -->
 <!-- hhmts start -->
-Last modified: Wed Dec  7 18:54:10 CET 1999
+Last modified: Sun Mar 12 23:52:09 CET 2000
 <!-- hhmts end --></address>
 
 <div align=right><a href="http://validator.w3.org/check/referer"><img SRC="vh40.gif" ALT="Valid HTML 4.0!" BORDER=0 height=31 width=88></a><a href="http://jigsaw.w3.org/css-validator"><img SRC="vcss.gif" ALT="Valid CSS!" BORDER=0 height=31 width=88></a></div>
index ccfb0492d287c81c137c3301ca3d7c1327f4f89a..76f8449d8bc26df5a162acd31de8f9aad8f4cb4b 100644 (file)
@@ -6,9 +6,8 @@
    <meta name="GENERATOR" content="Mozilla/4.51 [en] (X11; I; Linux 2.2.5-15 i686) [Netscape]">
    <title>PHOS Geometry in AliRoot</title>
 <link REL="stylesheet" href="http://www-subatech.in2p3.fr/~photons/gps_alice.css" type="text/css">
-</head>
-<body>
-
+  <body>
+    
 <h1 class="page-header">
 Geometry & Materials
 </h1>
@@ -81,11 +80,22 @@ detectors per PHOS module, each detectors being subdivided into <i>fNumberOfPads
 x <i>fNumberOfPadsZ </i>gas cells, a Lead converter and a second layer
 of gas detectors identical to the first layer. This second part is positionned
 on top of the EMCA module.
+<P>
+The class <a href="html/AliPHOSv0.html"> AliPHOSv0 </a> ( <a href="html/AliPHOSv0_Tree.ps"> inheritance tree </a>) describes this geometry. We have defined also a class 
+<a href="html/AliPHOSv1.html"> AliPHOSv1 </a> ( <a href="html/AliPHOSv1_Tree.ps"> inheritance tree </a>) which in addition contains the photodiode response and the light transport through the crystal.
+<P>
+The parameters of the geometry are given in class  <a href="html/AliPHOSGeometry.html"> AliPHOSGeometry </a>( <a href="html/AliPHOSGeometry_Tree.ps"> inheritance tree </a>)
 <br><br>
     <center>
-      <img SRC="PHOSGeantTree.gif" ALT="Geant Tree for PHOS" >
+      <img SRC=" html/images/EMCinAlice.gif" ALT="Geant Tree for PHOS" >
+      <br><br>
+      <b> Figure 1.a: </b> <i> GEANT Tree which describes the EMC-PHOS geometry </i>
+    </center>
+    <P>
+    <center>
+      <img SRC=" html/images/PPSDinAlice.gif" ALT="Geant Tree for PHOS" >
       <br><br>
-      <b> Figure 1.: </b> <i> GEANT Tree which describes the PHOS geometry </i>
+      <b> Figure 1.b: </b> <i> GEANT Tree which describes the PPSD-PHOS geometry </i>
     </center>
 
 <h4>
@@ -165,23 +175,20 @@ AliPHOS * phos = new AliPHOSv4("PHOS", char * name) ;
 <i>GPS2</i>: will create EMCA plus PPSD
 <br><br>
     <center>
-         <table>
-           <tr>
-             <td align=center valign=baseline>
-               <img SRC="AlicebyGeant.gif" ALT="Geant display of PHOS" width="447" height="429" >
-             </td>
-             <td align=center valign=baseline>
-               <img SRC="AlicebyRoot.gif" ALT="Root display of Alice" width="447" height="429" >
-             </td>
-           <tr>
-             <td align=left valign=top>
-               <b> Figure 3.: </b> <i> GEANT display of ALICE </i>
-             </td>
-             <td align=left valign=top>
-               <b> Figure 4.: </b> <i> Root display of ALICE  </i>
-             </td>
-           </tr>         
-         </table>
+         <img SRC="html/images/AliPHOSv0AllViews.gif" ALT="ROOT display of PHOS: All Views" >
+         <b> Figure 3a.: </b> <i> ROOT Display of ALICE: All Views   </i>
+         <P>
+         <img SRC="html/images/AliPHOSv0FrontView.gif" ALT="ROOT display of PHOS: Front View" >
+         <b> Figure 3b.: </b> <i> ROOT Display of ALICE: Front Views   </i>
+         <P>
+         <img SRC="html/images/AliPHOSv03DView1.gif" ALT="ROOT display of PHOS: 3D View" >
+         <b> Figure 3c.: </b> <i> ROOT Display of ALICE: All View3   </i>
+         <P>
+          <img SRC="html/images/AliPHOSv0PPSDFrontView.gif" ALT="Zoom on PPSD: Front View " >
+         <b> Figure 4.a: </b> <i> ROOT Display of ALICE: zoom on PPSD, Front Views  </i>
+         <P>
+          <img SRC="html/images/AliPHOSv0PPSDPerspectiveView.gif" ALT="Zoom on PPSD: Perspective View " >
+         <b> Figure 4.b: </b> <i> ROOT Display of ALICE: zoom on PPSD, Perspective View  </i>
        </center> <br><br>
 </li>
 
@@ -202,7 +209,7 @@ EMCA module of 2 layers of 4x4 gas detectors each, each detector having
 </address>
 <!-- Created: Wed Nov 17 12:16:58 CET 1999 -->
 <!-- hhmts start -->
-Last modified: Tue Nov 23 09:49:02 CET 1999
+Last modified: Sun Mar 12 23:49:58 CET 2000
 <!-- hhmts end -->
 <div align=right><a href="http://validator.w3.org/check/referer"><img SRC="vh40.gif" ALT="Valid HTML 4.0!" BORDER=0 height=31 width=88></a><a href="http://jigsaw.w3.org/css-validator"><img SRC="vcss.gif" ALT="Valid CSS!" BORDER=0 height=31 width=88></a></div>
 
index 2f10154b25bf4e1cddbc719476be05cf08498d29..6948ee1f34f627b2a3c3cbfea56e02d07bec0376 100644 (file)
@@ -5,9 +5,9 @@
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <meta name="GENERATOR" content="Mozilla/4.51 [en] (X11; I; Linux 2.2.5-15 i686) [Netscape]">
     <title>PHOS in AliRoot</title>
-    <!-- Changed by: Yves Schutz,  7-Dec-1999 -->
-    <link REL="stylesheet" href="http://www-subatech.in2p3.fr/~photons/gps_alice.css" type="text/css">
-    
+    <!-- Changed by: Yves Schutz,  7-Dec-1999  
+    <link REL="stylesheet" href="http://www-subatech.in2p3.fr/~photons/gps_alice.css" type="text/css">-->   
+
     <script type="text/javascript">
       image1 = new Image(30,44);
       image1.src = "tournesol.jpg";
     <address class="right">
       <!-- Created: Tue Oct 26 19:52:56 CEST 1999 -->
       <!-- hhmts start -->
-Last modified: Wed Dec  1 10:10:38 CET 1999
+Last modified: Sun Mar 12 23:44:04 CET 2000
 <!-- hhmts end --></address>
     
 <!--    <div align=right><a href="http://validator.w3.org/check/referer"><img SRC="vh40.gif" ALT="Valid HTML 4.0!" BORDER=0 height=31 width=88></a><a href="http://jigsaw.w3.org/css-validator"><img SRC="vcss.gif" ALT="Valid CSS!" BORDER=0 height=31 width=88></a></div>-->
index 2f6eea0635edab58c152c5a917b8ed2b436d0096..e87de223bae7e630660c4aeb76dd97ad37e76791 100644 (file)
@@ -5,6 +5,7 @@
 #pragma link off all functions;
 
 #pragma link C++ class AliPHOS ;
+#pragma link C++ class AliPHOSArray ;
 #pragma link C++ class AliPHOSClusterizer ;
 #pragma link C++ class AliPHOSClusterizerv1 ;
 #pragma link C++ class AliPHOSDigit ;
index 89ca98bbd536b3efccc49baac3393ae9b457b942..c332a10a92e2048394190f4671f3774ba5c246a5 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id$ */
+
 //_________________________________________________________________________
-// Short description
-//*-- Author :   SUBATECH 
+// Short description  
+//
+//*-- Author :  (SUBATECH) 
 //////////////////////////////////////////////////////////////////////////////
 
 // --- ROOT system ---
@@ -30,14 +33,15 @@ ClassImp(AliPHOSxxx)
 
 
 //____________________________________________________________________________ 
-AliPHOSxxx::AliPHOSxxx()
+  AliPHOSxxx::AliPHOSxxx() 
 {
   // ctor
+
 }
 
-//____________________________________________________________________________
-AliPHOSxxx::~AliPHOSxxx()
+//____________________________________________________________________________ 
+  AliPHOSxxx::~AliPHOSxxx()
 {
-  // dtor
-}
+  // ctor
 
+}
index 66be28077c1f7fafa1664fbdbdf9c04b297a56ba..53fa9a247dbb41e62877d39f9bc4741081115346 100644 (file)
@@ -5,12 +5,11 @@
 
 /* $Id$ */
 
-////////////////////////////////////////////////
-//  Short description                         //
-//  Author                 SUBATECH           //
-//      comment                               //  
-//                                            //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+//  Base Class for PHOS     
+//                  
+//*-- Author: (SUBATECH)
+
 
 // --- ROOT system ---
 
@@ -27,7 +26,7 @@ public:
 
 private:
 
-  ClassDef(AliPHOSxxx,1)  // description , version 1
+  ClassDef(AliPHOSxxx,1)  // description 
 
 };