AliAnalysisTaskEmcalJetv2QA::AliAnalysisTaskEmcalJetv2QA() :
AliAnalysisTaskEmcalJet("AliAnalysisTaskEmcalJetv2QA", kTRUE),
nCentBins(0),
- nJetPtBins(0),
+ nCentBins1(1),
centBins(0x0),
+ nJetPtBins(0),
+ nJetPtBins1(1),
jetPtBins(0x0),
fJetv2(0x0),
doPtWeight(kFALSE),
{
// Default constructor.
- cout << endl;
- cout << "*******************************************************" << endl;
- cout << "*** AliAnalysisTaskEmcalJetv2QA constructor! ***" << endl;
- cout << "*******************************************************" << endl;
- cout << endl;
-
-
-
SetMakeGeneralHistograms(kTRUE);
}
AliAnalysisTaskEmcalJetv2QA::AliAnalysisTaskEmcalJetv2QA(const char *name) :
AliAnalysisTaskEmcalJet(name, kTRUE),
nCentBins(0),
- nJetPtBins(0),
+ nCentBins1(1),
centBins(0x0),
+ nJetPtBins(0),
+ nJetPtBins1(1),
jetPtBins(0x0),
fJetv2(0x0),
doPtWeight(kFALSE),
{
// Standard constructor.
+ // default binning
+ Double_t centBinsTemp[7] = {0,5,10,20,30,40,50};
+ SetCentBins(6,centBinsTemp);
+ Double_t jetPtBinsTemp[6] = {40.,50.,70.,90.,120.,200.};
+ SetJetPtBins(5,jetPtBinsTemp);
SetMakeGeneralHistograms(kTRUE);
}
fCaloClustersCont = GetClusterContainer(0);
}
- nCentBins = 6; // set number of centrality bins
- nJetPtBins = 4; // set number of jetPtBins
- centBins = new Double_t[nCentBins+1];
- jetPtBins = new Double_t[nJetPtBins+1];
- centBins[0] = 0.; centBins[1] = 5.; centBins[2] = 10.; centBins[3] = 20.; centBins[4] = 30.; centBins[5] = 40.; centBins[6] = 50.; // set edges of bins
- jetPtBins[0] = 50.; jetPtBins[1] = 70.; jetPtBins[2] = 90.; jetPtBins[3] = 120.; jetPtBins[4] = 200.; // set edges of bins
-
fTracksCont->SetClassName("AliVTrack");
fCaloClustersCont->SetClassName("AliVCluster");
AliEmcalJet *dijet = fJetsCont->GetNextAcceptJet(0); // check for dijet events
while(dijet)
{
- if(dijet->Pt() > 50 && fabs(jetPhi-dijet->Phi()-TMath::Pi()) < 0.4) // loop over jets with pT>50 and exclude leading jet and check that angular separation is < 0.4
+ if(dijet->Pt() > jetPt*2./3. && fabs(jetPhi-dijet->Phi()-TMath::Pi()) < 0.4) // loop over jets with pT>50 and exclude leading jet and check that angular separation is < 0.4
isDijet = 1;
dijet = fJetsCont->GetNextAcceptJet();
}
if(centBins) delete [] centBins;
if(jetPtBins) delete [] jetPtBins;
}
+
+void AliAnalysisTaskEmcalJetv2QA::SetCentBins(Int_t n, Double_t* bins)
+{
+ if(centBins) delete [] centBins;
+ nCentBins = n;
+ nCentBins1 = n+1;
+ centBins = new Double_t[nCentBins+1];
+ for(Int_t i = 0; i < nCentBins+1; i++)
+ centBins[i]=bins[i];
+ cout << endl << "Setting " << nCentBins << " centrality bins: " << endl;
+ for(Int_t i = 0; i < nCentBins+1; i++)
+ cout << centBins[i] << " ";
+ cout << endl << endl;
+}
+
+void AliAnalysisTaskEmcalJetv2QA::SetJetPtBins(Int_t n, Double_t* bins)
+{
+ if(jetPtBins) delete [] jetPtBins;
+ nJetPtBins = n;
+ nJetPtBins1 = n+1;
+ jetPtBins = new Double_t[nJetPtBins+1];
+ for(Int_t i = 0; i < nJetPtBins+1; i++)
+ jetPtBins[i]=bins[i];
+ cout << endl << "Setting " << nJetPtBins << " jet pt bins: " << endl;
+ for(Int_t i = 0; i < nJetPtBins+1; i++)
+ cout << jetPtBins[i] << " ";
+ cout << endl << endl;
+}
const char *nclusters = "CaloClusters",
const char *njets = "Jets",
const char *nrho = "Rho",
+ Double_t jetv2 = 0.0,
+ Bool_t ptweight = kFALSE,
Int_t nCentBins = 1,
Double_t jetradius = 0.2,
Double_t jetptcut = 1,
name += "_";
name += njets;
}
+ name += Form("_v%.2i",(Int_t)(10*jetv2));
if (strcmp(nrho,"")) {
name += "_";
name += nrho;
}
+ if (ptweight)
+ name += "_ptweight";
if (strcmp(type,"")) {
name += "_";
name += type;
Printf("name: %s",name.Data());
AliAnalysisTaskEmcalJetv2QA* jetTask = new AliAnalysisTaskEmcalJetv2QA(name);
+
+ jetTask->SetJetv2(jetv2); // set your jet v2 here
+ jetTask->SetDoPtWeight(ptweight); // set doPtWeight
+
jetTask->SetCentRange(0.,100.);
jetTask->SetNCentBins(nCentBins);