1 /**************************************************************************
2 * Copyright(c) 1998-2002, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
19 //*-- Authors: Aleksei Pavlinov (WSU)
27 #include <TParticle.h>
32 #include "AliEMCALJetFinder.h"
33 #include "AliEMCALJetMicroDst.h"
34 #include "AliGenEventHeader.h"
35 #include "AliGenHijingEventHeader.h"
36 #include "AliHeader.h"
40 ClassImp(AliEMCALJetMicroDst)
42 TString gAliNameTree("jetMDST"); // 7-feb-2002
44 //TH1F* fhPtPart, *fhNJet, *fhPtJet;
45 //TH2F* fhEtaPhiPart, *fhEtaPhiJet;
46 //TH1F* fhNcell, *fhCellId, *fhCellEt, *fhSumEt;
47 //TH1F* fhNgrid, *fhGridId, *fhGridEt, *fhSumEtGrForJF;
49 extern "C" void sgpdge_(Int_t &i, Int_t &pdggea);
51 AliEMCALJetMicroDst::AliEMCALJetMicroDst(const char *name, const char *tit) : TNamed(name,tit)
58 // Don't add histos to the current directory
59 // TH1::AddDirectory(0);
61 fhPtPart = new TH1F("fhPtPart","P_{T} for partons", 300, 0., 300.);
62 // 16-jan-2002 - new limit fo phi
63 fhEtaPhiPart = new TH2F("fhEtaPhiPart","#eta #phi distr.for partons after HSc",
64 28, -0.7, 0.7, 21, 0.0, (2.0/3.0)*TMath::Pi());
66 fhNJet = new TH1F("fhNJet","number of jets", 11, -0.5, 10.5);
67 fhPtJet = new TH1F("fhPtJet","P_{T} for jets", 500, 0., 500.);
68 fhEtaPhiJet = new TH2F("fhEtaPhiJet","#eta #phi distr.for jets (W)",
69 28, -0.7, 0.7, 21, 0.0, (2.0/3.0)*TMath::Pi());
71 fhNcell = new TH1F("fhNcell","#cell with de>0.0 for EMCAL", 1400, 0.0, 14000.);
72 fhCellId = new TH1F("fhCellId","cell ID with de>0.0 for EMCAL", 1400, 0.0, 14000.);
73 fhCellEt = new TH1F("fhCellEt","cell Et for EMCAL", 1000, 0.0, 10.);
74 fhSumEt = new TH1F("fhSumEt","sum Et for EMCAL", 1000, 0.0, 1000.);
76 fhNgrid = new TH1F("fhNgrid","#cell with de>0.0 in EMCAL grid for JF", 1400, 0.0, 14000.);
77 fhGridId = new TH1F("fhGridId","cell ID with de>0.0 in EMCAL grid for JF", 1400, 0.0, 14000.);
78 fhGridEt = new TH1F("fhGridEt","cell Et in EMCAL grid for JF", 1000, 0.0, 10.);
79 fhSumEtGrForJF = new TH1F("fhSumEtGrForJF","sum Et in EMCAL grid for JF", 1000, 0.0, 1000.);
81 fListHist = MoveHistsToList("Hist For AliEMCALJetMicroDst", kFALSE);
84 AliEMCALJetMicroDst::~AliEMCALJetMicroDst()
87 if(fFile) fFile->Close();
90 Bool_t AliEMCALJetMicroDst::Create(TFile *file)
92 // Creates the DST file
94 Error("Create", "define TFile for output\n");
98 fFileName = fFile->GetName();
100 fTree = new TTree(gAliNameTree.Data(),"Temporary micro DST for jets analysis");
101 // for jet calibration - 4-mar-2003
102 fTree->Branch("fdecone", &fdecone, "fdecone/F");
103 fTree->Branch("fptcone", &fptcone, "fptcone/F");
105 fTree->Branch("fnpart", &fnpart, "fnpart/I");
106 fTree->Branch("fxpt", fxpt, "fxpt[fnpart]/F");
107 fTree->Branch("fxeta", fxeta, "fxeta[fnpart]/F");
108 fTree->Branch("fxphi", fxphi, "fxphi[fnpart]/F");
110 fTree->Branch("fnjet", &fnjet, "fnjet/I");
111 fTree->Branch("fjet", fjet, "fjet[fnjet]/F");
112 fTree->Branch("fjetaw", fjetaw, "fjetaw[fnjet]/F");
113 fTree->Branch("fjphiw", fjphiw, "fjphiw[fnjet]/F");
114 fTree->Branch("fjetal", fjetal, "fjetal[fnjet]/F");
115 fTree->Branch("fjphil", fjphil, "fjphil[fnjet]/F");
117 // Et in EMCAL itself
118 fTree->Branch("fncell", &fncell, "fncell/I");
119 fTree->Branch("fidcell", fidcell, "fidcell[fncell]/I");
120 fTree->Branch("fetcell", fetcell, "fetcell[fncell]/F");
122 // Et in EMCAL grid for JF
123 fTree->Branch("fngrid", &fngrid, "fngrid/I");
124 fTree->Branch("fidgrid", fidgrid, "fidgrid[fngrid]/I");
125 fTree->Branch("fetgrid", fetgrid, "fetgrid[fngrid]/F");
127 // charge particle which hit to EMCAL
128 fTree->Branch("fnchp", &fnchp, "fnchp/I");
129 fTree->Branch("fpid", fpid, "fpid[fnchp]/I");
130 fTree->Branch("fppt", fppt, "fppt[fnchp]/F");
131 fTree->Branch("fpeta", fpeta, "fpeta[fnchp]/F");
132 fTree->Branch("fpphi", fpphi, "fpphi[fnchp]/F");
137 Bool_t AliEMCALJetMicroDst::Create(const char *fname)
140 TFile *file = new TFile(fname, "RECREATE");
142 // fNameFile = fname;
144 } else return kFALSE;
147 Bool_t AliEMCALJetMicroDst::Open(const char *fname)
150 if(fFile && fFile->IsOpen()) fFile->Close();
151 if(strlen(fname)) fName = fname;
152 TFile *file = new TFile(fName.Data(), "READ");
154 Bool_t ini = Initialize(file);
155 Info("Open", "open file %s : initialize TTree %i",fName.Data(), Int_t(ini));
158 Error("Open", "can not open file %s",fName.Data());
163 const Char_t* AliEMCALJetMicroDst::DefineName(Int_t mode)
166 static TString dir, name;
167 // dir = "jetDST/"; // 24-jan-2003
168 dir = "/auto/alice/pavlinov/jet/microDST/"; // 24-jan-2003
170 case 1: // for characteristic of BG
171 name = dir + "mDst1_1.root"; // Bg 2000 - first version
174 case 2: // for characteristic of BG
175 name = dir + "mDst2_1.root"; // Bg 4000 - first version
178 case 3: // for characteristic of BG
179 name = dir + "mDst3_1.root"; // Bg 8000 - first version
182 case 4: // Central Hijing - 18-mar-2003
183 name = dir + "march/";
184 name += "jF_R0.50MinCell1.0PtCut0.0EtSeed4.0MinEt40.0BGSubtr0SF11.6Smear0Eff0HijingCentral.root";
185 SetTitle("HijingCentral");
187 case 5: // Para Hijing (Dn/Dy=8000) - 21-mar-2003
188 name = dir + "march/";
189 name += "jF_R0.50MinCell1.0PtCut0.0EtSeed4.0MinEt40.0BGSubtr0SF11.6Smear0Eff0ParaHijing8000.root";
190 SetTitle("HIJINGparaDnDy8000");
192 case 6: // Para Hijing (Dn/Dy=4000) - 21-mar-2003
193 name = dir + "march/";
194 name += "jF_R0.50MinCell1.0PtCut0.0EtSeed4.0MinEt40.0BGSubtr0SF11.6Smear0Eff0ParaHijing4000.root";
195 SetTitle("HIJINGparaDnDy4000");
197 case 7: // Para Hijing (Dn/Dy=2000) - 21-mar-2003
198 name = dir + "march/";
199 name += "jF_R0.50MinCell1.0PtCut0.0EtSeed4.0MinEt40.0BGSubtr0SF11.6Smear0Eff0ParaHijing2000.root";
200 SetTitle("HIJINGparaDnDy2000");
202 case 11: // pure PYTHIA with default value of parameters
203 name = dir + "jF_R0.50MinCell0.0PtCut0.0EtSeed8.0MinEt40.0BGSubtr0SF11.6.root";
205 case 12: // 0 + background
206 name = dir + "jF_R0.50MinCell0.0PtCut0.0EtSeed8.0MinEt40.0BGSubtr0SF11.6kBackground2000.root";
210 name = dir + "march/";
211 name += "Pythia100_1.root";
212 SetTitle("Pythia100_1");
214 case 102: // 2-apr-2003
215 name = dir + "march/";
216 name += "Pythia50_1.root";
217 SetTitle("Pythia50_1");
218 // name = "microDst3th.root"; // 101 + (smearing and eff) - 14-mar-2003
220 case 103:// 4-apr-2003
221 name = dir + "march/";
222 name += "Pythia200_1.root";
223 SetTitle("Pythia200_1");
224 // name = "microDst4th.root"; // 102 + MinCell= 1.0
227 Fatal("DefineName", "NO D E F A U L T : mode %i\n", mode);
229 Info("DefineName", "mode %5i file : %s : Title %s\n", mode, name.Data(), GetTitle());
233 Bool_t AliEMCALJetMicroDst::Initialize(TFile *file)
236 if(file) fFile = file;
238 fTree = (TTree*)fFile->Get(gAliNameTree.Data());
239 if(!fTree) return kFALSE;
240 // for jet calibration - 4-mar-2003
241 fTree->SetBranchAddress("fdecone",&fdecone);
242 fTree->SetBranchAddress("fptcone",&fptcone);
244 fTree->SetBranchAddress("fnpart",&fnpart);
245 fTree->SetBranchAddress("fxpt", fxpt);
246 fTree->SetBranchAddress("fxeta", fxeta);
247 fTree->SetBranchAddress("fxphi", fxphi);
249 fTree->SetBranchAddress("fnjet", &fnjet);
250 fTree->SetBranchAddress("fjet", fjet);
251 fTree->SetBranchAddress("fjetaw", fjetaw);
252 fTree->SetBranchAddress("fjphiw", fjphiw);
253 fTree->SetBranchAddress("fjetal", fjetal);
254 fTree->SetBranchAddress("fjphil", fjphil);
256 fTree->SetBranchAddress("fncell", &fncell);
257 fTree->SetBranchAddress("fidcell", fidcell);
258 fTree->SetBranchAddress("fetcell", fetcell);
259 // eT in EMCAL grid for JF
260 fTree->SetBranchAddress("fngrid", &fngrid);
261 fTree->SetBranchAddress("fidgrid", fidgrid);
262 fTree->SetBranchAddress("fetgrid", fetgrid);
264 fTree->SetBranchAddress("fnchp", &fnchp);
265 fTree->SetBranchAddress("fpid", fpid);
266 fTree->SetBranchAddress("fppt", fppt);
267 fTree->SetBranchAddress("fpeta", fpeta);
268 fTree->SetBranchAddress("fpphi", fpphi);
273 void AliEMCALJetMicroDst::Print(Option_t* option) const
279 if(fTree) fTree->Print();
280 else Info("Print", "TRee is zero\n");
282 Info("Print", "File with TRee is closed \n Name of file %s(from fFileName", fFileName.Data());
285 Info("Print", "******* Current(last) event *****");
286 printf("#partons %2i \n", fnpart);
287 for(Int_t i=0; i<fnpart; i++){
288 printf(" %1i Pt %7.1f eta %7.4f phi %7.4f \n",
289 i, fxpt[i],fxeta[i],fxphi[i]);
291 printf("#jets %2i \n", fnjet);
292 for(Int_t i=0; i<fnjet; i++){
293 printf(" %1i Et %7.1f etaw %7.4f phiw %7.4f \n",
294 i,fjet[i],fjetaw[i],fjphiw[i]);
296 printf(" Title %s \n", GetTitle());
299 void AliEMCALJetMicroDst::Fill(AliRun *run, AliEMCALJetFinder* jetFinder, Int_t modeFilling)
301 // modeFilling >=1 - fill info for EMCAL grid
302 if(!run) run = gAlice;
303 AliGenEventHeader* evHeader = run->GetHeader()->GenEventHeader();
304 TString tmp(evHeader->ClassName());
305 if(tmp.Contains("Hijing")) {
306 AliGenHijingEventHeader *hijEvHeader = (AliGenHijingEventHeader*)evHeader;
307 FillPartons(hijEvHeader);
308 } else if(tmp.Contains("Pythia")) {
311 Error("Fill", "Wrong type of generator -> %s \n Info about partons will be absent",tmp.Data());
316 if(modeFilling >= 1) {
317 FillEtForEMCAL(jetFinder);
318 FillEtForGrid(jetFinder);
319 FillChargeParticles(jetFinder);
321 fncell = 0; // 27-jan-2003
322 fngrid = 0; // 27-jan-2003
324 // negative - no signal
329 FillJetsControl(); //24-jan-2003
334 void AliEMCALJetMicroDst::FillPartons(AliGenHijingEventHeader *header)
336 //Make partons arrays
337 TLorentzVector parton[4];
338 header->GetJets(parton[0], parton[1], parton[2], parton[3]);
341 for(Int_t i=0; i<4; i++){
342 fxpt[i] = parton[i].Pt();
343 fxeta[i] = parton[i].Eta();
344 fxphi[i] = parton[i].Phi();
348 void AliEMCALJetMicroDst::FillPartons()
350 // for case of Pythia -> get info from full event record
355 for(Int_t i=6; i<8; i++){
356 mPart = gAlice->GetMCApp()->Particle(i);
358 fxpt[ind] = mPart->Pt();
359 fxeta[ind] = mPart->Eta();
360 fxphi[ind] = mPart->Phi();
364 void AliEMCALJetMicroDst::FillJets(AliEMCALJetFinder* jetFinder)
368 if(fDebug>1) Info("FillJets", "Debug");
370 if(fDebug>1) Info("FillJets", "jetFinder is zero");
373 fnjet = jetFinder->Njets();
375 if(fDebug>1) Warning("FillJets", "wrong value of jetFinder->Njets() %i ", fnjet);
378 // fhNJet->Fill(njet);
379 if(fDebug>1) Info("FillJets", "njet %i", fnjet);
381 for(Int_t i=0; i<fnjet; i++){
382 fjet[i] = jetFinder->JetEnergy(i);
383 fjetaw[i] = jetFinder->JetEtaW(i);
384 fjphiw[i] = jetFinder->JetPhiW(i);
385 fjetal[i] = jetFinder->JetEtaL(i);
386 fjphil[i] = jetFinder->JetPhiL(i);
391 void AliEMCALJetMicroDst::FillEtForEMCAL(AliEMCALJetFinder* jetFinder)
395 TH2F *hid = jetFinder->GetLegoEMCAL();
399 Int_t neta = hid->GetNbinsX(), nphi = hid->GetNbinsY();
400 for(Int_t ieta=1; ieta<=neta; ieta++) {
401 for(Int_t iphi=1; iphi<=nphi; iphi++) {
402 de = hid->GetBinContent(ieta,iphi);
404 fetcell[fncell] = Float_t(de);
405 fidcell[fncell] = nphi*(ieta-1) + iphi;
407 if(fncell >= 13824) break;
408 // Info("FillEtForEMCAL", " ncell %i6 id %i6 de %f \n", ncell, idcell[ncell], etcell[ncell]);
413 // jet energy calculate around LP direction !!! - 10-mar-2003
414 fdecone = jetFinder->EMCALConeEnergy(fjetal[0],fjphil[0]);
415 fptcone = jetFinder->TrackConeEnergy(fjetal[0],fjphil[0]); // get from lego plot fo ch.part
416 Info("FillEtForEMCAL", " njet %i Emcal in cone %f pt ch.part in cone %f\n", fnjet, fdecone, fptcone);
417 Info("FillEtForEMCAL", " jet - decone - ptcone : %9.2f\n", fjet[0]-fdecone-fptcone);
423 Info("FillEtForEMCAL", "neta %3i nphi %3i # array size %i Sum.Et %f\n",
424 neta,nphi, fncell, hid->Integral());
427 void AliEMCALJetMicroDst::FillEtForGrid(AliEMCALJetFinder* jetFinder)
430 TH2F *hid = jetFinder->GetLego();
433 FillArrays(hid, fngrid, fidgrid, fetgrid);
436 void AliEMCALJetMicroDst::FillArrays(TH2* hid, Int_t &n, Int_t *id, Float_t *et)
441 Int_t neta = hid->GetNbinsX(), nphi = hid->GetNbinsY();
442 for(Int_t ieta=1; ieta<=neta; ieta++) {
443 for(Int_t iphi=1; iphi<=nphi; iphi++) {
444 de = hid->GetBinContent(ieta,iphi);
447 id[n] = nphi*(ieta-1) + iphi;
449 if(n >= 13824) break;
453 Info("FillArrays", "neta %3i nphi %3i # array size %i Sum.Et %f\n",
454 neta, nphi, n, hid->Integral());
457 void AliEMCALJetMicroDst::FillChargeParticles(AliEMCALJetFinder* jetFinder)
459 // 28-jan-2003 for fullness ; 18-mar - sometimes
462 for(Int_t i=0; i<jetFinder->fNt; i++) {
464 if(jetFinder->fTrackList[i] >= 1) {
465 sgpdge_(jetFinder->fPdgT[i], gid);
467 fppt[fnchp] = jetFinder->fPtT[i];
468 fpeta[fnchp] = jetFinder->fEtaT[i];
469 fpphi[fnchp] = jetFinder->fPhiT[i];
473 Info("FillChargedParticles", "fNtS %i : nchp %i -> %i\n", jetFinder->fNtS, fnchp, jetFinder->fNtS - fnchp);
476 void AliEMCALJetMicroDst::FillJetsControl()
478 // see FillJets(AliEMCALJetFinder* jetFinder) and FillPartons
480 for(Int_t i=0; i<fnjet; i++){
481 fhPtJet->Fill(fjet[i]);
482 fhEtaPhiJet->Fill(fjetaw[i],fjphiw[i]);
485 for(Int_t i=0; i < fnpart; i++){
486 fhEtaPhiPart->Fill(fxeta[i], fxphi[i]);
487 fhPtPart->Fill(fxpt[i]);
491 fhNcell->Fill(fncell);
492 for(Int_t i=0; i < fncell; i++){
493 fhCellId->Fill(fidcell[i]);
494 fhCellEt->Fill(fetcell[i]);
495 sum += Double_t(fetcell[i]);
500 fhNgrid->Fill(fngrid);
501 for(Int_t i=0; i < fngrid; i++){
502 fhGridId->Fill(fidgrid[i]);
503 fhGridEt->Fill(fetgrid[i]);
504 sum += Double_t(fetgrid[i]);
506 fhSumEtGrForJF->Fill(sum);
509 Int_t AliEMCALJetMicroDst::GetEntry(Int_t entry)
511 // Read contents of entry.
513 Error("GetEntry", "define TTree");
516 return fTree->GetEntry(entry);
519 Bool_t AliEMCALJetMicroDst::GetParton(Int_t i, Float_t& pt, Float_t& eta, Float_t& phi) const
522 if(i>=0 && i<fnpart) {
527 } else return kFALSE;
530 Bool_t AliEMCALJetMicroDst::GetParton(Int_t i, TVector3& vec) const
533 static Float_t pt, eta, phi;
535 if(!GetParton(i, pt, eta, phi)) return kFALSE;
537 FillVector(pt, eta, phi, vec);
541 Bool_t AliEMCALJetMicroDst::GetJet(Int_t i,Int_t mode,Float_t& pt, Float_t& eta, Float_t& phi) const
543 // mode=1(W) mode=any(L)
544 if(i>=0 && i<fnjet) {
554 } else return kFALSE;
557 Bool_t AliEMCALJetMicroDst::GetJet(Int_t i, Int_t mode, TVector3& vec) const
560 static Float_t pt, eta, phi;
562 if(!GetJet(i, mode, pt, eta, phi)) return kFALSE;
563 FillVector(pt, eta, phi, vec);
567 void AliEMCALJetMicroDst::Test()
570 if(!fFile || !fTree ) {
571 Info("Test", "define file with proper TTree !");
574 Int_t nbytes=0, nb=0, nentries=Int_t(fTree->GetEntries());
575 for(Int_t i=0; i<nentries; i++){
576 nb = fTree->GetEntry(i);
578 for(Int_t j=0; j<fnpart; j++){
579 fhEtaPhiPart->Fill(fxeta[j], fxphi[j]);
580 fhPtPart->Fill(fxpt[j]);
585 for(Int_t j=0; j<fnjet; j++) {
586 fhPtJet->Fill(fjet[j]);
587 fhEtaPhiJet->Fill(fjetaw[j],fjphiw[j]);
591 Info("Test", "Entries %5i Bytes %10i\n", nentries, nbytes);
594 void AliEMCALJetMicroDst::FillVector(Float_t pt, Float_t eta, Float_t phi, TVector3& vec)
597 static Float_t px, py, pz;
599 px = pt*TMath::Cos(phi);
600 py = pt*TMath::Sin(phi);
601 pz = pt*TMath::SinH(eta); // sinh(eta) = cot(theta)
603 vec.SetXYZ(px, py, pz);
606 void AliEMCALJetMicroDst::GetEtaPhi(Int_t id, Double_t &eta, Double_t &phi) const
608 // see AliEMCALGeometry
609 static Int_t ieta, iphi, nphi=144, neta=96;
610 static Double_t phiMax=(2.0/3.0)*TMath::Pi(), phiMin=0.0;
611 static Double_t phiStep=(phiMax-phiMin)/nphi, phiBeg = phiMin + phiStep/2.;
612 static Double_t etaMax=0.7, etaMin=-etaMax;
613 static Double_t etaStep=(etaMax-etaMin)/neta, etaBeg = etaMin + etaStep/2.;
615 ieta = (id-1)/nphi + 1; // id = nphi*(ieta-1) + iphi
616 iphi = id - nphi*(ieta-1);
617 if(ieta<=0 || ieta>neta) {
618 Fatal("GetEtaPhi", "wrong id %i(ieta %i,iphi %i) : nphi %i neta %i", id,iphi,ieta, nphi,neta);
622 eta = etaBeg + etaStep*(ieta-1);
623 phi = phiBeg + phiStep*(iphi-1);
626 TVector3& AliEMCALJetMicroDst::GetCellVector(Int_t i) const
629 static Double_t eta,phi;
631 vec.SetXYZ(0.,0.,0.);
632 if(i>=0 && i<fncell) {
633 GetEtaPhi(fidcell[i], eta, phi);
634 vec.SetPtEtaPhi(Double_t(fetcell[i]),eta,phi);
639 TVector3& AliEMCALJetMicroDst::GetGridVector(Int_t i) const
642 static Double_t eta,phi;
644 vec.SetXYZ(0.,0.,0.);
645 if(i>=0 && i<fngrid) {
646 GetEtaPhi(fidgrid[i], eta, phi);
647 vec.SetPtEtaPhi(Double_t(fetgrid[i]),eta,phi);
652 Double_t AliEMCALJetMicroDst::GetSumInCone(TVector3 &jet,Int_t nc, Float_t *et,Float_t *eta,Float_t *phi, Double_t cellEtCut, Double_t rJet) const
655 static Double_t sum=0.;
656 static TVector3 cell(0., 0., 0.);
657 if(nc<=0 || et==0 || eta==0 || phi==0) {
658 Error("GetSumInCone", "nc %d %f %f %f ", nc, et, eta, phi);
663 // jet.SetPtEtaPhi(jet[0],jetaw[0],jphiw[0]); // must be one jet !!
664 Info("GetSumInCone", "jet.Mag() %f : njet %i\n", jet.Mag(), fnjet);
665 for(Int_t i=0; i<nc; i++){
666 if(et[i] < cellEtCut) continue;
667 cell.SetPtEtaPhi(et[i], eta[i], phi[i]);
668 if(jet.DeltaR(cell) > rJet) continue;
671 Info("GetSumCone", "Sum %f \n", sum);
675 Double_t AliEMCALJetMicroDst::GetEmcalEtInCone(TVector3 &jet, Double_t cellEtCut, Double_t rJet)
677 // Get EMCAL Et in cone
681 Float_t *et=fetcell, *eta=new Float_t[nc], *phi=new Float_t[nc];
682 Double_t etaCell=0., phiCell=0., eTotal=0;
684 for(Int_t i=0; i<nc; i++) {
685 GetEtaPhi(fidcell[i], etaCell, phiCell);
690 eTotal = GetSumInCone(jet, nc, et,eta,phi, cellEtCut,rJet);
697 Double_t AliEMCALJetMicroDst::GetTpcPtInCone(TVector3 &jet,Double_t cellEtCut, Double_t rJet)
699 // Get TPC PT in cone
700 if(fnchp<=0) return 0.;
701 return GetSumInCone(jet, fnchp, fppt,fpeta,fpphi, cellEtCut,rJet);
704 Double_t AliEMCALJetMicroDst::GetSum(Int_t n, Float_t *ar, Double_t cut) const
708 if(n<=0 || ar==0) return sum;
709 for(Int_t i=0; i<n; i++) {if(ar[i]>=cut) sum += Double_t(ar[i]);}
713 void AliEMCALJetMicroDst::Close()
723 void AliEMCALJetMicroDst::Browse(TBrowser* b) const
726 if(fTree) b->Add((TObject*)fTree);
727 if(fListHist) b->Add((TObject*)fListHist);
728 // TObject::Browse(b);
731 Bool_t AliEMCALJetMicroDst::IsPythiaDst() const
734 TString st(GetTitle());
735 if(st.Contains("py",TString::kIgnoreCase)||!st.Contains("hijing", TString::kIgnoreCase)) return kTRUE;
739 Bool_t AliEMCALJetMicroDst::IsFolder() const
742 if(fTree || fListHist) return kTRUE;
746 TList* AliEMCALJetMicroDst::MoveHistsToList(const char* name, Bool_t putToBrowser)
750 TIter nextHist(gDirectory->GetList());
751 TList *list = new TList;
754 while((objHist=nextHist())){
755 if (!objHist->InheritsFrom("TH1")) continue;
756 ((TH1*)objHist)->SetDirectory(0); // Remove from gROOT
759 if(putToBrowser) gROOT->GetListOfBrowsables()->Add((TObject*)list);