StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
doMiniMcAnalyzer.C
1 
2 //______________________________________________________________________
3 void doMiniMcAnalyzer(
4  const Int_t year = 2007,
5  const TString production = "P08ic",
6  const TString particleName = "PiPlus",
7  const Char_t* inputFileList = "MuDst.P08ic.list",
8  const Char_t* outputFileName = "", // Put the filename if you want to give some specific name, otherwise leave it blank.
9  const Bool_t isSimulation = kTRUE
10 ){
11  TString data = (isSimulation) ? "minimc tree" : "real data" ;
12  TString title = "Embedding QA from " + data ;
13 
14  gBenchmark->Start(title);
15 
16  gROOT->Macro("${STAR}/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
17  gSystem->Load("StMiniMcEvent");
18  gSystem->Load("StMiniMcAnalyzer");
19 
20  StMiniMcAnalyzer* maker = new StMiniMcAnalyzer(year, production, particleName, isSimulation);
21  maker->SetDebug(1);
22  maker->Book(outputFileName);
23  maker->Run(inputFileList);
24  maker->End();
25 
26  gBenchmark->Stop(title);
27  gBenchmark->Show(title);
28  gBenchmark->Reset();
29 }
30 
31 //______________________________________________________________________
32 void doEmbeddingQA(
33  const Int_t year = 2007,
34  const TString production = "P08ic",
35  const TString particleName = "PiPlus",
36  const TString inputFileList = "minimc.PiPlus.list",
37 ){
38  doMiniMcAnalyzer(year, production, particleName, kTRUE, inputFileList, "");
39 }
40 
41 //______________________________________________________________________
42 void doRealDataQA(
43  const Int_t year = 2007,
44  const TString production = "P08ic",
45  const TString particleName = "PiPlus",
46  const Char_t* inputFileList = "MuDst.P08ic.list",
47 ){
48  doMiniMcAnalyzer(year, production, particleName, kFALSE, inputFileList, "");
49 }
50 
51 //______________________________________________________________________
52 void doMiniMcAnalyzerOneFile(
53  const Char_t* inputFileName = "/star/institutions/lbl/hmasui/embedding/data/P08if/PiPlus_st_physics_8172100_raw_1020010.minimc.root",
54  const Char_t* outputFileName = "ana_minimc.root"
55 ){
56  gBenchmark->Start("Embedding QA from minimc tree");
57 
58  gROOT->Macro("${STAR}/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
59  gSystem->Load("StMiniMcEvent");
60  gSystem->Load("StMiniMcAnalyzer");
61 
62  StMiniMcAnalyzer* maker = new StMiniMcAnalyzer();
63  maker->SetDebug(1);
64  maker->Book(outputFileName);
65  maker->Make(inputFileName, kTRUE);
66  maker->End();
67 
68  gBenchmark->Stop("Embedding QA from minimc tree");
69  gBenchmark->Show("Embedding QA from minimc tree");
70  gBenchmark->Reset();
71 }
72