本文整理汇总了C++中AliSimulation::SetRunGeneration方法的典型用法代码示例。如果您正苦于以下问题:C++ AliSimulation::SetRunGeneration方法的具体用法?C++ AliSimulation::SetRunGeneration怎么用?C++ AliSimulation::SetRunGeneration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliSimulation
的用法示例。
在下文中一共展示了AliSimulation::SetRunGeneration方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sim
void sim(const TString sID, Int_t nev=1000)
{
gSystem->cd(sID.Data());
//gSystem->Load("liblhapdf");
gSystem->Load("liblhapdf_5_9_1");
gSystem->Load("libEGPythia6");
//gSystem->Load("libpythia6");
gSystem->Load("libpythia6_4_21");
//gSystem->Load("libqpythia");
gSystem->Load("libAliPythia6");
gSystem->Load("libHIJING");
gSystem->Load("libTHijing");
gSystem->Load("libgeant321");
if (gSystem->Getenv("EVENT")) nev = atoi(gSystem->Getenv("EVENT"));
AliSimulation simulator;
simulator.SetRunGeneration(kTRUE);
simulator.SetRunSimulation(kFALSE);
simulator.SetMakeSDigits("");
simulator.SetMakeDigitsFromHits("");
simulator.SetWriteRawData("");
simulator.SetRunQA(":") ;
TStopwatch timer;
timer.Start();
simulator.Run(nev);
WriteXsection();
timer.Stop();
timer.Print();
return;
}
示例2: sim
void sim(Int_t embrun)
{
AliSimulation sim;
if (embrun == 4) {
AliCDBManager *cdbm = AliCDBManager::Instance();
cdbm->SetRun(atoi(gSystem->Getenv("DC_RUN")));
cdbm->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
cdbm->SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));
sim.SetMakeSDigits("ITS TPC TRD TOF VZERO");
sim.ConvertRaw2SDigits("raw.root","AliESDs.root");
return;
}
if (embrun == 2) {
sim.SetRunGeneration(kFALSE);
sim.SetMakeSDigits("");
sim.SetMakeDigitsFromHits("");
}
else {
sim.SetRunGeneration(kTRUE);
sim.SetMakeSDigits("ITS TPC TRD TOF VZERO");
}
sim.SetRunSimulation(kTRUE);
sim.SetMakeDigits("ITS TPC TRD TOF VZERO");
sim.SetWriteRawData("ITS TPC TRD TOF VZERO","raw.root",kTRUE);
if (embrun == 1)
sim.MergeWith("../BackgroundSDigits/galice.root",1);
sim.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
sim.SetSpecificStorage("GRP/GRP/Data",
Form("local://%s",gSystem->pwd()));
sim.SetRunQA(":") ;
AliQA::SetQARefStorage("local://$ALICE_ROOT/OCDB") ;
for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
sim.SetQACycles(det, 1) ;
}
// sim.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Full/");
// sim.SetRunHLT("");
// sim.SetQA(kFALSE);
sim.Run(1);
}
示例3: AliEMCALDecalibrate
void AliEMCALDecalibrate(Int_t nevents=3)
{
//Use "decalibration" database to simulate decalibrated EMCAL.
AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
AliCDBManager::Instance()->SetSpecificStorage("EMCAL","local://DeCalibDB");
//Make digitization, calibration parameters will be taken from CDB
AliSimulation sim ;
sim.SetRunGeneration(kFALSE) ;
sim.SetMakeSDigits("") ;
sim.SetMakeDigits("EMCAL") ;
sim.Run(nevents) ;
}
示例4: pubconf
//.........这里部分代码省略.........
AliHLTConfiguration trackerconf(tracker.Data(), "TPCCATracker", trackerInput.Data(), "");
} else {
AliHLTConfiguration trackerconf(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "-pp-run");
}
//add all trackers to writer input. Include if you would like all slice tracks written.
//if (writerInput.Length()>0) writerInput+=" ";
//writerInput+=tracker;
// add all clusterfinders to the writer input
if (writerInput.Length()>0) writerInput+=" ";
writerInput+=trackerInput;
if (mergerInput.Length()>0) mergerInput+=" ";
mergerInput+=tracker;
}
// GlobalMerger component
if (bUseCA) {
AliHLTConfiguration mergerconf("globalmerger","TPCCAGlobalMerger",mergerInput.Data(),"");
} else {
AliHLTConfiguration mergerconf("globalmerger","TPCGlobalMerger",mergerInput.Data(),"");
}
TString converterInput="globalmerger";
// collector for the MC information to be propagated from CFs to ESDConverter
if (bPropagateMC){
AliHLTConfiguration mcinfo("mcinfo", "BlockFilter" , sinkClusterInput.Data(), "-datatype 'CLMCINFO' 'TPC '");
AliHLTConfiguration mcTrackMarker("mcTrackMarker","TPCTrackMCMarker","globalmerger mcinfo","" );
converterInput+=" mcTrackMarker";
}
if (writerInput.Length()>0) writerInput+=" ";
writerInput+="globalmerger";
//////////////////////////////////////////////////////////////////////////////////////////
//
// output section
//
//////////////////////////////////////////////////////////////////////////////////////////
// sink1: id=sink-writeall write all blocks
AliHLTConfiguration sink1("sink-writeall", "FileWriter" , writerInput.Data(), "-specfmt -subdir=event_%d -blcknofmt=_0x%x -idfmt=_0x%08x");
//////////////////////////////////////////////////////////////////////////////////////////
// sink2: id=sink-esd-file write ESD using the TPCEsdWriter
AliHLTConfiguration sink2("sink-esd-file", "TPCEsdWriter" , converterInput.Data(), "-datafile AliHLTESDs.root");
//////////////////////////////////////////////////////////////////////////////////////////
// sink3: id=sink-esd add ESD to HLTOUT using the TPCEsdConverter
// the esd converter configuration
AliHLTConfiguration sink3("sink-esd", "TPCEsdConverter" , converterInput.Data(), "");
//////////////////////////////////////////////////////////////////////////////////////////
// sink4: id=sink-clusters add cluster data blocks to HLTOUT
AliHLTConfiguration sink4("sink-clusters", "BlockFilter" , sinkClusterInput.Data(), "-datatype 'CLUSTERS' 'TPC '");
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// Init and run the HLT simulation
// All but HLT simulation is switched off
//
AliSimulation sim;
// switch of simulation and data generation
// comment all that stuff to also simulate the events and data
sim.SetRunGeneration(kFALSE);
sim.SetMakeDigits("");
sim.SetMakeSDigits("");
sim.SetMakeDigitsFromHits("");
//sim.SetMakeTrigger("");
sim.SetRunQA(":");
// the normal simulation sets the specific storage for the GRP entry
if (gSystem->AccessPathName("GRP/GRP/Data")) {
cerr << "*********************************************************" << endl;
cerr << "error: no GRP entry found in the currect directory, simulation might be incomplete. Skip setting specific storage for GRP entry" << endl;
cerr << "*********************************************************" << endl << endl;
} else {
sim.SetSpecificStorage("GRP/GRP/Data",
Form("local://%s",gSystem->pwd()));
}
TString rawDataSelection="HLT";
if (bRawData) rawDataSelection="ALL";
if (bRawHLTData || bRawData) sim.SetWriteRawData(rawDataSelection, "raw.root", kTRUE);
// set the options for the HLT simulation
sim.SetRunHLT("libAliHLTUtil.so libAliHLTTPC.so loglevel=0x7c "
"chains=sink-esd,sink-clusters");
sim.Run();
}
示例5: sim
//.........这里部分代码省略.........
AliCDBEntry *grp_ctp = cdbm->Get("GRP/CTP/Config",run);
AliTriggerConfiguration *trg_conf = (AliTriggerConfiguration *)grp_ctp->GetObject();
trg_conf->Print();
TObjArray trg_masks = trg_conf->GetClasses(); // Reference!!!
std::vector<unsigned char> triggerconfs;
for(Int_t iobj = 0; iobj < trg_masks.GetEntriesFast(); iobj++){
AliTriggerClass *trg_class = (AliTriggerClass*)trg_masks.UncheckedAt(iobj);
AliTriggerCluster *trg_clust = (AliTriggerCluster *)trg_class->GetCluster();
// printf("%s %s \n",trg_class->GetName(),trgname);
if(TString(trg_class->GetName()).Contains(trgname)){
printf("We will embed into events containing this trigger name(mask): %s(%d)\n",trg_class->GetName(),trg_class->GetMask());
char triggerbuf[256];
sprintf(triggerbuf, "?Trigger=%d", trg_class->GetMask());
sfname += triggerbuf;
// triggerconfs.push_back(trg_class->GetMask());
}
}
// Int_t itrg = 0;
// printf("Number of Trigger Clusters including MUON: %d\n", (Int_t)triggerconfs.size());
// for(std::vector<unsigned char>::iterator it = triggerconfs.begin(); it < triggerconfs.end(); it++)
// printf("Trigger Mask %d for MUON: %d\n", itrg++, *it);
// filestring += "?EventType=7";
// char triggerbuf[256];
// Int_t triggerval = 0;
// for(std::vector<unsigned char>::iterator it = triggerconfs.begin(); it < triggerconfs.end(); it++)
// triggerval += *it;
// sprintf(triggerbuf, "?Trigger=%d", triggerval);
// filestring += triggerbuf; // This line does the trigger selection. It has to be uncommented if one wants to apply trigger selection
}
printf("Filename: %s\n", sfname.Data());
Int_t iSelEvents = simulator.ConvertRaw2SDigits(sfname.Data(),esdname,nev,nskip);
gSystem->Setenv("DC_NEVENTS",Form("%d",iSelEvents));
gSystem->Exec("echo $DC_NEVENTS > selev.log");
// gSystem->Exec("echo ${DC_NEVENTS} > ${DC_NEVENTS}_${DC_NEVENTS}_0_${DC_NEVENTS}.stat"); // done in simrun.C
gSystem->Exec("echo in sim.C $DC_NEVENTS");
return;
}
// Signal: pure signal
if (!(strcmp(embrun,"kSignal"))){
if (!gSystem->Getenv("DC_NEVENTS")) {
printf("DC_NEVENTS is not set and is needed at this step!!!");
return;
}
AliCDBManager *cdbm = AliCDBManager::Instance();
cdbm->SetDefaultStorage("alien://Folder=/alice/data/2011/OCDB");
cdbm->SetRun(run);
AliGRPManager grpM;
grpM.ReadGRPEntry();
grpM.SetMagField();
printf("Field is locked now. It cannot be changed in Config.C\n");
simulator.SetRunGeneration(kFALSE);
simulator.SetMakeSDigits("");
simulator.SetMakeDigitsFromHits("");
}
// MERGED: Simulate signal and merge with background
if (!(strcmp(embrun,"kMerged"))){
simulator.SetRunGeneration(kTRUE);
simulator.SetMakeSDigits("MUON ITS");
simulator.EmbedInto("Background/galice.root",1);
// THE OCDB PART
simulator.SetDefaultStorage("alien://Folder=/alice/data/2011/OCDB");
// Read GRP Data from RAW
simulator.SetSpecificStorage("GRP/GRP/Data","alien://Folder=/alice/data/2011/OCDB");
}
simulator.SetRunSimulation(kTRUE);
simulator.SetMakeDigits("MUON ITS");
simulator.SetRunHLT("");
// simulator.SetRunHLT("libAliHLTMUON.so chains=dHLT-sim");
simulator.SetRunQA(":");
// simulator.SetRunQA("MUON:ALL");
// Mag.field from OCDB
simulator.UseMagFieldFromGRP();
// THE OCDB PART
// MUON
// simulator.SetSpecificStorage("MUON/Calib/Gains","alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/");
simulator.SetSpecificStorage("MUON/Align/Data","alien://Folder=/alice/simulation/2008/v4-15-Release/Full/");
// MUON Trigger
// simulator.SetSpecificStorage("MUON/Calib/GlobalTriggerCrateConfig","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal");
// simulator.SetSpecificStorage("MUON/Calib/LocalTriggerBoardMasks","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal");
// simulator.SetSpecificStorage("MUON/Calib/RegionalTriggerConfig","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal");
// simulator.SetSpecificStorage("MUON/Calib/TriggerEfficiency","alien://folder=/alice/simulation/2008/v4-15-Release/Full");
// The rest
simulator.Run(nev);
}