FairRoot/PandaRoot
Functions
ana_jpsi_task.C File Reference

Go to the source code of this file.

Functions

int ana_jpsi_task (TString Fname="test", int nevts=0, double pbarmom=6.232069)
 

Function Documentation

int ana_jpsi_task ( TString  Fname = "test",
int  nevts = 0,
double  pbarmom = 6.232069 
)

Definition at line 1 of file ana_jpsi_task.C.

References RhoCalculationTools::ForceConstantBz(), fRun, and TString.

2 {
3  // *** set this to your output path
4  TString OutPath = TString(gSystem->Getenv("VMCWORKDIR"))+"/macro/scrut/data";
5  TString OutFile = OutPath + "/" + Fname(Fname.Last('/')+1,Fname.Length()); // cut away input path
6 
7  // *** the output file for FairRunAna
8  TString InFile = Fname;
9  if (!InFile.EndsWith(".root")) InFile+="_fast.root";
10 
11  // *** initialization
12  FairLogger::GetLogger()->SetLogToFile(kFALSE);
13 
14  FairRunAna* fRun = new FairRunAna();
15  fRun->SetGenerateRunInfo(kFALSE);
16  fRun->SetInputFile(InFile);
17  fRun->SetOutputFile(OutFile+"_dummy.root");
18 
19  // *** take constant field; needed for PocaVtx
21 
22  // *** HERE OUR ANALYSIS TASK GOES!
23  PndScrutAnaTask *scrutTask = new PndScrutAnaTask(pbarmom, OutFile+"_taskana.root");
24  fRun->AddTask(scrutTask);
25 
26  // *** and run analysis
27  fRun->Init();
28  fRun->Run(0,nevts);
29  return 0;
30 }
static void ForceConstantBz(Double_t bz=0.)
Force a constant B field value for all positions.
FairRunAna * fRun
Definition: hit_dirc.C:58