- added a raw2sdigits.sh script to convert a (real) raw data file to SDigits file(s) suitable for embedding
- added a "-e" option to the AlirootRun_MUONtest.sh test script for embedding real data into the test simulation
- added an option to runSimulation.C and runReconstruction.C to allow embedding (in particular switch for which OCDB is used)
- added an option to AliMUONDigitMaker::Raw2Digits to fill SDigits instead of Digits (otherwise the ADC value was filled instead of the required charge)
- added an option to Config.C to indicate whether or not this will be used for embedding (in which case we switch OFF the noise generation, as the noise
will naturally come from the real data embedded). Made it compilable to ease debugging (this required mods in rootlogon.C and loadlibs.C)
- added the possibility to convert real digits into simulated ones in AliMUONDigitStoreV2S::AddConcreteDigit
(the reverse, converting sim digit into real one, e.g. in AliMUONDigitStoreV2R::AddConcreteDigit, is still forbidden).
- added a (Is)Converted method to AliMUON(V)Digit to keep track of the digits that were converted from another class
- fixed AliMUON::Raw2SDigits in order to use the specified sdigit classname, and to fill the correct part (charge instead of ADC) of the digit
- fixed AliMUONDigitizerV3 to allow merging of digit stores of different classes
(Laurent)
//_____________________________________________________________________
Bool_t AliMUON::Raw2SDigits(AliRawReader* rawReader)
{
-/// Convert raw data to SDigit
-
+ /// Convert raw data to SDigit
+
if (!fLoader->TreeS()) fLoader->MakeSDigitsContainer();
-
+
TTree* treeS = fLoader->TreeS();
- AliMUONVDigitStore* sDigitStore = new AliMUONDigitStoreV1;
+ AliMUONVDigitStore* sDigitStore = AliMUONVDigitStore::Create(DigitStoreClassName());
+
sDigitStore->Connect(*treeS);
- fDigitMaker->Raw2Digits(rawReader,sDigitStore,0x0);
+ if (!fDigitMaker) fDigitMaker = new AliMUONDigitMaker;
+ fDigitMaker->Raw2Digits(rawReader,sDigitStore,0x0,kTRUE);
treeS->Fill();
fLoader->WriteSDigits("OVERWRITE");
-
+
fLoader->UnloadSDigits();
-
+
delete sDigitStore;
return kTRUE;
return (fFlags & fgkCalibratedMask );
}
+//_____________________________________________________________________________
+Bool_t
+AliMUONDigit::IsConverted() const
+{
+ /// Whether this digit is converted or not
+
+ return (fFlags & fgkConverted);
+}
+
//_____________________________________________________________________________
Bool_t
}
}
+//_____________________________________________________________________________
+void
+AliMUONDigit::Converted(Bool_t value)
+{
+ /// Set the convertion status of this digit.
+
+ if ( value )
+ {
+ fFlags |= fgkConverted;
+ }
+ else
+ {
+ fFlags &= ~fgkConverted;
+ }
+}
+
//_____________________________________________________________________________
Int_t
AliMUONDigit::Track(Int_t i) const
virtual Bool_t IsSaturated() const;
virtual Bool_t IsNoiseOnly() const;
virtual Bool_t IsEfficiencyApplied() const;
+ virtual Bool_t IsConverted() const;
virtual UInt_t StatusMap() const { return fStatusMap; } ///< Return Neighbouring pad status
virtual void NoiseOnly(Bool_t value=kTRUE);
virtual void Saturated(Bool_t saturated=kTRUE);
virtual void EfficiencyApplied(Bool_t value=kTRUE);
-
+ virtual void Converted(Bool_t value=kTRUE);
+
virtual void SetADC(Int_t adc) {fADC=adc; } ///< Set ADC value
virtual void SetPadXY(Int_t padx, Int_t pady) {fPadX = padx; fPadY=pady; } ///< Set pad number along x
virtual void SetCharge(Float_t q) {fSignal = q;} ///< Set charge
static const UInt_t fgkCalibratedMask = 0x100; ///< whether this digits has been calibrated
static const UInt_t fgkNoiseOnlyMask = 0x1000; ///< indicate a simulated digit due to noise only
static const UInt_t fgkEfficiencyMask = 0x2000; ///< indicate chamber efficiency has been applied to a simulated digit
-
- ClassDef(AliMUONDigit,10) //Digits for MUON
+ static const UInt_t fgkConverted = 0x4000; ///< has been converted from a real digit
+
+ ClassDef(AliMUONDigit,11) //Digits for MUON
};
#endif
//____________________________________________________________________
Int_t
AliMUONDigitMaker::Raw2Digits(AliRawReader* rawReader,
- AliMUONVDigitStore* digitStore,
- AliMUONVTriggerStore* triggerStore)
+ AliMUONVDigitStore* digitStore,
+ AliMUONVTriggerStore* triggerStore,
+ Bool_t sdigit)
{
/// Main method to creates digit
/// for tracker
if ( fDigitStore )
{
fDigitStore->Clear(); // insure we start with an empty container
- tracker = ReadTrackerDDL(rawReader);
+ tracker = ReadTrackerDDL(rawReader,sdigit);
}
if ( fTriggerStore || fMakeTriggerDigits )
//____________________________________________________________________
Int_t
-AliMUONDigitMaker::ReadTrackerDDL(AliRawReader* rawReader)
+AliMUONDigitMaker::ReadTrackerDDL(AliRawReader* rawReader, Bool_t sdigit)
{
/// Reading tracker DDL
/// filling the fDigitStore container, which must not be null
digit->SetPadXY(pad.GetIx(),pad.GetIy());
- digit->SetADC(charge);
-
+ if ( sdigit )
+ {
+ digit->SetCharge(charge);
+ }
+ else
+ {
+ digit->SetADC(charge);
+ }
}
if ( fRawStreamTracker->IsErrorMessage() )
// write raw data
Int_t Raw2Digits(AliRawReader* rawReader,
AliMUONVDigitStore* digitContainer=0,
- AliMUONVTriggerStore* triggerStore=0);
+ AliMUONVTriggerStore* triggerStore=0,
+ Bool_t sdigit=kFALSE);
- Int_t ReadTrackerDDL(AliRawReader* rawReader);
+ Int_t ReadTrackerDDL(AliRawReader* rawReader, Bool_t sdigit);
Int_t ReadTriggerDDL(AliRawReader* rawReader);
Int_t TriggerDigits(Int_t nBoard, const TArrayS* xyPattern,
const AliMUONVDigit& digit,
Int_t index)
{
- /// add a digit to this store
- const AliMUONDigit* d = dynamic_cast<const AliMUONDigit*>(&digit);
+ /// add a digit to this store
- if ( !d ) return 0x0;
-
- return new(a[index]) AliMUONDigit(*d);
+ if ( digit.IsA() != AliMUONDigit::Class() )
+ {
+ AliMUONDigit d(digit.DetElemId(),digit.ManuId(),digit.ManuChannel(),digit.Cathode());
+ d.SetCharge(digit.Charge());
+ d.SetADC(digit.ADC());
+ d.Converted();
+ return new(a[index]) AliMUONDigit(d);
+ }
+
+ return new(a[index]) AliMUONDigit(static_cast<const AliMUONDigit&>(digit));
}
//_____________________________________________________________________________
fTriggerStore(new AliMUONTriggerStoreV1),
fDigitStore(0x0),
fOutputDigitStore(0x0),
-fInputDigitStore(0x0)
+fInputDigitStores(0x0)
{
/// Ctor.
delete fTriggerStore;
delete fDigitStore;
delete fOutputDigitStore;
- delete fInputDigitStore;
+ delete fInputDigitStores;
AliInfo("Summary of messages");
fLogger->Print();
//_____________________________________________________________________________
void
-AliMUONDigitizerV3::CreateInputDigitStore()
+AliMUONDigitizerV3::CreateInputDigitStores()
{
- /// Create an input digit store, and check that all input files
- /// actually contains the same type of AliMUONVDigitStore
+ /// Create input digit stores
+ ///
- fInputDigitStore = 0x0;
+ if (fInputDigitStores)
+ {
+ AliFatal("Should be called only once !");
+ }
+
+ fInputDigitStores = new TObjArray;
+
+ fInputDigitStores->SetOwner(kTRUE);
for ( Int_t iFile = 0; iFile < fManager->GetNinputs(); ++iFile )
{
AliFatal(Form("Could not get access to input file #%d",iFile));
}
- AliMUONVDigitStore* inputStore = AliMUONVDigitStore::Create(*iTreeS);
-
- if (!fInputDigitStore)
- {
- fInputDigitStore = inputStore;
- }
- else
- {
- if ( inputStore->IsA() != fInputDigitStore->IsA() )
- {
- AliFatal("Got different types of AliMUONVDigitStore here. Please implement me.");
- }
- }
+ fInputDigitStores->AddAt(AliMUONVDigitStore::Create(*iTreeS),iFile);
}
}
AliCodeTimerAuto("",0)
- AliDebug(1, "Running digitizer.");
-
if ( fManager->GetNinputs() == 0 )
{
AliWarning("No input set. Nothing to do.");
AliFatal(Form("Could not get access to input file #%d",iFile));
}
- if (!fInputDigitStore)
+ if (!fInputDigitStores)
{
- CreateInputDigitStore();
+ CreateInputDigitStores();
}
- fInputDigitStore->Connect(*iTreeS);
- iTreeS->GetEvent(0);
+ AliMUONVDigitStore* dstore = static_cast<AliMUONVDigitStore*>(fInputDigitStores->At(iFile));
+
+ dstore->Connect(*iTreeS);
- MergeWithSDigits(fDigitStore,*fInputDigitStore,fManager->GetMask(iFile));
+ iTreeS->GetEvent(0);
+
+ MergeWithSDigits(fDigitStore,*dstore,fManager->GetMask(iFile));
inputLoader->UnloadSDigits();
- fInputDigitStore->Clear();
+ dstore->Clear();
}
// At this point, we do have digit arrays (one per chamber) which contains
static TF1* NoiseFunction();
- void CreateInputDigitStore();
+ void CreateInputDigitStores();
private:
Bool_t fIsInitialized; ///< are we initialized ?
AliMUONVTriggerStore* fTriggerStore; //!< trigger objects
AliMUONVDigitStore* fDigitStore; //!< temporary digits
AliMUONVDigitStore* fOutputDigitStore; //!< digits we'll output to disk
- AliMUONVDigitStore* fInputDigitStore; //!< input digit store
+ TObjArray* fInputDigitStores; //!< input digit stores (one per input file
- ClassDef(AliMUONDigitizerV3,9) // MUON Digitizer V3-9
+ ClassDef(AliMUONDigitizerV3,10) // MUON Digitizer V3-9
};
#endif
/// Set the calibrated status
virtual void Calibrated(Bool_t value)=0;
+ /// Whether or not this digit was obtained from a conversion (e.g. real to simulated)
+ virtual Bool_t IsConverted() const { return kFALSE; }
+
/// Whether this digit is used somewhere (typically in a cluster)
virtual Bool_t IsUsed() const = 0;
/// Set the used status
MC="" # G3 Simulation with old Config.C
#MC="g3" # G3 Simulation (with new config macros)
#MC="g4" # G4 Simulation (with new config macros)
-SIMCONFIG="$ALICE_ROOT/MUON/"$MC"Config.C" # default simulation configuration file
+
OUTDIR=""
CURDIR=`pwd`
SIMDIR="generated" # sub-directory where to move simulated files prior to reco
DUMPEVENT=5 # event to be dump on files
+SIMCONFIG="$ALICE_ROOT/MUON/"$MC"Config.C"
+EMBEDWITH="" # no embedding by default
+
# next try to see if there are options of this script that want to change the
# defaults
EXIT=0
-while getopts "SRZX:srxzn:tg:p:d:c:" option
+while getopts "SRZX:srxzn:tg:p:d:c:e:" option
do
case $option in
R ) RECONSTRUCTION=1;;
n ) NEVENTS=$OPTARG;;
g ) SEED=$OPTARG;;
p ) RECOPTIONS=$OPTARG;;
+ e ) EMBEDWITH=$OPTARG;;
* ) echo "Unimplemented option chosen."
EXIT=1
;;
echo " -p recoptions (quotified string) reconstruction options to use (default \"$RECOPTIONS\")"
echo " -d full path to output directory (default $OUTDIR)"
echo " -c full path to configuration file for simulation (default $SIMCONFIG)"
+ echo " -e full path to a galice.root file relating to SDigits to be merged (embedding)"
exit 4;
fi
+
# printout the options
echo "sim $SIMULATION rec $RECONSTRUCTION check $CHECKS"
if [ "$SIMULATION" -eq 1 ]; then
echo "$NEVENTS events will be simulated, using the config found at $SIMCONFIG"
fi
+if [ -n "$EMBEDWITH" ]; then
+ echo "Will embed simulation with $EMBEDWITH"
+fi
if [ "$RECONSTRUCTION" -eq 1 ]; then
echo "Reconstruction options to be used : $RECOPTIONS"
if [ "$RAW" -eq 0 ]; then
echo "Updating GRP CTP config ..."
aliroot -b > $OUTDIR/updateCDBCTPConfig.out 2>&1 << EOF
- .L UpdateCDBCTPConfig.C+
+ .L UpdateCDBCTPConfig.C++g
UpdateCDBCTPConfig();
.q
EOF
echo "Running simulation ..."
- aliroot -l -b -q runSimulation.C\($SEED,$NEVENTS,\""$SIMCONFIG"\"\) > $OUTDIR/testSim.out 2>&1
+ aliroot -l -b -q runSimulation.C\($SEED,$NEVENTS,\""$SIMCONFIG"\"\,\""$EMBEDWITH"\"\) > $OUTDIR/testSim.out 2>&1
mkdir $OUTDIR/$SIMDIR
cd $OUTDIR
+ BOOLEMBED=kFALSE
+
+ if [ -n "$EMBEDWITH" ]; then
+ BOOLEMBED=kTRUE
+ fi
+
if [ "$RAW" -eq 1 ]; then
- aliroot -l -b -q runReconstruction\.C\($SEED,\""$OUTDIR/raw.root"\",\""$RECOPTIONS"\"\) > $OUTDIR/testReco.out 2>&1
+ aliroot -l -b -q runReconstruction\.C\($SEED,\""$OUTDIR/raw.root"\",\""$RECOPTIONS"\",$BOOLEMBED\) > $OUTDIR/testReco.out 2>&1
else
- aliroot -l -b -q runReconstruction\.C\($SEED,\"""\",\""$RECOPTIONS"\"\) > $OUTDIR/testReco.out 2>&1
+ aliroot -l -b -q runReconstruction\.C\($SEED,\"""\",\""$RECOPTIONS"\",$BOOLEMBED\) > $OUTDIR/testReco.out 2>&1
fi
echo "Running efficiency ..."
aliroot -b > $OUTDIR/testResults.out 2>&1 << EOF
- .L MUONefficiency.C+
+ .L MUONefficiency.C++g
// no argument assumes Upsilon but MUONefficiency(443) works on Jpsi
MUONefficiency("$OUTDIR/$SIMDIR/galice.root");
.q
echo "Running Trigger efficiency ..."
aliroot -b > $OUTDIR/testTriggerResults.out 2>&1 << EOF
- .L MUONTriggerEfficiency.C+
+ .L MUONTriggerEfficiency.C++g
MUONTriggerEfficiency("$OUTDIR/$SIMDIR/galice.root", "$OUTDIR/galice.root", 1);
.q
EOF
echo "Running check ..."
aliroot -b > $OUTDIR/testCheck.out 2>&1 << EOF
gSystem->Load("libMUONevaluation");
- .L MUONCheck.C+
+ .L MUONCheck.C++g
MUONCheck(0, $NEVENTS-1, "$OUTDIR/$SIMDIR/galice.root", "$OUTDIR/galice.root", "$OUTDIR/AliESDs.root");
.q
EOF
if [ -f "$OUTDIR/$SIMDIR/galice.root" ]; then
aliroot -l -b << EOF
- AliCDBManager* man = AliCDBManager::Instance();
+ AliCDBManager* man = AliCDBManager::Instance();
man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
AliMUONMCDataInterface mcdSim("$OUTDIR/$SIMDIR/galice.root");
mcdSim.DumpKine($DUMPEVENT); > $OUTDIR/dump.$DUMPEVENT.kine
/// Remember to define the directory and event generator option:
///
/// gAlice->SetConfigFunction("Config('$HOME','box');");
+///
+/// Can be compiled by :
+/// .L Config.C+
+/// (depends on the correct rootlogon.C though...)
+
+#if !defined(__CINT__) || defined(__MAKECINT__)
+
+#include "AliABSOv3.h"
+#include "AliBODY.h"
+#include "AliConfig.h"
+#include "AliDIPOv3.h"
+#include "AliDecayerPythia.h"
+#include "AliFRAMEv2.h"
+#include "AliGenBox.h"
+#include "AliGenFixed.h"
+#include "AliGenHijing.h"
+#include "AliGenMUONCocktail.h"
+#include "AliGenMUONlib.h"
+#include "AliGenParam.h"
+#include "AliGenScan.h"
+#include "AliHALLv3.h"
+#include "AliITSv11Hybrid.h"
+#include "AliMAG.h"
+#include "AliMagF.h"
+#include "AliMUONv1.h"
+#include "AliPIPEv3.h"
+#include "AliRun.h"
+#include "AliRunLoader.h"
+#include "AliSHILv3.h"
+#include <Riostream.h>
+#include <TDatime.h>
+#include <TGeant3TGeo.h>
+#include <TGeoGlobalMagField.h>
+#include <TPDGCode.h>
+#include <TRandom.h>
+#include <TSystem.h>
+#include <TVirtualMC.h>
+
+//#include "AliZDCv3.h"
+//#include "AliFMDv1.h"
+//#include "AliPMDv1.h"
+//#include "AliVZEROv7.h"
+
+#endif
-void Config(char directory[100]="", char option[6]="param", const char* digitstore="AliMUONDigitStoreV2S")
+void Config(const char* directory="",
+ const char* option="param",
+ const char* digitstore="AliMUONDigitStoreV2S",
+ bool forEmbedding=kFALSE)
{
//=====================================================================
// Config file for MUON test
//=====================================================================
// Libraries required by geant321
+
gSystem->Load("liblhapdf.so"); // Parton density functions
gSystem->Load("libpythia6.so"); // Pythia
gSystem->Load("libgeant321.so");
TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1, AliMagF::k5kG));
//=============================================================
//=================== Alice BODY parameters =============================
- AliBODY *BODY = new AliBODY("BODY","Alice envelop");
+ new AliBODY("BODY","Alice envelop");
//=================== ABSO parameters ============================
- AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
+ new AliABSOv3("ABSO", "Muon Absorber");
//=================== DIPO parameters ============================
- AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 2");
+ new AliDIPOv3("DIPO", "Dipole version 2");
//================== HALL parameters ============================
- AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
+ new AliHALLv3("HALL", "Alice Hall");
//=================== PIPE parameters ============================
- AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
+ new AliPIPEv3("PIPE", "Beam Pipe");
//=================== SHIL parameters ============================
- AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 2");
+ new AliSHILv3("SHIL", "Shielding Version 2");
//=================== MUON Subsystem ===========================
AliMUON *MUON = new AliMUONv1("MUON", "default");
// Use SetDigitStoreClassName() to change the digitStore implementation used by (s)digitizer
MUON->SetDigitStoreClassName(digitstore);
-
- cout << "MUON DigitStore is " << MUON->DigitStoreClassName().Data() << endl;
-
- // Noise-only digits in tracker/trigger (0=no noise, 1=default (noise in tracker), 2=noise in tracker and trigger):
- //MUON->SetDigitizerWithNoise(kFALSE);
+ if ( forEmbedding )
+ {
+ // Noise-only digits in tracker/trigger (0=no noise, 1=default (noise in tracker), 2=noise in tracker and trigger):
+ cout << "****** DISABLING NOISE GENERATION AS WE DO EMBEDDING ******" << endl;
+ MUON->SetDigitizerWithNoise(0);
+
+ new AliITSv11Hybrid("ITS","ITS v11Hybrid");
+
+ }
+
// Use non-high performance raw data decoder
//MUON->SetFastTrackerDecoder(kFALSE);
//MUON->SetFastTriggerDecoder(kFALSE);
#endif
-Bool_t MUONefficiency(char* filename = "generated/galice.root", char* esdFileName = "AliESDs.root",
- char* geoFilename = "geometry.root", char* ocdbPath = "local://$ALICE_ROOT/OCDB",
+Bool_t MUONefficiency(const char* filename = "generated/galice.root", const char* esdFileName = "AliESDs.root",
+ const char* geoFilename = "geometry.root", const char* ocdbPath = "local://$ALICE_ROOT/OCDB",
Int_t ExtrapToVertex = -1, Int_t ResType = 553, Int_t FirstEvent = 0, Int_t LastEvent = 1000000 )
{
/// \param ExtrapToVertex (default -1)
gSystem->Load("libMUONcalign");
gSystem->Load("libMUONgraphics");
+
+ gSystem->Load("libEVGEN");
+ gSystem->Load("libgeant321");
+ gSystem->Load("libhijing");
+ gSystem->Load("libFASTSIM");
+ gSystem->Load("libThijing");
+ gSystem->Load("libEGPythia6");
+ gSystem->Load("libPythia6");
+ gSystem->Load("libAliPythia6");
+
}
--- /dev/null
+#!/bin/sh
+
+# raw2sdigits.sh rawfile [esdfile]
+#
+# convert a (real) raw data file into SDigits suitable for embedding.
+# if esdfile is present (should correspond to the raw data file ;-) )
+# then zvertex is taken from it
+
+rawfile=$1
+esdfile=""
+
+if [ $# -ge 2 ]; then
+ esdfile=$2
+fi
+
+echo "rawfile=$rawfile esdfile=$esdfile"
+
+aliroot -l -b << EOF
+
+ AliSimulation sim("$ALICE_ROOT/MUON/Config.C");
+ gAlice->SetConfigFunction("Config(\"\", \"param\", \"AliMUONDigitStoreV2R\",kTRUE);");
+ AliCDBManager *cdbm = AliCDBManager::Instance();
+ AliRawReader* reader = AliRawReader::Create(gSystem->ExpandPathName("$rawfile"));
+ reader->NextEvent();
+ Int_t runNumber = reader->GetRunNumber();
+ delete reader;
+ cout << "SETTING RUN NUMBER TO " << runNumber << endl;
+ cdbm->SetRun(runNumber);
+ cdbm->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+ cdbm->SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));
+ sim.SetMakeSDigits("MUON");
+
+ sim.ConvertRaw2SDigits("$rawfile","$esdfile");
+
+EOF
includePath += "-I${ALICE_ROOT}/MUON ";
includePath += "-I${ALICE_ROOT}/MUON/mapping ";
includePath += "-I${ALICE_ROOT}/RAW ";
- includePath += "-I${ALICE_ROOT}/include";
+ includePath += "-I${ALICE_ROOT}/include ";
+ includePath += "-I${ALICE_ROOT}/STRUCT ";
+ includePath += "-I${GEANT3}/TGeant3 ";
+ includePath += "-I${ALICE_ROOT}/THijing ";
+
gSystem->SetIncludePath(includePath.Data());
}
//#include <TObjectTable.h>
#endif
-void runReconstruction(int seed, const char* input, const char* recoptions)
+void runReconstruction(int seed, const char* input, const char* recoptions, bool embedding)
{
AliCDBManager* man = AliCDBManager::Instance();
- man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
- man->SetSpecificStorage("GRP/GRP/Data",
- Form("local://%s",gSystem->pwd()));
+
+ if ( embedding )
+ {
+ cout << "**** WILL USE RAW OCDB AS WE'RE RECONSTRUCTING EMBEDDED DATA" << endl;
+ man->SetDefaultStorage("raw://");
+ }
+ else
+ {
+ man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+
+ man->SetSpecificStorage("GRP/GRP/Data",
+ Form("local://%s",gSystem->pwd()));
+ }
gRandom->SetSeed(seed);
AliReconstruction* MuonRec = new AliReconstruction("galice.root");
- MuonRec->SetInput(input);
- MuonRec->SetRunVertexFinder(kFALSE);
- MuonRec->SetRunLocalReconstruction("MUON");
- MuonRec->SetRunTracking("MUON");
+ MuonRec->SetInput(gSystem->ExpandPathName(input));
+ MuonRec->SetRunReconstruction("MUON");
MuonRec->SetFillESD("HLT");
MuonRec->SetOption("HLT", "libAliHLTMUON.so");
- MuonRec->SetLoadAlignData("MUON");
MuonRec->SetNumberOfEventsPerFile(1000);
MuonRec->SetOption("MUON",recoptions);
MuonRec->SetRunQA("MUON:ALL");
MuonRec->SetQAWriteExpert(AliQAv1::kMUON);
+ MuonRec->SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
+ MuonRec->SetWriteESDfriend(kFALSE);
+ MuonRec->SetCleanESD(kFALSE);
+ MuonRec->SetStopOnError(kFALSE);
+
// uncomment the following lines if you want to set custom RecoParam
// instead of getting them from the OCDB
// AliMUONRecoParam *muonRecoParam = AliMUONRecoParam::GetLowFluxParam();
#include <TRandom.h>
#endif
-void runSimulation(int seed, int nevents, const char* config)
+void runSimulation(int seed,
+ int nevents,
+ const char* config,
+ const char* embedwith)
{
// Uncoment following lines to run simulation with local residual mis-alignment
// (generated via MUONGenerateGeometryData.C macro)
// man->SetSpecificStorage("MUON/Align/Data","local://$ALICE_ROOT/OCDB/MUON/ResMisAlignCDB");
AliSimulation MuonSim(config);
+
+ if ( strlen(embedwith) > 0 )
+ {
+ // setups specific to embedding
+
+ gAlice->SetConfigFunction("Config(\"\", \"param\", \"AliMUONDigitStoreV2S\",kTRUE);");
+
+ // get the run number from real data
+
+ AliRunLoader* runLoader = AliRunLoader::Open(embedwith,"titi");
+ if (runLoader == 0x0)
+ {
+ AliError(Form("Cannot open file %s",filename));
+ return;
+ }
+
+ runLoader->LoadHeader();
+
+ if ( ! runLoader->GetHeader() ) {
+ AliError("Cannot load header.");
+ return;
+ }
+ else {
+ Int_t runNumber = runLoader->GetHeader()->GetRun();
+ MuonSim.SetRunNumber(runNumber);
+ cout << Form("***** RUN NUMBER SET TO %09d ACCORDING TO %s ",runNumber,embedwith) << endl;
+ }
+ runLoader->UnloadHeader();
+ delete runLoader;
+
+ cout << "***** EMBEDDING MODE : USING RAW OCDB" << endl;
+ AliCDBManager::Instance()->SetDefaultStorage("raw://");
+ AliCDBManager::Instance()->SetSpecificStorage("local://$ALICE_ROOT/OCDB","MUON/Calib/Gains");
+ AliCDBManager::Instance()->SetSpecificStorage("local://$ALICE_ROOT/OCDB","MUON/Align/Data");
+
+ }
+ else
+ {
+ gAlice->SetConfigFunction("Config(\"\", \"param\", \"AliMUONDigitStoreV2S\",kFALSE);");
+ }
+
MuonSim.SetSeed(seed);
MuonSim.SetTriggerConfig("MUON");
MuonSim.SetWriteRawData("MUON HLT","raw.root",kTRUE);
MuonSim.SetRunQA("MUON:ALL");
+ if ( strlen(embedwith) > 0 )
+ {
+ MuonSim.MergeWith(embedwith);
+ }
+
MuonSim.Run(nevents);
//gObjectTable->Print();