X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=PWG4%2FJetTasks%2FAliAnalysisTaskFragmentationFunction.h;h=9b429323721c9f2b918deee399967548306bb922;hp=85273cf0dc00cadb09e8f547ebfb2a9061cfa216;hb=65b4c2652196d171acd7418c081179d02d3d2529;hpb=7d9e8b32c5e5a430718e519b60dfc9e4ade7256c diff --git a/PWG4/JetTasks/AliAnalysisTaskFragmentationFunction.h b/PWG4/JetTasks/AliAnalysisTaskFragmentationFunction.h index 85273cf0dc0..9b429323721 100644 --- a/PWG4/JetTasks/AliAnalysisTaskFragmentationFunction.h +++ b/PWG4/JetTasks/AliAnalysisTaskFragmentationFunction.h @@ -15,8 +15,9 @@ class AliAODEvent; class TList; class TH1F; class TH2F; +class TProfile; +class THnSparse; -#include "THnSparse.h" #include "AliAnalysisTaskSE.h" class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { @@ -62,7 +63,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { TH2F* fh2Z; //! FF: z TH1F* fh1JetPt; //! jet pt - TString fName; // histo names prefix + TString fNameFF; // histo names prefix ClassDef(AliFragFuncHistos, 1); }; @@ -99,7 +100,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { TH2F* fh2EtaPhi; //! jet phi vs eta TH1F* fh1Pt; //! jet transverse momentum - TString fName; // histo names prefix + TString fNameQAJ; // histo names prefix ClassDef(AliFragFuncQAJetHistos, 1); }; @@ -141,7 +142,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { TH1F* fh1Pt; //! track transverse momentum TH2F* fh2HighPtEtaPhi; //! phi vs eta for high pt (>fgHighPtThreshold) tracks - TString fName; // histo names prefix + TString fNameQAT; // histo names prefix ClassDef(AliFragFuncQATrackHistos, 1); }; @@ -164,7 +165,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { virtual ~AliFragFuncIntraJetHistos(); virtual void DefineHistos(); - virtual void FillIntraJet(TLorentzVector* trackV, TLorentzVector* jetV); + virtual void FillIntraJet(const TLorentzVector* trackV, const TLorentzVector* jetV); virtual void AddToOutput(TList* list) const; private: @@ -196,7 +197,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { THnSparseF* fhnIntraJet; //! IntraJet Int_t fnDim; // HnSparseF dimensions - TString fName; // histo names prefix + TString fNameIJ; // histo names prefix ClassDef(AliFragFuncIntraJetHistos, 1); }; @@ -223,7 +224,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { private: - Int_t fKindSlices; + Int_t fKindSlices; // DJ kind of slices Int_t fNBinsJetInvMass; // FF histos bins Float_t fJetInvMassMin; // FF histos limits Float_t fJetInvMassMax; // FF histos limits @@ -256,7 +257,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { TH2F* fh2Pt2; //! FF dijet : z of jet 2 TH2F* fh2Pt; //! FF dijet : z of jet 1 and 2 - TString fName; // histo names prefix + TString fNameDJ; // histo names prefix ClassDef(AliFragFuncDiJetHistos, 1); }; @@ -281,7 +282,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { private: - Int_t fKindSlices; + Int_t fKindSlices; // DJ kind of slices Int_t fNBinsJetInvMass; // FF histos bins in jet invariant mass Float_t fJetInvMassMin; // FF histos limits in jet invariant mass Float_t fJetInvMassMax; // FF histos limits in jet invariant mass @@ -303,7 +304,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { TH2F* fh2DeltaEta; // FF dijet delta eta histos TH2F* fh2DeltaPt; // FF dijet delta pt histos - TString fName; // histo names prefix + TString fNameQADJ; // histo names prefix ClassDef(AliFragFuncQADiJetHistos, 1); }; @@ -319,6 +320,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { virtual void LocalInit() {Init();} virtual void UserExec(Option_t *option); virtual void Terminate(Option_t* ); + virtual Bool_t Notify(); virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;} virtual void SetJetTypeGen(Int_t i){fJetTypeGen = i;} @@ -332,6 +334,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { {fTrackPtCut = trackPt; fTrackEtaMin = trackEtaMin; fTrackEtaMax = trackEtaMax; fTrackPhiMin = trackPhiMin; fTrackPhiMax = trackPhiMax;} virtual void SetFilterMask(UInt_t i) {fFilterMask = i;} + virtual void UsePhysicsSelection(Bool_t b) {fUsePhysicsSelection = b;} virtual void SetJetCuts(Float_t jetPt = 5., Float_t jetEtaMin = -0.5, Float_t jetEtaMax = 0.5, Float_t jetPhiMin = 0., Float_t jetPhiMax = 2*TMath::Pi()) {fJetPtCut = jetPt; fJetEtaMin = jetEtaMin; fJetEtaMax = jetEtaMax; @@ -351,8 +354,8 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { void SetHighPtThreshold(Float_t pt = 5.) { fQATrackHighPtThreshold = pt; } - void SetFFHistoBins(Int_t nJetPt = 55, Float_t jetPtMin = 5, Float_t jetPtMax = 60, - Int_t nPt = 70, Float_t ptMin = 0., Float_t ptMax = 70., + void SetFFHistoBins(Int_t nJetPt = 245, Float_t jetPtMin = 5, Float_t jetPtMax = 250, + Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200., Int_t nXi = 70, Float_t xiMin = 0., Float_t xiMax = 7., Int_t nZ = 22, Float_t zMin = 0., Float_t zMax = 1.1) { fFFNBinsJetPt = nJetPt; fFFJetPtMin = jetPtMin; fFFJetPtMax = jetPtMax; @@ -360,87 +363,71 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { fFFNBinsXi = nXi; fFFXiMin = xiMin; fFFXiMax = xiMax; fFFNBinsZ = nZ; fFFZMin = zMin; fFFZMax = zMax; } - void SetQAJetHistoBins(Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200., + void SetQAJetHistoBins(Int_t nPt = 300, Float_t ptMin = 0., Float_t ptMax = 300., Int_t nEta = 20, Float_t etaMin = -1.0, Float_t etaMax = 1.0, Int_t nPhi = 60, Float_t phiMin = 0., Float_t phiMax = 2*TMath::Pi()) { fQAJetNBinsPt = nPt; fQAJetPtMin = ptMin; fQAJetPtMax = ptMax; fQAJetNBinsEta = nEta; fQAJetEtaMin = etaMin; fQAJetEtaMax = etaMax; fQAJetNBinsPhi = nPhi; fQAJetPhiMin = phiMin; fQAJetPhiMax = phiMax; } - void SetQATrackHistoBins(Int_t nPt = 70, Float_t ptMin = 0., Float_t ptMax = 70., + void SetQATrackHistoBins(Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200., Int_t nEta = 20, Float_t etaMin = -1.0, Float_t etaMax = 1.0, Int_t nPhi = 60, Float_t phiMin = 0., Float_t phiMax = 2*TMath::Pi()) { fQATrackNBinsPt = nPt; fQATrackPtMin = ptMin; fQATrackPtMax = ptMax; fQATrackNBinsEta = nEta; fQATrackEtaMin = etaMin; fQATrackEtaMax = etaMax; fQATrackNBinsPhi = nPhi; fQATrackPhiMin = phiMin; fQATrackPhiMax = phiMax; } - void SetIJHistoBins(Int_t nJetPt = 55, Float_t jetPtMin = 5, Float_t jetPtMax = 60, - Int_t nPt = 70, Float_t ptMin = 0., Float_t ptMax = 70., - Int_t nZ = 22, Float_t zMin = 0., Float_t zMax = 1.1, - Int_t nCosTheta = 100, Float_t costhetaMin = 0., Float_t costhetaMax = 1., - Int_t nTheta = 200, Float_t thetaMin = -0.5, Float_t thetaMax = 1.5, - Int_t nJt = 25, Float_t jtMin = 0., Float_t jtMax = 5.) - { fIJNBinsJetPt = nJetPt; fIJJetPtMin = jetPtMin; fIJJetPtMax = jetPtMax; - fIJNBinsPt = nPt; fIJPtMin = ptMin; fIJPtMax = ptMax; - fIJNBinsZ = nZ; fIJZMin = zMin; fIJZMax = zMax; - fIJNBinsCosTheta = nCosTheta; fIJCosThetaMin = costhetaMin; fIJCosThetaMax = costhetaMax; - fIJNBinsTheta = nTheta; fIJThetaMin = thetaMin; fIJThetaMax = thetaMax; - fIJNBinsJt = nJt; fIJJtMin = jtMin; fIJJtMax = jtMax; } - - void SetDiJetHistoBins(Int_t nJetInvMass = 55, Float_t jetInvMassMin = 5, Float_t jetInvMassMax = 60, - Int_t nJetPt = 55, Float_t jetPtMin = 5, Float_t jetPtMax = 60, - Int_t nPt = 70, Float_t ptMin = 0., Float_t ptMax = 70., - Int_t nXi = 70, Float_t xiMin = 0., Float_t xiMax = 7., - Int_t nZ = 22, Float_t zMin = 0., Float_t zMax = 1.1) + void SetIJHistoBins(Int_t nJetPt = 245, Float_t jetPtMin = 5, Float_t jetPtMax = 250, Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200., + Int_t nZ = 22, Float_t zMin = 0., Float_t zMax = 1.1, Int_t nCosTheta = 100, Float_t costhetaMin = 0., Float_t costhetaMax = 1., + Int_t nTheta = 200, Float_t thetaMin = -0.5, Float_t thetaMax = 1.5, Int_t nJt = 25, Float_t jtMin = 0., Float_t jtMax = 5.) + { fIJNBinsJetPt = nJetPt; fIJJetPtMin = jetPtMin; fIJJetPtMax = jetPtMax; fIJNBinsPt = nPt; fIJPtMin = ptMin; fIJPtMax = ptMax; + fIJNBinsZ = nZ; fIJZMin = zMin; fIJZMax = zMax;fIJNBinsCosTheta = nCosTheta; fIJCosThetaMin = costhetaMin; fIJCosThetaMax = costhetaMax; + fIJNBinsTheta = nTheta; fIJThetaMin = thetaMin; fIJThetaMax = thetaMax; fIJNBinsJt = nJt; fIJJtMin = jtMin; fIJJtMax = jtMax; } + + void SetDiJetHistoBins(Int_t nJetInvMass = 245, Float_t jetInvMassMin = 5, Float_t jetInvMassMax = 250, Int_t nJetPt = 245, Float_t jetPtMin = 5, + Float_t jetPtMax = 250, Int_t nPt = 200, Float_t ptMin = 0., Float_t ptMax = 200., Int_t nXi = 70, Float_t xiMin = 0., + Float_t xiMax = 7., Int_t nZ = 22, Float_t zMin = 0., Float_t zMax = 1.1) { - fDiJetNBinsJetInvMass = nJetInvMass; fDiJetJetInvMassMin = jetInvMassMin; fDiJetJetInvMassMax = jetInvMassMax; - fDiJetNBinsJetPt = nJetPt; fDiJetJetPtMin = jetPtMin; fDiJetJetPtMax = jetPtMax; - fDiJetNBinsPt = nPt; fDiJetPtMin = ptMin; fDiJetPtMax = ptMax; - fDiJetNBinsXi = nXi; fDiJetXiMin = xiMin; fDiJetXiMax = xiMax; - fDiJetNBinsZ = nZ; fDiJetZMin = zMin; fDiJetZMax = zMax; + fDiJetNBinsJetInvMass = nJetInvMass; fDiJetJetInvMassMin = jetInvMassMin; fDiJetJetInvMassMax = jetInvMassMax; fDiJetNBinsJetPt = nJetPt; fDiJetJetPtMin = jetPtMin; + fDiJetJetPtMax = jetPtMax; fDiJetNBinsPt = nPt; fDiJetPtMin = ptMin; fDiJetPtMax = ptMax; fDiJetNBinsXi = nXi; fDiJetXiMin = xiMin; + fDiJetXiMax = xiMax; fDiJetNBinsZ = nZ; fDiJetZMin = zMin; fDiJetZMax = zMax; } - void SetQADiJetHistoBins(Int_t nInvMass = 55, Float_t invMassMin = 5., Float_t invMassMax = 60., - Int_t nJetPt = 55, Float_t jetPtMin = 5, Float_t jetPtMax = 60, - Int_t nDeltaPhi = 100, Float_t deltaPhiMin = 0., Float_t deltaPhiMax = TMath::Pi(), - Int_t nDeltaEta = 22, Float_t deltaEtaMin = 0., Float_t deltaEtaMax = 1.1, - Int_t nDeltaPt = 100, Float_t deltaPtMin = 0., Float_t deltaPtMax = 100.) + void SetQADiJetHistoBins(Int_t nInvMass = 245, Float_t invMassMin = 5., Float_t invMassMax = 250., Int_t nJetPt = 245, Float_t jetPtMin = 5, Float_t jetPtMax = 250, + Int_t nDeltaPhi = 100, Float_t deltaPhiMin = 0., Float_t deltaPhiMax = TMath::Pi(), Int_t nDeltaEta = 22, Float_t deltaEtaMin = 0., + Float_t deltaEtaMax = 1.1, Int_t nDeltaPt = 100, Float_t deltaPtMin = 0., Float_t deltaPtMax = 100.) { - fQADiJetNBinsInvMass = nInvMass; fQADiJetInvMassMin = invMassMin; fQADiJetInvMassMax = invMassMax; - fQADiJetNBinsJetPt = nJetPt; fQADiJetJetPtMin = jetPtMin; fQADiJetJetPtMax = jetPtMax; - fQADiJetNBinsDeltaPhi = nDeltaPhi; fQADiJetDeltaPhiMin = deltaPhiMin; fQADiJetDeltaPhiMax = deltaPhiMax; - fQADiJetNBinsDeltaEta = nDeltaEta; fQADiJetDeltaEtaMin = deltaEtaMin; fQADiJetDeltaEtaMax = deltaEtaMax; - fQADiJetNBinsDeltaPt = nDeltaPt; fQADiJetDeltaPtMin = deltaPtMin; fQADiJetDeltaPtMax = deltaPtMax; - + fQADiJetNBinsInvMass = nInvMass; fQADiJetInvMassMin = invMassMin; fQADiJetInvMassMax = invMassMax; fQADiJetNBinsJetPt = nJetPt; fQADiJetJetPtMin = jetPtMin; + fQADiJetJetPtMax = jetPtMax; fQADiJetNBinsDeltaPhi = nDeltaPhi; fQADiJetDeltaPhiMin = deltaPhiMin; fQADiJetDeltaPhiMax = deltaPhiMax; fQADiJetNBinsDeltaEta = nDeltaEta; + fQADiJetDeltaEtaMin = deltaEtaMin; fQADiJetDeltaEtaMax = deltaEtaMax; fQADiJetNBinsDeltaPt = nDeltaPt; fQADiJetDeltaPtMin = deltaPtMin; fQADiJetDeltaPtMax = deltaPtMax; } Float_t GetFFRadius() const { return fFFRadius; } - void GetJetTracksTrackrefs(TList* l, AliAODJet* j); - void GetJetTracksPointing(TList* in, TList* out, AliAODJet* j, const Double_t r, Double_t& pt); + void GetJetTracksTrackrefs(TList* l, const AliAODJet* j); + void GetJetTracksPointing(TList* in, TList* out, const AliAODJet* j, const Double_t r, Double_t& pt); Double_t GetDiJetBin(Double_t invMass, Double_t leadingJetPt, Double_t eMean, Int_t kindSlices); // function to find which bin fill - Double_t InvMass(AliAODJet* jet1, AliAODJet* jet2); + Double_t InvMass(const AliAODJet* jet1, const AliAODJet* jet2); void AssociateGenRec(TList* tracksAODMCCharged,TList* tracksRec, TArrayI& indexAODTr,TArrayI& indexMCTr,TArrayS& isGenPrim); - void FillSingleTrackRecEffHisto(THnSparse* histo, TList* tracksGen, TList* tracksRec, TArrayI& indexAODTr, TArrayS& isGenPrim); - void FillJetTrackRecEffHisto(THnSparse* histo,Double_t jetPhi,Double_t jetEta,Double_t jetPt,TList* jetTrackList, TList* tracksGen, - TArrayI& indexAODTr,TArrayS& isGenPrim); - + void FillSingleTrackRecEffHisto(THnSparse* histo, TList* tracksGen, const TList* tracksRec, const TArrayI& indexAODTr, const TArrayS& isGenPrim); + void FillJetTrackRecEffHisto(THnSparse* histo,Double_t jetPhi,Double_t jetEta,Double_t jetPtGen,Double_t jetPtRec, TList* jetTrackList, TList* tracksGen, + const TArrayI& indexAODTr,const TArrayS& isGenPrim); - - private: // Consts enum {kTrackUndef=0, kTrackAOD, kTrackAODQualityCuts, kTrackAODCuts, kTrackKineAll, kTrackKineCharged, kTrackKineChargedAcceptance, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance}; enum {kJetsUndef=0, kJetsRec, kJetsRecAcceptance, kJetsGen, kJetsGenAcceptance, kJetsKine, kJetsKineAcceptance}; - + + + private: Int_t GetListOfTracks(TList* list, Int_t type); Int_t GetListOfJets(TList* list, Int_t type); AliESDEvent* fESD; // ESD event AliAODEvent* fAOD; // AOD event - AliMCEvent* fMCEvent; // MC event + //AliMCEvent* fMCEvent; // MC event TString fBranchRecJets; // branch name for reconstructed jets TString fBranchGenJets; // branch name for generated jets @@ -451,6 +438,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { Int_t fJetTypeRecEff; // type of jets used for filling reconstruction efficiency histos UInt_t fFilterMask; // filter bit for selected tracks + Bool_t fUsePhysicsSelection; // switch for event selection // track cuts Float_t fTrackPtCut; // track transverse momentum cut @@ -473,9 +461,10 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { Float_t fDiJetCDFCut; // cdf cut value Int_t fDiJetKindBins; // type of bins: invmass, etleading, emean - static TArrayD* fDiJetBins; // bining in invmass, etleading, emean Float_t fFFRadius; // if radius > 0 construct FF from tracks within cone around jet axis, otherwise use trackRefs + + Float_t fAvgTrials; // average number of trials per event TList* fTracksRec; //! reconstructed tracks TList* fTracksRecCuts; //! reconstructed tracks after cuts @@ -640,6 +629,12 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { TH1F *fh1VertexNContributors; //! NContributors to prim vertex TH1F *fh1VertexZ; //! prim vertex z distribution TH1F *fh1EvtMult; //! number of reconstructed tracks after cuts + + TProfile* fh1Xsec; //! pythia cross section and trials + TH1F* fh1Trials; //! sum of trials + TH1F* fh1PtHard; //! pt hard of the event + TH1F* fh1PtHardTrials; //! pt hard of the event + TH1F *fh1nRecJetsCuts; //! number of jets from reconstructed tracks per event TH1F *fh1nGenJets; //! number of jets from generated tracks per event TH1F *fh1nRecEffJets; //! number of jets for reconstruction eff per event @@ -649,7 +644,7 @@ class AliAnalysisTaskFragmentationFunction : public AliAnalysisTaskSE { THnSparseF *fhnSingleTrackRecEffHisto; //! track reconstruction efficiency THnSparseF *fhnJetTrackRecEffHisto; //! reconstruction efficiency jet tracks - ClassDef(AliAnalysisTaskFragmentationFunction, 4); + ClassDef(AliAnalysisTaskFragmentationFunction, 6); }; #endif