]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Removed old jetfinder
authormhorner <mhorner@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Jan 2004 23:38:56 +0000 (23:38 +0000)
committermhorner <mhorner@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Jan 2004 23:38:56 +0000 (23:38 +0000)
EMCAL/AliEMCALJetFinderAlgoUA1BG.cxx [deleted file]
EMCAL/AliEMCALJetFinderAlgoUA1BG.h [deleted file]
EMCAL/AliEMCALJetMicroDst.h

diff --git a/EMCAL/AliEMCALJetFinderAlgoUA1BG.cxx b/EMCAL/AliEMCALJetFinderAlgoUA1BG.cxx
deleted file mode 100644 (file)
index 9e0079d..0000000
+++ /dev/null
@@ -1,586 +0,0 @@
-//SARAH'S REVISED PERSONAL COPY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-//BASED ON UA1REVISED BUT WITH UPFRONT BG SUBTRACTION!!!!
-
-
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-/* $Id$ */
-
-//*--Author: Sarah Blyth (LBL)
-//*--Based on UA1 jet algorithm from LUND JETSET called from EMC-erj
-
-#include "TTask.h"
-#include "AliEMCALJetFinderInput.h"
-#include "AliEMCALJetFinderOutput.h"
-#include "AliEMCALJetFinderAlgo.h"
-#include "AliEMCALJetFinderAlgoUA1BG.h"
-#include "AliEMCALJetFinderAlgoUA1Unit.h"
-#include "AliEMCALGeometry.h"
-#include "AliEMCAL.h"
-#include "AliEMCALDigit.h"
-#include "TParticle.h"
-#include "AliRun.h"
-#include "AliEMCALJet.h"
-#include "TMath.h"
-
-
-ClassImp(AliEMCALJetFinderAlgoUA1BG)
-
-  AliEMCALJetFinderAlgoUA1BG::AliEMCALJetFinderAlgoUA1BG()
-{
-  //Default constructor
-if (fDebug>0) Info("AliEMCALJetFinderAlgoUA1BG","Beginning Default Constructor");
-
-  fNumIter           = 0;
-  fNumUnits          = 13824;     //Number of towers in EMCAL
-  fESeed             = 5.0;       //Default value
-  fConeRad           = 0.5;       //Default value
-  fJetEMin           = 10.0;      //Default value
-  fEtMin             = 0.28;      //Default value
-  fMinMove           = 0.05;      //From original UA1 JetFinder
-  fMaxMove           = 0.15;      //From original UA1 JetFinder
-  fBGMaxMove         = 0.035;     //From original UA1 JetFinder
-  fPtCut             = 0;         
-  fHadCorr           = 0;       
-  fEBGTotal          = 1.0;       //Set to 1 so that no div by zero in first FindJets() loop
-  fEBGTotalOld       = 0.0;
-  fEBGAve            = 0.0;
-  fEnergy            = 0.0;
-  fJetEta            = 0.0;
-  fJetPhi            = 0.0;
-  fEtaInit           = 0.0;
-  fPhiInit           = 0.0;
-  fEtaB              = 0.0;
-  fPhiB              = 0.0;
-  fJetESum           = 0.0;
-  fJetEtaSum         = 0.0;
-  fJetPhiSum         = 0.0;
-  fDEta              = 0.0;
-  fDPhi              = 0.0;
-  fDistP             = 0.0;
-  fDistI             = 0.0;
-  fTempE             = 0.0;
-  fRad               = 2.0;      //Set to 2 to start 
-  fNumInCone         = 0;
-  fNumJets           = 0;
-  fArrayInitialised  = 0;        //Set to FALSE to start
-}
-
- AliEMCALJetFinderAlgoUA1BG::~AliEMCALJetFinderAlgoUA1BG()
-   {
-     //Destructor
-     if (fDebug>0) Info("AliEMCALJetFinderAlgoUA1BG","Beginning Destructor");
-     delete[] fUnit;
-   }
-
- void AliEMCALJetFinderAlgoUA1BG::SetJetFindingParameters
-                               (Int_t numUnits, Float_t eSeed, Float_t coneRad, Float_t jetEMin, Float_t etMin, 
-                               Float_t minMove, Float_t maxMove, Float_t bgMaxMove)
-   {
-     //Sets parameters for the JetFinding algorithm
-     if (fDebug>1) Info("SetJetFindingParameters","Setting parameters for JetFinding");
-
-     SetNumUnits(numUnits);
-     SetJetESeed(eSeed);
-     SetConeRad(coneRad);
-     SetJetEMin(jetEMin);
-     SetEtMin(etMin);
-     SetMinMove(minMove);
-     SetMaxMove(maxMove);
-     SetBGMaxMove(bgMaxMove);
-   }
-
- void AliEMCALJetFinderAlgoUA1BG::SetJetFindingParameters
-                               (Int_t numUnits, Float_t eSeed, Float_t coneRad, Float_t jetEMin, Float_t etMin)
-   {
-     //Sets fewer parameters for the JetFinding algorithm
-     if (fDebug>1) Info("SetJetFindingParameters","Setting parameters for JetFinding");
-
-     SetNumUnits(numUnits);
-     SetJetESeed(eSeed);
-     SetConeRad(coneRad);
-     SetJetEMin(jetEMin);
-     SetEtMin(etMin);
-     SetMinMove(fMinMove);
-     SetMaxMove(fMaxMove);
-     SetBGMaxMove(fBGMaxMove);
-   }
-
- void AliEMCALJetFinderAlgoUA1BG::InitUnitArray()
-   {
-     //Initialises unit array
-     if(fArrayInitialised) delete[] fUnit;
-     fUnit = new AliEMCALJetFinderAlgoUA1Unit[fNumUnits];
-     fArrayInitialised = 1;
-   }
-
- void AliEMCALJetFinderAlgoUA1BG::FillUnitArray(AliEMCALJetFinderAlgoUA1FillUnitFlagType_t flag)
-   {
-     if (fDebug>1) Info("FillUnitArray","Beginning FillUnitArray");
-     AliEMCAL* pEMCAL = (AliEMCAL*) gAlice->GetModule("EMCAL");
-
-         //   if (pEMCAL){ 
-         //         AliEMCALGeometry* geom =  AliEMCALGeometry::GetInstance(pEMCAL->GetTitle(), "");
-         //     }else
-         //    {
-     AliEMCALGeometry* geom =  AliEMCALGeometry::GetInstance("EMCAL_5655_21", "");
-        //    }
-         
-     AliEMCALJetFinderAlgoUA1FillUnitFlagType_t option = flag;
-     Int_t         numTracks, numDigits;
-    
-     //Loops over all elements in the AliEMCALJetFinderAlgoUA1Unit array and 
-     //fills the objects with relevant values from the Data Input object
-     if (fDebug>1) Info("FillUnitArray","Filling array with Unit objects");
-     if (fDebug>1) Info("FillUnitArray","NTracks %i NDigits %i",fInputPointer->GetNTracks(),fInputPointer->GetNDigits());
-        numTracks = fInputPointer->GetNTracks();
-        numDigits = fInputPointer->GetNDigits();
-        TParticle         *myPart;
-        AliEMCALDigit     *myDigit;
-
-        //Fill units with Track info if appropriate
-        if(option==kFillTracksOnly || option ==kFillAll) 
-          {          
-           for(Int_t j=0; j<numTracks; j++)
-           {
-            myPart = fInputPointer->GetTrack(j);
-            Float_t eta = myPart->Eta();
-            Float_t  phi = myPart->Phi();
-            Int_t towerID = geom->TowerIndexFromEtaPhi(eta,180.0/TMath::Pi()*phi);
-            Float_t  pT = myPart->Pt();
-            Float_t unitEnergy = fUnit[towerID-1].GetUnitEnergy(); 
-
-            //Do Hadron Correction
-              if(fHadCorr != 0)
-              {
-                Double_t   fullP = myPart->P();
-                Double_t   hCEnergy = fHadCorr->GetEnergy(fullP, (Double_t)eta);
-                unitEnergy -= hCEnergy*TMath::Sin(myPart->Theta());
-                fUnit[towerID-1].SetUnitEnergy(unitEnergy);
-              } //end Hadron Correction loop 
-            
-            //Do Pt cut on tracks
-            if(fPtCut != 0 && pT < fPtCut) continue;
-
-            fUnit[towerID-1].SetUnitEnergy(unitEnergy+pT);
-
-             }//end tracks loop
-          }//end Tracks condition
-
-
-        //Fill units with Digit info if appropriate
-        if(option ==kFillDigitsOnly || option ==kFillAll)
-          {
-            for(Int_t k=0; k<numDigits; k++)
-           {
-            myDigit = fInputPointer->GetDigit(k);
-             if (fDebug>1) Info("FillUnitArray","getting digits %i %i numdigits",k,numDigits );
-            Int_t towerID = myDigit->GetId();
-            Int_t amplitude = myDigit->GetAmp();     //Gets the integer valued amplitude of the digit
-            Float_t amp = (Float_t)amplitude;        //Need to typecast to Float_t before doing real energy conversion
-            Float_t digitEnergy = amp/10000000.0;    //Factor of 10 million needed to convert!
-            Float_t unitEnergy = fUnit[towerID-1].GetUnitEnergy() + digitEnergy;
-            fUnit[towerID-1].SetUnitEnergy(unitEnergy);
-
-           }//end digits loop
-          }//end digits condition
-
-                    //NEW BG SUBTRACTION!!!!!!!!!!!!!!!!!!!!
-                   for(Int_t m=0; m<fNumUnits; m++)
-                   {
-                    Float_t prevEnergy = fUnit[m].GetUnitEnergy();
-                    prevEnergy -= 0.13;           //From previous Hijing BG study
-                    if(prevEnergy < 0) prevEnergy =0.0;
-                    fUnit[m].SetUnitEnergy(prevEnergy);
-                    }//end for
-
-        //Set all unit flags, Eta, Phi
-        for(Int_t i=0; i<fNumUnits; i++)
-          {
-             if (fDebug>1) Info("FillUnitArray","Setting all units outside jets");
-            fUnit[i].SetUnitFlag(kOutJet);           //Set all units to be outside a jet initially
-            fUnit[i].SetUnitID(i+1);
-            Float_t eta;
-            Float_t phi;
-            geom->EtaPhiFromIndex(fUnit[i].GetUnitID(), eta, phi);
-            fUnit[i].SetUnitEta(eta);
-            fUnit[i].SetUnitPhi(phi*TMath::Pi()/180.0);
-            //      if(i>13000) cout<<"!!!!!!!!!!!!!!!!!For unit0, eta="<<eta<<" and phi="<<phi*TMath::Pi()/180.0<<" and ID="<<fUnit[i].GetUnitID()<<endl;
-            //  if(fUnit[i].GetUnitEnergy()>0) cout<<"Unit ID "<<fUnit[i].GetUnitID() <<"with eta="<<eta<<" and phi="<<phi*TMath::Pi()/180.0<<" has energy="<<fUnit[i].GetUnitEnergy()<<endl;
-          }//end loop over all units in array (same as all towers in EMCAL)
-   }
-
-
- void AliEMCALJetFinderAlgoUA1BG::Sort(AliEMCALJetFinderAlgoUA1Unit *unit, Int_t length)
- {
-   //Calls the recursive quicksort method to sort unit objects in decending order of Energy
-   if (fDebug>1) Info("Sort","Sorting Unit objects");
-   QS(unit, 0, length-1);
- }
-  
-
- void AliEMCALJetFinderAlgoUA1BG::QS(AliEMCALJetFinderAlgoUA1Unit *unit, Int_t left, Int_t right)
- {
-  //Sorts the AliEMCALJetFinderAlgoUA1Unit objects in decending order of Energy
-   if (fDebug>111) Info("QS","QuickSorting Unit objects");   
-
-   Int_t    i;
-   Int_t    j;
-   AliEMCALJetFinderAlgoUA1Unit  unitFirst;
-   AliEMCALJetFinderAlgoUA1Unit  unitSecond;
-
-   i = left;
-   j = right;
-   unitFirst = unit[(left+right)/2];
-
- do
-  {
-    while( (unit[i].GetUnitEnergy() > unitFirst.GetUnitEnergy()) && (i < right)) i++;
-    while( (unitFirst.GetUnitEnergy() > unit[j].GetUnitEnergy()) && (j > left)) j--;
-
-    if(i <= j)
-      {
-       unitSecond = unit[i];
-       unit[i] = unit[j];
-       unit[j] = unitSecond;
-       i++;
-       j--;
-      }//end if
-  }while(i <= j);
-
- if(left < j) QS(unit, left, j);
- if(i < right) QS(unit, i, right);
- }
-
-
- void AliEMCALJetFinderAlgoUA1BG::FindBG()
-   {
-     //Finds the background energy for the iteration
-     if (fDebug>1) Info("FindBG","Finding Average Background"); 
-
-     fEBGTotal          = 0.0;
-     Int_t numCone      = 0;
-
-     //Loop over all unit objects in the array and sum the energy of those not in a jet
-     for(Int_t i=0; i<fNumUnits; i++)
-       {
-        if(fUnit[i].GetUnitFlag() != kInJet)
-          fEBGTotal += fUnit[i].GetUnitEnergy();
-        else numCone++;
-       }//end for
-
-     fEBGTotalOld = fEBGTotal;
-     fEBGAve = fEBGTotal / (fNumUnits - numCone);
-     if (fDebug>5) Info("FindBG","Average BG is %f: ",fEBGAve);      
-
-     for(Int_t count=0; count<fNumUnits;count++)
-       {
-        fUnit[count].SetUnitFlag(kOutJet);
-       }//end for
-   }
-
-
- void AliEMCALJetFinderAlgoUA1BG::FindJetEtaPhi(Int_t counter)
-   {
-     //Finds the eta and phi of the jet axis
-     if (fDebug>1) Info("FindJetEtaPhi","Finding Jet Eta and Phi");
-
-     fDEta = fUnit[counter].GetUnitEta() - fEtaInit;
-     fDPhi = fUnit[counter].GetUnitPhi() - fPhiInit;
-
-     fEnergy = fUnit[counter].GetUnitEnergy() - fEBGAve;
-     fJetEtaSum += fEnergy * fDEta;
-     fJetPhiSum += fEnergy * fDPhi;
-     fJetESum += fEnergy;
-     fJetEta = fEtaInit + (fJetEtaSum / fJetESum);
-     fJetPhi = fPhiInit + (fJetPhiSum / fJetESum);
-   }
-
-
- void AliEMCALJetFinderAlgoUA1BG::FindJetEnergy()
-   {
-     //Finds the energy of the jet after the final axis has been found
-     if (fDebug>1) Info("FindJetEnergy","Finding Jet Energy");
-
-     for(Int_t i=0; i<fNumUnits; i++)
-       {
-        //Loop over all unit objects in the array and find if within cone radius
-        Float_t dEta = fUnit[i].GetUnitEta() - fJetEta;
-        Float_t dPhi = fUnit[i].GetUnitPhi() - fJetPhi;
-        Float_t rad = TMath::Sqrt( (dEta*dEta) + (dPhi*dPhi) );
-
-        if(fUnit[i].GetUnitFlag()==kOutJet && rad<= fConeRad)
-          {
-            fUnit[i].SetUnitFlag(kInCurrentJet);
-            Float_t energy = fUnit[i].GetUnitEnergy() - fEBGAve;
-            fJetESum += energy;                             
-            fJetEtaSum += energy * dEta;
-            fJetPhiSum += energy * dPhi;
-            fNumInCone++;                     //Increment the number of cells in the jet cone
-          }//end if
-       }//end for
-   }
-
-
- void AliEMCALJetFinderAlgoUA1BG::StoreJetInfo()
-   {
-     //Stores the resulting jet information in appropriate storage structure (TO BE DECIDED!!!!)
-     if (fDebug>1) Info("StoreJetInfo","Storing Jet Information");
-    
-     //Store:
-     //fJetESum is the final jet energy (background has been subtracted)
-     //fJetEta is the final jet Eta
-     //fJetPhi is the final jet Phi
-     //fNumInCone is the final number of cells included in the jet cone
-     //fEtaInit is the eta of the initiator cell
-     //fPhiInit is the phi of the initiator cell
-     fJet.SetEnergy(fJetESum);
-     fJet.SetEta(fJetEta);
-     fJet.SetPhi(fJetPhi);
-
-      cout<<"For iteration "<<fNumIter <<" and Jet number " <<fNumJets <<endl;
-      cout<<"The jet energy is: " <<fJetESum <<endl;
-      cout<<"The jet eta is ---->" <<fJetEta <<endl;
-      cout<<"The jet phi is ---->" <<fJetPhi <<endl;
-
-     Int_t             numberTracks = fInputPointer->GetNTracks();
-     TParticle         *myP;
-     Int_t             numTracksInCone = 0;
-
-     for(Int_t counter=0; counter<numberTracks; counter++)
-       {
-       myP = fInputPointer->GetTrack(counter);
-       Float_t eta = myP->Eta();
-       Float_t phi = myP->Phi(); 
-       Float_t deta = fJetEta-eta;
-       Float_t dphi = fJetPhi -phi;
-       Float_t rad = TMath::Sqrt( (deta*deta) + (dphi*dphi));
-       if(rad<=fConeRad) numTracksInCone++;
-       }//end for
-
-     Float_t    *pTArray = new Float_t[numTracksInCone];
-     Float_t    *etaArray = new Float_t[numTracksInCone];
-     Float_t    *phiArray = new Float_t[numTracksInCone];
-     Int_t      *pdgArray = new Int_t[numTracksInCone];
-     Int_t             index = 0;
-
-     for(Int_t counter2=0; counter2<numberTracks; counter2++)
-       {
-        myP = fInputPointer->GetTrack(counter2);
-        Float_t eta = myP->Eta();
-         Float_t phi = myP->Phi(); 
-        Float_t deta = fJetEta-eta;
-        Float_t dphi = fJetPhi -phi;
-        Float_t rad = TMath::Sqrt( (deta*deta) + (dphi*dphi));
-        if(rad<=fConeRad)
-          {
-            pTArray[index] = myP->Pt();
-            etaArray[index] = eta;
-            phiArray[index] = phi;
-            pdgArray[index] = myP->GetPdgCode();
-            index++;
-          }//end if
-       }//end for
-
-     fJet.SetTrackList(numTracksInCone,pTArray, etaArray, phiArray, pdgArray);
-     fOutputObject.AddJet(&fJet);
-     delete[] pTArray;
-     delete[] etaArray;
-     delete[] phiArray;
-     delete[] pdgArray;
-   }
-
-
- void AliEMCALJetFinderAlgoUA1BG::FindJets()
-   {
-     //Runs the complete UA1 JetFinding algorithm to find jets!
-     if (fDebug>1) Info("FindJets","Starting Jet Finding!!!");
-
-     //If the array of JetFinderUnit objects has not been initialised then initialise with default settings
-     if(!fArrayInitialised) 
-      {
-       InitUnitArray();
-       FillUnitArray(kFillAll);
-      }//end if
-     if (fDebug>1) Info("FindJets","Unit array filled");
-
-     //Step 1. Sort the array in descending order of Energy
-     Sort(fUnit,fNumUnits);
-
-     //Step 2. Set the number of iterations and Number of jets found to zero to start
-     fNumIter = 0;
-     fNumJets = 0;
-
-     //Step 3. Begin the iteration loop to find jets
-     //Need to iterate the algorithm while number of iterations<2 OR number of iterations<10 AND 
-     //the value of the average background has changed more than specified amount
-     //Min iterations = 2, Max iterations = 10
-     //while(fNumIter<2 || (fNumIter <10 && ( (fEBGTotal-fEBGTotalOld)/fEBGTotal) > fBGMaxMove) )
-
-     while(fNumIter<2 || (fNumIter <10 && ( fEBGTotal-fEBGTotalOld) > fEBGTotal*fBGMaxMove) )
-       {
-        if (fDebug>1) Info("FindJets","Starting BIG iteration ---> %i",fNumIter);
-
-         //Step 4. Find the value of the average background energy
-        FindBG();
-        fOutputObject.Reset(kResetJets); //Reset output object to store info for new iteration
-        fNumJets=0;
-
-        //Loop over the array of unit objects and flag those with energy below MinCellEt = 0
-         Int_t numbelow = 0;
-        for(Int_t j=0; j<fNumUnits; j++)
-          {
-            if( (fUnit[j].GetUnitEnergy()-fEBGAve) <= (fEtMin-0.13))
-               {       
-                  fUnit[j].SetUnitFlag(kBelowMinEt);
-                  numbelow++;
-               // if (fDebug>1) Info("FindJets","Below Min Et: %i",j);
-                }//end if
-          }//end for
-
-        //Do quick check if there are no jets upfront
-        if(fUnit[0].GetUnitFlag() == kBelowMinEt)
-          {
-            cout <<"There are no jets for this event!" <<endl;
-           break;
-          }//end if
-
-         //Step 5. Begin with the first jet candidate cell (JET SEED LOOP)
-         if (fDebug>5) Info("FindJets","Beginning JET SEED LOOP");
-        for(Int_t count=0; count<fNumUnits; count++)
-          {
-
-//CHECK CONDITION HERE _ NOT SURE IF SHOULD MAYBE BE: GetUnitEnergy()-fEBGAve >fESeed?????????????????????????????
-            if(fUnit[count].GetUnitEnergy()>=fESeed && fUnit[count].GetUnitFlag()==kOutJet)
-              {
-                fEnergy = fUnit[count].GetUnitEnergy() - fEBGAve;
-                fJetEta = fUnit[count].GetUnitEta();
-                fJetPhi = fUnit[count].GetUnitPhi();
-                Int_t seedID = fUnit[count].GetUnitID();
-                 if (fDebug>5) Info("FindJets","Inside first candidate jet seed loop for time : %i", count);
-                 if (fDebug>5) Info("FindJets","Found candidate energy %f ",fEnergy);
-                 if (fDebug>5) Info("FindJets","Found candidate eta %f ", fJetEta);
-                 if (fDebug>5) Info("FindJets","Found candidate phi %f ", fJetPhi);
-                if (fDebug>5) Info("FindJets","Found candidate ID %i", seedID);
-
-                fEtaInit = fJetEta;
-                fPhiInit = fJetPhi;
-                fEtaB = fJetEta;
-                fPhiB = fJetPhi;
-                fJetESum = 0.0;
-                fJetEtaSum = 0.0;
-                fJetPhiSum = 0.0;
-       
-         //Step 6. Find Jet Eta and Phi
-                //Loop over all units in the array to find the ones in the jet cone and determine contrib to Jet eta, phi
-                do
-                  {
-                    for(Int_t count1=0; count1<fNumUnits; count1++)               
-                      {
-                        if(fUnit[count1].GetUnitID() == seedID) continue;   //skip unit if the jetseed to avoid doublecounting
-                        if(fUnit[count1].GetUnitFlag() == kOutJet)
-                          {
-                            fDEta = fUnit[count1].GetUnitEta() - fJetEta;
-                            fDPhi = fUnit[count1].GetUnitPhi() - fJetPhi;
-                            fRad = TMath::Sqrt( (fDEta*fDEta) + (fDPhi*fDPhi) );
-                            if(fRad <= fConeRad)
-                              {
-                                FindJetEtaPhi(count1); 
-                              }//end if
-                          }//end if
-                      }//end for (Jet Eta, Phi LOOP)
-                            
-                     //Find the distance cone centre moved from previous cone centre
-                     if (fDebug>10) Info("FindJets","Checking if cone move small enough");
-                     fDistP = TMath::Sqrt( ((fJetEta-fEtaB)*(fJetEta-fEtaB)) + ((fJetPhi-fPhiB)*(fJetPhi-fPhiB)) );
-                     //     if(fDistP <= fMinMove) break;
-                            
-
-                     //Find the distance cone centre is from initiator cell
-                     if (fDebug>10) Info("FindJets","Checking if cone move too large");
-                     fDistI = TMath::Sqrt( ((fJetEtaSum/fJetESum)*(fJetEtaSum/fJetESum)) + ((fJetPhiSum/fJetESum)*
-                                                                                                   (fJetPhiSum/fJetESum)));
-
-                     if(fDistP>fMinMove && fDistI<fMaxMove)
-                       {
-                         fEtaB = fJetEta;
-                         fPhiB = fJetPhi;
-                       }//end if
-                
-                  }while(fDistP>fMinMove && fDistI<fMaxMove);
-                         
-                fJetEta = fEtaB;
-                fJetPhi = fPhiB;
-
-
-       //Step 7. Find the Jet Energy
-                 if (fDebug>1) Info("FindJets","Looking for Jet energy");
-                fJetESum = 0.0;
-                fJetEtaSum = 0.0;
-                fJetPhiSum = 0.0;
-                fNumInCone = 0;
-                FindJetEnergy();
-
-       //Step 8. Check if the jet is a valid jet
-                //Check if cluster energy is above Min allowed to be a jet
-//DID NOT DO THE COSH COMPARISON HERE -> NEED TO CHECK WHICH COMPARISON IS BEST!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-                 if (fDebug>5) Info("FindJets","Checking cluster is valid jet");
-                if(fJetESum < fJetEMin)
-                  {
-                    for(Int_t count2=0; count2<fNumUnits; count2++)
-                      {
-                        if(fUnit[count2].GetUnitFlag()==kInCurrentJet || fUnit[count2].GetUnitFlag()==kOutJet)
-                          fUnit[count2].SetUnitFlag(kOutJet);
-                      }//end for
-                   if (fDebug>10) Info("FindJets","NOT a valid jet cell");
-                 }else
-                   {
-                    for(Int_t count2=0; count2<fNumUnits; count2++)
-                      {
-                        if(fUnit[count2].GetUnitFlag()==kInCurrentJet)
-                          {
-                            //      cout<<"Setting unit #"<<count2 <<" to be officially in a jet!"<<endl;
-                           fUnit[count2].SetUnitFlag(kInJet);
-                          }
-                      }//end for                       
-
- //NEED TO CHECK FINAL WEIRD ITERATION OF ETA AND PHI CHANGES!!!!!!!!!
-                    //  fJetPhi += fJetPhiSum/fJetESum;        //CHECK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-                    //  fJetEta += fJetEtaSum/fJetESum;        //CHECK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-                    fNumJets++;              //Incrementing number of jets found
-                    StoreJetInfo();          //Storing jet info
-
-                }//end if (check cluster above Min Jet Energy)
-              }//end if (Jet Seed condition)
-          }//end (JET SEED LOOP)
-
-if (fDebug>5) Info("FindJets","End of BIG iteration number %i",fNumIter);
-// this->Dump();
-        fNumIter++;
-       }//end 10 iteration WHILE LOOP
- }
-
-
-
-
-
-
-
-
-
-
-
diff --git a/EMCAL/AliEMCALJetFinderAlgoUA1BG.h b/EMCAL/AliEMCALJetFinderAlgoUA1BG.h
deleted file mode 100644 (file)
index ddac1a8..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-
-#ifndef ALIEMCALJETFINDERALGOUA1BG_H
-#define ALIEMCALJETFINDERALGOUA1BG_H
-
-//THIS IS SARAH'S REVISED UA1 CODE WITH CHANGES FOR ETA/PHI ITERATION INCLUDED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-//INCLUDES BG SUBTRACTION UPFRONT!!!!!
-
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *  *  * See cxx source for full Copyright notice     */
-
-/* $Id$ */
-
-//*--Author: Sarah Blyth (LBL)
-//*--Based on UA1 jet algorithm from LUND JETSET called from EMC-erj
-
-
-#include "TTask.h"
-#include "AliEMCALJetFinderInput.h"
-#include "AliEMCALJetFinderOutput.h"
-#include "AliEMCALJetFinderAlgo.h"
-#include "AliEMCALJetFinderAlgoUA1Unit.h"
-#include "AliEMCALJet.h"
-#include "AliEMCALHadronCorrectionv1.h"
-
-
-class AliEMCALJetFinderAlgoUA1BG : public AliEMCALJetFinderAlgo
-{
-
-public:
-  AliEMCALJetFinderAlgoUA1BG();
-  ~AliEMCALJetFinderAlgoUA1BG();
-  void InitUnitArray();                      
-  void SetNumUnits(Int_t numUnits)           {fNumUnits = numUnits;}
-  Int_t GetNumUnits()                        {return fNumUnits;}
-  void SetJetESeed(Float_t eSeed)            {fESeed = eSeed;}
-  Float_t GetJetESeed()                      {return fESeed;}
-  void SetConeRad(Float_t coneRad)           {fConeRad = coneRad;}
-  Float_t GetConeRad()                       {return fConeRad;}
-  void SetJetEMin(Float_t jetEMin)           {fJetEMin = jetEMin;}
-  Float_t GetJetEMin()                       {return fJetEMin;}
-  void SetEtMin(Float_t etMin)               {fEtMin = etMin;}
-  Float_t GetEtMin()                         {return fEtMin;}
-  void SetMinMove(Float_t minMove)           {fMinMove = minMove;}
-  void SetMaxMove(Float_t maxMove)           {fMaxMove = maxMove;}
-  void SetBGMaxMove(Float_t bgMaxMove)       {fBGMaxMove = bgMaxMove;}
-  void SetPtCut(Float_t ptCut)               {fPtCut = ptCut;}
-  Float_t GetPtCut()                         {return fPtCut;}
-  void SetHadronCorrection(AliEMCALHadronCorrectionv1 *hadCorr) {fHadCorr = hadCorr;}
-  AliEMCALHadronCorrectionv1* GetHadronCorrection() {return fHadCorr;}
-  void SetJetFindingParameters(Int_t numUnits, Float_t eSeed, Float_t coneRad, Float_t jetEMin, Float_t etMin, 
-                               Float_t minMove, Float_t maxMove, Float_t bgMaxMove); 
-  void SetJetFindingParameters(Int_t numUnits, Float_t eSeed, Float_t coneRad, Float_t jetEMin, Float_t etMin);
-  void FillUnitArray(AliEMCALJetFinderAlgoUA1FillUnitFlagType_t flag);
-  void Sort(AliEMCALJetFinderAlgoUA1Unit* unit,Int_t integer);
-  void FindBG();
-  void FindJetEtaPhi(Int_t counter);
-  void FindJetEnergy();
-  void StoreJetInfo();
-  void FindJets();
-  void QS(AliEMCALJetFinderAlgoUA1Unit *unit, Int_t left, Int_t right);
-
-protected:
-  AliEMCALJetFinderAlgoUA1Unit   *fUnit; //Array of JetFinder Unit objects (treated as the cells)
-  AliEMCALHadronCorrectionv1 *fHadCorr; //Pointer to Hadron Correction Object
-  AliEMCALJet       fJet;              //Jet object
-  Int_t             fNumIter;          //Number of iterations for entire algorithm
-  Int_t             fNumUnits;         //Number of units in the unit object array (same as num towers in EMCAL)
-  Float_t           fESeed;            //Minimum energy a cell must have to be considered a jet seed
-  Float_t           fConeRad;          //Size of cone radius 
-  Float_t           fJetEMin;          //Minimum energy a cluster must have to be considered a jet
-  Float_t           fEtMin;            //Minimum cell Et cut
-  Float_t           fMinMove;          //Minimum move of jet centre from its previous position
-  Float_t           fMaxMove;          //Maximum move allowed of jet centre from its initiator cell position
-  Float_t           fBGMaxMove;        //Maximum allowed change in background energy between iterations 
-  Float_t           fPtCut;            //Pt cut for tracks to minimise background contribution
-
-  Float_t           fEBGTotal;         //Total background energy
-  Float_t           fEBGTotalOld;      //Old total background energy
-  Float_t           fEBGAve;           //Average background energy
-  Float_t           fEnergy;           //Energy 
-  Float_t           fJetEta;           //Jet eta value
-  Float_t           fJetPhi;           //Jet phi value
-  Float_t           fEtaInit;          //Jet initiate cell eta
-  Float_t           fPhiInit;          //Jet initiate cell phi
-  Float_t           fEtaB;             //Value of jet eta Before
-  Float_t           fPhiB;             //Value of jet phi Before
-  Float_t           fJetESum;          //Sum of weighted jet energy
-  Float_t           fJetEtaSum;        //Sum of weighted jet eta
-  Float_t           fJetPhiSum;        //Sum of weighted jet phi
-  Float_t           fDEta;             //Offset of unit from jet eta value
-  Float_t           fDPhi;             //Offset of unit from jet phi value
-  Float_t           fDistP;            //Distance of new jet axis position from Previous position
-  Float_t           fDistI;            //Distance of new jet axis position from Initiator cell position
-  Float_t           fTempE;            //Temp E for comparing with JetEMin
-  Float_t           fRad;              //Distance of cell from jet cone centre
-  Int_t             fNumInCone;        //Number of units in the jet cone
-  Int_t             fNumJets;          //Number of jets in an event
-  Bool_t            fArrayInitialised; //To check that array of units is initialised
-
-  ClassDef(AliEMCALJetFinderAlgoUA1BG,1)
-
-};
-#endif
-
index afe71ee9aeeb0b58b13ddf2f63feaaccd2d73ece..49642b73755b1385274fe6390ea2a6108940f1a7 100644 (file)
@@ -64,7 +64,7 @@ class AliEMCALJetMicroDst: public TNamed {
   // 13-apr-2003
   Double_t GetSumInCone(TVector3 &jet, Int_t nc, Float_t *et,Float_t *eta,Float_t *phi, Double_t cellEtCut, Double_t rJet) const ;
   Double_t GetEmcalEtInCone(TVector3 &jet, Double_t cellEtCut=0.0, Double_t rJet=0.5) ;
-  Double_t GetTpcPtInCone(TVector3 &jet, Double_t cellEtCut=0.0, Double_t rJet=0.5)  ;
+  Double_t GetTpcPtInCone(TVector3 &jet, Double_t cellEtCut=0.0, Double_t rJet=0.5) ;
   Double_t GetSum(Int_t n, Float_t *ar, Double_t cut=0.0) const ;
   Double_t GetSumEmcal(Double_t cut=0.0) {return GetSum(fncell, fetcell, cut);}
   Double_t GetSumTpc(Double_t cut=0.0) {return GetSum(fnchp, fppt, cut);}
@@ -138,7 +138,7 @@ class AliEMCALJetMicroDst: public TNamed {
   TH1F*  fhSumEtGrForJF;       //hist
 
 
-  ClassDef(AliEMCALJetMicroDst,2) // Micro Dst for jet analysis
+  ClassDef(AliEMCALJetMicroDst,3) // Micro Dst for jet analysis
 };
 
 #endif // AliEMCALJETMICRODST_H