]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Obsolete code removed.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 8 Aug 2009 11:28:32 +0000 (11:28 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 8 Aug 2009 11:28:32 +0000 (11:28 +0000)
JETAN/AliCdfJetFinder.cxx
JETAN/AliFastJetFinder.cxx
JETAN/AliJetFinder.cxx
JETAN/AliJetFinder.h
JETAN/AliPxconeJetFinder.cxx
JETAN/AliSISConeJetFinder.cxx
JETAN/AliUA1JetFinderV1.cxx
JETAN/AliUA1JetFinderV2.cxx

index 9007581c59abdfe3c6ee1ce2c007ae2c90c4db0b..119a7a3e303f9ed6fe4ee8d9d3d453f3f0bbcce6 100644 (file)
@@ -46,7 +46,6 @@ Changelog
 
 #include "AliJetReader.h"
 #include "AliJetReaderHeader.h"
-#include "AliJet.h"
 #include "AliAODJet.h"
 #include "AliAODEvent.h"
 #include "AliJetFinder.h"
@@ -385,8 +384,6 @@ void AliCdfJetFinder::InitData()
 
   if ( fNPart == 0 ) { return ; } // if event empty then exit
 
-  fJets->SetNinput ( fNPart ) ; // number of input objects
-
   fVectParticle = new varContainer* [fNPart]; // container for Particles
 
   fPtArray  = new Double_t [fNPart] ; // momentum array
index 6145b7ae4646e99f475c0f9d0ee0b5a189342a93..ae5967dc970a020f227ef6093149b05a54c3edbf 100644 (file)
@@ -37,7 +37,6 @@
 #include "AliFastJetHeaderV1.h"
 #include "AliJetReaderHeader.h"
 #include "AliJetReader.h"
-#include "AliJet.h"
 #include "AliJetUnitArray.h"
 
 #include "fastjet/PseudoJet.hh"
@@ -100,7 +99,6 @@ void AliFastJetFinder::FindJets()
       if(lvArray == 0) { cout << "Could not get the momentum array" << endl; return; }
       Int_t nIn =  lvArray->GetEntries();
       if(nIn == 0) { if (debug) cout << "entries = 0 ; Event empty !!!" << endl ; return; }
-      fJets->SetNinput(nIn) ; // number of input objects
       Float_t px,py,pz,en;
       // load input vectors
       for(Int_t i = 0; i < nIn; i++){ // loop for all input particles
@@ -118,10 +116,8 @@ void AliFastJetFinder::FindJets()
   else {
     TClonesArray* fUnit = fReader->GetUnitArray();
     if(fUnit == 0) { cout << "Could not get the momentum array" << endl; return; }
-    Int_t         nCandidate = fReader->GetNumCandidate();
     Int_t         nIn = fUnit->GetEntries();
     if(nIn == 0) { if (debug) cout << "entries = 0 ; Event empty !!!" << endl ; return; }
-    fJets->SetNinput(nCandidate); // number of input objects // ME
     // Information extracted from fUnitArray
     // load input vectors and calculate total energy in array
     Float_t pt,eta,phi,theta,px,py,pz,en;
index bbdaa671b30cf78d319f4832bf692677058b347e..1f65dbd39e88a1a95e3fec27e55716aa080b3bfc 100644 (file)
 #include <TFile.h>
 
 #include "AliJetFinder.h"
-#include "AliJet.h"
 #include "AliAODJet.h"
-#include "AliJetControlPlots.h"
-#include "AliLeading.h"
 #include "AliAODEvent.h"
 #include "AliJetUnitArray.h"
 
@@ -40,26 +37,14 @@ class TClonesArray;
 ClassImp(AliJetFinder)
 
 AliJetFinder::AliJetFinder():
-    fTreeJ(0),
-    fPlotMode(kFALSE),
-    fJets(0),
-    fGenJets(0),
-    fLeading(0),
     fReader(0x0),
     fHeader(0x0),
     fAODjets(0x0),
-    fNAODjets(0),
-    fPlots(0x0),
-    fOut(0x0)
-    
+    fNAODjets(0)
 {
   //
   // Constructor
   //
-
-  fJets    = new AliJet();
-  fGenJets = new AliJet();
-  fLeading = new AliLeading();
   fAODjets = 0;
 }
 
@@ -69,57 +54,9 @@ AliJetFinder::~AliJetFinder()
   //
   // Destructor
   //
-
-  // Reset and delete jets
-  fJets->ClearJets();
-  delete fJets;
-  fGenJets->ClearJets();
-  delete fGenJets;
-  // close file
-  if (fOut) {
-    fOut->Close();
-    fOut->Delete();
-  }
-  delete fOut;
-  // reset and delete control plots
-  if (fPlots) delete fPlots;
-}
-
-////////////////////////////////////////////////////////////////////////
-void AliJetFinder::SetOutputFile(const char */*name*/)
-{
-  //  opens output file 
-  //  fOut = new TFile(name,"recreate");
-}
-
-////////////////////////////////////////////////////////////////////////
-void AliJetFinder::PrintJets()
-{
-  // Print jet information
-  cout << " Jets found with jet algorithm:" << endl;
-  fJets->PrintJets();
-  cout << " Jets found by pythia:" << endl;
-  fGenJets->PrintJets();
 }
 
-////////////////////////////////////////////////////////////////////////
-void AliJetFinder::SetPlotMode(Bool_t b)
-{
-  // Sets the plotting mode
-  fPlotMode=b;
-  if (b && !fPlots) fPlots = new AliJetControlPlots(); 
-}
 
-////////////////////////////////////////////////////////////////////////
-TTree* AliJetFinder::MakeTreeJ(char* name)
-{
-    // Create the tree for reconstructed jets
-    fTreeJ = new TTree(name, "AliJet");
-    fTreeJ->Branch("FoundJet",   &fJets,   1000);
-    fTreeJ->Branch("GenJet",     &fGenJets,1000);
-    fTreeJ->Branch("LeadingPart",&fLeading,1000);
-    return fTreeJ;
-}
 
 ////////////////////////////////////////////////////////////////////////
 void AliJetFinder::WriteRHeaderToFile()
@@ -129,65 +66,6 @@ void AliJetFinder::WriteRHeaderToFile()
     rh->Write();
 }
 
-////////////////////////////////////////////////////////////////////////
-void AliJetFinder::Run()
-{
-  // Do some initialization
-  Init();
-  // connect files
-  fReader->OpenInputFiles();
-
-  // write headers
-  WriteHeaders();
-  // loop over events
-  Int_t nFirst, nLast, option, debug, arrayInitialised; 
-  nFirst = fReader->GetReaderHeader()->GetFirstEvent();
-  nLast  = fReader->GetReaderHeader()->GetLastEvent();
-
-  option = fReader->GetReaderHeader()->GetDetector();
-  debug  = fReader->GetReaderHeader()->GetDebug();
-  arrayInitialised = fReader->GetArrayInitialised();
-
-  // loop over events
-  for (Int_t i=nFirst;i<nLast;i++) {
-      fReader->FillMomentumArray();
-      fLeading->FindLeading(fReader);
-      fReader->GetGenJets(fGenJets);
-
-      if (option == 0) { // TPC with fMomentumArray
-         if(debug > 1) 
-             printf("In FindJetsC() routine: find jets with fMomentumArray !!!\n");
-         FindJetsC();
-      } else {
-       if(debug > 1) printf("In FindJets() routine: find jets with fUnitArray !!!\n");
-       FindJets();
-      }
-      if (fOut) {
-         fOut->cd();
-      }
-      
-      if (fPlots) fPlots->FillHistos(fJets);
-      fLeading->Reset();
-      fGenJets->ClearJets();
-      Reset();
-  } 
-
-  // write out
-  if (fPlots) {
-      fPlots->Normalize();
-      fPlots->PlotHistos();
-  }
-  if (fOut) {
-      fOut->cd();
-      fPlots->Write();
-      fOut->Close();
-  }
-}
-
-
-//
-// The following methods have been added to allow for event steering from the outside
-//
 
 ////////////////////////////////////////////////////////////////////////
 void AliJetFinder::ConnectTree(TTree* tree, TObject* data)
@@ -216,16 +94,8 @@ Bool_t AliJetFinder::ProcessEvent()
 
   Bool_t ok = fReader->FillMomentumArray();
   if (!ok) return kFALSE;
-  
-  // Leading particles
-  fLeading->FindLeading(fReader);
   // Jets
   FindJets(); // V1
-  //  FindJetsC(); // V2
-  
-  if (fPlots) fPlots->FillHistos(fJets);
-  fLeading->Reset();
-  fGenJets->ClearJets();
   Reset();  
   return kTRUE;
 }
