]>
Commit | Line | Data |
---|---|---|
6569f329 | 1 | // Script to create simulation parameters and store them into CDB |
2 | // Author: Gustavo Conesa Balbastre | |
3 | ||
4 | /* $Id: AliEMCALSetSimParamCDB.C 37597 2009-12-04 13:48:42Z gconesab $ */ | |
5 | ||
6 | #if !defined(__CINT__) | |
7 | #include "TControlBar.h" | |
8 | #include "TString.h" | |
9 | ||
10 | #include "AliEMCALSimParam.h" | |
11 | #include "AliCDBMetaData.h" | |
12 | #include "AliCDBId.h" | |
13 | #include "AliCDBEntry.h" | |
14 | #include "AliCDBManager.h" | |
15 | #include "AliCDBStorage.h" | |
16 | #endif | |
17 | ||
18 | ||
19 | void AliEMCALSetSimParamCDB() | |
20 | { | |
21 | ||
22 | // Create an object AliEMCALRecParam and store it to OCDB | |
23 | ||
24 | //Activate CDB storage | |
25 | AliCDBManager* cdb = AliCDBManager::Instance(); | |
26 | if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); | |
27 | ||
28 | // Create simulation parameter object and set parameter values | |
29 | AliEMCALSimParam *simParam = new AliEMCALSimParam(); | |
30 | //Digits | |
31 | // simParam->SetDigitThreshold(3) ; | |
f0a6dc6f | 32 | // simParam->SetPinNoise(0.012) ; |
33 | // simParam->SetTimeDelay(600e-9) ; | |
6569f329 | 34 | // simParam->SetTimeResolution(0.6e-9) ; |
35 | // simParam->SetNADCED( (Int_t) TMath::Power(2,16)) ; | |
36 | // simParam->SetMeanPhotonElectron(4400); | |
37 | //SDigits | |
38 | // simParam->SetA(0) ; | |
39 | // simParam->SetB(1e6) ; | |
40 | // simParam->SetECPrimaryThreshold(0.05); | |
41 | ||
42 | // Store calibration data into database | |
43 | AliCDBMetaData *md = new AliCDBMetaData(); | |
44 | md->SetResponsible("G. Conesa"); | |
45 | md->SetComment("Simulation Parameters: EMCAL"); | |
46 | md->SetAliRootVersion(gSystem->Getenv("ARVERSION")); | |
47 | md->SetBeamPeriod(0); | |
48 | ||
49 | AliCDBId id("EMCAL/Calib/SimParam",0,AliCDBRunRange::Infinity()); | |
50 | cdb->GetDefaultStorage()->Put(simParam, id, md); | |
51 | ||
52 | return; | |
53 | } | |
54 | ||
55 | ||
56 |