X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGJE%2FAliAnalysisTaskJetCore.cxx;h=a9f92cb8650b3e8e5780106ffa4521d6c5fe714b;hb=e344162cf543e2f0d8be0eee2b72d25134e43b61;hp=da849dd5cdae00a3e15c2cad6bb2b4abcf4eb1c0;hpb=b6844e9e61e8353c570865e543272d82f8277ad3;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGJE/AliAnalysisTaskJetCore.cxx b/PWGJE/AliAnalysisTaskJetCore.cxx index da849dd5cda..a9f92cb8650 100644 --- a/PWGJE/AliAnalysisTaskJetCore.cxx +++ b/PWGJE/AliAnalysisTaskJetCore.cxx @@ -1,4 +1,3 @@ - // ****************************************** // This task computes several jet observables like // the fraction of energy in inner and outer coronnas, @@ -32,7 +31,7 @@ #include "TH3F.h" #include "THnSparse.h" #include "TCanvas.h" - +#include "TRandom3.h" #include "AliLog.h" #include "AliAnalysisTask.h" @@ -45,6 +44,7 @@ #include "AliAnalysisHelperJetTasks.h" #include "AliInputEventHandler.h" #include "AliAODJetEventBackground.h" +#include "AliAODMCParticle.h" #include "AliAnalysisTaskFastEmbedding.h" #include "AliAODEvent.h" #include "AliAODHandler.h" @@ -52,12 +52,16 @@ #include "AliAnalysisTaskJetCore.h" +using std::cout; +using std::endl; + ClassImp(AliAnalysisTaskJetCore) AliAnalysisTaskJetCore::AliAnalysisTaskJetCore() : AliAnalysisTaskSE(), fESD(0x0), -fAOD(0x0), +fAODIn(0x0), +fAODOut(0x0), fAODExtension(0x0), fBackgroundBranch(""), fNonStdFile(""), @@ -69,26 +73,50 @@ fVtxZMax(10.), fEvtClassMin(0), fEvtClassMax(4), fFilterMask(0), +fFilterMaskBestPt(0), +fFilterType(0), fRadioFrac(0.2), fMinDist(0.1), fCentMin(0.), fCentMax(100.), fNInputTracksMin(0), fNInputTracksMax(-1), +fRequireITSRefit(0), +fApplySharedClusterCut(0), fAngStructCloseTracks(0), fCheckMethods(0), fDoEventMixing(0), +fFlagPhiBkg(0), +fFlagEtaBkg(0), +fFlagJetHadron(0), +fFrac(0.8), +fTTLowRef(11), +fTTUpRef(13), +fTTLowSig(15), +fTTUpSig(19), +fHardest(0), +fFlagRandom(0), +fFlagOnlyRecoil(0), +fFlagOnlyHardest(1), +fTrackTypeRec(kTrackUndef), +fRPAngle(0), +fNRPBins(50), +fSemigoodCorrect(0), +fHolePos(4.71), +fHoleWidth(0.2), fJetEtaMin(-.5), fJetEtaMax(.5), -fNevents(0x0), -fTindex(0x0), -fTrigBufferIndex(0x0), +fNevents(0), +fTindex(0), +fTrigBufferIndex(0), +fCountAgain(0), fJetPtMin(20.), fJetTriggerExcludeMask(AliAODJet::kHighTrackPtTriggered), fJetPtFractionMin(0.5), fNMatchJets(4), fMatchMaxDist(0.8), fKeepJets(kFALSE), +fRunAnaAzimuthalCorrelation(kFALSE), fkNbranches(2), fkEvtClasses(12), fOutputList(0x0), @@ -104,6 +132,8 @@ fh2JetCoreMethod1C30(0x0), fh2JetCoreMethod2C30(0x0), fh2JetCoreMethod1C60(0x0), fh2JetCoreMethod2C60(0x0), +fh3JetTrackC3060(0x0), +fh3JetTrackC20(0x0), fh2AngStructpt1C10(0x0), fh2AngStructpt2C10(0x0), fh2AngStructpt3C10(0x0), @@ -120,10 +150,21 @@ fh2AngStructpt1C60(0x0), fh2AngStructpt2C60(0x0), fh2AngStructpt3C60(0x0), fh2AngStructpt4C60(0x0), -fh3spectriggered(0x0), -fh3specbiased(0x0), -fh3spectot(0x0) - +fh1TrigRef(0x0), +fh1TrigSig(0x0), +fh2Ntriggers(0x0), +fh2Ntriggers2C10(0x0), +fh2Ntriggers2C20(0x0), +fh3JetDensity(0x0), +fh3JetDensityA4(0x0), +fh2RPJetsC10(0x0), +fh2RPJetsC20(0x0), +fh2RPTC10(0x0), +fh2RPTC20(0x0), +fHJetSpec(0x0), +fhTTPt(0x0), +fHJetPhiCorr(0x0), +fRandom(0x0) { // default Constructor @@ -131,7 +172,7 @@ fh3spectot(0x0) // Trigger buffer. for(Int_t i=0; i<10; i++) { - for(Int_t j=0; j<7; j++) { + for(Int_t j=0; j<6; j++) { fTrigBuffer[i][j]=0; } } @@ -150,7 +191,8 @@ fh3spectot(0x0) AliAnalysisTaskJetCore::AliAnalysisTaskJetCore(const char *name) : AliAnalysisTaskSE(name), fESD(0x0), -fAOD(0x0), +fAODIn(0x0), +fAODOut(0x0), fAODExtension(0x0), fBackgroundBranch(""), fNonStdFile(""), @@ -162,26 +204,50 @@ fVtxZMax(10.), fEvtClassMin(0), fEvtClassMax(4), fFilterMask(0), +fFilterMaskBestPt(0), +fFilterType(0), fRadioFrac(0.2), fMinDist(0.1), fCentMin(0.), fCentMax(100.), fNInputTracksMin(0), fNInputTracksMax(-1), +fRequireITSRefit(0), +fApplySharedClusterCut(0), fAngStructCloseTracks(0), fCheckMethods(0), fDoEventMixing(0), +fFlagPhiBkg(0), +fFlagEtaBkg(0), +fFlagJetHadron(0), +fFrac(0.8), +fTTLowRef(11), +fTTUpRef(13), +fTTLowSig(15), +fTTUpSig(19), +fHardest(0), +fFlagRandom(0), +fFlagOnlyRecoil(0), +fFlagOnlyHardest(1), +fTrackTypeRec(kTrackUndef), +fRPAngle(0), +fNRPBins(50), +fSemigoodCorrect(0), +fHolePos(4.71), +fHoleWidth(0.2), fJetEtaMin(-.5), fJetEtaMax(.5), -fNevents(0x0), -fTindex(0x0), -fTrigBufferIndex(0x0), +fNevents(0), +fTindex(0), +fTrigBufferIndex(0), +fCountAgain(0), fJetPtMin(20.), fJetTriggerExcludeMask(AliAODJet::kHighTrackPtTriggered), fJetPtFractionMin(0.5), fNMatchJets(4), fMatchMaxDist(0.8), fKeepJets(kFALSE), +fRunAnaAzimuthalCorrelation(kFALSE), fkNbranches(2), fkEvtClasses(12), fOutputList(0x0), @@ -197,6 +263,8 @@ fh2JetCoreMethod1C30(0x0), fh2JetCoreMethod2C30(0x0), fh2JetCoreMethod1C60(0x0), fh2JetCoreMethod2C60(0x0), +fh3JetTrackC3060(0x0), +fh3JetTrackC20(0x0), fh2AngStructpt1C10(0x0), fh2AngStructpt2C10(0x0), fh2AngStructpt3C10(0x0), @@ -213,16 +281,28 @@ fh2AngStructpt1C60(0x0), fh2AngStructpt2C60(0x0), fh2AngStructpt3C60(0x0), fh2AngStructpt4C60(0x0), -fh3spectriggered(0x0), -fh3specbiased(0x0), -fh3spectot(0x0) +fh1TrigRef(0x0), +fh1TrigSig(0x0), +fh2Ntriggers(0x0), +fh2Ntriggers2C10(0x0), +fh2Ntriggers2C20(0x0), +fh3JetDensity(0x0), +fh3JetDensityA4(0x0), +fh2RPJetsC10(0x0), +fh2RPJetsC20(0x0), +fh2RPTC10(0x0), +fh2RPTC20(0x0), +fHJetSpec(0x0), +fhTTPt(0x0), +fHJetPhiCorr(0x0), +fRandom(0x0) { // Constructor for(Int_t i=0; i<10; i++) { - for(Int_t j=0; j<7; j++) { + for(Int_t j=0; j<6; j++) { fTrigBuffer[i][j]=0; } } @@ -272,6 +352,12 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects() TH1::AddDirectory(kFALSE); + // set seed + fRandom = new TRandom3(0); + + + + fHistEvtSelection = new TH1I("fHistEvtSelection", "event selection", 6, -0.5, 5.5); fHistEvtSelection->GetXaxis()->SetBinLabel(1,"ACCEPTED"); fHistEvtSelection->GetXaxis()->SetBinLabel(2,"events IN"); @@ -283,15 +369,41 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects() UInt_t entries = 0; // bit coded, see GetDimParams() below entries = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 |1<<7; fhnDeltaR = NewTHnSparseF("fhnDeltaR", entries); - + + //change binning in pTtrack + Double_t *xPt3 = new Double_t[10]; + xPt3[0] = 0.; + for(int i = 1; i<=9;i++){ + if(xPt3[i-1]<2)xPt3[i] = xPt3[i-1] + 0.4; // 1 - 5 + else if(xPt3[i-1]<11)xPt3[i] = xPt3[i-1] + 3; // 5 - 12 + else xPt3[i] = xPt3[i-1] + 150.; // 18 + } + fhnDeltaR->SetBinEdges(2,xPt3); + delete [] xPt3; + + //change binning in HTI + Double_t *xPt4 = new Double_t[14]; + xPt4[0] = 0.; + for(int i = 1; i<=13;i++){ + if(xPt4[i-1]<10)xPt4[i] = xPt4[i-1] + 1; // 1 - 10 + else if(xPt4[i-1]<20)xPt4[i] = xPt4[i-1] + 5; // 10 - 12 + else xPt4[i] = xPt4[i-1] + 30.; // 13 + } + fhnDeltaR->SetBinEdges(6,xPt4); + delete [] xPt4; + - UInt_t cifras = 0; // bit coded, see GetDimParams() below - cifras = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<6 |1<<7; - fhnMixedEvents = NewTHnSparseF("fhnMixedEvents", cifras); - if(fCheckMethods){ + + + if(fDoEventMixing){ + UInt_t cifras = 0; // bit coded, see GetDimParams() below + cifras = 1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5 | 1<<7; + fhnMixedEvents = NewTHnSparseF("fhnMixedEvents", cifras);} + + if(fCheckMethods){ fh2JetCoreMethod1C10 = new TH2F("JetCoreMethod1C10","",150, 0., 150.,100, 0., 1.5); fh2JetCoreMethod2C10 = new TH2F("JetCoreMethod2C10","",150, 0., 150.,100, 0., 1.5); fh2JetCoreMethod1C20 = new TH2F("JetCoreMethod1C20","",150, 0., 150.,100, 0., 1.5); @@ -301,7 +413,8 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects() fh2JetCoreMethod1C60 = new TH2F("JetCoreMethod1C60","",150, 0., 150.,100, 0., 1.5); fh2JetCoreMethod2C60 = new TH2F("JetCoreMethod2C60","",150, 0., 150.,100, 0., 1.5);} - + fh3JetTrackC3060=new TH3F("JetTrackC3060","",50,0,50,150,0.,150.,35,0.,3.5); + fh3JetTrackC20=new TH3F("JetTrackC20","",50,0,50,150,0.,150.,35,0.,3.5); if(fAngStructCloseTracks>0){ fh2AngStructpt1C10 = new TH2F("Ang struct pt1 C10","",15,0.,1.5,150,0.,10.); fh2AngStructpt2C10 = new TH2F("Ang struct pt2 C10","",15,0.,1.5,150,0.,10.); @@ -319,10 +432,23 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects() fh2AngStructpt2C60 = new TH2F("Ang struct pt2 C60","",15,0.,1.5,150,0.,10.); fh2AngStructpt3C60 = new TH2F("Ang struct pt3 C60","",15,0.,1.5,150,0.,10.); fh2AngStructpt4C60 = new TH2F("Ang struct pt4 C60","",15,0.,1.5,150,0.,10.); } - fh3spectriggered = new TH3F("Triggered spectrum","",10,0,100,50,0.,200,50,0.,50.); - fh3specbiased = new TH3F("Biased spectrum","",10,0,100,50,0.,200.,50,0.,50.); - fh3spectot = new TH3F("Total spectrum","",50,0.,200.,50,0.,50.,50,0.,50.); + + fh1TrigRef=new TH1D("Trig Ref","",10,0.,10); + fh1TrigSig=new TH1D("Trig Sig","",10,0.,10); + fh2Ntriggers=new TH2F("# of triggers","",100,0.,100.,50,0.,50.); + fh2Ntriggers2C10=new TH2F("# of triggers2C10","",50,0.,50.,50,0.,50.); + fh2Ntriggers2C20=new TH2F("# of triggers2C20","",50,0.,50.,50,0.,50.); + fh3JetDensity=new TH3F("Jet density vs mutliplicity A>0.07","",100,0.,4000.,100,0.,5.,25,0.,50.); + fh3JetDensityA4=new TH3F("Jet density vs multiplicity A>0.4","",100,0.,4000.,100,0.,5.,25,0.,50.); + fh2RPJetsC10=new TH2F("RPJetC10","",35,0.,3.5,100,0.,100.); + fh2RPJetsC20=new TH2F("RPJetC20","",35,0.,3.5,100,0.,100.); + fh2RPTC10=new TH2F("RPTriggerC10","",35,0.,3.5,50,0.,50.); + fh2RPTC20=new TH2F("RPTriggerC20","",35,0.,3.5,50,0.,50.); + + + + fOutputList->Add(fHistEvtSelection); fOutputList->Add(fhnDeltaR); @@ -342,7 +468,10 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects() fOutputList->Add(fh2JetCoreMethod1C60); fOutputList->Add(fh2JetCoreMethod2C60);} - + fOutputList->Add(fh3JetTrackC3060); + fOutputList->Add(fh3JetTrackC20); + + @@ -363,10 +492,63 @@ void AliAnalysisTaskJetCore::UserCreateOutputObjects() fOutputList->Add(fh2AngStructpt2C60); fOutputList->Add(fh2AngStructpt3C60); fOutputList->Add(fh2AngStructpt4C60);} - fOutputList->Add(fh3spectriggered); - fOutputList->Add(fh3specbiased); - fOutputList->Add(fh3spectot); + + + + fOutputList->Add(fh1TrigRef); + fOutputList->Add(fh1TrigSig); + fOutputList->Add(fh2Ntriggers); + fOutputList->Add(fh2Ntriggers2C10); + fOutputList->Add(fh2Ntriggers2C20); + fOutputList->Add(fh3JetDensity); + fOutputList->Add(fh3JetDensityA4); + fOutputList->Add(fh2RPJetsC10); + fOutputList->Add(fh2RPJetsC20); + fOutputList->Add(fh2RPTC10); + fOutputList->Add(fh2RPTC20); + + const Int_t dimSpec = 5; + const Int_t nBinsSpec[dimSpec] = {100,6, 140, 50, fNRPBins}; + const Double_t lowBinSpec[dimSpec] = {0,0,-80, 0, 0}; + const Double_t hiBinSpec[dimSpec] = {100,1, 200, 50, static_cast(fNRPBins)}; + fHJetSpec = new THnSparseF("fHJetSpec","Recoil jet spectrum",dimSpec,nBinsSpec,lowBinSpec,hiBinSpec); + + //change binning in jet area + Double_t *xPt6 = new Double_t[7]; + xPt6[0] = 0.; + xPt6[1]=0.07; + xPt6[2]=0.2; + xPt6[3]=0.4; + xPt6[4]=0.6; + xPt6[5]=0.8; + xPt6[6]=1; + fHJetSpec->SetBinEdges(1,xPt6); + delete [] xPt6; + + + + + + fOutputList->Add(fHJetSpec); + + + if(fRunAnaAzimuthalCorrelation) + { + fhTTPt = new TH2F("fhTTPt","Trigger track p_{T} vs centrality",10,0,100,100,0,100); + fOutputList->Add(fhTTPt); + + const Int_t dimCor = 5; + const Int_t nBinsCor[dimCor] = {50, 200, 100, 8, 10}; + const Double_t lowBinCor[dimCor] = {0, -50, -0.5*TMath::Pi(), 0, 0}; + const Double_t hiBinCor[dimCor] = {50, 150, 1.5*TMath::Pi(), 0.8, 100}; + fHJetPhiCorr = new THnSparseF("fHJetPhiCorr","TT p_{T} vs jet p_{T} vs dPhi vs area vs centrality",dimCor,nBinsCor,lowBinCor,hiBinCor); + fOutputList->Add(fHJetPhiCorr); + } + + + + // =========== Switch on Sumw2 for all histos =========== for (Int_t i=0; iGetEntries(); ++i) { TH1 *h1 = dynamic_cast(fOutputList->At(i)); @@ -396,10 +578,17 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *) fESD=dynamic_cast(InputEvent()); if (!fESD) { AliError("ESD not available"); - fAOD = dynamic_cast(InputEvent()); - } else { - fAOD = dynamic_cast(AODEvent()); - } + fAODIn = dynamic_cast(InputEvent()); + } + fAODOut = dynamic_cast(AODEvent()); + + static AliAODEvent* aod = 0; + // take all other information from the aod we take the tracks from + if(!aod){ + if(!fESD)aod = fAODIn; + else aod = fAODOut;} + + if(fNonStdFile.Length()!=0){ // case that we have an AOD extension we need can fetch the jets from the extended output @@ -410,16 +599,23 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *) }} + // -- event selection -- + fHistEvtSelection->Fill(1); // number of events before event selection + Bool_t selected=kTRUE; + selected = AliAnalysisHelperJetTasks::Selected(); + if(!selected){ + // no selection by the service task, we continue + PostData(1,fOutputList); + return;} + - // -- event selection -- - fHistEvtSelection->Fill(1); // number of events before event selection - // physics selection + // physics selection: this is now redundant, all should appear as accepted after service task selection AliInputEventHandler* inputHandler = (AliInputEventHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetInputEventHandler()); - cout<IsEventSelected()<<" "<IsEventSelected()<<" "<IsEventSelected() & fOfflineTrgMask)){ if(fDebug) Printf(" Trigger Selection: event REJECTED ... "); fHistEvtSelection->Fill(2); @@ -427,18 +623,21 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *) return; } + + // vertex selection - if(!fAOD){ + if(!aod){ if(fDebug) Printf("%s:%d No AOD",(char*)__FILE__,__LINE__); fHistEvtSelection->Fill(3); PostData(1, fOutputList); } - AliAODVertex* primVtx = fAOD->GetPrimaryVertex(); + AliAODVertex* primVtx = aod->GetPrimaryVertex(); if(!primVtx){ if(fDebug) Printf("%s:%d No primVtx",(char*)__FILE__,__LINE__); fHistEvtSelection->Fill(3); - PostData(1, fOutputList); + PostData(1, fOutputList); + return; } Int_t nTracksPrim = primVtx->GetNContributors(); @@ -463,14 +662,17 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *) // centrality selection AliCentrality *cent = 0x0; Double_t centValue = 0.; - if(fESD) cent = fESD->GetCentrality(); - if(cent) centValue = cent->GetCentralityPercentile("V0M"); + if(fIsPbPb){ + if(fESD) {cent = fESD->GetCentrality(); + if(cent) centValue = cent->GetCentralityPercentile("V0M");} + else centValue=aod->GetHeader()->GetCentrality(); + if(fDebug) printf("centrality: %f\n", centValue); - if (centValue < fCentMin || centValue > fCentMax){ + if (centValue < fCentMin || centValue > fCentMax){ fHistEvtSelection->Fill(4); PostData(1, fOutputList); return; - } + }} fHistEvtSelection->Fill(0); @@ -479,44 +681,68 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *) // get background AliAODJetEventBackground* externalBackground = 0; - if(fAOD&&!externalBackground&&fBackgroundBranch.Length()){ - externalBackground = (AliAODJetEventBackground*)(fAOD->FindListObject(fBackgroundBranch.Data())); + if(fAODOut&&!externalBackground&&fBackgroundBranch.Length()){ + externalBackground = (AliAODJetEventBackground*)(fAODOut->FindListObject(fBackgroundBranch.Data())); if(!externalBackground)Printf("%s:%d Background branch not found %s",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());; } if(fAODExtension&&!externalBackground&&fBackgroundBranch.Length()){ externalBackground = (AliAODJetEventBackground*)(fAODExtension->GetAOD()->FindListObject(fBackgroundBranch.Data())); if(!externalBackground)Printf("%s:%d Background branch not found %s",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());; } + + if(fAODIn&&!externalBackground&&fBackgroundBranch.Length()){ + externalBackground = (AliAODJetEventBackground*)(fAODIn->FindListObject(fBackgroundBranch.Data())); + if(!externalBackground)Printf("%s:%d Background branch not found %s",(char*)__FILE__,__LINE__,fBackgroundBranch.Data());; + } Float_t rho = 0; - if(externalBackground)rho = externalBackground->GetBackground(0); + if(fFlagRandom==0){ + if(externalBackground)rho = externalBackground->GetBackground(0);} + if(fFlagRandom==1){ + if(externalBackground)rho = externalBackground->GetBackground(2);} // fetch jets TClonesArray *aodJets[2]; aodJets[0]=0; - if(fAOD&&!aodJets[0]){ - aodJets[0] = dynamic_cast(fAOD->FindListObject(fJetBranchName[0].Data())); - aodJets[1] = dynamic_cast(fAOD->FindListObject(fJetBranchName[1].Data())); } + if(fAODOut&&!aodJets[0]){ + aodJets[0] = dynamic_cast(fAODOut->FindListObject(fJetBranchName[0].Data())); + aodJets[1] = dynamic_cast(fAODOut->FindListObject(fJetBranchName[1].Data())); } if(fAODExtension && !aodJets[0]){ aodJets[0] = dynamic_cast(fAODExtension->GetAOD()->FindListObject(fJetBranchName[0].Data())); aodJets[1] = dynamic_cast(fAODExtension->GetAOD()->FindListObject(fJetBranchName[1].Data())); } + if(fAODIn&&!aodJets[0]){ + aodJets[0] = dynamic_cast(fAODIn->FindListObject(fJetBranchName[0].Data())); + aodJets[1] = dynamic_cast(fAODIn->FindListObject(fJetBranchName[1].Data())); } + - //Double_t ptsub[aodJets[0]->GetEntriesFast()]; - //Int_t inord[aodJets[0]->GetEntriesFast()]; - //for(Int_t n=0;nGetEntriesFast();n++){ - // ptsub[n]=0; - // inord[n]=0;} + Int_t nT=0; TList ParticleList; - Int_t nT = GetListOfTracks(&ParticleList); + Double_t minT=0; + Double_t maxT=0; + Int_t number=0; + Double_t dice=fRandom->Uniform(0,1); + if(dice>fFrac){ minT=fTTLowRef; + maxT=fTTUpRef;} + if(dice<=fFrac){minT=fTTLowSig; + maxT=fTTUpSig;} + + + + if(fHardest==1 || fHardest==2) nT = GetListOfTracks(&ParticleList); + if(fHardest==0) nT=SelectTrigger(&ParticleList,minT,maxT,number); + if(nT<0){ + PostData(1, fOutputList); + return;} + + if(dice>fFrac) fh1TrigRef->Fill(number); + if(dice<=fFrac)fh1TrigSig->Fill(number); + for (Int_t iJetType = 0; iJetType < 2; iJetType++) { fListJets[iJetType]->Clear(); if (!aodJets[iJetType]) continue; - if(fDebug) Printf("%s: %d jets",fJetBranchName[iJetType].Data(),aodJets[iJetType]->GetEntriesFast()); - - for (Int_t iJet = 0; iJet < aodJets[iJetType]->GetEntriesFast(); iJet++) { AliAODJet *jet = dynamic_cast((*aodJets[iJetType])[iJet]); if (jet) fListJets[iJetType]->Add(jet); @@ -531,76 +757,155 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *) Double_t etasmall=0; Double_t ptsmall=0; Double_t areasmall=0; - //Double_t distr=0.; Double_t phismall=0.; - // Double_t up1[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; - // Double_t up2[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; - // Double_t up3[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; - // Double_t up4[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; - // Double_t down1[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; - // Double_t down2[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; - // Double_t down3[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; - // Double_t down4[15]={0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; + Int_t iCount=0; Int_t trigJet=-1; Int_t trigBBTrack=-1; Int_t trigInTrack=-1; - + fRPAngle = aod->GetHeader()->GetEventplane(); + + if(fHardest==0 || fHardest==1){ + AliVParticle *partback = (AliVParticle*)ParticleList.At(nT); + if(!partback){ + PostData(1, fOutputList); + return;} + + if(fSemigoodCorrect){ + Double_t disthole=RelativePhi(partback->Phi(),fHolePos); + if(TMath::Abs(disthole)+fHoleWidth>TMath::Pi()-0.6){ + PostData(1, fOutputList); + return;}} + + + } + + + for(Int_t tt=0;ttPt()<8) continue; + + Double_t accep=2.*TMath::Pi()*1.8; + Int_t injet4=0; + Int_t injet=0; + + if(fSemigoodCorrect){ + Double_t disthole=RelativePhi(partback->Phi(),fHolePos); + if(TMath::Abs(disthole)+fHoleWidth>TMath::Pi()-0.6) continue;} + + + + fh2Ntriggers->Fill(centValue,partback->Pt()); + Double_t phiBinT = RelativePhi(partback->Phi(),fRPAngle); + if(centValue<20.) fh2RPTC20->Fill(TMath::Abs(phiBinT),partback->Pt()); + if(centValue<10.) fh2RPTC10->Fill(TMath::Abs(phiBinT),partback->Pt()); + + + for(Int_t i=0; iGetEntries(); ++i){ AliAODJet* jetbig = (AliAODJet*)(fListJets[0]->At(i)); etabig = jetbig->Eta(); phibig = jetbig->Phi(); ptbig = jetbig->Pt(); if(ptbig==0) continue; + Double_t phiBin = RelativePhi(phibig,fRPAngle); areabig = jetbig->EffectiveAreaCharged(); Double_t ptcorr=ptbig-rho*areabig; - if(ptcorr<=0) continue; if((etabigfJetEtaMax)) continue; + if(areabig>=0.07) injet=injet+1; + if(areabig>=0.4) injet4=injet4+1; + Double_t dphi=RelativePhi(partback->Phi(),phibig); + + if(fFlagEtaBkg==1){ + Double_t etadif= partback->Eta()-etabig; + if(TMath::Abs(etadif)<=0.5){ + + if(centValue<20.) fh3JetTrackC20->Fill(partback->Pt(),ptcorr,TMath::Abs(dphi)); + if(centValue>30. && centValue<60.) fh3JetTrackC3060->Fill(partback->Pt(),ptcorr,TMath::Abs(dphi));}} + if(fFlagEtaBkg==0){ + if(centValue<20.) fh3JetTrackC20->Fill(partback->Pt(),ptcorr,TMath::Abs(dphi)); + if(centValue>30. && centValue<60.) fh3JetTrackC3060->Fill(partback->Pt(),ptcorr,TMath::Abs(dphi));} + + + if(fFlagJetHadron==0){ + if(fFlagPhiBkg==1) if((TMath::Abs(dphi)TMath::Pi()/2.+0.1)) continue; + if(fFlagPhiBkg==0) if(TMath::Abs(dphi)0.4) continue; + + + if(centValue<10.) fh2RPJetsC10->Fill(TMath::Abs(phiBin), ptcorr); + if(centValue<20.) fh2RPJetsC20->Fill(TMath::Abs(phiBin), ptcorr); Double_t dismin=100.; Double_t ptmax=-10.; Int_t index1=-1; Int_t index2=-1; - - Int_t point=GetHardestTrackBackToJet(jetbig); - AliVParticle *partback = (AliVParticle*)ParticleList.At(point); - if(!partback) continue; - fh3spectriggered->Fill(centValue,ptcorr,partback->Pt()); - AliAODTrack* leadtrack; + + Float_t phitt=partback->Phi(); + if(phitt<0)phitt+=TMath::Pi()*2.; + Int_t phiBintt = GetPhiBin(phitt-fRPAngle); + + Double_t fillspec[] = {centValue,jetbig->EffectiveAreaCharged(),ptcorr,partback->Pt(), static_cast(phiBintt)}; + fHJetSpec->Fill(fillspec); + + + + if(ptcorr<=0) continue; + + AliAODTrack* leadtrack=0; Int_t ippt=0; - Double_t ppt=-10; - TRefArray *genTrackList = jetbig->GetRefTracks(); - Int_t nTracksGenJet = genTrackList->GetEntriesFast(); - AliAODTrack* genTrack; - for(Int_t ir=0; irAt(ir)); - if(genTrack->Pt()>ppt){ppt=genTrack->Pt(); - ippt=ir;}} - leadtrack=(AliAODTrack*)(genTrackList->At(ippt)); - if(!leadtrack) continue; - fh3specbiased->Fill(centValue,ptcorr,leadtrack->Pt()); - if(centValue<10)fh3spectot->Fill(ptcorr,leadtrack->Pt(),partback->Pt()); - //store one trigger info - if((partback->Pt()>10.)&&(iCount==0)){ - trigJet=i; - trigBBTrack=point; - trigInTrack=ippt; - iCount=iCount+1;} - - - if(fCheckMethods){ - for(Int_t j=0; jGetEntries(); ++j){ - AliAODJet* jetsmall = (AliAODJet*)(fListJets[1]->At(j)); - etasmall = jetsmall->Eta(); - phismall = jetsmall->Phi(); - ptsmall = jetsmall->Pt(); - areasmall = jetsmall->EffectiveAreaCharged(); - Double_t tmpDeltaR=(phismall-phibig)*(phismall-phibig)+(etasmall-etabig)*(etasmall-etabig); - tmpDeltaR=TMath::Sqrt(tmpDeltaR); - //Fraction in the jet core - if((ptsmall>ptmax)&&(tmpDeltaR<=fRadioFrac)){ptmax=ptsmall; - index2=j;} + Double_t ppt=-10; + if(fFlagJetHadron==0){ + TRefArray *genTrackList = jetbig->GetRefTracks(); + Int_t nTracksGenJet = genTrackList->GetEntriesFast(); + AliAODTrack* genTrack; + for(Int_t ir=0; irAt(ir)); + if(genTrack->Pt()>ppt){ppt=genTrack->Pt(); + ippt=ir;}} + leadtrack=(AliAODTrack*)(genTrackList->At(ippt)); + if(!leadtrack) continue; + } + + + + AliVParticle* leadtrackb=0; + if(fFlagJetHadron!=0){ + Int_t nTb = GetHardestTrackBackToJet(jetbig); + leadtrackb = (AliVParticle*)ParticleList.At(nTb); + if(!leadtrackb) continue; + } + + + + + + //store one trigger info + if(iCount==0){ + trigJet=i; + trigBBTrack=nT; + trigInTrack=ippt; + iCount=iCount+1;} + + + if(fCheckMethods){ + for(Int_t j=0; jGetEntries(); ++j){ + AliAODJet* jetsmall = (AliAODJet*)(fListJets[1]->At(j)); + etasmall = jetsmall->Eta(); + phismall = jetsmall->Phi(); + ptsmall = jetsmall->Pt(); + areasmall = jetsmall->EffectiveAreaCharged(); + Double_t tmpDeltaR=(phismall-phibig)*(phismall-phibig)+(etasmall-etabig)*(etasmall-etabig); + tmpDeltaR=TMath::Sqrt(tmpDeltaR); + //Fraction in the jet core + if((ptsmall>ptmax)&&(tmpDeltaR<=fRadioFrac)){ptmax=ptsmall; + index2=j;} if(tmpDeltaR<=dismin){ dismin=tmpDeltaR; index1=j;}} //en of loop over R=0.2 jets //method1:most concentric jet=core @@ -616,72 +921,120 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *) if((centValue>20)&&(centValue<40)) fh2JetCoreMethod2C20->Fill(ptcorr,jetmethod2->Pt()/ptbig); if((centValue>30)&&(centValue<60)) fh2JetCoreMethod2C30->Fill(ptcorr,jetmethod2->Pt()/ptbig); if(centValue>60) fh2JetCoreMethod2C60->Fill(ptcorr,jetmethod2->Pt()/ptbig); }} - - for(int it = 0;itFill(leadtrack->Pt(),partback->Pt()); + if(centValue<20&&leadtrack) fh2Ntriggers2C20->Fill(leadtrack->Pt(),partback->Pt()); + if(fDoEventMixing==0 && fFlagOnlyRecoil==0){ + for(int it = 0;itDeltaR(part); Double_t deltaEta = etabig-part->Eta(); + Double_t deltaPhi=phibig-part->Phi(); if(deltaPhi<-0.5*TMath::Pi()) deltaPhi+=2.*TMath::Pi(); if(deltaPhi>3./2.*TMath::Pi()) deltaPhi-=2.*TMath::Pi(); - Double_t jetEntries[8] = {centValue,ptcorr,part->Pt(),deltaR,deltaEta,deltaPhi,leadtrack->Pt(),partback->Pt()}; fhnDeltaR->Fill(jetEntries); - } - //end of track loop - } - //end of jet loop + Double_t pTcont=0; + if(fFlagJetHadron==0) pTcont=leadtrack->Pt(); + if(fFlagJetHadron!=0) pTcont=leadtrackb->Pt(); + Double_t jetEntries[8] = {centValue,ptcorr,part->Pt(),deltaR,deltaEta,deltaPhi,pTcont,partback->Pt()}; + fhnDeltaR->Fill(jetEntries);} + + + } + + + //end of track loop, we only do it if EM is switched off + - if(fDoEventMixing){ + + + + + } + if(injet>0) fh3JetDensity->Fill(ParticleList.GetEntries(),injet/accep,partback->Pt()); + if(injet4>0)fh3JetDensityA4->Fill(ParticleList.GetEntries(),injet4/accep,partback->Pt()); + //end of jet loop + + //} + + + if(fDoEventMixing>0){ //check before if the trigger exists // fTrigBuffer[i][0] = zvtx // fTrigBuffer[i][1] = phi // fTrigBuffer[i][2] = eta // fTrigBuffer[i][3] = pt_jet // fTrigBuffer[i][4] = pt_trig - // fTrigBuffer[i][5]= pt_track_in - // fTrigBuffer[i][6]= centrality - if(fTindex==11) fTindex=0; + // fTrigBuffer[i][5]= centrality + if(fTindex==10) fTindex=0; if(fTrigBuffer[fTindex][3]>0){ if (TMath::Abs(fTrigBuffer[fTindex][0]-primVtx->GetZ()<2.)){ - if (TMath::Abs(fTrigBuffer[fTindex][6]-centValue<10)){ + if (TMath::Abs(fTrigBuffer[fTindex][5]-centValue<5)){ for(int it = 0;itPhi(); + AliVParticle *part = (AliVParticle*)ParticleList.At(it); + Double_t DPhi = fTrigBuffer[fTindex][1] - part->Phi(); Double_t DEta = fTrigBuffer[fTindex][2] - part->Eta(); Double_t DR=TMath::Sqrt(DPhi*DPhi+DEta*DEta); if(DPhi<-0.5*TMath::Pi()) DPhi+=2.*TMath::Pi(); if(DPhi>3./2.*TMath::Pi()) DPhi-=2.*TMath::Pi(); - Double_t triggerEntries[8] = {centValue,fTrigBuffer[fTindex][3],part->Pt(),DR,DEta,DPhi,fTrigBuffer[fTindex][4],fTrigBuffer[fTindex][5]}; + Double_t triggerEntries[7] = {centValue,fTrigBuffer[fTindex][3],part->Pt(),DR,DEta,DPhi,fTrigBuffer[fTindex][4]}; fhnMixedEvents->Fill(triggerEntries); } fNevents=fNevents+1; - if(fNevents==9) {fTindex=fTindex+1; - fNevents=0;} + if(fNevents==10) fTindex=fTindex+1; }}} - + + if(fTindex==10&&fNevents==10) fCountAgain=0; // Copy the triggers from the current event into the buffer. //again, only if the trigger exists: + if(fCountAgain==0){ if(trigJet>-1){ - AliAODJet* jetT = (AliAODJet*)(fListJets[0]->At(trigJet)); - AliVParticle *partL = (AliVParticle*)ParticleList.At(trigInTrack); - AliVParticle *partT = (AliVParticle*)ParticleList.At(trigBBTrack); + AliAODJet* jetT = (AliAODJet*)(fListJets[0]->At(trigJet)); AliVParticle *partT = (AliVParticle*)ParticleList.At(trigBBTrack); fTrigBuffer[fTrigBufferIndex][0] = primVtx->GetZ(); fTrigBuffer[fTrigBufferIndex][1] = jetT->Phi(); fTrigBuffer[fTrigBufferIndex][2] = jetT->Eta(); fTrigBuffer[fTrigBufferIndex][3] = jetT->Pt()-rho*jetT->EffectiveAreaCharged(); fTrigBuffer[fTrigBufferIndex][4] = partT->Pt(); - fTrigBuffer[fTrigBufferIndex][5] = partL->Pt(); - fTrigBuffer[fTrigBufferIndex][6] = centValue; + fTrigBuffer[fTrigBufferIndex][5] = centValue; fTrigBufferIndex++; - if(fTrigBufferIndex==9) fTrigBufferIndex=0; + if(fTrigBufferIndex==9) {fTrigBufferIndex=0; + fCountAgain=1;} } - } + } + } - + ///////////////////////////////////////////////////////////////////////////// + ////////////////////// Rongrong's analysis ////////////////////////////////// + if(fRunAnaAzimuthalCorrelation) + { + fhTTPt->Fill(centValue,partback->Pt()); + for(Int_t ij=0; ijGetEntries(); ij++) + { + AliAODJet* jet = (AliAODJet*)(fListJets[0]->At(ij)); + Double_t jetPt = jet->Pt(); + Double_t jetEta = jet->Eta(); + Double_t jetPhi = jet->Phi(); + if(jetPt==0) continue; + if((jetEtafJetEtaMax)) continue; + Double_t jetArea = jet->EffectiveAreaCharged(); + Double_t jetPtCorr=jetPt-rho*jetArea; + Double_t dPhi=jetPhi-partback->Phi(); + if(dPhi>2*TMath::Pi()) dPhi -= 2*TMath::Pi(); + if(dPhi<-2*TMath::Pi()) dPhi += 2*TMath::Pi(); + if(dPhi<-0.5*TMath::Pi()) dPhi += 2*TMath::Pi(); + if(dPhi>1.5*TMath::Pi()) dPhi -= 2*TMath::Pi(); + + Double_t fill[] = {partback->Pt(),jetPtCorr,dPhi,jetArea,centValue}; + fHJetPhiCorr->Fill(fill); + } + } + ///////////////////////////////////////////////////////////////////////////// + ///////////////////////////////////////////////////////////////////////////// //////////////////ANGULAR STRUCTURE////////////////////////////////////// @@ -775,7 +1128,7 @@ void AliAnalysisTaskJetCore::UserExec(Option_t *) - + } @@ -793,50 +1146,158 @@ void AliAnalysisTaskJetCore::Terminate(const Option_t *) + +Int_t AliAnalysisTaskJetCore::GetListOfTracks(TList *list){ + Int_t iCount = 0; + AliAODEvent *aod = 0; + if(!fESD)aod = fAODIn; + else aod = fAODOut; + if(!aod)return 0; + Int_t index=-1; + Double_t ptmax=-10; -Int_t AliAnalysisTaskJetCore::GetListOfTracks(TList *list){ - - Int_t iCount = 0; - - for(int it = 0;it < fAOD->GetNumberOfTracks();++it){ - AliAODTrack *tr = fAOD->GetTrack(it); + for(int it = 0;it < aod->GetNumberOfTracks();++it){ + AliAODTrack *tr = aod->GetTrack(it); + Bool_t bGood = false; + if(fFilterType == 0)bGood = true; + else if(fFilterType == 1)bGood = tr->IsHybridTPCConstrainedGlobal(); + else if(fFilterType == 2)bGood = tr->IsHybridGlobalConstrainedGlobal(); if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue; - if(TMath::Abs(tr->Eta())>0.9)continue; + if(fRequireITSRefit==1){if((tr->GetStatus()&AliESDtrack::kITSrefit)==0)continue;} + if(bGood==false) continue; + if (fApplySharedClusterCut) { + Double_t frac = Double_t(tr->GetTPCnclsS()) /Double_t(tr->GetTPCncls()); + if (frac > 0.4) continue; + } + if(TMath::Abs(tr->Eta())>0.9)continue; if(tr->Pt()<0.15)continue; list->Add(tr); - //cout<GetNumberOfTracks()<<" "<Pt()<0){// only set the trigger track index for good quality tracks + if(tr->TestFilterBit(fFilterMaskBestPt)){ + if(tr->Pt()>ptmax){ + ptmax=tr->Pt(); + index=iCount-1; + } + } + } + else{ + if(tr->Pt()>ptmax){ + ptmax=tr->Pt(); + index=iCount-1; + } + } + } - return iCount; + // else if (type == kTrackAODMCCharged) { + // TClonesArray *tca = dynamic_cast(aod->FindListObject(AliAODMCParticle::StdBranchName())); + // if(!tca)return iCount; + // for(int it = 0;it < tca->GetEntriesFast();++it){ + // AliAODMCParticle *part = dynamic_cast(tca->At(it)); + // if(!part)continue; + // if(part->Pt()<0.15)continue; + // if(!part->IsPhysicalPrimary())continue; + // if(part->Charge()==0)continue; + // if(TMath::Abs(part->Eta())>0.9)continue; + // list->Add(part); + // iCount++; + // if(part->Pt()>ptmax){ ptmax=part->Pt(); + // index=iCount-1;}}} + return index; } - Int_t AliAnalysisTaskJetCore::GetHardestTrackBackToJet(AliAODJet *jetbig){ + +Int_t AliAnalysisTaskJetCore::SelectTrigger(TList *list,Double_t minT,Double_t maxT,Int_t &number){ + Int_t iCount = 0; + AliAODEvent *aod = 0; + if(!fESD)aod = fAODIn; + else aod = fAODOut; + if(!aod)return 0; + Int_t index=-1; + Int_t triggers[100]; + for(Int_t cr=0;cr<100;cr++){triggers[cr]=-1;} + Int_t im=0; + for(int it = 0;it < aod->GetNumberOfTracks();++it){ + AliAODTrack *tr = aod->GetTrack(it); + Bool_t bGood = false; + if(fFilterType == 0)bGood = true; + else if(fFilterType == 1)bGood = tr->IsHybridTPCConstrainedGlobal(); + else if(fFilterType == 2)bGood = tr->IsHybridGlobalConstrainedGlobal(); + if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue; + if(fRequireITSRefit==1){if((tr->GetStatus()&AliESDtrack::kITSrefit)==0)continue;} + if(bGood==false) continue; + if (fApplySharedClusterCut) { + Double_t frac = Double_t(tr->GetTPCnclsS()) /Double_t(tr->GetTPCncls()); + if (frac > 0.4) continue; + } + if(TMath::Abs(tr->Eta())>0.9)continue; + if(tr->Pt()<0.15)continue; + list->Add(tr); + iCount++; + + if(tr->Pt()>=minT && tr->Pt()0) rd=fRandom->Integer(im); + index=triggers[rd]; + + + + + return index; + +} + + + + + + + + + + + + + + + + + Int_t AliAnalysisTaskJetCore::GetHardestTrackBackToJet(AliAODJet *jetbig){ + + AliAODEvent *aod = 0; + if(!fESD)aod = fAODIn; + else aod = fAODOut; Int_t index=-1; Double_t ptmax=-10; Double_t dphi=0; Double_t dif=0; Int_t iCount=0; - for(int it = 0;it < fAOD->GetNumberOfTracks();++it){ - AliAODTrack *tr = fAOD->GetTrack(it); + for(int it = 0;it < aod->GetNumberOfTracks();++it){ + AliAODTrack *tr = aod->GetTrack(it); if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue; if(TMath::Abs(tr->Eta())>0.9)continue; if(tr->Pt()<0.15)continue; iCount=iCount+1; dphi=RelativePhi(tr->Phi(),jetbig->Phi()); - if(TMath::Abs(dphi)Pt()>ptmax){ ptmax=tr->Pt(); index=iCount-1; dif=dphi; }} @@ -856,10 +1317,12 @@ Int_t AliAnalysisTaskJetCore::GetListOfTracks(TList *list){ Int_t AliAnalysisTaskJetCore::GetListOfTracksCloseToJet(TList *list,AliAODJet *jetbig){ Int_t iCount = 0; - + AliAODEvent *aod = 0; + if(!fESD)aod = fAODIn; + else aod = fAODOut; - for(int it = 0;it < fAOD->GetNumberOfTracks();++it){ - AliAODTrack *tr = fAOD->GetTrack(it); + for(int it = 0;it < aod->GetNumberOfTracks();++it){ + AliAODTrack *tr = aod->GetTrack(it); if((fFilterMask>0)&&!(tr->TestFilterBit(fFilterMask)))continue; if(TMath::Abs(tr->Eta())>0.9)continue; if(tr->Pt()<0.15)continue; @@ -889,7 +1352,9 @@ Int_t AliAnalysisTaskJetCore::GetNInputTracks() { Int_t nInputTracks = 0; - + AliAODEvent *aod = 0; + if(!fESD)aod = fAODIn; + else aod = fAODOut; TString jbname(fJetBranchName[1]); //needs complete event, use jets without background subtraction for(Int_t i=1; i<=3; ++i){ @@ -900,7 +1365,7 @@ Int_t AliAnalysisTaskJetCore::GetNInputTracks() if(jbname.Contains("AODextra")) jbname.ReplaceAll("AODextra","AOD"); if(fDebug) Printf("Multiplicity from jet branch %s", jbname.Data()); - TClonesArray *tmpAODjets = dynamic_cast(fAOD->FindListObject(jbname.Data())); + TClonesArray *tmpAODjets = dynamic_cast(aod->FindListObject(jbname.Data())); if(!tmpAODjets){ Printf("Jet branch %s not found", jbname.Data()); Printf("AliAnalysisTaskJetCore::GetNInputTracks FAILED"); @@ -934,6 +1399,17 @@ Double_t AliAnalysisTaskJetCore::RelativePhi(Double_t mphi,Double_t vphi){ return dphi;//dphi in [-Pi, Pi] } +Int_t AliAnalysisTaskJetCore::GetPhiBin(Double_t phi) +{ + Int_t phibin=-1; + if(!(TMath::Abs(phi)<=2*TMath::Pi())){AliError("phi w.r.t. RP out of defined range");return -1;} + Double_t phiwrtrp=TMath::ACos(TMath::Abs(TMath::Cos(phi))); + phibin=Int_t(fNRPBins*phiwrtrp/(0.5*TMath::Pi())); + if(phibin<0||phibin>=fNRPBins){AliError("Phi Bin not defined");} + return phibin; +} + + THnSparse* AliAnalysisTaskJetCore::NewTHnSparseF(const char* name, UInt_t entries) @@ -990,7 +1466,7 @@ void AliAnalysisTaskJetCore::GetDimParams(Int_t iEntry, TString &label, Int_t &n case 1: label = "corrected jet pt"; - nbins = 50; + nbins = 20; xmin = 0.; xmax = 200.; break; @@ -999,9 +1475,9 @@ void AliAnalysisTaskJetCore::GetDimParams(Int_t iEntry, TString &label, Int_t &n case 2: label = "track pT"; - nbins = 1000; + nbins = 9; xmin = 0.; - xmax = 50; + xmax = 150; break; @@ -1016,9 +1492,9 @@ void AliAnalysisTaskJetCore::GetDimParams(Int_t iEntry, TString &label, Int_t &n case 4: label = "deltaEta"; - nbins = 30; - xmin = -1.5; - xmax = 1.5; + nbins = 8; + xmin = -1.6; + xmax = 1.6; break; @@ -1033,7 +1509,7 @@ void AliAnalysisTaskJetCore::GetDimParams(Int_t iEntry, TString &label, Int_t &n case 6: label = "leading track"; - nbins = 50; + nbins = 13; xmin = 0; xmax = 50; break; @@ -1041,7 +1517,7 @@ void AliAnalysisTaskJetCore::GetDimParams(Int_t iEntry, TString &label, Int_t &n case 7: label = "trigger track"; - nbins =50; + nbins =10; xmin = 0; xmax = 50; break;