forked from alisw/AliRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding TOF calib task for calibration of problematic channels
- Loading branch information
Showing
5 changed files
with
562 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
AliTOFAnalysisTaskCalibTree *AddTOFAnalysisTaskCalibTree() | ||
{ | ||
|
||
// check analysis manager | ||
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | ||
if (!mgr) { | ||
Error("AddTOFAnalysisTaskCalibTree", "cannot get analysis manager"); | ||
return NULL; | ||
} | ||
|
||
//check input event handler | ||
if (!mgr->GetInputEventHandler()) { | ||
Error("AddTOFAnalysisTaskCalibTree", "cannot get input event handler"); | ||
return NULL; | ||
} | ||
|
||
// check input data type | ||
TString str = mgr->GetInputEventHandler()->GetDataType(); | ||
if (str.CompareTo("ESD")) { | ||
Error("AddTOFAnalysisTaskCalibTree", "input data type is not \"ESD\""); | ||
return NULL; | ||
} | ||
|
||
// get common input data container | ||
AliAnalysisDataContainer *inputc = mgr->GetCommonInputContainer(); | ||
if (!inputc) { | ||
Error("AddTOFAnalysisTaskCalibTree", "cannot get common input container"); | ||
return NULL; | ||
} | ||
|
||
// setup output event handler | ||
AliAODHandler *outputh = (AliAODHandler *)mgr->GetOutputEventHandler(); | ||
outputh->SetCreateNonStandardAOD(); | ||
outputh->SetOutputFileName("TOFcalibTree.root"); | ||
|
||
// create task and connect input/output | ||
AliTOFAnalysisTaskCalibTree *task = new AliTOFAnalysisTaskCalibTree(); | ||
mgr->ConnectInput(task, 0, inputc); | ||
|
||
// setup task | ||
task->SetEventSelectionFlag(kFALSE); | ||
task->SetVertexSelectionFlag(kTRUE); | ||
task->SetVertexCut(50.0); | ||
task->SetDiscardPileupEventFlag(kFALSE); | ||
task->SetPrimaryDCASelectionFlag(kFALSE); | ||
task->SetCalibrateTOFsignal(kTRUE); | ||
task->SetComputeT0TOF(kTRUE); | ||
task->SetUseT0TOF(kFALSE); | ||
task->SetUseLHCClockPhase(kFALSE); | ||
// task->SetSpecificStorageParOffline("alien://?folder=/alice/cern.ch/user/r/rpreghen/OCDB"); | ||
// task->SetSpecificStorageRunParams("alien://?folder=/alice/cern.ch/user/r/rpreghen/OCDB"); | ||
|
||
// setup event cuts | ||
task->GetEventCuts()->SetAnalyzeMC(kFALSE); | ||
|
||
// setup TOF calib | ||
task->GetTOFcalib()->SetRemoveMeanT0(kFALSE); | ||
task->GetTOFcalib()->SetCalibrateTOFsignal(kTRUE); | ||
task->GetTOFcalib()->SetCorrectTExp(kFALSE); | ||
|
||
//setup resolution | ||
Double_t timeReso = 100.; | ||
|
||
// setup TOF response | ||
//task->GetESDpid()->GetTOFResponse().SetTimeResolution(timeReso); | ||
|
||
// setup TOF-T0 maker | ||
task->GetTOFT0maker()->SetTimeResolution(timeReso); | ||
|
||
// setup track cuts | ||
AliESDtrackCuts *trackCuts = task->GetTrackCuts(); | ||
trackCuts->SetPtRange(0.15, 10.); | ||
trackCuts->SetEtaRange(-1.0, 1.0); | ||
trackCuts->SetRequireITSRefit(kTRUE); | ||
trackCuts->SetMinNClustersITS(1); | ||
// trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny); | ||
trackCuts->SetRequireTPCRefit(kTRUE); | ||
trackCuts->SetMinNClustersTPC(70); | ||
trackCuts->SetMaxChi2PerClusterTPC(4.); | ||
trackCuts->SetAcceptKinkDaughters(kFALSE); | ||
trackCuts->SetMaxDCAToVertexZ(3.2); | ||
trackCuts->SetMaxDCAToVertexXY(2.4); | ||
trackCuts->SetDCAToVertex2D(kTRUE); | ||
|
||
// return task | ||
return task; | ||
|
||
} |
Oops, something went wrong.