From 4d71720457b26ac774105250beca24d45b9864c9 Mon Sep 17 00:00:00 2001 From: ivana Date: Mon, 2 Jul 2007 16:39:22 +0000 Subject: [PATCH] new macros to be used together (or not ;-) ) AlirootRun_MUONtest.sh script (Laurent) --- MUON/runReconstruction.C | 45 ++++++++++++++++++++++++++++++++++++++++ MUON/runSimulation.C | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 MUON/runReconstruction.C create mode 100644 MUON/runSimulation.C diff --git a/MUON/runReconstruction.C b/MUON/runReconstruction.C new file mode 100644 index 00000000000..1cf0a3b2ddd --- /dev/null +++ b/MUON/runReconstruction.C @@ -0,0 +1,45 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* $Id$ */ + +// Macro extracted from MUON test script +// By Laurent Aphecetche + +#if !defined(__CINT__) || defined(__MAKECINT__) +// add +#endif + +void runReconstruction(int run, int seed, const char* input, const char* recoptions) +{ + AliCDBManager::Instance()->SetRun(run); + gRandom->SetSeed(seed); + AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG); + AliTracker::SetFieldMap(field, kFALSE); + AliReconstruction* MuonRec = new AliReconstruction("galice.root"); + MuonRec->SetInput(input); + MuonRec->SetRunVertexFinder(kFALSE); + MuonRec->SetRunLocalReconstruction("MUON"); + MuonRec->SetRunTracking("MUON"); + MuonRec->SetFillESD(""); + MuonRec->SetLoadAlignData("MUON"); + MuonRec->SetNumberOfEventsPerFile(1000); + MuonRec->SetOption("MUON",recoptions); + // MuonRec->SetEventRange(319,319); + MuonRec->Run(); + delete MuonRec; + //gObjectTable->Print(); +} + diff --git a/MUON/runSimulation.C b/MUON/runSimulation.C new file mode 100644 index 00000000000..61d6bda27de --- /dev/null +++ b/MUON/runSimulation.C @@ -0,0 +1,39 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* $Id$ */ + +// Macro extracted from MUON test script +// By Laurent Aphecetche + +#if !defined(__CINT__) || defined(__MAKECINT__) +// add +#endif + +void runSimulation(int run, int seed, int nevents, const char* config) +{ +// Uncoment following lines to run simulation with local residual mis-alignment +// (generated via MUONGenerateGeometryData.C macro) +// AliCDBManager* man = AliCDBManager::Instance(); +// man->SetDefaultStorage("local://$ALICE_ROOT"); +// man->SetSpecificStorage("MUON/Align/Data","local://$ALICE_ROOT/MUON/ResMisAlignCDB"); + gRandom->SetSeed(seed); + AliCDBManager::Instance()->SetRun(run); + AliSimulation MuonSim(config); + MuonSim.SetMakeTrigger("MUON"); + MuonSim.SetWriteRawData("MUON","raw.root",kTRUE); + MuonSim.Run(nevents); + //gObjectTable->Print(); +} -- 2.43.0