#ifndef AliAnalysisTaskJetV2_H
#define AliAnalysisTaskJetV2_H
+// uncomment to compile with debug information
+//#define DEBUGTASK
+
#include <AliAnalysisTaskEmcalJet.h>
#include <AliEmcalJet.h>
#include <AliVEvent.h>
if(x>TMath::TwoPi()/n) x = TMath::TwoPi()-(x+TMath::TwoPi()/n);
}
return x; }
+ /* inline */ static Bool_t IsInPlane(Double_t dPhi) {
+ return (dPhi < -1.*TMath::Pi()/4. || dPhi > TMath::Pi()/4.); }
/* inline */ static Double_t ChiSquarePDF(Int_t ndf, Double_t x) {
Double_t n(ndf/2.), denom(TMath::Power(2, n)*TMath::Gamma(n));
if (denom!=0) return ((1./denom)*TMath::Power(x, n-1)*TMath::Exp(-x/2.));
/* inline */ Double_t KolmogorovTest(TH1F& histo, TF1* func) const {
// return the probability from a Kolmogorov test
return .5;
+ /* this test is disabeled as it eats a lot of resources but kept as a dummty to
+ * ensure compatibility of the output with offline macros
TH1F test(histo); // stack copy of test statistic
for(Int_t i(0); i < test.GetXaxis()->GetNbins(); i++) test.SetBinContent(i+1, func->Eval(test.GetXaxis()->GetBinCenter(1+i)));
if(fFitGoodnessTest == kKolmogorovTOY) return histo.TH1::KolmogorovTest((&test), "X");
return histo.TH1::KolmogorovTest((&test));
+ */
}
// setters - analysis setup
- void SetDebugMode(Int_t d) {fDebug = d;}
void SetRunToyMC(Bool_t t) {fRunToyMC = t; }
void SetAttachToEvent(Bool_t b) {fAttachToEvent = b;}
void SetFillHistograms(Bool_t b) {fFillHistograms = b;}
fUserSuppliedV3 = j; }
void SetOnTheFlyResCorrection(TH1F* r2, TH1F* r3) {fUserSuppliedR2 = r2;
fUserSuppliedR3 = r3; }
+ void SetEventPlaneWeights(TH1F* ep) {fEventPlaneWeights = ep; }
+ void SetAcceptanceWeights(Bool_t w) {fAcceptanceWeights = w; }
void SetNameRhoSmall(TString name) {fNameSmallRho = name; }
void SetRandomSeed(TRandom3* r) {if (fRandom) delete fRandom; fRandom = r; }
void SetModulationFit(TF1* fit);
TList* GetOutputList() const {return fOutputList;}
AliLocalRhoParameter* GetLocalRhoParameter() const {return fLocalRho;}
Double_t GetJetRadius() const {return GetJetContainer()->GetJetRadius();}
- /* inline */ AliEmcalJet* GetLeadingJet() {
- // return pointer to the highest pt jet (before background subtraction) within acceptance
- // only rudimentary cuts are applied on this level, hence the implementation outside of
- // the framework
- Int_t iJets(fJets->GetEntriesFast());
- Double_t pt(0);
- AliEmcalJet* leadingJet(0x0);
- for(Int_t i(0); i < iJets; i++) {
- AliEmcalJet* jet = static_cast<AliEmcalJet*>(fJets->At(i));
- if(!PassesSimpleCuts(jet)) continue;
- if(jet->Pt() > pt) {
- leadingJet = jet;
- pt = leadingJet->Pt();
- }
- }
- return leadingJet;
- }
- void ExecMe() {ExecOnce();}
- AliAnalysisTaskJetV2* ReturnMe() {return this;}
+ AliEmcalJet* GetLeadingJet(AliLocalRhoParameter* localRho = 0x0);
+ static TH1F* GetEventPlaneWeights(TH1F* hist);
+ static void PrintTriggerSummary(UInt_t trigger);
+ void ExecMe() {ExecOnce();}
+ AliAnalysisTaskJetV2* ReturnMe() {return this;}
// local cuts
void SetSoftTrackMinMaxPt(Float_t min, Float_t max) {fSoftTrackMinPt = min; fSoftTrackMaxPt = max;}
void SetSemiGoodJetMinMaxPhi(Double_t a, Double_t b) {fSemiGoodJetMinPhi = a; fSemiGoodJetMaxPhi = b;}
void SetSemiGoodTrackMinMaxPhi(Double_t a, Double_t b) {fSemiGoodTrackMinPhi = a; fSemiGoodTrackMaxPhi = b;}
// numerical evaluations
+ static void NumericalOverlap(Double_t x1, Double_t x2, Double_t psi2, Double_t &percIn, Double_t &percOut, Double_t &percLost);
+ static Int_t OverlapsWithPlane(Double_t x1, Double_t x2,
+ Double_t a, Double_t b, Double_t c, Double_t d, Double_t e, Double_t phi);
static Double_t CalculateEventPlaneChi(Double_t res);
void CalculateEventPlaneVZERO(Double_t vzero[2][2]) const;
void CalculateEventPlaneCombinedVZERO(Double_t* comb) const;
Bool_t PassesCuts(const AliVCluster* track) const;
// filling histograms
void FillHistogramsAfterSubtraction(Double_t psi2, Double_t vzero[2][2], Double_t* vzeroComb, Double_t* tpc);
- void FillTrackHistograms() const;
- void FillClusterHistograms() const;
- void FillEventPlaneHistograms(Double_t vzero[2][2], Double_t* vzeroComb, Double_t* tpc) const;
- void FillRhoHistograms();
- void FillDeltaPtHistograms(Double_t psi2) const;
- void FillJetHistograms(Double_t psi2);
void FillQAHistograms(AliVTrack* vtrack) const;
void FillQAHistograms(AliVEvent* vevent);
+ void FillWeightedTrackHistograms() const;
+ void FillWeightedClusterHistograms() const;
+ void FillWeightedEventPlaneHistograms(Double_t vzero[2][2], Double_t* vzeroComb, Double_t* tpc) const;
+ void FillWeightedRhoHistograms();
+ void FillWeightedDeltaPtHistograms(Double_t psi2) const;
+ void FillWeightedJetHistograms(Double_t psi2);
+ void FillWeightedQAHistograms(AliVTrack* vtrack) const;
+ void FillWeightedQAHistograms(AliVEvent* vevent);
+ void FillWeightedTriggerQA(Double_t dPhi, Double_t pt, UInt_t trigger);
void FillAnalysisSummaryHistogram() const;
virtual void Terminate(Option_t* option);
// interface methods for the output file
Int_t GetVZEROCentralityBin() const;
private:
// analysis flags and settings
- Int_t fDebug; // debug level (0 none, 1 fcn calls, 2 verbose)
Bool_t fRunToyMC; // run toy mc for fit routine
Bool_t fLocalInit; //! is the analysis initialized?
Bool_t fAttachToEvent; // attach local rho to the event
TH1F* fUserSuppliedV3; // histo with integrated v3
TH1F* fUserSuppliedR2; // correct the extracted v2 with this r
TH1F* fUserSuppliedR3; // correct the extracted v3 with this r
+ TH1F* fEventPlaneWeights; // weight histo for the event plane
+ Bool_t fAcceptanceWeights; // store centrality dependent acceptance weights
+ Float_t fEventPlaneWeight; //! the actual weight of an event
AliParticleContainer* fTracksCont; //! tracks
AliClusterContainer* fClusterCont; //! cluster container
AliJetContainer* fJetsCont; //! jets
AliEmcalJet* fLeadingJet; //! leading jet
+ AliEmcalJet* fLeadingJetAfterSub; //! leading jet after background subtraction
// members
Int_t fNAcceptedTracks; //! number of accepted tracks
Int_t fNAcceptedTracksQCn; //! accepted tracks for QCn
Float_t fAbsVertexZ; // cut on zvertex
// general qa histograms
TH1F* fHistCentrality; //! accepted centrality
+ TProfile* fHistCentralityPercIn; //! centrality versus perc in
+ TProfile* fHistCentralityPercOut; //! centrality versus perc out
+ TProfile* fHistCentralityPercLost;//! centrality versus perc lost
TH1F* fHistVertexz; //! accepted verte
TH2F* fHistRunnumbersPhi; //! run numbers averaged phi
TH2F* fHistRunnumbersEta; //! run numbers averaged eta
TH1F* fHistClusterPt[10]; //! pt emcal clusters
TH2F* fHistClusterEtaPhi[10]; //! eta phi emcal clusters
TH2F* fHistClusterEtaPhiWeighted[10]; //! eta phi emcal clusters, pt weighted
+ // qa histograms for triggers
+ TH2F* fHistTriggerQAIn[10]; //! trigger qa in plane
+ TH2F* fHistTriggerQAOut[10]; //! trigger qa out of plane
// qa event planes
TProfile* fHistPsiControl; //! event plane control histogram
TProfile* fHistPsiSpread; //! event plane spread histogram
TH3F* fHistPsiVZEROCLeadingJet[10]; //! correlation vzeroc EP, LJ pt
TH3F* fHistPsiVZEROCombLeadingJet[10];//! correlation vzerocomb EP, LJ pt
TH3F* fHistPsi2Correlation[10]; //! correlation of event planes
+ TH2F* fHistLeadingJetBackground[10]; //! geometric correlation of leading jet w/wo bkg subtraction
// background
TH1F* fHistRhoPackage[10]; //! rho as estimated by emcal jet package
TH1F* fHistRho[10]; //! background
AliAnalysisTaskJetV2(const AliAnalysisTaskJetV2&); // not implemented
AliAnalysisTaskJetV2& operator=(const AliAnalysisTaskJetV2&); // not implemented
- ClassDef(AliAnalysisTaskJetV2, 3);
+ ClassDef(AliAnalysisTaskJetV2, 4);
};
#endif