本文整理汇总了C++中AliAnalysisManager::GetCommonFileName方法的典型用法代码示例。如果您正苦于以下问题:C++ AliAnalysisManager::GetCommonFileName方法的具体用法?C++ AliAnalysisManager::GetCommonFileName怎么用?C++ AliAnalysisManager::GetCommonFileName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliAnalysisManager
的用法示例。
在下文中一共展示了AliAnalysisManager::GetCommonFileName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: appendix
AliAnalysisTask *RegisterTaskPID2(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_t tpcClsPID = 80,
Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0,
Double_t tpcs=-0.0113, Double_t tpcu=3.09,
Double_t tofs=3., Int_t tofm=0,
Int_t itshitpixel = AliHFEextraCuts::kBoth,
Bool_t withetacorrection = kTRUE,
Int_t TRDtrigger=0){
gROOT->LoadMacro("$ALICE_PHYSICS/PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPb.C");
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
AliAnalysisTaskHFE *task = ConfigHFEmbpPb(useMC, isAOD, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz,
tpcs,tpcu,tofs,tofm,3.,kFALSE,kTRUE,kFALSE,itshitpixel,withetacorrection,0,TRDtrigger);
if(isAOD)
task->SetAODAnalysis();
else
task->SetESDAnalysis();
if (useMC)
task->SetHasMCData(kTRUE);
else{
task->SetHasMCData(kFALSE);
}
if(TRDtrigger<2) task->SelectCollisionCandidates(AliVEvent::kINT7);
else task->SelectCollisionCandidates(AliVEvent::kTRD);
Int_t idcaxy = (Int_t)(dcaxy*10.);
Int_t idcaz = (Int_t)(dcaz*10.);
Int_t itpcs = (Int_t)(tpcs*1000.);
Int_t itofs = (Int_t)(tofs*10.);
Int_t ipixelany = itshitpixel;
Int_t ietacorr = 0;
if(withetacorrection) ietacorr = 1;
TString appendix(TString::Format("mbTPCc%dTPCp%dITS%dDCAr%dz%dTPCs%dTOFs%dm%ipa%dtrdt%d",tpcCls,
tpcClsPID,itsCls,idcaxy,idcaz,itpcs,itofs,tofm,ipixelany,TRDtrigger));
printf("Add macro appendix %s\n", appendix.Data());
TString containerName = mgr->GetCommonFileName();
containerName += ":HFEtask";
containerName += appendix.Data();
printf("container name: %s\n", containerName.Data());
//create data containers
task->ConnectOutput(1, mgr->CreateContainer(Form("HFE_Results_%s", appendix.Data()),
TList::Class(), AliAnalysisManager::kOutputContainer,
containerName.Data()));
task->ConnectOutput(2, mgr->CreateContainer(Form("HFE_QA_%s", appendix.Data()), TList::Class(),
AliAnalysisManager::kOutputContainer,
containerName.Data()));
mgr->ConnectInput(task, 0, cinput );
mgr->AddTask(task);
return NULL;
}
示例2: AddTaskCaloHFEpp
AliAnalysisTaskCaloHFEpp* AddTaskCaloHFEpp(TString name = "name",
TString dataname = "dataname",
Bool_t flagEG1,
Bool_t flagEG2,
Bool_t SetFlagClsTypeEMC,
Bool_t SetFlagClsTypeDCAL)
{
// get the manager via the static access member. since it's static, you don't need
// an instance of the class to call the function
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
return 0x0;
}
// get the input event handler, again via a static method.
// this handler is part of the managing system and feeds events
// to your task
if (!mgr->GetInputEventHandler()) {
return 0x0;
}
// by default, a file is open for writing. here, we get the filename
TString fileName = AliAnalysisManager::GetCommonFileName();
fileName += ":CaloHFEpp"; // create a subfolder in the file
// now we create an instance of your task
AliAnalysisTaskCaloHFEpp* task = new AliAnalysisTaskCaloHFEpp(name.Data());
task -> SetEG1(flagEG1);
task -> SetEG2(flagEG2);
task -> SetfFlagClsTypeEMC(SetFlagClsTypeEMC);
task -> SetfFlagClsTypeDCAL(SetFlagClsTypeDCAL);
if(!task) return 0x0;
// add your task to the manager
mgr->AddTask(task);
TString containerName = mgr->GetCommonFileName();
containerName += ":PWGHF_hfeCalpp";
TString SubcontainerName = Form("hfeCalpp");
SubcontainerName += name;
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(SubcontainerName, TList::Class(),AliAnalysisManager::kOutputContainer, containerName.Data());
mgr->ConnectInput(task, 0, cinput);
mgr->ConnectOutput(task, 1, coutput1);
return task;
}
示例3: AddTaskUpsilonTreeTuned
AliAnalysisTaskUpsilonTreeTuned* AddTaskUpsilonTreeTuned(Bool_t isMC = kFALSE, TString changeName = "")
{
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddtaskUpsilon", "No analysis manager to connect to.");
return NULL;
}
TString type = mgr->GetInputEventHandler()->GetDataType();
if (!type.Contains("ESD") && !type.Contains("AOD")) {
::Error("AddtaskUpsilon", "Upsilon task needs the manager to have an ESD or AOD input handler.");
return NULL;
}
// Create container
TString outputfile = mgr->GetCommonFileName();
if ( ! outputfile.IsNull() ) outputfile += ":Upsilon" + changeName;
else outputfile = "UpsilonAnalysis" + changeName + ".root";
TString containerName = "UpsilonOut" + changeName;
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(containerName.Data(),TList::Class(),AliAnalysisManager::kOutputContainer,outputfile);
// Create cuts
TString cutsName = "StdMuonPairCuts" + changeName;
AliMuonPairCuts* muonPairCuts = new AliMuonPairCuts(cutsName.Data(), cutsName.Data());
muonPairCuts->SetIsMC(isMC);
// Create task
TString taskName = "UpsilonTask" + changeName;
AliMuonTrackCuts *muonCuts = new AliMuonTrackCuts("cuts","cuts");
AliAnalysisTaskUpsilonTreeTuned *upsilonAnalysisTask = new AliAnalysisTaskUpsilonTreeTuned(taskName.Data(),muonCuts);
if ( isMC ) upsilonAnalysisTask->SetTrigClassPatterns("ANY");
mgr->AddTask(upsilonAnalysisTask);
// Connect containers
mgr->ConnectInput (upsilonAnalysisTask, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput (upsilonAnalysisTask, 1, coutput1);
return upsilonAnalysisTask;
}
示例4: AddTaskVZEROQATrig
AliAnaVZEROQA* AddTaskVZEROQATrig(Int_t runNumber)
{
// Creates a QA task exploiting simple symmetries phi, eta +/-, charge ...
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskQAsym", "No analysis manager to connect to.");
return NULL;
}
// Check the analysis type using the event handlers connected to the analysis manager.
//==============================================================================
if (!mgr->GetInputEventHandler()) {
::Error("AddTasQAsym", "This task requires an input event handler");
return NULL;
}
TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
// Configure analysis
//===========================================================================
AliAnaVZEROQA* task = new AliAnaVZEROQA("AliAnaVZEROQATrig");
mgr->AddTask(task);
AliAnalysisDataContainer *cout = mgr->CreateContainer("QAVZEROHistsTrig",TList::Class(),
AliAnalysisManager::kOutputContainer, Form("%s:VZERO_Performance_Trig",
mgr->GetCommonFileName()));
mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput (task, 1, cout);
return task;
}
示例5: appendixx
AliAnalysisTask *AddTaskHFEreducedEvent(Bool_t MCthere=kFALSE, Int_t TRDtrigger=0,Int_t minnbTPC=70,Int_t minnbTPCPID=80,Int_t minnbITS=3,
Bool_t isRemoveFirstEvent=kTRUE){
//
// Produce reduced events
//
// Name
TString appendixx(TString::Format("HFEreducedEventt%dTPCcl%dpidcl%dITScl%d",(Int_t)TRDtrigger,(Int_t) minnbTPC,(Int_t) minnbTPCPID,(Int_t) minnbITS,
(Int_t) isRemoveFirstEvent));
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
// task
AliHFEreducedEventCreatorESD *reducedEventCreator = new AliHFEreducedEventCreatorESD("HFEreducedEventCreator");
reducedEventCreator->SetMinNclustersTPC(minnbTPC);
reducedEventCreator->SetMinNclustersTPCPID(minnbTPCPID);
reducedEventCreator->SetMinNclustersITS(minnbITS);
if(isRemoveFirstEvent) reducedEventCreator->SetRemoveFirstEventFromChunk();
if(TRDtrigger==0) reducedEventCreator->SelectCollisionCandidates(AliVEvent::kINT7);
else reducedEventCreator->SelectCollisionCandidates(AliVEvent::kINT7 | AliVEvent::kTRD);
mgr->AddTask(reducedEventCreator);
TString containerName = mgr->GetCommonFileName();
containerName += ":";
containerName += appendixx.Data();
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
mgr->ConnectOutput(reducedEventCreator,1, mgr->CreateContainer(Form("list_%s",appendixx.Data()), TTree::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
mgr->ConnectInput(reducedEventCreator,0, cinput );
return NULL;
}
示例6: AddTaskMuonCuts
AliAnalysisTaskMuonCuts* AddTaskMuonCuts(Bool_t isMC = kFALSE)
{
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddtaskMuonCuts", "No analysis manager to connect to.");
return NULL;
}
TString type = mgr->GetInputEventHandler()->GetDataType();
if (!type.Contains("ESD") && !type.Contains("AOD")) {
::Error("AddtaskMuonCuts", "MuonCuts task needs the manager to have an ESD or AOD input handler.");
return NULL;
}
// Create container
TString currName = "";
TString outputfile = mgr->GetCommonFileName();
if ( ! outputfile.IsNull() ) outputfile += ":PWG3_muonCuts";
else outputfile = "muonCutsAnalysis.root";
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("MuonTrackCuts",TObjArray::Class(),AliAnalysisManager::kOutputContainer,outputfile);
// Create cuts
AliMuonTrackCuts* muonTrackCuts = new AliMuonTrackCuts("TestStandardMuonTrackCuts", "TestStandardMuonTrackCuts");
muonTrackCuts->SetIsMC(isMC);
muonTrackCuts->SetAllowDefaultParams();
muonTrackCuts->SetCustomParamFromRun();
// Create task
AliAnalysisTaskMuonCuts *muonCutsAnalysisTask = new AliAnalysisTaskMuonCuts("MuonCutsTask", *muonTrackCuts);
if ( isMC ) muonCutsAnalysisTask->SetTrigClassPatterns("ANY");
mgr->AddTask(muonCutsAnalysisTask);
// Connect containers
mgr->ConnectInput (muonCutsAnalysisTask, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput (muonCutsAnalysisTask, 1, coutput1);
return muonCutsAnalysisTask;
}
示例7: if
AliAnalysisTask *AddTask_HypTritEventTree(UInt_t triggerMask = AliVEvent::kINT7, Bool_t pidQa = kTRUE, Bool_t betheSplines = kTRUE, Int_t period = 2015) {
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
Error("AddTask_lkreis_HypTritEventTree", "No analysis manager found.");
return 0;
}
AliAnalysisTaskHypTritEventTree *task = new AliAnalysisTaskHypTritEventTree("lkreisTaskHypTritEventTree");
task->SelectCollisionCandidates(triggerMask);
task->SetPidQa(pidQa);
//task->SetPeriod(period);
task->SetBetheSplines(betheSplines);
// MC LHC12d3
// Double_t he3Params[6] = {1.79043,18.0066,0.00212257,2.24677,4.25945,0.06892};
// Double_t tParams[6] = {2.32603,19.2492,30.7943,2.16971,-8.11114, 0.09311};
// DATA LHC15o
if(period == 2015){
Double_t he3Params[6] = {2.45605,19.8067,-0.774729,1.96279,0.172695, 0.05655};
Double_t tParams[6] = {2.32603,19.2492,30.7943,2.16971,-8.11114, 0.09311};
}
else if(period == 2016){
Double_t he3Params[6] = {1.69155, 27.4992, 4.00313e-15, 2.48485, 8.31768, 0.05655};
Double_t tParams[6] = {1.69155, 27.4992, 4.00313e-15, 2.48485, 8.31768, 0.09311};
}
task->SetParamsHe(he3Params);
task->SetParamsT(tParams);
//Data Containers
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
AliAnalysisDataContainer *coutput1 =
mgr->CreateContainer("histograms", TList::Class(),AliAnalysisManager::kOutputContainer,mgr->GetCommonFileName());
AliAnalysisDataContainer *coutput2 =
mgr->CreateContainer("tree", TTree::Class(),AliAnalysisManager::kOutputContainer,mgr->GetCommonFileName());
AliAnalysisDataContainer *coutput3 =
mgr->CreateContainer("tree_mc", TTree::Class(),AliAnalysisManager::kOutputContainer,mgr->GetCommonFileName());
mgr->ConnectInput(task, 0, cinput);
mgr->ConnectOutput(task, 1, coutput1);
mgr->ConnectOutput(task, 2, coutput2);
mgr->ConnectOutput(task, 3, coutput3);
return task;
}
示例8: AddTaskZDCQApp
AliAnalysisTaskSE* AddTaskZDCQApp()
{
// Creates a QA task to check ZDC data
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskZDCQA", "No analysis manager to connect to.");
return NULL;
}
// Check the analysis type using the event handlers connected to the analysis manager.
//==============================================================================
if (!mgr->GetInputEventHandler()) {
::Error("AddTaskZDCQA", "This task requires an input event handler");
return NULL;
}
TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
// Configure analysis
//===========================================================================
AliAnalysisTaskZDCpp* task = new AliAnalysisTaskZDCpp("AliAnaZDCQA");
//AliAnalysisTaskZDCPbPb* task = new AliAnalysisTaskZDCPbPb("AliAnaZDCQA");
//AliAnalysisTaskZDCpA* task = new AliAnalysisTaskZDCpA("AliAnaZDCQA");
mgr->AddTask(task);
AliAnalysisDataContainer *cout = mgr->CreateContainer("QAZDCHists",TList::Class(),
AliAnalysisManager::kOutputContainer, Form("%s:ZDC_Performance",
mgr->GetCommonFileName()));
mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput (task, 1, cout);
return task;
}
示例9: AddTaskPerformanceTPCdEdxQA
//.........这里部分代码省略.........
// Efficiency ------------------------------------------------------------------------------------
//
AliPerformanceEff *pCompEff5 = new AliPerformanceEff(bTPCTrackingOnly ? "AliPerformanceEffTPC" : "AliPerformanceEff",
"AliPerformanceEff",kTPC,kFALSE);
if(!pCompEff5) {
Error("AddTaskPerformanceTPC", "Cannot create AliPerformanceEff");
}
AliRecInfoCuts *pRecInfoCutsTPC2 = NULL;
if (bTPCTrackingOnly)
{
//For low pt tracks, HLT finds only short track segments.
//Hence, for the tpc-tracking only tracking-efficiency, we lower the minimum number of hits per reconstructed TPC track
pRecInfoCutsTPC2 = new AliRecInfoCuts(*pRecInfoCutsTPC);
pRecInfoCutsTPC2->SetMinNClustersTPC(20);
pCompEff5->SetAliRecInfoCuts(pRecInfoCutsTPC2);
}
else
{
pCompEff5->SetAliRecInfoCuts(pRecInfoCutsTPC);
}
pCompEff5->SetAliMCInfoCuts(pMCInfoCuts);
pCompEff5->SetUseTrackVertex(bTPCTrackingOnly == kTRUE ? kFALSE : kTRUE);
AliPerformanceEff *pCompEff5Sec;
if (bDoEffTpcSec)
{
pCompEff5Sec = new AliPerformanceEff(bTPCTrackingOnly ? "AliPerformanceEffSecTPC" : "AliPerformanceEffSec",
"AliPerformanceEffSec",kTPCSec,kFALSE);
if(!pCompEff5Sec) {
Error("AddTaskPerformanceTPC", "Cannot create AliPerformanceEff");
}
pCompEff5Sec->SetAliRecInfoCuts(bTPCTrackingOnly ? pRecInfoCutsTPC2 : pRecInfoCutsTPC);
pCompEff5Sec->SetAliMCInfoCuts(pMCInfoCuts);
pCompEff5Sec->SetUseTrackVertex(bTPCTrackingOnly == kTRUE ? kFALSE : kTRUE);
}
//
// TPC Constrain to vertex
//
AliPerformanceMatch *pCompConstrain6;
if (bTPCTrackingOnly == kFALSE) {
pCompConstrain6 = new AliPerformanceMatch("AliPerformanceMatchTPCConstrain","AliPerformanceMatchTPCConstrain",2,kFALSE);
if(!pCompConstrain6) {
Error("AddTaskPerformanceTPCdEdxQA", "Cannot create AliPerformanceMatchTPCConstrain"); }
pCompConstrain6->SetAliRecInfoCuts(pRecInfoCutsTPC);
pCompConstrain6->SetAliMCInfoCuts(pMCInfoCuts);
pCompConstrain6->SetUseTOFBunchCrossing(bUseTOF);
} //end bTPCTrackingOnly == kFALSE
//
// Add components to the performance task
//
if (bTPCTrackingOnly == kFALSE) {
if(!bUseMCInfo) {
pCompTPC0->SetTriggerClass(triggerClass);
pCompMatch1->SetTriggerClass(triggerClass);
pCompMatch2->SetTriggerClass(triggerClass);
pCompDEdx3->SetTriggerClass(triggerClass);
pCompConstrain6->SetTriggerClass(triggerClass);
}
task->AddPerformanceObject( pCompTPC0 );
task->AddPerformanceObject( pCompMatch1 );
task->AddPerformanceObject( pCompMatch2 );
task->AddPerformanceObject( pCompDEdx3 );
task->AddPerformanceObject( pCompConstrain6 );
} //end bTPCTrackingOnly == kFALSE
if(bUseMCInfo) {
task->AddPerformanceObject( pCompRes4 );
task->AddPerformanceObject( pCompEff5 );
if (bDoEffTpcSec) task->AddPerformanceObject( pCompEff5Sec );
}
//
// Create containers for input
//
mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
//
// Create containers for output
//
AliAnalysisDataContainer *coutput = mgr->CreateContainer(Form("%s%sQA", taskName[idx].Data(), taskName2[idx2].Data()), TList::Class(),
AliAnalysisManager::kOutputContainer,
Form("%s:%s_%s", mgr->GetCommonFileName(), taskName[idx].Data(),task->GetName()));
AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(Form("%s%sQASummary", taskName[idx].Data(), taskName2[idx2].Data()), TTree::Class(),
AliAnalysisManager::kParamContainer,
Form("trending.root:Summary%sQA", taskName[idx].Data()));
mgr->ConnectOutput(task, 1, coutput);
mgr->ConnectOutput(task, 0, coutput2);
return task;
}
示例10: appendixx
//.........这里部分代码省略.........
tpcdedx[1]=-0.15;
tpcdedx[2]=-0.1;
tpcdedx[3]=0.0;
tpcdedx[4]=0.156;
tpcdedx[5]=0.19;
tpcdedx[6]=0.2;
tpcdedx[7]=0.2;
if(TMath::Abs(tpceff-55)<0.01) {
tpcdedx[0]=-0.365;
tpcdedx[1]=-0.314;
tpcdedx[2]=-0.267;
tpcdedx[3]=-0.165;
tpcdedx[4]=-0.022;
tpcdedx[5]= 0.01;
tpcdedx[6]= 0.018;
tpcdedx[7]= 0.018;
}
if(TMath::Abs(tpceff-45)<0.01) {
tpcdedx[0]=-0.062;
tpcdedx[1]=-0.015;
tpcdedx[2]=0.035;
tpcdedx[3]=0.131;
tpcdedx[4]=0.278;
tpcdedx[5]=0.32;
tpcdedx[6]=0.32;
tpcdedx[7]=0.32;
}
if(TMath::Abs(tpceff-60)<0.01) {
tpcdedx[0]=-0.518;
tpcdedx[1]=-0.47;
tpcdedx[2]=-0.42;
tpcdedx[3]=-0.315;
tpcdedx[4]=-0.178;
tpcdedx[5]=-0.145;
tpcdedx[6]=-0.135;
tpcdedx[7]=-0.135;
}
if(TMath::Abs(tpceff-40)<0.01) {
tpcdedx[0]=0.09;
tpcdedx[1]=0.14;
tpcdedx[2]=0.188;
tpcdedx[3]=0.28;
tpcdedx[4]=0.43;
tpcdedx[5]=0.462;
tpcdedx[6]=0.473;
tpcdedx[7]=0.473;
}
*/
// Name
TString appendixx(TString::Format("t%df%ds%dp%dM%dTPC%dr%dp%dITS%dPi%dDCAr%dz%dTOF%dTPCe%dV%dD%der%dbin%di%dt%dt%d%dW%dSG%d",(Int_t)trigger,aodfilter,(Int_t)scalarProduct,(Int_t)cutPileup,(Int_t)variableM,tpcCls,(Int_t)tpcClsr,tpcClspid,itsCls,(Int_t) pixellayer,(Int_t) dcaxy,(Int_t)dcaz,(Int_t) tofsig,(Int_t)tpceff,vzero,debuglevel,(Int_t)(etarange*0.1),(Int_t)withetacorrection,(Int_t)withmultcorrection,(Int_t)ITSclustersback,(Int_t)(minTPCback*10.0),(Int_t)(maxTPCback*10.0),wei,selectgenerator));
//TString appendixx("tpctofv2");
//printf("appendixx %s\n",appendixx.Data());
//set config file name
TString configFile("$ALICE_PHYSICS/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
//TString configFile("ConfigHFE_FLOW_TOFTPC.C");
TString checkconfig="ConfigHFE_FLOW_TOFTPC";
if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
gROOT->LoadMacro(configFile.Data());
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
//printf("Create the task\n");
AliAnalysisTaskFlowTPCTOFEPSP *task = ConfigHFE_FLOW_TOFTPC(useMC,appendixx,trigger,aodfilter,scalarProduct,cutPileup,variableM,tpcCls, tpcClsr, tpcClspid, itsCls, pixellayer, dcaxy, dcaz,tofsig,&tpcdedx[0],vzero,debuglevel,etarange,withetacorrection,withmultcorrection,ITSclustersback,minTPCback,maxTPCback,wei,selectgenerator);
task->SetNbBinsCentralityQCumulant(4);
//task->SetBinCentralityLess(0,0.0);
task->SetBinCentralityLess(0,0.0);
task->SetBinCentralityLess(1,10.0);
task->SetBinCentralityLess(2,20.0);
task->SetBinCentralityLess(3,40.0);
task->SetBinCentralityLess(4,50.0);
//task->SetBinCentralityLess(5,60.0);
//task->SetBinCentralityLess(7,80.0);
task->SetHFEVZEROEventPlane(0x0);
//AliLog::SetClassDebugLevel("AliAnalysisTaskHFEFlow",3);
//printf("Init the weights\n");
//if(useMC && (!gROOT->GetListOfGlobalFunctions()->FindObject("ConfigWeightFactorsHFEv2"))) gROOT->LoadMacro("ConfigWeightFactorsHFEv2.C");
if(useMC && (!gROOT->GetListOfGlobalFunctions()->FindObject("ConfigWeightFactorsHFEv2"))) gROOT->LoadMacro("$ALICE_PHYSICS/PWGHF/hfe/macros/configs/PbPb/ConfigWeightFactorsHFEv2.C");
if(useMC && (wei>=0)) ConfigWeightFactorsHFEv2(task,kFALSE,wei);
mgr->AddTask(task);
TString containerName = mgr->GetCommonFileName();
containerName += ":";
containerName += appendixx.Data();
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
mgr->ConnectOutput(task,1, mgr->CreateContainer(Form("list_%s",appendixx.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
mgr->ConnectInput(task,0, cinput );
return NULL;
}
示例11: configFile
AliAnalysisTask *AddTaskHFEtpctofPbPb(Bool_t isaod, Bool_t isMC,Int_t aodfilter=16,Int_t clusterdef=AliHFEextraCuts::kFoundAll, Int_t clusterrdef=AliHFEextraCuts::kFoundAllOverFindable,Int_t tpcCls=130, Int_t tpcClsPID = 80, Double_t tpcClsRatio = 0.6, Double_t tpcClShared = 1.1, Bool_t rejectkinkmother = kFALSE, Int_t itsCls=4,Double_t itsChi2PerClusters=-1,Int_t itspixelcut=AliHFEextraCuts::kBoth, Double_t dcaxy=1.0, Double_t dcaz=2.0, Bool_t usetof=kTRUE, Double_t tofs=3.,Bool_t etacor=kFALSE,TString listname="",Double_t tpceff=0.5, Float_t prodlow=0., Float_t prodhigh=3.,Bool_t kNoPhotonic = kTRUE){
// libraries in case
gSystem->Load("libANALYSIS");
gSystem->Load("libANALYSISalice");
//set config file name
TString configFile("$ALICE_PHYSICS/PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C");
//TString configFile("/d/alice12/bailhache/AliRootInstallations/07_10_2012/AliRoot/PWGHF/hfe/macros/configs/PbPb/ConfigHFEpbpb.C");
TString checkconfig="ConfigHFEpbpb";
if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
gROOT->LoadMacro(configFile.Data());
// Name
Int_t itpcClsRatio = (Int_t) (tpcClsRatio*10);
Int_t itpcClShared = (Int_t) (tpcClShared*10);
Int_t iitsChi2PerClusters = (Int_t) (itsChi2PerClusters*10);
Int_t idcaxy = (Int_t) (dcaxy*10);
Int_t idcaz = (Int_t) (dcaz*10);
Int_t itofs = (Int_t) (tofs*10);
Int_t iprodlow = (Int_t) (prodlow*10);
Int_t iprodhigh = (Int_t) (prodhigh*10);
Int_t itof = 0;
Int_t iNoPhotonic = 0;
Int_t ietacor = 0;
Int_t itpceff = (Int_t) (tpceff*10);
Int_t irejectkinkmother = 0;
if(usetof) itof=kTRUE;
if(kNoPhotonic) iNoPhotonic = 1;
if(etacor) ietacor = 1;
if(rejectkinkmother) irejectkinkmother = 1;
TString appendix(TString::Format("f%dcd%dcr%dt%dtp%dtr%dts%dkm%di%dic%di%ddcaxy%dz%dtof%dts%de%dtpc%dprodlow%dhigh%dnhfe%d",aodfilter,clusterdef,clusterrdef,tpcCls,tpcClsPID,itpcClsRatio,itpcClShared,irejectkinkmother,itsCls,iitsChi2PerClusters,itspixelcut,idcaxy,idcaz,itof,itofs,ietacor,itpceff,iprodlow,iprodhigh,iNoPhotonic));
printf("appendix %s\n", appendix.Data());
// ESD or AOD
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr->GetInputEventHandler()) {
printf("AddTaskEventplane", "This task requires an input event handler");
return NULL;
}
TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
Bool_t isaod = kFALSE;
if (inputDataType == "AOD") isaod = kTRUE;
// TPC cut 2010
// 0-5,5-10,10-20,20-30,30-40,40-50,50-60,60-70,70-80,80-90,90-100,one more per history
// http://www.physi.uni-heidelberg.de/~pachmay/projects/hfe/pid/tpc/
// without eta correction 50%
Double_t tpcdEdxcutlow[12] = {0.03,0.15,0.24,0.3,0.39,0.48,0.5,0.51,0.5,0.5,0.5,0.5};
// with eta correction 50%
// Double_t tpcdEdxcutlow[12] = {-0.01,0.076,0.197,0.26,0.298,0.3,0.3,0.3,0.3,0.3,0.3,0.3};
Double_t tpcdEdxcuthigh[12] = {3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0};
// Task
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
AliAnalysisTaskHFE *task = ConfigHFEpbpb(isaod,isMC,appendix,aodfilter,clusterdef,clusterrdef,tpcCls,tpcClsPID,tpcClsRatio,tpcClShared,irejectkinkmother,itsCls,itsChi2PerClusters,itspixelcut,dcaxy,dcaz,usetof,tofs,etacor,listname,tpcdEdxcutlow,tpcdEdxcuthigh,prodlow,prodhigh,kNoPhotonic);
mgr->AddTask(task);
// Write Output
TString containerName = mgr->GetCommonFileName();
containerName += ":";
containerName += appendix.Data();
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
mgr->ConnectOutput(task,1, mgr->CreateContainer(Form("HFE_Results_%s", appendix.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
mgr->ConnectOutput(task,2, mgr->CreateContainer(Form("HFE_QA_%s", appendix.Data()), TList::Class(),AliAnalysisManager::kOutputContainer,containerName.Data()));
mgr->ConnectInput(task,0, cinput );
return NULL;
}
示例12: AddTaskAliAnalysisTaskPHOSNeutralMeson
//.........这里部分代码省略.........
//~~~~~~~~ MC related ~~~~~~~~~~~~~
task->SetfFillMCHistos(fillMCHistos);
task->SetAnalyseAddedSignals(analyseAddedSignals);
//task->SetFillFeedDownHistos(true);
task->SetAnalyseMCPi0OrEta(mcParticleToAnalyse); //pi0 eta both
task->SetExponentialParameters(expoPara1, expoPara2, expoPara3, expoPara4); //for weighing added signals
task->SetAdditionalFileNameString(additionalFileNameString); //String appears at the end of the filname.
task->SetFillClusterHitmapsAddedSignals(fillHitMapsAddedS);
task->SetFillDecayPhotonInfoAddedSig(fillDecayInfoAddedS);
task->SetFillNDaughtersVsPtAndR(kFALSE); //implement bool to list of arguments of AddTask if needed
task->SetFillMPtForSingleOrMultContrClus(kFALSE); //implement bool to list of arguments of AddTask if needed
// ~~~~~~ Event Cuts ~~~~~~~~~~~~~
task->SetUseOnlyCINT1events(kFALSE);
task->SetDoZvertexCut(kTRUE);
task->SetUseIsVertexSelected2013pA(useIsVertexSelected2013pA);
task->SetZvertexCut(zVertexCut); // 10.0
// ~~~~~~ Cluster Cuts ~~~~~~~~~~~
task->SetClusterMinCells(clusterMinCells); //3
task->SetClusterMinE(clusterMinE); //0.3 GeV
task->SetClusterMinM02(clusterMinM02); //0.2
task->SetDoTimingCut(doTimingCut); //for MC: false
task->SetTimingCutMinMax(timingCutMin, timingCutMax); //-0.10e-6,0.10e-6
task->SetDoDistToBadCellCut(DoDistToBadCell);
task->SetDistToBadCell(distToBadCell); // [cm]
task->SetDoDistToBadCellCutOnCellLevel(DoDistToBadCellOnCellLevel);
task->SetDistToBadCellOnCellLevel(distToBadCellOnCellLevel);
// ~~~~~~~~ Filling options ~~~~~~
task->SetFillCellIdVsE(false); //Neccessary for QA (BadMap) (increases Outputfile-size)
task->SetFillTimingHistos(true); //Neccessary to determine timing cut values.
task->SetFillClusterHitmaps(true); // To check the BadMaps and cluster distributions
if (mPtHistoMode != "nrmlMptHst") {
if (mPtHistoMode == "hMPTvsMod") task->SetFillhMassPtModules(true); // For module-wise pi0 analysis
else if (mPtHistoMode == "hMPTvsTim") task->SetFillhMassPtTiming(true); // For calculation of timing efficiency
else if (mPtHistoMode == "hMPTnewAsy") task->SetFillNewAsymmClasses(true);
else mPtHistoMode = "nrmlMptHst"; // if none of the implemented (above) modes is set, the string is set to default
}
task->SetFillNTupelClusterEnergy(false); //Neccesary to calculate module dependent energy recal factors
// ~~~~ recalibration options ~~~~
//task->SetDoClusterEnergyRecalibration(false);
task->SetRecalibrationOption(recalOption); // look in .cxx for possible options
task->SetRecalibrateModuleWise(false);
task->SetModuleWiseRecalibrationFactors(recalFactorMod1,recalFactorMod2,recalFactorMod3);
//task->SetModuleWiseRecalibrationFactors(0.9942,0.9822,1.0072); //pp
// SelectCollisionCandidates according to collisionCandidates set in Settings (line 14)
if(collisionCandidates == "kPHI7") {
task->SelectCollisionCandidates(AliVEvent::kPHI7);
task->SetSelectedCollCandidatesForOutputName("kPHI7");
}
if(collisionCandidates == "kINT7") {
task->SelectCollisionCandidates(AliVEvent::kINT7);
task->SetSelectedCollCandidatesForOutputName("kINT7");
}
if(collisionCandidates == "kAny") {
task->SelectCollisionCandidates(AliVEvent::kAny);
task->SetSelectedCollCandidatesForOutputName("kAny");
}
if(collisionCandidates == "kMB") {
task->SelectCollisionCandidates(AliVEvent::kMB);
task->SetSelectedCollCandidatesForOutputName("kMB");
}
if(collisionCandidates == "kERT1") {
task->SelectCollisionCandidates(AliVEvent::kERT1);
task->SetSelectedCollCandidatesForOutputName("kERT1");
}
// ********************* IMPORTANT: ****************************
// The OutputfileName cannot be to long!
// The Gridjobs crash in a ERROR_RE if it is too long
// It has been successfully tested with a filename length of 135 symbols
// *************************************************************
// make OutPutFileName after making all Settings
TString OutPutFileName = task->MakeOutputFileName();
mgr->AddTask(task);
AliAnalysisDataContainer *coutput0 = mgr->CreateContainer(Form("%s:%s", ContName.Data(),OutPutFileName.Data()), TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:dirNeutralMeson", mgr->GetCommonFileName()));
mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
mgr->ConnectOutput(task,1,coutput0);
return task;
}
示例13: printf
AliAnalysisTaskHaHFECorrel *AddTaskHaHFECorrel(Double_t period, Double_t MinPtEvent, Double_t MaxPtEvent, Bool_t TRDQA, Bool_t CorrHadron, Bool_t CorrLP, Bool_t MCTruth, Bool_t IsMC, Bool_t IsAOD, Bool_t UseTender, Int_t ITSnCut, Int_t TPCnCut, Int_t TPCnCutdEdx, Double_t PhotElecPtCut, Int_t PhotElecTPCnCut,Bool_t PhotElecITSrefitCut,Double_t InvmassCut, Int_t HTPCnCut, Bool_t HITSrefitCut, Bool_t HTPCrefitCut, Bool_t UseITS, Double_t SigmaITScut, Double_t SigmaTOFcut, Double_t SigmaTPCcut, const char * ID="")
{
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
Error("AddTaskHaHFECorrel", "No analysis manager found.");
return 0;
}
if (!mgr->GetInputEventHandler()) {
::Error("AddTaskHaHFECorrel", "This task requires an input event handler");
return 0x0;
}
TString type = mgr->GetInputEventHandler()->GetDataType();
/*
AliMCEventHandler* mcHand = new AliMCEventHandler();
mgr->SetMCtruthEventHandler(mcHand);
Bool_t MCthere=kTRUE;
AliMCEventHandler *mcH = dynamic_cast<AliMCEventHandler*>(mgr->GetMCtruthEventHandler());
if (!mcH) {
MCthere=kFALSE;
}
*/
gROOT->LoadMacro("$ALICE_PHYSICS/PWGHF/hfe/macros/configs/pp/ConfigHaHFECorrel.C");
AliAnalysisTaskHaHFECorrel *taskMB =
ConfigHaHFECorrel(period, MinPtEvent, MaxPtEvent, TRDQA, CorrHadron, CorrLP, MCTruth, IsMC, IsAOD, UseTender, ITSnCut, TPCnCut, TPCnCutdEdx, PhotElecPtCut,PhotElecTPCnCut, PhotElecITSrefitCut, InvmassCut, HTPCnCut, HITSrefitCut, HTPCrefitCut, UseITS, SigmaITScut, SigmaTOFcut, SigmaTPCcut, ID);
if (!taskMB) {
Error("AddTaskHaHFECorrel", "No task found.");
}
taskMB->SelectCollisionCandidates(AliVEvent::kINT7);
// Load correction weights for pi0, eta
if (IsMC) {
TH1::AddDirectory(kFALSE);
printf("Loading Pi0EtaCorrectionFiles\n");
TString CorrectPi0EtaFile="alien:///alice/cern.ch/user/f/flherrma/HaHFECorrel/Pi0EtaWeights.root";
TFile *CorrectPi0Eta = TFile::Open(CorrectPi0EtaFile.Data());
if (CorrectPi0Eta) {
TH1F * Pi0W = (TH1F*)CorrectPi0Eta->Get("Pi0Weights");
TH1F * EtaW = (TH1F*)CorrectPi0Eta->Get("EtaWeights");
if (Pi0W) taskMB->SetPi0WeightToData(*Pi0W);
else printf("Could not load Pi0Weights\n");
if (EtaW) taskMB->SetEtaWeightToData(*EtaW);
else printf("Could not load EtaWeights\n");
}
else printf("Could not open Pi0Eta correction file \n");
TH1::AddDirectory(kTRUE);
}
TH1::AddDirectory(kFALSE);
printf("Loading RecEffFiles\n");
TString RecEffFileName="alien:///alice/cern.ch/user/f/flherrma/HaHFECorrel/RecEff.root";
TFile *RecEffFile = TFile::Open(RecEffFileName.Data());
//RecEffFile->ls();
if (RecEffFile) {
TH3F * HadRecEff = (TH3F*)RecEffFile->Get("HadRecEff");
TH2F * EleRecEff = (TH2F*)RecEffFile->Get("EleRecEff");
if (HadRecEff) taskMB->SetHadRecEff(*HadRecEff);
else printf("Could not load HadRecEff\n");
if (EleRecEff) taskMB->SetEleRecEff(*EleRecEff);
else printf("Could not load EleRecEff\n");
}
else printf("Could not open RecEff correction file \n");
TH1::AddDirectory(kTRUE);
mgr->AddTask(taskMB);
TString containerName1 = mgr->GetCommonFileName();
containerName1 += ":PWGHF_HaHFECorrel_kINT7_";
containerName1 += ID;
TString name1 = "histMB_";
name1 += ID;
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(name1.Data(), TList::Class(),AliAnalysisManager::kOutputContainer, containerName1.Data());
mgr->ConnectInput(taskMB, 0, cinput);
mgr->ConnectOutput(taskMB, 1, coutput1);
return NULL;
}
示例14: AddTaskPWGJEQA
//.........这里部分代码省略.........
if (dataType == kESD) {
clusName = "CaloClusters";
}
else if (dataType == kAOD) {
clusName = "caloClusters";
}
else {
clusName = "";
}
}
if (ncells == "usedefault") {
if (dataType == kESD) {
cellName = "EMCALCells";
}
else if (dataType == kAOD) {
cellName = "emcalCells";
}
else {
cellName = "";
}
}
TString name("AliAnalysisTaskPWGJEQA");
if (!trackName.IsNull()) {
name += "_";
name += trackName;
}
if (!clusName.IsNull()) {
name += "_";
name += clusName;
}
if (!cellName.IsNull()) {
name += "_";
name += cellName;
}
if (strcmp(suffix,"")) {
name += "_";
name += suffix;
}
AliAnalysisTaskPWGJEQA* qaTask = new AliAnalysisTaskPWGJEQA(name);
qaTask->SetVzRange(-10,10);
qaTask->SetNeedEmcalGeom(kFALSE);
qaTask->SetCaloCellsName(cellName);
qaTask->SetDetectorLevelName(trackName);
if (nGenLev && strcmp(nGenLev,"")!=0) qaTask->SetGeneratorLevelName(nGenLev);
qaTask->SetDoTrackQA(doTrackQA);
qaTask->SetDoCaloQA(doCaloQA);
qaTask->SetDoJetQA(doJetQA);
qaTask->SetDoEventQA(doEventQA);
// Add the detector-level track container
if (trackName == "tracks" || trackName == "Tracks") {
AliTrackContainer* trackCont = qaTask->AddTrackContainer(trackName);
trackCont->SetFilterHybridTracks(kTRUE);
}
else if (!trackName.IsNull()) {
qaTask->AddParticleContainer(trackName);
}
AliParticleContainer *partCont = qaTask->GetParticleContainer(trackName);
if (partCont) {
partCont->SetParticlePtCut(trackPtCut);
}
// Add the generator-level container, if specified
if (nGenLev && strcmp(nGenLev,"")!=0) {
AliMCParticleContainer* mcpartCont = qaTask->AddMCParticleContainer(nGenLev);
mcpartCont->SelectPhysicalPrimaries(kTRUE);
mcpartCont->SetParticlePtCut(0);
}
// Add the cluster container
AliClusterContainer *clusterCont = qaTask->AddClusterContainer(clusName);
if (clusterCont) {
clusterCont->SetClusECut(0.);
clusterCont->SetClusPtCut(0.);
clusterCont->SetClusHadCorrEnergyCut(clusECut);
clusterCont->SetDefaultClusterEnergy(AliVCluster::kHadCorr);
}
// Final settings, pass to manager and set the containers
mgr->AddTask(qaTask);
// Create containers for input/output
AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer() ;
TString contName = TString::Format("%s_histos", name.Data());
TString commonoutput;
commonoutput = mgr->GetCommonFileName();
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contName.Data(),
TList::Class(),AliAnalysisManager::kOutputContainer,
commonoutput);
mgr->ConnectInput (qaTask, 0, cinput1 );
mgr->ConnectOutput (qaTask, 1, coutput1 );
return qaTask;
}
示例15: if
//=========================================================================
AliAnalysisTask *RegisterTaskPID2TRD(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_t tpcClsPID = 80,
Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0,
Double_t *tpcdEdxcutlow=NULL,
Double_t *tpcdEdxcuthigh=NULL,
Double_t tofs=3., Int_t tofm=0,
Int_t itshitpixel = AliHFEextraCuts::kBoth, Int_t icent=1,
Int_t TRDtrigger=0,Int_t trdpidmethod=1, Int_t trdl=6, Int_t trde=4,TString detector){
gROOT->LoadMacro("$ALICE_PHYSICS/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPbTRD.C");
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
TString detused=detector.Copy();
TPRegexp(",").Substitute(detused,"","g");
printf("detectors in use %s %s \n",detector.Data(),detused.Data());
if (icent == 2) TString cesti("V0M");
else if (icent == 3) TString cesti("CL1");
else if (icent == 4) TString cesti("ZNA");
else TString cesti("V0A");
Int_t idcaxy = (Int_t)(dcaxy*10.);
Int_t idcaz = (Int_t)(dcaz*10.);
Int_t tpclow = 0;
if(tpcdEdxcutlow) tpclow = (Int_t) (tpcdEdxcutlow[0]*1000.);
Int_t itofs = (Int_t)(tofs*10.);
Int_t ipixelany = itshitpixel;
TString appendix(TString::Format("TPCc%dp%dITS%dr%dz%dTPCs%dTOFs%dm%ipa%dTRDt%dm%il%ie%i%sc%s",tpcCls,
tpcClsPID,itsCls,idcaxy,idcaz,tpclow,itofs,tofm,ipixelany,TRDtrigger,trdpidmethod,trdl,trde,detused.Data(),cesti.Data()));
printf("Add macro appendix %s\n", appendix.Data());
AliAnalysisTaskHFE *task = ConfigHFEpPbTRD(useMC, isAOD, appendix, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz,
tpcdEdxcutlow,tpcdEdxcuthigh, tofs, tofm, itshitpixel, icent, -0.8, 0.8, TRDtrigger,trdpidmethod,trdl,trde,detector);
if(isAOD)
task->SetAODAnalysis();
else
task->SetESDAnalysis();
if (useMC)
task->SetHasMCData(kTRUE);
else{
task->SetHasMCData(kFALSE);
}
if(TRDtrigger<2) task->SelectCollisionCandidates(AliVEvent::kINT7);
else task->SelectCollisionCandidates(AliVEvent::kTRD);
TString containerName = mgr->GetCommonFileName();
containerName += ":HFEtask";
containerName += appendix.Data();
printf("container name: %s\n", containerName.Data());
//create data containers
task->ConnectOutput(1, mgr->CreateContainer(Form("HFE_Results_%s", appendix.Data()),
TList::Class(), AliAnalysisManager::kOutputContainer,
containerName.Data()));
task->ConnectOutput(2, mgr->CreateContainer(Form("HFE_QA_%s", appendix.Data()), TList::Class(),
AliAnalysisManager::kOutputContainer,
containerName.Data()));
mgr->ConnectInput(task, 0, cinput );
mgr->AddTask(task);
return NULL;
}