--- /dev/null
+/* *************************************************************************
+ * AliEbyE Analysis for Particle Ratio Fluctuation *
+ * Deepika Rathee | Satyajit Jena *
+ * drathee@cern.ch | sjena@cern.ch *
+ * Date: Wed Jul 9 18:38:30 CEST 2014 *
+ * New approch to find particle ratio to reduce memory *
+ * (Test Only) *
+ ***************************************************************************/
+
+AliAnalysisTask *AddEbyEPidRatioTaskV1(const Char_t *name = "TPC_NuDyn", Bool_t isModeDist = 1,
+ Bool_t isModeEff = 0, Bool_t isModeDCA = 0, Bool_t isModeQA = 0,
+ Bool_t isRatio = 0, Bool_t isModeAOD = 0, Bool_t isSetExt = 0,
+ Int_t aodFilterBit = 1024,
+ Float_t gEta = 0.8, Int_t modeCuts = 0, Int_t modePID =-1,
+ Float_t gMinPt = 0.3, Float_t gMaxPt = 2.5,
+ Float_t gMinPtForTof = 0.21, Float_t gMaxPtForTPClow = 0.69,
+ Float_t gMinPtEff = 0.3, Float_t gMaxPtEff = 2.5,
+ Float_t gSigmaITS = 4.0, Float_t gSigmaTOF = 4.0,
+ Float_t gSigmaTPC = 4.0, Float_t gSigmaTPClow = 3.0) {
+
+ TString sName(name);
+
+ AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+ if (!mgr) {
+ Error("AddTaskNetParticle", "No analysis manager found.");
+ return NULL;
+ }
+
+ Bool_t isMC = (mgr->GetMCtruthEventHandler() != NULL);
+ if (isMC)
+ Info("AddTaskNetParticle", "This task has MC.");
+
+ AliEbyEPidRatioTask *task = new AliEbyEPidRatioTask("EbyEPidRatio");
+ if (!task) {
+ Error("EbyEPidRatio", "Task could not be created.");
+ return NULL;
+ }
+
+ if (isMC)
+ task->SetIsMC();
+ if (isModeEff)
+ task->SetModeEffCreation(1); // => 1 = on | 0 = off (default)
+ if (isModeDCA)
+ task->SetModeDCACreation(1); // => 1 = on | 0 = off (default)
+ if (isModeDist)
+ task->SetModeDistCreation(1); // => 1 = on | 0 = off (default)
+ if (isModeAOD) {
+ task->SetIsAOD(1); // => 1 = AOD | 0 = ESD (default)
+ task->SetTrackFilterBit(aodFilterBit);
+ }
+ if (isModeQA)
+ task->SetModeQACreation(1); // => 1 = on | 0 = off (default)
+ if (isRatio)
+ task->SetIsRatio();
+
+ Float_t minPt, maxPt, minPtEff, maxPtEff, minPtForTOF;
+ Float_t nSigmaITS, nSigmaTPC, nSigmaTPClow, nSigmaTOF, maxPtForTPClow;
+ Float_t etaMax, etaMaxEff, maxRap;
+ Int_t pidStrategy;
+
+ minPtForTOF = 0.69;
+ maxPtForTPClow = 0.69;
+ minPt = 0.5;
+ maxPt = 2.0;
+ minPtEff = 0.3;
+ maxPtEff = 2.5;
+
+ maxRap = 0.5;
+ etaMax = 0.8;
+
+ etaMaxEff = 0.8;
+ nSigmaITS = 4.0;
+ nSigmaTPC = 4.0;
+ nSigmaTPClow = 3.0;
+ nSigmaTOF = 4.0;
+
+ if (isSetExt) {
+ minPt = gMinPt;
+ maxPt = gMaxPt;
+ minPtForTOF = gMinPtForTof;
+ maxPtForTPClow = gMaxPtForTPClow;
+ minPtEff = gMinPtEff;
+ maxPtEff = gMaxPtEff;
+
+ maxRap = gEta;
+ etaMax = gEta;
+
+ nSigmaITS = gSigmaITS;
+ nSigmaTPC = gSigmaTPC;
+ nSigmaTPClow = gSigmaTPClow;
+ nSigmaTOF = gSigmaTOF;
+ }
+
+ if (modePID == -1) { // default
+ pidStrategy = 7; // 7: ITS + TPC + TOF (using minPtForTOF)
+ if (modeCuts == 1)
+ pidStrategy = 5; // 5: TPC + TOF (using minPtForTOF)
+ }
+ else
+ pidStrategy = modePID;
+
+ AliEbyEPidRatioHelper *helper = new AliEbyEPidRatioHelper;
+ if (!helper) {
+ Error("AddTaskNetParticle", "Helper could not be created.");
+ delete task;
+ return NULL;
+ }
+
+
+ task->SetESDTrackCutMode(modeCuts); // => 0 = normal | 1 = LF
+ task->SetEtaMax(etaMax); // eta cut
+ task->SetEtaMaxEff(etaMaxEff); // eta cut for efficiency
+ task->SetPtRange(minPt, maxPt); // pt cut range for the analysis
+ task->SetPtRangeEff(minPtEff, maxPtEff); // pt cut range for the correction / efficiency / contamination creation
+ helper->SetVertexZMax(10.);
+ helper->SetCentralityBinMax(11);
+ helper->SetRapidityMax(maxRap);
+ helper->SetMinTrackLengthMC(70.);
+ helper->SetNSigmaMaxCdd(0.); // 3. || ->> Turn off sigmaDCA cuts for now
+ helper->SetNSigmaMaxCzz(0.); // 3. || ->> Turn off sigmaDCA cuts for now
+ helper->SetPhiRange(0., 3.88); // Only used if requested in task - default is TwoPi
+ helper->SetPIDStrategy(pidStrategy);
+ helper->SetNSigmaMaxITS(nSigmaITS);
+ helper->SetNSigmaMaxTPC(nSigmaTPC);
+ helper->SetNSigmaMaxTPClow(nSigmaTPClow);
+ helper->SetNSigmaMaxTOF(nSigmaTOF);
+ helper->SetMinPtForTOFRequired(minPtForTOF);
+ helper->SetMaxPtForTPClow(maxPtForTPClow);
+
+ task->SetNetParticleHelper(helper);
+ mgr->AddTask(task);
+
+ AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
+ TString outputFileName = Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name);
+ TString outputQAFileName = Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name);
+
+ AliAnalysisDataContainer *coutput = mgr->CreateContainer(name, TList::Class(), AliAnalysisManager::kOutputContainer, outputFileName);
+ AliAnalysisDataContainer *coutputEff = mgr->CreateContainer(Form("%s_eff", name), TList::Class(), AliAnalysisManager::kOutputContainer, outputFileName);
+ AliAnalysisDataContainer *coutputCont = mgr->CreateContainer(Form("%s_cont", name), TList::Class(), AliAnalysisManager::kOutputContainer, outputFileName);
+ AliAnalysisDataContainer *coutputDca = mgr->CreateContainer(Form("%s_dca", name), TList::Class(), AliAnalysisManager::kOutputContainer, outputFileName);
+
+ AliAnalysisDataContainer *coutputQA = mgr->CreateContainer(Form("%sQA", name), TList::Class(), AliAnalysisManager::kOutputContainer, outputQAFileName);
+
+ mgr->ConnectInput (task, 0, cinput );
+ mgr->ConnectOutput (task, 1, coutput);
+ mgr->ConnectOutput (task, 2, coutputEff);
+ mgr->ConnectOutput (task, 3, coutputCont);
+ mgr->ConnectOutput (task, 4, coutputDca);
+ mgr->ConnectOutput (task, 5, coutputQA);
+
+ return task;
+}
Int_t nBinsCent = AliEbyEPidRatioHelper::fgkfHistNBinsCent;
Double_t centBinRange[] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0], AliEbyEPidRatioHelper::fgkfHistRangeCent[1]};
- TString xyz = Form("|y| < %.1f",fHelper->GetRapidityMax());
-
- list->Add(new TH2F(Form("fHistRatioKPi%s",name),
- Form("(%s %s) : K/#pi;Centrality(11);K/#pi", xyz.Data(), sTitle.Data()),
- nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
-
- list->Add(new TH2F(Form("fHistRatioKpPip%s",name),
- Form("(%s %s) : K^{+}/#pi^{+};Centrality(11);K^{+}/#pi^{+}", xyz.Data(), sTitle.Data()),
- nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
-
- list->Add(new TH2F(Form("fHistRatioKmPip%s",name),
- Form("(%s %s) : K^{-}/#pi^{+};Centrality(11);K^{-}/#pi^{+}", xyz.Data(), sTitle.Data()),
- nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
-
- list->Add(new TH2F(Form("fHistRatioKmPim%s",name),
- Form("(%s %s) : K^{-}/#pi^{-};Centrality(11);K^{-}/#pi^{-}", xyz.Data(), sTitle.Data()),
- nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
-
-
for (Int_t iPid = 0; iPid < 4; ++iPid) {
// fOutList->Add(new TList);
// list[iPid] = static_cast<TList*>(fOutList->Last());
}
}
- Double_t KPi = -1; if(np[idx][1][1]+np[idx][1][0] != 0 ) KPi = (np[idx][2][1]+np[idx][2][0])/(np[idx][1][1]+np[idx][1][0]);
- Double_t KpPip = -1;
- Double_t KmPip = -1;if (np[idx][1][1] != 0 ) { KpPip = (np[idx][2][1])/(np[idx][1][1]); KmPip = (np[idx][2][0])/(np[idx][1][1]); }
- Double_t KmPim = -1;if (np[idx][1][0] != 0) KmPim = (np[idx][2][0])/(np[idx][1][0]);
-
- (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKPi%s",name))))->Fill(centralityBin, KPi);
- (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKpPip%s",name))))->Fill(centralityBin, KpPip);
- (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKmPip%s",name))))->Fill(centralityBin, KmPip);
- (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKmPim%s",name))))->Fill(centralityBin, KmPim);
-
-
+
Double_t a[6][4]; Double_t b[22];
for (Int_t iPid = 0; iPid < 4; ++iPid) {
a[0][iPid] = np[idx][iPid][1]+np[idx][iPid][0]; // 0 n+ + n-