FairRoot/PandaRoot
Functions | Variables
sim_ftof_stof.C File Reference

Go to the source code of this file.

Functions

timer Start ()
 
gROOT Macro ("$VMCWORKDIR/gconfig/rootlogon.C")
 
gSystem Load ("libFtof")
 
fRun SetBeamMom (BeamMomentum)
 
fRun SetName ("TGeant3")
 
fRun SetOutputFile ("test.root")
 
fRun SetMaterials ("media_pnd.geo")
 
Cave SetGeometryFileName ("cave.geo")
 
fRun AddModule (Cave)
 
FTof SetGeometryFileName ("ftofwall+stof.root")
 
fRun AddModule (FTof)
 
Fts SetGeometryFileName ("fts.geo")
 
fRun AddModule (Fts)
 
fRun SetGenerator (primGen)
 
boxGen SetPRange (.2, 7.)
 
boxGen SetPhiRange (0., 360.)
 
boxGen SetThetaRange (0., 15.)
 
boxGen SetXYZ (0., 0., 0.)
 
primGen AddGenerator (boxGen)
 
fRun SetField (fField)
 
fRun SetStoreTraj (kTRUE)
 
fRun Init ()
 
 if (fField)
 
fieldPar setInputVersion (fRun->GetRunId(), 1)
 
fieldPar setChanged ()
 
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)
 
 exit (0)
 

Variables

 gDebug =0
 
FairRunSim * fRun = new FairRunSim()
 
TString inFile3 = "pbarC_3_GeV.root"
 
double BeamMomentum = 15
 
FairModule * Cave = new PndCave("CAVE")
 
FairDetector * FTof = new PndFtof("FTOF",kTRUE)
 
FairDetector * Fts = new PndFts("FTS", kTRUE)
 
FairPrimaryGenerator * primGen = new FairPrimaryGenerator()
 
PndBoxGeneratorboxGen = new PndBoxGenerator(13, 10)
 
PndMultiFieldfField = new PndMultiField("FULL")
 
FairRuntimeDb * rtdb =fRun->GetRuntimeDb()
 
PndMultiFieldParfieldPar = (PndMultiFieldPar*) rtdb->getContainer("PndMultiFieldPar")
 
Bool_t kParameterMerged =kTRUE
 
FairParRootFileIo * output =new FairParRootFileIo(kParameterMerged)
 
Int_t nEvents = 100
 
Double_t rtime = timer.RealTime()
 
Double_t ctime = timer.CpuTime()
 

Function Documentation

primGen AddGenerator ( boxGen  )
fRun AddModule ( Cave  )
fRun AddModule ( FTof  )
fRun AddModule ( Fts  )
exit ( )
if ( fField  )

Definition at line 104 of file sim_ftof_stof.C.

References PndMultiFieldPar::SetParameters().

PndMultiField * fField
Definition: sim_ftof_stof.C:88
void SetParameters(FairField *field)
PndMultiFieldPar * fieldPar
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 ( "libFtof"  )
gROOT Macro ( "$VMCWORKDIR/gconfig/rootlogon.C )
output open ( "simparams.root"  )
rtdb print ( )
printf ( RealTime = %f seconds)
fRun Run ( nEvents  )
rtdb saveOutput ( )
fRun SetBeamMom ( BeamMomentum  )
fieldPar setChanged ( )
fRun SetField ( fField  )
fRun SetGenerator ( primGen  )
Cave SetGeometryFileName ( "cave.geo"  )
FTof SetGeometryFileName ( "ftofwall+stof.root"  )
Fts SetGeometryFileName ( "fts.geo"  )
fieldPar setInputVersion ( fRun->  GetRunId(),
 
)
fRun SetMaterials ( "media_pnd.geo"  )
fRun SetName ( "TGeant3"  )
rtdb setOutput ( output  )
fRun SetOutputFile ( "test.root"  )
boxGen SetPhiRange ( 0.  ,
360.   
)
boxGen SetPRange ( 2,
7.   
)
fRun SetStoreTraj ( kTRUE  )
boxGen SetThetaRange ( 0.  ,
15.   
)
boxGen SetXYZ ( 0.  ,
0.  ,
0.   
)
timer Start ( )
timer Stop ( )

Variable Documentation

BeamMomentum = 15
PndBoxGenerator* boxGen = new PndBoxGenerator(13, 10)

Definition at line 77 of file sim_ftof_stof.C.

FairModule* Cave = new PndCave("CAVE")

Definition at line 38 of file sim_ftof_stof.C.

Double_t ctime = timer.CpuTime()

Definition at line 125 of file sim_ftof_stof.C.

PndMultiField* fField = new PndMultiField("FULL")

Definition at line 88 of file sim_ftof_stof.C.

PndMultiFieldPar* fieldPar = (PndMultiFieldPar*) rtdb->getContainer("PndMultiFieldPar")

Definition at line 103 of file sim_ftof_stof.C.

delete fRun = new FairRunSim()

Definition at line 13 of file sim_ftof_stof.C.

FairDetector* FTof = new PndFtof("FTOF",kTRUE)

Definition at line 52 of file sim_ftof_stof.C.

FairDetector* Fts = new PndFts("FTS", kTRUE)
gDebug =0

Definition at line 6 of file sim_ftof_stof.C.

TString inFile3 = "pbarC_3_GeV.root"

Definition at line 16 of file sim_ftof_stof.C.

Bool_t kParameterMerged =kTRUE

Definition at line 108 of file sim_ftof_stof.C.

Int_t nEvents = 100

Definition at line 119 of file sim_ftof_stof.C.

FairParRootFileIo* output =new FairParRootFileIo(kParameterMerged)

Definition at line 109 of file sim_ftof_stof.C.

FairPrimaryGenerator* primGen = new FairPrimaryGenerator()

Definition at line 66 of file sim_ftof_stof.C.

FairRuntimeDb* rtdb =fRun->GetRuntimeDb()

Definition at line 101 of file sim_ftof_stof.C.

Double_t rtime = timer.RealTime()

Definition at line 124 of file sim_ftof_stof.C.