本文整理汇总了C++中TMap::FindObject方法的典型用法代码示例。如果您正苦于以下问题:C++ TMap::FindObject方法的具体用法?C++ TMap::FindObject怎么用?C++ TMap::FindObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TMap
的用法示例。
在下文中一共展示了TMap::FindObject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: r3ball
void r3ball(Int_t nEvents = 1,
TMap& fDetList,
TString Target = "LeadTarget",
Bool_t fVis = kFALSE,
TString fMC = "TGeant3",
TString fGenerator = "box",
Bool_t fUserPList = kFALSE,
Bool_t fR3BMagnet = kTRUE,
Bool_t fCalifaHitFinder = kFALSE,
Bool_t fStarTrackHitFinder = kFALSE,
Double_t fMeasCurrent = 2000.,
TString OutFile = "r3bsim.root",
TString ParFile = "r3bpar.root",
TString InFile = "evt_gen.dat",
double energy1, double energy2)
{
TString dir = getenv("VMCWORKDIR");
TString r3bdir = dir + "/macros";
TString r3b_geomdir = dir + "/geometry";
gSystem->Setenv("GEOMPATH",r3b_geomdir.Data());
TString r3b_confdir = dir + "gconfig";
gSystem->Setenv("CONFIG_DIR",r3b_confdir.Data());
// In general, the following parts need not be touched
// ========================================================================
// ---- Debug option -------------------------------------------------
gDebug = 0;
// ------------------------------------------------------------------------
// ----- Timer --------------------------------------------------------
TStopwatch timer;
timer.Start();
// ------------------------------------------------------------------------
// ----- Create simulation run ----------------------------------------
FairRunSim* run = new FairRunSim();
run->SetName(fMC.Data()); // Transport engine
run->SetOutputFile(OutFile.Data()); // Output file
FairRuntimeDb* rtdb = run->GetRuntimeDb();
FairLogger::GetLogger()->SetLogScreenLevel("DEBUG");
// R3B Special Physics List in G4 case
if ( (fUserPList == kTRUE ) &&
(fMC.CompareTo("TGeant4") == 0)
){
run->SetUserConfig("g4R3bConfig.C");
run->SetUserCuts("SetCuts.C");
}
// ----- Create media -------------------------------------------------
run->SetMaterials("media_r3b.geo"); // Materials
// Magnetic field map type
Int_t fFieldMap = 0;
// Global Transformations
//- Two ways for a Volume Rotation are supported
//-- 1) Global Rotation (Euler Angles definition)
//-- This represent the composition of : first a rotation about Z axis with
//-- angle phi, then a rotation with theta about the rotated X axis, and
//-- finally a rotation with psi about the new Z axis.
Double_t phi,theta,psi;
//-- 2) Rotation in Ref. Frame of the Volume
//-- Rotation is Using Local Ref. Frame axis angles
Double_t thetaX,thetaY,thetaZ;
//- Global Translation Lab. frame.
Double_t tx,ty,tz;
// ----- Create R3B geometry --------------------------------------------
//R3B Cave definition
FairModule* cave= new R3BCave("CAVE");
cave->SetGeometryFileName("r3b_cave.geo");
run->AddModule(cave);
//R3B Target definition
if (fDetList.FindObject("TARGET") ) {
R3BModule* target= new R3BTarget(Target.Data());
target->SetGeometryFileName(((TObjString*)fDetList.GetValue("TARGET"))->GetString().Data());
run->AddModule(target);
}
//R3B SiTracker Cooling definition
if (fDetList.FindObject("VACVESSELCOOL") ) {
R3BModule* vesselcool= new R3BVacVesselCool(Target.Data());
vesselcool->SetGeometryFileName(((TObjString*)fDetList.GetValue("VACVESSELCOOL"))->GetString().Data());
//.........这里部分代码省略.........