Removing obsolete directory
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Mar 2012 12:36:40 +0000 (12:36 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Mar 2012 12:36:40 +0000 (12:36 +0000)
Pass0 --> CPass0

26 files changed:
PWGPP/CalibMacros/Pass0/AddTOFAnalysisTaskCalibPass0.C [deleted file]
PWGPP/CalibMacros/Pass0/AddTaskMeanVertexCalib.C [deleted file]
PWGPP/CalibMacros/Pass0/AddTaskSDDCalib.C [deleted file]
PWGPP/CalibMacros/Pass0/AddTaskT0Calib.C [deleted file]
PWGPP/CalibMacros/Pass0/AddTaskTPCCalib.C [deleted file]
PWGPP/CalibMacros/Pass0/AddTaskTRDCalib.C [deleted file]
PWGPP/CalibMacros/Pass0/ConfigCalibTrain.C [deleted file]
PWGPP/CalibMacros/Pass0/LoadLibraries.C [deleted file]
PWGPP/CalibMacros/Pass0/MeanVertexCalibPass0.C [deleted file]
PWGPP/CalibMacros/Pass0/Pass0.jdl [deleted file]
PWGPP/CalibMacros/Pass0/README [deleted file]
PWGPP/CalibMacros/Pass0/README.OCDB [deleted file]
PWGPP/CalibMacros/Pass0/makeOCDB.C [deleted file]
PWGPP/CalibMacros/Pass0/makeOCDB.byComponent.C [deleted file]
PWGPP/CalibMacros/Pass0/merge.C [deleted file]
PWGPP/CalibMacros/Pass0/merge.byComponent.C [deleted file]
PWGPP/CalibMacros/Pass0/mergeMakeOCDB.byComponent.sh [deleted file]
PWGPP/CalibMacros/Pass0/mergeMakeOCDB.jdl [deleted file]
PWGPP/CalibMacros/Pass0/mergeMakeOCDB.sh [deleted file]
PWGPP/CalibMacros/Pass0/recPass0.C [deleted file]
PWGPP/CalibMacros/Pass0/runCalibTrain.C [deleted file]
PWGPP/CalibMacros/Pass0/runPass0.sh [deleted file]
PWGPP/CalibMacros/Pass0/test/mergeMakeOCDBUser.sh [deleted file]
PWGPP/CalibMacros/Pass0/test/runPass0User.sh [deleted file]
PWGPP/CalibMacros/Pass0/validation.sh [deleted file]
PWGPP/CalibMacros/Pass0/validationMerging.sh [deleted file]

diff --git a/PWGPP/CalibMacros/Pass0/AddTOFAnalysisTaskCalibPass0.C b/PWGPP/CalibMacros/Pass0/AddTOFAnalysisTaskCalibPass0.C
deleted file mode 100644 (file)
index 3125051..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-AliTOFAnalysisTaskCalibPass0 *
-AddTOFAnalysisTaskCalibPass0()
-{
-
-  /* check analysis manager */
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    Error("AddAnalysisTaskEventTime", "cannot get analysis manager");
-    return NULL;
-  }
-
-  /* check input event handler */
-  if (!mgr->GetInputEventHandler()) {
-    Error("AddAnalysisTaskEventTime", "cannot get input event handler");
-    return NULL;
-  }
-  
-  /* check input data type */
-  TString str = mgr->GetInputEventHandler()->GetDataType();
-  if (str.CompareTo("ESD")) {
-    Error("AddAnalysisTaskEventTime", "input data type is not \"ESD\"");
-    return NULL;
-  }
-
-  /* get common input data container */
-  AliAnalysisDataContainer *inputc = mgr->GetCommonInputContainer();
-  if (!inputc) {
-    Error("AddAnalysisTaskEventTime", "cannot get common input container");
-    return NULL;
-  }
-  
-  /* create output data container */
-  AliAnalysisDataContainer *outputc1 = mgr->CreateContainer("TOFHistos", TList::Class(), AliAnalysisManager::kOutputContainer, "AliESDfriends_v1.root");
-  if (!outputc1) {
-    Error("AddAnalysisTaskEventTime", "cannot create output container \"Histos\"");
-    return NULL;
-  }
-
-  /*  create task and connect input/output */
-  AliTOFAnalysisTaskCalibPass0 *task = new AliTOFAnalysisTaskCalibPass0();
-
-  // adding the task
-  mgr->AddTask(task);
-
-  mgr->ConnectInput(task, 0, inputc);
-  mgr->ConnectOutput(task, 1, outputc1);
-
-  /* setup task */
-  task->SetEventSelectionFlag(kFALSE);
-  task->SetVertexSelectionFlag(kTRUE);
-  task->SetVertexCut(25.0);
-  /* setup TOF calib */
-  task->GetTOFcalib()->SetRemoveMeanT0(kFALSE);
-  task->GetTOFcalib()->SetUseLHCClockPhase(kTRUE);
-  task->GetTOFcalib()->SetCalibrateTOFsignal(kTRUE);
-  task->GetTOFcalib()->SetCorrectTExp(kFALSE);
-  /* setup track cuts */
-  AliESDtrackCuts *trackCuts = task->GetTrackCuts();
-  trackCuts->SetPtRange(0.5, 10.);
-  trackCuts->SetEtaRange(-1.0, 1.0);
-  trackCuts->SetRequireITSRefit(kTRUE);
-  trackCuts->SetMinNClustersITS(1);
-  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;
-
-}
diff --git a/PWGPP/CalibMacros/Pass0/AddTaskMeanVertexCalib.C b/PWGPP/CalibMacros/Pass0/AddTaskMeanVertexCalib.C
deleted file mode 100644 (file)
index 785a0f1..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-AliMeanVertexCalibTask *AddTaskMeanVertexCalib(){
-  //
-  //AddTask for MeanVertex Task to run with pass0
-  //Author: D.Caffarri davide.caffarri@pd.infn.it
-  //
-
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskMeanVertex", "No analysis manager to connect to.");
-    return NULL;
-  }
-
-
-  if (!mgr->GetInputEventHandler()) {
-    ::Error("AddTaskMeanVertex", "This task requires an input event handler");
-    return NULL;
-  }  
-
-  
-  AliMeanVertexCalibTask *meanVertexTask = new AliMeanVertexCalibTask("AliMeanVertexCalibTask");
-  
-  AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
-  if (!cinput1) cinput1 = mgr->CreateContainer("cchain",TChain::Class(), AliAnalysisManager::kInputContainer);
-  
-  
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("MeanVertex", TList::Class(),AliAnalysisManager::kOutputContainer, "AliESDfriends_v1.root"); 
-  
-  mgr->ConnectInput(meanVertexTask,0,cinput1);
-  mgr->ConnectOutput(meanVertexTask,1,coutput1);
-  
-  return meanVertexTask;
-  
-}
diff --git a/PWGPP/CalibMacros/Pass0/AddTaskSDDCalib.C b/PWGPP/CalibMacros/Pass0/AddTaskSDDCalib.C
deleted file mode 100644 (file)
index 3e27913..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-AliAnalysisTaskITSAlignQA *AddTaskSDDCalib(Int_t nrun=0) 
-{
-
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskITSAlign", "No analysis manager to connect to.");
-    return NULL;
-  }   
-  
-  if (!mgr->GetInputEventHandler()) {
-    ::Error("AddTaskITSAlign", "This task requires an input event handler");
-    return NULL;
-  }   
-  
-  TString type = mgr->GetInputEventHandler()->GetDataType(); 
-  if(type.Contains("AOD")){
-    ::Error("AddTaskITSAlign", "This task requires to run on ESD");
-    return NULL;
-  }
-  
-  // Create and configure the task
-  AliAnalysisTaskITSAlignQA *taskali = new AliAnalysisTaskITSAlignQA();
-  //  taskali->SelectCollisionCandidates();
-  if (nrun>0) taskali->SetOCDBInfo(nrun,Form("raw://")) ; 
-  taskali->SetLoadGeometryFromOCDB(kFALSE);
-  mgr->AddTask(taskali);
-  //  
-  taskali->SetUseVertex(kTRUE);
-  taskali->SetUseVertexForZOnly(kFALSE);
-  taskali->SetDoSPDResiduals(kFALSE);
-  taskali->SetDoSDDResiduals(kFALSE);
-  taskali->SetDoSSDResiduals(kFALSE);
-  taskali->SetDoSDDDriftTime(kFALSE);
-  taskali->SetMinMaxMult(20.,1070.);
-  //
-  //
-  TString outputFileName = AliAnalysisManager::GetCommonFileName();
-  
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("clistSDDCalib",
-                                                           TList::Class(),
-                                                           AliAnalysisManager::kOutputContainer,
-                                                           outputFileName );
-  
-  mgr->ConnectInput(taskali, 0, mgr->GetCommonInputContainer());
-  mgr->ConnectOutput(taskali, 1, coutput1);
-  return taskali;
-}
diff --git a/PWGPP/CalibMacros/Pass0/AddTaskT0Calib.C b/PWGPP/CalibMacros/Pass0/AddTaskT0Calib.C
deleted file mode 100755 (executable)
index 3b139fa..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-
-void    readCDB (TObject *task1);
-//_____________________________________________________________________________
-AliAnalysisTask  *AddTaskT0Calib(Int_t runNumber)
-{
-  //
-  // add calibration task
-  //
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskT0Calib", "No analysis manager to connect to.");
-    return NULL;
-  }  
-  
-  // check the input handler
-  if (!mgr->GetInputEventHandler()) {
-    ::Error("AddTaskT0Calib", "This task requires an input event handler");
-    return NULL;
-  }  
-
-  // set TPC OCDB parameters
-  //ConfigOCDB(runNumber);
-
-  // setup task
-  AliT0CalibOffsetChannelsTask  *task1 = new AliT0CalibOffsetChannelsTask("CalibObjectsTrain1");
-  readCDB(task1, runNumber);
-  mgr->AddTask(task1);
-  
-  //  AliT0AnalysisTaskQA * task2 = new AliT0AnalysisTaskQA("QA task");
-  //    mgr->AddTask(task2);
-
-  AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
-  if (!cinput1) cinput1 = mgr->CreateContainer("cchain",TChain::Class(), 
-                                      AliAnalysisManager::kInputContainer);
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("T0Calib",TObjArray::Class(), AliAnalysisManager::kOutputContainer, "AliESDfriends_v1.root");  
-
-  mgr->ConnectInput(task1,0,cinput1);
-  mgr->ConnectOutput(task1,1,coutput1);
-  return task1;
-}
-//_____________________________________________________________________________
-void    readCDB (TObject *task1,  Int_t runNumber) {
-
-  Float_t zero_timecdb[24]={0};
-  Float_t *timecdb = zero_timecdb;
-  Float_t cfdvalue[24][5];
-  for(Int_t i=0; i<24; i++) 
-    for (Int_t i0=0; i0<5; i0++)
-      cfdvalue[i][i0] = 0;
-      
-  Float_t zero_shiftcdb[4]={0};
-  Float_t *shiftcdb = zero_shiftcdb;
-  AliT0CalibOffsetChannelsTask *mytask = (AliT0CalibOffsetChannelsTask*)task1;
-
-  AliCDBManager* man = AliCDBManager::Instance();
-  man->SetDefaultStorage("raw://");
-  man->SetRun(runNumber);
-  AliCDBEntry *entry = AliCDBManager::Instance()->Get("GRP/CTP/CTPtiming");
-  if (!entry) AliFatal("CTP timing parameters are not found in OCDB !");
-  AliCTPTimeParams *ctpParams = (AliCTPTimeParams*)entry->GetObject();
-  Float_t l1Delay = (Float_t)ctpParams->GetDelayL1L0()*25.0;
-
-  AliCDBEntry *entry1 = AliCDBManager::Instance()->Get("GRP/CTP/TimeAlign");
-  if (!entry1) AliFatal("CTP time-alignment is not found in OCDB !");
-  AliCTPTimeParams *ctpTimeAlign = (AliCTPTimeParams*)entry1->GetObject();
-  l1Delay += ((Float_t)ctpTimeAlign->GetDelayL1L0()*25.0);
-  AliCDBEntry *entry4 = AliCDBManager::Instance()->Get("GRP/Calib/LHCClockPhase");
-  if (!entry4) AliFatal("LHC clock-phase shift is not found in OCDB !");
-  AliLHCClockPhase *phase = (AliLHCClockPhase*)entry4->GetObject();
-  Float_t fGRPdelays = l1Delay - phase->GetMeanPhase();
-
-  AliCDBEntry *entryCalib0 = man->Get("T0/Calib/Latency");
-  if(!entryCalib0) {
-    AliError::(Form("Cannot find any AliCDBEntry for [Calib, Latency]!"));
-    return;
-  }
-  AliT0CalibLatency *calibda=(AliT0CalibLatency*)entryCalib0->GetObject();
-  Float_t fLatencyL1 = calibda->GetLatencyL1();
-  Float_t fLatencyHPTDC = calibda->GetLatencyHPTDC();
-  AliCDBEntry *entryCalib1 = man->Get("T0/Calib/TimeDelay");
-  if(!entryCalib1) {
-    AliError::(Form("Cannot find any AliCDBEntry for [Calib, TimeDelay]!"));
-    return;
-  }
-  else
-    {
-      AliT0CalibTimeEq *clb = (AliT0CalibTimeEq*)entryCalib1->GetObject();
-      timecdb = clb->GetTimeEq();
-      for(Int_t i=0; i<24; i++) 
-       for (Int_t i0=0; i0<5; i0++){
-         cfdvalue[i][i0] = clb->GetCFDvalue(i, i0);
-       }
-    }
-  for (Int_t i=0; i<24; i++) {
-    Float_t cfdmean = cfdvalue[i][0];
-    if( cfdvalue[i][0] < 500 || cfdvalue[i][0] > 50000) cfdmean = ( 1000.*fLatencyHPTDC - 1000.*fLatencyL1 + 1000.*fGRPdelays)/24.4;
-     mytask->SetCFDvalue(i, cfdmean);
-    mytask->SetTimeEq(i, timecdb[i]);
-  } 
-
-  AliCDBEntry *entryCalib2 = man->Get("T0/Calib/TimeAdjust");
-  if(!entryCalib2) {
-     AliError(Form("Cannot find any AliCDBEntry for [Calib, TimeAdjust]!"));
-  }
- else
-    {
-      AliT0CalibSeasonTimeShift *clb1 = (AliT0CalibSeasonTimeShift*)entryCalib2->GetObject();
-      shiftcdb = clb1->GetT0Means();
-    }
-  
-  for (Int_t i=0; i<4; i++)  mytask->SetT0Means(i,shiftcdb[i]);
-}
diff --git a/PWGPP/CalibMacros/Pass0/AddTaskTPCCalib.C b/PWGPP/CalibMacros/Pass0/AddTaskTPCCalib.C
deleted file mode 100644 (file)
index 326f936..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
-
- This macros setup the TPC calibration task AddTaskTPCCalib
- for Pass0.
- - the run number is required to config TPC OCDB
- The following calibration components are added to the AliTPCAnalysisTaskcalib task:
- 1. AliTPCcalibCalib - redo reconstruction with current calibration
- 2. AliTPCcalibTimeGain - TPC time dependent gain calibration
- 3. AliTPCcalibTime - TPC time dependent drift time calibration
-
-*/
-
-// function to set TPC OCDB parameters
-void ConfigOCDB(Int_t crun);
-
-//_____________________________________________________________________________
-AliAnalysisTask  *AddTaskTPCCalib(Int_t runNumber)
-{
-  //
-  // add calibration task
-  //
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    ::Error("AddTaskTPCCalib", "No analysis manager to connect to.");
-    return NULL;
-  }  
-  
-  // check the input handler
-  if (!mgr->GetInputEventHandler()) {
-    ::Error("AddTaskTPCCalib", "This task requires an input event handler");
-    return NULL;
-  }  
-
-  // set TPC OCDB parameters
-  ConfigOCDB(runNumber);
-
-  // setup task
-  AliTPCAnalysisTaskcalib *task1=new AliTPCAnalysisTaskcalib("CalibObjectsTrain1");
-  SetupCalibTaskTrain1(task1);
-  mgr->AddTask(task1);
-
-  AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
-  if (!cinput1) cinput1 = mgr->CreateContainer("cchain",TChain::Class(), 
-                                      AliAnalysisManager::kInputContainer);
-  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("TPCCalib",TObjArray::Class(), AliAnalysisManager::kOutputContainer, "AliESDfriends_v1.root");  
-
-  mgr->ConnectInput(task1,0,cinput1);
-  mgr->ConnectOutput(task1,0,coutput1);
-  return task1;
-}
-
-//_____________________________________________________________________________
-void AddCalibCalib(TObject* task){
-  //
-  // Responsible: Marian Ivanov
-  // Description:
-  // calibCalib is a prefilter 
-  // The current OCDB entries transformation are applied on cluster, tracks are refitted
-  //
-  AliTPCAnalysisTaskcalib* myTask = (AliTPCAnalysisTaskcalib*) task;
-  AliTPCcalibCalib *calibCalib = new AliTPCcalibCalib("calibTPC","calibTPC");
-  calibCalib->SetDebugLevel(0);
-  calibCalib->SetStreamLevel(0);
-  calibCalib->SetTriggerMask(-1,-1,kFALSE);        //accept everything 
-  myTask->AddJob(calibCalib);
-}
-
-//_____________________________________________________________________________
-void AddCalibTimeGain(TObject* task, Bool_t isCosmic = kFALSE, char * name = "calibTimeGain"){
-  //
-  //  Responsible: Alexander Kalweit
-  //  Description: Time Gain calibration
-  //
-
-  // Set run time ranges (time stamps)
-  AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/GRP/Data");
-  if(!entry) { 
-    ::Error("AddCalibTimeGain","Cannot get AliCDBEntry");
-    return;
-  }
-  const AliGRPObject* grpData = dynamic_cast<AliGRPObject*>(entry->GetObject());
-  if(!grpData) { 
-    ::Error("AddCalibTimeGain","Cannot get AliGRPObject");
-    return;
-  }
-  time_t sTime = grpData->GetTimeStart(); 
-  time_t eTime = grpData->GetTimeEnd(); 
-  TTimeStamp startRunTime(sTime);
-  TTimeStamp stopRunTime(eTime);
-
-  UInt_t year;
-  startRunTime.GetDate(kTRUE,0,&year);
-  TTimeStamp startTime(year,1,1,0,0,0);
-  TTimeStamp stopTime(year,12,31,23,59,59);
-
-  // 
-  // setup calibration component
-  //
-  AliTPCAnalysisTaskcalib* myTask = (AliTPCAnalysisTaskcalib*) task;
-  AliTPCcalibTimeGain *calibTimeGain = new AliTPCcalibTimeGain(name,"calibTimeGain", startTime.GetSec(), stopTime.GetSec(), 10*60);
-  calibTimeGain->SetIsCosmic(isCosmic);
-  calibTimeGain->SetUseCookAnalytical(kTRUE);
-  calibTimeGain->SetUseMax(kTRUE);
-  calibTimeGain->SetDebugLevel(0);
-  calibTimeGain->SetStreamLevel(0);
-  calibTimeGain->SetTriggerMask(-1,-1,kTRUE);        //reject laser
-  calibTimeGain->SetLowerTrunc(0.02);
-  calibTimeGain->SetUpperTrunc(0.6);
-
-  myTask->AddJob(calibTimeGain);
-
-  AliTPCcalibGainMult *calibGainMult = new AliTPCcalibGainMult("calibGainMult","calibGainMult");
-  calibGainMult->SetUseMax(kTRUE);
-  calibGainMult->SetDebugLevel(0);
-  calibGainMult->SetStreamLevel(0);
-  calibGainMult->SetTriggerMask(-1,-1,kTRUE);        //reject laser
-  calibGainMult->SetLowerTrunc(0.02);
-  calibGainMult->SetUpperTrunc(0.6);
-
-  myTask->AddJob(calibGainMult);
-
-}
-
-//_____________________________________________________________________________
-void AddCalibTime(TObject* task){
-  //
-  // Responsible: Dag Larsen
-  // Description: Time V drift calibration
-  //
-
-  // Set run time ranges (time stamps)
-  AliCDBEntry* entry = AliCDBManager::Instance()->Get("GRP/GRP/Data");
-  if(!entry) { 
-    ::Error("AddCalibTime","Cannot get AliCDBEntry");
-    return;
-  }
-  const AliGRPObject* grpData = dynamic_cast<AliGRPObject*>(entry->GetObject());
-  if(!grpData) { 
-    ::Error("AddCalibTime","Cannot get AliGRPObject");
-    return;
-  }
-  time_t sTime = grpData->GetTimeStart(); 
-  time_t eTime = grpData->GetTimeEnd(); 
-
-  TTimeStamp startRunTime(sTime);
-  TTimeStamp stopRunTime(eTime);
-
-  UInt_t year;
-  startRunTime.GetDate(kTRUE,0,&year);
-  TTimeStamp startTime(year,1,1,0,0,0);
-  TTimeStamp stopTime(year,12,31,23,59,59);
-
-  // 
-  // setup calibration component
-  //
-  AliTPCAnalysisTaskcalib* myTask = (AliTPCAnalysisTaskcalib*) task;
-  AliTPCcalibTime *calibTime = new AliTPCcalibTime("calibTime","calibTime",  startTime.GetSec(), stopTime.GetSec(), 10*60, 2);
-  calibTime->SetDebugLevel(0);
-  calibTime->SetStreamLevel(0);
-  calibTime->SetTriggerMask(-1,-1,kFALSE);        //accept everything 
-
-  // max 600 tracks per event
-  calibTime->SetCutTracks(600);
-
-  myTask->AddJob(calibTime);
-}
-
-//_____________________________________________________________________________
-void SetupCalibTaskTrain1(TObject* task){
-  //
-  // Setup tasks for calibration train
-  //
-  AddCalibCalib(task);
-  AddCalibTimeGain(task);
-  AddCalibTime(task);
-}
-
-//_____________________________________________________________________________
-void ConfigOCDB(Int_t run){
-  //
-  // Configure TPC OCDB
-  //
-  printf("SETUP OCBD for TPC\n");
-  printf("SETUP OCBD for TPC\n");
-  printf("SETUP OCBD for TPC Run =%d\n", run);
-  //
-  //
-  AliTPCParam *param= AliTPCcalibDB::Instance()->GetParameters();
-  param->ReadGeoMatrices();
-  //
-  AliMagF* magF= TGeoGlobalMagField::Instance()->GetField();
-  printf("\n\nSET EXB FIELD\t\n\n");
-  AliTPCcalibDB::Instance()->SetExBField(magF);
-  //
-  //
-  //
-  AliTPCTransform *transform     = AliTPCcalibDB::Instance()->GetTransform() ;
-  //
-  //AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE);
-  //
-  AliCDBEntry* entry = AliCDBManager::Instance()->Get("TPC/Calib/RecoParam");
-  if (!entry){
-    printf("TPC reco param not available");
-  }
-  TObjArray * array = (TObjArray*)entry->GetObject();
-  if (!array){
-    printf("TPC reco param not available");
-  }
-  // 0 - Low Flux (pp), 1- High Flux (Pb-Pb)
-  AliTPCRecoParam * tpcRecoParam = (AliTPCRecoParam*)array->At(1);
-
-  transform->SetCurrentRecoParam(tpcRecoParam);
-  tpcRecoParam->SetUseGainCorrectionTime(0);
-  tpcRecoParam->SetUseRPHICorrection(kFALSE); 
-  tpcRecoParam->SetUseTOFCorrection(kFALSE);
-  //
-  tpcRecoParam->SetUseDriftCorrectionTime(0);
-  tpcRecoParam->SetUseDriftCorrectionGY(0);
-  //
-  tpcRecoParam->SetUseRadialCorrection(kFALSE);
-  tpcRecoParam->SetUseQuadrantAlignment(kFALSE);
-  //
-  tpcRecoParam->SetUseSectorAlignment(kFALSE);
-  tpcRecoParam->SetUseFieldCorrection(kFALSE);
-  tpcRecoParam->SetUseExBCorrection(kFALSE);
-  //
-  tpcRecoParam->SetUseMultiplicityCorrectionDedx(kFALSE);
-  tpcRecoParam->SetUseAlignmentTime(kFALSE);
-  tpcRecoParam->SetUseComposedCorrection(kTRUE);
-
-  AliTPCcalibDB::Instance()->SetRun(run); 
-}
diff --git a/PWGPP/CalibMacros/Pass0/AddTaskTRDCalib.C b/PWGPP/CalibMacros/Pass0/AddTaskTRDCalib.C
deleted file mode 100644 (file)
index 67201c8..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-//=============================================================================
-//
-// *** AddTaskTRDCalib
-//
-// This macros setup the TRD calibration task
-//
-//=============================================================================
-
-AliAnalysisTask  *AddTaskTRDCalib(Int_t runNumber)
-{
-  gSystem->Load("libTRDcalib");
-  // pointer to the analysis manager
-  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-  if (!mgr) {
-    Error("AddTaskTRDCalib", "No analysis manager to connect to.");
-    return NULL;
-  }
-
-  // check the input handler
-  if (!mgr->GetInputEventHandler()) {
-    ::Error("AddTask", "This task requires an input event handler");
-    return NULL;
-  }
-
-  ////////////////////////////////////////////
-  // Number of timebins
-  ///////////////////////////////////////////
-  AliTRDcalibDB *calib = AliTRDcalibDB::Instance();
-  Int_t nbOfTimeBins = calib->GetNumberOfTimeBinsDCS();
-  if(nbOfTimeBins < 0) nbOfTimeBins = 27;
-  ////////////////////////////////////////////
-  //
-  /////////////////////////////////////////////
-  Int_t versiongain, subversiongain, versionvdrift, subversionvdrift;
-
-  /////////////////////////
-  // The TRD calib Task
-  /////////////////////////
-  AliTRDCalibTask *calibTask = new AliTRDCalibTask();
-
-  // Disabling TRD CPAss0 as per https://savannah.cern.ch/bugs/?88813
-  //calibTask->SetMaxEvent(-1);
-  
-  calibTask->SetMaxNbTracks(1600);
-  calibTask->SetHisto2d(kTRUE);
-  calibTask->SetVector2d(kFALSE);
-  calibTask->SetVdriftLinear(kTRUE);
-  calibTask->SetExbAlt(kFALSE);
-  calibTask->SetNz(0,0);
-  calibTask->SetNrphi(0,0);
-  calibTask->SetNz(0,1);
-  calibTask->SetNrphi(0,1);
-  calibTask->SetNz(0,2);
-  calibTask->SetNrphi(0,2);
-  calibTask->SetLow(0);
-  calibTask->SetHigh(30);
-  calibTask->SetFillZero(kFALSE);
-  // now
-  calibTask->AddSelectedTriggerClass("C0OB0-ABCE-NOPF-ALL");
-  calibTask->AddSelectedTriggerClass("CTRDCO2-ABCE-NOPF-CENT");
-  calibTask->AddSelectedTriggerClass("CTRDCO2-ABCE-NOPF-TRD");
-  calibTask->AddSelectedTriggerClass("CTRDCO2-ABCE-NOPF-ALL");
-  calibTask->SetReject(kTRUE);
-  // before
-  //calibTask->AddSelectedTriggerClass("CINT1B-ABCE-NOPF-ALL");
-  //calibTask->AddSelectedTriggerClass("CINT1WU-B-NOPF-ALL");
-  //calibTask->AddSelectedTriggerClass("CINT7WU-B-NOPF-ALL");
-  //calibTask->AddSelectedTriggerClass("CINT7WU-I-NOPF-ALL");
-  //calibTask->SetReject(kFALSE);
-  //calibTask->SetDebug(2);
-  calibTask->SetNbTimeBins(nbOfTimeBins);
-  //calibTask->SetMaxEvent(10);
-  //calibTask->SetThresholdP(1.0);
-  calibTask->SetRequirePrimaryVertex(kTRUE);
-  calibTask->SetMinNbOfContributors(1);
-  calibTask->SetMaxCluster(100.0);
-  calibTask->SetNbMaxCluster(2);
-  //calibTask->SetLimitChargeIntegration(kTRUE);
-
-
-  /////////////////////////////
-  // Track cuts
-  /////////////////////////////
-  AliESDtrackCuts *trackCuts = new AliESDtrackCuts("trackcuts","trackcuts");
-  trackCuts->SetMinNClustersTPC(50);
-  trackCuts->SetMaxChi2PerClusterTPC(3.5);
-  //trackCuts->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);
-  trackCuts->SetRequireTPCRefit(kTRUE);
-  //trackCuts->SetRequireITSRefit(kTRUE);
-  //trackCuts->SetMinNsigmaToVertex(10);
-  trackCuts->SetRequireSigmaToVertex(kFALSE);
-  trackCuts->SetAcceptKinkDaughters(kFALSE);
-  trackCuts->SetMaxDCAToVertexZ(30.0);
-  trackCuts->SetMaxDCAToVertexXY(3.0);
-  trackCuts->SetDCAToVertex2D(kFALSE);
-
-  calibTask->SetESDtrackCuts(trackCuts);
-
-  mgr->AddTask(calibTask);
-
-  AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
-  //AliAnalysisDataContainer *cinput = mgr->GetCommonOutputContainer();
-
-  if (!cinput) cinput = mgr->CreateContainer("cchain",TChain::Class(),
-                                      AliAnalysisManager::kInputContainer);
-
-  AliAnalysisDataContainer *coutput =mgr->CreateContainer("TRDCalib",TList::Class(), AliAnalysisManager::kOutputContainer, "AliESDfriends_v1.root");
-
-
-  mgr->ConnectInput(calibTask,0,cinput);
-  mgr->ConnectOutput(calibTask,1,coutput);
-  return calibTask;
-
-}
diff --git a/PWGPP/CalibMacros/Pass0/ConfigCalibTrain.C b/PWGPP/CalibMacros/Pass0/ConfigCalibTrain.C
deleted file mode 100644 (file)
index a7c64de..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Macro to initialize: 
- - the OCDB (run number required as input argument)
- - the geometry (expected to be in the current directory)
- to run the Calibration train.
- Example:
- .L $ALICE_ROOT/ANALYSIS/CalibMacros/MergeCalibration/ConfigCalibTrain.C
- ConfigCalibTrain(129160,"raw://");
-
-*/
-
-void ConfigCalibTrain(Int_t run, const char *ocdb="raw://"){
-
-  // OCDB
-  printf("setting run to %d\n",run);
-  AliCDBManager::Instance()->SetDefaultStorage(ocdb);
-  AliCDBManager::Instance()->SetRun(run); 
-  AliCDBManager::Instance()->InitFromSnapshot("OCDB.root");
-
-  // magnetic field
-  if ( !TGeoGlobalMagField::Instance()->GetField() ) {
-    printf("Loading field map...\n");
-    AliGRPManager grpMan;
-    if( !grpMan.ReadGRPEntry() ) { 
-      printf("Cannot get GRP entry\n"); 
-    }
-    if( !grpMan.SetMagField() ) { 
-      printf("Problem with magnetic field setup\n"); 
-    }
-  }
-
-  // geometry
-  printf("Loading geometry...\n");
-  AliGeomManager::LoadGeometry();
-  if( !AliGeomManager::ApplyAlignObjsFromCDB("GRP ITS TPC") ) {
-    printf("Problem with align objects\n"); 
-  }
-
-}
diff --git a/PWGPP/CalibMacros/Pass0/LoadLibraries.C b/PWGPP/CalibMacros/Pass0/LoadLibraries.C
deleted file mode 100644 (file)
index e2892c3..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-void LoadLibraries() {
-    //
-    // load libraries needed for Pass0
-    //
-    gSystem->Load("libSTAT");
-    gSystem->Load("libANALYSIS");
-    gSystem->Load("libANALYSISalice");
-    gSystem->Load("libANALYSIScalib");
-    //
-    // detector libraries
-    //    
-    gSystem->Load("libTPCcalib");
-    gSystem->Load("libTRDcalib");
-    gSystem->Load("libT0calib");
-    gSystem->Load("libTOFcalib");
-    //
-    // PWGPP libraries
-    //    
-    gSystem->Load("libANALYSISalice.so");
-    gSystem->Load("libANALYSIScalib.so");
-    gSystem->Load("libTENDER.so");
-    gSystem->Load("libPWGPP.so");
-    //gSystem->Load("libPWG4PartCorrBase.so");
-    //gSystem->Load("libHMPIDbase.so");
-}
diff --git a/PWGPP/CalibMacros/Pass0/MeanVertexCalibPass0.C b/PWGPP/CalibMacros/Pass0/MeanVertexCalibPass0.C
deleted file mode 100644 (file)
index 36a8f7d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-//___________________________________________________________________________
-
-LoadLibraries()
-{
-  gSystem->Load("libANALYSIS");
-  gSystem->Load("libANALYSISalice");
-  
-}
-
-//___________________________________________________________________________
-
-MakeOCDB(const Char_t *filename = "AliESDfriends_v1.root", const Char_t *dbString = "raw://", Int_t runNB)
-{
-  LoadLibraries();
-  AliMeanVertexPreprocessorOffline meanVertexCalib;
-  meanVertexCalib.ProcessOutput(filename, dbString, runNB);
-}
-
-
diff --git a/PWGPP/CalibMacros/Pass0/Pass0.jdl b/PWGPP/CalibMacros/Pass0/Pass0.jdl
deleted file mode 100644 (file)
index e786717..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-Executable="/alice/cern.ch/user/j/jotwinow/bin/runPass0.sh";
-
-Packages= { "VO_ALICE@AliRoot::v4-20-Rev-32",
-            "VO_ALICE@ROOT::v5-28-00d",
-            "VO_ALICE@APISCONFIG::V1.1x"
- };
-
-Jobtag = { "Test Pass0 Calibration Train" };
-
-GUIDFILE="guid.txt";
-TTL = "28000";
-Price = 1;
-
-Validationcommand ="/alice/cern.ch/user/j/jotwinow/bin/validation.sh";
-
-Split="file";
-
-JDLVariables={"Packages", "OutputDir"};
-GUIDFILE="guid.txt";
-
-
-SplitArguments = {"/alice/data/2010/LHC10d/$1/raw/#alienfilename#"};
-Workdirectorysize={"6000MB"};
-
-InputFile={"LF:/alice/cern.ch/user/j/jotwinow/Pass0/CalibMacros/recPass0.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/Pass0/CalibMacros/ConfigCalibTrain.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/Pass0/CalibMacros/runCalibTrain.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/Pass0/CalibMacros/AddTaskTPCCalib.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/Pass0/CalibMacros/AddTaskTRDCalib.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/Pass0/CalibMacros/AddTaskT0Calib.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/Pass0/CalibMacros/AddTOFAnalysisTaskCalibPass0.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/Pass0/CalibMacros/LoadLibraries.C"
-};
-
-InputDataCollection="LF:/alice/data/2010/LHC10d/$1/collection,nodownload";
-
-OutputDir="/alice/cern.ch/user/j/jotwinow/Pass0/output/$1/#alienfilename/.root//#";
-
-OutputArchive={"log_archive:*.log@disk=1",
-              "root_archive.zip:AliESDfriends_v1.root,@disk=1"};
-
diff --git a/PWGPP/CalibMacros/Pass0/README b/PWGPP/CalibMacros/Pass0/README
deleted file mode 100644 (file)
index 59c5e87..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-Calibraion mactos directory - OCDB updates for TPC, TRD, TOF and T0 and vertex calculation
-
-History:
-
-26/07/2011 - directory created according to http://savannah.cern.ch/bugs/?84135
-           - first run post-creation is from LHC11d, after 157272
-           - AliRoot version v4-20-Rev-35  
-
-29/07/2011 - modified validationMerging.sh to catch "E-AliCDBGrid::PutEntry" and invalidate the merging job.   
-
-09/08/2011 - modified AddTaskTRDCalib.C according to https://savannah.cern.ch/bugs/?85312. Modification valid for all runs > 158780 (LHC11d)  
-
-24/08/2011 - modified AddTaskTRDCalib.C according to https://savannah.cern.ch/bugs/?85791. Modification valid for all runs > 159606 (LHC11d)
-
-13/09/2011 - modified makeOCDB.C - adding Menvertex calculation https://savannah.cern.ch/task/?22379. Valid for LHC11d Pass1 and LHC11e onward. 
-
-14/09/2011 - new AddTaskT0Calib.C as per https://savannah.cern.ch/task/?22276
-
-14/09/2011 - modified makeOCDB.C as per https://savannah.cern.ch/bugs/?86736
-
-15/09/2011 - modified makeOCDB.C as per https://savannah.cern.ch/task/?22379#comment57
-
-16/09/2011 - new AddTaskTRDCalib.C as per http://savannah.cern.ch/bugs/?86830
-
-25/10/2011 - new AddTOFAnalysisTaskCalibPass0.C as per https://savannah.cern.ch/bugs/?87953
-
-25/10/2011 - new AddTaskT0Calib.C as per http://savannah.cern.ch/bugs/?87877 and again after a quickie debugging session
-
-02/11/2011 - update from current production code (from AliEn) + adding SDD calibration task
-
-10/11/2011 - Update of makeOCDB.C as per https://savannah.cern.ch/task/?23987#comment10
-
-11/11/2011 - updated AddTOFAnalysisTaskCalibPass0.C as requested in https://savannah.cern.ch/task/?23987#comment23
-
-12/11/2011 - updated AddTaskTPCCalib.C as requested in http://savannah.cern.ch/bugs/?88792 (active after run 167713)
-
-13/11/2011 - updated AddTaskTPCCalib.C as requested in https://savannah.cern.ch/bugs/?88812 (active after run 167713)
-
-13/11/2011 - Disable TRD CPass0, see https://savannah.cern.ch/bugs/?88813 (disable active after run 167713 to run 167988)
-
-15/11/2011 - Modified merge.C as per https://savannah.cern.ch/task/?23160#comment86
-
-16/11/2011 - Modified merge.C as per https://savannah.cern.ch/task/?23160#comment94
-
-17/11/2011 - Update makeOCDB.C and AddTaskTRDCalib.C as per https://savannah.cern.ch/bugs/?88813#comment21. Active from run 168068.
-
-18/11/2011 - updated mergeMakeOCDB.sh and merge.C as per https://savannah.cern.ch/task/?23987#comment42. Acrive for runs >= 168066
-
-18/11/2011 - reverted changes to mergeMakeOCDB.sh (from previous comment) and updated merge.C as per https://savannah.cern.ch/task/index.php?23987#comment43 No runs were processed with the macros from https://savannah.cern.ch/task/?23987#comment42
-
-18/11/2011 - modified merge.C as per https://savannah.cern.ch/task/?23987#comment52
-
-19/11/2011 - modified merge.C as per https://savannah.cern.ch/task/?23987#comment57
-
-19/11/2011 - Reverting to AliRoot v5-01-Rev-12 and disabling the TRD task - line 'calibTask->SetMaxEvent(-1); ' in AddTaskTRDcalib.C
-
-19/11/2011 - reducing the nubmer of input files im merge.C as per https://savannah.cern.ch/task/?23987#comment64
-
-20/11/2011 - In macro makeOCDB.C commented out SetAlternativeDriftVelocityFit(kTRUE) as per https://savannah.cern.ch/bugs/index.php?88813#comment30 (related to the revert to Rev-12)
-
-22/11/2011 - Reverting back to Rev-13:
-
-a) makeOCDB.C un-commented out SetAlternativeDriftVelocityFit(kTRUE) - TRD
-b) AddTaskTRDcalib.C - commented out calibTask->SetMaxEvent(-1) - TRD
-c) AddTaskTRDcalib.C - modified 
-
-22/11/2011 - Modified AddTaskTRDCalib.C as per https://savannah.cern.ch/bugs/?88813#comment33 
-
-23/11/2011 - Modified recPass0.C MB trigger selection CPBI2WU_B1-B-NOPF-ALL to CPBI2_B1-B-NOPF-ALLNOTRD as per https://savannah.cern.ch/task/index.php?23987#comment122  
-
-
-14/12/2011 - recPass0.C - Added removal of recpoints for TPC/ITS/TRD to avoid filling up of the local disk
-
-14/12/2011 - recPass0.C, ConfigCalibTrain.C - Added OCDB snapshot for CPass0 reco and calibration train
-
-14/12/2011 - recPass0.C - switch off V0 finder, as per https://savannah.cern.ch/task/?23987#comment163
-
-15/12/2011 - sync trunk with code used for PbPb production 2011
\ No newline at end of file
diff --git a/PWGPP/CalibMacros/Pass0/README.OCDB b/PWGPP/CalibMacros/Pass0/README.OCDB
deleted file mode 100644 (file)
index f00b216..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Calibration entries to be modified in Pass0
-
-TPC        - TPC/Calib/TimeDrift, TPC/Calib/TimeGain
-TOF        - TOF/Calib/RunParams
-T0         - T0/Calib/TimeDelay , T0/Calib/TimeAdjust
-TRD        - ???
-MeanVertex - not active
-
\ No newline at end of file
diff --git a/PWGPP/CalibMacros/Pass0/makeOCDB.C b/PWGPP/CalibMacros/Pass0/makeOCDB.C
deleted file mode 100644 (file)
index 5fad7bb..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-  macro to extract the OCDB entries
-
-  input: CalibObjects.root
-  ouput: TimeGain and TimeVdrift calibration objects for TPC and TRD
-
-  Example:
-  .L $ALICE_ROOT/PWGPP/CalibMacros/Pass0/makeOCDB.C
-  makeOCDB("105160");
-
-*/
-
-void makeOCDB(TString runNumberString, TString  ocdbStorage="")
-{
-  //
-  // extract TPC OCDB entries
-  //
-  gROOT->Macro("LoadLibraries.C");
-  gROOT->LoadMacro("ConfigCalibTrain.C");
-
-  // switch off log info
-  AliLog::SetClassDebugLevel("AliESDEvent",0);
-
-  // config GRP
-  Int_t runNumber = runNumberString.Atoi();
-  printf("runNumber from runCalibTrain = %d\n",runNumber);
-  ConfigCalibTrain(runNumber, "raw://");
-
-  // Steering Tasks - set output storage
-  // DefaultStorage set already before - in ConfigCalibTrain.C
-//ocdbStorage+="?se=ALICE::CERN::SE";
-
-  AliCDBManager::Instance()->SetSpecificStorage("*/*/*",ocdbStorage.Data());
-
-  // set OCDB storage
-  if (ocdbStorage.Length()==0) ocdbStorage+="local://"+gSystem->GetFromPipe("pwd")+"/OCDB";
-
-  // TPC part
-  TFile fcalib("CalibObjects.root");
-  AliTPCPreprocessorOffline proces;
-
-  // switch on parameter validation
-  proces.SetTimeGainRange(0.5,3.0);
-  proces.SwitchOnValidation();
-
-  // Make timegain calibration
-  //proces.CalibTimeGain("CalibObjects.root", runNumber,AliCDBRunRange::Infinity(),ocdbStorage);
-  proces.CalibTimeGain("CalibObjects.root", runNumber,runNumber,ocdbStorage);
-
-  // Make vdrift calibration
-  //proces.CalibTimeVdrift("CalibObjects.root",runNumber,AliCDBRunRange::Infinity(),ocdbStorage);
-  proces.CalibTimeVdrift("CalibObjects.root",runNumber,runNumber,ocdbStorage);
-  //
-  // TOF part
-  //
-  AliTOFAnalysisTaskCalibPass0 calibTask;
-  Printf("Calibrating TOF");
-  calibTask.ProcessOutput("CalibObjects.root", ocdbStorage);
-//
-//
-
-// T0 part
-  AliT0PreprocessorOffline procesT0;
-  // Make  calibration of channels offset
-   procesT0.Process("CalibObjects.root",runNumber, runNumber, ocdbStorage);
-
-
-
-   //TRD part
-   AliTRDPreprocessorOffline procestrd;
-   procestrd.SetLinearFitForVdrift(kTRUE);
-   procestrd.SetMinStatsVdriftT0PH(600*10);
-   procestrd.SetMinStatsVdriftLinear(50);
-   procestrd.SetMinStatsGain(600);
-   procestrd.SetLimitValidateNoData(40);
-   procestrd.SetLimitValidateBadCalib(40);
-   procestrd.SetAlternativeDriftVelocityFit(kTRUE);
-   procestrd.Init("CalibObjects.root");
-   Int_t versionVdriftUsed = procestrd.GetVersionVdriftUsed();
-   Int_t subversionVdriftUsed = procestrd.GetSubVersionVdriftUsed();
-   Int_t versionGainUsed = procestrd.GetVersionGainUsed();
-   Int_t subversionGainUsed = procestrd.GetSubVersionGainUsed();
-   Int_t versionExBUsed = procestrd.GetVersionExBUsed();
-   Int_t subversionExBUsed = procestrd.GetSubVersionExBUsed();
-   printf("version and subversion vdrift %d and %d\n",versionVdriftUsed,subversionVdriftUsed);
-   printf("version and subversion gain %d and %d\n",versionGainUsed,subversionGainUsed);
-   printf("version and subversion exb %d and %d\n",versionExBUsed,subversionExBUsed);
-   procestrd.Process("CalibObjects.root",runNumber,runNumber,ocdbStorage);
-   Int_t trdstatus = procestrd.GetStatus();
-  
-  
-  //Mean Vertex
-  AliMeanVertexPreprocessorOffline procesMeanVtx;
-  procesMeanVtx.ProcessOutput("CalibObjects.root", ocdbStorage, runNumber);
-       
-  return;
-}
diff --git a/PWGPP/CalibMacros/Pass0/makeOCDB.byComponent.C b/PWGPP/CalibMacros/Pass0/makeOCDB.byComponent.C
deleted file mode 100644 (file)
index e9a14ce..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-  macro to extract the OCDB entries
-
-  input: CalibObjects.root
-  ouput: TimeGain and TimeVdrift calibration objects for TPC and TRD
-
-  Example:
-  .L $ALICE_ROOT/PWGPP/CalibMacros/Pass0/makeOCDB.C
-  makeOCDB("105160");
-
-*/
-
-//__________________________________________________________________
-
-void makeOCDB(TString runNumberString, TString ocdbStorage = "")
-{
-  makeOCDB("CalibObjects.root", "ALL", runNumberString, ocdbStorage);
-}
-
-//___________________________________________________________________
-
-void makeOCDB(const Char_t *filename, TString component, TString runNumberString, TString ocdbStorage = "")
-{
-  //
-  // extract TPC OCDB entries
-  //
-  gROOT->Macro("LoadLibraries.C");
-  gROOT->LoadMacro("ConfigCalibTrain.C");
-
-  // switch off log info
-  AliLog::SetClassDebugLevel("AliESDEvent",0);
-
-  // config GRP
-  Int_t runNumber = runNumberString.Atoi();
-  printf("runNumber from runCalibTrain = %d\n",runNumber);
-
-  /* configCalibTrain only if needed */
-  if (component == "TPC" || component == "TRD" || component == "ALL")
-    ConfigCalibTrain(runNumber, "raw://");
-  else
-    AliCDBManager::Instance()->SetDefaultStorage("raw://");
-  
-  // Steering Tasks - set output storage
-  // DefaultStorage set already before - in ConfigCalibTrain.C
-//ocdbStorage+="?se=ALICE::CERN::SE";
-
-  AliCDBManager::Instance()->SetSpecificStorage("*/*/*",ocdbStorage.Data());
-
-  // set OCDB storage
-  if (ocdbStorage.Length()==0) ocdbStorage+="local://"+gSystem->GetFromPipe("pwd")+"/OCDB";
-
-  
-  /* makeOCDB for selected component */
-  if (component == "TPC" || component == "ALL")
-    makeOCDB_TPC(filename, runNumber, ocdbStorage);
-  if (component == "TOF" || component == "ALL")
-    makeOCDB_TOF(filename, runNumber, ocdbStorage);
-  if (component == "T0" || component == "ALL")
-    makeOCDB_T0(filename, runNumber, ocdbStorage);
-  if (component == "TRD" || component == "ALL")
-    makeOCDB_TRD(filename, runNumber, ocdbStorage);
-  if (component == "MeanVertex" || component == "ALL")
-    makeOCDB_MeanVertex(filename, runNumber, ocdbStorage);
-  
-  gSystem->Exec(Form("touch %s_ocdb_done", component.Data()));
-  return;
-}
-
-//___________________________________________________________________
-
-void makeOCDB_TPC(const Char_t *filename, Int_t runNumber, TString ocdbStorage)
-{
-
-  // TPC part
-  TFile fcalib(filename);
-  AliTPCPreprocessorOffline proces;
-
-  // switch on parameter validation
-  proces.SetTimeGainRange(0.5,3.0);
-  proces.SwitchOnValidation();
-
-  // Make timegain calibration
-  //proces.CalibTimeGain(filename, runNumber,AliCDBRunRange::Infinity(),ocdbStorage);
-  proces.CalibTimeGain(filename, runNumber,runNumber,ocdbStorage);
-
-  // Make vdrift calibration
-  //proces.CalibTimeVdrift(filename,runNumber,AliCDBRunRange::Infinity(),ocdbStorage);
-  proces.CalibTimeVdrift(filename,runNumber,runNumber,ocdbStorage);
-
-}
-
-//___________________________________________________________________
-
-void makeOCDB_TOF(const Char_t *filename, Int_t runNumber, TString ocdbStorage)
-{
-  AliTOFAnalysisTaskCalibPass0 calibTask;
-  Printf("Calibrating TOF");
-  calibTask.ProcessOutput(filename, ocdbStorage);
-}
-
-//___________________________________________________________________
-
-void makeOCDB_T0(const Char_t *filename, Int_t runNumber, TString ocdbStorage)
-{
-  // T0 part
-  AliT0PreprocessorOffline procesT0;
-  // Make  calibration of channels offset
-  procesT0.Process(filename,runNumber, runNumber, ocdbStorage);
-}
-
-//___________________________________________________________________
-
-void makeOCDB_TRD(const Char_t *filename, Int_t runNumber, TString ocdbStorage)
-{
-   //TRD part
-   AliTRDPreprocessorOffline procestrd;
-   procestrd.SetLinearFitForVdrift(kTRUE);
-   procestrd.SetMinStatsVdriftT0PH(600*10);
-   procestrd.SetMinStatsVdriftLinear(50);
-   procestrd.SetMinStatsGain(600);
-   procestrd.Init(filename);
-   Int_t versionVdriftUsed = procestrd.GetVersionVdriftUsed();
-   Int_t subversionVdriftUsed = procestrd.GetSubVersionVdriftUsed();
-   Int_t versionGainUsed = procestrd.GetVersionGainUsed();
-   Int_t subversionGainUsed = procestrd.GetSubVersionGainUsed();
-   Int_t versionExBUsed = procestrd.GetVersionExBUsed();
-   Int_t subversionExBUsed = procestrd.GetSubVersionExBUsed();
-   printf("version and subversion vdrift %d and %d\n",versionVdriftUsed,subversionVdriftUsed);
-   printf("version and subversion gain %d and %d\n",versionGainUsed,subversionGainUsed);
-   printf("version and subversion exb %d and %d\n",versionExBUsed,subversionExBUsed);
-   procestrd.Process(filename,runNumber,runNumber,ocdbStorage);
-   Int_t trdstatus = procestrd.GetStatus();
-
-}
-
-//___________________________________________________________________
-
-void makeOCDB_MeanVertex(const Char_t *filename, Int_t runNumber, TString ocdbStorage)
-{
-  //Mean Vertex
-  AliMeanVertexPreprocessorOffline procesMeanVtx;
-  procesMeanVtx.ProcessOutput(filename, ocdbStorage, runNumber);
-}
-
-//___________________________________________________________________
-
diff --git a/PWGPP/CalibMacros/Pass0/merge.C b/PWGPP/CalibMacros/Pass0/merge.C
deleted file mode 100644 (file)
index 856aa0b..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-  merge output calib objects on Alien
-  using AliFileMerger functionality
-
-  Directory with runCalibTrain output: outputDir
-  pattern: AliESDfriends_v1.root
-  Output file name: CalibObjects.root
-
-  Example:
-  .L $ALICE_ROOT/ANALYSIS/CalibMacros/MergeCalibration/merge.C
-  merge("alien:///alice/cern.ch/user/j/jotwinow/CalibTrain/output","AliESDfriends_v1.root");
-*/
-void mergeInChunksTXT(const char* mlist, const char* dest, int maxFiles=700);
-
-
-void merge(const char* outputDir, const char* pattern, Bool_t copyLocal=kFALSE)
-{
-  //
-  // load libraries
-  //
-  printf("Merging with chunks copying turned %s\n",copyLocal ? "ON":"OFF");
-  gROOT->Macro("LoadLibraries.C");
-  //
-  cpTimeOut(outputDir, pattern,10, copyLocal);
-  //
-  // local
-  mergeInChunksTXT("calib.list","CalibObjects.root");
-  //  AliFileMerger merger;
-  //  merger.AddReject("esdFriend"); // do not merge
-  //  merger.SetMaxFilesOpen(700);
-  //  merger.IterTXT("calib.list","CalibObjects.root",kFALSE);
-
-  // alien
-  //merger.IterAlien(outputDir, "CalibObjects.root", pattern);
-
-  return;
-}
-
-void cpTimeOut(const char * searchdir, const char* pattern, Int_t timeOut=10, Bool_t copyLocal)
-{
-
-  gSystem->Setenv("XRDCLIENTMAXWAIT",Form("%d",timeOut));
-  gEnv->SetValue("XNet.RequestTimeout", timeOut);
-  gEnv->SetValue("XNet.ConnectTimeout", timeOut);
-  gEnv->SetValue("XNet.TransactionTimeout", timeOut);
-  TFile::SetOpenTimeout(timeOut);
-
-  TGrid::Connect("alien");
-
-  TString filelist;
-  TString command;
-  command = Form("find %s/ %s", searchdir, pattern);
-  cerr<<"command: "<<command<<endl;
-  TGridResult *res = gGrid->Command(command);
-  if (!res) return;
-  res->Print();
-  TIter nextmap(res);
-  TMap *map = 0;
-
-  ofstream outputFile;
-  outputFile.open(Form("calib.list"));
-  Int_t counter=0;
-
-  while((map=(TMap*)nextmap())) 
-  {
-    TObjString *objs = dynamic_cast<TObjString*>(map->GetValue("turl"));
-    if (!objs || !objs->GetString().Length())
-    {
-      delete res;
-      break;
-    }
-
-    TString src=Form("%s",objs->GetString().Data());
-    TString dst=src;
-    Bool_t result = kTRUE;
-    if (copyLocal) {
-      dst.ReplaceAll("alien:///","");
-      dst.ReplaceAll("/","_");
-      TTimeStamp s1;
-      result = TFile::Cp(src.Data(),dst.Data(),kTRUE);
-      TTimeStamp s2;
-      AliSysInfo::AddStamp(dst.Data(),counter, result);
-    }
-    if (result) {
-      counter++;
-      outputFile << dst.Data()<< endl;
-    }
-  }
-  if (copyLocal) cout<<counter<<" files copied!"<<endl;
-  else           cout<<counter<<" files registerd!"<<endl;
-  outputFile.close();
-  gSystem->Exec("mv syswatch.log syswatch_copy.log");
-  return;
-}
-
-void mergeInChunksTXT(const char* mlist, const char* dest, int maxFiles)
-{
-  TH1::AddDirectory(0);
-  AliFileMerger merger;
-  //  merger.SetMaxFilesOpen(999);
-  merger.AddReject("esdFriend"); // do not merge
-  //
-  if (maxFiles<2) maxFiles = 2;
-  TString filesToMerge = mlist, fileDest = dest;
-  if (filesToMerge.IsNull()) {printf("List to merge is not provided\n"); return;}
-  if (fileDest.IsNull())     {printf("Merging destination is not provided\n"); return;}
-  const char* tmpMerge[3]={"__merge_part0.root","__merge_part1.root","__part_of_calib.list"};
-  //
-  gSystem->ExpandPathName(filesToMerge);
-  ofstream outfile;
-  ifstream infile(filesToMerge.Data());
-  if (!infile) {printf("No %s file\n",filesToMerge.Data()); return;}
-  //
-  int currTmp = 0, nfiles = 0, nparts = 0; // counter for number of merging operations
-  string line;
-  TString lineS;
-  while ( !infile.eof() ) {
-    getline(infile, line); 
-    lineS = line;
-    if (lineS.IsNull() || lineS.BeginsWith("#")) continue;
-    int st = nfiles%maxFiles;
-    if (st==0) { // new chunk should be started
-      if (nfiles) { // merge prev. chunk
-       outfile.close();
-       merger.IterTXT(tmpMerge[2], tmpMerge[currTmp] ,kFALSE);
-       printf("Merging to %s | %d files at step %d\n",tmpMerge[currTmp], nfiles,nparts);
-      }
-      outfile.open(tmpMerge[2], ios::out); // start list for new chunk  
-      if (nparts++) {
-       printf("Adding previous result %s | %d files %d at part\n",tmpMerge[currTmp], nfiles,nparts);
-       outfile << tmpMerge[currTmp] << endl; // result of previous merge goes 1st
-      }
-      currTmp = (currTmp==0) ? 1:0;         // swap tmp files
-    }
-    outfile << line << endl;
-    nfiles++;
-  }
-  // merge the rest
-  merger.IterTXT(tmpMerge[2], dest ,kFALSE);
-  outfile.close();
-  infile.close();
-  for (int i=0;i<3;i++) gSystem->Exec(Form("if [ -e %s ]; then \nrm %s\nfi",tmpMerge[i],tmpMerge[i]));
-  printf("Merged %d files in %d steps\n",nfiles, nparts);
-  //
-}
-
diff --git a/PWGPP/CalibMacros/Pass0/merge.byComponent.C b/PWGPP/CalibMacros/Pass0/merge.byComponent.C
deleted file mode 100644 (file)
index 21fdb13..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-//___________________________________________________________________
-
-void merge(TString component, const Char_t *inputstring)
-{
-
-  /* load libs */
-  gROOT->Macro("LoadLibraries.C");
-  TH1::AddDirectory(0);
-
-  /* copy only */
-  if (component == "COPY") {
-    CopyCPass(inputstring, "AliESDfriends_v1.root");
-    return;
-  }
-  
-  /* merge component */
-  MergeCPass(inputstring, component);
-  
-}
-
-//___________________________________________________________________
-
-void MergeCPass(const Char_t *list, TString component)
-{
-  AliFileMerger merger;
-  /* select what to merge */
-  if (component == "ALL")
-    merger.AddReject("esdFriend");
-  else
-    merger.AddAccept(component.Data());
-  /* merge */
-  merger.IterTXT(list, "CalibObjects.root", kFALSE);
-  /* notify */
-  gSystem->Exec(Form("touch %s_merge_done", component.Data()));
-  return;
-}
-
-//___________________________________________________________________
-
-void CopyCPass(const char *searchdir, const char *pattern, Int_t timeOut=10)
-{
-
-  gSystem->Setenv("XRDCLIENTMAXWAIT",Form("%d",timeOut));
-  gEnv->SetValue("XNet.RequestTimeout", timeOut);
-  gEnv->SetValue("XNet.ConnectTimeout", timeOut);
-  gEnv->SetValue("XNet.TransactionTimeout", timeOut);
-  TFile::SetOpenTimeout(timeOut);
-
-  TGrid::Connect("alien");
-
-  TString filelist;
-  TString command;
-  command = Form("find %s/ %s", searchdir, pattern);
-  cerr<<"command: "<<command<<endl;
-  TGridResult *res = gGrid->Command(command);
-  if (!res) return;
-  TIter nextmap(res);
-  TMap *map = 0;
-
-  ofstream outputFile;
-  outputFile.open(Form("calib.list"));
-  Int_t counter=0;
-
-  while((map=(TMap*)nextmap()))
-  {
-    TObjString *objs = dynamic_cast<TObjString*>(map->GetValue("turl"));
-    if (!objs || !objs->GetString().Length())
-    {
-      delete res;
-      break;
-    }
-
-    TString src=Form("%s",objs->GetString().Data());
-    TString dst=src;
-    dst.ReplaceAll("alien:///","");
-    dst.ReplaceAll("/","_");
-    TTimeStamp s1;
-    Bool_t result = TFile::Cp(src.Data(),dst.Data(),kTRUE);
-    TTimeStamp s2;
-    AliSysInfo::AddStamp(dst.Data(),counter, result);
-    if (result)
-    {
-      counter++;
-      outputFile << dst.Data()<< endl;
-    }
-  }
-  cout<<counter<<" files copied!"<<endl;
-
-  outputFile.close();
-  gSystem->Exec("touch copy_done");
-  return;
-}
-
diff --git a/PWGPP/CalibMacros/Pass0/mergeMakeOCDB.byComponent.sh b/PWGPP/CalibMacros/Pass0/mergeMakeOCDB.byComponent.sh
deleted file mode 100755 (executable)
index 7f80f73..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#! /bin/bash
-
-# init
-path=$1
-run=$2
-ocdb=$3
-echo "***********************" 2>&1 | tee -a merge.log
-echo mergeMakeOCDB.sh started 2>&1 | tee -a merge.log
-echo path = $path 2>&1 | tee -a merge.log
-echo run  = $run 2>&1 | tee -a merge.log
-echo ocdb = $ocdb 2>&1 | tee -a merge.log
-echo "***********************" 2>&1 | tee -a merge.log
-
-# setup components
-components="TOF MeanVertex T0 TRD TPC SDD"
-
-# copy
-echo "***********************" 2>&1 | tee -a merge.log
-echo copying files for run $run 2>&1 | tee -a merge.log
-echo from $path 2>&1 | tee -a merge.log
-echo "***********************" 2>&1 | tee -a merge.log
-aliroot -b -q "merge.C(\"COPY\", \"$path\")" 2>&1 | tee -a merge.log
-mv syswatch.log copy_syswatch.log
-
-# process by component
-for det in $components; do
-
-    # merge
-    echo "***********************" 2>&1 | tee -a merge.log
-    echo merging $det data 2>&1 | tee -a merge.log
-    echo "***********************" 2>&1 | tee -a merge.log
-    aliroot -b -q "merge.C(\"$det\", \"calib.list\")" 2>&1 | tee -a merge.log
-    mv syswatch.log $det\_merge_syswatch.log
-
-    # make OCDB
-    echo "***********************" 2>&1 | tee -a ocdb.log
-    echo making $det OCDB 2>&1 | tee -a ocdb.log
-    echo "***********************" 2>&1 | tee -a ocdb.log
-    aliroot -b -q "makeOCDB.C(\"CalibObjects.root\", \"$det\", \"$run\", \"$ocdb\")" 2>&1 | tee -a ocdb.log
-    mv CalibObjects.root $det\_CalibObjects.root
-
-done
-
-# global merge
-echo "***********************" 2>&1 | tee -a merge.log
-echo merging ALL data 2>&1 | tee -a merge.log
-echo "***********************" 2>&1 | tee -a merge.log
-ls *CalibObjects.root > objects.list
-aliroot -b -q "merge.C(\"ALL\", \"objects.list\")" 2>&1 | tee -a merge.log
-touch CalibObjects.root
-
-# summary
-echo "***********************" 2>&1 | tee -a ocdb.log
-echo SUMMARY 2>&1 | tee -a ocdb.log
-echo "***********************" 2>&1 | tee -a ocdb.log
-ls -altr *CalibObjects.root *done 2>&1 | tee -a ocdb.log
\ No newline at end of file
diff --git a/PWGPP/CalibMacros/Pass0/mergeMakeOCDB.jdl b/PWGPP/CalibMacros/Pass0/mergeMakeOCDB.jdl
deleted file mode 100644 (file)
index eab6890..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-Executable="/alice/cern.ch/user/j/jotwinow/bin/mergeMakeOCDB.sh";
-
-Packages= { "VO_ALICE@AliRoot::v5-01-Rev-19", "VO_ALICE@ROOT::v5-30-03-1", "VO_ALICE@APISCONFIG::V1.1x" };
-
-Jobtag = { "Merging Calibration Objects from calib train and make OCDB params" };
-
-GUIDFILE="guid.txt";
-TTL = "28000";
-Price = 1;
-
-Validationcommand ="/alice/cern.ch/user/j/jotwinow/Pass0/MergeCalibration/validationMerging.sh";
-
-JDLVariables={"Packages", "OutputDir"};
-GUIDFILE="guid.txt";
-
-Arguments = "$1 $2 $3";
-
-Workdirectorysize={"6000MB"}; 
-
-InputFile={"LF:/alice/cern.ch/user/j/jotwinow/Pass0/MergeCalibration/ConfigCalibTrain.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/Pass0/MergeCalibration/LoadLibraries.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/Pass0/MergeCalibration/makeOCDB.C",
-           "LF:/alice/cern.ch/user/j/jotwinow/Pass0/MergeCalibration/merge.C"
-};
-
-OutputDir="/alice/cern.ch/user/j/jotwinow/Pass0/output/$2/";
-
-OutputArchive={"log_archive:*.log@disk=1",
-              "root_archive.zip:CalibObjects.root,meanITSVertex.root,fitITSVertex.root@disk=1"};
-
diff --git a/PWGPP/CalibMacros/Pass0/mergeMakeOCDB.sh b/PWGPP/CalibMacros/Pass0/mergeMakeOCDB.sh
deleted file mode 100755 (executable)
index e818ae0..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-# Script to merge objects coming out of the calibration train:
-# Arguments:
-#    1 - directory on which to look for the files to be merged 
-#    2 - pattern
-#    3 - OCDB output path
-
-# example:
-# mergeMakeOCDB.sh /alice/cern.ch/user/a/aliprod/Pass0/output/ 000120691 alien://folder=/alice/cern.ch/user/a/aliprod/Pass0/output
-
-#ALIEN setting
-# $1 = directory where to perform the find 
-# $2 = pattern
-# $3 = OCDB path
-
-if [ -f Run0_999999999_v3_s0.root ]; then
-    mkdir -p TPC/Calib/Correction
-    mv Run0_999999999_v3_s0.root TPC/Calib/Correction/
-fi
-
-echo ">>>>>>> Running AliRoot to merge calib objects found in $1 with pattern AliESDfriends_v1.root"
-aliroot -l -b -q merge.C\(\"$1\",\"AliESDfriends_v1.root\"\) 2>&1 | tee merge.log
-mv syswatch.log syswatch_merge.log
-
-echo ">>>>>>> Extract OCDB entries for run = $2, to be stored in $3"
-aliroot -l -b -q makeOCDB.C\(\"$2\",\"$3\"\) 2>&1 | tee ocdb.log
-mv syswatch.log syswatch_makeOCDB.log
diff --git a/PWGPP/CalibMacros/Pass0/recPass0.C b/PWGPP/CalibMacros/Pass0/recPass0.C
deleted file mode 100644 (file)
index a60f6cf..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-   rec.C to be used for pass0
-   - reconstruction of raw data
-   - QA information switched off
-   - store all friends
-   - default OCDB storage set to "raw://"
-
-   Example:
-   aliroot -b -q 'recPass0.C("raw.root",100)'
-*/
-
-void recPass0(const char *filename="raw.root",Int_t nevents=-1, const char *ocdb="raw://")
-{
-  // Load some system libs for Grid and monitoring
-  // Set the CDB storage location
-  AliCDBManager * man = AliCDBManager::Instance();
-  man->SetDefaultStorage(ocdb);
-
-  // Reconstruction settings
-  AliReconstruction rec;
-  // Upload CDB entries from the snapshot (local root file)                                                                        
-  rec.SetFromCDBSnapshot("OCDB.root");
-
-  // All friends
-  rec.SetFractionFriends(1.0);
-
- // AliReconstruction settings - hardwired MB trigger for calibration
-
-  TString newfilename = filename;
-//  newfilename += "?Trigger=CPBI2_B1-B-NOPF-ALLNOTRD";
-  rec.SetInput(newfilename.Data());
-
-  // Set protection against too many events in a chunk (should not happen)
-  if (nevents>0) rec.SetEventRange(0,nevents);
-
-  // Remove recpoints after each event
-  rec.SetDeleteRecPoints("TPC TRD ITS");
-
-  // Switch off the V0 finder - saves time!
-  rec.SetRunMultFinder(kFALSE);
-  rec.SetRunV0Finder(kFALSE); 
-
-  //
-  // QA options - all QA is off
-  //
-  rec.SetRunQA(":");
-  rec.SetRunGlobalQA(kFALSE);
-
-  // AliReconstruction settings
-  rec.SetWriteESDfriend(kTRUE);
-  rec.SetWriteAlignmentData();
-  rec.SetUseTrackingErrorsForAlignment("ITS");
-  rec.SetRunReconstruction("ALL");
-  rec.SetFillESD("ALL");
-  rec.SetCleanESD(kFALSE);
-
-  // Specific reco params for ZDC (why isn't this automatic?)
-//  rec.SetRecoParam("ZDC",AliZDCRecoParamPbPb::GetHighFluxParam(2760));
-
-  //Ignore SetStopOnError
-  rec.SetStopOnError(kFALSE);
-
-  AliLog::Flush();
-  rec.Run();
-}
-
diff --git a/PWGPP/CalibMacros/Pass0/runCalibTrain.C b/PWGPP/CalibMacros/Pass0/runCalibTrain.C
deleted file mode 100644 (file)
index e32f027..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-  Template of calibration/filtering macro using ESD:
-  - requires AliESDs.root and AliESDfriend.root
-  - requires OCDB access (default set to "raw://")
-  - requires run number as argument to init OCDB
-  - calls LoadLibraries.C, ConfigCalibTrain.C and AddTaskTPCCalib.C macros
-  - output AliESDfriends_v1.root with TPC and TRD calibration objects are created
-
-  Example:
-  .L $ALICE_ROOT/ANALYSIS/macros/runCalibTrain.C
-  runCalibTrain("104892");
-*/
-
-void runCalibTrain(TString runNumberString, const char *inFileName = "AliESDs.root", const char *ocdb="raw://")
-{
-  //
-  // macro to run TPC calibration train 
-  //
-  AliLog::SetGlobalLogLevel(AliLog::kError); 
-  gROOT->Macro("LoadLibraries.C");
-  gROOT->LoadMacro("ConfigCalibTrain.C");
-
-  // detector tasks
-  gROOT->LoadMacro("AddTaskTPCCalib.C");
-  gROOT->LoadMacro("AddTaskTRDCalib.C");
-  gROOT->LoadMacro("AddTOFAnalysisTaskCalibPass0.C");
-  gROOT->LoadMacro("AddTaskT0Calib.C");
-  gROOT->LoadMacro("AddTaskMeanVertexCalib.C");
-  gROOT->LoadMacro("AddTaskSDDCalib.C"); 
-
-  // switch off debug 
-  AliLog::SetClassDebugLevel("AliESDEvent",0);
-  
-  // steering input chain
-  TChain *chain = new TChain("esdTree");
-  chain->Add(inFileName);
-
-  // config calibration train
-  // setting geometry and B-field from GRP
-  Int_t runNumber = runNumberString.Atoi();
-  printf("runNumber from runCalibTrain = %d\n",runNumber);
-  printf("ocdb from runCalibTrain = %s\n",ocdb);
-  ConfigCalibTrain(runNumber, ocdb);
-  
-  //
-  // setup analysis
-  //
-  AliAnalysisManager *mgr  = new AliAnalysisManager("ESD to ESD", "Analysis Manager");
-  // mgr->SetDebugLevel(3);
-  
-  // Input
-  AliESDInputHandler* inpHandler = new AliESDInputHandler();
-  inpHandler->SetReadFriends(1);
-  mgr->SetInputEventHandler(inpHandler);
-  
-  // Output
-  const char *outFile = "AliESDfriends_v1.root";
-  AliESDHandler* esdHandler   = new AliESDHandler();
-  mgr->SetOutputEventHandler(esdHandler);
-  esdHandler->SetOutputFileName(outFile);
-  mgr->SetCommonFileName(outFile);
-  //  
-  // Detector Tasks
-  AliAnalysisTask* tTPC = AddTaskTPCCalib(runNumber);
-  AliAnalysisTask* tTRD = AddTaskTRDCalib(runNumber);
-  AliTOFAnalysisTaskCalibPass0 *thisTask = AddTOFAnalysisTaskCalibPass0();
-  AliAnalysisTask* tT0 = AddTaskT0Calib(runNumber);
-  AliMeanVertexCalibTask *tMeanVtx = AddTaskMeanVertexCalib();
-  AliAnalysisTaskITSAlignQA *itsAlign = AddTaskSDDCalib();
-
-  // Run the analysis
-  if (!mgr->InitAnalysis()) {
-    printf("Analysis cannot be started, returning\n");
-    return;
-  }
-  
-  mgr->PrintStatus();
-  mgr->StartAnalysis("local", chain);
-  
-  return;
-}
diff --git a/PWGPP/CalibMacros/Pass0/runPass0.sh b/PWGPP/CalibMacros/Pass0/runPass0.sh
deleted file mode 100644 (file)
index 39c89e6..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-
-# Script to run:
-#    1. reconstruction
-#    2. calibration and friend track filtering
-#
-# Files assumed to be in working directory:
-# recPass0.C          - reconstruction macro
-# runCalibTrain.C     - calibration/filtering macro
-# Arguments (run locally):
-#    1  - raw data file name
-#    2  - number of events to be processed
-#    3  - run number 
-
-# example:
-# runPass0.sh raw.root  50  104892
-
-#ALIEN setting
-# $1 = raw input filename
-runnum=`echo $1 | cut -d "/" -f 6`
-
-if [ -f Run0_999999999_v3_s0.root ]; then
-    mkdir -p TPC/Calib/Correction
-    mv Run0_999999999_v3_s0.root TPC/Calib/Correction/
-fi
-
-
-#Local setting
-#entries=$2
-#runnum=$3
-
-echo File to be  processed $1
-echo Number of events to be processed $entries
-
-echo ">>>>>>>>> PATH is..."
-echo $PATH
-echo ">>>>>>>>> LD_LIBRARY_PATH is..."
-echo $LD_LIBRARY_PATH
-echo ">>>>>>>>> recPass0.C is..."
-cat recPass0.C
-echo
-
-echo ">>>>>>> Running AliRoot to reconstruct $1. Run number is $runnum..."
-aliroot -l -b -q recPass0.C\(\"alien://$1\"\) 2>&1 | tee rec.log
-mv syswatch.log syswatch_rec.log
-
-echo ">>>>>>> Running AliRoot to make calibration..."
-aliroot -l -b -q  runCalibTrain.C\(\"$runnum\"\)   2>&1 | tee calib.log
-mv syswatch.log syswatch_calib.log
diff --git a/PWGPP/CalibMacros/Pass0/test/mergeMakeOCDBUser.sh b/PWGPP/CalibMacros/Pass0/test/mergeMakeOCDBUser.sh
deleted file mode 100755 (executable)
index 0049ca5..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-# Script for testing of the mergemakeOCDB on the grid for user purposes
-# To be used in case the standard production failed or was not automatically validated
-# Output objects are writn to the predefined path:
-
-# 
-# Parameters for macro:
-# 1  -   alien user dir name                 - e.g  /m/miranov/
-# 2  -   input directory with data to merge  - e.g /alice/data/2011/LHC11h/000169926/cpass0_HLT/
-# 3  -   run number                          - e.g run number 169926
-# 4  -   OCDB output path                    - alien://folder=/alice/cern.ch/user/m/miranov/Pass0/169926
-# Example:
-# run=170572
-# AlienName=/m/miranov/
-# $ALICE_ROOT/PWGPP/CalibMacros/Pass0/test/mergeMakeOCDBUser.sh $AlienName /alice/data/2011/LHC11h/000$run/cpass0_HLT/  $run alien://folder=/alice/cern.ch/user/m/miranov/Pass0/$run
-#
-# authors:   marian.ivanov#cern.ch, mikolaj.krzewicki@cern.ch 
-
-AlienName=$1
-InputDataDir=$2
-Run=$3
-OCDBPath=$4
-InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/Pass0/
-
-echo xxxxxxxxxxxxxxxxxxxxxxxxxx
-echo SETUP
-echo AlienName=$1
-echo InputDataDir=$2
-echo Run=$3
-echo OCDBPath=$4
-echo InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/Pass0/
-echo xxxxxxxxxxxxxxxxxxxxxxxxxx
-
-#
-# 1. copy macroses and sh to the predefiend alien directory
-#
-OutputMacros=`echo /alice/cern.ch/user/j/jotwinow/Pass0/MergeCalibration/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
-alien_mkdir  $OutputMacros
-
-for lfile in `ls $InputMacros/{*C,*sh,*jdl} | grep -v AddTask`; do
-    bname=`basename $lfile`  
-    echo  Copping alien_cp -n $lfile alien://$OutputMacros/$bname 
-    alien_cp -n $lfile alien://$OutputMacros/$bname
-done
-#
-# 2. Copy shell script and jdl
-#
-OutputBin=`echo  /alice/cern.ch/user/j/jotwinow/bin/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
-echo alien_cp -n $InputMacros/mergeMakeOCDB.sh  alien://$OutputBin/mergeMakeOCDB.sh
-alien_cp -n  $InputMacros/mergeMakeOCDB.sh  alien://$OutputBin/mergeMakeOCDB.sh
-cat $InputMacros/mergeMakeOCDB.jdl | sed "s_/j/jotwinow/_${AlienName}_g" > mergeMakeOCDB.jdl
-echo alien_cp -n mergeMakeOCDB.jdl alien://$OutputMacros/mergeMakeOCDB.jdl
-alien_cp -n mergeMakeOCDB.jdl alien://$OutputMacros/mergeMakeOCDB.jdl
-
-#
-# 3. Copy validation switch off return value - job will alway finish
-#
-cat $InputMacros/validationMerging.sh |  sed "s_exit \$error_exit 0_" > validationMerging.sh
-echo alien_cp  -n validationMerging.sh  alien:///$OutputMacros/validationMerging.sh
-alien_cp  -n validationMerging.sh  alien:///$OutputMacros/validationMerging.sh
-#
-# 4. Submit job
-#
-echo alien_submit alien:///$OutputMacros/mergeMakeOCDB.jdl $InputDataDir $Run $OCDBPath
-alien_submit alien:///$OutputMacros/mergeMakeOCDB.jdl $InputDataDir $Run $OCDBPath &
-echo Alien job submitted $!
-
diff --git a/PWGPP/CalibMacros/Pass0/test/runPass0User.sh b/PWGPP/CalibMacros/Pass0/test/runPass0User.sh
deleted file mode 100755 (executable)
index 9460d21..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-# Script for testing of the Pass0.jdl  on the grid for user purposes
-# To be used for validation of modified user code before asking for porting
-
-# 
-# Parameters for macro:
-# 1  -   alien user dir name                 - e.g  /m/miranov/
-# 2  -   input directory with raw data       - e.g /alice/data/2011/LHC11a/
-# 3  -   run number                          - e.g run number 000146807
-# Example:
-# Run=000146807
-# AlienName=/m/miranov/
-# RawPath=/alice/data/2011/LHC11a/
-# $ALICE_ROOT/PWGPP/CalibMacros/Pass0/test/runPass0User.sh  $AlienName $RawPath  $Run 
-#
-# authors:   marian.ivanov#cern.ch, mikolaj.krzewicki@cern.ch 
-
-AlienName=$1
-RawPath=$2
-Run=$3
-InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/Pass0/
-
-echo xxxxxxxxxxxxxxxxxxxxxxxxxx
-echo SETUP
-echo AlienName=$1
-echo RawPath=$2
-echo Run=$3 
-echo InputMacros=$ALICE_ROOT/PWGPP/CalibMacros/Pass0/
-echo xxxxxxxxxxxxxxxxxxxxxxxxxx
-
-#
-# 1. copy macroses and sh to the predefiend alien directory
-#
-OutputMacros=`echo /alice/cern.ch/user/j/jotwinow/Pass0/CalibMacros/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
-alien_mkdir  $OutputMacros
-
-for lfile in `ls $InputMacros/{*C,*sh} `; do
-    bname=`basename $lfile`  
-    echo  Copping alien_cp -n $lfile alien://$OutputMacros/$bname 
-    alien_cp -n $lfile alien://$OutputMacros/$bname
-done
-
-
-#
-# 2. Copy shell script and jdl
-#
-OutputBin=`echo  /alice/cern.ch/user/j/jotwinow/bin/ | sed s_\/j\/jotwinow\/_$AlienName\_ `
-echo alien_cp -n $InputMacros/runPass0.sh  alien://$OutputBin/runPass0.sh
-alien_cp -n  $InputMacros/runPass0.sh   alien://$OutputBin/runPass0.sh
-cat $InputMacros/Pass0.jdl | sed "s_/j/jotwinow/_${AlienName}_g" | sed "s_/alice/data/2010/LHC10d/_${RawPath}_g" > Pass0.jdl
-echo alien_cp -n Pass0.jdl alien://$OutputMacros/Pass0.jdl
-alien_cp -n Pass0.jdl alien://$OutputMacros/Pass0.jdl
-
-#
-# 3. Copy validation switch off return value - job will alway finish
-#
-cat $InputMacros/validation.sh |  sed "s_exit \$error_exit 0_" > validation.sh
-echo alien_cp  -n validation.sh  alien:///$OutputMacros/validation.sh
-alien_cp  -n validation.sh  alien:///$OutputMacros/validation.sh
-#
-# 4. Submit job
-#
-echo alien_submit alien:///$OutputMacros/Pass0.jdl $Run 
-#alien_submit alien:///$OutputMacros/Pass0.jdl $Run 
-#echo Alien job submitted $!
-
diff --git a/PWGPP/CalibMacros/Pass0/validation.sh b/PWGPP/CalibMacros/Pass0/validation.sh
deleted file mode 100644 (file)
index cadafcc..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-##################################################
-validateout=`dirname $0`
-validatetime=`date`
-validated="0";
-error=1
-
-if [ -z $validateout ]
-then
-    validateout="."
-fi
-cd $validateout;
-validateworkdir=`pwd`;
-
-echo "*******************************************************" >> stdout;
-echo "* AliRoot Validation Script V1.0                      *" >> stdout;
-echo "* Time:    $validatetime " >> stdout;
-echo "* Dir:     $validateout" >> stdout;
-echo "* Workdir: $validateworkdir" >> stdout;
-echo "* ----------------------------------------------------*" >> stdout;
-ls -la ./ >> stdout;
-echo "* ----------------------------------------------------*" >> stdout;
-
-cp stdout stdout.log
-cp stderr stderr.log
-
-##################################################
-if [ -f rec.log ] && [ -f calib.log ] && [ -f AliESDs.root ] && [ -f AliESDfriends_v1.root ]  
-then 
-sv=`grep -i  "Segmentation violation" *.log`
-if [ "$sv" = "" ]
-    then
-    sf=`grep -i  "Segmentation fault" *.log`
-    if [ "$sf" = "" ]
-        then
-        be=`grep -i  "Bus error" *.log`
-        if [ "$be" = "" ]
-           then
-           ab=`grep -i "Break" *.log`
-           if [ "$ab" = "" ]
-               then
-               fp=`grep -i  "Floating point exception" *.log`
-               if [ "$fp" = "" ]
-                   then
-                   kl=`grep -i  "Killed" *.log`
-                   if [ "$kl" = "" ]
-                       then
-                       bf=`grep -i "busy flag cleared" *.log`
-                       if [ "$bf" = "" ]
-                            then
-                              echo "* ----------------   Job Validated  ------------------*" >> stdout;
-                              error="0";
-                            else
-                               echo "* #             Check Macro failed !                  #" >> stdout;
-                        fi
-                   fi
-               fi
-            fi
-        fi
-    fi
-fi
-else
-    echo "* ########## Job not validated - no rec.log or calib.log or AliESDs.root  && AliESDfriends.root ###" >> stdout;
-    echo "* ########## Removing all ROOT files from the local directory, leaving only the logs ###" >> stdout;
-    rm -rf *.root
-fi
-if [ "$error" = "1" ] 
-    then
-    echo "* ################   Job not validated ################" >> stdout;
-fi
-echo "* ----------------------------------------------------*" >> stdout;
-echo "*******************************************************" >> stdout;
-sleep 15;
-cd -
-exit $error
diff --git a/PWGPP/CalibMacros/Pass0/validationMerging.sh b/PWGPP/CalibMacros/Pass0/validationMerging.sh
deleted file mode 100755 (executable)
index ba89c09..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-
-#!/bin/sh
-##################################################
-validateout=`dirname $0`
-validatetime=`date`
-validated="0";
-error=1
-
-if [ -z $validateout ]
-then
-    validateout="."
-fi
-cd $validateout;
-validateworkdir=`pwd`;
-
-echo "*******************************************************" >> stdout;
-echo "* AliRoot Validation Script V1.0                      *" >> stdout;
-echo "* Time:    $validatetime " >> stdout;
-echo "* Dir:     $validateout" >> stdout;
-echo "* Workdir: $validateworkdir" >> stdout;
-echo "* ----------------------------------------------------*" >> stdout;
-ls -la ./ >> stdout;
-echo "* ----------------------------------------------------*" >> stdout;
-
-cp stdout stdout.log
-cp stderr stderr.log
-
-##################################################
-if [ -f merge.log ] && [ -f CalibObjects.root ] 
-then 
-sv=`grep -i  "Segmentation violation" *.log`
-if [ "$sv" = "" ]
-    then
-    sf=`grep -i  "Segmentation fault" *.log`
-    if [ "$sf" = "" ]
-        then
-        be=`grep -i  "Bus error" *.log`
-        if [ "$be" = "" ]
-           then
-           ab=`grep -i "Break" *.log`
-           if [ "$ab" = "" ]
-               then
-               fp=`grep -i  "Floating point exception" *.log`
-               if [ "$fp" = "" ]
-                   then
-                   kl=`grep -i  "Killed" *.log`
-                   if [ "$kl" = "" ]
-                       then
-                       bf=`grep -i "busy flag cleared" *.log`
-                       if [ "$bf" = "" ]
-                            then
-                               es=`grep -i "E-AliCDBGrid::PutEntry:" *.log`
-                                if [ "$es" = "" ]
-                                  then
-                                   fg=`grep -i "F-AliCDBGrid::" *.log`
-                                    if [ "$fg" = "" ]
-                                      then
-                                   echo "* ----------------   Job Validated  ------------------*" >> stdout;
-                                   error="0";
-                                  else
-                                    echo "* #             Check Macro failed !                  #" >> stdout;
-                               fi
-                            fi
-                        fi
-                   fi
-               fi
-            fi
-        fi
-    fi
-fi
-else
-    echo "* ########## Job not validated - no merge.log or CalibObjects.root ###" >> stdout;
-    echo "* ########## Removing all ROOT files from the local directory, leaving only the logs ###" >> stdout;
-    rm -rf *.root
-fi
-if [ "$error" = "1" ] 
-    then
-    echo "* ################   Job not validated ################" >> stdout;
-fi
-echo "* ----------------------------------------------------*" >> stdout;
-echo "*******************************************************" >> stdout;
-sleep 15;
-cd -
-exit $error