* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
-
-
+
//---------------------------------------------------------------------
// Jet finder base class
// manages the search for jets
#include "AliLeading.h"
#include "AliHeader.h"
-
ClassImp(AliJetFinder)
-////////////////////////////////////////////////////////////////////////
-AliJetFinder::AliJetFinder()
+AliJetFinder::AliJetFinder():
+ fPlotMode(kFALSE),
+ fJets(0),
+ fGenJets(0),
+ fLeading(0),
+ fReader(0x0),
+ fPlots(0x0),
+ fOut(0x0)
+
{
- //
// Constructor
- //
- fOut = 0x0;
+ //fOut = 0x0;
fJets = new AliJet();
fGenJets = new AliJet();
fLeading = new AliLeading();
- fReader = 0x0;
- fPlots = 0x0;
- SetPlotMode(kFALSE);
+ //fReader = 0x0;
+ //fPlots = 0x0;
+ //SetPlotMode(kFALSE);
}
-
////////////////////////////////////////////////////////////////////////
AliJetFinder::~AliJetFinder()
{
- //
// destructor
- //
-
// here reset and delete jets
fJets->ClearJets();
delete fJets;
delete fOut;
// reset and delete control plots
if (fPlots) delete fPlots;
- // delete fLeading;
}
-
////////////////////////////////////////////////////////////////////////
void AliJetFinder::SetOutputFile(const char *name)
fOut = new TFile(name,"recreate");
}
-
////////////////////////////////////////////////////////////////////////
void AliJetFinder::PrintJets()
{
-//
-// Print jet information
+ // 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
+ // Sets the plotting mode
fPlotMode=b;
if (b && !fPlots) fPlots = new AliJetControlPlots();
}
void AliJetFinder::WriteJetsToFile(Int_t i)
{
-// Writes the jets to file
+ // Writes the jets to file
fOut->cd();
char hname[30];
sprintf(hname,"TreeJ%d",i);
rh->Write();
}
-
////////////////////////////////////////////////////////////////////////
void AliJetFinder::GetGenJets()
{
-// Get the generated jet information from mc header
+ // Get the generated jet information from mc header
AliHeader* alih = fReader->GetAliHeader();
if (alih == 0) return;
AliGenEventHeader * genh = alih->GenEventHeader();
WriteRHeaderToFile();
WriteJHeaderToFile();
}
-
// loop over events
Int_t nFirst,nLast;
nFirst = fReader->GetReaderHeader()->GetFirstEvent();
GetGenJets();
FindJets();
if (fOut) WriteJetsToFile(i);
- if (fPlots) fPlots->FillHistos(fJets,fReader);
+ if (fPlots) fPlots->FillHistos(fJets);
fLeading->Reset();
fGenJets->ClearJets();
Reset();
fOut->Close();
}
}
-