class for running generation, simulation and digitization Hits, sdigits and digits are created for all detectors by typing: AliSimulation sim; sim.Run(); The Run method returns kTRUE in case of successful execution. The number of events can be given as argument to the Run method or it can be set by sim.SetNumberOfEvents(n); The name of the configuration file can be passed as argument to the AliSimulation constructor or can be specified by sim.SetConfigFile("..."); The generation of particles and the simulation of detector hits can be switched on or off by sim.SetRunGeneration(kTRUE); // generation of primary particles sim.SetRunSimulation(kFALSE); // but no tracking For which detectors sdigits and digits will be created, can be steered by sim.SetMakeSDigits("ALL"); // make sdigits for all detectors sim.SetMakeDigits("ITS TPC"); // make digits only for ITS and TPC The argument is a (case sensitive) string with the names of the detectors separated by a space. An empty string ("") can be used to disable the creation of sdigits or digits. The special string "ALL" selects all available detectors. This is the default. The creation of digits from hits instead of from sdigits can be selected by sim.SetMakeDigitsFromHits("TRD"); The argument is again a string with the selected detectors. Be aware that this feature is not available for all detectors and that merging is not possible, when digits are created directly from hits. Background events can be merged by calling sim.MergeWith("background/galice.root", 2); The first argument is the file name of the background galice file. The second argument is the number of signal events per background event. By default this number is calculated from the number of available background events. MergeWith can be called several times to merge more than two event streams. It is assumed that the sdigits were already produced for the background events. The output of raw data can be switched on by calling sim.SetWriteRawData("MUON"); // write raw data for MUON The default output format of the raw data are DDL files. They are converted to a DATE file, if a file name is given as second argument. For this conversion the program "dateStream" is required. If the file name has the extension ".root", the DATE file is converted to a root file. The program "alimdc" is used for this purpose. For the conversion to DATE and root format the two conversion programs have to be installed. Only the raw data in the final format is kept if the third argument is kTRUE. The methods RunSimulation, RunSDigitization, RunDigitization, RunHitsDigitization and WriteRawData can be used to run only parts of the full simulation chain. The creation of raw data DDL files and their conversion to the DATE or root format can be run directly by calling the methods WriteRawFiles, ConvertRawFilesToDate and ConvertDateToRoot. The default number of events per file, which is usually set in the config file, can be changed for individual detectors and data types by calling sim.SetEventsPerFile("PHOS", "Reconstructed Points", 3); The first argument is the detector, the second one the data type and the last one the number of events per file. Valid data types are "Hits", "Summable Digits", "Digits", "Reconstructed Points" and "Tracks". The number of events per file has to be set before the simulation of hits. Otherwise it has no effect. The trigger configuration is set by the method SetTriggerConfig(X) X can take three kinds of values - The exact string "none" - case insensitive. In this case, not trigger information is generated from the digits. - The empty string or "ocdb" - case insensitive. In this case the trigger configuration is read from OCDB - Some string - say "p-p" - in which case the configuration is read from fixed files in $ALICE_ROOT/GRP/CTP/ - say $ALICE_ROOT/GRP/CTP/p-p.cfg Default is to read from OCDB.
AliSimulation(const char* configFileName = "Config.C", const char* name = "AliSimulation", const char* title = "generation, simulation and digitization") | |
virtual | ~AliSimulation() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual Bool_t | ConvertDateToRoot(const char* dateFileName = "raw.date", const char* rootFileName = "raw.root") |
virtual Int_t | ConvertRaw2SDigits(const char* rawDirectory, const char* esdFile = "", Int_t N = -1, Int_t nSkip = 0) |
virtual Bool_t | ConvertRawFilesToDate(const char* dateFileName = "raw.date", const char* rootFileName = "") |
virtual void | TNamed::Copy(TObject& named) const |
virtual Bool_t | CreateHLT() |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
void | EmbedInto(const char* fileName, Int_t nSignalPerBkgrd = 0) |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
virtual void | FinishRun() |
time_t | GenerateTimeStamp() const |
Int_t | GetDetIndex(const char* detector) |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual const Char_t* | GetGeometryFile() const |
virtual const char* | TObject::GetIconName() const |
virtual const char* | TNamed::GetName() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TNamed::GetTitle() const |
const Char_t* | GetTriggerConfig() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
void | InitQA() |
virtual void | TObject::Inspect() constMENU |
static AliSimulation* | Instance() |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
virtual Bool_t | IsGeometryFromFile() const |
virtual Bool_t | IsLegoRun() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | TObject::IsZombie() const |
AliLego* | Lego() const |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
void | MergeWith(const char* fileName, Int_t nSignalPerBkgrd = 0) |
Bool_t | MisalignGeometry(AliRunLoader* runLoader = NULL) |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TNamed::Print(Option_t* option = "") const |
void | ProcessEnvironmentVars() |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual Bool_t | Run(Int_t nEvents = 0) |
virtual Bool_t | RunDigitization(const char* detectors = "ALL", const char* excludeDetectors = "") |
virtual Bool_t | RunGeneratorOnly() |
virtual Bool_t | RunHitsDigitization(const char* detectors = "ALL") |
virtual Bool_t | RunHLT() |
virtual Bool_t | RunLego(const char* setup = "Config.C", Int_t nc1 = 60, Float_t c1min = 2, Float_t c1max = 178, Int_t nc2 = 60, Float_t c2min = 0, Float_t c2max = 360, Float_t rmin = 0, Float_t rmax = 430, Float_t zmax = 10000, AliLegoGenerator* gener = NULL, Int_t nev = -1) |
Bool_t | RunQA() |
virtual Bool_t | RunSDigitization(const char* detectors = "ALL") |
virtual Bool_t | RunSimulation(Int_t nEvents = 0) |
virtual Bool_t | RunTrigger(const char* descriptors = "", const char* detectors = "ALL") |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
void | SetAlignObjArray(TObjArray* array) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
void | SetCDBSnapshotMode(const char* snapshotFileName) |
void | SetConfigFile(const char* fileName) |
void | SetDefaultStorage(const char* uri) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
void | SetEventSpecie(AliRecoParam::EventSpecie_t es) |
void | SetEventsPerFile(const char* detector, const char* type, Int_t nEvents) |
void | SetGAliceFile(const char* fileName) |
virtual void | SetGeometryFile(const Char_t* filename) |
void | SetGRPWriteLocation(char* loc) |
void | SetLoadAlignData(const char* detectors) |
void | SetLoadAlignFromCDB(Bool_t load) |
void | SetMakeDigits(const char* detectors) |
void | SetMakeDigitsFromHits(const char* detectors) |
void | SetMakeSDigits(const char* detectors) |
virtual void | TNamed::SetName(const char* name)MENU |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
void | SetNumberOfEvents(Int_t nEvents) |
static void | TObject::SetObjectStat(Bool_t stat) |
void | SetQACycles(AliQAv1::DETECTORINDEX_t det, const Int_t cycles) |
void | SetQARefDefaultStorage(const char* uri) |
void | SetQAWriteExpert(AliQAv1::DETECTORINDEX_t det) |
void | SetRegionOfInterest(Bool_t flag) |
void | SetRunGeneration(Bool_t run) |
void | SetRunGeneratorOnly(Bool_t val) |
void | SetRunHLT(const char* options) |
void | SetRunNumber(Int_t run) |
Bool_t | SetRunQA(TString detAndAction = "ALL:ALL") |
void | SetRunSimulation(Bool_t run) |
void | SetSeed(Int_t seed) |
void | SetSpecificStorage(const char* calibType, const char* uri) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
void | SetTriggerConfig(TString conf) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
void | SetUseBkgrdVertex(Bool_t useBkgrdVertex) |
void | SetUseMonitoring(Bool_t flag = kTRUE) |
void | SetWriteGRPEntry(Bool_t flag = kTRUE) |
void | SetWriteQAExpert() |
void | SetWriteRawData(const char* detectors, const char* fileName = NULL, Bool_t deleteIntermediateFiles = kFALSE) |
void | SetWriteSelRawData(Bool_t sel = kTRUE) |
virtual void | ShowMembers(TMemberInspector&) |
virtual Int_t | TNamed::Sizeof() const |
void | StoreUsedCDBMaps() const |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
void | UseMagFieldFromGRP() |
void | UseTimeStampFromCDB() |
void | UseVertexFromCDB() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
void | WriteGRPEntry() |
virtual Bool_t | WriteRawData(const char* detectors = "ALL", const char* fileName = NULL, Bool_t deleteIntermediateFiles = kFALSE, Bool_t selrawdata = kFALSE) |
virtual Bool_t | WriteRawFiles(const char* detectors = "ALL") |
virtual Bool_t | WriteTriggerRawData() |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
AliSimulation(const AliSimulation&) | |
Int_t | GetNSignalPerBkgrd(Int_t nEvents = 0) const |
void | InitCDB() |
void | InitRunNumber() |
Bool_t | IsSelected(TString detName, TString& detectors) const |
AliRunLoader* | LoadRun(const char* mode = "UPDATE") const |
AliSimulation& | operator=(const AliSimulation&) |
void | SetCDBLock() |
Bool_t | SetRunNumberFromData() |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
TString | TNamed::fName | object identifier |
TString | TNamed::fTitle | object title |
TObjArray* | fAlignObjArray | array with the alignment objects to be applied to the geometry |
TObjArray* | fBkgrdFileNames | names of background files for merging |
TString | fCDBUri | ! Uri of the default CDB storage |
TString | fConfigFileName | name of the config file |
Bool_t | fDeleteIntermediateFiles | delete intermediate raw data files |
Bool_t | fEmbeddingFlag | Flag for embedding |
AliRecoParam::EventSpecie_t | fEventSpecie | type of event (see AliRecoParam::EventSpecie_t) |
TObjArray | fEventsPerFile | number of events per file for given detectors and data types |
TString | fGAliceFileName | name of the galice file |
TString | fGRPWriteLocation | Location to write the GRP entry from simulation |
TString | fGeometryFile | Geometry file |
Bool_t | fInitCDBCalled | ! flag to check if CDB storages are already initialized |
Bool_t | fInitRunNumberCalled | ! flag to check if run number is already initialized |
ULong64_t | fKey | ! current CDB key |
AliLego* | fLego | ! Pointer to aliLego object if it exists |
TString | fLoadAlObjsListOfDets | Load alignment data from CDB for these detectors |
Bool_t | fLoadAlignFromCDB | Load alignment data from CDB and apply it to geometry or not |
TString | fMakeDigits | create digits for these detectors |
TString | fMakeDigitsFromHits | create digits from hits for these detectors |
TString | fMakeSDigits | create sdigits for these detectors |
Int_t | fNEvents | number of events |
TString | fQADetectors | list of detectors to be QA'ed |
TString | fQARefUri | ! Uri of the default QA reference storage |
TString | fQATasks | list of QA tasks to be performed |
TString | fRawDataFileName | file name for the raw data file |
Bool_t | fRegionOfInterest | digitization in region of interest |
Int_t | fRun | ! Run number, will be passed to CDB and gAlice!! |
Bool_t | fRunGeneration | generate prim. particles or not |
Bool_t | fRunGeneratorOnly | run code for a generator only production |
TString | fRunHLT | ! HLT options, HLT is disabled if empty, default='default' |
Bool_t | fRunQA | Runs the QA at the end of simulation |
Bool_t | fRunSimulation | simulate detectors (hits) or not |
Int_t | fSeed | ! Seed for random number generator |
Bool_t | fSetRunNumberFromDataCalled | ! flag to check if run number is already loaded from run loader |
TObjArray | fSpecCDBUri | ! Array with detector specific CDB storages |
Bool_t | fStopOnError | stop or continue on errors |
time_t | fTimeEnd | EOR time-stamp |
time_t | fTimeStart | SOR time-stamp |
TString | fTriggerConfig | run trigger for these descriptors |
Bool_t | fUseBkgrdVertex | use vertex from background in case of merging |
Bool_t | fUseMagFieldFromGRP | Use magnetic field settings from GRP |
Bool_t | fUseMonitoring | monitor simulation timing per volume |
Bool_t | fUseTimeStampFromCDB | Flag to generate event time-stamps according to SOR/EOR from GRP |
Bool_t | fUseVertexFromCDB | Flag to use Vertex from CDB |
Bool_t | fWriteGRPEntry | Write or not GRP entry corresponding to the settings in Config.C |
Bool_t | fWriteQAExpertData | ! decides wheter or not to write experts QA data; true by default |
TString | fWriteRawData | write raw data for these detectors |
Bool_t | fWriteSelRawData | write detectors raw data in a separate file accoring to the trigger cluster |
static AliSimulation* | fgInstance | Static pointer to object |
static const char* | fgkDetectorName[18] | names of detectors |
static const Int_t | fgkNDetectors | number of detectors +FIT // alla |
AliHLTSimulation* | fpHLT | ! The instance of HLT simulation |
Inheritance Chart: | ||||||||
|
create simulation object with default parameters
activate a default CDB storage First check if we have any CDB storage set, because it is used to retrieve the calibration and alignment constants
activate a default CDB storage First check if we have any CDB storage set, because it is used to retrieve the calibration and alignment constants
Set CDB lock: from now on it is forbidden to reset the run number or the default storage or to activate any further storage!
Store the desired default CDB storage location Activate it later within the Run() method
Store the desired default CDB storage location Activate it later within the Run() method
Store a detector-specific CDB storage location Activate it later within the Run() method
Set the CDB manager run number The run number is retrieved from gAlice
set the name of the galice file the path is converted to an absolute one if it is relative
set the number of events per file for the given detector and data type ("Hits", "Summable Digits", "Digits", "Reconstructed Points" or "Tracks")
Read the alignment objects from CDB. Each detector is supposed to have the alignment objects in DET/Align/Data CDB path. All the detector objects are then collected, sorted by geometry level (starting from ALIC) and then applied to the TGeo geometry. Finally an overlaps check is performed.
add a file with background events for merging
add a file with background events for embeddin
Generates lego plots of: - radiation length map phi vs theta - radiation length map phi vs eta - interaction length map - g/cm2 length map ntheta bins in theta, eta themin minimum angle in theta (degrees) themax maximum angle in theta (degrees) nphi bins in phi phimin minimum angle in phi (degrees) phimax maximum angle in phi (degrees) rmin minimum radius rmax maximum radius The number of events generated = ntheta*nphi run input parameters in macro setup (default="Config.C") Use macro "lego.C" to visualize the 3 lego plots in spherical coordinates/* */
/* */
/* */
Writes the CTP (trigger) DDL raw data Details of the format are given in the trigger TDR - pages 134 and 135.
run the digitization and produce summable digits
run the digitization and produce digits from sdigits
run the digitization and produce digits from hits
convert the digits to raw data First DDL raw data files for the given detectors are created. If a file name is given, the DDL files are then converted to a DATE file. If deleteIntermediateFiles is true, the DDL raw files are deleted afterwards. If the file name has the extension ".root", the DATE file is converted to a root file. If deleteIntermediateFiles is true, the DATE file is deleted afterwards. 'selrawdata' flag can be used to enable writing of detectors raw data accoring to the trigger cluster.
convert raw data DDL files to a DATE file with the program "dateStream"
The second argument is not empty when the user decides to write
the detectors raw data according to the trigger cluster.
convert a DATE file to a root file with the program "alimdc"
delete existing run loaders, open a new one and load gAlice
get or calculate the number of signal events per background event
check whether detName is contained in detectors if yes, it is removed from detectors
Steering routine to convert raw data in directory rawDirectory/ to fake SDigits. These can be used for embedding of MC tracks into RAW data using the standard merging procedure. If an ESD file is given the reconstructed vertex is taken from it and stored in the event header.
Init the HLT simulation. The function loads the library and creates the instance of AliHLTSimulation. the main reason for the decoupled creation is to set the transient OCDB objects before the OCDB is locked
Run the HLT simulation HLT simulation is implemented in HLT/sim/AliHLTSimulation Disabled if fRunHLT is empty, default vaule is "default". AliSimulation::SetRunHLT can be used to set the options for HLT simulation The default simulation depends on the HLT component libraries and their corresponding agents which define components and chains to run. See http://web.ift.uib.no/~kjeks/doc/alice-hlt-current http://web.ift.uib.no/~kjeks/doc/alice-hlt-current/classAliHLTModuleAgent.html The libraries to be loaded can be specified as an option. <pre> AliSimulation sim; sim.SetRunHLT("libAliHLTSample.so"); </pre> will only load <tt>libAliHLTSample.so</tt>
Allows to run QA for a selected set of detectors and a selected set of tasks among HITS, SDIGITS and DIGITS all selected detectors run the same selected tasks
Get the necessary information from galice (generator, trigger etc) and write a GRP entry corresponding to the settings in the Config.C used note that Hall probes and Cavern and Surface Atmos pressures are not simulated.
{AliCDBManager::Instance()->SetSnapshotMode(snapshotFileName);}
Sets the name of the file from which the geometry is loaded
{fGeometryFile=filename;}
{ AliQAManager::QAManager()->SetCycleLength(det, cycles) ; }
{ AliQAManager::QAManager()->SetWriteExpert(det) ; }