X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGJE%2FAliAnalysisTaskJetResponseV2.cxx;h=97165fe015920c76be72dc16d33cbb4dc2dfa20b;hb=0dc0101f3c558965ccbca1509e1f18532d3ad7d6;hp=d9f5dbf5d9bd412a5855f37b00e93adc3c56e6eb;hpb=692c4f057454667e31c885e798857553d67e5d04;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGJE/AliAnalysisTaskJetResponseV2.cxx b/PWGJE/AliAnalysisTaskJetResponseV2.cxx index d9f5dbf5d9b..97165fe0159 100644 --- a/PWGJE/AliAnalysisTaskJetResponseV2.cxx +++ b/PWGJE/AliAnalysisTaskJetResponseV2.cxx @@ -1,7 +1,29 @@ +/************************************************************************** + * 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. * + **************************************************************************/ + +// +// task compares jets in two branches, +// written for analysis of jet embedding in HI events +// + + #include "TChain.h" #include "TTree.h" #include "TMath.h" #include "TH1F.h" +#include "TH1I.h" #include "TH2F.h" #include "TH3F.h" #include "THnSparse.h" @@ -26,6 +48,9 @@ #include "AliAnalysisTaskJetResponseV2.h" +using std::cout; +using std::endl; + ClassImp(AliAnalysisTaskJetResponseV2) AliAnalysisTaskJetResponseV2::AliAnalysisTaskJetResponseV2() : @@ -716,6 +741,7 @@ void AliAnalysisTaskJetResponseV2::Terminate(const Option_t *) Int_t AliAnalysisTaskJetResponseV2::GetNInputTracks() { + // number of tracks in the event, obtained via jet finder Int_t nInputTracks = 0; @@ -751,6 +777,8 @@ Int_t AliAnalysisTaskJetResponseV2::GetNInputTracks() THnSparse* AliAnalysisTaskJetResponseV2::NewTHnSparseF(const char* name, UInt_t entries, UInt_t opt) { + // generate new THnSparseF, axes are defined in GetDimParams() + Int_t count = 0; UInt_t tmp = entries; while(tmp!=0){ @@ -784,6 +812,7 @@ THnSparse* AliAnalysisTaskJetResponseV2::NewTHnSparseF(const char* name, UInt_t void AliAnalysisTaskJetResponseV2::GetDimParams(Int_t iEntry, Bool_t hr, TString &label, Int_t &nbins, Double_t &xmin, Double_t &xmax) { + // stores label and binning of axis for THnSparse const Double_t pi = TMath::Pi(); @@ -1064,6 +1093,8 @@ void AliAnalysisTaskJetResponseV2::GetDimParams(Int_t iEntry, Bool_t hr, TString //____________________________________________________________________________ Int_t AliAnalysisTaskJetResponseV2::GetPtHardBin(Double_t ptHard){ + // returns pt hard bin (for LHC10e14, LHC11a1x, LHC11a2x simulations) + const Int_t nBins = 10; Double_t binLimits[nBins] = { 5., 11., 21., 36., 57., 84., 117., 156., 200., 249. }; // lower limits @@ -1078,6 +1109,8 @@ Int_t AliAnalysisTaskJetResponseV2::GetPtHardBin(Double_t ptHard){ //____________________________________________________________________________ Double_t AliAnalysisTaskJetResponseV2::GetPt(AliAODJet *j, Int_t mode=0){ + // returns jet pt, also negative pt after background subtraction if available + Double_t pt = 0.; if(fKeepJets && mode==1){ // background subtracted pt, can be negative