当前位置: 首页>>代码示例>>C++>>正文


C++ AliSimulation类代码示例

本文整理汇总了C++中AliSimulation的典型用法代码示例。如果您正苦于以下问题:C++ AliSimulation类的具体用法?C++ AliSimulation怎么用?C++ AliSimulation使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了AliSimulation类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sim

void sim(Int_t nev=50) {

  if (gSystem->Getenv("SIM_EVENTS"))
    nev = atoi(gSystem->Getenv("SIM_EVENTS"));

  printf("GENERATE << %d >> events \n",nev);

  gROOT->LoadMacro("IpPion.C++") ;


  AliSimulation simulator;
  simulator.SetMakeSDigits("PHOS");
  simulator.SetMakeDigits("PHOS");
//
// Ideal OCDB
//  simulator.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  simulator.SetDefaultStorage("local://./OCDB");
//  simulator.SetSpecificStorage("GRP/GRP/Data",
//                               Form("local://%s",gSystem->pwd()));

//  simulator.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/");

 //simulator.SetSpecificStorage("GRP/Calib/MeanVertexSPD", "alien://folder=/alice/data/2010/OCDB");

  //PHOS bad map from RAW OCDB
  simulator.SetSpecificStorage("PHOS/*/*/","local://./OCDB");
//  simulator.SetSpecificStorage("PHOS/Calib/EmcBadChannels/","local://./OCDB");
//  simulator.SetSpecificStorage("PHOS/Calib/EmcGainPedestals/","local://./OCDB");

  simulator.SetRunHLT("");
//

  simulator.SetSpecificStorage("GRP/GRP/Data", "alien://Folder=/alice/data/2010/OCDB");

  AliPHOSSimParam *simParam =  AliPHOSSimParam::GetInstance() ;
  simParam->SetAPDNoise(0.000001) ;
  simParam->SetCellNonLineairyA(0.001) ;
//  simParam->SetCellNonLineairyA(0.1) ; //Default
  simParam->SetCellNonLineairyB(0.2) ;
//  simParam->SetCellNonLineairyC(0.989) ; //Jan4
//  simParam->SetCellNonLineairyC(0.995) ; //Jan5 - 2GeV
  simParam->SetCellNonLineairyC(1.031) ; //no NL

// Vertex and Mag.field from OCDB

//  simulator.UseVertexFromCDB();
  simulator.UseMagFieldFromGRP();
  simulator.SetRunQA(":") ;

//
// The rest

  TStopwatch timer;
  timer.Start();
  simulator.Run(nev);
  timer.Stop();
  timer.Print();
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:58,代码来源:sim.C

示例2: sim

void sim(char *config = "/afs/cern.ch/user/c/coppedis/public/PDC07/Config_PDC07_b03.C", Int_t nev){

  AliSimulation *sim = new AliSimulation(config);
    sim->SetWriteRawData("ZDC");
    TStopwatch timer;
    timer.Start();
    sim->Run(nev);
    timer.Stop();
    timer.Print();

}
开发者ID:JanFSchulte,项目名称:monalisa,代码行数:11,代码来源:sim.C

示例3: sim

void sim(Int_t nev=5) {
  // Libraries required by the simulation

  gSystem->Load("liblhapdf"); // Parton density functions
  gSystem->Load("libEGPythia6"); // TGenerator interface
  gSystem->Load("libgeant321");

  gSystem->Load("libDPMJET"); // DPMJET, PhoJet and Pythia6115 library
  gSystem->Load("libAliPythia6"); // ALICE specific implementations
  gSystem->Load("libTDPMjet"); // DPMJET interface


  AliSimulation simulator;
  simulator.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO");
  simulator.SetMakeDigitsFromHits("ITS TPC");
  simulator.SetWriteRawData("ALL","raw.root",kTRUE);

  simulator.SetDefaultStorage("local://$ALIROOT_OCDB_ROOT/OCDB");
  simulator.SetSpecificStorage("GRP/GRP/Data",
			       Form("local://%s",gSystem->pwd()));
 
  simulator.SetRunHLT("default"); // In case we do not have ancored production

  TStopwatch timer;
  timer.Start();
  simulator.Run(nev);
  timer.Stop();
  timer.Print();
}
开发者ID:alisw,项目名称:AliRoot,代码行数:29,代码来源:sim.C

示例4: 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;
}
开发者ID:xcheung,项目名称:AliPYTHIA,代码行数:34,代码来源:sim.C

