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)
22 #include "AliEMCALJetMicroDst.h"
24 #include <Riostream.h>
26 #include "AliHeader.h"
27 #include "AliGenEventHeader.h"
28 #include "AliGenHijingEventHeader.h"
29 #include "AliEMCALJetFinder.h"
34 #include <TParticle.h>
36 ClassImp(AliEMCALJetMicroDst)
38 TString nameTree("jetMDST"); // 7-feb-2002
40 TH1F* hPtPart, *hNJet, *hPtJet;
41 TH2F* hEtaPhiPart, *hEtaPhiJet;
42 TH1F* hNcell, *hCellId, *hCellEt, *hSumEt;
43 TH1F* hNgrid, *hGridId, *hGridEt, *hSumEtGrForJF;
45 extern "C" void sgpdge_(Int_t &i, Int_t &pdggea);
47 AliEMCALJetMicroDst::AliEMCALJetMicroDst(char *name, char *tit) : TNamed(name,tit)
53 // Don't add histos to the current directory
54 // TH1::AddDirectory(0);
56 hPtPart = new TH1F("hPtPart","P_{T} for partons", 300, 0., 300.);
57 // 16-jan-2002 - new limit fo phi
58 hEtaPhiPart = new TH2F("hEtaPhiPart","#eta #phi distr.for partons after HSc",
59 28, -0.7, 0.7, 21, TMath::Pi()/3., TMath::Pi());
61 hNJet = new TH1F("hNJet","number of jets", 11, -0.5, 10.5);
62 hPtJet = new TH1F("hPtJet","P_{T} for jets", 500, 0., 500.);
63 hEtaPhiJet = new TH2F("hEtaPhiJet","#eta #phi distr.for jets (W)",
64 28, -0.7, 0.7, 21, TMath::Pi()/3., TMath::Pi());
66 hNcell = new TH1F("hNcell","#cell with de>0.0 for EMCAL", 1400, 0.0, 14000.);
67 hCellId = new TH1F("hCellId","cell ID with de>0.0 for EMCAL", 1400, 0.0, 14000.);
68 hCellEt = new TH1F("hCellEt","cell Et for EMCAL", 1000, 0.0, 10.);
69 hSumEt = new TH1F("hSumEt","sum Et for EMCAL", 1000, 0.0, 1000.);
71 hNgrid = new TH1F("hNgrid","#cell with de>0.0 in EMCAL grid for JF", 1400, 0.0, 14000.);
72 hGridId = new TH1F("hGridId","cell ID with de>0.0 in EMCAL grid for JF", 1400, 0.0, 14000.);
73 hGridEt = new TH1F("hGridEt","cell Et in EMCAL grid for JF", 1000, 0.0, 10.);
74 hSumEtGrForJF = new TH1F("hSumEtGrForJF","sum Et in EMCAL grid for JF", 1000, 0.0, 1000.);
76 fListHist = MoveHistsToList("Hist For AliEMCALJetMicroDst", kFALSE);
79 AliEMCALJetMicroDst::~AliEMCALJetMicroDst()
81 if(fFile) fFile->Close();
84 Bool_t AliEMCALJetMicroDst::Create(TFile *file)
87 printf("<E> AliEMCALJetMicroDst::create -> define TFile for output\n");
91 fFileName = fFile->GetName();
93 fTree = new TTree(nameTree.Data(),"Temporary micro DST for jets analysis");
94 // for jet calibration - 4-mar-2003
95 fTree->Branch("decone", &decone, "decone/F");
96 fTree->Branch("ptcone", &ptcone, "ptcone/F");
98 fTree->Branch("npart", &npart, "npart/I");
99 fTree->Branch("xpt", xpt, "xpt[npart]/F");
100 fTree->Branch("xeta", xeta, "xeta[npart]/F");
101 fTree->Branch("xphi", xphi, "xphi[npart]/F");
103 fTree->Branch("njet", &njet, "njet/I");
104 fTree->Branch("jet", jet, "jet[njet]/F");
105 fTree->Branch("jetaw", jetaw, "jetaw[njet]/F");
106 fTree->Branch("jphiw", jphiw, "jphiw[njet]/F");
107 fTree->Branch("jetal", jetal, "jetal[njet]/F");
108 fTree->Branch("jphil", jphil, "jphil[njet]/F");
110 // Et in EMCAL itself
111 fTree->Branch("ncell", &ncell, "ncell/I");
112 fTree->Branch("idcell", idcell, "idcell[ncell]/I");
113 fTree->Branch("etcell", etcell, "etcell[ncell]/F");
115 // Et in EMCAL grid for JF
116 fTree->Branch("ngrid", &ngrid, "ngrid/I");
117 fTree->Branch("idgrid", idgrid, "idgrid[ngrid]/I");
118 fTree->Branch("etgrid", etgrid, "etgrid[ngrid]/F");
120 // charge particle which hit to EMCAL
121 fTree->Branch("nchp", &nchp, "nchp/I");
122 fTree->Branch("pid", pid, "pid[nchp]/I");
123 fTree->Branch("ppt", ppt, "ppt[nchp]/F");
124 fTree->Branch("peta", peta, "peta[nchp]/F");
125 fTree->Branch("pphi", pphi, "pphi[nchp]/F");
130 Bool_t AliEMCALJetMicroDst::Create(const char *fname)
132 TFile *file = new TFile(fname, "RECREATE");
134 // fNameFile = fname;
136 } else return kFALSE;
139 Bool_t AliEMCALJetMicroDst::Open(const char *fname)
141 if(fFile && fFile->IsOpen()) fFile->Close();
142 if(strlen(fname)) fName = fname;
143 TFile *file = new TFile(fName.Data(), "READ");
145 Bool_t ini = Initialize(file);
146 printf("<I> open file %s : initialize TTree %i \n",fName.Data(), Int_t(ini));
149 printf("<E> can not open file %s \n",fName.Data());
154 const Char_t* AliEMCALJetMicroDst::DefineName(const Int_t mode)
156 static TString dir, name;
157 // dir = "jetDST/"; // 24-jan-2003
158 dir = "/auto/alice/pavlinov/jet/microDST/"; // 24-jan-2003
160 case 1: // for characteristic of BG
161 name = dir + "mDst1_1.root"; // Bg 2000 - first version
164 case 2: // for characteristic of BG
165 name = dir + "mDst2_1.root"; // Bg 4000 - first version
168 case 3: // for characteristic of BG
169 name = dir + "mDst3_1.root"; // Bg 8000 - first version
172 case 4: // Central Hijing - 18-mar-2003
173 name = dir + "march/";
174 name += "jF_R0.50MinCell1.0PtCut0.0EtSeed4.0MinEt40.0BGSubtr0SF11.6Smear0Eff0HijingCentral.root";
175 SetTitle("HijingCentral");
177 case 5: // Para Hijing (Dn/Dy=8000) - 21-mar-2003
178 name = dir + "march/";
179 name += "jF_R0.50MinCell1.0PtCut0.0EtSeed4.0MinEt40.0BGSubtr0SF11.6Smear0Eff0ParaHijing8000.root";
180 SetTitle("HIJINGparaDnDy8000");
182 case 6: // Para Hijing (Dn/Dy=4000) - 21-mar-2003
183 name = dir + "march/";
184 name += "jF_R0.50MinCell1.0PtCut0.0EtSeed4.0MinEt40.0BGSubtr0SF11.6Smear0Eff0ParaHijing4000.root";
185 SetTitle("HIJINGparaDnDy4000");
187 case 7: // Para Hijing (Dn/Dy=2000) - 21-mar-2003
188 name = dir + "march/";
189 name += "jF_R0.50MinCell1.0PtCut0.0EtSeed4.0MinEt40.0BGSubtr0SF11.6Smear0Eff0ParaHijing2000.root";
190 SetTitle("HIJINGparaDnDy2000");
192 case 11: // pure PYTHIA with default value of parameters
193 name = dir + "jF_R0.50MinCell0.0PtCut0.0EtSeed8.0MinEt40.0BGSubtr0SF11.6.root";
195 case 12: // 0 + background
196 name = dir + "jF_R0.50MinCell0.0PtCut0.0EtSeed8.0MinEt40.0BGSubtr0SF11.6kBackground2000.root";
200 name = dir + "march/";
201 name += "Pythia100_1.root";
202 SetTitle("Pythia100_1");
204 case 102: // 2-apr-2003
205 name = dir + "march/";
206 name += "Pythia50_1.root";
207 SetTitle("Pythia50_1");
208 // name = "microDst3th.root"; // 101 + (smearing and eff) - 14-mar-2003
210 case 103:// 4-apr-2003
211 name = dir + "march/";
212 name += "Pythia200_1.root";
213 SetTitle("Pythia200_1");
214 // name = "microDst4th.root"; // 102 + MinCell= 1.0
217 printf("AliEMCALJetMicroDst::DefineName : NO D E F A U L T : mode %i\n", mode);
220 printf("mode %5i file : %s : Title %s\n", mode, name.Data(), GetTitle());
224 Bool_t AliEMCALJetMicroDst::Initialize(TFile *file)
226 if(file) fFile = file;
228 fTree = (TTree*)fFile->Get(nameTree.Data());
229 if(!fTree) return kFALSE;
230 // for jet calibration - 4-mar-2003
231 fTree->SetBranchAddress("decone",&decone);
232 fTree->SetBranchAddress("ptcone",&ptcone);
234 fTree->SetBranchAddress("npart",&npart);
235 fTree->SetBranchAddress("xpt", xpt);
236 fTree->SetBranchAddress("xeta", xeta);
237 fTree->SetBranchAddress("xphi", xphi);
239 fTree->SetBranchAddress("njet", &njet);
240 fTree->SetBranchAddress("jet", jet);
241 fTree->SetBranchAddress("jetaw", jetaw);
242 fTree->SetBranchAddress("jphiw", jphiw);
243 fTree->SetBranchAddress("jetal", jetal);
244 fTree->SetBranchAddress("jphil", jphil);
246 fTree->SetBranchAddress("ncell", &ncell);
247 fTree->SetBranchAddress("idcell", idcell);
248 fTree->SetBranchAddress("etcell", etcell);
249 // eT in EMCAL grid for JF
250 fTree->SetBranchAddress("ngrid", &ngrid);
251 fTree->SetBranchAddress("idgrid", idgrid);
252 fTree->SetBranchAddress("etgrid", etgrid);
254 fTree->SetBranchAddress("nchp", &nchp);
255 fTree->SetBranchAddress("pid", pid);
256 fTree->SetBranchAddress("ppt", ppt);
257 fTree->SetBranchAddress("peta", peta);
258 fTree->SetBranchAddress("pphi", pphi);
263 void AliEMCALJetMicroDst::Print(Option_t* option) const
268 if(fTree) fTree->Print();
269 else printf("<I> TRee is zero\n");
271 printf("<I> File with TRee is closed \n");
272 printf(" Name of file %s(from fFileName \n", fFileName.Data());
275 printf("******* Current(last) event ***** \n");
276 printf("#partons %2i \n", npart);
277 for(Int_t i=0; i<npart; i++){
278 printf(" %1i Pt %7.1f eta %7.4f phi %7.4f \n",
279 i, xpt[i],xeta[i],xphi[i]);
281 printf("#jets %2i \n", njet);
282 for(Int_t i=0; i<njet; i++){
283 printf(" %1i Et %7.1f etaw %7.4f phiw %7.4f \n",
284 i,jet[i],jetaw[i],jphiw[i]);
286 printf(" Title %s \n", GetTitle());
289 void AliEMCALJetMicroDst::Fill(AliRun *run, AliEMCALJetFinder* jetFinder, Int_t modeFilling)
290 {// modeFilling >=1 - fill info for EMCAL grid
291 if(!run) run = gAlice;
292 AliGenEventHeader* evHeader = run->GetHeader()->GenEventHeader();
293 TString tmp(evHeader->ClassName());
294 if(tmp.Contains("Hijing")) {
295 AliGenHijingEventHeader *hijEvHeader = (AliGenHijingEventHeader*)evHeader;
296 FillPartons(hijEvHeader);
297 } else if(tmp.Contains("Pythia")) {
300 printf("<E> Wrong type of generator -> %s \n",tmp.Data());
301 printf(" Info about partons will be absent \n");
306 if(modeFilling >= 1) {
307 FillEtForEMCAL(jetFinder);
308 FillEtForGrid(jetFinder);
309 FillChargeParticles(jetFinder);
311 ncell = 0; // 27-jan-2003
312 ngrid = 0; // 27-jan-2003
314 // negative - no signal
319 FillJetsControl(); //24-jan-2003
324 void AliEMCALJetMicroDst::FillPartons(AliGenHijingEventHeader *header)
326 TLorentzVector parton[4];
327 header->GetJets(parton[0], parton[1], parton[2], parton[3]);
330 for(Int_t i=0; i<4; i++){
331 xpt[i] = parton[i].Pt();
332 xeta[i] = parton[i].Eta();
333 xphi[i] = parton[i].Phi();
337 void AliEMCALJetMicroDst::FillPartons()
338 {// for case of Pythia -> get info from full event record
343 for(Int_t i=6; i<8; i++){
344 MPart = gAlice->Particle(i);
346 xpt[ind] = MPart->Pt();
347 xeta[ind] = MPart->Eta();
348 xphi[ind] = MPart->Phi();
352 void AliEMCALJetMicroDst::FillJets(AliEMCALJetFinder* jetFinder)
355 if(fDebug>1) printf("\n<I> AliEMCALJetMicroDst::FillJets");
357 if(fDebug>1) printf("\n : jetFinder is zero");
360 njet = jetFinder->Njets();
362 if(fDebug>1) printf("\n <W> wrong value of jetFinder->Njets() %i ", njet);
365 // hNJet->Fill(njet);
366 if(fDebug>1) printf("\n <I> njet %i", njet);
368 for(Int_t i=0; i<njet; i++){
369 jet[i] = jetFinder->JetEnergy(i);
370 jetaw[i] = jetFinder->JetEtaW(i);
371 jphiw[i] = jetFinder->JetPhiW(i);
372 jetal[i] = jetFinder->JetEtaL(i);
373 jphil[i] = jetFinder->JetPhiL(i);
378 void AliEMCALJetMicroDst::FillEtForEMCAL(AliEMCALJetFinder* jetFinder)
381 TH2F *hid = jetFinder->GetLegoEMCAL();
385 Int_t neta = hid->GetNbinsX(), nphi = hid->GetNbinsY();
386 for(Int_t ieta=1; ieta<=neta; ieta++) {
387 for(Int_t iphi=1; iphi<=nphi; iphi++) {
388 de = hid->GetBinContent(ieta,iphi);
390 etcell[ncell] = Float_t(de);
391 idcell[ncell] = nphi*(ieta-1) + iphi;
393 if(ncell >= 13824) break;
394 // printf(" ncell %i6 id %i6 de %f \n", ncell, idcell[ncell], etcell[ncell]);
399 // jet energy calculate around LP direction !!! - 10-mar-2003
400 decone = jetFinder->EMCALConeEnergy(jetal[0],jphil[0]);
401 ptcone = jetFinder->TrackConeEnergy(jetal[0],jphil[0]); // get from lego plot fo ch.part
402 printf(" njet %i Emcal in cone %f pt ch.part in cone %f\n", njet, decone, ptcone);
403 printf(" jet - decone - ptcone : %9.2f\n", jet[0]-decone-ptcone);
409 printf(" FillEtForEMCAL : neta %3i nphi %3i # array size %i Sum.Et %f\n",
410 neta,nphi, ncell, hid->Integral());
413 void AliEMCALJetMicroDst::FillEtForGrid(AliEMCALJetFinder* jetFinder)
415 TH2F *hid = jetFinder->GetLego();
418 FillArrays(hid, ngrid, idgrid, etgrid);
421 void AliEMCALJetMicroDst::FillArrays(TH2* hid, Int_t &n, Int_t *id, Float_t *et)
425 Int_t neta = hid->GetNbinsX(), nphi = hid->GetNbinsY();
426 for(Int_t ieta=1; ieta<=neta; ieta++) {
427 for(Int_t iphi=1; iphi<=nphi; iphi++) {
428 de = hid->GetBinContent(ieta,iphi);
431 id[n] = nphi*(ieta-1) + iphi;
433 if(n >= 13824) break;
437 printf(" AliEMCALJetMicroDst::FillArrays : neta %3i nphi %3i # array size %i Sum.Et %f\n",
438 neta, nphi, n, hid->Integral());
441 void AliEMCALJetMicroDst::FillChargeParticles(AliEMCALJetFinder* jetFinder)
442 {// 28-jan-2003 for fullness ; 18-mar - sometimes
445 for(Int_t i=0; i<jetFinder->fNt; i++) {
447 if(jetFinder->fTrackList[i] >= 1) {
448 sgpdge_(jetFinder->fPdgT[i], gid);
450 ppt[nchp] = jetFinder->fPtT[i];
451 peta[nchp] = jetFinder->fEtaT[i];
452 pphi[nchp] = jetFinder->fPhiT[i];
456 printf(" fNtS %i : nchp %i -> %i\n", jetFinder->fNtS, nchp, jetFinder->fNtS - nchp);
459 void AliEMCALJetMicroDst::FillJetsControl()
460 { // see FillJets(AliEMCALJetFinder* jetFinder) and FillPartons
462 for(Int_t i=0; i<njet; i++){
463 hPtJet->Fill(jet[i]);
464 hEtaPhiJet->Fill(jetaw[i],jphiw[i]);
467 for(Int_t i=0; i < npart; i++){
468 hEtaPhiPart->Fill(xeta[i], xphi[i]);
469 hPtPart->Fill(xpt[i]);
474 for(Int_t i=0; i < ncell; i++){
475 hCellId->Fill(idcell[i]);
476 hCellEt->Fill(etcell[i]);
477 sum += Double_t(etcell[i]);
483 for(Int_t i=0; i < ngrid; i++){
484 hGridId->Fill(idgrid[i]);
485 hGridEt->Fill(etgrid[i]);
486 sum += Double_t(etgrid[i]);
488 hSumEtGrForJF->Fill(sum);
491 Int_t AliEMCALJetMicroDst::GetEntry(Int_t entry)
492 { // Read contents of entry.
494 printf("\n<E> AliEMCALJetMicroDst::GetEntry() -> define TTree \n");
497 return fTree->GetEntry(entry);
500 Bool_t AliEMCALJetMicroDst::GetParton(Int_t i, Float_t& pt, Float_t& eta, Float_t& phi)
502 if(i>=0 && i<npart) {
507 } else return kFALSE;
510 Bool_t AliEMCALJetMicroDst::GetParton(Int_t i, TVector3& vec)
512 static Float_t pt, eta, phi;
514 if(!GetParton(i, pt, eta, phi)) return kFALSE;
516 FillVector(pt, eta, phi, vec);
520 Bool_t AliEMCALJetMicroDst::GetJet(Int_t i,Int_t mode,Float_t& pt, Float_t& eta, Float_t& phi)
521 {// mode=1(W) mode=any(L)
532 } else return kFALSE;
535 Bool_t AliEMCALJetMicroDst::GetJet(Int_t i, Int_t mode, TVector3& vec)
537 static Float_t pt, eta, phi;
539 if(!GetJet(i, mode, pt, eta, phi)) return kFALSE;
540 FillVector(pt, eta, phi, vec);
544 void AliEMCALJetMicroDst::Test()
546 if(!fFile || !fTree ) {
547 printf("\n<I> AliEMCALJetMicroDst::Test() -> define file with proper TTree !");
550 Int_t nbytes=0, nb=0, nentries=Int_t(fTree->GetEntries());
551 for(Int_t i=0; i<nentries; i++){
552 nb = fTree->GetEntry(i);
554 for(Int_t j=0; j<npart; j++){
555 hEtaPhiPart->Fill(xeta[j], xphi[j]);
556 hPtPart->Fill(xpt[j]);
561 for(Int_t j=0; j<njet; j++) {
562 hPtJet->Fill(jet[j]);
563 hEtaPhiJet->Fill(jetaw[j],jphiw[j]);
567 printf("\n<I> AliEMCALJetMicroDst::Test() -> Entries %5i Bytes %10i\n", nentries, nbytes);
570 void AliEMCALJetMicroDst::FillVector(Float_t pt, Float_t eta, Float_t phi, TVector3& vec)
571 { // service function
572 static Float_t px, py, pz;
574 px = pt*TMath::Cos(phi);
575 py = pt*TMath::Sin(phi);
576 pz = pt*TMath::SinH(eta); // sinh(eta) = cot(theta)
578 vec.SetXYZ(px, py, pz);
581 void AliEMCALJetMicroDst::GetEtaPhi(Int_t id, Double_t &eta, Double_t &phi)
582 { // see AliEMCALGeometry
583 static Int_t ieta, iphi, nphi=144, neta=96;
584 static Double_t phiMax=TMath::Pi(), phiMin=phiMax/3.;
585 static Double_t phiStep=(phiMax-phiMin)/nphi, phiBeg = phiMin + phiStep/2.;
586 static Double_t etaMax=0.7, etaMin=-etaMax;
587 static Double_t etaStep=(etaMax-etaMin)/neta, etaBeg = etaMin + etaStep/2.;
589 ieta = (id-1)/nphi + 1; // id = nphi*(ieta-1) + iphi
590 iphi = id - nphi*(ieta-1);
591 if(ieta<=0 || ieta>neta) {
592 printf("<E> wrong id %i(ieta %i,iphi %i) : nphi %i neta %i\n",
593 id,iphi,ieta, nphi,neta);
597 eta = etaBeg + etaStep*(ieta-1);
598 phi = phiBeg + phiStep*(iphi-1);
601 TVector3& AliEMCALJetMicroDst::GetCellVector(Int_t i)
603 static Double_t eta,phi;
605 vec.SetXYZ(0.,0.,0.);
606 if(i>=0 && i<ncell) {
607 GetEtaPhi(idcell[i], eta, phi);
608 vec.SetPtEtaPhi(Double_t(etcell[i]),eta,phi);
613 TVector3& AliEMCALJetMicroDst::GetGridVector(Int_t i)
615 static Double_t eta,phi;
617 vec.SetXYZ(0.,0.,0.);
618 if(i>=0 && i<ngrid) {
619 GetEtaPhi(idgrid[i], eta, phi);
620 vec.SetPtEtaPhi(Double_t(etgrid[i]),eta,phi);
625 Double_t AliEMCALJetMicroDst::GetSumInCone(TVector3 &jet,Int_t nc, Float_t *et,Float_t *eta,Float_t *phi, Double_t cellEtCut, Double_t rJet)
627 static Double_t sum=0.;
628 static TVector3 cell(0., 0., 0.);
629 if(nc<=0 || et==0 || eta==0 || phi==0) {
630 cout<<"<E> AliEMCALJetMicroDst::GetSumInCone : nc "
631 <<nc<<" ar "<<et<<eta<<phi<<endl;
636 // jet.SetPtEtaPhi(jet[0],jetaw[0],jphiw[0]); // must be one jet !!
637 printf(" jet.Mag() %f : njet %i\n", jet.Mag(), njet);
638 for(Int_t i=0; i<nc; i++){
639 if(et[i] < cellEtCut) continue;
640 cell.SetPtEtaPhi(et[i], eta[i], phi[i]);
641 if(jet.DeltaR(cell) > rJet) continue;
644 printf(" Sum %f \n", sum);
649 Double_t AliEMCALJetMicroDst::GetEmcalEtInCone(TVector3 &jet, Double_t cellEtCut, Double_t rJet)
654 Float_t *et=etcell, *eta=new Float_t[nc], *phi=new Float_t[nc];
655 Double_t etaCell=0., phiCell=0., ET=0;
657 for(Int_t i=0; i<nc; i++) {
658 GetEtaPhi(idcell[i], etaCell, phiCell);
663 ET = GetSumInCone(jet, nc, et,eta,phi, cellEtCut,rJet);
670 Double_t AliEMCALJetMicroDst::GetTpcPtInCone(TVector3 &jet,Double_t cellEtCut, Double_t rJet)
672 if(nchp<=0) return 0.;
673 return GetSumInCone(jet, nchp, ppt,peta,pphi, cellEtCut,rJet);
676 Double_t AliEMCALJetMicroDst::GetSum(Int_t n, Float_t *ar, Double_t cut)
679 if(n<=0 || ar==0) return sum;
680 for(Int_t i=0; i<n; i++) {if(ar[i]>=cut) sum += Double_t(ar[i]);}
684 void AliEMCALJetMicroDst::Close()
693 void AliEMCALJetMicroDst::Browse(TBrowser* b)
695 if(fTree) b->Add((TObject*)fTree);
696 if(fListHist) b->Add((TObject*)fListHist);
697 // TObject::Browse(b);
700 Bool_t AliEMCALJetMicroDst::IsPythiaDst()
702 TString st(GetTitle());
703 if(st.Contains("py",TString::kIgnoreCase)||!st.Contains("hijing", TString::kIgnoreCase)) return kTRUE;
707 Bool_t AliEMCALJetMicroDst::IsFolder() const
709 if(fTree || fListHist) return kTRUE;
713 TList* AliEMCALJetMicroDst::MoveHistsToList(char* name, Bool_t putToBrowser)
716 TIter nextHist(gDirectory->GetList());
717 TList *list = new TList;
720 while((objHist=nextHist())){
721 if (!objHist->InheritsFrom("TH1")) continue;
722 ((TH1*)objHist)->SetDirectory(0); // Remove from gROOT
725 if(putToBrowser) gROOT->GetListOfBrowsables()->Add((TObject*)list);