@@ -244,13 +114,10 @@ Bool_t AliJetFinder::ProcessEvent2()
 
   // Delete reference pointer  
   if (!ok) {delete ref; return kFALSE;}
-  
-  // Leading particles
-  fLeading->FindLeading(fReader);
   // Jets
   FindJets();
   
-  Int_t         nEntRef    = ref->GetEntries();
+  Int_t nEntRef = ref->GetEntries();
 
   for(Int_t i=0; i<nEntRef; i++)
     { 
@@ -275,40 +142,18 @@ Bool_t AliJetFinder::ProcessEvent2()
   ref->Delete();
   delete ref;
 
-  if (fPlots) fPlots->FillHistos(fJets);
-  fLeading->Reset();
-  fGenJets->ClearJets();
   Reset();
 
   return kTRUE;
 }
 
-////////////////////////////////////////////////////////////////////////
-void AliJetFinder::FinishRun()
-{
-    // Finish a run
-    if (fPlots) {
-       fPlots->Normalize();
-       fPlots->PlotHistos();
-    }
-    
-    if (fOut) {
-        fOut->cd();
-        if (fPlots) {
-            fPlots->Write();
-        }
-        fOut->Close();
-    }
-}
 
-////////////////////////////////////////////////////////////////////////
 void AliJetFinder::AddJet(AliAODJet p)
 {
 // Add new jet to the list
   new ((*fAODjets)[fNAODjets++]) AliAODJet(p);
 }
 
