QA validation macro and script
[u/mrichter/AliRoot.git] / test / cosmic / rec.C
index c66a10f6d2942107da2dd28199596c4443bde9da..bcc7a2a231ee8a347e93e5aa96c9ce0002e0e90a 100644 (file)
-void rec(const char *filename="raw.root")\r
+void rec(const char *filename="raw.root", const Int_t mfield=1)\r
 {\r
   /////////////////////////////////////////////////////////////////////////////////////////\r
   //\r
 {\r
   /////////////////////////////////////////////////////////////////////////////////////////\r
   //\r
-  // First version of the reconstruction\r
-  // script for the FDR'08\r
+  // Second version of the reconstruction\r
+  // script for the 2008 cosmic data (LHC08b) \r
+  //\r
+  /////////////////////////////////////////////////////////////////////////////////////////\r
+  //AliLog::SetGlobalLogLevel(AliLog::kWarning);\r
+  AliLog::SetGlobalLogLevel(AliLog::kError);\r
+\r
+  gSystem->Load("libRAliEn.so");\r
+  gSystem->Load("libNet.so");\r
+  gSystem->Load("libMonaLisa.so");\r
+  new TMonaLisaWriter(0, "GridAliRoot-rec.C", 0, 0, "global");\r
+  gSystem->Setenv("APMON_INTERVAL", "120");\r
 \r
   // Set the CDB storage location\r
 \r
   // Set the CDB storage location\r
-  // AliLog::SetModuleDebugLevel("STEER",2);\r
   AliCDBManager * man = AliCDBManager::Instance();\r
   AliCDBManager * man = AliCDBManager::Instance();\r
-  //  man->SetDefaultStorage("local://LocalCDB");\r
-  man->SetDefaultStorage("alien://folder=/alice/data/2008/LHC08a/OCDB/");\r
+    man->SetDefaultStorage("local://$ALICE_ROOT");\r
+  //man->SetDefaultStorage("alien://folder=/alice/data/2008/LHC08a/OCDB/");\r
+  man->SetSpecificStorage("ITS/Calib/*","local://$ALICE_ROOT");\r
   \r
   \r
-  // Files that we can not read from alien...solved\r
+  // Example in case a specific CDB storage is needed\r
   //  man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local://$ALICE_ROOT");\r
   //  man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local://$ALICE_ROOT");\r
-  //  man->SetSpecificStorage("ITS/Calib/MapsTimeSDD","local://$ALICE_ROOT");\r
-  //  man->SetSpecificStorage("TPC/Calib/ExB","local://$ALICE_ROOT");\r
 \r
 \r
-  // Objects not found if using LHC07w database...solved\r
-  //  man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local:///afs/cern.ch/user/c/cheshkov/public/OCDB");\r
-  // man->SetSpecificStorage("GRP/GRP/Data","local://$ALICE_ROOT");\r
-  // man->SetSpecificStorage("ITS/Calib/DDLMapSDD","local://$ALICE_ROOT");\r
-  // man->SetSpecificStorage("MUON/Calib/Mapping","local://$ALICE_ROOT");\r
-  // man->SetSpecificStorage("MUON/Calib/DDLStore","local://$ALICE_ROOT");\r
+  // Reconstruction settings\r
+  AliReconstruction rec;\r
 \r
   // ITS settings\r
   AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetCosmicTestParam();\r
 \r
   // ITS settings\r
   AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetCosmicTestParam();\r
+  itsRecoParam->SetFactorSAWindowSizes(20);\r
   itsRecoParam->SetClusterErrorsParam(2);\r
   itsRecoParam->SetFindV0s(kFALSE);\r
   itsRecoParam->SetAddVirtualClustersInDeadZone(kFALSE);\r
   itsRecoParam->SetUseAmplitudeInfo(kFALSE);\r
   // In case we want to switch off a layer\r
   //  itsRecoParam->SetLayerToSkip(<N>);\r
   itsRecoParam->SetClusterErrorsParam(2);\r
   itsRecoParam->SetFindV0s(kFALSE);\r
   itsRecoParam->SetAddVirtualClustersInDeadZone(kFALSE);\r
   itsRecoParam->SetUseAmplitudeInfo(kFALSE);\r
   // In case we want to switch off a layer\r
   //  itsRecoParam->SetLayerToSkip(<N>);\r
-  itsRecoParam->SetLayerToSkip(4);\r
-  itsRecoParam->SetLayerToSkip(5);\r
+  //  itsRecoParam->SetLayerToSkip(4);\r
+  //  itsRecoParam->SetLayerToSkip(5);\r
   itsRecoParam->SetLayerToSkip(2);\r
   itsRecoParam->SetLayerToSkip(3);\r
   itsRecoParam->SetLayerToSkip(2);\r
   itsRecoParam->SetLayerToSkip(3);\r
-  AliITSReconstructor::SetRecoParam(itsRecoParam);\r
+  //itsRecoParam->SetSAOnePointTracks();\r
+  itsRecoParam->SetClusterMisalError(0.1); // [cm]\r
+  itsRecoParam->SetSAUseAllClusters();\r
+  rec.SetRecoParam("ITS",itsRecoParam);\r
 \r
   // TPC settings\r
 \r
   // TPC settings\r
-  AliLog::SetClassDebugLevel("AliTPCclustererMI",2);\r
-  AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE);\r
+  //AliLog::SetClassDebugLevel("AliTPCclustererMI",2);\r
+  AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kFALSE);\r
   tpcRecoParam->SetTimeInterval(60,940);\r
   tpcRecoParam->SetTimeInterval(60,940);\r
