]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSAnalyze.h
bug fix in the vertex selection
[u/mrichter/AliRoot.git] / PHOS / AliPHOSAnalyze.h
index 2d4e9cd29334fc9f35ef9d24aed01a15ceee2b9d..a8bbcb6120460d214b43a5bd0de2b6078bf20620 100644 (file)
@@ -6,23 +6,26 @@
 /* $Id$ */
 
 //_________________________________________________________________________
-//  Algorithm class to analyze PHOSv0 events    
+// Algorythm class to analyze PHOSv1 events:
+// Construct histograms and displays them.
+// Use the macro EditorBar.C for best access to the functionnalities
+//*--
 //*-- Author : Yves Schutz (SUBATECH)
 
 // --- ROOT system ---
 
-#include "TFile.h"
-#include "TH1.h"
-#include "TH2.h"
+class TFile ;
+class TH1F ;
+class TH2F ;
 
 // --- Standard library ---
 
 // --- AliRoot header files ---
 
-#include "AliPHOSv0.h"
-#include "AliPHOSGeometry.h"
-#include "AliPHOSPID.h"
-#include "AliPHOSIndexToObject.h"
+class AliPHOSv1 ;
+class AliPHOSGeometry ;
+class AliPHOSLoader ;
+class AliRunLoader ; 
 
 class AliPHOSAnalyze : public TObject {
 
@@ -30,58 +33,48 @@ public:
 
   AliPHOSAnalyze() ;              // ctor
   AliPHOSAnalyze(Text_t * name) ; // ctor
+  AliPHOSAnalyze(const AliPHOSAnalyze & ana) ; // cpy ctor                   
   virtual ~AliPHOSAnalyze() ;     // dtor
 
-  void AnalyzeOneEvent(Int_t evt = -999) ;  // analyzes a single event ;
-  void AnalyzeManyEvents(Int_t Nevtents = 100, Int_t Module=0) ;  // analyzes many events   ;
-  void BookingHistograms() ;                // booking histograms for the ManyEvent analysis ;
-  Bool_t Init(Int_t evt) ;                  // does various initialisations
-  void DisplayKineEvent(Int_t evt = -999) ; // displays the Kine events in ALICE coordinate 
-  void DisplayRecParticles() ;              // displays RecParticles in ALICE coordinate  
-  void DisplayRecPoints() ;                 // displays RecPoints in module coordinate  
-  void DisplayTrackSegments() ;             // displays TrackSegments in module coordinate  
-  Bool_t OpenRootFile(Text_t * name) ;      // opens the root file
-  void SavingHistograms() ;                 // Save histograms in a root file
+  void DrawRecon(Int_t Nevent= 0,Int_t Nmod = 1) ; 
+  // draws positions of entering of primaries and reconstructed objects in PHOS
+
+  void InvariantMass() ;      // Photons invariant mass distributions
+
+  void EnergyResolution () ;  // analyzes Energy resolution ;
+
+  void PositionResolution() ; // analyzes Position resolution ;
+
+  void Contamination() ;      // Counts contamination of photon spectrum
+
+  void Ls() ; //Prints PHOS-related contents of TreeS, TreeD and TreeR
+
+  void SetEnergyCorrection(Float_t ecor){fCorrection = ecor ;} 
+
+  AliPHOSAnalyze & operator = (const AliPHOSAnalyze & /*rvalue*/)  {
+    // assignement operator requested by coding convention but not needed
+    Fatal("operator =", "not implemented") ;
+    return *this ; 
+  }
  
 private:
-  
-  AliPHOSClusterizer * fClu ;         // a clusterizer 
-  Int_t fEvt ;                        // the evt number being processed 
-  AliPHOSGeometry * fGeom ;           // the PHOS Geometry object
-  AliPHOSIndexToObject * fObjGetter ; // provides methods to retrieve objects from their index in a list
-  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
-
-
-ClassDef(AliPHOSAnalyze,1)  // PHOSv0 event analyzis algorithm
+
+  Float_t CorrectedEnergy(Float_t ReconstEnergy)const
+    {return ReconstEnergy * fCorrection;} 
+  //Converts reconstructed energy (energy of the EMCRecPoint) to the energy of primary
+  //The coeficient shoud be (and was) calculated usin Erec vs. Eprim plot 
+  //(see Energy Resolution function). However, if one change parameters of reconstruction 
+  //or geometry, one have to recalculate coefficient!
+
+private:
+
+  Float_t fCorrection ;               //! Conversion coefficient between True and Reconstructed energies
+  Int_t   fEvt ;                      //! the evt number being processed 
+  TString ffileName ;                 //! the root file that contains the data
+
+  AliRunLoader* fRunLoader;           //! run loader of the specified filename
+
+ClassDef(AliPHOSAnalyze,1)  // PHOSv1 event analyzis algorithm
 
 };