-////////////////////////////////////////////////////////////////////////
 void AliJetFinder::ConnectAOD(AliAODEvent* aod)
 {
 // Connect to the AOD
index 3d6a100be0dc8b527b3d09e8132d419d024ba7db..e4bf3f240e2bc9f195126f20c49a58c10c6e868c 100755 (executable)
 #include "AliAODJet.h"
 #include "AliJetReader.h"
 #include "AliJetHeader.h"
-#include "AliJet.h"
 #include "AliJetReaderHeader.h"
 
-class TFile;
 class TChain;
-//class AliJet;
-//class AliJetHeader;
-class AliJetControlPlots;
-class AliLeading;
 class AliAODJet;
 class AliAODEvent;
 
@@ -37,21 +31,14 @@ class AliJetFinder : public TObject
   AliJetFinder();
   virtual ~AliJetFinder();
 
-  // getters
+  // Getters
   virtual AliJetReader *GetReader() {return fReader;}
   virtual AliJetHeader *GetHeader() {return fHeader;}
-  virtual AliJet       *GetJets() {return fJets;}
-  virtual Bool_t        GetPlotMode() const {return fPlotMode;}
-  virtual TFile        *GetOutputFile() {return fOut;}
-  // setters
-  virtual void          SetPlotMode(Bool_t b);
-  virtual void          SetOutputFile(const char *name="jets.root");
+  // Setters
   virtual void          SetJetReader(AliJetReader* r) {fReader=r;}
   virtual void          SetJetHeader(AliJetHeader* h) {fHeader=h;}
-  // others
+  // Others
   virtual void          AddJet(AliAODJet jet);
-  virtual void          PrintJets();
-  virtual void          Run();
   virtual void          WriteRHeaderToFile();  
   // the following have to be implemented for each specific finder
   virtual void          Init() {}
@@ -63,30 +50,18 @@ class AliJetFinder : public TObject
   // some methods to allow steering from the outside
   virtual Bool_t        ProcessEvent();
   virtual Bool_t        ProcessEvent2();
-  virtual void          FinishRun();
   virtual void          ConnectTree(TTree* tree, TObject* data);
   virtual void          ConnectAOD(AliAODEvent* aod);
   virtual void          ConnectAODNonStd(AliAODEvent* aod,const char* bname);
-  virtual TTree         *MakeTreeJ(char* name);
   virtual void          WriteHeaders();
-  virtual void          WriteJetsToFile() const {;}
-  virtual void          TestJet() {;}
 
  protected:
   AliJetFinder(const AliJetFinder& rJetFinder);
   AliJetFinder& operator = (const AliJetFinder& rhsf);
-  TTree* fTreeJ;                 //! pointer to jet tree
-  Bool_t fPlotMode;              //! do you want control plots?
-  AliJet* fJets;                 //! pointer to jet class
-  AliJet* fGenJets;              //! pointer to generated jets
-  AliLeading*   fLeading;        //! pointer to leading particle data 
   AliJetReader* fReader;         //  pointer to reader
   AliJetHeader* fHeader;         //  pointer to header
   TClonesArray* fAODjets;        //! reconstructed jets
   Int_t         fNAODjets;       //! number of reconstructed jets
-  AliJetControlPlots* fPlots;    //! pointer to control plots
-  TFile* fOut;                   //! output file
-
   ClassDef(AliJetFinder,2)
 };
 
