Skip to content

Commit

Permalink
Changes to make the PhysSelection post-processing work in QA (#269)
Browse files Browse the repository at this point in the history
* Changes to make the PhysSelection post-processing work in QA

* Bug fix
  • Loading branch information
chiarazampolli authored Jul 8, 2019
1 parent c421c27 commit 95ca559
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
2 changes: 2 additions & 0 deletions AOD/main_AODtrainRawAndMC.C
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ void AddAnalysisTasks(const char *cdb_location, Bool_t isMC)
mgr->RegisterExtraFile("event_stat.root");
AliPhysicsSelectionTask *physSelTask = AddTaskPhysicsSelection(useMC);
mgr->AddStatisticsTask(AliVEvent::kAny);
AliAnalysisDataContainer *cstatsout = (AliAnalysisDataContainer*)mgr->GetOutputs()->FindObject("cstatsout");
cstatsout->SetFileName("EventStat_temp_AODFiltering.root");
}


Expand Down
2 changes: 1 addition & 1 deletion DataProc/CPass1/runCPass1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ done

# cleanup of barrel
cd ../
mv EventStat_temp_barrel_grp0.root EventStat_temp_barrel.root
mv EventStat_temp_barrel_grp0.root EventStat_temp.root
rm EventStat_temp_*_grp*.root

echo "The time spent in aliroot sessions is $timeUsed"
Expand Down
2 changes: 2 additions & 0 deletions DataProc/PPass/runPPass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ if [ -f QAtrain_duo.C ]; then
fi
fi

cp EventStat_temp_grp0.root EventStat_temp.root

if [ -f AODtrainRawAndMC.C ]; then
rm -f outputs_valid &>/dev/null
echo "AliAOD.root" >> validation_extrafiles.list
Expand Down
24 changes: 17 additions & 7 deletions QA/main_QAtrain_duo.C
Original file line number Diff line number Diff line change
Expand Up @@ -522,14 +522,14 @@ void AddAnalysisTasks(const char *suffix, const char *cdb_location)
// Add a new calo task with EMC1 trigger only
taskCaloQA = AddTaskCalorimeterQA("trigEMC"); // for 2011 data, not 2010

AliAnaCalorimeterQA * emcalQA = (AliAnaCalorimeterQA *)taskCaloQA->GetAnalysisMaker()->GetListOfAnalysisContainers()->At(0);
AliAnaCalorimeterQA * emcalQA1 = (AliAnaCalorimeterQA *)taskCaloQA->GetAnalysisMaker()->GetListOfAnalysisContainers()->At(0);
// settings for PbPb
emcalQA->SwitchCorrelationPerSM(2);
emcalQA->GetHistogramRanges()->SetHistoV0SignalRangeAndNBins(0,50000,1000);
emcalQA->GetHistogramRanges()->SetHistoTrackMultiplicityRangeAndNBins(0,10000,100);
emcalQA->GetHistogramRanges()->SetHistoNClustersRangeAndNBins(0,250,250);
emcalQA->GetHistogramRanges()->SetHistoNCellsRangeAndNBins(0,5000,1000);
emcalQA->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 300, 300) ;
emcalQA1->SwitchCorrelationPerSM(2);
emcalQA1->GetHistogramRanges()->SetHistoV0SignalRangeAndNBins(0,50000,1000);
emcalQA1->GetHistogramRanges()->SetHistoTrackMultiplicityRangeAndNBins(0,10000,100);
emcalQA1->GetHistogramRanges()->SetHistoNClustersRangeAndNBins(0,250,250);
emcalQA1->GetHistogramRanges()->SetHistoNCellsRangeAndNBins(0,5000,1000);
emcalQA1->GetHistogramRanges()->SetHistoPtRangeAndNBins(0, 300, 300) ;

taskCaloQA->SelectCollisionCandidates(kTriggerEMC); // for 2011 data, not 2010
taskCaloQA->SetDebugLevel(0);
Expand Down Expand Up @@ -708,6 +708,12 @@ void AddAnalysisTasks(const char *suffix, const char *cdb_location)
void QAmerge(const char *suffix, const char *dir, Int_t stage)
{
// Merging method

// we need to check if we already have an event_stat.root from a previous merging, as we might not want to overwrite it (in case suffix is empty)
if (gSystem->AccessPathName("event_stat.root", kFileExists)==0) { // the event_stat.root file exists
gSystem->Exec("cp event_stat.root event_stat_Bkp.root");
}

TStopwatch timer;
timer.Start();
TString outputDir = dir;
Expand Down Expand Up @@ -758,6 +764,10 @@ void QAmerge(const char *suffix, const char *dir, Int_t stage)
}
if (gSystem->Exec(Form("mv event_stat.root event_stat%s.root", suffix)))
::Error("QAmerge", "File event_stat.root was not produced");
// now we restore the original event_stat.root that was overwritten when calling terminate
if (gSystem->AccessPathName("event_stat_Bkp.root", kFileExists)==0) {
gSystem->Exec("cp event_stat_Bkp.root event_stat.root");
}
}
ofstream out;
out.open("outputs_valid", ios::out);
Expand Down

0 comments on commit 95ca559

Please sign in to comment.