FairRoot/PandaRoot
Functions | Variables
sim_hypGe.C File Reference

Go to the source code of this file.

Functions

timer Start ()
 
gROOT Macro ("$VMCWORKDIR/gconfig/rootlogon.C")
 
gSystem Load ("libHypGe")
 
fRun SetName ("TGeant4")
 
fRun SetOutputFile ("sim_hypGe_BgUrqmd2.root")
 
fRun SetMaterials ("media_pnd.geo")
 
Cave SetGeometryFileName ("pndcave.geo")
 
fRun AddModule (Cave)
 
HypGe SetPathGeo (nam.Data())
 
HypGe SetGeometryFileName ("HPGeCluster.root")
 
fRun AddModule (HypGe)
 
fRun SetGenerator (primGen)
 
boxGen SetPRange (0.007, 0.008)
 
boxGen SetPhiRange (0., 360.)
 
boxGen SetThetaRange (120., 180.)
 
boxGen SetCosTheta ()
 
boxGen SetXYZ (0., 0.,-76.)
 
primGen AddGenerator (boxGen)
 
fRun SetStoreTraj (kTRUE)
 
fRun Init ()
 
output open ("simparams.root")
 
rtdb setOutput (output)
 
rtdb saveOutput ()
 
rtdb print ()
 
fRun Run (nEvents)
 
timer Stop ()
 
 printf ("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
 

Variables

 gDebug =0
 
FairRunSim * fRun = new FairRunSim()
 
Int_t nEvents = 2000
 
TString inFile ="/d/panda02/urqmd_smm/pbarC_3_GeV.root"
 
FairModule * Cave = new PndCave("CAVE")
 
PndHypGeHypGe = new PndHypGe("HYPGE",kTRUE)
 
TString nam = gSystem->Getenv("VMCWORKDIR")
 
FairPrimaryGenerator * primGen = new FairPrimaryGenerator()
 
PndBoxGeneratorboxGen = new PndBoxGenerator(22, 1)
 
FairRuntimeDb * rtdb =fRun->GetRuntimeDb()
 
Bool_t kParameterMerged =kTRUE
 
FairParRootFileIo * output =new FairParRootFileIo(kParameterMerged)
 
Double_t rtime = timer.RealTime()
 
Double_t ctime = timer.CpuTime()
 

Function Documentation

primGen AddGenerator ( boxGen  )
fRun AddModule ( Cave  )
fRun AddModule ( HypGe  )
fRun Init ( )

Initialize the session

Definition at line 20 of file NHitsPerEvent.C.

21 {
22  TFile* f = new TFile("2014-10-27-00-06-02_50_MHz_Filtered_PosCorrected_Event.root", "READ");
23  t = (TTree*)f->Get("pndsim");
24 // t->AddFriend("pndsim", "2014-10-27-00-06-02_50_MHz_Filtered_PosCorrected_Residuals.root");
25 // t->AddFriend("pndsim", "2014-10-27-00-06-02_50_MHz_Filtered_PosCorrected_Track.root");
26 // t->AddFriend("pndsim", "2014-10-27-00-06-02_50_MHz_Filtered_TimeCorrectedSorted_Event.root");
27  t->StartViewer();
28 
29  t->SetBranchAddress("MVDHitsPixelPosCorrected", &mvdHitArray);
30 // t->SetBranchAddress("MvdProjectedHit", &mvdProjectedArray);
31 // t->SetBranchAddress("MvdTrack", &trackArray);
32 
33  gHitPoints->SetLineColor(kRed);
34  gHitPoints->SetMarkerStyle(2);
35  gHitPoints->SetMarkerColor(kRed);
36 
37  gProjections->SetLineColor(kBlue);
38  gProjections->SetMarkerStyle(5);
39  gProjections->SetMarkerColor(kBlue);
40 
41 
42 // mg->Add(gProjections, "Projected");
43  mg->Add(gHitPoints, "Hits");
44  t->GetEntry(0);
45 }
TMultiGraph * mg
Definition: NHitsPerEvent.C:17
TGraph * gHitPoints
Definition: NHitsPerEvent.C:15
TClonesArray * mvdHitArray
Definition: NHitsPerEvent.C:12
TFile * f
Definition: bump_analys.C:12
TTree * t
Definition: NHitsPerEvent.C:11
TGraph * gProjections
Definition: NHitsPerEvent.C:16
gSystem Load ( "libHypGe"  )
gROOT Macro ( "$VMCWORKDIR/gconfig/rootlogon.C )
output open ( "simparams.root"  )
rtdb print ( )
printf ( RealTime = %f seconds)
fRun Run ( nEvents  )
rtdb saveOutput ( )
boxGen SetCosTheta ( )
fRun SetGenerator ( primGen  )
Cave SetGeometryFileName ( "pndcave.geo"  )
HypGe SetGeometryFileName ( "HPGeCluster.root"  )
fRun SetMaterials ( "media_pnd.geo"  )
fRun SetName ( "TGeant4"  )
rtdb setOutput ( output  )
fRun SetOutputFile ( "sim_hypGe_BgUrqmd2.root"  )
HypGe SetPathGeo ( nam.  Data())
boxGen SetPhiRange ( 0.  ,
360.   
)
boxGen SetPRange ( 0.  007,
0.  008 
)
fRun SetStoreTraj ( kTRUE  )
boxGen SetThetaRange ( 120.  ,
180.   
)
boxGen SetXYZ ( 0.  ,
0.  ,
76. 
)
timer Start ( )
timer Stop ( )

Variable Documentation

PndBoxGenerator* boxGen = new PndBoxGenerator(22, 1)

Definition at line 81 of file sim_hypGe.C.

FairModule* Cave = new PndCave("CAVE")

Definition at line 43 of file sim_hypGe.C.

Double_t ctime = timer.CpuTime()

Definition at line 151 of file sim_hypGe.C.

FairRunSim* fRun = new FairRunSim()

Definition at line 14 of file sim_hypGe.C.

gDebug =0

Definition at line 6 of file sim_hypGe.C.

PndHypGe* HypGe = new PndHypGe("HYPGE",kTRUE)
TString inFile ="/d/panda02/urqmd_smm/pbarC_3_GeV.root"

Definition at line 18 of file sim_hypGe.C.

Bool_t kParameterMerged =kTRUE

Definition at line 133 of file sim_hypGe.C.

TString nam = gSystem->Getenv("VMCWORKDIR")
Int_t nEvents = 2000

Definition at line 17 of file sim_hypGe.C.

FairParRootFileIo* output =new FairParRootFileIo(kParameterMerged)

Definition at line 136 of file sim_hypGe.C.

FairPrimaryGenerator* primGen = new FairPrimaryGenerator()

Definition at line 72 of file sim_hypGe.C.

FairRuntimeDb* rtdb =fRun->GetRuntimeDb()

Definition at line 132 of file sim_hypGe.C.

Double_t rtime = timer.RealTime()

Definition at line 150 of file sim_hypGe.C.