/*
$Log$
+Revision 1.37 2003/01/23 11:50:04 morsch
+- option for adding energy of all particles (ich == 2)
+- provisions for principle component analysis
+(M. Horner)
+
Revision 1.36 2003/01/15 19:05:44 morsch
Updated selection in ReadFromTracks()
#include "AliMagF.h"
#include "AliMagFCM.h"
#include "AliRun.h"
-
+#include "AliGenerator.h"
// Interface to FORTRAN
#include "Ecommon.h"
fInFile = 0;
fEvent = 0;
+ fRandomBg = 0;
+
SetParametersForBgSubtraction();
}
SetHadronCorrection();
SetIncludeK0andN();
+ fRandomBg = 0;
SetParametersForBgSubtraction();
}
//
// I/O
if (fOutFileName) fOutFile = new TFile(fOutFileName, "recreate");
+//
+//
}
void AliEMCALJetFinder::Find(Int_t ncell, Int_t ncell_tot, Float_t etc[30000],
Float_t e, eH;
for (Int_t i = 1; i <= fNbinEta; i++) {
for (Int_t j = 1; j <= fNbinPhi; j++) {
+
e = fLego->GetBinContent(i,j);
- if (e > 0.0) {
- Float_t eta = Xaxis->GetBinCenter(i);
- Float_t phi = Yaxis->GetBinCenter(j);
- fEtCell[fNcell] = e;
- fEtaCell[fNcell] = eta;
- fPhiCell[fNcell] = phi;
- fNcell++;
- fhCellEt->Fill(e);
- }
+ if (fRandomBg) {
+ if (gRandom->Rndm() < 0.5) {
+ Float_t ebg = 0.28 * TMath::Abs(gRandom->Gaus(0.,1.));
+ e += ebg;
+ }
+ }
+ if (e > 0.0) e -= fMinCellEt;
+ if (e < 0.0) e = 0.;
+ Float_t eta = Xaxis->GetBinCenter(i);
+ Float_t phi = Yaxis->GetBinCenter(j);
+ fEtCell[fNcell] = e;
+ fEtaCell[fNcell] = eta;
+ fPhiCell[fNcell] = phi;
+ fNcell++;
+ fhCellEt->Fill(e);
if(fhLegoEMCAL) {
eH = fhLegoEMCAL->GetBinContent(i,j);
if(eH > 0.0) fhCellEMCALEt->Fill(eH);
void AliEMCALJetFinder::FillFromTracks(Int_t flag, Int_t ich)
{
+// Which generator
+//
+ const char* name = gAlice->Generator()->GetName();
+ enum {kPythia, kHijing, kHijingPara};
+ Int_t genType = 0;
+
+ if (!strcmp(name, "Hijing")){
+ genType = kHijing;
+ } else if (!strcmp(name, "Pythia")) {
+ genType = kPythia;
+ } else if (!strcmp(name, "HIJINGpara") ||!strcmp(name, "HIGINGpara")) {
+ genType = kHijingPara;
+ }
+ if (fDebug>=2)
+ printf("Fill tracks generated by %s %d\n", name, genType);
+
+
//
// Fill Cells with track information
//
part, mpart, child1, MPart->GetLastDaughter(), MPart->GetStatusCode());
}
- if (fDebug >= 2) {
+ if (fDebug >= 2 && genType == kPythia) {
if (part == 6 || part == 7)
{
printf("\n Simulated Jet (pt, eta, phi): %d %f %f %f\n",
fPhiT[part] = phi;
fPdgT[part] = mpart;
-// if (part < 2) continue;
- if (MPart->GetStatusCode() != 1) continue;
+// final state particles only
+
+ if (genType == kPythia) {
+ if (MPart->GetStatusCode() != 1) continue;
+ } else if (genType == kHijing) {
+ if (child1 >= 0 && child1 < npart) continue;
+ }
+
TParticlePDG* pdgP = 0;
// charged or neutral