-  tpcRecoParam->Dump();\r
-  AliTPCReconstructor::SetRecoParam(tpcRecoParam);\r
+  Double_t sysError[5]={0.3,1, 0.3/150., 1./150.,0.3/(150*150.)};\r
+  tpcRecoParam->SetSystematicError(sysError);\r
+  tpcRecoParam->SetMinMaxCutAbs(4.);\r
+  tpcRecoParam->SetMinLeftRightCutAbs(6.);\r
+  tpcRecoParam->SetMinUpDownCutAbs(6.);\r
+  //  tpcRecoParam->Dump();\r
+  rec.SetRecoParam("TPC",tpcRecoParam);\r
   AliTPCReconstructor::SetStreamLevel(1);\r
 \r
   // TRD setting\r
   AliTPCReconstructor::SetStreamLevel(1);\r
 \r
   // TRD setting\r
+  // Settings for the TRD Raw Reader\r
   AliTRDrawStreamBase::SetRawStreamVersion("TB");\r
   AliTRDrawStreamBase::SetRawStreamVersion("TB");\r
+  AliTRDrawStreamTB::SetNoErrorWarning();\r
+  AliTRDrawStreamTB::AllowCorruptedData();\r
+  AliTRDrawStreamTB::DisableStackNumberChecker();\r
+  AliTRDrawStreamTB::DisableStackLinkNumberChecker();\r
+  AliTRDrawStreamTB::SetSubtractBaseline(10);\r
+  \r
+  // TRD reconstruction params\r
+  AliTRDrecoParam *fTRDrecoParam = AliTRDrecoParam::GetCosmicTestParam();\r
+  rec.SetRecoParam("TRD",fTRDrecoParam);\r
+  AliTRDtrackerV1::SetNTimeBins(30);\r
 \r
   // PHOS settings\r
 \r
   // PHOS settings\r
-  AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc();\r
-  recEmc->SetSubtractPedestals(kTRUE);\r
-  recEmc->SetMinE(0.05);\r
-  recEmc->SetClusteringThreshold(0.10);\r
-  AliPHOSReconstructor::SetRecoParamEmc(recEmc);\r
+  AliPHOSRecoParam* recPHOS = new AliPHOSRecoParam();\r
+  recPHOS->SetEMCSubtractPedestals(kTRUE);\r
+  recPHOS->SetEMCMinE(0.05);\r
+  recPHOS->SetEMCClusteringThreshold(0.10);\r
+  rec.SetRecoParam("PHOS",recPHOS);\r
 \r
   // T0 settings\r
 \r
   // T0 settings\r
-  AliLog::SetModuleDebugLevel("T0", 10);\r
+  //AliLog::SetModuleDebugLevel("T0", 10);\r
 \r
   // MUON settings\r
 \r
   // MUON settings\r
-  AliLog::SetClassDebugLevel("AliMUONRawStreamTracker",3);\r
+  //AliLog::SetClassDebugLevel("AliMUONRawStreamTracker",3);\r
   AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();\r
   muonRecoParam->CombineClusterTrackReco(kTRUE);\r
   muonRecoParam->SetCalibrationMode("NOGAIN");\r
   //muonRecoParam->SetClusteringMode("PEAKFIT");\r
   //muonRecoParam->SetClusteringMode("PEAKCOG");\r
   muonRecoParam->Print("FULL");\r
   AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();\r
   muonRecoParam->CombineClusterTrackReco(kTRUE);\r
   muonRecoParam->SetCalibrationMode("NOGAIN");\r
   //muonRecoParam->SetClusteringMode("PEAKFIT");\r
   //muonRecoParam->SetClusteringMode("PEAKCOG");\r
   muonRecoParam->Print("FULL");\r