index d7baf8070b2be127d1c68104fe1e4979f738d0da..8dd8912552fff4a729d0e22cedbc0f5d8b8b0405 100755 (executable)
@@ -27,7 +27,6 @@
 #include "AliPxconeJetFinder.h"
 #include "AliPxconeJetHeader.h"
 #include "AliJetReader.h"
-#include "AliJet.h"
 
 ClassImp(AliPxconeJetFinder)
 
index 591a449c339109a286d3ff09fa6406651efbe384..16cdb8d532538edb62eaa9275994f33da8247454 100644 (file)
@@ -35,7 +35,6 @@
 #include <TClonesArray.h>
 
 #include "AliHeader.h"
-#include "AliJet.h"
 #include "AliJetKineReader.h"
 #include "AliJetReader.h"
 #include "AliJetReaderHeader.h"
@@ -132,7 +131,6 @@ void AliSISConeJetFinder::FindJets()
            return;
          }
        
-       fJets->SetNinput(nIn) ; // fJets = AliJet number of input objects
        Float_t px,py,pz,en;
        
        // Load input vectors
@@ -153,11 +151,9 @@ void AliSISConeJetFinder::FindJets()
     else {
       TClonesArray* fUnit = fReader->GetUnitArray();
       if(fUnit == 0) { cout << "Could not get the momentum array" << endl; return; }
-      Int_t         nCandidate = fReader->GetNumCandidate();
       Int_t         nIn = fUnit->GetEntries();
       if(nIn == 0) { if (debug) cout << "entries = 0 ; Event empty !!!" << endl ; return; }
-      fJets->SetNinput(nCandidate); // number of input objects // ME
-      // Information extracted from fUnitArray
+        // Information extracted from fUnitArray
       // load input vectors and calculate total energy in array
       Float_t pt,eta,phi,theta,px,py,pz,en;
       Int_t ipart = 0;
index d654a2f1a66d38c8016459584e369e02ab63b355..48efa0851f83bd14e5564d47aa3920aa33b5c12c 100644 (file)
@@ -33,7 +33,6 @@
 #include "AliUA1JetHeaderV1.h"
 #include "AliJetReaderHeader.h"
 #include "AliJetReader.h"
-#include "AliJet.h"
 #include "AliAODJet.h"
 #include "AliLog.h"
 
@@ -104,8 +103,6 @@ void AliUA1JetFinderV1::FindJets()
     etbgTotal+= ptT[i];
   }
 
-  fJets->SetNinput(nIn);
-
   // calculate total energy and fluctuation in map
   Double_t meanpt = hPtTotal->GetMean();
   Double_t ptRMS  = hPtTotal->GetRMS();
@@ -197,7 +194,7 @@ void AliUA1JetFinderV1::FindJets()
       py = etJet[kj] * TMath::Sin(phiJet[kj]);
       pz = etJet[kj] / TMath::Tan(2.0 * TMath::ATan(TMath::Exp(-etaJet[kj])));
       en = TMath::Sqrt(px * px + py * py + pz * pz);
-      fJets->AddJet(px, py, pz, en);
+      
       AliAODJet jet(px, py, pz, en);
 
       if (fromAod){
@@ -236,15 +233,6 @@ void AliUA1JetFinderV1::FindJets()
        }
        if(bflag == 0) injet[bj] = -1; // set as background particle
    }
