FairRoot/PandaRoot
runLumiPixel4bNoiseTrkFilter.C
Go to the documentation of this file.
1 int runLumiPixel4bNoiseTrkFilter(const int nEvents=100000, const int startEvent=0, TString storePath="tmpOutput", const int verboseLevel=0, const double mom=1.5)
2 {
3 // ========================================================================
4 // Input Track file
5  TString TrkFile = storePath+"/Lumi_Track_";
6  TrkFile += startEvent;
7  TrkFile += ".root";
8 
9  // Output file
10  TString outFile = storePath+"/Lumi_TrackNoiseSuppressed_";
11  outFile += startEvent;
12  outFile += ".root";
13 
14  std::cout << "TrackInFile: " << TrkFile.Data()<< std::endl;
15  std::cout << "TrackOutFile: " << outFile.Data()<< std::endl;
16 
17  // ----- Reconstruction run -------------------------------------------
18  FairRunAna *fRun= new FairRunAna();
19  fRun->SetInputFile(TrkFile);
20  fRun->SetOutputFile(outFile);
21  // ------------------------------------------------------------------------
22 
23  // ======================================
24  // ====== Noise hits Track Filter ======
25  // ======================================
26  Double_t fpBeam = mom;
27  // TString dir = "TMVAweights_noise_hits/weights_";//trained on samples where noise produced in 1 readout frame
28  TString dir = "TMVAweights_noise_hits/weights_3fr_mom";//trained on samples where noise produced in 3 readout frames
29  if(fabs(fpBeam-1.5)<0.1) dir+="_1_5/";
30  else
31  if(fabs(fpBeam-15)<0.1) dir+="_15/";
32  else
33  cout<<"!! Attention! There is no trained TMVA method for momentum "<<mom<<end;
34 
36  lmdfilt->SetVerbose(verboseLevel);
37  fRun->AddTask(lmdfilt);
38  // ----- Intialise and run --------------------------------------------
39  fRun->Init();
40  fRun->Run(0,nEvents);
41  cout<<"fRun->Run(0, "<<nEvents<<") was done!"<<endl;
42  // ------------------------------------------------------------------------
43  return 0;
44 }
int verboseLevel
Definition: Lars/runMvdSim.C:7
TString outFile
Definition: hit_dirc.C:17
Int_t startEvent
TString storePath
Double_t mom
Definition: plot_dirc.C:14
FairRunAna * fRun
Definition: hit_dirc.C:58
Double_t
Int_t nEvents
Definition: hit_dirc.C:11
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
int runLumiPixel4bNoiseTrkFilter(const int nEvents=100000, const int startEvent=0, TString storePath="tmpOutput", const int verboseLevel=0, const double mom=1.5)