X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=test%2Fcosmic%2Frec.C;h=1c33adc3bc1536603e7a1908430adf45974401c4;hb=b8df7b3091e3fdf52779f0682ba4261c04cc9ccd;hp=af1d2bc128952b479da3b482eae242b363efd831;hpb=462112b232a6c7f945fca9fb7a607880aecf4b0a;p=u%2Fmrichter%2FAliRoot.git diff --git a/test/cosmic/rec.C b/test/cosmic/rec.C index af1d2bc1289..1c33adc3bc1 100644 --- a/test/cosmic/rec.C +++ b/test/cosmic/rec.C @@ -1,159 +1,128 @@ -void rec(Int_t runNumber = 0, const char* year = "08", const char *localFileName = NULL) +void rec(const char *filename="raw.root", const Int_t mfield=1) { - // Offline shifter reconstruction macro - - TString filename; - - if (!localFileName) { - - cout << "Going to run the reconstruction for run: " << runNumber << endl; - - // connect to the grid - TGrid * grid = 0x0 ; - grid = TGrid::Connect("alien://") ; - - // make the file name pattern year and run number - TString pattern; - pattern.Form("%9d",runNumber); - pattern.ReplaceAll(" ", "0") ; - pattern.Prepend(year); - pattern.Append("*0.root"); - - // find the files associated to this run - // get the list of files from AliEn directly - TString baseDir; - baseDir.Form("/alice/data/20%s/",year); - - cout << "Looking for raw-data files with pattern " << pattern << " in folder " << baseDir << endl; - - TGridResult *result = grid->Query(baseDir, pattern); - - TList *fileList = result->GetFileInfoList(); - - cout << fileList->GetEntries() << " raw-data files found" << endl; - if ( fileList->GetEntries() == 0) { - cout << "Exiting..." << endl; - return; - } - - // Take the first (or last?) file... - TFileInfo *fi = (TFileInfo *)fileList->At(0); - // TFileInfo *fi = (TFileInfo *)fileList->At(fileList->GetEntries()-1); - - cout << "Getting the file:" << fi->GetCurrentUrl()->GetUrl() << endl; - fi->Dump(); - - filename = fi->GetCurrentUrl()->GetUrl(); - } - else { - // In case of local raw-data file... - filename = localFileName; - } - - AliLog::Flush(); - ///////////////////////////////////////////////////////////////////////////////////////// // - // First version of the reconstruction - // script for the FDR'08 + // Second version of the reconstruction + // script for the 2008 cosmic data (LHC08b) + // + ///////////////////////////////////////////////////////////////////////////////////////// + //AliLog::SetGlobalLogLevel(AliLog::kWarning); + AliLog::SetGlobalLogLevel(AliLog::kError); + + gSystem->Load("libRAliEn.so"); + gSystem->Load("libNet.so"); + gSystem->Load("libMonaLisa.so"); + new TMonaLisaWriter(0, "GridAliRoot-rec.C", 0, 0, "global"); + gSystem->Setenv("APMON_INTERVAL", "120"); // Set the CDB storage location - // AliLog::SetModuleDebugLevel("STEER",2); AliCDBManager * man = AliCDBManager::Instance(); - // man->SetDefaultStorage("local://LocalCDB"); - man->SetDefaultStorage("alien://folder=/alice/data/2008/LHC08a/OCDB/"); +// man->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); + man->SetDefaultStorage("alien://folder=/alice/data/2008/LHC08d/OCDB/"); + man->SetSpecificStorage("ITS/Calib/*","local://$ALICE_ROOT/OCDB"); - // Files that we can not read from alien...solved - // man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local://$ALICE_ROOT"); - // man->SetSpecificStorage("ITS/Calib/MapsTimeSDD","local://$ALICE_ROOT"); - // man->SetSpecificStorage("TPC/Calib/ExB","local://$ALICE_ROOT"); - - // Objects not found if using LHC07w database...solved - // man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local:///afs/cern.ch/user/c/cheshkov/public/OCDB"); - // man->SetSpecificStorage("GRP/GRP/Data","local://$ALICE_ROOT"); - // man->SetSpecificStorage("ITS/Calib/DDLMapSDD","local://$ALICE_ROOT"); - // man->SetSpecificStorage("MUON/Calib/Mapping","local://$ALICE_ROOT"); - // man->SetSpecificStorage("MUON/Calib/DDLStore","local://$ALICE_ROOT"); + // Example in case a specific CDB storage is needed + // man->SetSpecificStorage("ITS/Calib/MapsAnodeSDD","local://$ALICE_ROOT/OCDB"); + + AliQA::SetQARefStorage("local://$ALICE_ROOT/QAref") ; + + // Reconstruction settings + AliReconstruction rec; // ITS settings AliITSRecoParam * itsRecoParam = AliITSRecoParam::GetCosmicTestParam(); + itsRecoParam->SetFactorSAWindowSizes(20); itsRecoParam->SetClusterErrorsParam(2); itsRecoParam->SetFindV0s(kFALSE); itsRecoParam->SetAddVirtualClustersInDeadZone(kFALSE); itsRecoParam->SetUseAmplitudeInfo(kFALSE); // In case we want to switch off a layer // itsRecoParam->SetLayerToSkip(); - itsRecoParam->SetLayerToSkip(4); - itsRecoParam->SetLayerToSkip(5); + // itsRecoParam->SetLayerToSkip(4); + // itsRecoParam->SetLayerToSkip(5); itsRecoParam->SetLayerToSkip(2); itsRecoParam->SetLayerToSkip(3); - AliITSReconstructor::SetRecoParam(itsRecoParam); + //itsRecoParam->SetSAOnePointTracks(); + itsRecoParam->SetClusterMisalError(0.1); // [cm] + itsRecoParam->SetSAUseAllClusters(); + rec.SetRecoParam("ITS",itsRecoParam); // TPC settings - AliLog::SetClassDebugLevel("AliTPCclustererMI",2); - AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kTRUE); + //AliLog::SetClassDebugLevel("AliTPCclustererMI",2); + AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetCosmicTestParam(kFALSE); tpcRecoParam->SetTimeInterval(60,940); - tpcRecoParam->Dump(); - AliTPCReconstructor::SetRecoParam(tpcRecoParam); + Double_t sysError[5]={0.3,1, 0.3/150., 1./150.,0.3/(150*150.)}; + tpcRecoParam->SetSystematicError(sysError); + tpcRecoParam->SetMinMaxCutAbs(4.); + tpcRecoParam->SetMinLeftRightCutAbs(6.); + tpcRecoParam->SetMinUpDownCutAbs(6.); + // tpcRecoParam->Dump(); + rec.SetRecoParam("TPC",tpcRecoParam); AliTPCReconstructor::SetStreamLevel(1); // TRD setting + // Settings for the TRD Raw Reader AliTRDrawStreamBase::SetRawStreamVersion("TB"); + + // TRD reconstruction params + AliTRDrecoParam *fTRDrecoParam = AliTRDrecoParam::GetCosmicTestParam(); + rec.SetRecoParam("TRD",fTRDrecoParam); + AliTRDtrackerV1::SetNTimeBins(30); // PHOS settings - AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc(); - recEmc->SetSubtractPedestals(kTRUE); - recEmc->SetMinE(0.05); - recEmc->SetClusteringThreshold(0.10); - AliPHOSReconstructor::SetRecoParamEmc(recEmc); + AliPHOSRecoParam* recPHOS = new AliPHOSRecoParam(); + recPHOS->SetEMCSubtractPedestals(kTRUE); + recPHOS->SetEMCMinE(0.05); + recPHOS->SetEMCClusteringThreshold(0.10); + rec.SetRecoParam("PHOS",recPHOS); // T0 settings - AliLog::SetModuleDebugLevel("T0", 10); + //AliLog::SetModuleDebugLevel("T0", 10); // MUON settings - AliLog::SetClassDebugLevel("AliMUONRawStreamTracker",3); + //AliLog::SetClassDebugLevel("AliMUONRawStreamTracker",3); AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam(); muonRecoParam->CombineClusterTrackReco(kTRUE); muonRecoParam->SetCalibrationMode("NOGAIN"); //muonRecoParam->SetClusteringMode("PEAKFIT"); //muonRecoParam->SetClusteringMode("PEAKCOG"); muonRecoParam->Print("FULL"); - AliRecoParam::Instance()->RegisterRecoParam(muonRecoParam); + rec.SetRecoParam("MUON",muonRecoParam); // Tracking settings - // AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1); - AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 0., 10., 2); - AliTracker::SetFieldMap(field,1); + AliMagF* field; + if (mfield) + field = new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG); + else + field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k2kG); + Double_t mostProbPt=0.35; AliExternalTrackParam::SetMostProbablePt(mostProbPt); // AliReconstruction settings - AliReconstruction rec; rec.SetUniformFieldTracking(kFALSE); rec.SetWriteESDfriend(kTRUE); rec.SetWriteAlignmentData(); - rec.SetInput(filename.Data()); - rec.SetRunReconstruction("ALL"); + rec.SetInput(filename); + // rec.SetRunReconstruction("ALL"); rec.SetUseTrackingErrorsForAlignment("ITS"); // In case some detectors have to be switched off... - // rec.SetRunLocalReconstruction("ALL"); - // rec.SetRunTracking("ALL"); - // rec.SetFillESD("ALL"); - // Disable vertex finder for the moment - rec.SetRunVertexFinder(kFALSE); + rec.SetRunReconstruction("ITS TPC TRD TOF HMPID PHOS MUON FMD PMD T0 VZERO ZDC ACORDE"); + + // Enable vertex finder - it is needed for cosmic track reco + rec.SetRunVertexFinder(kTRUE); // To be enabled if some equipment IDs are not set correctly by DAQ // rec.SetEquipmentIdMap("EquipmentIdMap.data"); // Detector options if any - rec.SetOption("ITS","cosmics,onlyITS"); + rec.SetOption("ITS","cosmics"); rec.SetOption("MUON","SAVEDIGITS"); - rec.SetOption("TPC","OldRCUFormat"); - rec.SetOption("PHOS","OldRCUFormat"); + rec.SetOption("T0","cosmic"); - // To be enabled when CTP readout starts - rec.SetFillTriggerESD(kFALSE); + // Enabled when CTP readout starts + rec.SetFillTriggerESD(kTRUE); // all events in one single file rec.SetNumberOfEventsPerFile(-1); @@ -161,10 +130,10 @@ void rec(Int_t runNumber = 0, const char* year = "08", const char *localFileName // switch off cleanESD rec.SetCleanESD(kFALSE); - // rec.SetEventRange(0,15); - // AliLog::SetGlobalDebugLevel(2); + //rec.SetEventRange(0,15); - rec.SetRunQA(kFALSE); + rec.SetRunQA(":"); + rec.SetRunGlobalQA(kTRUE); AliLog::Flush(); rec.Run();