-  AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam);\r
+  rec.SetRecoParam("MUON",muonRecoParam);\r
  \r
   // Tracking settings\r
  \r
   // Tracking settings\r
-  //  AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);\r
-  AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 0., 10., 2);\r
+  AliMagFMaps* field;\r
+  if (mfield)\r
+     field = new AliMagFMaps("Maps","Maps", 2, 1., 10., AliMagFMaps::k5kG);\r
+   else\r
+     field = new AliMagFMaps("Maps","Maps", 2, 0., 10., 2);\r
   AliTracker::SetFieldMap(field,1);\r
   Double_t mostProbPt=0.35;\r
   AliExternalTrackParam::SetMostProbablePt(mostProbPt);\r
 \r
   // AliReconstruction settings\r
   AliTracker::SetFieldMap(field,1);\r
   Double_t mostProbPt=0.35;\r
   AliExternalTrackParam::SetMostProbablePt(mostProbPt);\r
 \r
   // AliReconstruction settings\r
-  AliReconstruction rec;\r
   rec.SetUniformFieldTracking(kFALSE);\r
   rec.SetWriteESDfriend(kTRUE);\r
   rec.SetWriteAlignmentData();\r
   rec.SetInput(filename);\r
   rec.SetUniformFieldTracking(kFALSE);\r
   rec.SetWriteESDfriend(kTRUE);\r
   rec.SetWriteAlignmentData();\r
   rec.SetInput(filename);\r
-  rec.SetRunReconstruction("ALL");\r
+  //  rec.SetRunReconstruction("ALL");\r
   rec.SetUseTrackingErrorsForAlignment("ITS");\r
 \r
   // In case some detectors have to be switched off...\r
   rec.SetUseTrackingErrorsForAlignment("ITS");\r
 \r
   // In case some detectors have to be switched off...\r
-  //  rec.SetRunLocalReconstruction("ALL");\r
-  //  rec.SetRunTracking("ALL");\r
-  //  rec.SetFillESD("ALL");\r
+  rec.SetRunReconstruction("ITS TPC TRD TOF HMPID PHOS MUON FMD PMD T0 VZERO ZDC ACORDE");\r
+\r
   // Enable vertex finder - it is needed for cosmic track reco\r
   rec.SetRunVertexFinder(kTRUE);\r
 \r
   // Enable vertex finder - it is needed for cosmic track reco\r
   rec.SetRunVertexFinder(kTRUE);\r
 \r
@@ -95,14 +120,12 @@ void rec(const char *filename="raw.root")
   //  rec.SetEquipmentIdMap("EquipmentIdMap.data");\r
 \r
   // Detector options if any\r
   //  rec.SetEquipmentIdMap("EquipmentIdMap.data");\r
 \r
   // Detector options if any\r
-  rec.SetOption("ITS","cosmics,onlyITS");\r
+  rec.SetOption("ITS","cosmics");\r
   rec.SetOption("MUON","SAVEDIGITS");\r
   rec.SetOption("MUON","SAVEDIGITS");\r
-  rec.SetOption("TPC","OldRCUFormat");\r
-  rec.SetOption("PHOS","OldRCUFormat");\r
   rec.SetOption("T0","cosmic");\r
 \r
   rec.SetOption("T0","cosmic");\r
 \r
-  // To be enabled when CTP readout starts\r
-  rec.SetFillTriggerESD(kFALSE);\r
+  // Enabled when CTP readout starts\r
+  rec.SetFillTriggerESD(kTRUE);\r
 \r
   // all events in one single file\r
   rec.SetNumberOfEventsPerFile(-1);\r
 \r
   // all events in one single file\r
   rec.SetNumberOfEventsPerFile(-1);\r
@@ -110,10 +133,10 @@ void rec(const char *filename="raw.root")
   // switch off cleanESD\r
   rec.SetCleanESD(kFALSE);\r
 \r
   // switch off cleanESD\r
   rec.SetCleanESD(kFALSE);\r
 \r
-  // rec.SetEventRange(0,15);\r
-  // AliLog::SetGlobalDebugLevel(2);\r
+  //rec.SetEventRange(0,15);\r
 \r
 \r
-  rec.SetRunQA(kFALSE);\r
+  rec.SetRunQA("ITS TPC:ESD RECPOINT");\r
+  rec.SetRunGlobalQA(kTRUE);\r
   AliLog::Flush();\r
   rec.Run();\r
 \r
   AliLog::Flush();\r
   rec.Run();\r
 \r