-  fJets->SetNCells(ncells);
-  fJets->SetPtFromSignal(percentage);
-  fJets->SetMultiplicities(mult);
-  fJets->SetInJet(injet);
-  fJets->SetEtaIn(etaT);
-  fJets->SetPhiIn(phiT);
-  fJets->SetPtIn(ptT);
-  fJets->SetEtAvg(etbgTotal/(4*(header->GetLegoEtaMax())*TMath::Pi()));
-
 
   //delete
   delete [] ptT;
@@ -844,7 +832,6 @@ void AliUA1JetFinderV1::SubtractBackgRatio(const Int_t& nIn, const Int_t&nJ, Flo
 void AliUA1JetFinderV1::Reset()
 {
   fLego->Reset();
-  fJets->ClearJets();
   AliJetFinder::Reset();
 }
 
index 04decb9fc9be08976fabad8c3093269529386012..69ba62687b5850c1e88665748d0b1168b3724005 100644 (file)
@@ -114,7 +114,6 @@ void AliUA1JetFinderV2::FindJetsC()
     etbgTotal+= ptT[i];
   }
   
-  fJets->SetNinput(nIn);
   
   // calculate total energy and fluctuation in map
   Double_t meanpt   = hPtTotal->GetMean();
@@ -220,7 +219,6 @@ void AliUA1JetFinderV2::FindJetsC()
       py = etJetOk[kj] * TMath::Sin(phiJetOk[kj]);
       pz = etJetOk[kj] / TMath::Tan(2.0 * TMath::ATan(TMath::Exp(-etaJetOk[kj])));
       en = TMath::Sqrt(px * px + py * py + pz * pz);
-      fJets->AddJet(px, py, pz, en);
       
       AliAODJet jet(px, py, pz, en);
       jet.Print("");
@@ -257,14 +255,6 @@ void AliUA1JetFinderV2::FindJetsC()
       if(bflag == 0) injet[bj] = -1; // set as background particle
     }
 
-  fJets->SetNCells(ncells);
-  fJets->SetPtFromSignal(percentage);
-  fJets->SetMultiplicities(mult);
-  fJets->SetInJet(injet);
-  fJets->SetEtaIn(etaT);
-  fJets->SetPhiIn(phiT);
-  fJets->SetPtIn(ptT);
-  fJets->SetEtAvg(etbgTotal/(4*(header->GetLegoEtaMax())*TMath::Pi()));
  
   //delete
   delete[] ptT;
@@ -516,7 +506,6 @@ void AliUA1JetFinderV2::FindJets()
       }
     } // end loop on nCandidate
 
-  fJets->SetNinput(nCandidate);
 
   // calculate total energy and fluctuation in map
   Double_t meanpt = hPtTotal->GetMean();
@@ -631,7 +620,7 @@ void AliUA1JetFinderV2::FindJets()
       py = etJetOk[kj] * TMath::Sin(phiJetOk[kj]);
       pz = etJetOk[kj] / TMath::Tan(2.0 * TMath::ATan(TMath::Exp(-etaJetOk[kj])));
       en = TMath::Sqrt(px * px + py * py + pz * pz);
-      fJets->AddJet(px, py, pz, en);
+
       AliAODJet jet(px, py, pz, en);
       jet.Print("");
       
@@ -667,16 +656,6 @@ void AliUA1JetFinderV2::FindJets()
     if(bflag == 0) injet[bj] = -1; // set as background particle
   }
 
-  fJets->SetNCells(ncells);
-  fJets->SetPtFromSignal(percentage);
-  fJets->SetMultiplicities(mult);
-  fJets->SetInJet(injet);
-  fJets->SetEtaIn(etaT);
-  fJets->SetPhiIn(phiT);
-  fJets->SetPtIn(ptT);
-  fJets->SetTrackReferences(trackRef);
-  fJets->SetDetectorFlagIn(detT);
-  fJets->SetEtAvg(etbgTotal/(2*(header->GetLegoEtaMax())*(header->GetLegoPhiMax()-header->GetLegoPhiMin())));
 
   //delete
   delete ptT;
@@ -1699,7 +1678,6 @@ void AliUA1JetFinderV2::SubtractBackgRatio(const Int_t& nIn, const Int_t&nJ,Floa
 void AliUA1JetFinderV2::Reset()
 {
   fLego->Reset();
-  fJets->ClearJets();
   AliJetFinder::Reset();
 }