X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=MUON%2FrunDataReconstruction.C;h=6d0da1d3f4d79c946cb476676ee5ec89034f134c;hb=e17f27a2b694b8b46bd22e31836e4e128b1d0b17;hp=a6c8d91536ce8fd776a4430e695db1ff4eb59997;hpb=f7a1cc68313147ec921d4c82df1890abe00e4032;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/runDataReconstruction.C b/MUON/runDataReconstruction.C index a6c8d91536c..6d0da1d3f4d 100644 --- a/MUON/runDataReconstruction.C +++ b/MUON/runDataReconstruction.C @@ -24,74 +24,50 @@ /// \author Laurent Aphecetche, Nicole Bastid, Bogdan Vulpescu, ... #if !defined(__CINT__) || defined(__MAKECINT__) -#include "AliMUONReconstructor.h" -#include "AliMUONRecoParam.h" -#include "AliRecoParam.h" #include "AliCDBManager.h" -#include "AliMagF.h" -#include "AliTracker.h" #include "AliReconstruction.h" -#include #include -//#include +#include #endif -// Data file, OCDB on Grid -TString input="alien:///alice/data/2008/LHC08b/000037057/raw/08000037057021.10.root"; -TString ocdbPath = "alien://folder=/alice/data/2008/LHC08b/OCDB"; - -// Data file, OCDB locally -//TString input="$ALICE_ROOT/MUON/test_out.100/raw.root"; -//TString ocdbPath = "local://$ALICE_ROOT"; - -TString caliboption1 = "NOGAIN"; -TString caliboption2 = "GAINCONSTANTCAPA"; -TString recoptions = "SAVEDIGITS"; -Int_t seed = 1234567; - -void runDataReconstruction(Int_t calib = 1) +void runDataReconstruction(const char* input = "raw://run124360", + const char* ocdbPath = "raw://", + const char* recoptions="SAVEDIGITS", + Int_t numberOfEvents=1000) { - TGrid::Connect("alien://"); - AliCDBManager* man = AliCDBManager::Instance(); - man->SetDefaultStorage(ocdbPath.Data()); + man->SetDefaultStorage(ocdbPath); - man->SetSpecificStorage("MUON/Calib/Mapping","local://$ALICE_ROOT"); - man->SetSpecificStorage("MUON/Calib/DDLStore","local://$ALICE_ROOT"); - - gRandom->SetSeed(seed); + AliReconstruction rec; - // no magnetic field --> factor (4th parameter) = 0 - TGeoGlobalMagField::Instance()->GetField()->SetFactorSol(0); - TGeoGlobalMagField::Instance()->GetField()->SetFactorDip(0); + rec.SetRunReconstruction("MUON"); - AliReconstruction *MuonRec = new AliReconstruction(); - - MuonRec->SetInput(input.Data()); - MuonRec->SetRunVertexFinder(kFALSE); - MuonRec->SetRunLocalReconstruction("MUON"); - MuonRec->SetRunTracking("MUON"); - MuonRec->SetFillESD(" "); - MuonRec->SetLoadAlignData("MUON"); - MuonRec->SetNumberOfEventsPerFile(0); - MuonRec->SetOption("MUON",recoptions.Data()); - AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetCosmicParam(); - muonRecoParam->BypassSt45(kTRUE,kFALSE); - muonRecoParam->RequestStation(2,kFALSE); - muonRecoParam->SetPadGoodnessMask(0x400BE80); - TString caliboption = caliboption1; - if ( calib == 2 ) caliboption = caliboption2; - muonRecoParam->SetCalibrationMode(caliboption.Data()); - muonRecoParam->Print("FULL"); - - AliMUONReconstructor::SetRecoParam(muonRecoParam); - - MuonRec->SetRunQA("MUON:ALL"); - - MuonRec->Run(); - - delete MuonRec; + rec.SetRunQA("MUON:ALL"); + + rec.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ; + + rec.SetWriteESDfriend(kTRUE); + rec.SetWriteAlignmentData(); + + rec.SetInput(gSystem->ExpandPathName(input)); + + rec.SetUseTrackingErrorsForAlignment("ITS"); + + rec.SetCleanESD(kFALSE); + + rec.SetStopOnError(kFALSE); + + rec.SetOption("MUON",recoptions); + + rec.SetQAWriteExpert(AliQAv1::kMUON); + + if ( numberOfEvents > 0 ) + { + rec.SetEventRange(0,numberOfEvents); + } + + AliLog::Flush(); + rec.Run(); - //gObjectTable->Print(); }