示例5: 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) ;  
}
开发者ID:ktf,项目名称:AliRoot,代码行数:15,代码来源:AliEMCALDecalibrate.C

示例6: makeSDigit

void makeSDigit(Int_t run=117048,
                const char *fname="/alice/data/2010/LHC10b/000117048/raw/10000117048041.30.root")
{
  AliSimulation sim;
  //AliLog::SetGlobalDebugLevel(1);
  AliLog::SetModuleDebugLevel("STEER",1);
  AliCDBManager *cdbm = AliCDBManager::Instance();
  cdbm->SetRun(run);
  cdbm->SetDefaultStorage("local://$ALIROOT_OCDB_ROOT/OCDB");     
  //cdbm->SetDefaultStorage("raw://");     
  cdbm->SetSpecificStorage("GRP/GRP/Data",Form("local://%s","$ALICE_ROOT/test/rawmerge"));  
  sim.SetMakeSDigits("ITS TPC");
  sim.SetNumberOfEvents(10000);
  sim.ConvertRaw2SDigits(fname);
  return;
}
开发者ID:alisw,项目名称:AliRoot,代码行数:16,代码来源:makeSDigit.C

示例7: sim

void sim(Int_t nev=1) {

  gSystem->Load("liblhapdf");
  gSystem->Load("libEGPythia6");
  gSystem->Load("libpythia6");
  gSystem->Load("libAliPythia6");
  gSystem->Load("libhijing");
  gSystem->Load("libTHijing");
  gSystem->Load("libgeant321");

  if (gSystem->Getenv("EVENT"))
   nev = atoi(gSystem->Getenv("EVENT")) ;   
  
  AliSimulation simulator;
  simulator.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL FMD ZDC PMD T0 VZERO");
  simulator.SetMakeDigitsFromHits("ITS TPC");
  simulator.SetWriteRawData("ALL","raw.root",kTRUE);

  simulator.SetDefaultStorage("local:///cvmfs/alice-ocdb.cern.ch/calibration/MC/Ideal");
  //simulator.SetDefaultStorage(Form("local://%s/OCDB", gSystem->pwd()));
  simulator.SetSpecificStorage("GRP/GRP/Data",
			       Form("local://%s",gSystem->pwd()));
  
  simulator.SetRunQA("ALL:ALL") ; 
  
  simulator.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;

  for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
    simulator.SetQACycles((AliQAv1::DETECTORINDEX_t)det, nev+1) ;
  }
  
  TStopwatch timer;
  timer.Start();
  simulator.Run(nev);
  timer.Stop();
  timer.Print();
}
开发者ID:cvmfs,项目名称:parrot-test,代码行数:37,代码来源:sim.C

示例8: Sim

void Sim(const Int_t nevents=10,
	 const Int_t debLevel=0)
{
  //make simulation of MC events and merging
  //with previouly reconstructed Digits from 
  //raw event. We assume they are in dir "Bg"

  AliPHOSSimParam * phosSimParam = AliPHOSSimParam::GetInstance() ;

  AliLog::SetGlobalDebugLevel(debLevel);
  AliSimulation sim;
  sim.SetMakeSDigits("PHOS") ;
  sim.SetMakeDigits("PHOS") ;
//  sim.SetMakeDigitsFromHits("ITS TPC");
//  sim.SetMakeTrigger("PHOS");
  //Set path to reconstricted raw digits
  //and set number of simulated events per one raw
  sim.MergeWith("Bg/galice.root",1) ;
  phosSimParam->SetStreamDigits(1) ; //Mark this stream as digits and not SDigits

  sim.Run(nevents);


}
开发者ID:alisw,项目名称:AliRoot,代码行数:24,代码来源:Sim.C

示例9: sim

