]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - JETAN/AliUA1JetFinderV2.cxx
Infinite loop is fixed
[u/mrichter/AliRoot.git] / JETAN / AliUA1JetFinderV2.cxx
index 04decb9fc9be08976fabad8c3093269529386012..c401860be262c6a64fd308ba99f79c672e7bbbfd 100644 (file)
@@ -34,6 +34,9 @@
 #include "AliUA1JetFinderV2.h"
 #include "AliUA1JetHeaderV1.h"
 #include "AliJetUnitArray.h"
+#include "AliJetReaderHeader.h"
+#include "AliJetReader.h"
+#include "AliJetHeader.h"
 
 class TArrayF;
 class TFile;
@@ -114,7 +117,6 @@ void AliUA1JetFinderV2::FindJetsC()
     etbgTotal+= ptT[i];
   }
   
-  fJets->SetNinput(nIn);
   
   // calculate total energy and fluctuation in map
   Double_t meanpt   = hPtTotal->GetMean();
@@ -220,7 +222,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 +258,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 +509,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 +623,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 +659,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 +1681,6 @@ void AliUA1JetFinderV2::SubtractBackgRatio(const Int_t& nIn, const Int_t&nJ,Floa
 void AliUA1JetFinderV2::Reset()
 {
   fLego->Reset();
-  fJets->ClearJets();
   AliJetFinder::Reset();
 }