本文整理汇总了C++中AliAnalysisManager::GetMCtruthEventHandler方法的典型用法代码示例。如果您正苦于以下问题:C++ AliAnalysisManager::GetMCtruthEventHandler方法的具体用法?C++ AliAnalysisManager::GetMCtruthEventHandler怎么用?C++ AliAnalysisManager::GetMCtruthEventHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliAnalysisManager
的用法示例。
在下文中一共展示了AliAnalysisManager::GetMCtruthEventHandler方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Printf
AliAnalysisTaskStrangenessVsMultiplicityMC *AddTaskStrangenessVsMultiplicityMC( Bool_t lSaveV0 = kFALSE, Bool_t lSaveCascade = kTRUE, const TString lMasterJobSessionFlag = "")
{
// Creates, configures and attaches to the train a cascades check task.
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskStrangenessVsMultiplicity", "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("AddTaskStrangenessVsMultiplicity", "This task requires an input event handler");
return NULL;
}
TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
// Create and configure the task
AliAnalysisTaskStrangenessVsMultiplicityMC *taskAuxiliary = new AliAnalysisTaskStrangenessVsMultiplicityMC("taskAuxiliary");
mgr->AddTask(taskAuxiliary);
TString outputFileName = AliAnalysisManager::GetCommonFileName();
outputFileName += ":PWGLF_StrVsMult";
if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC";
Printf("Set OutputFileName : \n %s\n", outputFileName.Data() );
AliAnalysisDataContainer *coutputList = mgr->CreateContainer("cList",
TList::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
AliAnalysisDataContainer *coutputTree = mgr->CreateContainer("cTreeEvent",
TTree::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
AliAnalysisDataContainer *coutputTreeV0 = mgr->CreateContainer("cTreeV0",
TTree::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
AliAnalysisDataContainer *coutputTreeCascade = mgr->CreateContainer("cTreeCascade",
TTree::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
//This one you should merge in file-resident ways...
coutputTree->SetSpecialOutput();
coutputTreeV0->SetSpecialOutput();
coutputTreeCascade->SetSpecialOutput();
//Recommendation: Tree as a single output slot
mgr->ConnectInput (taskAuxiliary, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput(taskAuxiliary, 1, coutputList);
mgr->ConnectOutput(taskAuxiliary, 2, coutputTree);
mgr->ConnectOutput(taskAuxiliary, 3, coutputTreeV0);
mgr->ConnectOutput(taskAuxiliary, 4, coutputTreeCascade);
return taskAuxiliary;
}
示例2: AddTaskEMCALTriggerQA
AliAnalysisTaskEMCALTriggerQA * AddTaskEMCALTriggerQA(Bool_t kSimulation = kFALSE, TString outputFile = "")
{
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr)
{
::Error("AddTaskEMCALTriggerQA", "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("AddTaskEMCALTriggerQA", "This task requires an input event handler");
return NULL;
}
TString taskName = "QAEMCALTrigger";
AliAnalysisTaskEMCALTriggerQA * qatrigger = new AliAnalysisTaskEMCALTriggerQA(taskName);
// Configuration
Bool_t kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
if(kUseKinematics) kSimulation = kTRUE;
if(kSimulation) qatrigger->SwitchOnMCData();
else qatrigger->SwitchOffMCData();
TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
if(inputDataType.Contains("AOD")) qatrigger->SwitchOffV0SignalHistograms();
else qatrigger->SwitchOnV0SignalHistograms();
// Define the input/output containers
qatrigger->GetRecoUtils()->SwitchOnBadChannelsRemoval ();
AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
if(outputFile.Length()==0) outputFile = AliAnalysisManager::GetCommonFileName();
printf("*** Task Name %s; Output file name: %s ***\n",taskName.Data(),outputFile.Data());
AliAnalysisDataContainer *coutput = mgr->CreateContainer(Form("%s",taskName.Data()),
TList::Class(), AliAnalysisManager::kOutputContainer,
Form("%s",outputFile.Data()));
mgr->AddTask(qatrigger);
mgr->ConnectInput (qatrigger, 0, cinput1);
mgr->ConnectOutput (qatrigger, 1, coutput);
return qatrigger;
}
示例3: Error
AliAnalysisTaskUpcEtaC *AddTaskUpcEtaC(Bool_t runTree = kTRUE,Bool_t runHist = kTRUE,Bool_t runSyst = kFALSE,Int_t tracking = 0){
//--- get the current analysis manager ---//
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
Error("AddTask_UpcEtaC", "No analysis manager found.");
return 0;
}
// Check the analysis type using the event handlers connected to the analysis manager.
//==============================================================================
if (!mgr->GetInputEventHandler()) {
Error("AddTask_UpcEtaC", "This task requires an input event handler");
return 0;
}
TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
Bool_t isMC;
if(mgr->GetMCtruthEventHandler()) isMC = kTRUE;
// Create tasks
AliAnalysisTaskUpcEtaC *task = new AliAnalysisTaskUpcEtaC(inputDataType.Data());
task->SetRunTree(runTree);
task->SetRunHist(runHist);
task->SetIsMC(isMC);
task->SetRunSyst(runSyst);
task->SetTracking(tracking);
mgr->AddTask(task);
// Create containers for input/output
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
AliAnalysisDataContainer *coutput = mgr->CreateContainer("EtaCK0sChannelTree", TTree::Class(), AliAnalysisManager::kOutputContainer,Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("EtaCTree", TTree::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("ListTrig", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput4 = mgr->CreateContainer("ListHist", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput5 = mgr->CreateContainer("ListHistKstar", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput6 = mgr->CreateContainer("ListHist2Rho4Pion", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput7 = mgr->CreateContainer("ListHistK0s3PiPi4K", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput8 = mgr->CreateContainer("ListHistZDC", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
// Connect input/output
mgr->ConnectInput(task, 0, cinput);
mgr->ConnectOutput(task, 1, coutput);
mgr->ConnectOutput(task, 2, coutput2);
mgr->ConnectOutput(task, 3, coutput3);
mgr->ConnectOutput(task, 4, coutput4);
mgr->ConnectOutput(task, 5, coutput5);
mgr->ConnectOutput(task, 6, coutput6);
mgr->ConnectOutput(task, 7, coutput7);
mgr->ConnectOutput(task, 8, coutput8);
return task;
}
示例4: AliMultSelectionTask
AliMultSelectionTask *AddTaskMultSelection( Bool_t lCalibration = kFALSE, TString lExtraOptions = "", Int_t lNDebugEstimators = 1, const TString lMasterJobSessionFlag = "")
{
// Creates, configures and attaches to the train a Multiplicity Selection Task
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskMultSelection", "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("AddTaskMultSelection", "This task requires an input event handler");
return NULL;
}
TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
// Create and configure the task
//Special options interpreting: will be taken care of by the task
// A - Add Extra AliCentrality V0M branch for cross-checks
// A - Add Extra AliPPVsMultUtils V0M branch for cross-checks
AliMultSelectionTask *taskMultSelection = new AliMultSelectionTask("taskMultSelection", lExtraOptions.Data(), lCalibration, lNDebugEstimators);
mgr->AddTask(taskMultSelection);
TString outputFileName = AliAnalysisManager::GetCommonFileName();
outputFileName += ":MultSelection";
if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC";
Printf("Set OutputFileName : \n %s\n", outputFileName.Data() );
AliAnalysisDataContainer *coutputList = mgr->CreateContainer("cListMultSelection",
TList::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
//Recommendation: Tree as a single output slot
mgr->ConnectInput (taskMultSelection, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput(taskMultSelection, 1, coutputList);
if ( lCalibration ) {
AliAnalysisDataContainer *coutputTree = mgr->CreateContainer("cCalibrationTree",
TTree::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
//This one you should merge in file-resident ways...
coutputTree->SetSpecialOutput();
mgr->ConnectOutput(taskMultSelection, 2, coutputTree);
}
return taskMultSelection;
}
示例5: strType
AliAnalysisTaskJetMassResponseDet* AddTaskJetMassResponseDet(const char * njetsPart,
const char * njetsDet,
const Double_t R,
const char *type,
Int_t pSel,
TString kEmcalTriggers = "",
TString tag = "") {
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr)
{
Error("AddTaskEmcalJetMass","No analysis manager found.");
return 0;
}
Bool_t ismc=kFALSE;
ismc = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
// Check the analysis type using the event handlers connected to the analysis manager.
//==============================================================================
if (!mgr->GetInputEventHandler())
{
::Error("AddTaskEmcalJetMass", "This task requires an input event handler");
return NULL;
}
TString wagonName = Form("JetMassResponseDet_%s%s",njetsDet,tag.Data());
TString strType(type);
//Configure jet mass detector response task
AliAnalysisTaskJetMassResponseDet *task = new AliAnalysisTaskJetMassResponseDet(wagonName.Data());
task->SetNCentBins(1);
//task->SetVzRange(-10.,10.);
task->SetJetContainerPart(0);
task->SetJetContainerDet(1);
AliJetContainer *jetContPart = task->AddJetContainer(njetsPart,strType,R);
if(jetContPart) {
// jetContPart->SetPercAreaCut(0.6);
}
AliJetContainer *jetContDet = task->AddJetContainer(njetsDet,strType,R);
if(jetContDet) {
jetContDet->SetPercAreaCut(0.6);
}
task->SetCaloTriggerPatchInfoName(kEmcalTriggers.Data());
task->SelectCollisionCandidates(pSel);
task->SetUseAliAnaUtils(kFALSE);
mgr->AddTask(task);
//Connnect input
mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer() );
//Connect output
TString contName(wagonName);
TString outputfile = Form("%s",AliAnalysisManager::GetCommonFileName());
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contName.Data(), TList::Class(),AliAnalysisManager::kOutputContainer,outputfile);
mgr->ConnectOutput(task,1,coutput1);
return task;
}
示例6: if
///
/// Main method calling all the configuration
/// It creates a CaloTrackCorrelations task for calorimeters performance studies,
/// configures it and adds it to the analysis manager.
///
/// The options that can be passed to the macro are:
/// \param suffix : A string with the type of trigger (default: MB, EMC)
/// \param simulation : A bool identifying the data as simulation
/// \param outputFile : A string to change the name of the histograms output file, default is AnalysisResults.root
/// \param year: The year the data was taken, used to configure some histograms
/// \param printSettings : A bool to enable the print of the settings per task
/// \param calibrate: if OADB was updated with calibration parameters not used in reconstruction, apply them here.
///
AliAnalysisTaskCaloTrackCorrelation *AddTaskCalorimeterQA(const char *suffix="default",
Bool_t simulation = kFALSE,
TString outputFile = "",
Int_t year = 2015,
Bool_t printSettings = kFALSE,
Bool_t calibrate = kTRUE)
{
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskCalorimeterQA", "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("AddTaskCalorimeter", "This task requires an input event handler");
return NULL;
}
TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
Bool_t kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
TString ssuffix = suffix;
if(kUseKinematics || simulation)
{
simulation = kTRUE;
printf("AddTaskCalorimeterQA - CAREFUL : Triggered events not checked in simulation!! \n");
if(!ssuffix.Contains("default")) return NULL;
}
// Configure analysis
//===========================================================================
//Reader
//For this particular analysis few things done by the reader.
//Nothing else needs to be set.
AliCaloTrackReader * reader = 0x0;
if (inputDataType.Contains("AOD")) reader = new AliCaloTrackAODReader();
else if(inputDataType.Contains("ESD")) reader = new AliCaloTrackESDReader();
//reader->SetDebug(10);//10 for lots of messages
reader->SwitchOnEMCALCells();
reader->SwitchOnEMCAL();
reader->SwitchOnPHOSCells(); // For correlation plots
reader->SwitchOnPHOS(); // For correlation plots
reader->SetEMCALPtMin(0.);
reader->SwitchOnCTS();
reader->SetCTSPtMin (0.);
reader->SetZvertexCut(10.);
reader->SetDeltaAODFileName(""); //Do not create deltaAOD file, this analysis do not create branches.
reader->SwitchOffWriteDeltaAOD() ;
if(!ssuffix.Contains("default"))
{
reader->SwitchOnTriggerPatchMatching();
reader->SwitchOffBadTriggerEventsRemoval();
reader->SetTriggerPatchTimeWindow(8,9);
//reader->SetEventTriggerL0Threshold(2.);
}
if(!simulation) reader->AnalyzeOnlyPhysicsEvents(); // in case physics selection was not on
if(calibrate && !simulation) reader->SwitchOnClusterRecalculation();
else reader->SwitchOffClusterRecalculation();
if(printSettings) reader->Print("");
// *** Calorimeters Utils ***
AliCalorimeterUtils *cu = new AliCalorimeterUtils;
// Remove clusters close to borders, at least max energy cell is 1 cell away
cu->SetNumberOfCellsFromEMCALBorder(1);
if (year == 2010) cu->SetNumberOfSuperModulesUsed(4); //EMCAL first year
else if (year < 2014) cu->SetNumberOfSuperModulesUsed(10);
else cu->SetNumberOfSuperModulesUsed(20);
cu->SwitchOffRecalibration(); // Check the reader if it is taken into account during filtering
cu->SwitchOffRunDepCorrection();
cu->SwitchOnCorrectClusterLinearity();
//.........这里部分代码省略.........
示例7: sTracksName
AliAnalysisTask *AddTaskEMCALCorrectionForEHTask(UInt_t kPhysSel = AliVEvent::kAny)
{
//get the current analysis manager
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
Error("AddTaskHFEElecHadronCorrlPbPb", "No analysis manager found.");
return 0;
}
if (!mgr->GetInputEventHandler()) {
::Error("AddTaskHFEElecHadronCorrlPbPb", "This task requires an input event handler");
return NULL;
}
TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
/* if (type=="AOD"){
::Error("AddTaskHFEElecHadronCorrlPbPb", "The tasks exits because AODs are in input");
return NULL;
}
*/
Bool_t MCthere=kTRUE;
AliMCEventHandler *mcH = dynamic_cast<AliMCEventHandler*>(mgr->GetMCtruthEventHandler());
if(!mcH){
MCthere=kFALSE;
}
gROOT->LoadMacro("$ALICE_PHYSICS/PWGPP/PilotTrain/AddTaskCDBconnect.C");
gROOT->LoadMacro("$ALICE_PHYSICS/PWG/EMCAL/macros/AddTaskEMCALTender.C");
gROOT->LoadMacro("$ALICE_PHYSICS/PWG/EMCAL/macros/AddTaskClusterizerFast.C");
gROOT->LoadMacro("$ALICE_PHYSICS/PWG/EMCAL/macros/AddTaskEmcalClusterMaker.C");
gROOT->LoadMacro("$ALICE_PHYSICS/PWG/EMCAL/macros/AddTaskEmcalAodTrackFilter.C");
gROOT->LoadMacro("$ALICE_PHYSICS/PWG/EMCAL/macros/AddTaskEmcalClusTrackMatcher.C");
TString sTracksName("AODFilterTracks");
TString sClusName("EmcCaloClusters");
// Setup task
AliTaskCDBconnect *taskCDB = AddTaskCDBconnect();
taskCDB->SetFallBackToRaw(kTRUE);
// Tender Supplies
const char *cPass = 0;
Bool_t bDistBC = kFALSE; //switch for recalculation cluster position from bad channel
Bool_t bRecalibClus = kFALSE;
Bool_t bRecalcClusPos = kFALSE;
Bool_t bNonLinearCorr = kFALSE;
Bool_t bRemExoticCell = kFALSE;
Bool_t bRemExoticClus = kFALSE;
Bool_t bFidRegion = kFALSE;
Bool_t bCalibEnergy = kTRUE;
Bool_t bCalibTime = kTRUE;
Bool_t bRemBC = kTRUE;
UInt_t iNonLinFunct = AliEMCALRecoUtils::kNoCorrection;
Bool_t bReclusterize = kFALSE;
Float_t fSeedThresh = 0.1; // 100 MeV
Float_t fCellThresh = 0.05; // 50 MeV
UInt_t iClusterizer = AliEMCALRecParam::kClusterizerv2;
Bool_t bTrackMatch = kFALSE;
Bool_t bUpdateCellOnly = kTRUE;
Float_t fEMCtimeMin = -50e-6;
Float_t fEMCtimeMax = 50e-6;
Float_t fEMCtimeCut = 1e6;
Bool_t remExoticCell = kFALSE;
AliAnalysisTaskSE *pTenderTask = AddTaskEMCALTender(bDistBC, bRecalibClus, bRecalcClusPos, bNonLinearCorr, bRemExoticCell, bRemExoticClus,
bFidRegion, bCalibEnergy, bCalibTime, bRemBC, iNonLinFunct, bReclusterize, fSeedThresh,
fCellThresh, iClusterizer, bTrackMatch, bUpdateCellOnly, fEMCtimeMin, fEMCtimeMax, fEMCtimeCut, cPass);
pTenderTask->SelectCollisionCandidates(kPhysSel);
//Clusterizer task
AliAnalysisTaskEMCALClusterizeFast *pClusterizerTask = AddTaskClusterizerFast("ClusterizerFast", "", "", iClusterizer,
fCellThresh, fSeedThresh, fEMCtimeMin, fEMCtimeMax, fEMCtimeCut,
remExoticCell, bDistBC, AliAnalysisTaskEMCALClusterizeFast::kFEEData);
pClusterizerTask->SelectCollisionCandidates(kPhysSel);
//Cluster maker task
UInt_t nonLinFunct = AliEMCALRecoUtils::kBeamTestCorrected;
Bool_t remExoticClus = kTRUE;
AliEmcalClusterMaker *pClusterMakerTask = AddTaskEmcalClusterMaker(nonLinFunct, remExoticClus, "usedefault", sClusName, 0., kTRUE);
pClusterMakerTask->GetClusterContainer(0)->SetClusPtCut(0.);
pClusterMakerTask->GetClusterContainer(0)->SetClusECut(0.);
pClusterMakerTask->SelectCollisionCandidates(kPhysSel);
//tracks maker for AOD
char* periodstr = "16:1:includeNoITS=kTRUE doProp=kTRUE doAttemptProp=kFALSE isMC=kFALSE";
TString period(periodstr);
Bool_t doAODTrackProp = kTRUE;
Double_t trackeff = 1.0;
Double_t edist = 440;
AliEmcalAodTrackFilterTask *pHybTask = AddTaskEmcalAodTrackFilter(sTracksName,"tracks",period);
if (doAODTrackProp) {
pHybTask->SetDist(edist);
pHybTask->SetAttemptPropMatch(kTRUE);
}
pHybTask->SelectCollisionCandidates(AliVEvent::kAny);
pHybTask->SetTrackEfficiency(trackeff);
// Cluster-track matcher task
Double_t maxMatchR = 0.1;
Bool_t attachEmcalPart = kFALSE;
Bool_t updateClusters = kTRUE;
Bool_t updateTracks = kTRUE;
//.........这里部分代码省略.........
示例8: name
AliAnalysisTaskEMCALClusterizeFast* AddTaskClusterizerFW(
const char* trigType = "L0", // Trigger type: it can be "L0" (4x4, with 2x2 sliding inside SM),
//"L1GAMMA" (4x4, with 2x2 sliding through SMs), "L1JET" (32x32 with 4x4 sliding through SMs)
const Bool_t fOR = kFALSE,
const TString & geomName = "EMCAL_COMPLETEV1",
Double_t minE = -1
)
{
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskClusterizerFW", "No analysis manager found.");
return 0;
}
Bool_t ismc=kFALSE;
ismc = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
if (ismc)
::Warning("AddTaskClusterizerFW", "Task was Never tested on MC data");
TString name("ClusterizerFW");
TString nameout("Clusters");
Int_t n, s;
Float_t minE, minT, maxT;
Bool_t slidingTRU;
Bool_t cutL0time;
UInt_t inputCellType = AliAnalysisTaskEMCALClusterizeFast::kFEEData;
name += trigType;
nameout += trigType;
if (!strcmp(trigType, "L0")) {
n = 4;
s = 2;
slidingTRU = 0;
if (fOR) inputCellType = AliAnalysisTaskEMCALClusterizeFast::kL0FastORsTC;
} else if (!strcmp(trigType, "L1GAMMA")) {
n = 4;
s = 2;
slidingTRU = 1;
if (fOR) inputCellType = AliAnalysisTaskEMCALClusterizeFast::kL1FastORs;
} else if (!strcmp(trigType, "L1JET")) {
n = 32;
s = 4;
slidingTRU = 1;
if (fOR) inputCellType = AliAnalysisTaskEMCALClusterizeFast::kL1FastORs;
} else {
printf("trigType not valid, returning...");
return 0;
}
if (fOR) {
name += "FOR";
nameout += "FOR";
if (minE < 0) minE = 3;
minT = -20;
maxT = 20;
} else {
name += "FEE";
nameout += "FEE";
if (minE < 0) minE = .045;
minT = -1.;
maxT = +1.;
}
AliAnalysisTaskEMCALClusterizeFast *task = new AliAnalysisTaskEMCALClusterizeFast(name);
AliEMCALRecParam *recparam = task->GetRecParam();
recparam->SetClusterizerFlag(AliEMCALRecParam::kClusterizerFW);
recparam->SetMinECut(minE);
recparam->SetTimeMax(maxT);
recparam->SetTimeMin(minT);
task->SetGeometryName(geomName);
task->SetAttachClusters(kTRUE);
task->SetOverwrite(kFALSE);
task->SetNewClusterArrayName(nameout);
task->SetnPhi(n);
task->SetnEta(n);
task->SetShiftPhi(s);
task->SetShiftEta(s);
task->SetTRUShift(!slidingTRU);
task->SetInputCellType(inputCellType);
task->SetLoadPed(kFALSE);
task->SetLoadCalib(kFALSE);
task->SetRecalibrateCellsOnly(kFALSE);
mgr->AddTask(task);
mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
cout << " *** " << name << " configured *** " << endl;
return task;
}
示例9: AliResonanceKink
AliAnalysisTaskKinkResonance *AddTaskKinkResonancePhiMC(Short_t lCollidingSystems=0 /*0 = pp, 1 = AA*/)
{
// Creates, configures and attaches to the train a kink resonance task.
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskKinkResonancePhiMC", "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("AddTaskKinkResonancePhiMC", "This task requires an input event handler");
return NULL;
}
TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
if (type != "ESD") {
::Error("AddTaskKinkResonancePhiMC", "This task needs an ESD input handler");
return NULL;
}
if (!mgr->GetMCtruthEventHandler()) {
::Error("AddTaskKinkResonancePhiMC", "This task needs an MC handler");
return NULL;
}
// Setup the analysis object
AliResonanceKink *kinkResonanceObjectPMC=new AliResonanceKink();
kinkResonanceObjectPMC->InitOutputHistograms(70,0.99,1.088, 36, -0.9, 0.9, 100, 0.0, 10.0);
kinkResonanceObjectPMC->SetPDGCodes(kKPlus, kKPlus, AliResonanceKink::kPhi);
kinkResonanceObjectPMC->SetAnalysisType("MC"); // "ESD" or "MC" or "DATA"
kinkResonanceObjectPMC->SetMaxNsigmaToVertex(4.0);
kinkResonanceObjectPMC->SetMaxDCAxy(3.0);
kinkResonanceObjectPMC->SetMaxDCAzaxis(3.0);
kinkResonanceObjectPMC->SetPtTrackCut(0.25);
kinkResonanceObjectPMC->SetMinTPCclusters(50);
kinkResonanceObjectPMC->SetMaxChi2PerTPCcluster(3.5);
kinkResonanceObjectPMC->SetMaxCov0(2.0);
kinkResonanceObjectPMC->SetMaxCov2(2.0);
kinkResonanceObjectPMC->SetMaxCov5(0.5);
kinkResonanceObjectPMC->SetMaxCov9(0.5);
kinkResonanceObjectPMC->SetMaxCov14(2.0);
kinkResonanceObjectPMC->SetMinKinkRadius(120.);
kinkResonanceObjectPMC->SetMaxKinkRadius(220.);
kinkResonanceObjectPMC->SetQtLimits(0.05, 0.5);
kinkResonanceObjectPMC->SetUpperAbsEtaCut(0.9);
// Create and configure the task
AliAnalysisTaskKinkResonance *taskresonancePhiMC = new AliAnalysisTaskKinkResonance("TaskResPhiMCKinkPID");
taskresonancePhiMC->SetAnalysisKinkObject(kinkResonanceObjectPMC);
mgr->AddTask(taskresonancePhiMC);
// Create ONLY the output containers for the data produced by the task.
// Get and connect other common input/output containers via the manager as below
//==============================================================================
TString outputFileName = AliAnalysisManager::GetCommonFileName();
outputFileName += ":PWG2KINKResonancePhiMC";
if (lCollidingSystems) outputFileName += "_AA";
else outputFileName += "_PP";
if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC";
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("KinkResPhiMC",
TList::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
mgr->ConnectInput(taskresonancePhiMC, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput(taskresonancePhiMC, 1, coutput1);
return taskresonancePhiMC;
}
示例10: AliForwardMCCorrectionsTask
/**
* Add a Forward MC correction generator task to train
*
*
* @return Added task
*
* @ingroup pwglf_forward_mc
*/
AliAnalysisTask*
AddTaskForwardMCCorr(Bool_t satellite=false,
UShort_t rflags=0,
UShort_t maxStrips=2)
{
// --- Load libraries ----------------------------------------------
gROOT->LoadClass("AliAODForwardMult", "libPWGLFforward2");
// --- Creating the manager and handlers ---------------------------
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr->GetMCtruthEventHandler()) {
Error("AddTaskCentralMCCorr",
"No MC input handler defined - cannot continue");
return 0;
}
// --- Add our task ------------------------------------------------
AliForwardMCCorrectionsTask* task =
new AliForwardMCCorrectionsTask("ForwardCorr");
task->GetTrackDensity().SetDebug(false);
task->SetSatellite(satellite);
AliFMDMCTrackDensity& dn =
static_cast<AliFMDMCTrackDensity&>(task->GetTrackDensity());
dn.SetMaxConsequtiveStrips(maxStrips); // was 3
// task->SetVertexAxis(40, -20., 20.);
if (rflags != 0) {
AliSimplePidWeights* w = new AliSimplePidWeights();
if (rflags & 0x4) {
// Realistic weights
// Based on measurements in Pb-Pb @ 2.76
//
// Ratio to pi+- Reference Value [%]
// -------------+---------------+----------
// p/pbar | PRC88,044910 | 4.57
// K+- | PRC88,044910 | 14.88
// K^0_S | PRL111,222301 | 7.51
// Lambda | PRL111,222301 | 1.77
// Xi^0 | - | -
//
// WA98 Xi-/Lambda ~ 0.15 ->
// Xi- / pi = Xi-/Lambda Lambda / pi = 0.14 * 1.77 = 0.25%
// WA98 Omega-/Xi- ~ 0.25
// Omega- / pi- = Omega-/Xi- Xi-/pi = 0.25 * 0.25 = 0.06%
w->AddPDGCode(321, 2.0,true); // kaons
w->AddPDGCode(310, 1.5,true); // K0s
w->AddPDGCode(3122,1.5,true); // Lambda
w->AddPDGCode(3212,1.5,true); // Sigma0
w->AddPDGCode(3322,6.0,true); // Xi0
}
else {
// Roberto's analysis of Pb-Pb @ 5.02TeV
//
// pi^+/-2 [ 211]: 0.9412
// K^+/- [ 321]: 1.4118
// p/pbar [2212]: 0.9412
// K^0_S [ 310]: 1.5223
// Lambda [3122]: 2.7500
// Sigma^0 [3212]: 2.7500
// Xi^0 [3322]: 3.2411
w->AddPDGCode(211, 0.9583*0.9822,true); // pions
w->AddPDGCode(321, 1.4374*0.9822,true); // kaons
w->AddPDGCode(2212,0.9583*0.9822,true); // protons
w->AddPDGCode(310, 1.0000*1.5223,true); // K0s
w->AddPDGCode(3122,1.0000*2.7500,true); // Lambda
w->AddPDGCode(3212,1.0000*2.7500,true); // Sigma0
w->AddPDGCode(3322,1.0000*3.2411,true); // Xi0
}
if (rflags & 0x1) task->GetTrackDensity().SetWeights(w);
if (rflags & 0x2) task->GetTrackDensity().SetTruthWeights(w);
}
// --- connect input/output ----------------------------------------
task->Connect(0, 0);
return task;
}
示例11: AddTaskEmcalHJetMass
EmcalHJetMassAnalysis::AliAnalysisTaskEmcalHJetMass* AddTaskEmcalHJetMass(const char * njetsBase,
const Double_t R,
const char * nrhoBase,
const char * ntracks,
const char * nclusters,
const char * type,
Double_t ptMinH = 5.,
Double_t maxDPhi = 0.6,
Int_t pSel,
const char * CentEst = "V0M",
TString trigClass = "",
TString kEmcalTriggers = "",
TString nJetsUnsub = "",
TString tag = "") {
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr)
{
Error("AddTaskEmcalHJetMass","No analysis manager found.");
return 0;
}
Bool_t ismc=kFALSE;
ismc = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
// Check the analysis type using the event handlers connected to the analysis manager.
//==============================================================================
if (!mgr->GetInputEventHandler())
{
::Error("AddTaskEmcalHJetMass", "This task requires an input event handler");
return NULL;
}
TString wagonName = Form("HJetMass_%s_TC%s%s",njetsBase,trigClass.Data(),tag.Data());
//Configure jet tagger task
EmcalHJetMassAnalysis::AliAnalysisTaskEmcalHJetMass *task = new EmcalHJetMassAnalysis::AliAnalysisTaskEmcalHJetMass(wagonName.Data());
task->SetNCentBins(4);
task->SetMaxDeltaPhi(maxDPhi);
AliParticleContainer *trackCont = task->AddParticleContainer(ntracks);
trackCont->SetParticlePtCut(ptMinH);
AliClusterContainer *clusterCont = task->AddClusterContainer(nclusters);
task->SetJetContainerBase(0);
TString strType(type);
AliJetContainer *jetContBase = task->AddJetContainer(njetsBase,strType,R);
if(jetContBase) {
jetContBase->SetRhoName(nrhoBase);
jetContBase->ConnectParticleContainer(trackCont);
jetContBase->ConnectClusterContainer(clusterCont);
jetContBase->SetPercAreaCut(0.6);
}
if(!nJetsUnsub.IsNull()) {
AliJetContainer *jetContUS = task->AddJetContainer(nJetsUnsub.Data(),strType,R);
if(jetContUS) {
jetContUS->SetRhoName(nrhoBase);
jetContUS->ConnectParticleContainer(trackCont);
jetContUS->ConnectClusterContainer(clusterCont);
jetContUS->SetPercAreaCut(0.6);
}
}
task->SetCaloTriggerPatchInfoName(kEmcalTriggers.Data());
task->SetCentralityEstimator(CentEst);
task->SelectCollisionCandidates(pSel);
task->SetUseAliAnaUtils(kFALSE);
mgr->AddTask(task);
//Connnect input
mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer() );
//Connect output
TString contName(wagonName);
TString outputfile = Form("%s",AliAnalysisManager::GetCommonFileName());
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(contName.Data(), TList::Class(),AliAnalysisManager::kOutputContainer,outputfile);
mgr->ConnectOutput(task,1,coutput1);
return task;
}
示例12: AddTaskPerformanceTPCdEdxQA
//____________________________________________
AliPerformanceTask* AddTaskPerformanceTPCdEdxQA(Bool_t bUseMCInfo=kFALSE, Bool_t bUseESDfriend=kTRUE,
Bool_t highMult = kFALSE, const char *triggerClass=0,
Bool_t bUseHLT = kFALSE, Bool_t bUseTOF = kFALSE, Bool_t bTPCTrackingOnly = kFALSE,
Bool_t bDoEffTpcSec = kFALSE)
{
const TString taskName[] = {"TPC", "HLT"};
const TString taskName2[] = {"", "_Tracking"};
Int_t idx = 0, idx2 = 0;
if (bUseHLT) idx = 1;
if (bTPCTrackingOnly) idx2 = 1;
//
// Add AliPerformanceTask with TPC performance components
//
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if(!mgr) {
Error("AddTaskPerformanceTPCdEdxQA","AliAnalysisManager not set!");
return NULL;
}
TString type = mgr->GetInputEventHandler()->GetDataType();
if (!type.Contains("ESD")) {
Error("AddTaskPerformanceTPCdEdxQA", "ESD input handler needed!");
return NULL;
}
AliMCEventHandler *mcH = (AliMCEventHandler*)mgr->GetMCtruthEventHandler();
if (!mcH && bUseMCInfo) {
Error("AddTaskPerformanceTPCdEdxQA", "MC input handler needed!");
return NULL;
}
//
// Add HLT Event
//
if (bUseHLT) {
AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*>(mgr->GetInputEventHandler());
esdH->SetReadHLT();
}
//
// Create task
//
AliPerformanceTask *task = new AliPerformanceTask("PerformanceQA",Form("%s%s Performance",taskName[idx].Data(), taskName2[idx2].Data()));
if (!task) {
Error("AddTaskPerformanceTPCdEdxQA", "%s", Form("%s%s performance task cannot be created!",taskName[idx].Data(), taskName2[idx2].Data()));
return NULL;
}
task->SetUseMCInfo(bUseMCInfo);
task->SetUseESDfriend(bUseESDfriend);
// task->SetUseTerminate(kFALSE);
task->SetUseHLT(bUseHLT);
//
// Add task to analysis manager
//
mgr->AddTask(task);
//
// Create TPC-ESD track reconstruction cuts
// MB tracks
//
AliRecInfoCuts *pRecInfoCutsTPC = new AliRecInfoCuts("pRecInfoCutsTPC");
if(pRecInfoCutsTPC) {
pRecInfoCutsTPC->SetMaxDCAToVertexXY(3.0);
pRecInfoCutsTPC->SetMaxDCAToVertexZ(3.0);
pRecInfoCutsTPC->SetRequireSigmaToVertex(kFALSE);
pRecInfoCutsTPC->SetRequireTPCRefit(kFALSE);
pRecInfoCutsTPC->SetAcceptKinkDaughters(kFALSE);
pRecInfoCutsTPC->SetMinNClustersTPC(70);
pRecInfoCutsTPC->SetMaxChi2PerClusterTPC(4.);
pRecInfoCutsTPC->SetDCAToVertex2D(kTRUE);
pRecInfoCutsTPC->SetHistogramsOn(kFALSE);
} else {
Error("AddTaskPerformanceTPCdEdxQA", "AliRecInfoCutsTPC cannot be created!");
return NULL;
}
//
// Create TPC-MC track reconstruction cuts
//
AliMCInfoCuts *pMCInfoCuts = new AliMCInfoCuts("pMCInfoCuts");
if(pMCInfoCuts) {
pMCInfoCuts->SetMinTrackLength(70);
} else {
Error("AddTaskPerformanceTPCdEdxQA", "AliMCInfoCuts cannot be created!");
return NULL;
}
//
// Create performance objects for TPC and set cuts
//
enum { kTPC = 0, kTPCITS, kConstrained, kTPCInner, kTPCOuter, kTPCSec };
AliPerformanceTPC *pCompTPC0;
AliPerformanceMatch *pCompMatch1;
AliPerformanceMatch *pCompMatch2;
AliPerformanceDEdx *pCompDEdx3;
//.........这里部分代码省略.........
示例13: if
AliAnalysisTaskParticleCorrelation *AddTaskPartCorr(TString inputDataType, TString calorimeter, Bool_t kPrintSettings = kFALSE,Bool_t kSimulation = kFALSE, Bool_t outputAOD=kFALSE, Bool_t oldAOD=kFALSE, Int_t debugLevel = 0)
{
// Creates a PartCorr task, configures it and adds it to the analysis manager.
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskPartCorr", "No analysis manager to connect to.");
return NULL;
}
Bool_t kUseKinematics = kFALSE;
if(kSimulation) {
kUseKinematics = (mgr->GetMCtruthEventHandler())?kTRUE:kFALSE;
if (!kUseKinematics && inputDataType == "AOD") kUseKinematics = kTRUE; //AOD primary should be available ...
}
cout<<"********* ACCESS KINE? "<<kUseKinematics<<endl;
// Configure analysis
//===========================================================================
// *** Reader ***
AliCaloTrackReader * reader =0x0 ;
if(inputDataType.Contains("AOD")) reader = new AliCaloTrackAODReader();
else if(inputDataType=="ESD") reader = new AliCaloTrackESDReader();
else if(inputDataType=="MC" && inputDataType == "ESD") reader = new AliCaloTrackMCReader();
reader->SetDebug(-1);//10 for lots of messages
reader->SwitchOnCTS();
reader->SwitchOffEMCAL();
reader->SwitchOffPHOS();
reader->SwitchOffEMCALCells();
reader->SwitchOffPHOSCells();
reader->SetDataType(2);
//Min particle pT
reader->SetEMCALPtMin(0.3);
reader->SetPHOSPtMin(0.3);
reader->SetCTSPtMin(0.1);
reader->SwitchOnWriteDeltaAOD() ;
// if(oldAOD) reader->SwitchOnOldAODs();
reader->SwitchOnWriteDeltaAOD();
if(kPrintSettings) reader->Print("");
// *** Calorimeters Utils ***
AliCalorimeterUtils *cu = new AliCalorimeterUtils;
//Recalibration
//cu->SwitchOnRecalibration();
//TFile * f = new TFile("RecalibrationFactors.root","read");
//cu->SetEMCALChannelRecalibrationFactors(0,(TH2F*)f->Get("EMCALRecalFactors_SM0"));
//cu->SetEMCALChannelRecalibrationFactors(1,(TH2F*)f->Get("EMCALRecalFactors_SM1"));
//cu->SetEMCALChannelRecalibrationFactors(2,(TH2F*)f->Get("EMCALRecalFactors_SM2"));
//cu->SetEMCALChannelRecalibrationFactors(3,(TH2F*)f->Get("EMCALRecalFactors_SM3"));
//f->Close();
cu->SetDebug(debugLevel);
if(kPrintSettings) cu->Print("");
// ##### Analysis algorithm settings ####
//==================================
// ### Isolation analysis ###
//=================================
//Photon
AliAnaParticleIsolation *anaisol = new AliAnaParticleIsolation();
anaisol->SetDebug(debugLevel);
anaisol->SetMinPt(0);
anaisol->SetInputAODName("ConversionGamma");
anaisol->SetAODObjArrayName("ConversionGamma");
anaisol->SetCalorimeter("CTS");
if(kUseKinematics) anaisol->SwitchOnDataMC() ;//Access MC stack and fill more histograms
else anaisol->SwitchOffDataMC() ;
anaisol->SwitchOffInvariantMass();
AliIsolationCut * ic = anaisol->GetIsolationCut();
ic->SetConeSize(0.4);
ic->SetPtThreshold(0.7);
ic->SetPtFraction(0.1);
ic->SetSumPtThreshold(1.0) ;
ic->SetParticleTypeInCone(AliIsolationCut::kOnlyCharged);
ic->SetICMethod(AliIsolationCut::kSumPtFracIC);
if(kPrintSettings) ic->Print("");
anaisol->SetHistoPtRangeAndNBins(0, 50, 500) ;
anaisol->AddToHistogramsName("AnaIsolPhoton_");
anaisol->SetOutputAODClassName("AliAODPWG4ParticleCorrelation");
anaisol->SwitchOnReIsolation();
anaisol->SwitchOffSeveralIsolation();
//.........这里部分代码省略.........
示例14: Error
AliAnalysisTask *AddTaskFlowTPCEMCalEP(Double_t SigmaITScut, Double_t SigmaTOFcut, Double_t SigmaTPCcut, Double_t AssPtCut, Int_t AssTPCnCut, Int_t ITSncut, Bool_t AssITSrefitCut, Int_t TPCnCut, Int_t period, Bool_t UseNewEP, Bool_t UseTender, TString ID="ContName", TString passV0, TString passTPC, Bool_t TimeCut,Bool_t WeightSyst,Bool_t SystTOFcut, Double_t CutM02, Double_t CutM20, Bool_t SScut, Bool_t EnablePileupRejVZEROTPCout)
{
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
Error("AddTaskFlowTPCEMCalEP", "No analysis manager found.");
return NULL;
}
if (!mgr->GetInputEventHandler()) {
::Error("AddTaskFlowTPCEMCalEP", "This task requires an input event handler");
return NULL;
}
TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
// if (type=="AOD"){
// ::Error("AddTaskFlowTPCEMCalEP", "The tasks exits because AODs are in input");
// return NULL;
// }
Bool_t MCthere=kFALSE;
AliMCEventHandler *mcH = dynamic_cast<AliMCEventHandler*>(mgr->GetMCtruthEventHandler());
if(!mcH){
MCthere=kFALSE;
}else{
MCthere=kTRUE;
}
if (!UseNewEP){
//Event plane task
AliEPSelectionTask *eventplaneTask = new AliEPSelectionTask("EventplaneSelection");
eventplaneTask->SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kSemiCentral | AliVEvent::kCentral | AliVEvent::kEMCEGA | AliVEvent::kEMCEJE);
eventplaneTask->SetTrackType("TPC");
eventplaneTask->SetUsePtWeight();
eventplaneTask->SetUsePhiWeight();
eventplaneTask->SetSaveTrackContribution();
mgr->AddTask(eventplaneTask);
TString containerName0 = mgr->GetCommonFileName();
containerName0 += ":PWGHF_hfeCalEventPlane";
containerName0 += ID;
TString name0 = "EPStat";
name0 += ID;
AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(name0.Data(),TList::Class(), AliAnalysisManager::kOutputContainer,containerName0.Data());
mgr->ConnectInput(eventplaneTask, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput(eventplaneTask,1,coutput1);
}
Bool_t Is2015 = kTRUE;
if(Is2015){
gROOT->LoadMacro("$ALICE_PHYSICS/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TPCEMCal_EP.C");
AliAnalysisTaskFlowTPCEMCalEP *taskMB = ConfigHFE_FLOW_TPCEMCal_EP(MCthere,SigmaITScut,SigmaTOFcut,SigmaTPCcut,AssPtCut,AssTPCnCut,ITSncut,AssITSrefitCut,TPCnCut,UseNewEP,UseTender,period,passV0,passTPC,TimeCut,WeightSyst,SystTOFcut,CutM02,CutM20,SScut,EnablePileupRejVZEROTPCout);
mgr->AddTask(taskMB);
taskMB->SelectCollisionCandidates(AliVEvent::kINT7);
TString containerName1 = mgr->GetCommonFileName();
containerName1 += ":PWGHF_hfeCalcorrINT7V2";
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->ConnectInput(taskMB, 1, corrTask);
mgr->ConnectOutput(taskMB, 1, coutput1);
}
if(!Is2015){
gROOT->LoadMacro("$ALICE_PHYSICS/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TPCEMCal_EP.C");
AliAnalysisTaskFlowTPCEMCalEP *taskMB = ConfigHFE_FLOW_TPCEMCal_EP(MCthere,SigmaITScut,SigmaTOFcut,SigmaTPCcut,AssPtCut,AssTPCnCut,ITSncut,AssITSrefitCut,TPCnCut,UseNewEP,UseTender,period,passV0,passTPC,TimeCut,WeightSyst,SystTOFcut,CutM02,CutM20,SScut,EnablePileupRejVZEROTPCout);
AliAnalysisTaskFlowTPCEMCalEP *taskcorrMB = ConfigHFE_FLOW_TPCEMCal_EP(MCthere,SigmaITScut,SigmaTOFcut,SigmaTPCcut,AssPtCut,AssTPCnCut,ITSncut,AssITSrefitCut,TPCnCut,UseNewEP,UseTender,period,passV0,passTPC,TimeCut,WeightSyst,SystTOFcut,CutM02,CutM20,SScut,EnablePileupRejVZEROTPCout);
AliAnalysisTaskFlowTPCEMCalEP *taskTR = ConfigHFE_FLOW_TPCEMCal_EP(MCthere,SigmaITScut,SigmaTOFcut,SigmaTPCcut,AssPtCut,AssTPCnCut,ITSncut,AssITSrefitCut,TPCnCut,UseNewEP,UseTender,period,passV0,passTPC,TimeCut,WeightSyst,SystTOFcut,CutM02,CutM20,SScut,EnablePileupRejVZEROTPCout);
mgr->AddTask(taskcorrMB);
mgr->AddTask(taskMB);
mgr->AddTask(taskTR);
// Flattened semi central trigger
taskcorrMB->SelectCollisionCandidates(AliVEvent::kAny);
TString containerName1 = mgr->GetCommonFileName();
containerName1 += ":PWGHF_hfeCalcorrSemiCentralV2";
containerName1 += ID;
TString name1 = "histcorrMB";
name1 += ID;
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(name1.Data(), TList::Class(),AliAnalysisManager::kOutputContainer, containerName1.Data());
mgr->ConnectInput(taskcorrMB, 0, cinput);
//.........这里部分代码省略.........
示例15: sName
AliAnalysisTask *AddEbyEPidRatioTaskV1(const Char_t *name = "NuDyn", // 0
Int_t isModeDist = 1, // 1
Bool_t isModeEff = 0, // 2
Bool_t isModeDCA = 0, // 3
Bool_t isModeQA = 0, // 4
Int_t isRatio = 3, // 5
Bool_t isModeAOD = 0, // 6
Bool_t isSetExt = 0, // 7
Int_t aodFilterBit = 1024, // 8
Float_t gEta = 0.8, // 9
Int_t modeCuts = 0, // 10
Int_t modePID =-1, // 11
Float_t gMinPt = 0.3, // 12
Float_t gMaxPt = 2.5, // 13
Float_t gMinPtForTof = 0.21, // 14
Float_t gMaxPtForTPClow = 0.69, // 15
Float_t gY = 0.5, // 16
Float_t gMaxPtEff = 2.5, // 17
Float_t gSigmaITS = 4.0, // 18
Float_t gSigmaTOF = 4.0, // 19
Float_t gSigmaTPC = 4.0, // 20
Float_t gSigmaTPClow = 3.0,
Bool_t isPer = 0,
Int_t nSub = 25) { // 21
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 (isModeAOD) {
task->SetIsAOD(1); // => 1 = AOD | 0 = ESD (default)
task->SetTrackFilterBit(aodFilterBit);
}
if (isModeQA)
task->SetModeQACreation(1); // => 1 = on | 0 = off (default)
task->SetModeDistCreation(isModeDist); // => 1 = on | 0 = off (default)
task->SetIsRatio(isRatio);
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 = gMinPt;
maxPtEff = gMaxPtEff;
maxRap = gY;
etaMax = gEta;
nSigmaITS = gSigmaITS;
nSigmaTPC = gSigmaTPC;
nSigmaTPClow = gSigmaTPClow;
nSigmaTOF = gSigmaTOF;
}
//.........这里部分代码省略.........