void sim(Int_t nev=1) {

  gSystem->Exec(" rm itsSegmentations.root ");
  AliSimulation simulator;
  //  simulator.SetMakeSDigits("");

  //  simulator.SetMakeDigits("");

  simulator.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  simulator.SetSpecificStorage("GRP/GRP/Data",
			       Form("local://%s",gSystem->pwd()));
  simulator.SetSpecificStorage("ITS/Align/Data",
			       Form("local://%s",gSystem->pwd()));
  simulator.SetSpecificStorage("ITS/Calib/SimuParam",
			       Form("local://%s",gSystem->pwd()));
  simulator.SetRunHLT("");
  simulator.SetRunQA(":");

  TStopwatch timer;
  timer.Start();
  simulator.Run(nev);
  timer.Stop();
  timer.Print();
}
开发者ID:shahor02,项目名称:FT2,代码行数:24,代码来源:sim.C

示例10: sim

void sim(Int_t nev=1) {
  AliSimulation simu;
  simu.SetMakeSDigits("TRD TOF PHOS HMPID  EMCAL MUON FMD PMD T0 ZDC VZERO");
  simu.SetMakeDigits ("TRD TOF PHOS HMPID  EMCAL MUON FMD PMD T0 ZDC VZERO");
  simu.SetMakeDigitsFromHits("ITS TPC");
  simu.SetWriteRawData("ALL","raw.root",kTRUE);
  simu.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  simu.SetSpecificStorage("GRP/GRP/Data",
			  Form("local://%s",gSystem->pwd()));

  simu.SetRunQA("ALL:ALL") ; 
  simu.SetQARefDefaultStorage("local://$ALICE_ROOT/OCDB") ;

  for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
    simu.SetQACycles(det, 2) ;
  }
  
  TStopwatch timer;
  timer.Start();
  simu.Run(nev);
  WriteXsection();
  timer.Stop();
  timer.Print();
}
开发者ID:ktf,项目名称:AliRoot,代码行数:24,代码来源:sim.C

示例11: sim_hlt_tpc


//.........这里部分代码省略.........
      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();
}
开发者ID:alisw,项目名称:AliRoot,代码行数:101,代码来源:sim-hlt-tpc.C

示例12: sim

void sim(Int_t nev=3,Int_t runnumber) {
	
	gSystem->Exec(" rm itsSegmentations.root ");
	
	
	AliSimulation simulator;
	simulator.SetMakeSDigits("");
	simulator.SetMakeDigitsFromHits("");
	simulator.SetRunNumber(runnumber);
	//
	simulator.SetDefaultStorage("raw://");
	simulator.SetSpecificStorage("GRP/*/*","alien://folder=/alice/data/2010/OCDB");
	
	
	simulator.SetSpecificStorage("ITS/Align/Data", "alien://folder=/alice/simulation/LS1_upgrade/Ideal");
	simulator.SetSpecificStorage("ITS/Calib/RecoParam", "alien://folder=/alice/simulation/LS1_upgrade/Ideal");
	simulator.SetSpecificStorage("ITS/Calib/SimuParam", "alien://folder=/alice/simulation/LS1_upgrade/Ideal");
	simulator.SetDefaultStorage("alien://folder=/alice/data/2010/OCDB");
	simulator.SetSpecificStorage("MUON/Align/Data","alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/");
	simulator.SetSpecificStorage("TPC/Align/Data", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/");
	simulator.SetSpecificStorage("TPC/Calib/ClusterParam", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/");
	simulator.SetSpecificStorage("TPC/Calib/RecoParam", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual/");
	simulator.SetSpecificStorage("TPC/Calib/TimeGain", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/");
	simulator.SetSpecificStorage("TPC/Calib/AltroConfig", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/");
	simulator.SetSpecificStorage("TPC/Calib/TimeDrift", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/");
	simulator.SetSpecificStorage("TPC/Calib/Correction", "alien://folder=/alice/simulation/2008/v4-15-Release/Ideal/");
	simulator.Print("");
	
	//
	// Vertex and Mag.field from OCDB
	//
	simulator.UseVertexFromCDB();
	simulator.UseMagFieldFromGRP();
	simulator.SetRunHLT("");
	simulator.SetRunQA(":");
	//
	
	// The rest
	
	//
	
	printf("Before simulator.Run(nev);\n");
	simulator.Run(nev);
	printf("After simulator.Run(nev);\n");
}
开发者ID:alisw,项目名称:AliRoot,代码行数:45,代码来源:sim.C


注:本文中的AliSimulation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。