]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Geometry parameters in constructor and call of SetCellSize()
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Jan 2002 09:37:36 +0000 (09:37 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Jan 2002 09:37:36 +0000 (09:37 +0000)
EMCAL/AliEMCALJetFinder.cxx
EMCAL/AliEMCALJetFinder.h

index e0150dcadbcd9b02086d51e97ea5468f5c04c235..77318c41a62178109d7ea39fb338409676687d0e 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.12  2002/01/23 13:40:23  morsch
+Fastidious debug print statement removed.
+
 Revision 1.11  2002/01/22 17:25:47  morsch
 Some corrections for event mixing and bg event handling.
 
@@ -130,6 +133,25 @@ AliEMCALJetFinder::AliEMCALJetFinder(const char* name, const char *title)
     SetHadronCorrection();
     SetSamplingFraction();
     SetIncludeK0andN();
+//
+//
+//  Get geometry parameters from EMCAL
+// 
+    AliEMCAL* pEMCAL = (AliEMCAL*) gAlice->GetModule("EMCAL");
+    AliEMCALGeometry* geom = 
+       AliEMCALGeometry::GetInstance(pEMCAL->GetTitle(), "");
+    fNbinEta = geom->GetNZ();
+    fNbinPhi = geom->GetNPhi();
+    fPhiMin  = geom->GetArm1PhiMin()*TMath::Pi()/180.;
+    fPhiMax  = geom->GetArm1PhiMax()*TMath::Pi()/180.;
+    fEtaMin  = geom->GetArm1EtaMin();
+    fEtaMax  = geom->GetArm1EtaMax();
+    fDphi    = (fPhiMax-fPhiMin)/fNbinEta;
+    fDeta    = (fEtaMax-fEtaMin)/fNbinEta;
+    fNtot    = fNbinPhi*fNbinEta;
+//
+    SetCellSize(fDeta, fDphi);
+    
 }
 
 
@@ -257,8 +279,6 @@ void AliEMCALJetFinder::SetCellSize(Float_t eta, Float_t phi)
 // Set grid cell size
     EMCALCELLGEO.etaCellSize = eta;
     EMCALCELLGEO.phiCellSize = phi;    
-    fDeta = eta;
-    fDphi = phi;
 }
 
 void AliEMCALJetFinder::SetConeRadius(Float_t par)
@@ -384,33 +404,20 @@ void AliEMCALJetFinder::BookLego()
 //
 //  Book histo for discretisation
 //
-//
-//  Get geometry parameters from 
-    AliEMCAL* pEMCAL = (AliEMCAL*) gAlice->GetModule("EMCAL");
-    AliEMCALGeometry* geom = 
-       AliEMCALGeometry::GetInstance(pEMCAL->GetTitle(), "");
-    fNbinEta = geom->GetNZ();
-    fNbinPhi = geom->GetNPhi();
-    const Float_t  phiMin  = geom->GetArm1PhiMin()*TMath::Pi()/180.;
-    const Float_t  phiMax  = geom->GetArm1PhiMax()*TMath::Pi()/180.;
-    const Float_t  etaMin  = geom->GetArm1EtaMin();
-    const Float_t  etaMax  = geom->GetArm1EtaMax();
-    fDphi   = (phiMax-phiMin)/fNbinEta;
-    fDeta   = 1.4/fNbinEta;
-    fNtot   = fNbinPhi*fNbinEta;
+
 //
 //  Don't add histos to the current directory
     TH2::AddDirectory(0);
 //    
 //  Signal map
     fLego = new TH2F("legoH","eta-phi",
-                          fNbinEta, etaMin, etaMax, 
-                          fNbinPhi, phiMin, phiMax);
+                          fNbinEta, fEtaMin, fEtaMax, 
+                          fNbinPhi, fPhiMin, fPhiMax);
 //
 //  Background map
     fLegoB = new TH2F("legoB","eta-phi",
-                          fNbinEta, etaMin, etaMax, 
-                          fNbinPhi, phiMin, phiMax);
+                          fNbinEta, fEtaMin, fEtaMax, 
+                          fNbinPhi, fPhiMin, fPhiMax);
     
 }
 
index 93cd32c79c8a091ff709e53c31aeb7a879be20fa..6b74b378d3017d0aa72af9e97c4f4f47ea0d6fc5 100644 (file)
@@ -96,6 +96,10 @@ class AliEMCALJetFinder : public TTask {
     Int_t                          fNtot;            //! total number of cells
     Int_t                          fNbinEta;         //! number of cells in eta
     Int_t                          fNbinPhi;         //! number of cells in phi
+    Float_t                        fEtaMin;          //! minimum eta  
+    Float_t                        fEtaMax;          //! maximum eta
+    Float_t                        fPhiMin;          //! minimun phi
+    Float_t                        fPhiMax;          //! maximum phi
     Float_t                        fEtCell[30000];   //! Cell Energy
     Float_t                        fEtaCell[30000];  //! Cell eta
     Float_t                        fPhiCell[30000];  //! Cell phi