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 **************************************************************************/
19 #include <TClonesArray.h>
24 #include "AliAODJet.h"
25 #include "AliJetHistos.h"
27 ClassImp(AliJetHistos)
29 AliJetHistos::AliJetHistos():
36 // Default constructor
38 fNJetsH = new TH1I("NJetsH","Number of Jets",12,0,11);
39 SetProperties(fNJetsH,"Number of jets","Entries");
41 fPtH = new TH1F("PtH","Pt of Jets",50,0.,200.);
42 SetProperties(fPtH,"P_{#perp} [GeV]","Entries");
44 fEtaH = new TH1F("EtaH","Pseudorapidity of Jets",30,-1.5,1.5);
45 SetProperties(fEtaH,"#eta","Entries");
47 fEneH = new TH1F("EneH","Energy of Jets",50,0.,200.);
48 SetProperties(fEneH,"Energy [GeV]","Entries");
50 fPhiH = new TH1F("PhiH","Azimuthal angle of Jets",
51 60,0.,2.0*TMath::Pi());
52 SetProperties(fPhiH,"#phi","Entries");
55 AliJetHistos::~AliJetHistos()
65 void AliJetHistos::SetProperties(TH1* h,const char* x, const char* y) const
67 // Sets the histogram style properties
68 h->SetMarkerStyle(20);
76 void AliJetHistos::AddHistosToList(TList *list)
78 // Add histos to the list
87 void AliJetHistos::FillHistos(TClonesArray *jets)
91 Int_t nj = jets->GetEntries();
97 for (Int_t i=0;i<nj;i++) {
98 j = (AliAODJet *) jets->At(i);
99 fPtH->Fill(j->Pt(),1);
100 fEtaH->Fill(j->Eta(),1);
101 fEneH->Fill(j->E(),1);
102 fPhiH->Fill(j->Phi(),1);