FairRoot/PandaRoot
Functions | Variables
macro/detectors/mvd/Ralf/runsim.C File Reference

Go to the source code of this file.

Functions

timer Start ()
 
gROOT LoadMacro ("$VMCWORKDIR/gconfig/rootlogon.C")
 
 rootlogon ()
 
fRun SetName ("TGeant4")
 
fRun SetOutputFile (filename.c_str())
 
fRun SetMaterials ("media_pnd.geo")
 
Cave SetGeometryFileName ("pndcave.geo")
 
fRun AddModule (Cave)
 
Pipe SetGeometryFileName ("pipebeamtarget.geo")
 
fRun AddModule (Pipe)
 
Mvd SetGeometryFileName ("MVD_v1.0_woPassiveTraps.root")
 
Mvd SetVerboseLevel (verboseLevel)
 
fRun AddModule (Mvd)
 
fRun SetGenerator (primGen)
 
primGen AddGenerator (dpmGen)
 
fRun SetField (fField)
 
fRun SetStoreTraj (kFALSE)
 
fRun Init ()
 
output open ("../data/mvddpm6GeV_par.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
 
int verboseLevel = 0
 
Int_t nEvents = 10000
 
FairRunSim * fRun = new FairRunSim()
 
PndFileNameCreator namecreator ("../data/mvddpm6GeV.root")
 
std::string filename = namecreator.GetSimFileName()
 
FairModule * Cave = new PndCave("CAVE")
 
FairModule * Pipe = new PndPipe("PIPE")
 
PndMvdDetectorMvd = new PndMvdDetector("MVD", kTRUE)
 
FairPrimaryGenerator * primGen = new FairPrimaryGenerator()
 
PndDpmGeneratordpmGen = new PndDpmGenerator("../data/Events/dpm6GeV.root")
 
PndMultiFieldfField = new PndMultiField("FULL")
 
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 ( dpmGen  )
fRun AddModule ( Cave  )
fRun AddModule ( Pipe  )
fRun AddModule ( Mvd  )
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: bump_analys.C:13
TGraph * gProjections
Definition: NHitsPerEvent.C:16
gROOT LoadMacro ( "$VMCWORKDIR/gconfig/rootlogon.C )
output open ( "../data/mvddpm6GeV_par.root"  )
rtdb print ( )
printf ( RealTime = %f seconds)
rootlogon ( )

Definition at line 1 of file outdated/mpiTools/macros/emc/rootlogon.C.

2 {
3  gSystem->AddIncludePath("-I$VMCWORKDIR/emc");
4  gSystem->AddIncludePath("-I$VMCWORKDIR/emc/EmcDigi");
5  gSystem->AddIncludePath("-I$VMCWORKDIR/emc/EmcMC");
6  gSystem->AddIncludePath("-I$VMCWORKDIR/emc/EmcTools");
7  gSystem->AddIncludePath("-I$VMCWORKDIR/emc/EmcReco");
8  gSystem->AddIncludePath("-I$VMCWORKDIR/emc/EmcData");
9  gSystem->AddIncludePath("-I$VMCWORKDIR/pnddata");
10  gSystem->AddIncludePath("-I$VMCWORKDIR/base");
11  gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
12  basiclibs();
13 
14  gSystem->Load("libDpmEvtGen.so");
15  gSystem->Load("libGeoBase");
16  gSystem->Load("libParBase");
17  gSystem->Load("libBase");
18  gSystem->Load("libTrkBase");
19  gSystem->Load("libPndData");
20  gSystem->Load("libField");
21  gSystem->Load("libPassive");
22  gSystem->Load("libGen");
23  gSystem->Load("libPGen");
24  gSystem->Load("libEmc");
25 
26  delete gRandom;
27  gRandom=new TRandom3(0);
28 }
basiclibs()
fRun Run ( nEvents  )
rtdb saveOutput ( )
fRun SetField ( fField  )
fRun SetGenerator ( primGen  )
Cave SetGeometryFileName ( "pndcave.geo"  )
Pipe SetGeometryFileName ( "pipebeamtarget.geo"  )
Mvd SetGeometryFileName ( "MVD_v1.0_woPassiveTraps.root"  )
fRun SetMaterials ( "media_pnd.geo"  )
fRun SetName ( "TGeant4"  )
rtdb setOutput ( output  )
fRun SetOutputFile ( filename.  c_str())
fRun SetStoreTraj ( kFALSE  )
Mvd SetVerboseLevel ( verboseLevel  )
timer Start ( )
timer Stop ( )

Variable Documentation

FairModule* Cave = new PndCave("CAVE")

Definition at line 35 of file macro/detectors/mvd/Ralf/runsim.C.

Double_t ctime = timer.CpuTime()

Definition at line 179 of file macro/detectors/mvd/Ralf/runsim.C.

PndDpmGenerator* dpmGen = new PndDpmGenerator("../data/Events/dpm6GeV.root")
PndMultiField* fField = new PndMultiField("FULL")

Definition at line 135 of file macro/detectors/mvd/Ralf/runsim.C.

std::string filename = namecreator.GetSimFileName()

Definition at line 24 of file macro/detectors/mvd/Ralf/runsim.C.

FairRunSim* fRun = new FairRunSim()

Definition at line 14 of file macro/detectors/mvd/Ralf/runsim.C.

gDebug =0

Definition at line 6 of file macro/detectors/mvd/Ralf/runsim.C.

Bool_t kParameterMerged =kTRUE

Definition at line 162 of file macro/detectors/mvd/Ralf/runsim.C.

PndMvdDetector* Mvd = new PndMvdDetector("MVD", kTRUE)

Definition at line 47 of file macro/detectors/mvd/Ralf/runsim.C.

PndFileNameCreator namecreator("../data/mvddpm6GeV.root")
Int_t nEvents = 10000

Definition at line 8 of file macro/detectors/mvd/Ralf/runsim.C.

FairParRootFileIo* output =new FairParRootFileIo(kParameterMerged)

Definition at line 163 of file macro/detectors/mvd/Ralf/runsim.C.

FairModule* Pipe = new PndPipe("PIPE")

Definition at line 43 of file macro/detectors/mvd/Ralf/runsim.C.

FairPrimaryGenerator* primGen = new FairPrimaryGenerator()

Definition at line 58 of file macro/detectors/mvd/Ralf/runsim.C.

FairRuntimeDb* rtdb =fRun->GetRuntimeDb()

Definition at line 161 of file macro/detectors/mvd/Ralf/runsim.C.

Double_t rtime = timer.RealTime()

Definition at line 178 of file macro/detectors/mvd/Ralf/runsim.C.

int verboseLevel = 0

Definition at line 7 of file macro/detectors/mvd/Ralf/runsim.C.