+++ /dev/null
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Author: The ALICE Off-line Project. *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-/* $Id$ */
-
-//---------------------------------------------------------------------
-// Jet class
-// Stores the output of a jet algorithm
-// Author: jgcn@mda.cinvestav.mx
-//---------------------------------------------------------------------
-
-
-#include <Riostream.h>
-#include <TClonesArray.h>
-#include <TLorentzVector.h>
-
-#include "AliJet.h"
-ClassImp(AliJet)
-
-AliJet::AliJet():
- fNInput(0),
- fNJets(0),
- fEtAvg(0),
- fInJet(0),
- fMultiplicities(0),
- fNCells(0),
- fPtFromSignal(0),
- fJets(0),
- fEtaIn(0),
- fPhiIn(0),
- fPtIn(0),
- fPtChPtCutIn(0),
- fEnTotChPtCutIn(0),
- fDetIn(0),
- fTrackRef(new TRefArray())
-{
- // Default constructor
- fJets = new TClonesArray("TLorentzVector",1000);
- fInJet = TArrayI();
- fPtIn = TArrayF();
- fEtaIn = TArrayF();
- fPhiIn = TArrayF();
- fPtFromSignal = TArrayF();
- fMultiplicities = TArrayI();
- fNCells = TArrayI();
- fPtChPtCutIn = TArrayF();
- fEnTotChPtCutIn = TArrayF();
- fDetIn = TArrayI();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-AliJet::~AliJet()
-{
- // destructor
- if (fJets) {
- fJets->Delete();
- delete fJets;
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Bool_t AliJet::OutOfRange(Int_t i, const char *s) const
-{
- // checks if i is a valid index. s = name of calling method
- if (i >= fNJets || i < 0) {
- cout << s << " Index " << i << " out of range" << endl;
- return kTRUE;
- }
- return kFALSE;
-}
-
-////////////////////////////////////////////////////////////////////////
-
-TLorentzVector* AliJet::GetJet(Int_t i)
-{
- // returns i-jet
- if (OutOfRange(i, "AliJet::GetJet:")) return 0;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return lv;
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Int_t AliJet::GetMultiplicity(Int_t i) const
-{
- // gets multiplicity of i-jet
- if (OutOfRange(i, "AliJet::GetMultiplicity:")) return 0;
- return fMultiplicities[i];
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Int_t AliJet::GetNCell(Int_t i) const
-{
- // gets number of cell of i-jet
- if (OutOfRange(i, "AliJet::GetNCell:")) return 0;
- return fNCells[i];
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliJet::GetPx(Int_t i)
-{
-// Get Px component of jet i
- if (OutOfRange(i, "AliJet::GetPx:")) return -1e30;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return lv->Px();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliJet::GetPy(Int_t i)
-{
-// Get Py component of jet i
- if (OutOfRange(i, "AliJet::GetPy:")) return -1e30;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return lv->Py();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliJet::GetPz(Int_t i)
-{
-// Get Pz component of jet i
- if (OutOfRange(i, "AliJet::GetPz:")) return -1e30;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return lv->Pz();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliJet::GetP(Int_t i)
-{
-// Get momentum of jet i
- if (OutOfRange(i, "AliJet::GetP:")) return -1e30;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return lv->P();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliJet::GetE(Int_t i)
-{
-// Get energy of jet i
- if (OutOfRange(i, "AliJet::GetE:")) return -1e30;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return lv->E();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliJet::GetPt(Int_t i)
-{
-// Get transverse momentum of jet i
- if (OutOfRange(i, "AliJet::GetPt:")) return -1e30;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return lv->Pt();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliJet::GetEta(Int_t i)
-{
-// Get eta of jet i
- if (OutOfRange(i, "AliJet::GetEta:")) return -1e30;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return lv->Eta();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliJet::GetPhi(Int_t i)
-{
-// Get phi of jet i
- if (OutOfRange(i, "AliJet::GetPhi:")) return -1e30;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return ( (lv->Phi() < 0) ? (lv->Phi()) + 2. * TMath::Pi() : lv->Phi());
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliJet::GetTheta(Int_t i)
-{
-// Get theta of jet i
- if (OutOfRange(i, "AliJet::GetTheta:")) return -1e30;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return lv->Theta();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliJet::GetMass(Int_t i)
-{
-// Get invariant mass of jet i
- if (OutOfRange(i, "AliJet::GetMass:")) return -1e30;
- TLorentzVector *lv = (TLorentzVector*) fJets->At(i);
- return lv->M();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-
-void AliJet::AddJet(Double_t px, Double_t py, Double_t pz, Double_t e)
-{
-// Add new jet to the list
- new ((*fJets)[fNJets++]) TLorentzVector(px,py,pz,e);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::SetInJet(Int_t* j)
-{
- // set information of which input object belongs
- // to each jet. If zero, object was not assigned to
- // a jet, if n,positive, it was assiged to jet n
- // if n, negative, it is within cone of jet n, but
- // it did not passed the user cuts. filled in by AliJetFinder
- if (fNInput>0) fInJet.Set(fNInput, j);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::SetEtaIn(Float_t* r)
-{
- if (fNInput>0) fEtaIn.Set(fNInput, r);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::SetPtIn(Float_t* pt)
-{
- if (fNInput>0) fPtIn.Set(fNInput, pt);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::SetPhiIn(Float_t* x)
-{
- if (fNInput>0) fPhiIn.Set(fNInput, x);
-}
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::SetPtChargedPtCutIn(Float_t* x)
-{
- if (fNInput>0) fPtChPtCutIn.Set(fNInput, x);
-}
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::SetEnTotChargedPtCutIn(Float_t* x)
-{
- if (fNInput>0) fEnTotChPtCutIn.Set(fNInput, x);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::SetDetectorFlagIn(Int_t* x)
-{
- if (fNInput>0) fDetIn.Set(fNInput, x);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::SetPtFromSignal(Float_t* p)
-{
- // set information of percentage of pt of jets
- // coming from signal (ie Pythia)
- if (fNJets>0) fPtFromSignal.Set(fNJets, p);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::SetMultiplicities(Int_t* m)
-{
- // set information of jet multiplicities
- // filled in by AliJetFinder
- if (fNJets>0) fMultiplicities.Set(fNJets, m);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::SetNCells(Int_t* n)
-{
- if (fNJets>0) fNCells.Set(fNJets, n);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::ClearJets(Option_t *option)
-{
- // reset all values
- fJets->Clear(option);
- fNInput=0;
- fNJets=0;
- fMultiplicities.Set(0);
- fInJet.Set(0);
- fPtFromSignal.Set(0);
- fPhiIn.Set(0);
- fEtaIn.Set(0);
- fPtIn.Set(0);
- fNCells.Set(0);
- fPtChPtCutIn.Set(0);
- fEnTotChPtCutIn.Set(0);
- fDetIn.Set(0);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJet::PrintJets()
-{
-// Print jet information
- if (fNJets == 0) {
- cout << " AliJet::PrintJets: There are no jets in this event " << endl;
- return;
- }
- cout << " AliJet::PrintJets: There are " << fNJets
- << " jets in this event" << endl;
- for(Int_t i=0;i<fNJets;i++) {
- cout << " Jet " << i << " (px,py,pz,en)=(" << GetPx(i)
- << "," << GetPy(i)
- << "," << GetPz(i)
- << "," << GetE(i)
- << ")" << endl;
- cout << " (pt,eta,phi)=(" << GetPt(i)
- << "," << GetEta(i)
- << "," << GetPhi(i) << ")" << endl;
- cout << " # of tracks =" << GetMultiplicity(i) << endl;
- }
-}
+++ /dev/null
-#ifndef ALIJET_H
-#define ALIJET_H
-
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
-
-
-//---------------------------------------------------------------------
-// Jet class
-// Stores the output of a jet algorithm
-// Author: jgcn@mda.cinvestav.mx
-//---------------------------------------------------------------------
-
-#include <Riostream.h>
-
-#include <TObject.h>
-#include <TArrayI.h>
-#include <TArrayF.h>
-#include <TRefArray.h>
-
-class TClonesArray;
-class TLorentzVector;
-
-class AliJet : public TObject
-{
- public:
-
- AliJet();
- ~AliJet();
-
- // Getters
- Int_t GetNinput() const { return fNInput; }
- Int_t GetNJets() const {return fNJets;}
- TClonesArray* GetJets() const {return fJets;}
- TArrayI GetInJet() const {return fInJet;}
- TArrayI GetMultiplicities() const {return fMultiplicities;}
- TArrayI GetNCells() const {return fNCells;}
- TArrayF GetPtFromSignal() const {return fPtFromSignal;}
- TArrayF GetEtaIn() const { return fEtaIn; }
- TArrayF GetPhiIn() const { return fPhiIn; }
- TArrayF GetPtIn() const { return fPtIn; }
- TArrayF GetPtChargedPtCutIn() const { return fPtChPtCutIn; }
- TArrayF GetEnTotChargedPtCutIn() const {return fEnTotChPtCutIn; }
- TRefArray* GetTrackRef() const { return fTrackRef;}
- TArrayI GetDetectorFlagIn() const { return fDetIn; }
- Double_t GetEtAvg() const { return fEtAvg; }
-
- TLorentzVector* GetJet(Int_t i);
- Int_t GetMultiplicity(Int_t i) const;
- Int_t GetNCell(Int_t i) const;
- Double_t GetPx(Int_t i);
- Double_t GetPy(Int_t i);
- Double_t GetPz(Int_t i);
- Double_t GetP(Int_t i);
- Double_t GetE(Int_t i);
- Double_t GetPt(Int_t i);
- Double_t GetEta(Int_t i);
- Double_t GetPhi(Int_t i);
- Double_t GetTheta(Int_t i);
- Double_t GetMass(Int_t i);
-
- // Setters
- void SetNinput(Int_t i) {fNInput = i;}
- void AddJet(Double_t px, Double_t py, Double_t pz, Double_t e);
- void SetMultiplicities(Int_t* m);
- void SetNCells(Int_t* n);
- void SetPtFromSignal(Float_t* p);
- void SetEtaIn(Float_t* eta);
- void SetPhiIn(Float_t* phi);
- void SetPtIn(Float_t* pt);
- void SetInJet(Int_t* idx);
- void SetPtChargedPtCutIn(Float_t* pt2T);
- void SetEnTotChargedPtCutIn(Float_t* en2T);
- void SetTrackReferences(TRefArray* ref) {fTrackRef = ref;}
- void SetDetectorFlagIn(Int_t* detT);
- void SetEtAvg(Double_t et) { fEtAvg = et; }
- // others
- Bool_t OutOfRange(Int_t i, const char *s) const;
- void ClearJets(Option_t *option="");
- void PrintJets();
-
- protected:
-
- AliJet(const AliJet& rJet);
- AliJet& operator = (const AliJet& rhs);
-
- Int_t fNInput; // number of input objects
- Int_t fNJets; // number of jets found
- Double_t fEtAvg; // average background et per cell
-
- TArrayI fInJet; // i-input object belongs to k-jet
- TArrayI fMultiplicities; // Multiplicity of each jet
- TArrayI fNCells; // Number of cells in jet
- TArrayF fPtFromSignal; // percentage of pt from signal
- TClonesArray* fJets; // 4-momenta of jets
-
- TArrayF fEtaIn; // Arrays of input particles kine:Eta
- TArrayF fPhiIn; // Arrays of input particles kine:Phi
- TArrayF fPtIn; // Arrays of input particles kine:Pt
- TArrayF fPtChPtCutIn; // Arrays of input particles kin:Pt Charged with pt cut
- TArrayF fEnTotChPtCutIn; // Arrays of total energy with pt cut on charged + cut min on cell
- TArrayI fDetIn; // Arrays of detector type of each UnitArray
- TRefArray* fTrackRef; //|| Reference to tracks which could belongs to the jet
-
- ClassDef(AliJet,2)
-};
-
-#endif
+++ /dev/null
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Author: The ALICE Off-line Project. *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-//---------------------------------------------------------------------
-// JetAnalysis class
-// Analyse Jets (already found jets)
-// Authors: andreas.morsch@cern.ch, jgcn@mail.cern.ch
-// mercedes.lopez.noriega@cern.ch
-//---------------------------------------------------------------------
-
-#include <Riostream.h>
-#include "AliJetAnalysis.h"
-ClassImp(AliJetAnalysis)
-
-// root
-#include <Riostream.h>
-#include <TH1F.h>
-#include <TH2F.h>
-#include <TProfile.h>
-#include <TFile.h>
-#include <TTree.h>
-#include <TStyle.h>
-#include <TSystem.h>
-#include <TLorentzVector.h>
-#include <TMath.h>
-// aliroot
-#include "AliJetProductionDataPDC2004.h"
-#include "AliJet.h"
-#include "AliUA1JetHeader.h"
-#include "AliLeading.h"
-#include "AliJetReaderHeader.h"
-
-AliJetAnalysis::AliJetAnalysis():
- fReaderHeader(0x0),
- fDirectory(0x0),
- fBkgdDirectory(0x0),
- fFile("anaJets.root"),
- fEventMin(0),
- fEventMax(-1),
- fRunMin(0),
- fRunMax(11),
- fminMult(0),
- fPercentage(-1.0),
- fPartPtCut(0.0),
- fdrJt(1.0),
- fdrdNdxi(0.7),
- fdrdEdr(1.0),
- fEfactor(1.0),
- fp0(0.0),
- fPtJ(0.0),
- fEJ(0.0),
- fEtaJ(0.0),
- fPhiJ(0.0),
- fjv3X(0.0),
- fjv3Y(0.0),
- fjv3Z(0.0),
- fPythia(kFALSE),
- fDoPart(kTRUE),
- fDoGenJ(kTRUE),
- fDoRecJ(kTRUE),
- fDoKine(kTRUE),
- fDoCorr(kTRUE),
- fDoCorr50(kFALSE),
- fDoShap(kTRUE),
- fDoFrag(kTRUE),
- fDoTrig(kTRUE),
- fDoJt(kTRUE),
- fDodNdxi(kTRUE),
- fDoBkgd(kTRUE),
- fWeight(1.0),
- fWShapR(0.0),
- fWFragR(0.0),
- fWdEdr(0.0),
- fWJt(0.0),
- fWdNdxi(0.0),
- fPart(0),
- fGenJ(0),
- fRecJ(0),
- fRecB(0),
- fRKineEneH(0),
- fRKinePtH(0),
- fRKinePhiH(0),
- fRKineEtaH(0),
- fGKineEneH(0),
- fGKinePtH(0),
- fGKinePhiH(0),
- fGKineEtaH(0),
- fPKineEneH(0),
- fPKinePtH(0),
- fPKinePhiH(0),
- fPKineEtaH(0),
- fPGCorrEneH(0),
- fPGCorrPtH(0),
- fPGCorrEtaH(0),
- fPGCorrPhiH(0),
- fPRCorrEneH(0),
- fPRCorrPtH(0),
- fPRCorrEtaH(0),
- fPRCorrPhiH(0),
- fRGCorrEneH(0),
- fRGCorrPtH(0),
- fRGCorrEtaH(0),
- fRGCorrPhiH(0),
- fPRCorr50EneH(0),
- fPRCorr50PtH(0),
- fPRCorr50EtaH(0),
- fPRCorr50PhiH(0),
- fRGCorr50EneH(0),
- fRGCorr50PtH(0),
- fRGCorr50EtaH(0),
- fRGCorr50PhiH(0),
- fRFragSelH(0),
- fRFragRejH(0),
- fRFragAllH(0),
- fRShapSelH(0),
- fRShapRejH(0),
- fRShapAllH(0),
- fGTriggerEneH(0),
- fRTriggerEneH(0),
- fGPTriggerEneH(0),
- fPTriggerEneH(0),
- fdEdrH(0),
- fdEdrB(0),
- fPtEneH2(0),
- fdEdrW(0),
- fJtH(0),
- fJtB(0),
- fJtW(0),
- fdNdxiH(0),
- fdNdxiB(0),
- fdNdxiW(0),
- fPtEneH(0)
-{
- // Default constructor
-
- // initialize weight for dE/dr histo
- SetdEdrWeight();
-}
-
-AliJetAnalysis::~AliJetAnalysis()
-{
- // Destructor
-}
-
-
-////////////////////////////////////////////////////////////////////////
-// define histogrames
-
-void AliJetAnalysis::DefineHistograms()
-{
- // Define the histograms to be filled
- if (fDoKine) DefineKineH();
- if (fDoCorr) DefineCorrH();
- if (fDoCorr50) DefineCorr50H();
- if (fDoShap) DefineShapH();
- if (fDoFrag) DefineFragH();
- if (fDoTrig) DefineTrigH();
- if (fDoJt) DefineJtH();
- if (fDodNdxi) DefinedNdxiH();
-}
-
-void AliJetAnalysis::DefineKineH()
-{
- // leading particle
- if (fDoPart) {
- fPKineEneH = new TH1F("PKineEne","Energy of leading particle",50,0,200);
- SetProperties(fPKineEneH,"Energy (GeV)","Entries");
- fPKinePtH = new TH1F("PKinePt","Pt of leading particle",50,0,200);
- SetProperties(fPKinePtH,"P_{T} (GeV)","Entries");
- fPKinePhiH = new TH1F("PKinePhiH","Azimuthal angle of leading particle",
- 90,0.,2.0*TMath::Pi());
- SetProperties(fPKinePhiH,"#phi","Entries");
- fPKineEtaH = new TH1F("PKineEtaH","Pseudorapidity of leading particle",
- 40,-1.0,1.0);
- SetProperties(fPKineEtaH,"#eta","Entries");
- }
- // leading generated jet
- if (fDoGenJ) {
- fGKineEneH = new TH1F("GKineEne","Energy of generated jet",50,0,200);
- SetProperties(fGKineEneH,"Energy (GeV)","Entries");
- fGKinePtH = new TH1F("GKinePt","Pt of generated jet",50,0,200);
- SetProperties(fGKinePtH,"P_{T} (GeV)","Entries");
- fGKinePhiH = new TH1F("GKinePhiH","Azimuthal angle of generated jet",
- 90,0.,2.0*TMath::Pi());
- SetProperties(fGKinePhiH,"#phi","Entries");
- fGKineEtaH = new TH1F("GKineEtaH","Pseudorapidity of generated jet",
- 40,-1.0,1.0);
- SetProperties(fGKineEtaH,"#eta","Entries");
- }
- // leading reconstructed jet
- if (fDoRecJ) {
- fRKineEneH = new TH1F("RKineEne","Energy of reconstructed jet",50,0,200);
- SetProperties(fRKineEneH,"Energy (GeV)","Entries");
- fRKinePtH = new TH1F("RKinePt","Pt of reconstructed jet",50,0,200);
- SetProperties(fRKinePtH,"P_{T} (GeV)","Entries");
- fRKinePhiH = new TH1F("RKinePhiH","Azimuthal angle of reconstructed jet",
- 90,0.,2.0*TMath::Pi());
- SetProperties(fRKinePhiH,"#phi","Entries");
- fRKineEtaH = new TH1F("RKineEtaH","Pseudorapidity of reconstructed jet",
- 40,-1.0,1.0);
- SetProperties(fRKineEtaH,"#eta","Entries");
- }
-}
-
-void AliJetAnalysis::DefineCorrH()
-{
- // correlation
- if (fDoPart && fDoGenJ) {
- fPGCorrEneH = new TH2F("PGCorrEne","Energy correlation part-gen jet",
- 40,0,200,40,0,200);
- SetProperties(fPGCorrEneH,"Part Energy (GeV)","Gen Jet Energy (GeV)");
- fPGCorrPtH = new TH2F("PGCorrPt","Pt correlation part-gen jet",
- 40,0,200,40,0,200);
- SetProperties(fPGCorrPtH,"Part P_{T} (GeV)","Gen Jet P_{T} (GeV)");
- fPGCorrEtaH = new TH2F("PGCorrEta","Pseudorapidity correlation part-gen jet",
- 40,-1.0,1.0,40,-1.0,1.0);
- SetProperties(fPGCorrEtaH,"Part #eta","Gen Jet #eta");
- fPGCorrPhiH = new TH2F("PGCorrPhi","Azimuthal angle correlation part-gen jet",
- 90,0.,2.0*TMath::Pi(),90,0.,2.0*TMath::Pi());
- SetProperties(fPGCorrPhiH,"Part #phi","Gen Jet #phi");
- }
- if (fDoPart && fDoRecJ) {
- fPRCorrEneH = new TH2F("PRCorrEne","Energy correlation part-rec jet",
- 40,0,200,40,0,200);
- SetProperties(fPRCorrEneH,"Part Jet Energy (GeV)","Rec Jet Energy (GeV)");
- fPRCorrPtH = new TH2F("PRCorrPt","Pt correlation part-rec jet",
- 40,0,200,40,0,200);
- SetProperties(fPRCorrPtH,"Part Jet P_{T} (GeV)","Rec Jet P_{T} (GeV)");
- fPRCorrEtaH = new TH2F("PRCorrEta","Pseudorapidity correlation part-rec jet",
- 40,-1.0,1.0,40,-1.0,1.0);
- SetProperties(fPRCorrEtaH,"part #eta","Rec Jet #eta");
- fPRCorrPhiH = new TH2F("PRCorrPhi","Azimuthal angle correlation part-rec jet",
- 90,0.,2.0*TMath::Pi(),90,0.,2.0*TMath::Pi());
- SetProperties(fPRCorrPhiH,"Part #phi","Rec Jet #phi");
- }
- if (fDoGenJ && fDoRecJ) {
- fRGCorrEneH = new TH2F("RGCorrEne","Energy correlation rec jet-gen jet",
- 40,0,200,40,0,200);
- SetProperties(fRGCorrEneH,"Rec Jet Energy (GeV)","Gen Jet Energy (GeV)");
- fRGCorrPtH = new TH2F("RGCorrPt","Pt correlation rec jet-gen jet",
- 40,0,200,40,0,200);
- SetProperties(fRGCorrPtH,"Rec Jet P_{T} (GeV)","Gen Jet P_{T} (GeV)");
- fRGCorrEtaH = new TH2F("RGCorrEta","Pseudorapidity correlation rec jet-gen jet",
- 40,-1.0,1.0,40,-1.0,1.0);
- SetProperties(fRGCorrEtaH,"Rec Jet #eta","Gen Jet #eta");
- fRGCorrPhiH = new TH2F("RGCorrPhi","Azimuthal angle correlation rec jet-gen jet",
- 90,0.,2.0*TMath::Pi(),90,0.,2.0*TMath::Pi());
- SetProperties(fRGCorrPhiH,"Rec Jet #phi","Gen Jet #phi");
- }
-}
-
-void AliJetAnalysis::DefineCorr50H()
-{
- // correlation
- if (fDoPart && fDoRecJ) {
- fPRCorr50EneH = new TH2F("PRCorr50Ene","Energy correlation part-rec jet",
- 40,0,200,40,0,200);
- SetProperties(fPRCorr50EneH,"Part Jet Energy (GeV)","Rec Jet Energy (GeV)");
- fPRCorr50PtH = new TH2F("PRCorr50Pt","Pt correlation part-rec jet",
- 40,0,200,40,0,200);
- SetProperties(fPRCorr50PtH,"Part Jet P_{T} (GeV)","Rec Jet P_{T} (GeV)");
- fPRCorr50EtaH = new TH2F("PRCorr50Eta","Pseudorapidity correlation part-rec jet",
- 40,-1.0,1.0,40,-1.0,1.0);
- SetProperties(fPRCorr50EtaH,"part #eta","Rec Jet #eta");
- fPRCorr50PhiH = new TH2F("PRCorr50Phi","Azimuthal angle correlation part-rec jet",
- 90,0.,2.0*TMath::Pi(),90,0.,2.0*TMath::Pi());
- SetProperties(fPRCorr50PhiH,"Part #phi","Rec Jet #phi");
- }
-
- if (fDoGenJ && fDoRecJ) {
- fRGCorr50EneH = new TH2F("RGCorr50Ene","Energy correlation rec jet-gen jet",
- 40,0,200,40,0,200);
- SetProperties(fRGCorr50EneH,"Rec Jet Energy (GeV)","Gen Jet Energy (GeV)");
- fRGCorr50PtH = new TH2F("RGCorr50Pt","Pt correlation rec jet-gen jet",
- 40,0,200,40,0,200);
- SetProperties(fRGCorr50PtH,"Rec Jet P_{T} (GeV)","Gen Jet P_{T} (GeV)");
- fRGCorr50EtaH = new TH2F("RGCorr50Eta","Pseudorapidity correlation rec jet-gen jet",
- 40,-1.0,1.0,40,-1.0,1.0);
- SetProperties(fRGCorr50EtaH,"Rec Jet #eta","Gen Jet #eta");
- fRGCorr50PhiH = new TH2F("RGCorr50Phi","Azimuthal angle correlation rec jet-gen jet",
- 90,0.,2.0*TMath::Pi(),90,0.,2.0*TMath::Pi());
- SetProperties(fRGCorr50PhiH,"Rec Jet #phi","Gen Jet #phi");
- }
-}
-
-void AliJetAnalysis::DefineShapH()
-{
- // leading reconstructed jet
- if (fDoRecJ) {
- fdEdrH = new TH2F("fdEdrH","dE/dr histo",20,0,1,40,0,200);
- SetProperties(fdEdrH,"r","Rec Jet P_{T}");
- fdEdrB = new TH2F("fdEdrB","dE/dr bkgdhisto",20,0,1,40,0,200);
- SetProperties(fdEdrB,"r","Rec P_{T}");
- fPtEneH2 = new TH2F("fPtEneH2","fPtEneH2",40,0,200,40,0,200);
- SetProperties(fPtEneH2,"Rec Jet E","Rec Jet P_{T}");
- fdEdrW = new TH1F("fdEdrW","weights for dE/dr",40,0,200);
- SetProperties(fdEdrW,"Rec Jet P_{T}","weights");
-
- fRShapSelH = new TH1F("RShapSel","Shape of generated jets (sel part)",20,0.,1.);
- SetProperties(fRShapSelH,"r","1/N_{JET}#Sigma P_{T}(0,r)/P_{T}(0,R_{JET})");
- fRShapRejH = new TH1F("RShapRej","Shape of generated jets (rej part)",20,0.,1.);
- SetProperties(fRShapRejH,"r","1/N_{JET}#Sigma P_{T}(0,r)/P_{T}(0,R_{JET})");
- fRShapAllH = new TH1F("RShapAll","Shape of generated jets (all part)",20,0.,1.);
- SetProperties(fRShapAllH,"r","1/N_{JET}#Sigma P_{T}(0,r)/P_{T}(0,R_{JET})");
- }
-}
-
-void AliJetAnalysis::DefineJtH()
-{
- // Define the histogram for J_T
- if (fDoRecJ) {
- fJtH = new TH2F("fJtH","J_{T} histogram",80,0.,4.,40,0.,200.);
- SetProperties(fJtH,"J_{T}","Rec Jet P_{T}");
- fJtB = new TH2F("fJtB","J_{T} bkgd histogram",80,0.,4.,40,0.,200.);
- SetProperties(fJtB,"J_{T}","Rec P_{T}");
- fJtW = new TH1F("fJtW","J_{T} weight",40,0,200);
- SetProperties(fJtW,"J_{T}W","weight");
- }
-}
-
-void AliJetAnalysis::DefinedNdxiH()
-{
- // Define the histogram for dN/dxi
- if (fDoRecJ) {
- fdNdxiH = new TH2F("fdNdxiH","dN/d#xi histo",200,0,10,40,0,200);
- SetProperties(fdNdxiH,"xi","Rec Jet P_{T}");
- fdNdxiB = new TH2F("fdNdxiB","dN/d#xi bkgd histo",200,0,10,40,0,200);
- SetProperties(fdNdxiB,"xi","Rec P_{T}");
- fdNdxiW = new TH1F("fdNdxiW","dN/d#xi histo",40,0,200);
- SetProperties(fdNdxiW,"Rec Jet P_{T}","weights");
- fPtEneH = new TH2F("fPtEneH","fPtEneH",40,0,200,40,0,200);
- SetProperties(fPtEneH,"Rec Jet E","Rec Jet P_{T}");
- }
-}
-
-void AliJetAnalysis::DefineFragH()
-{
- // leading reconstructed jet
- if (fDoRecJ) {
- fRFragSelH = new TH1F("RFragSel","Frag Fun of reconstructed jets (sel part)",20,0.,10.);
- SetProperties(fRFragSelH,"#xi=ln(E_{JET}/E_{i})","1/N_{JET}dN_{ch}/d#xi");
- fRFragRejH = new TH1F("RFragRej","Frag Fun of reconstructed jets (rej part)",20,0.,10.);
- SetProperties(fRFragRejH,"#xi=ln(E_{JET}/E_{i})","1/N_{JET}dN_{ch}/d#xi");
- fRFragAllH = new TH1F("RFragAll","Frag Fun of reconstructed jets (all part)",20,0.,10.);
- SetProperties(fRFragAllH,"#xi=ln(E_{JET}/E_{i})","1/N_{JET}dN_{ch}/d#xi");
- }
-}
-
-void AliJetAnalysis::DefineTrigH()
-{
- // generated energy
- fGTriggerEneH = new TProfile("GTriggerEne","Generated energy (trigger bias)",
- 20, 0., 200., 0., 1., "S");
- fGTriggerEneH->SetXTitle("E_{gen}");
- fGTriggerEneH->SetYTitle("E_{rec}/E_{gen}");
- // reconstructed energy
- fRTriggerEneH = new TProfile("RTriggerEne","Reconstructed energy (trigger bias)",
- 20, 0., 200., 0., 1., "S");
- fRTriggerEneH->SetXTitle("E_{rec}");
- fRTriggerEneH->SetYTitle("E_{rec}/E_{gen}");
- // generated energy vs generated/leading
- fGPTriggerEneH = new TProfile("GPTriggerEne","Generated energy (trigger bias)",
- 20, 0., 200., 0., 1., "S");
- fGPTriggerEneH->SetXTitle("E_{gen}");
- fGPTriggerEneH->SetYTitle("E_{L}/E_{gen}");
- // leading particle energy
- fPTriggerEneH = new TProfile("PTriggerEne","Leading particle energy (trigger bias)",
- 20, 0., 200., 0., 1., "S");
- fPTriggerEneH->SetXTitle("E_{L}/0.2");
- fPTriggerEneH->SetYTitle("E_{L}/E_{gen}");
-
-}
-
-void AliJetAnalysis::SetProperties(TH1* h,const char* x, const char* y) const
-{
- //Set properties of histos (x and y title and error propagation)
- h->SetXTitle(x);
- h->SetYTitle(y);
- h->Sumw2();
-}
-
-////////////////////////////////////////////////////////////////////////
-// compute weights for dE/dr histogram
-
-void AliJetAnalysis::SetdEdrWeight()
-{
- // Due to the limited acceptance, each bin in the dE/dr has a different
- // weight given by the ratio of the area of a disk dR to the area
- // within the eta acceptance. The weight depends on the eta position
- // of the jet. Here a look up table for the weights is computed. It
- // assumes |etaJet|<0.5 and |eta_lego|<0.9. It makes bins of 0.05
- // units in eta. Note that this is fixed by the bin width chosen for
- // the histogram --> this weights are tailored for the specific
- // histogram definition used here!
-
- // two dimensional table: first index, bin in eta of jet, second
- // index bin of dE/dr histo
-
- Int_t nBins = 20;
- Float_t xMin = 0.0;
- Float_t xMax = 1.0;
- Float_t binSize = (xMax-xMin)/nBins;
-
- Float_t da,ds,r1,r2,h1,h2,a1,a2,theta1,theta2,area1,area2;
- Int_t ji;
- for (Int_t i=0;i<(nBins/2);i++) {
- // index of first histo bin needing a scale factor
- ji=(nBins-2)-i;
- for(Int_t j=0;j<nBins;j++) {
- // area of ring.
- da = TMath::Pi()*(binSize*binSize)*(1.0+2.0*j);
- ds = 1.0;
- if (j>=ji) { // compute missing area using segments of circle
- r1=j*binSize;
- r2=(j+1)*binSize;
- h1=(j-ji)*binSize;
- h2=(j+1-ji)*binSize;
- a1=2.0*TMath::Sqrt(2.0*h1*r1-h1*h1);
- a2=2.0*TMath::Sqrt(2.0*h2*r2-h2*h2);
- theta1=2*TMath::ACos((r1-h1)/r1);
- theta2=2*TMath::ACos((r2-h2)/r2);
- area1=binSize*(r1*r1*theta1-a1*(r1-h1));
- area2=binSize*(r2*r2*theta2-a2*(r2-h2));
- ds = (da-(area2-area1))/da;
- }
- fWeightdEdr[i][j]=ds/da;
- }
- }
-}
-
-// get weight for dE/dr histogram
-Float_t AliJetAnalysis::GetdEdrWeight(Float_t etaJet, Float_t r)
-{
- // Return the correponding weight for the dE/dr plot
- Int_t nBins = 20;
- Float_t xMin = 0.0;
- Float_t xMax = 1.0;
- Float_t binSize = (xMax-xMin)/nBins;
-
- Float_t eta = TMath::Abs(etaJet);
- if ((eta > 0.5) || (r > fdrdEdr)) return 0.0;
- Int_t binJet = (Int_t) TMath::Floor(eta/binSize);
- Int_t binR = (Int_t) TMath::Floor(r/binSize);
- Float_t w = fWeightdEdr[binJet][binR];
- return w;
-}
-
-
-////////////////////////////////////////////////////////////////////////
-// fill histograms
-
-void AliJetAnalysis::FillHistograms()
-{
- // fill histograms
-
- // Run data
- AliJetProductionDataPDC2004* runData = new AliJetProductionDataPDC2004();
-
- // Loop over runs
- TFile* jFile = 0x0;
-
- for (Int_t iRun = fRunMin; iRun <= fRunMax; iRun++) {
- // Open file
- char fn[256];
- sprintf(fn, "%s/%s.root", fDirectory, (runData->GetRunTitle(iRun)).Data());
- jFile = new TFile(fn);
- printf(" Analyzing run: %d %s\n", iRun,fn);
-
- // Get reader header and events to be looped over
- AliJetReaderHeader *jReaderH = (AliJetReaderHeader*)(jFile->Get(fReaderHeader));
- if (fEventMin == -1) fEventMin = jReaderH->GetFirstEvent();
- if (fEventMax == -1) {
- fEventMax = jReaderH->GetLastEvent();
- } else {
- fEventMax = TMath::Min(fEventMax, jReaderH->GetLastEvent());
- }
-
- AliUA1JetHeader *jH = (AliUA1JetHeader *) (jFile->Get("AliUA1JetHeader"));
-
- // Calculate weight
- fWeight = runData->GetWeight(iRun)/ ( (Float_t) (fEventMax - fEventMin + 1));
-
- // Loop over events
- for (Int_t i = fEventMin; i < fEventMax; i++) {
- if (i%100 == 0) printf(" Analyzing event %d / %d \n",i,fEventMax);
-
- // Get next tree with AliJet
- char nameT[100];
- sprintf(nameT, "TreeJ%d",i);
- TTree *jetT =(TTree *)(jFile->Get(nameT));
- if (fDoRecJ) jetT->SetBranchAddress("FoundJet", &fRecJ);
- if (fDoGenJ) jetT->SetBranchAddress("GenJet", &fGenJ);
- if (fDoPart) jetT->SetBranchAddress("LeadingPart", &fPart);
- jetT->GetEntry(0);
-
- int nJets = fRecJ->GetNJets();
-
- TArrayI inJet = fRecJ->GetInJet();
- if(inJet.GetSize()>fminMult){ // removes events with low multiplicity
- if (fDoKine) FillKineH();
- if (fDoCorr) FillCorrH();
- if (fDoCorr50) FillCorr50H();
- if (fDoShap) FillShapH(jH->GetRadius());
- if (fDoFrag) FillFragH();
- if (fDoTrig) FillTrigH();
- if (fDoJt) FillJtH();
- if (fDodNdxi) FilldNdxiH();
- }
- delete jetT; // jet should be deleted before creating a new one
- if(inJet.GetSize()>fminMult){ // removes events with low multiplicity
- if (fDoBkgd && nJets>0) FillBkgd(i,iRun);
- }
- } // end loop over events in one file
- if (jFile) jFile->Close();
- delete jFile;
- } // end loop over files
-}
-
-void AliJetAnalysis::FillKineH()
-{
- // leading particle
- if (fDoPart && fPart->LeadingFound()){
- fPKineEneH->Fill(fPart->GetE(),fWeight);
- fPKinePtH->Fill(fPart->GetPt(),fWeight);
- fPKinePhiH->Fill(fPart->GetPhi(),fWeight);
- fPKineEtaH->Fill(fPart->GetEta(),fWeight);
- }
- // leading generated jet
- if (fDoGenJ && fGenJ->GetNJets()> 0){
- fGKineEneH->Fill(fGenJ->GetE(0),fWeight);
- fGKinePtH->Fill(fGenJ->GetPt(0),fWeight);
- fGKinePhiH->Fill(fGenJ->GetPhi(0),fWeight);
- fGKineEtaH->Fill(fGenJ->GetEta(0),fWeight);
- }
- // leading reconstructed jet
- if (fDoRecJ && fRecJ->GetNJets()> 0) {
- TArrayF p=fRecJ->GetPtFromSignal();
- if (p[0]>fPercentage) {
- fRKineEneH->Fill(fRecJ->GetE(0)/fEfactor,fWeight);
- fRKinePtH->Fill(fRecJ->GetPt(0),fWeight);
- fRKinePhiH->Fill(fRecJ->GetPhi(0),fWeight);
- fRKineEtaH->Fill(fRecJ->GetEta(0),fWeight);
- }
- }
-}
-
-void AliJetAnalysis::FillCorrH()
-{
- // Fill correlation histograms
- if (fDoPart && fPart->LeadingFound() && fDoGenJ && fGenJ->GetNJets()> 0)
- Correlation(fPart->GetLeading(),fGenJ->GetJet(0),
- fPGCorrEneH,fPGCorrPtH,fPGCorrEtaH,fPGCorrPhiH);
- if (fDoPart && fPart->LeadingFound() && fDoRecJ && fRecJ->GetNJets()> 0) {
- TArrayF p=fRecJ->GetPtFromSignal();
- if (p[0]>fPercentage)
- Correlation(fPart->GetLeading(),fRecJ->GetJet(0),
- fPRCorrEneH,fPRCorrPtH,fPRCorrEtaH,fPRCorrPhiH);
- }
- if (fDoGenJ && fGenJ->GetNJets()> 0 && fDoRecJ && fRecJ->GetNJets()> 0) {
- TArrayF p=fRecJ->GetPtFromSignal();
- if (p[0]>fPercentage)
- Correlation(fRecJ->GetJet(0), fGenJ->GetJet(0),
- fRGCorrEneH,fRGCorrPtH,fRGCorrEtaH,fRGCorrPhiH);
- }
-}
-
-void AliJetAnalysis::Correlation(TLorentzVector *lv1,TLorentzVector *lv2,
- TH2F *h1, TH2F *h2, TH2F *h3, TH2F *h4)
-{
- // Correlation histograms
- h1->Fill(lv1->E(),lv2->E(),fWeight);
- h2->Fill(lv1->Pt(),lv2->Pt(),fWeight);
- h3->Fill(lv1->Eta(),lv2->Eta(),fWeight);
- Float_t p1, p2;
- p1 = ((lv1->Phi() < 0) ? (lv1->Phi()) + 2. * TMath::Pi() : lv1->Phi());
- p2 = ((lv2->Phi() < 0) ? (lv2->Phi()) + 2. * TMath::Pi() : lv2->Phi());
- h4->Fill(p1,p2,fWeight);
-}
-
-void AliJetAnalysis::FillCorr50H()
-{
- // Fill correlation histograms when one particle has > 50% of jet energy
- if (fDoRecJ && fRecJ->GetNJets()> 0) {
- TArrayF p = fRecJ->GetPtFromSignal();
- if (p[0]>fPercentage) {
- if (fDoPart && fPart->LeadingFound())
- Correlation50(fRecJ, fPart->GetLeading(),fRecJ->GetJet(0),
- fPRCorr50EneH,fPRCorr50PtH,fPRCorr50EtaH,fPRCorr50PhiH);
- if (fDoGenJ && fGenJ->GetNJets()> 0)
- Correlation50(fRecJ, fRecJ->GetJet(0), fGenJ->GetJet(0),
- fRGCorr50EneH,fRGCorr50PtH,fRGCorr50EtaH,fRGCorr50PhiH);
- }
- }
-}
-
-void AliJetAnalysis::Correlation50(AliJet *j,TLorentzVector *lv1,TLorentzVector *lv2,
- TH2F *h1, TH2F *h2, TH2F *h3, TH2F *h4)
-{
- // Correlation histograms when one particle has > 50% of jet energy
- TArrayF ptin = j->GetPtIn();
- TArrayF etain = j->GetEtaIn();
- TArrayI inJet = j->GetInJet();
-
- Int_t flag = 0;
- for(Int_t i=0;i<(inJet.GetSize());i++) {
- if (inJet[i] == 1) {
- Float_t t1 = TMath::Tan(2.0*TMath::ATan(TMath::Exp(-etain[i])));
- Float_t x = (ptin[i]*TMath::Sqrt(1.+1./(t1*t1)))/(j->GetE(0));
- if (x>0.5) flag++;
- }
- }
- if (flag>1) cout << " Flag = " << flag << endl;
- if (flag == 1) {
- h1->Fill(lv1->E(),lv2->E(),fWeight);
- h2->Fill(lv1->Pt(),lv2->Pt(),fWeight);
- h3->Fill(lv1->Eta(),lv2->Eta(),fWeight);
- Float_t p1, p2;
- p1 = ((lv1->Phi() < 0) ?
- (lv1->Phi()) + 2. * TMath::Pi() : lv1->Phi());
- p2 = ((lv2->Phi() < 0) ?
- (lv2->Phi()) + 2. * TMath::Pi() : lv2->Phi());
- h4->Fill(p1,p2,fWeight);
- }
-}
-
-void AliJetAnalysis::FillJtH()
-{
- // Fill J_T histogram
- if (fRecJ->GetNJets()> 0) {
- fjv3X = 0.0; fjv3Y = 0.0; fjv3Z = 0.0;
- TArrayF p=fRecJ->GetPtFromSignal();
- if (p[0]>fPercentage) {
- // initialize
- const TVector3 kJv3 = fRecJ->GetJet(0)->Vect();
- fjv3X = kJv3.X(); fjv3Y = kJv3.Y(); fjv3Z = kJv3.Z();
- TVector3 trk;
- TArrayI inJet = fRecJ->GetInJet();
- TArrayF etain = fRecJ->GetEtaIn();
- TArrayF ptin = fRecJ->GetPtIn();
- TArrayF phiin = fRecJ->GetPhiIn();
- Float_t deta, dphi,jt, dr;
- for(Int_t i=0;i<inJet.GetSize();i++) {
- deta = etain[i] - fRecJ->GetEta(0);
- dphi = phiin[i] - fRecJ->GetPhi(0);
- if (dphi < -TMath::Pi()) dphi= -dphi - 2.0 * TMath::Pi();
- if (dphi > TMath::Pi()) dphi = 2.0 * TMath::Pi() - dphi;
- dr = TMath::Sqrt(deta * deta + dphi * dphi);
- if ((dr<fdrJt) && (ptin[i] > fPartPtCut)) {
- trk.SetPtEtaPhi(ptin[i],etain[i],phiin[i]);
- jt = TMath::Sin(trk.Angle(kJv3))*trk.Mag();
- fJtH->Fill(jt,fRecJ->GetPt(0),fWeight);
- }
- }
- fJtW->Fill(fRecJ->GetPt(0),fWeight);
- fWJt+=fWeight;
- }
- }
-}
-
-void AliJetAnalysis::FilldNdxiH()
-{
- // Fill dN/d#xi histograms
- if (fRecJ->GetNJets()> 0) {
- TArrayF p=fRecJ->GetPtFromSignal();
- if (p[0]>fPercentage) {
- fp0 = p[0];
- TArrayI inJet = fRecJ->GetInJet();
- TArrayF etain = fRecJ->GetEtaIn();
- TArrayF ptin = fRecJ->GetPtIn();
- TArrayF phiin = fRecJ->GetPhiIn();
- Float_t xi,t1,ene,dr,deta,dphi;
- for(Int_t i=0;i<inJet.GetSize();i++) {
- deta = etain[i] - fRecJ->GetEta(0);
- dphi = phiin[i] - fRecJ->GetPhi(0);
- if (dphi < -TMath::Pi()) dphi= -dphi - 2.0 * TMath::Pi();
- if (dphi > TMath::Pi()) dphi = 2.0 * TMath::Pi() - dphi;
- dr = TMath::Sqrt(deta * deta + dphi * dphi);
- if ((dr<fdrdNdxi) && (ptin[i] > fPartPtCut)) {
- t1 = TMath::Tan(2.0*TMath::ATan(TMath::Exp(-etain[i])));
- ene = ptin[i]*TMath::Sqrt(1.+1./(t1*t1));
- xi = (Float_t) TMath::Log((fRecJ->GetE(0)/fEfactor)/ene);
- fdNdxiH->Fill(xi,fRecJ->GetPt(0),fWeight);
- }
- }
- fdNdxiW->Fill(fRecJ->GetPt(0),fWeight);
- fPtEneH->Fill(fRecJ->GetE(0)/fEfactor,fRecJ->GetPt(0),fWeight);
- fWdNdxi+=fWeight;
- }
- }
-}
-
-void AliJetAnalysis::FillBkgd(Int_t eventN, Int_t runN)
-{
- // Background calculated with hijing events (no pythia)
- if (fp0>fPercentage) {
- fPtJ=0.,fEJ=0.,fEtaJ=0.,fPhiJ=0.;
- // Background calculated with hijing events (no pythia)
- AliJetProductionDataPDC2004* runDataB = new AliJetProductionDataPDC2004();
- TFile* jFileB =0x0;;
- char fnB[256];
-
- sprintf(fnB, "%s/%s.root", fBkgdDirectory, (runDataB->GetRunTitle(runN)).Data());
- jFileB = new TFile(fnB);
-
- char nameB[100];
- sprintf(nameB, "TreeJ%d",eventN);
- TTree *jetB =(TTree *)(jFileB->Get(nameB));
- jetB->SetBranchAddress("FoundJet", &fRecB);
- jetB->GetEntry(0);
-
- TArrayI inJetB = fRecB->GetInJet();
- TArrayF etainB = fRecB->GetEtaIn();
- TArrayF ptinB = fRecB->GetPtIn();
- TArrayF phiinB = fRecB->GetPhiIn();
- fPtJ = fRecJ->GetPt(0);
- fEJ = fRecJ->GetE(0);
- fEtaJ = fRecJ->GetEta(0);
- fPhiJ = fRecJ->GetPhi(0);
- Float_t t1,ene,xi,detaB,dphiB,drB,jt,wB;
- TVector3 trkB;
- TVector3 jv3B;
- jv3B.SetX(fjv3X); jv3B.SetY(fjv3Y); jv3B.SetZ(fjv3Z);
-
- for(Int_t k=0;k<inJetB.GetSize();k++){
- if(ptinB[k] > fPartPtCut){
- detaB = etainB[k] - fEtaJ;
- dphiB = phiinB[k] - fPhiJ;
- if (dphiB < -TMath::Pi()) dphiB= -dphiB - 2.0 * TMath::Pi();
- if (dphiB > TMath::Pi()) dphiB = 2.0 * TMath::Pi() - dphiB;
- drB = TMath::Sqrt(detaB * detaB + dphiB * dphiB);
- t1 = TMath::Tan(2.0*TMath::ATan(TMath::Exp(-etainB[k])));
- ene = ptinB[k]*TMath::Sqrt(1.+1./(t1*t1));
- trkB.SetPtEtaPhi(ptinB[k],etainB[k],phiinB[k]);
- // --- dN/dxi
- if (drB<fdrdNdxi) {
- xi = (Float_t) TMath::Log(fEJ/ene);
- fdNdxiB->Fill(xi,fPtJ,fWeight);
- }
- // --- Jt
- if (drB<fdrJt) {
- jt = TMath::Sin(trkB.Angle(jv3B))*(trkB.Mag());
- fJtB->Fill(jt,fPtJ,fWeight);
- }
- // --- dE/dr
- if (drB<fdrdEdr) {
- wB = GetdEdrWeight(fEtaJ,drB)*fWeight*ene;
- fdEdrB->Fill(drB,fPtJ,wB);
- }
- }
- }
- delete jetB;
- if (jFileB) jFileB->Close();
- delete jFileB;
- }
-}
-
-void AliJetAnalysis::FillShapH(Float_t r)
-{
- // Fill jet shape histograms
- if (fDoRecJ && fRecJ->GetNJets()> 0) {
- TArrayF p=fRecJ->GetPtFromSignal();
- if (p[0]>fPercentage) {
- Shape(fRecJ,fRShapSelH,fRShapRejH,fRShapAllH,fdEdrH,fPtEneH2,fdEdrW,r);
- fWdEdr+=fWeight;
- fWShapR+=fWeight;
- }
- }
-}
-
-void AliJetAnalysis::Shape(AliJet *j,TH1F* hs, TH1F* hr, TH1F* ha,
- TH2F *hdedr, TH2F *hptene, TH1F* wdedr, Float_t radius)
-{
- // initialize
- TArrayI inJet = j->GetInJet();
- TArrayF etain = j->GetEtaIn();
- TArrayF ptin = j->GetPtIn();
- TArrayF phiin = j->GetPhiIn();
-
- // first compute dE/dr histo
- Float_t etaj = j->GetEta(0);
- Float_t ene,w,deta,dphi,dr,t1;
- for(Int_t i=0;i<inJet.GetSize();i++) {
- deta = etain[i] - j->GetEta(0);
- dphi = phiin[i] - j->GetPhi(0);
- if (dphi < -TMath::Pi()) dphi= -dphi - 2.0 * TMath::Pi();
- if (dphi > TMath::Pi()) dphi = 2.0 * TMath::Pi() - dphi;
- dr = TMath::Sqrt(deta * deta + dphi * dphi);
- if ((dr<fdrdEdr) && (ptin[i] > fPartPtCut)) {
- t1 = TMath::Tan(2.0*TMath::ATan(TMath::Exp(-etain[i])));
- ene = ptin[i]*TMath::Sqrt(1.+1./(t1*t1));
- w = GetdEdrWeight(etaj,dr)*fWeight*ene;
- hdedr->Fill(dr,j->GetPt(0),w);
- }
- }
- hptene->Fill(fRecJ->GetE(0),fRecJ->GetPt(0),fWeight);
- wdedr->Fill(j->GetPt(0),fWeight);
-
- // now compute shape histos
- Int_t nBins = ha->GetNbinsX();
- Float_t xMin = ha->GetXaxis()->GetXmin();
- Float_t xMax = ha->GetXaxis()->GetXmax();
- Float_t binSize,halfBin;
- binSize = (xMax-xMin)/nBins;
- halfBin = binSize/2;
- Float_t rptS[20], rptR[20], rptA[20];
- for(Int_t i=0;i<nBins;i++) rptS[i]=rptR[i]=rptA[i]=0.0;
- // fill bins in r for leading jet
- for(Int_t i=0;i<inJet.GetSize();i++) {
- if (inJet[i] == 1 || (inJet[i] == -1 && fPythia)) {
- deta = etain[i] - j->GetEta(0);
- dphi = phiin[i] - j->GetPhi(0);
- if (dphi < -TMath::Pi()) dphi= -dphi - 2.0 * TMath::Pi();
- if (dphi > TMath::Pi()) dphi = 2.0 * TMath::Pi() - dphi;
- dr = TMath::Sqrt(deta * deta + dphi * dphi);
- Float_t rR = dr/radius;
- Int_t bin = (Int_t) TMath::Floor(rR/binSize);
- rptA[bin]+=ptin[i]/(j->GetPt(0));
- if (inJet[i] == 1) rptS[bin]+=ptin[i]/(j->GetPt(0));
- if (fPythia && inJet[i] == -1)
- rptR[bin]+=ptin[i]/(j->GetPt(0));
- }
- }
-
- // compute shape and fill histogram
- Float_t ptS,ptR,ptA,r;
- ptS=ptR=ptA=0.0;
- for (Int_t i=0;i<nBins;i++) {
- ptS+=rptS[i];
- ptR+=rptR[i];
- ptA+=rptA[i];
- r=(i+1)*binSize-halfBin;
- hs->Fill(r,ptS*fWeight);
- if(fPythia) {
- hr->Fill(r,ptR*fWeight);
- ha->Fill(r,ptA*fWeight);
- }
- }
-}
-
-void AliJetAnalysis::FillFragH()
-{
- // Fill fragmentation histogram
- if (fDoRecJ && fRecJ->GetNJets()> 0) {
- TArrayF p=fRecJ->GetPtFromSignal();
- if (p[0]>fPercentage) {
- FragFun(fRecJ,fRFragSelH,fRFragRejH,fRFragAllH);
- fWFragR+=fWeight;
- }
- }
-}
-
-void AliJetAnalysis::FragFun(AliJet *j,TH1F* hs, TH1F* hr, TH1F* ha)
-{
- // Calculate de fragmentation function
- TArrayI inJet = j->GetInJet();
- TArrayF etain = j->GetEtaIn();
- TArrayF ptin = j->GetPtIn();
-
- Float_t xi,t1,ene;
-
- for(Int_t i=0;i<(inJet.GetSize());i++) {
- if (inJet[i] == 1 || (inJet[i] == -1 && fPythia)) {
- t1 = TMath::Tan(2.0*TMath::ATan(TMath::Exp(-etain[i])));
- ene = ptin[i]*TMath::Sqrt(1.+1./(t1*t1));
- xi = (Float_t) TMath::Log((j->GetE(0))/ene);
- if (fPythia) ha->Fill(xi,fWeight);
- if (inJet[i] == 1) hs->Fill(xi,fWeight);
- if (fPythia && inJet[i] == -1) hr->Fill(xi,fWeight);
- }
- }
-}
-
-void AliJetAnalysis:: FillTrigH()
-{
- // Fill trigger bias histograms
- if(fDoTrig && fGenJ->GetNJets()>0 && fRecJ->GetNJets()>0){
- TArrayF p=fRecJ->GetPtFromSignal();
- if (p[0]>fPercentage) {
- float genEne = fGenJ->GetE(0);
- float recEne = fRecJ->GetE(0);
- float eneRatio = (recEne/fEfactor)/genEne;
-
- fGTriggerEneH->Fill(genEne, eneRatio, fWeight);
- fRTriggerEneH->Fill(recEne/fEfactor, eneRatio, fWeight);
-
- if (fPart->LeadingFound()){
- float leaEne = fPart->GetE();
- float eneRatio2 = leaEne/genEne;
- fGPTriggerEneH->Fill(genEne, eneRatio2, fWeight);
- fPTriggerEneH->Fill(leaEne/0.2, eneRatio2, fWeight);
- }
- }
- }
-}
-
-
-////////////////////////////////////////////////////////////////////////
-// Normalize histogrames
-
-void AliJetAnalysis::NormHistograms()
-{
- // normalize shape histograms
- if (fDoShap) {
- if (fDoRecJ && fWShapR>0.) { // leading reconstructed jet
- fRShapSelH->Scale(1.0/fWShapR);
- fRShapRejH->Scale(1.0/fWShapR);
- fRShapAllH->Scale(1.0/fWShapR);
- }
- }
-
- // normalize fragmentation function histograms
- if (fDoFrag) {
- if (fDoRecJ && fWFragR>0.) { // leading reconstructed jet
- fRFragSelH->Scale(2.0/fWFragR);
- fRFragRejH->Scale(2.0/fWFragR);
- fRFragAllH->Scale(2.0/fWFragR);
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJetAnalysis::PlotHistograms()
-{
- // Plot histogramas (to be done...)
- if (fDoKine) PlotKineH();
- if (fDoCorr) PlotCorrH();
- if (fDoCorr50) PlotCorr50H();
- if (fDoShap) PlotShapH();
- if (fDoFrag) PlotFragH();
- if (fDoTrig) PlotTrigH();
-}
-
-void AliJetAnalysis::PlotKineH() const
-{
- // missing
-}
-
-void AliJetAnalysis::PlotCorrH() const
-{
- // missing
-}
-void AliJetAnalysis::PlotCorr50H() const
-{
- // missing
-}
-
-void AliJetAnalysis::PlotShapH() const
-{
- // missing
-}
-
-void AliJetAnalysis::PlotFragH() const
-{
- // missing
-}
-
-void AliJetAnalysis::PlotTrigH()
-{
- // missing
-
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJetAnalysis::SaveHistograms()
-{
- // Save histograms
- TFile *fOut = new TFile(fFile,"recreate");
- fOut->cd();
- if (fDoKine) SaveKineH();
- if (fDoCorr) SaveCorrH();
- if (fDoCorr50) SaveCorr50H();
- if (fDoShap) SaveShapH();
- if (fDoFrag) SaveFragH();
- if (fDoTrig) SaveTrigH();
- if (fDoJt) SaveJtH();
- if (fDodNdxi) SavedNdxiH();
- fOut->Close();
-}
-
-void AliJetAnalysis::SaveKineH()
-{
- // Save kinematic histograms
- if (fDoPart) {
- fPKineEneH->Write();
- fPKinePtH->Write();
- fPKinePhiH->Write();
- fPKineEtaH->Write();
- }
-
- if (fDoGenJ) {
- fGKineEneH->Write();
- fGKinePtH->Write();
- fGKinePhiH->Write();
- fGKineEtaH->Write();
- }
-
- if (fDoRecJ) {
- fRKineEneH->Write();
- fRKinePtH->Write();
- fRKinePhiH->Write();
- fRKineEtaH->Write();
- }
-}
-
-void AliJetAnalysis::SaveCorrH()
-{
- // Save correlation histograms
- if (fDoPart && fDoGenJ) {
- fPGCorrEneH->Write();
- fPGCorrPtH->Write();
- fPGCorrEtaH->Write();
- fPGCorrPhiH->Write();
- }
-
- if (fDoPart && fDoRecJ) {
- fPRCorrEneH->Write();
- fPRCorrPtH->Write();
- fPRCorrEtaH->Write();
- fPRCorrPhiH->Write();
- }
-
- if (fDoGenJ && fDoRecJ) {
- fRGCorrEneH->Write();
- fRGCorrPtH->Write();
- fRGCorrEtaH->Write();
- fRGCorrPhiH->Write();
- }
-}
-
-void AliJetAnalysis::SaveCorr50H()
-{
- // Save correlation histograms (special case)
- if (fDoPart && fDoRecJ) {
- fPRCorr50EneH->Write();
- fPRCorr50PtH->Write();
- fPRCorr50EtaH->Write();
- fPRCorr50PhiH->Write();
- }
- if (fDoGenJ && fDoRecJ) {
- fRGCorr50EneH->Write();
- fRGCorr50PtH->Write();
- fRGCorr50EtaH->Write();
- fRGCorr50PhiH->Write();
- }
-}
-
-void AliJetAnalysis::SaveShapH()
-{
- // Save jet shape histograms
- if (fDoRecJ) {
- fRShapSelH->Write();
- fdEdrH->Write();
- if(fDoBkgd) fdEdrB->Write();
- fPtEneH2->Write();
- fdEdrW->Write();
- if (fPythia){
- fRShapRejH->Write();
- fRShapAllH->Write();
- }
- }
-}
-
-void AliJetAnalysis::SaveJtH()
-{
- // Save J_T histograms
- if (fDoRecJ) {
- fJtH->Write();
- if(fDoBkgd) fJtB->Write();
- fJtW->Write();
- }
-}
-
-void AliJetAnalysis::SavedNdxiH()
-{
- // Save dN/d#xi histograms
- if (fDoRecJ) {
- fdNdxiH->Write();
- if(fDoBkgd) fdNdxiB->Write();
- fPtEneH->Write();
- fdNdxiW->Write();
- }
-}
-
-void AliJetAnalysis::SaveFragH()
-{
- // Save fragmentation histograms
- if (fDoRecJ) {
- fRFragSelH->Write();
- if(fPythia){
- fRFragRejH->Write();
- fRFragAllH->Write();
- }
- }
-}
-
-void AliJetAnalysis::SaveTrigH()
-{
- // Save trigger bias histograms
- if(fDoTrig){
- fGTriggerEneH->Write();
- fRTriggerEneH->Write();
- fGPTriggerEneH->Write();
- fPTriggerEneH->Write();
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-// main Analysis function
-
-void AliJetAnalysis::Analyze()
-
-{
- // Kinematics for
- // leading particle
- // leading generated jet
- // leading reconstructed jet
-
- // Correlations amd resolutions
- // a) correlations in energy, pt, phi, eta
- // b) resolutions in energy, pt, phi, eta, r
- // leading particle and leading generated jet
- // leading particle and leading reconstructed jet
- // leading generated jet and leading reconstructed jet
-
- // Fragmentation functions and Shapes
- // a) integrated over all pt
- // b) in 3 flavors:
- // b.1) only for user selected particles in jet
- // b.2) only for user rejected particles in jet
- // b.3) for all particles in jet
-
- DefineHistograms();
- FillHistograms();
- NormHistograms();
- PlotHistograms();
- SaveHistograms();
-}
-
+++ /dev/null
-#ifndef ALIJETANALYSIS_H
-#define ALIJETANALYSIS_H
-
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
-
-//---------------------------------------------------------------------
-// JetAnalysis class
-// Perform Jet Analysis on already found jets
-// Author: andreas.morsch@cern.ch, jgcn@mail.cern.ch
-// mercedes.lopez.noriega@cern.ch
-//---------------------------------------------------------------------
-
-#include <TObject.h>
-class AliLeading;
-class AliJet;
-class TH1;
-class TH1F;
-class TH2F;
-class TProfile;
-class TLorentzVector;
-
-class AliJetAnalysis : public TObject
-{
- public:
-
- AliJetAnalysis();
- virtual ~AliJetAnalysis();
-
- void Analyze();
- // define histograms
- void DefineHistograms();
- void DefineKineH();
- void DefineCorrH();
- void DefineCorr50H();
- void DefineShapH();
- void DefineFragH();
- void DefineTrigH();
- void DefineJtH();
- void DefinedNdxiH();
- // fill histograms
- void FillHistograms();
- void FillKineH();
- void FillCorrH();
- void FillCorr50H();
- void FillShapH(Float_t r);
- void FillFragH();
- void FillTrigH();
- void FillJtH();
- void FilldNdxiH();
- void FillBkgd(Int_t eventN, Int_t runN);
- // normalize histograms
- void NormHistograms();
- // plot histograms
- void PlotHistograms();
- void PlotKineH() const;
- void PlotCorrH() const;
- void PlotCorr50H() const;
- void PlotShapH() const;
- void PlotFragH() const;
- void PlotTrigH();
- // save histograms
- void SaveHistograms();
- void SaveKineH();
- void SaveCorrH();
- void SaveCorr50H();
- void SaveShapH();
- void SaveFragH();
- void SaveTrigH();
- void SaveJtH();
- void SavedNdxiH();
- // other functions
- void Shape(AliJet *j,TH1F* hs, TH1F* hr, TH1F* ha, TH2F* hd, TH2F* hp, TH1F* wd, Float_t r);
- void FragFun(AliJet *j,TH1F* hs, TH1F* hr, TH1F* ha);
- void Correlation(TLorentzVector *lv1,TLorentzVector *lv2,TH2F *h1, TH2F *h2, TH2F *h3, TH2F *h4);
- void Correlation50(AliJet *j,TLorentzVector *lv1,TLorentzVector *lv2,TH2F *h1, TH2F *h2, TH2F *h3, TH2F *h4);
- // setters
- void SetDirectory(const char* directory)
- {fDirectory = directory;} // directory where file with jets is
- void SetBkgdDirectory(const char* directory)
- {fBkgdDirectory = directory;} // directory where file with background is
- void SetOutputFile(const char* file) {fFile = file;} // file where plots will be saved
- void SetPercentage(Float_t p) {fPercentage = p;} // minimum percentage of tracks coming from pythia (very aprox.)
- void SetEventRange(Int_t imin, Int_t imax)
- {fEventMin = imin; fEventMax = imax;} // first and last event
- void SetRunRange(Int_t imin, Int_t imax)
- {fRunMin = imin; fRunMax = imax;} // first and last run
- void SetMinimumMult(Int_t m){fminMult = m;} // minimum multiplicity cut
- void SetPythia(Bool_t f = kFALSE){fPythia = f;} // If only pythia, to save everything...
- void SetDoJt(Bool_t f = kTRUE){fDoJt = f;} // To get j_T distribution
- void SetDodNdxi(Bool_t f = kTRUE){fDodNdxi = f;} // To get #xi distribution
- void SetDoBkgd(Bool_t f = kTRUE) {fDoBkgd = f;} // To get the bkgd for j_T, xi and dEdr in a hijing event
- void SetDoLeadPart(Bool_t f = kTRUE){fDoPart = f;}// To make plots for leading particle
- void SetDoGenJet(Bool_t f = kTRUE){fDoGenJ = f;} // To make plots for generated jets
- void SetDoRecJet(Bool_t f = kTRUE){fDoRecJ = f;} // To make plots for reconstructed jets
- void SetDoKinematics(Bool_t f = kTRUE){fDoKine = f;} // To make the kine plots
- void SetDoCorrelations(Bool_t f = kTRUE){fDoCorr = f;} // Correlation histograms
- void SetDoCorr50(Bool_t f = kFALSE){fDoCorr50 = f;} // Correlation histograms when one particle has more than 50% E
- void SetDoShape(Bool_t f = kTRUE){fDoShap = f;} // Shape plots
- void SetDoFragmentations(Bool_t f = kTRUE){fDoFrag = f;} // Fragmentation
- void SetDoTriggerBias(Bool_t f = kTRUE){fDoTrig = f;} // Trigger bias plots
- void SetDivideEnergy(Float_t Efactor){fEfactor = Efactor;} // Divides E of rec.jet by Efactor
- void SetProperties(TH1* h,const char* x, const char* y) const;
- void SetReaderHeader(const char *s="AliJetKineReaderHeader"){fReaderHeader = s;}
- void SetdEdrWeight();
- void SetPartPtCut(Float_t c){fPartPtCut = c;}
- void SetdrJt(Float_t r){fdrJt = r;}
- void SetdrdNdxi(Float_t r){fdrdNdxi = r;}
- void SetdrdEdr(Float_t r){fdrdEdr = r;}
- // getters
- Float_t GetdEdrWeight(Float_t eta, Float_t r);
-
- private:
- const char* fReaderHeader; // Reader header
- const char* fDirectory; // Directory
- const char* fBkgdDirectory; // Directory for background
- const char* fFile; // Output file name
- Int_t fEventMin; // Minimum event number
- Int_t fEventMax; // Maximum event number
- Int_t fRunMin; // Minimum run number
- Int_t fRunMax; // Maximum run number
- Int_t fminMult; // Minimum multiplicity for events
- Float_t fPercentage; // percentage of pt from signal particles to accept a jet
- Float_t fPartPtCut; // cut in the pt of particles in histos
- Float_t fdrJt; // maximum dr for Jt plot
- Float_t fdrdNdxi; // maximum dr for dN/dxi plot
- Float_t fdrdEdr; // maximum dr for dE/dr plot
- Float_t fEfactor; // factor by which energy the reconstructed jet will be divided
-
- Float_t fp0; // percentage of tracks in reconstructed jet coming from pythia
- // so far calculated in aprox. way, it needs to be improved!
- // for background from hijing events:
- Float_t fPtJ; // P_T of the pythia jet
- Float_t fEJ; // Energy of the pythia jet
- Float_t fEtaJ; // Eta of the pythia jet
- Float_t fPhiJ; // Phi of the pythia jet
- Float_t fjv3X, fjv3Y, fjv3Z; // x,y,z of the pythia jet
-
- // user options
- Bool_t fPythia; // if pythia events
- Bool_t fDoPart; // do analysis of leading particle
- Bool_t fDoGenJ; // do analysis of leading generated jet
- Bool_t fDoRecJ; // do analysis of leading rec jet
- Bool_t fDoKine; // do kinematic plots
- Bool_t fDoCorr; // do correlation plots
- Bool_t fDoCorr50; // do correlation plots when one track more than 50% of jet energy
- Bool_t fDoShap; // do shape plots
- Bool_t fDoFrag; // do fragmentation plots
- Bool_t fDoTrig; // do trigger bias plots
- Bool_t fDoJt; // do jt histo
- Bool_t fDodNdxi; // do dN/dxi histo
- Bool_t fDoBkgd; // get dN/dxi bkgd using hijing tracks only
-
- // weights
- Float_t fWeight; // event weight
- Float_t fWShapR; // weighted number of jets
- Float_t fWFragR; // weighted number of jets
- Float_t fWeightdEdr[10][20]; // weight for acceptance of dE/dr histo
- Float_t fWdEdr; // weighted number of events for dEdr histo
- Float_t fWJt; // weight for Jt
- Float_t fWdNdxi; // weight fro dNd#xi
-
- // leading hets and particles
- AliLeading* fPart; // pointer to leading particle
- AliJet* fGenJ; // pointer to leading generated jet
- AliJet* fRecJ; // pointer to leading reconstructed jet
- AliJet* fRecB; // pointer to leading reconstructed jet for background
-
- // kine histos
- TH1F *fRKineEneH; // Reconstructed energy histo
- TH1F *fRKinePtH; // Reconstructed Pt histo
- TH1F *fRKinePhiH; // Reconstructed phi histo
- TH1F *fRKineEtaH; // Reconstructed eta histo
- TH1F *fGKineEneH; // Generated energy histo
- TH1F *fGKinePtH; // Generated Pt histo
- TH1F *fGKinePhiH; // Generated phi histo
- TH1F *fGKineEtaH; // Generated eta histo
- TH1F *fPKineEneH; // Pythia energy histo
- TH1F *fPKinePtH; // Pythia Pt histo
- TH1F *fPKinePhiH; // Pythia phi histo
- TH1F *fPKineEtaH; // Pythia eta histo
-
- // correlation histograms
- TH2F *fPGCorrEneH; // Energy correlation part-gen jet
- TH2F *fPGCorrPtH; // Pt correlation part-gen jet
- TH2F *fPGCorrEtaH; // Pseudorapidity correlation part-gen jet
- TH2F *fPGCorrPhiH; // Azimuthal angle correlation part-gen jet
- TH2F *fPRCorrEneH; // Energy correlation part-rec jet
- TH2F *fPRCorrPtH; // Pt correlation part-rec jet
- TH2F *fPRCorrEtaH; // Pseudorapidity correlation part-rec jet
- TH2F *fPRCorrPhiH; // Azimuthal angle correlation part-rec jet
- TH2F *fRGCorrEneH; // Energy correlation rec jet-gen jet
- TH2F *fRGCorrPtH; // Pt correlation rec jet-gen jet
- TH2F *fRGCorrEtaH; // Pseudorapidity correlation rec jet-gen jet
- TH2F *fRGCorrPhiH; // Azimuthal angle correlation rec jet-gen jet
-
- // correlation histogramswhen one particle
- // has more than 50% of the energy of the jet
- TH2F *fPRCorr50EneH; // Energy correlation part-rec jet
- TH2F *fPRCorr50PtH; // Pt correlation part-rec jet
- TH2F *fPRCorr50EtaH; // Pseudorapidity correlation part-rec jet
- TH2F *fPRCorr50PhiH; // Azimuthal angle correlation part-rec jet
- TH2F *fRGCorr50EneH; // Energy correlation rec jet-gen jet
- TH2F *fRGCorr50PtH; // Pt correlation rec jet-gen jet
- TH2F *fRGCorr50EtaH; // Pseudorapidity correlation rec jet-gen jet
- TH2F *fRGCorr50PhiH; // Azimuthal angle correlation rec jet-gen jet
-
- // fragmentation function and shape histos
- TH1F *fRFragSelH; // Frag Fun of reconstructed jets (sel part)
- TH1F *fRFragRejH; // Frag Fun of reconstructed jets (rej part)
- TH1F *fRFragAllH; // Frag Fun of reconstructed jets (all part)
- TH1F *fRShapSelH; // Shape of generated jets (sel part)
- TH1F *fRShapRejH; // Shape of generated jets (rej part)
- TH1F *fRShapAllH; // Shape of generated jets (all part)
-
- // trigger bias histos
- TProfile *fGTriggerEneH; // Generated energy (trigger bias)
- TProfile *fRTriggerEneH; // Reconstructed energy (trigger bias)
- TProfile *fGPTriggerEneH; // Generated energy (trigger bias)
- TProfile *fPTriggerEneH; // Leading particle energy (trigger bias)
-
- // dE/dr histo
- TH2F* fdEdrH; // dE/dr histo
- TH2F* fdEdrB; // dE/dr bkgdhisto
- TH2F* fPtEneH2;// fPtEneH2
- TH1F* fdEdrW; // weights for dE/dr
-
- // Jt histo
- TH2F* fJtH; // J_{T} histogram
- TH2F* fJtB; // J_{T} bkgd histogram
- TH1F* fJtW; // J_{T} weight
-
- // dN/dxi histo
- TH2F* fdNdxiH; // dN/d#xi histo
- TH2F* fdNdxiB; // dN/d#xi bkgd histo
- TH1F* fdNdxiW; // dN/d#xi weight histo
- TH2F* fPtEneH; // fPtEneH
-
-protected:
- AliJetAnalysis(const AliJetAnalysis& rJetA);
- AliJetAnalysis& operator = (const AliJetAnalysis& rhsa);
-
-
- ClassDef(AliJetAnalysis,1)
-};
-
-#endif
+++ /dev/null
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Author: The ALICE Off-line Project. *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-/* $Id$ */
-
-//---------------------------------------------------------------------
-// Jet Control Plots class
-// manages histograms with control plots of jet searching
-// Stores the output of a jet algorithm
-// Author: jgcn@mda.cinvestav.mx
-//---------------------------------------------------------------------
-
-#include <TCanvas.h>
-#include <TH1D.h>
-#include <TH1I.h>
-#include <TMath.h>
-#include <TStyle.h>
-
-#include "AliJetReader.h"
-#include "AliJet.h"
-
-#include "AliJetControlPlots.h"
-ClassImp(AliJetControlPlots)
-
-////////////////////////////////////////////////////////////////////////
-
-AliJetControlPlots::AliJetControlPlots():
- fNJetsH(0),
- fMultH(0),
- fPtH(0),
- fEtaH(0),
- fEneH(0),
- fFragH(0),
- fFragLnH(0),
- fFragrH(0),
- fFragLnrH(0),
- fShapeH(0),
- fShaperH(0),
- fPhiH(0),
- fInJetH(0),
- fNJetT(0)
-
-{
- // Default constructor
-
- // general properties
- fNJetsH = new TH1I("fNJetsH","Number of Jets",12,0,11);
- SetProperties(fNJetsH,"Number of jets","Entries");
-
- fMultH = new TH1I("fMultH","Multiplicity of Jets",22,0,21);
- SetProperties(fMultH,"Multiplicity of jets","Entries");
-
- fInJetH = new TH1D("fInJetH","Percentage of particles in jets",50,0,1);
- SetProperties(fInJetH,"percentage of particles in jets","Entries");
-
- // kinematics
- fPtH = new TH1D("fPtH","Pt of Jets",50,0.,200.);
- SetProperties(fPtH,"P_{t} [GeV]","Entries");
-
- fEtaH = new TH1D("fEtaH","Pseudorapidity of Jets",30,-1.5,1.5);
- SetProperties(fEtaH,"#eta","Entries");
-
- fEneH = new TH1D("fEneH","Energy of Jets",50,0.,200.);
- SetProperties(fEneH,"Energy [GeV]","Entries");
-
- fPhiH = new TH1D("fPhiH","Azimuthal angle of Jets",
- 60,0.,2.0*TMath::Pi());
- SetProperties(fPhiH,"#phi","Entries");
-
- // fragmentation
- fFragH = new TH1D("fFragH","Leading Jet Fragmentation (selected tracks)",
- 20,0.,1.);
- SetProperties(fFragH,"x=E_{i}/E_{JET}","1/N_{JET}dN_{ch}/dx");
-
- fFragrH = new TH1D("fFragrH","Leading Jet Fragmentation (rejected tracks)",
- 20,0.,1.);
- SetProperties(fFragrH,"x=E_{i}/E_{JET}","1/N_{JET}dN_{ch}/dx");
-
- // fragmentation log
- fFragLnH = new TH1D("fFragLnH","Leading Jet Fragmentation (selected tracks)",
- 20,0.,10);
- SetProperties(fFragLnH,"#xi=ln(E_{JET}/E_{i})","1/N_{JET}dN_{ch}/d#xi");
-
- fFragLnrH = new TH1D("fFragLnrH",
- "Leading Jet Fragmentation (rejected tracks)",
- 20,0.,10);
- SetProperties(fFragLnrH,"#xi=ln(E_{JET}/E_{i})","1/N_{JET}dN_{ch}/d#xi");
-
- // jet shape
- fShapeH = new TH1D("fShapeH","Leading Jet Shape (selected tracks)",
- 20,0.,1.);
- SetProperties(fShapeH,"r","1/N_{JET}#Sigma P_{T}(0,r)/P_{T}(0,R)");
-
- fShaperH = new TH1D("fShaperH","Leading Jet Shape (rejected tracks)",
- 20,0.,1.);
- SetProperties(fShaperH,"r","1/N_{JET}#Sigma P_{T}(0,r)/P_{T}(0,R)");
-}
-
-////////////////////////////////////////////////////////////////////////
-
-AliJetControlPlots::~AliJetControlPlots()
-{
- // Destructor
- delete fNJetsH;
- delete fMultH;
- delete fPtH;
- delete fEtaH;
- delete fEneH;
- delete fPhiH;
- delete fInJetH;
- delete fFragH;
- delete fFragLnH;
- delete fFragrH;
- delete fFragLnrH;
- delete fShapeH;
- delete fShaperH;
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJetControlPlots::FillHistos(AliJet *j)
-{
- // Fills the histograms
- Int_t nj = j->GetNJets();
- fNJetsH->Fill(nj,1);
- if (nj == 0) return;
-
- // kinematics, occupancy and multiplicities
- TArrayI mj = j->GetMultiplicities();
- Int_t mjTot=0;
- for (Int_t i=0;i<nj;i++) {
- mjTot+=mj[i];
- fMultH->Fill(mj[i],1);
- fPtH->Fill(j->GetPt(i),1);
- fEtaH->Fill(j->GetEta(i),1);
- fEneH->Fill(j->GetE(i),1);
- fPhiH->Fill(j->GetPhi(i),1);
- }
- fInJetH->Fill(((Double_t) mjTot)/((Double_t) j->GetNinput()),1);
-
- // fragmentation of leading jet
- TArrayI inJet = j->GetInJet();
- TArrayF etain = j->GetEtaIn();
- TArrayF ptin = j->GetPtIn();
- for(Int_t i=0;i<(inJet.GetSize());i++) {
- Float_t t1 = TMath::Tan(2.0*TMath::ATan(TMath::Exp(-etain[i])));
- Float_t ene = ptin[i]*TMath::Sqrt(1.+1./(t1*t1));
- if (inJet[i] == 1) {
- fFragH->Fill((Float_t) ene/(j->GetE(0)),1);
- fFragLnH->Fill((Float_t) TMath::Log((j->GetE(0))/ene),1);
- }
- if (inJet[i] == -1) {
- fFragrH->Fill((Float_t) ene/(j->GetE(0)),1);
- fFragLnrH->Fill((Float_t) TMath::Log((j->GetE(0))/ene),1);
- }
- }
-
- // shape of leading jet
- // * CAREFUL: depends on number of bins and bin sizes
- // of shape histo. HARDWIRED at the moment *
- // Plot against dr NOT dr/R_jet!!!
- TArrayF phiin = j->GetPhiIn();
- Float_t rptS[20], rptR[20];
- for(Int_t i=0;i<20;i++) rptS[i]=rptR[i]=0.0;
-
- for(Int_t i=0;i<inJet.GetSize();i++) {
- if (inJet[i] == 1 || inJet[i] == -1) {
- Float_t deta = etain[i] - j->GetEta(0);
- Float_t dphi = phiin[i] - j->GetPhi(0);
- if (dphi < -TMath::Pi()) dphi= -dphi - 2.0 * TMath::Pi();
- if (dphi > TMath::Pi()) dphi = 2.0 * TMath::Pi() - dphi;
- Float_t dr = TMath::Sqrt(deta * deta + dphi * dphi);
- if (dr>1) continue;
- Int_t bin = (Int_t) TMath::Floor(dr/0.05);
- if (inJet[i] == 1) rptS[bin]+=ptin[i]/(j->GetPt(0));
- if (inJet[i] == -1) rptR[bin]+=ptin[i]/(j->GetPt(0));
- }
- }
-
- Float_t ptS,ptR,r;
- ptS=ptR=0.0;
- for (Int_t i=0;i<20;i++) {
- ptS+=rptS[i];
- ptR+=rptR[i];
- r=(i+1)*0.05-0.025;
- fShapeH->Fill(r,ptS);
- fShaperH->Fill(r,ptR);
- }
- fNJetT++;
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJetControlPlots::Normalize()
-{
-// *CAREFUL: depends on histogram number of bins
- if (fNJetT == 0) return;
- fFragH->Scale(20.0/((Double_t) fNJetT));
- fFragLnH->Scale(2.0/((Double_t) fNJetT));
- fFragrH->Scale(20.0/((Double_t) fNJetT));
- fFragLnrH->Scale(2.0/((Double_t) fNJetT));
- fShapeH->Scale(1.0/((Double_t) fNJetT));
- fShaperH->Scale(1.0/((Double_t) fNJetT));
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJetControlPlots::PlotHistos()
-{
- // style
- gStyle->SetOptStat(kFALSE);
- gStyle->SetOptTitle(kFALSE);
-
- TCanvas *c = new TCanvas("c","AliJetControlPlots",50,200,1200,700);
- c->Divide(4,3);
- c->cd(1); fNJetsH->Draw("e1");
- c->cd(2); fMultH->Draw("e1");
- c->cd(3); fInJetH->Draw("e1");
- c->cd(4); fPtH->Draw("e1");
- c->cd(5); fEtaH->Draw("e1");
- c->cd(6); fPhiH->Draw("e1");
- c->cd(7); fEneH->Draw("e1");
- c->cd(8); fFragLnH->Draw("e1");
- c->cd(9); fFragLnrH->Draw("e1");
- c->cd(10); fShapeH->Draw("e1");
- c->cd(11); fShaperH->Draw("e1");
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliJetControlPlots::SetProperties(TH1* h,const char* x, const char* y) const
-{
-// Sets the histogram style properties
- h->SetMarkerStyle(20);
- h->SetMarkerSize(.5);
- h->SetMarkerColor(2);
- h->SetXTitle(x);
- h->SetYTitle(y);
- // h->Sumw2();
-}
-
-
+++ /dev/null
-#ifndef ALIJETCONTROLPLOTS_H
-#define ALIJETCONTROLPLOTS_H
-
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
-
-
-//---------------------------------------------------------------------
-// Jet Control Plots class
-// manages histograms with control plots of jet searching
-// Author: jgcn@mda.cinvestav.mx
-//---------------------------------------------------------------------
-
-
-#include <TObject.h>
-
-class TFile;
-class TClonesArray;
-class TH1I;
-class TH1D;
-class TH1F;
-class TH1;
-
-class AliJetReader;
-class AliJet;
-
-class AliJetControlPlots : public TObject
-{
- public:
- AliJetControlPlots();
- ~AliJetControlPlots();
-
- // setter
- // getters
- TH1I *GetNJetsH() const {return fNJetsH;}
- TH1I *GetMultH() const {return fMultH;}
- TH1D *GetPhiH() const {return fPhiH;}
- TH1D *GetFractionInJetH() const {return fInJetH;}
- TH1D *GetEneH() const {return fEneH;}
- TH1D *GetPtH() const {return fPtH;}
- TH1D *GetEtaH() const {return fEtaH;}
- TH1D *GetFragH() const {return fFragH;}
- TH1D *GetFragLnH() const {return fFragLnH;}
- TH1D *GetFragrH() const {return fFragrH;}
- TH1D *GetFragLnrH() const {return fFragLnrH;}
- TH1D *GetShapeH() const {return fShapeH;}
- TH1D *GetShaperH() const {return fShaperH;}
-
- // others
- void FillHistos(AliJet *j);
- void PlotHistos();
- void SetProperties(TH1* h,const char* x, const char* y) const;
- void Normalize();
-
- protected:
- AliJetControlPlots(const AliJetControlPlots& rControlPlots);
- AliJetControlPlots& operator = (const AliJetControlPlots& rcp);
-
- TH1I *fNJetsH; // distribution of number of jets
- TH1I *fMultH; // jet multiplicity
- TH1D *fPtH; // pt spectra
- TH1D *fEtaH; // eta distribution
- TH1D *fEneH; // energy distribution
- TH1D *fFragH; // leading jet fragmentation (selected part)
- TH1D *fFragLnH; // leading jet fragmentation in ln scale
- TH1D *fFragrH; // leading jet fragmentation (rejected part)
- TH1D *fFragLnrH; // leading jet fragmentation in ln scale
- TH1D *fShapeH; // leading jet shape (selected part)
- TH1D *fShaperH; // leading jet shape (rejected part)
- TH1D *fPhiH; // phi distribution
- TH1D *fInJetH; // percentage of input particles in a jet
- Int_t fNJetT; // total number of jets for normalization
-
- ClassDef(AliJetControlPlots,1)
-};
-
-#endif
-
+++ /dev/null
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Author: The ALICE Off-line Project. *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-//---------------------------------------------------------------------
-// JetDistributions class
-// Get different basic distributions
-// Authors: mercedes.lopez.noriega@cern.ch
-//---------------------------------------------------------------------
-
-#include "AliJetDistributions.h"
-ClassImp(AliJetDistributions)
-
-////////////////////////////////////////////////////////////////////////
-// includes
-#include <Riostream.h>
-#include <TH1F.h>
-#include <TH2F.h>
-#include <TFile.h>
-#include <TTree.h>
-#include <TMath.h>
-
-#include "AliJetProductionDataPDC2004.h"
-#include "AliJet.h"
-#include "AliJetReaderHeader.h"
-#include "AliLeading.h"
-
-////////////////////////////////////////////////////////////////////////
-// constructor/destructor
-
-AliJetDistributions::AliJetDistributions():
- fReaderHeader(0x0),
- fDirectory(0x0),
- fFile("jets.root"),
- fEventMin(0),
- fEventMax(-1),
- fRunMin(0),
- fRunMax(11),
- fPercentage(-1.0),
- fPartPtCut(0.0),
- fPythia(kFALSE),
- fDoPart(kTRUE),
- fDoGenJ(kTRUE),
- fDoRecJ(kTRUE),
- fPart(0),
- fGenJ(0),
- fRecJ(0),
- fRetaH(0),
- fRphiH(0),
- fRptH(0),
- fRetaphiH(0),
- fMultH(0)
-{
- // Default constructor
- SetReaderHeader();
-
-}
-
-////////////////////////////////////////////////////////////////////////
-// define histogrames
-
-void AliJetDistributions::DefineHistograms()
-{
- // Define histograms to be used
- fRetaH = new TH1F("fRetaH","Reconstructed eta",140,-1.2,1.2);
- SetProperties(fRetaH,"#eta","entries");
- fRphiH = new TH1F("fRphiH","Reconstructed phi",18,0,2.0*TMath::Pi());
- SetProperties(fRphiH,"#phi","entries");
- fRptH = new TH1F("fRptH","Reconstructed pt",150,0,150);
- SetProperties(fRptH,"p_{T} (GeV/c)","entries");
-
- fRetaphiH = new TH2F("fRetaphiH","Reconstructed eta vs. phi",140,-1.2,1.2,18,0.,2.0*TMath::Pi());
- SetProperties(fRetaphiH,"#eta","#phi");
-
- fMultH = new TH1F("fMultH","Reconstructed Multiplicity",1000,0,10000);
- SetProperties(fMultH,"Multiplicity","entries");
-}
-
-void AliJetDistributions::SetProperties(TH1* h,const char* x, const char* y) const
-{
- // Properties of histograms (x title, y title and error propagation)
- h->SetXTitle(x);
- h->SetYTitle(y);
- h->Sumw2();
-}
-
-////////////////////////////////////////////////////////////////////////
-// fill histogrames
-
-void AliJetDistributions::FillHistograms()
-{
- // Run data
- AliJetProductionDataPDC2004* runData = new AliJetProductionDataPDC2004();
-
- // Loop over runs
- TFile* jFile = 0x0;
- for (Int_t iRun = fRunMin; iRun <= fRunMax; iRun++) {
- char fn[20];
- sprintf(fn,"%s/%s.root",fDirectory,(runData->GetRunTitle(iRun)).Data());
- jFile = new TFile(fn);
- printf(" Analyzing run: %d %s\n", iRun,fn);
-
- // Get reader header and events to be looped over
- AliJetReaderHeader *jReaderH = (AliJetReaderHeader*)(jFile->Get(fReaderHeader));
- if (fEventMin == -1) fEventMin = jReaderH->GetFirstEvent();
- if (fEventMax == -1) {
- fEventMax = jReaderH->GetLastEvent();
- } else {
- fEventMax = TMath::Min(fEventMax, jReaderH->GetLastEvent());
- }
-
- //AliUA1JetHeader *jH = (AliUA1JetHeader *) (jFile->Get("AliUA1JetHeader"));
- //jH->PrintParameters();
-
-
- // Loop over events
- for (Int_t i = fEventMin; i < fEventMax; i++) {
- //printf(" Analyzing run: %d Event %d / %d \n",iRun, i, fEventMax);
-
- // Get next tree with AliJet
- char nameT[100];
- sprintf(nameT, "TreeJ%d",i);
- TTree *jetT =(TTree *)(jFile->Get(nameT));
- if (fDoRecJ) jetT->SetBranchAddress("FoundJet", &fRecJ);
- if (fDoGenJ) jetT->SetBranchAddress("GenJet", &fGenJ);
- if (fDoPart) jetT->SetBranchAddress("LeadingPart", &fPart);
-
- jetT->GetEntry(0);
-
- FillDistributions(fRecJ);
-
- delete jetT;
- } // end loop over events in one file
- if (jFile) jFile->Close();
- delete jFile;
- } // end loop over files
-}
-
-void AliJetDistributions::FillDistributions(AliJet *j)
-{
- // Fill histrograms
- TArrayI inJet = j->GetInJet();
- TArrayF etain = j->GetEtaIn();
- TArrayF ptin = j->GetPtIn();
- TArrayF phiin = j->GetPhiIn();
-
- fMultH->Fill(inJet.GetSize(),1);
- for(Int_t i=0;i<inJet.GetSize();i++) {
- fRetaH->Fill(etain[i],1);
- fRphiH->Fill(phiin[i],1);
- fRptH->Fill(ptin[i],1);
- fRetaphiH->Fill(etain[i],phiin[i],1);
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-// Plot histogrames
-
-void AliJetDistributions::PlotHistograms()
-{
- // improved!
- fMultH->Draw();
- fRetaH->Draw();
- fRphiH->Draw();
- fRetaphiH->Draw();
- fRptH->Draw();
-
-}
-
-
-////////////////////////////////////////////////////////////////////////
-// Save histogrames
-
-void AliJetDistributions::SaveHistograms()
-{
- // Save histogramas
- TFile *fOut = new TFile(fFile,"recreate");
- fOut->cd();
- fMultH->Write();
- fRetaphiH->Write();
- fRetaH->Write();
- fRphiH->Write();
- fRptH->Write();
- fOut->Close();
-}
-
-// main Analysis function
-
-void AliJetDistributions::Analyze()
-{
- // Do the analysis
- DefineHistograms();
- FillHistograms();
- PlotHistograms();
- SaveHistograms();
-}
-
-
+++ /dev/null
-#ifndef ALIJETDISTRIBUTIONS_H
-#define ALIJETDISTRIBUTIONS_H
-
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
-//---------------------------------------------------------------------
-// JetDistributions class
-// Get different basic distributions
-// Author: mercedes.lopez.noriega@cern.ch
-//---------------------------------------------------------------------
-
-#include <TObject.h>
-class AliLeading;
-class AliJet;
-class TH1;
-class TH1F;
-class TH2F;
-class TProfile;
-class TLorentzVector;
-
-class AliJetDistributions : public TObject
-{
- public:
-
- AliJetDistributions();
- ~AliJetDistributions(){;}
-
- void Analyze();
- void DefineHistograms();
- void FillHistograms();
- void FillDistributions(AliJet *j);
- void PlotHistograms();
- void SaveHistograms();
-
- // Setter
- void SetDirectory(const char* directory) {fDirectory = directory;}
- void SetOutputFile(const char* file) {fFile = file;}
- void SetPercentage(Float_t p) { fPercentage = p;}
- void SetEventRange(Int_t imin, Int_t imax) {fEventMin = imin; fEventMax = imax;}
- void SetRunRange(Int_t imin, Int_t imax) {fRunMin = imin; fRunMax = imax;}
- void SetPythia(Bool_t f = kFALSE){fPythia = f;}
- void SetProperties(TH1* h,const char* x, const char* y) const;
- void SetReaderHeader(const char *s="AliJetKineReaderHeader") {fReaderHeader = s;}
- void SetPartPtCut(Float_t c) { fPartPtCut = c; }
-
- void SetDoLeadPart(Bool_t f = kTRUE) {fDoPart = f;}
- void SetDoGenJet(Bool_t f = kTRUE) {fDoGenJ = f;}
- void SetDoRecJet(Bool_t f = kTRUE) {fDoRecJ = f;}
-
- private:
- const char* fReaderHeader;// Reader header
- const char* fDirectory; // Directory
- const char* fFile ; // Output file name
- Int_t fEventMin; // Minimum event number
- Int_t fEventMax; // Maximum event number
- Int_t fRunMin; // Minimum run number
- Int_t fRunMax; // Maximum run number
- Float_t fPercentage; // percentage of pt from signal particles to accept a jet
- Float_t fPartPtCut; // cut in the pt of particles in histos
-
- // user options
- Bool_t fPythia; // if pythia events
- Bool_t fDoPart; // do analysis of leading particle
- Bool_t fDoGenJ; // do analysis of leading generated jet
- Bool_t fDoRecJ; // do analysis of leading rec jet
-
- // leading hets and particles
- AliLeading* fPart; // pointer to leading particle
- AliJet* fGenJ; // pointer to leading generated jet
- AliJet* fRecJ; // pointer to leading reconstructed jet
-
- // histos for reconstructed particles
- TH1F* fRetaH; // Eta of reconstructed particle
- TH1F* fRphiH; // Phi of reconstructed particle
- TH1F* fRptH; // Pt of reconstructed particle
- TH2F* fRetaphiH;// Eta vs Phi of reconstructed particles
-
- TH1F* fMultH; // Multiplicity
-
- protected:
- AliJetDistributions(const AliJetDistributions& rJetD);
- AliJetDistributions& operator = (const AliJetDistributions& rhsd);
-
- ClassDef(AliJetDistributions,1)
-};
-
-#endif
+++ /dev/null
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
- * Author: The ALICE Off-line Project. *
- * Contributors are mentioned in the code where appropriate. *
- * *
- * Permission to use, copy, modify and distribute this software and its *
- * documentation strictly for non-commercial purposes is hereby granted *
- * without fee, provided that the above copyright notice appears in all *
- * copies and that both the copyright notice and this permission notice *
- * appear in the supporting documentation. The authors make no claims *
- * about the suitability of this software for any purpose. It is *
- * provided "as is" without express or implied warranty. *
- **************************************************************************/
-
-//---------------------------------------------------------------------
-// Class to find and store the leading particle in event and
-// store its correlation to associated particles
-// Author: jgcn@mda.cinvestav.mx
-//---------------------------------------------------------------------
-
-#include <Riostream.h>
-#include <TMath.h>
-#include <TClonesArray.h>
-#include <TLorentzVector.h>
-
-#include "AliLeading.h"
-#include "AliJetReader.h"
-#include "AliJetReaderHeader.h"
-
-ClassImp(AliLeading)
-
-////////////////////////////////////////////////////////////////////////
-
-AliLeading::AliLeading():
- fNassoc(0),
- fLeading(0),
- fCorr(0),
- fnBin(45),
- fLow(-TMath::Pi()/2.0),
- fFound(kFALSE)
-{
- // Constructor
- fLeading = new TLorentzVector(0.,0.,0.,0.);
- fCorr = TArrayI(fnBin);
-}
-
-////////////////////////////////////////////////////////////////////////
-
-AliLeading::~AliLeading()
-{
- // Destructor
- delete fLeading;
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliLeading::FindLeading(AliJetReader *reader)
-{
- // find leading particle in the array of lorentz vectors
- // lvArray and fill the correlation histogram
-
- AliJetReaderHeader* header = reader->GetReaderHeader();
-
- TClonesArray* lvArray = reader->GetMomentumArray();
- Int_t nIn = lvArray->GetEntries();
-
- // find max
- Double_t ptMax = 0.0;
- Int_t idxMax = -1;
- for (Int_t i = 0; i < nIn; i++){
- TLorentzVector *lv = (TLorentzVector*) lvArray->At(i);
- if ((reader->GetCutFlag(i) == 1) &&
- lv->Pt() > ptMax &&
- lv->Eta() > header->GetFiducialEtaMin() &&
- lv->Eta() < header->GetFiducialEtaMax()){
- ptMax = lv->Pt();
- idxMax = i;
- }
- }
-
- if (idxMax == -1) {
- fFound = kFALSE;
- Reset();
- return;
- }
-
- // fill correlation array
- *fLeading = *((TLorentzVector*) lvArray->At(idxMax));
- fFound = kTRUE;
-
- fNassoc = 0;
- for (Int_t i = 0; i < nIn; i++) {
- if (i == idxMax) continue;
- TLorentzVector *lv = (TLorentzVector*) lvArray->At(i);
- if ( (reader->GetCutFlag(i) == 1) &&
- lv->Eta() > header->GetFiducialEtaMin() &&
- lv->Eta() < header->GetFiducialEtaMax()) {
- Double_t dphi = fLeading->DeltaPhi(*lv);
- if (dphi < fLow) dphi = 2.0 * TMath::Pi() + dphi;
- // find bin and fill array
- Int_t iBin = (Int_t)
- TMath::Floor((dphi - fLow)
- *((Double_t) fnBin) / (2.0 * TMath::Pi()));
- fCorr.AddAt(fCorr.At(iBin)+1,iBin);
- fNassoc++;
- }
- }
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliLeading::Reset()
-
-{
-// Reset leading particle information
- fLeading->SetPxPyPzE(0., 0., 0., 0.);
- fNassoc=0;
- fCorr.Reset();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-void AliLeading::PrintLeading()
-{
-// Print leading particle information
- if (fNassoc<0) {
- cout << " No leading particle in this event" << endl;
- return;
- }
- cout << " Leading particle: " << endl;
- cout << " (px,py,pz,e) = (" << fLeading->Px() << ","
- << fLeading->Py() << "," << fLeading->Pz() << ","
- << fLeading->E() << ")" << endl;
- cout << " (pt,eta,phi) = (" << fLeading->Pt() << ","
- << fLeading->Eta() << "," << fLeading->Phi() << ")" << endl;
- cout << " " << fNassoc << " associated particles." << endl;
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliLeading::GetE()
-{
- return fLeading->E();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliLeading::GetPt()
-{
- return fLeading->Pt();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliLeading::GetEta()
-{
- return fLeading->Eta();
-}
-
-////////////////////////////////////////////////////////////////////////
-
-Double_t AliLeading::GetPhi()
-{
- // get phi of leading
- return ( (fLeading->Phi() < 0) ?
- (fLeading->Phi()) + 2. * TMath::Pi() :
- fLeading->Phi());
-}
-
+++ /dev/null
-#ifndef ALILEADING_H
-#define ALILEADING_H
-
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice */
-
-/* $Id$ */
-
-//---------------------------------------------------------------------
-// Class to find and store the leading particle in event and
-// store its correlation to associated particles
-// Author: jgcn@mda.cinvestav.mx
-//---------------------------------------------------------------------
-
-#include <TObject.h>
-#include <TArrayI.h>
-
-class TLorentzVector;
-class AliJetReader;
-
-class AliLeading : public TObject
-{
- public:
-
- AliLeading();
- ~AliLeading();
-
- // Getters
- Int_t GetNassoc() const {return fNassoc;}
- TLorentzVector* GetLeading() const {return fLeading;}
- TArrayI GetCorr() const {return fCorr;}
- Bool_t LeadingFound() const {return fFound;}
- Double_t GetE();
- Double_t GetPt();
- Double_t GetEta();
- Double_t GetPhi();
-
- // Setters
- // Others
- void FindLeading(AliJetReader* reader);
- void PrintLeading();
- void Reset();
-
- protected:
-
- AliLeading(const AliLeading& rLeading);
- AliLeading& operator = (const AliLeading& rl);
-
- Int_t fNassoc; // number of associated particles
- TLorentzVector* fLeading; // leading particle
- TArrayI fCorr; // array to store azimuthal correlation
- // between leading and assoc particles
- Int_t fnBin; // number of bins in array
- Double_t fLow; // value corresponding to lower bound of bin 0
- Bool_t fFound; // leading found
-
- ClassDef(AliLeading,1);
-};
-
-#endif
#pragma link off all classes;
#pragma link off all functions;
-#pragma link C++ class AliJet+;
#pragma link C++ class AliJetHeader+;
#pragma link C++ class AliUA1JetHeader+;
#pragma link C++ class AliJetFinder+;
#pragma link C++ class AliJetESDReaderHeader+;
#pragma link C++ class AliJetReader+;
#pragma link C++ class AliJetESDReader+;
-#pragma link C++ class AliJetControlPlots+;
-#pragma link C++ class AliLeading+;
#pragma link C++ class AliJetProductionData+;
#pragma link C++ class AliJetProductionDataPDC2004+;
-#pragma link C++ class AliJetAnalysis+;
-#pragma link C++ class AliJetDistributions+;
#pragma link C++ class AliUA1JetFinderV1+;
#pragma link C++ class AliUA1JetFinderV2+;
#pragma link C++ class AliUA1JetHeaderV1+;
#-*-Mode: Makefile-*-
-SRCS = AliJet.cxx AliJetHeader.cxx \
+SRCS = AliJetHeader.cxx \
AliJetFinder.cxx AliJetReaderHeader.cxx \
AliJetESDReaderHeader.cxx AliJetReader.cxx AliJetESDReader.cxx \
- AliJetControlPlots.cxx AliUA1JetHeader.cxx \
- AliLeading.cxx \
+ AliUA1JetHeader.cxx \
AliJetProductionData.cxx AliJetProductionDataPDC2004.cxx \
- AliJetAnalysis.cxx AliJetDistributions.cxx \
AliUA1JetFinderV1.cxx AliUA1JetFinderV2.cxx AliUA1JetHeaderV1.cxx \
AliCdfJetFinder.cxx AliCdfJetHeader.cxx \
AliJetGrid.cxx AliJetUnitArray.cxx AliJetHadronCorrection.cxx \