#ifndef AliAnalysisTaskJetMatching_H
#define AliAnalysisTaskJetMatching_H
+//#define DEBUGTASK
+
#include <AliAnalysisTaskEmcalJet.h>
#include <AliEmcalJet.h>
#include <AliVTrack.h>
#include <TRandom3.h>
class TF1;
-class THF1;
-class THF2;
+class TH1F;
+class TH2F;
+class TH3F;
class TProfile;
class AliRhoParameter;
class AliLocalRhoParameter;
{
public:
// enumerators
- enum matchingSceme {kGeoEtaPhi, kGeoR};
+ enum matchingSceme {kGeoEtaPhi, kGeoR, kDiJet};
enum sourceBKG {kNoSourceBKG, kSourceRho, kSourceLocalRho};
enum targetBKG {kNoTargetBKG, kTargetRho, kTargetLocalRho};
// constructors, destructor
virtual ~AliAnalysisTaskJetMatching();
// setting up the task and technical aspects
void ExecOnce();
+ virtual Bool_t Notify();
virtual void UserCreateOutputObjects();
TH1F* BookTH1F(const char* name, const char* x, Int_t bins, Double_t min, Double_t max, Bool_t append = kTRUE);
TH2F* BookTH2F(const char* name, const char* x, const char* y, Int_t binsx, Double_t minx, Double_t maxx, Int_t binsy, Double_t miny, Double_t maxy, Bool_t append = kTRUE);
+ TH3F* BookTH3F(const char* name, const char* x, const char* y, const char* z, Int_t binsx, Double_t minx, Double_t maxx, Int_t binsy, Double_t miny, Double_t maxy, Int_t binsz, Double_t minz, Double_t maxz, Bool_t append = kTRUE);
+
virtual Bool_t Run();
/* inline */ Double_t PhaseShift(Double_t x) const {
while (x>=TMath::TwoPi())x-=TMath::TwoPi();
return TMath::Sqrt(TMath::Abs((etaA-etaB)*(etaA-etaB)+(phiA-phiB)*(phiA-phiB))); }
// setters - setup how to run
- void SetDebugMode(Int_t d) {fDebug = d;}
void SetMatchingScheme(matchingSceme m) {fMatchingScheme = m;}
void SetMatchConstituents(Bool_t m) {fMatchConstituents = m;}
void SetMinFracRecoveredConstituents(Float_t f) {fMinFracRecoveredConstituents = f;}
// methods
void DoGeometricMatchingEtaPhi();
void DoGeometricMatchingR();
+ void DoDiJetMatching();
void DoConstituentMatching();
void GetBijection();
void PostMatchedJets();
fMatchedJetContainer[i][0] = 0x0; fMatchedJetContainer[i][1] = 0x0; }
fNoMatchedJets = 0;
}
+ AliEmcalJet* GetLeadingJet(TClonesArray* source, Int_t &leadingJetIndex, Double_t etaMin = -.7, Double_t etaMax = .7);
+ AliEmcalJet* GetSubLeadingJet(TClonesArray* source, Int_t leadingJetIndex, Int_t &subLeadingJetIndex);
void PrintInfo() const;
virtual void Terminate(Option_t* option);
private:
- Int_t fDebug; // debug level (0 none, 1 fcn calls, 2 verbose)
TClonesArray* fSourceJets; //! array with source jets
TString fSourceJetsName; // name of array with source jets
TClonesArray* fTargetJets; //! array with target jets
TH1F* fHistTargetJetPt; //! pt of target jets
TH1F* fHistMatchedJetPt; //! pt of matched jets
TH2F* fHistSourceMatchedJetPt;//! pt or source vs matched jets
- TH1F* fHistDetectorResponseProb; //! det prob
+ TH2F* fHistDetectorResponseProb; //! det prob
TH1F* fHistNoConstSourceJet; //! number of constituents of source jet
TH1F* fHistNoConstTargetJet; //! number of constituents of target jet
TH1F* fHistNoConstMatchJet; //! number of constituents of matched jets
TProfile* fProfFracPtJets; //! sum pt fraction for matched jets
TProfile* fProfFracNoMatched; //! no of constituents fraction found / jet
TProfile* fProfFracNoJets; //! no of consstituents fraction jet / jet
+ TH3F* fHistDiJet; //! matched dijet eta, phi
+ TH3F* fHistDiJetLeadingJet; //! leading jet (for dijet) eta, phi
+ TH2F* fHistDiJetDPhi; //! dijet dphi
+ TH2F* fHistDiJetDPt; //! dijet dpt
TH1F* fHistAnalysisSummary; //! flags
TProfile* fProfQAMatched; //! QA spreads of matched jets
TProfile* fProfQA; //! QA spreads of source and target jets
Float_t fMinFracRecoveredConstituents; // minimium fraction of constituents that needs to be found
Float_t fMinFracRecoveredConstituentPt; // minimium fraction of constituent pt that needs to be recovered
Bool_t fGetBijection; // get bijection of source and matched jets
+ // pythia ntrials xsec bookkeeping
+ TH1F* fh1Trials; //! sum of trails (in Notify)
+ TH1F* fh1AvgTrials; //! average sum of trials (in Run)
+ TProfile* fh1Xsec; //! pythia cross section and trials
+ Float_t fAvgTrials; // average number of trails per event
AliAnalysisTaskJetMatching(const AliAnalysisTaskJetMatching&); // not implemented
AliAnalysisTaskJetMatching& operator=(const AliAnalysisTaskJetMatching&); // not implemented
- ClassDef(AliAnalysisTaskJetMatching, 5);
+ ClassDef(AliAnalysisTaskJetMatching, 6);
};
#endif