From: loizides Date: Mon, 26 Aug 2013 19:38:13 +0000 (+0000) Subject: from Marta X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=6ab30d5fc9bf421ce062e73a665f199039653d3d from Marta --- diff --git a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.cxx b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.cxx index e02d328cde3..0119be06535 100644 --- a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.cxx +++ b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.cxx @@ -424,41 +424,9 @@ AliEmcalJet* AliAnalysisTaskEmcalDiJetAna::GetLeadingAssociatedJet(const Int_t t typea = fContainerCharged; else if(type==2) //full-charged typea = fContainerCharged; - - Int_t nJetsAssoc = GetNJets(typea); - Double_t ptLead = -999; - Int_t iJetLead = -1; - for(Int_t ija=0; ija(GetJetFromArray(ija, typea)); - if(TMath::Abs(jetAssoc->Eta())>0.5) - jetAssoc = NULL; - } - else - jetAssoc = static_cast(GetAcceptJetFromArray(ija, typea)); - - if(!jetAssoc) - continue; - - Double_t dPhi = GetDeltaPhi(jetTrig,jetAssoc); - Double_t phiMin = 0.5*TMath::Pi(); - Double_t phiMax = 1.5*TMath::Pi(); - if(dPhiphiMax) - continue; - - Double_t jetAssocPt = GetJetPt(jetAssoc,typea); - - if(jetAssocPt>ptLead) { - ptLead = jetAssocPt; - iJetLead = ija; - } - - } + AliEmcalJet *jetAssocLead = GetLeadingJetOppositeHemisphere(type, typea, jetTrig); - AliEmcalJet *jetAssocLead = static_cast(GetJetFromArray(iJetLead, typea)); - return jetAssocLead; } diff --git a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.h b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.h index 21a64a3afe1..6aade9b82cf 100644 --- a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.h +++ b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetAna.h @@ -67,6 +67,6 @@ class AliAnalysisTaskEmcalDiJetAna : public AliAnalysisTaskEmcalDiJetBase { AliAnalysisTaskEmcalDiJetAna(const AliAnalysisTaskEmcalDiJetAna&); // not implemented AliAnalysisTaskEmcalDiJetAna &operator=(const AliAnalysisTaskEmcalDiJetAna&); // not implemented - ClassDef(AliAnalysisTaskEmcalDiJetAna, 4) // dijet analysis task + ClassDef(AliAnalysisTaskEmcalDiJetAna, 5) // dijet analysis task }; #endif diff --git a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.cxx b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.cxx index e5bf4bcd5d6..92d42832e7a 100644 --- a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.cxx +++ b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.cxx @@ -605,6 +605,51 @@ void AliAnalysisTaskEmcalDiJetBase::SetChargedFractionIndexMC() { } +//_______________________________________________________________________ +AliEmcalJet* AliAnalysisTaskEmcalDiJetBase::GetLeadingJetOppositeHemisphere(const Int_t type, const Int_t typea, const AliEmcalJet *jetTrig) { + + // Get leading jet in opposite hemisphere from trigger jet + // type = correlation type + // typea = container of associated jets + + Int_t nJetsAssoc = GetNJets(typea); + Double_t ptLead = -999; + Int_t iJetLead = -1; + for(Int_t ija=0; ija(GetJetFromArray(ija, typea)); + if(TMath::Abs(jetAssoc->Eta())>0.5) + jetAssoc = NULL; + } + else + jetAssoc = static_cast(GetAcceptJetFromArray(ija, typea)); + + if(!jetAssoc) + continue; + + Double_t dPhi = GetDeltaPhi(jetTrig,jetAssoc); + Double_t phiMin = 0.5*TMath::Pi(); + Double_t phiMax = 1.5*TMath::Pi(); + if(dPhiphiMax) + continue; + + Double_t jetAssocPt = GetJetPt(jetAssoc,typea); + + if(jetAssocPt>ptLead) { + ptLead = jetAssocPt; + iJetLead = ija; + } + + } + + AliEmcalJet *jetAssocLead = static_cast(GetJetFromArray(iJetLead, typea)); + + return jetAssocLead; + +} + //________________________________________________________________________ Bool_t AliAnalysisTaskEmcalDiJetBase::PythiaInfoFromFile(const char* currFile, Float_t &xsec, Float_t &trials, Int_t &pthard) { diff --git a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.h b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.h index 225920f88ea..be55dcea691 100644 --- a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.h +++ b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.h @@ -77,6 +77,8 @@ class AliAnalysisTaskEmcalDiJetBase : public AliAnalysisTaskEmcalJetDev { Double_t GetZ(const AliVParticle *trk, const AliEmcalJet *jet) const; Double_t GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz, const Double_t jetPx, const Double_t jetPy, const Double_t jetPz) const; + AliEmcalJet* GetLeadingJetOppositeHemisphere(const Int_t type, const Int_t typea, const AliEmcalJet *jetTrig); + protected: virtual Bool_t RetrieveEventObjects(); @@ -138,6 +140,6 @@ class AliAnalysisTaskEmcalDiJetBase : public AliAnalysisTaskEmcalJetDev { AliAnalysisTaskEmcalDiJetBase(const AliAnalysisTaskEmcalDiJetBase&); // not implemented AliAnalysisTaskEmcalDiJetBase &operator=(const AliAnalysisTaskEmcalDiJetBase&); // not implemented - ClassDef(AliAnalysisTaskEmcalDiJetBase, 3) // dijet base task + ClassDef(AliAnalysisTaskEmcalDiJetBase, 4) // dijet base task }; #endif diff --git a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetResponse.cxx b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetResponse.cxx index bebb7785f06..fa9851d9641 100644 --- a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetResponse.cxx +++ b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetResponse.cxx @@ -45,10 +45,10 @@ AliAnalysisTaskEmcalDiJetResponse::AliAnalysisTaskEmcalDiJetResponse() : fh3AssocLostPtDeltaPhiCharged(0), fh3AssocLostPtDeltaPhiFull(0), fhnMatchingCharged(0), - fhnMatchingFull(0) + fhnMatchingFull(0), + fnUsedResponseVar(0) { // Default constructor. - SetMakeGeneralHistograms(kTRUE); @@ -70,7 +70,8 @@ AliAnalysisTaskEmcalDiJetResponse::AliAnalysisTaskEmcalDiJetResponse(const char fh3AssocLostPtDeltaPhiCharged(0), fh3AssocLostPtDeltaPhiFull(0), fhnMatchingCharged(0), - fhnMatchingFull(0) + fhnMatchingFull(0), + fnUsedResponseVar(0) { // Standard constructor. @@ -107,18 +108,34 @@ void AliAnalysisTaskEmcalDiJetResponse::UserCreateOutputObjects() const Int_t nBinsPt = 250; const Int_t nBinsDPhi = 72; const Int_t nBinsKt = 50; - const Int_t nBins0[nBinsSparse0] = {nBinsPt,nBinsPt,nBinsPt,nBinsPt,nBinsDPhi,nBinsDPhi,nBinsKt,nBinsKt}; + const Int_t nBinsDiJetEta = 40; + const Int_t nBinsVar[2] = {nBinsKt,nBinsDiJetEta}; + + const Int_t nBins0[nBinsSparse0] = {nBinsPt,nBinsPt,nBinsPt,nBinsPt,nBinsDPhi,nBinsDPhi,nBinsVar[fnUsedResponseVar],nBinsVar[fnUsedResponseVar]}; const Double_t minPt = 0.; const Double_t maxPt = 250.; + const Double_t minVar[2] = {-100.,-1.}; + const Double_t maxVar[2] = { 100., 1.}; - const Double_t xmin0[nBinsSparse0] = { minPt, minPt, minPt, minPt, -0.5*TMath::Pi(), -0.5*TMath::Pi(), -100.,-100.}; - const Double_t xmax0[nBinsSparse0] = { maxPt, maxPt, maxPt, maxPt, 1.5*TMath::Pi(), 1.5*TMath::Pi(), 100., 100.}; + const Double_t xmin0[nBinsSparse0] = { minPt, minPt, minPt, minPt, -0.5*TMath::Pi(), -0.5*TMath::Pi(), minVar[fnUsedResponseVar], minVar[fnUsedResponseVar]}; + const Double_t xmax0[nBinsSparse0] = { maxPt, maxPt, maxPt, maxPt, 1.5*TMath::Pi(), 1.5*TMath::Pi(), maxVar[fnUsedResponseVar], maxVar[fnUsedResponseVar]}; fhnDiJetResponseCharged = new THnSparseF("fhnDiJetResponseCharged","fhnDiJetResponseCharged;p_{T,trig}^{part};p_{T,trig}^{det};p_{T,ass}^{part};p_{T,ass}^{det};#Delta#varphi_{part};#Delta#varphi_{det};k_{T}^{part},k_{T}^{det}",nBinsSparse0,nBins0,xmin0,xmax0); - fOutput->Add(fhnDiJetResponseCharged); fhnDiJetResponseFullCharged = new THnSparseF("fhnDiJetResponseFullCharged","fhnDiJetResponseFullCharged;p_{T,trig}^{part};p_{T,trig}^{det};p_{T,ass}^{part};p_{T,ass}^{det};#Delta#varphi_{part};#Delta#varphi_{det};k_{T}^{part},k_{T}^{det}",nBinsSparse0,nBins0,xmin0,xmax0); + + if(fnUsedResponseVar==1) { + fhnDiJetResponseCharged->SetTitle("fhnDiJetResponseCharged DiJetEta"); + fhnDiJetResponseCharged->GetAxis(6)->SetTitle("#eta_{dijet}^{part}"); + fhnDiJetResponseCharged->GetAxis(7)->SetTitle("#eta_{dijet}^{det}"); + + fhnDiJetResponseFullCharged->SetTitle("fhnDiJetResponseFullCharged DiJetEta"); + fhnDiJetResponseFullCharged->GetAxis(6)->SetTitle("#eta_{dijet}^{part}"); + fhnDiJetResponseFullCharged->GetAxis(7)->SetTitle("#eta_{dijet}^{det}"); + } + + fOutput->Add(fhnDiJetResponseCharged); fOutput->Add(fhnDiJetResponseFullCharged); TString strType = ""; @@ -231,6 +248,24 @@ void AliAnalysisTaskEmcalDiJetResponse::CorrelateJets(const Int_t type) { // Correlate jets and fill histos // + if( fJetCorrelationType==kCorrelateAll ) + CorrelateAllJets(type); + else if( fJetCorrelationType==kCorrelateTwo ) + CorrelateTwoJets(type); + else if( fJetCorrelationType==kCorrelateLS ) + AliWarning(Form("%s: leading-subleading correlation not implemented for response!",GetName())); + + return; + +} + + +//________________________________________________________________________ +void AliAnalysisTaskEmcalDiJetResponse::CorrelateAllJets(const Int_t type) { + // + // Correlate jets and fill histos + // + Int_t typet = 0; Int_t typea = 0; Int_t typetMC = 0; @@ -324,29 +359,175 @@ void AliAnalysisTaskEmcalDiJetResponse::CorrelateJets(const Int_t type) { continue; } - //Store dijet vars: pt,trig MC; pt,trig DET; pt,ass MC; pt,ass DET; dPhi MC; dPhi Det; kT MC; kT Det; - Double_t diJetVars[8] = { - jetTrigPtMC, - GetJetPt(jetTrigDet,typet), - jetAssocPtMC, - GetJetPt(jetAssocDet,typea), - GetDeltaPhi(jetTrigMC,jetAssocMC), - GetDeltaPhi(jetTrigDet,jetAssocDet), - jetTrigPtMC*TMath::Sin(GetDeltaPhi(jetTrigMC,jetAssocMC)), - GetJetPt(jetTrigDet,typet)*TMath::Sin(GetDeltaPhi(jetTrigDet,jetAssocDet)) - }; + FillDiJetResponse(jetTrigMC,jetAssocMC,jetTrigDet,jetAssocDet,type); + + } // associate jet loop + }//trigger jet loop + +} + +//________________________________________________________________________ +void AliAnalysisTaskEmcalDiJetResponse::CorrelateTwoJets(const Int_t type) { + // + // Correlate jets and fill histos + // + + Int_t typet = 0; + Int_t typea = 0; + Int_t typetMC = 0; + Int_t typeaMC = 0; + if(type==0) { //full-full + typetMC = fContainerFullMC; + typeaMC = fContainerFullMC; + typet = fContainerFull; + typea = fContainerFull; + } + else if(type==1) { //charged-charged + typetMC = fContainerChargedMC; + typeaMC = fContainerChargedMC; + typet = fContainerCharged; + typea = fContainerCharged; + } + else if(type==2) { //full-charged + typetMC = fContainerFullMC; + typeaMC = fContainerChargedMC; + typet = fContainerFull; + typea = fContainerCharged; + } + else { + AliWarning(Form("%s: type %d of dijet correlation not defined!",GetName(),type)); + return; + } + + Int_t nJetsTrig = 0; + Int_t nJetsAssoc = 0; + if(type==0) { + nJetsTrig = GetNJets(fContainerFullMC); + nJetsAssoc = nJetsTrig; + } + else if(type==1) { + nJetsTrig = GetNJets(fContainerChargedMC); + nJetsAssoc = nJetsTrig; + } + else if(type==2) { + nJetsTrig = GetNJets(fContainerFullMC); + nJetsAssoc = GetNJets(fContainerChargedMC); + } + + for(Int_t ijt=0; ijt(GetAcceptJetFromArray(ijt, typetMC)); + if(!jetTrigMC) continue; //jet not selected + + Double_t jetTrigPtMC = GetJetPt(jetTrigMC,typetMC); + + if(jetTrigPtMCFill(jetTrigPtMC); + if(type==2) + fh1TriggersFull[0]->Fill(jetTrigPtMC); + + AliEmcalJet *jetTrigDet = jetTrigMC->ClosestJet(); + if(!jetTrigDet) { + //trigger is lost if(type==1) - fhnDiJetResponseCharged->Fill(diJetVars); - else if(type==2) - fhnDiJetResponseFullCharged->Fill(diJetVars); + fh1TriggersLostCharged->Fill(jetTrigPtMC); + if(type==2) + fh1TriggersLostFull->Fill(jetTrigPtMC); + + continue; + } + + if(type==1) + fh1TriggersCharged[1]->Fill(GetJetPt(jetTrigDet,typet)); + if(type==2) + fh1TriggersFull[1]->Fill(GetJetPt(jetTrigDet,typet)); + + + AliEmcalJet *jetAssocMC = GetLeadingJetOppositeHemisphere(type,typeaMC,jetTrigMC); + if(!jetAssocMC) continue; + Double_t jetAssocPtMC = GetJetPt(jetAssocMC,typeaMC); - } // associate jet loop + //Now check if jets are also there on detector level + AliEmcalJet *jetAssocDet = jetAssocMC->ClosestJet(); + if(!jetAssocDet) { + //dijet is lost + if(type==1) + fh3AssocLostPtDeltaPhiCharged->Fill(jetTrigPtMC,jetAssocPtMC,GetDeltaPhi(jetTrigMC,jetAssocMC)); + if(type==2) + fh3AssocLostPtDeltaPhiFull->Fill(jetTrigPtMC,jetAssocPtMC,GetDeltaPhi(jetTrigMC,jetAssocMC)); + continue; + } + + FillDiJetResponse(jetTrigMC,jetAssocMC,jetTrigDet,jetAssocDet,type); + + }//trigger jet loop } +//________________________________________________________________________ +void AliAnalysisTaskEmcalDiJetResponse::FillDiJetResponse(const AliEmcalJet *jetTrigMC, const AliEmcalJet *jetAssocMC, const AliEmcalJet *jetTrigDet, const AliEmcalJet *jetAssocDet, Int_t type) { + + //Fill dijet response + + Int_t typet = 0; + Int_t typea = 0; + Int_t typetMC = 0; + Int_t typeaMC = 0; + if(type==0) { //full-full + typetMC = fContainerFullMC; + typeaMC = fContainerFullMC; + typet = fContainerFull; + typea = fContainerFull; + } + else if(type==1) { //charged-charged + typetMC = fContainerChargedMC; + typeaMC = fContainerChargedMC; + typet = fContainerCharged; + typea = fContainerCharged; + } + else if(type==2) { //full-charged + typetMC = fContainerFullMC; + typeaMC = fContainerChargedMC; + typet = fContainerFull; + typea = fContainerCharged; + } + else { + AliWarning(Form("%s: type %d of dijet correlation not defined!",GetName(),type)); + return; + } + + Double_t jetTrigPtMC = GetJetPt(jetTrigMC,typetMC); + Double_t jetAssocPtMC = GetJetPt(jetAssocMC,typeaMC); + + Double_t varDet[2] = {GetJetPt(jetTrigDet,typet)*TMath::Sin(GetDeltaPhi(jetTrigDet,jetAssocDet)),(jetTrigDet->Eta()+jetAssocDet->Eta())/2.}; + Double_t varPart[2] = {jetTrigPtMC*TMath::Sin(GetDeltaPhi(jetTrigMC,jetAssocMC)),(jetTrigMC->Eta()+jetAssocMC->Eta())/2.}; + + //Store dijet vars: pt,trig MC; pt,trig DET; pt,ass MC; pt,ass DET; dPhi MC; dPhi Det; kT MC; kT Det; + Double_t diJetVars[8] = { + jetTrigPtMC, + GetJetPt(jetTrigDet,typet), + jetAssocPtMC, + GetJetPt(jetAssocDet,typea), + GetDeltaPhi(jetTrigMC,jetAssocMC), + GetDeltaPhi(jetTrigDet,jetAssocDet), + varPart[fnUsedResponseVar], + varDet[fnUsedResponseVar] + }; + + if(type==1) + fhnDiJetResponseCharged->Fill(diJetVars); + else if(type==2) + fhnDiJetResponseFullCharged->Fill(diJetVars); + + +} + //________________________________________________________________________ void AliAnalysisTaskEmcalDiJetResponse::FillMatchHistos() { // diff --git a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetResponse.h b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetResponse.h index 8f1763c1142..6a5bb72a964 100644 --- a/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetResponse.h +++ b/PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetResponse.h @@ -26,18 +26,24 @@ class AliAnalysisTaskEmcalDiJetResponse : public AliAnalysisTaskEmcalDiJetBase { void Terminate(Option_t *option); //Setters - void SetMatchFullCharged(Bool_t b) { fDoMatchFullCharged = b;} + void SetMatchFullCharged(Bool_t b) { fDoMatchFullCharged = b; } + void SetResponseVar(Int_t v) { fnUsedResponseVar = v; } //Getters protected: Bool_t Run() ; void CorrelateJets(const Int_t type); + void CorrelateAllJets(const Int_t type); + void CorrelateTwoJets(const Int_t type); + Bool_t FillHistograms() ; void FillDiJetHistos(const AliEmcalJet *jet1 = 0, const AliEmcalJet *jet2 = 0, const Int_t mode = 0); void FillMatchHistos(); Bool_t RetrieveEventObjects(); + void FillDiJetResponse(const AliEmcalJet *jetTrigMC = 0, const AliEmcalJet *jetAssocMC = 0, const AliEmcalJet *jetTrigDet = 0, const AliEmcalJet *jetAssocDet = 0, Int_t type = 0); + private: Bool_t fDoMatchFullCharged; // do full-charged matching histos THnSparse *fhnDiJetResponseCharged; //! sparse with di-jet properties (full-full) @@ -50,11 +56,12 @@ class AliAnalysisTaskEmcalDiJetResponse : public AliAnalysisTaskEmcalDiJetBase { TH3F *fh3AssocLostPtDeltaPhiFull; //! lost full associated jet THnSparse *fhnMatchingCharged; //! sparse comparing matched particle and detector level charged jets THnSparse *fhnMatchingFull; //! sparse comparing matched particle and detector level charged jets + Int_t fnUsedResponseVar; // build response for kt (0) or dijet eta (1) AliAnalysisTaskEmcalDiJetResponse(const AliAnalysisTaskEmcalDiJetResponse&); // not implemented AliAnalysisTaskEmcalDiJetResponse &operator=(const AliAnalysisTaskEmcalDiJetResponse&); // not implemented - ClassDef(AliAnalysisTaskEmcalDiJetResponse, 1) // jet sample analysis task + ClassDef(AliAnalysisTaskEmcalDiJetResponse, 2) // jet sample analysis task }; #endif diff --git a/PWGJE/EMCALJetTasks/macros/AddTaskEmcalDiJetAna.C b/PWGJE/EMCALJetTasks/macros/AddTaskEmcalDiJetAna.C index f5b88fb94a4..5fffbc113e5 100644 --- a/PWGJE/EMCALJetTasks/macros/AddTaskEmcalDiJetAna.C +++ b/PWGJE/EMCALJetTasks/macros/AddTaskEmcalDiJetAna.C @@ -26,7 +26,7 @@ AliAnalysisTaskEmcalDiJetAna* AddTaskEmcalDiJetAna(TString kTracksName Int_t pSel = AliVEvent::kINT7, Int_t matchFullCh = AliAnalysisTaskEmcalDiJetBase::kNoMatching, Double_t ptTrackBias = 0., - Int_t corrType = AliAnalysisTaskEmcalDiJetBase::kCorrelateAll + Int_t corrType = AliAnalysisTaskEmcalDiJetBase::kCorrelateTwo ) { enum AlgoType {kKT, kANTIKT}; @@ -148,11 +148,13 @@ AliAnalysisTaskEmcalDiJetAna* AddTaskEmcalDiJetAna(TString kTracksName //Connect output AliAnalysisDataContainer *coutput1 = 0x0; - TString containerName1 = Form("%s",wagonName.Data()); + TString contName(wagonName); + contName += "_histos"; - TString outputfile = Form("%s:%s",AliAnalysisManager::GetCommonFileName(),wagonName.Data()); + // TString outputfile = Form("%s:%s",AliAnalysisManager::GetCommonFileName(),wagonName.Data()); + TString outputfile = Form("%s",AliAnalysisManager::GetCommonFileName()); - coutput1 = mgr->CreateContainer(containerName1, TList::Class(),AliAnalysisManager::kOutputContainer,outputfile); + coutput1 = mgr->CreateContainer(contName.Data(), TList::Class(),AliAnalysisManager::kOutputContainer,outputfile); mgr->ConnectOutput(taskDiJet,1,coutput1); diff --git a/PWGJE/EMCALJetTasks/macros/AddTaskEmcalDiJetResponse.C b/PWGJE/EMCALJetTasks/macros/AddTaskEmcalDiJetResponse.C index 81d504aeedc..b5f378d3890 100644 --- a/PWGJE/EMCALJetTasks/macros/AddTaskEmcalDiJetResponse.C +++ b/PWGJE/EMCALJetTasks/macros/AddTaskEmcalDiJetResponse.C @@ -9,7 +9,9 @@ AliAnalysisTaskEmcalDiJetResponse* AddTaskEmcalDiJetResponse(TString kTracks const char *CentEst = "V0A", Int_t pSel = AliVEvent::kINT7, Int_t matchFullCh = AliAnalysisTaskEmcalDiJetBase::kNoMatching, - Double_t ptTrackBias = 0. + Double_t ptTrackBias = 0., + Int_t responseVar = 0, + Int_t corrType = AliAnalysisTaskEmcalDiJetBase::kCorrelateTwo ) { enum AlgoType {kKT, kANTIKT}; @@ -47,7 +49,7 @@ AliAnalysisTaskEmcalDiJetResponse* AddTaskEmcalDiJetResponse(TString kTracks TString strJetsChMC = jetFinderTaskChargedMC->GetName(); - TString wagonName = Form("DiJetResponse_%s_%s_Rho%dTC%sMatch%dHadTrig%d",strJetsFull.Data(),strJetsFullMC.Data(),rhoType,trigClass.Data(),matchFullCh,(Int_t)(ptTrackBias)); + TString wagonName = Form("DiJetResponse_%s_%s_Rho%dTC%sMatch%dHadTrig%dRV%d",strJetsFull.Data(),strJetsFullMC.Data(),rhoType,trigClass.Data(),matchFullCh,(Int_t)(ptTrackBias),responseVar); //Configure DiJet task AliAnalysisTaskEmcalDiJetResponse *taskDiJet = NULL; @@ -56,6 +58,10 @@ AliAnalysisTaskEmcalDiJetResponse* AddTaskEmcalDiJetResponse(TString kTracks Printf("strJetsFull: %s",strJetsFull.Data()); Printf("strJetsCh: %s",strJetsCh.Data()); + taskDiJet->SetIsPythiaPtHard(kTRUE); + + taskDiJet->SetJetCorrelationType(corrType); + taskDiJet->SetContainerFull(0); taskDiJet->SetContainerCharged(1); taskDiJet->SetContainerFullMC(2); @@ -89,6 +95,8 @@ AliAnalysisTaskEmcalDiJetResponse* AddTaskEmcalDiJetResponse(TString kTracks taskDiJet->SetIsPythiaPtHard(kTRUE); + taskDiJet->SetResponseVar(responseVar); + mgr->AddTask(taskDiJet); @@ -98,11 +106,13 @@ AliAnalysisTaskEmcalDiJetResponse* AddTaskEmcalDiJetResponse(TString kTracks //Connect output AliAnalysisDataContainer *coutput1 = 0x0; - TString containerName1 = Form("%s",wagonName.Data()); + TString contName(wagonName); + contName += "_histos"; - TString outputfile = Form("%s:%s",AliAnalysisManager::GetCommonFileName(),wagonName.Data()); + // TString outputfile = Form("%s:%s",AliAnalysisManager::GetCommonFileName(),wagonName.Data()); + TString outputfile = Form("%s",AliAnalysisManager::GetCommonFileName()); - coutput1 = mgr->CreateContainer(containerName1, TList::Class(),AliAnalysisManager::kOutputContainer,outputfile); + coutput1 = mgr->CreateContainer(contName.Data(), TList::Class(),AliAnalysisManager::kOutputContainer,outputfile); mgr->ConnectOutput(taskDiJet,1,coutput1);