1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 **************************************************************************/
18 //---------------------------------------------------------------------
20 // Creates and fills a few cummon histograms for jet analysis
22 //---------------------------------------------------------------------
25 #include <TClonesArray.h>
30 #include "AliAODJet.h"
31 #include "AliJetHistos.h"
33 ClassImp(AliJetHistos)
35 ///////////////////////////////////////////////////////////////////////
37 AliJetHistos::AliJetHistos():
44 // Default constructor
47 //-----------------------------------------------------------------------
48 void AliJetHistos::CreateHistos()
52 fNJetsH = new TH1I("NJetsH","Number of Jets",12,0,11);
53 SetProperties(fNJetsH,"Number of jets","Entries");
55 fPtH = new TH1F("PtH","Pt of Jets",50,0.,200.);
56 SetProperties(fPtH,"P_{#perp} [GeV]","Entries");
58 fEtaH = new TH1F("EtaH","Pseudorapidity of Jets",30,-1.5,1.5);
59 SetProperties(fEtaH,"#eta","Entries");
61 fEneH = new TH1F("EneH","Energy of Jets",50,0.,200.);
62 SetProperties(fEneH,"Energy [GeV]","Entries");
64 fPhiH = new TH1F("PhiH","Azimuthal angle of Jets",
65 60,0.,2.0*TMath::Pi());
66 SetProperties(fPhiH,"#phi","Entries");
69 //-----------------------------------------------------------------------
70 AliJetHistos::~AliJetHistos()
80 //-----------------------------------------------------------------------
81 void AliJetHistos::SetProperties(TH1* h,const char* x, const char* y) const
83 // Sets the histogram style properties
84 h->SetMarkerStyle(20);
92 //-----------------------------------------------------------------------
93 void AliJetHistos::AddHistosToList(TList *list) const
95 // Add histos to the list
103 //-----------------------------------------------------------------------
104 void AliJetHistos::FillHistos(TClonesArray *jets)
108 Int_t nj = jets->GetEntries();
111 if (nj == 0 ) return;
114 for (Int_t i=0;i<nj;i++) {
115 j = (AliAODJet *) jets->At(i);
116 fPtH->Fill(j->Pt(),1);
117 fEtaH->Fill(j->Eta(),1);
118 fEneH->Fill(j->E(),1);
119 fPhiH->Fill(j->Phi(),1);