StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
doEmbeddingQAMaker.C
1 
2 //______________________________________________________________________
3 void doEmbeddingQAMaker(
4  const Int_t year = 2007,
5  const TString production = "P08ic",
6  const Char_t* inputFileList = "minimc.list",
7  const Char_t* outputFileName = "", // Put the filename if you want to give some specific name, otherwise leave it blank.
8  const Bool_t isSimulation = kTRUE,
9  const Float_t vzCut = 30.0,
10  const Int_t refMultMinCut = 0,
11  const Int_t refMultMaxCut = 1000,
12  const Float_t ptMaxCut = 10.0,
13  const Float_t ptMinCut = 0.1,
14  const Float_t etaMaxCut = 1.5,
15  const Float_t yMaxCut = 10.0
16 ){
17  const TString data = (isSimulation) ? "minimc tree" : "real data" ;
18  const TString title = "Embedding QA from " + data ;
19 
20  gBenchmark->Start(title);
21 
22  gROOT->Macro("${STAR}/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
23  gSystem->Load("StMiniMcEvent");
24  gSystem->Load("StEmbeddingUtilities");
25 
26  // Set relevant cut parameters here used in the base QA
27  // The default parameters can be found in the constructor of StRoot/StEmbeddingUtilities/StEmbeddingQAUtilities.cxx
28  // You should have consistent parameters in both doEmbeddingQAMaker.C and drawEmbeddingQA.C
29  // Below are the examples how to change the parameters
30  // All values used here are default ones
31  //
32  // NOTE: In order to keep backward compatibility, the functions
33  // StEmbeddingQA::setZVertexCut()
34  // StEmbeddingQA::setRapidityCut()
35  // StEmbeddingQA::addTriggerIdCut()
36  // were not removed. These functions can be still used instead of those from StEmbeddingQAUtilities.
37  //
39  utility->setPtMinCut(ptMinCut);
40  utility->setPtMaxCut(ptMaxCut);
41  utility->setEtaCut(etaMaxCut);
42  // utility->setNHitCut(10);
43  // utility->setNHitToNPossCut(0.51);
44  // utility->setDcaCut(3.0);
45  // utility->setNSigmaCut(2.0);
46  utility->setRapidityCut(yMaxCut);
47  utility->setRefMultMinCut(refMultMinCut);
48  utility->setRefMultMaxCut(refMultMaxCut);
49  utility->setZVertexCut(vzCut);
50 
51  // FIXME: the trigger ID selections has to be hard-coded below!!!
52  // Default is no trigger cut, you can add multiple trigger id's like
53  // utility->addTriggerIdCut(290001);
54  // utility->addTriggerIdCut(290004);
55  // FIXME: using BTof PID in selecting real data primary tracks (turn this on ONLY for checking the dE/dx match between data and MC)
56  // utility->setBTofPid(kTRUE);
57 
58  StEmbeddingQA* maker = new StEmbeddingQA(year, production, isSimulation);
59 
60  maker->book(outputFileName);
61  maker->run(inputFileList);
62  maker->end();
63 
64  gBenchmark->Stop(title);
65  gBenchmark->Show(title);
66  gBenchmark->Reset();
67 }
68 
69 //______________________________________________________________________
70 void doEmbeddingQA(
71  const Int_t year = 2007,
72  const TString production = "P08ic",
73  const TString inputFileList = "minimc.list"
74 ){
75  doEmbeddingQAMaker(year, production, inputFileList, "", kTRUE);
76 }
77 
78 //______________________________________________________________________
79 void doRealDataQA(
80  const Int_t year = 2007,
81  const TString production = "P08ic",
82  const Char_t* inputFileList = "MuDst.list"
83 ){
84  doEmbeddingQAMaker(year, production, inputFileList, "", kFALSE);
85 }
86 
87 //______________________________________________________________________
88 void doEmbeddingQAMakerOneFile(
89  const Int_t year = 2007,
90  const TString production = "P08ic",
91  const Char_t* inputFileName = "/star/institutions/lbl/hmasui/embedding/data/P08if/PiPlus_st_physics_8172100_raw_1020010.minimc.root",
92  const Char_t* outputFileName = "",
93  const Bool_t isSimulation = kTRUE,
94  const Float_t vzCut = 30.0,
95  const Int_t refMultMinCut = 0,
96  const Int_t refMultMaxCut = 1000
97 ){
98  gBenchmark->Start("Embedding QA from minimc tree");
99 
100  gROOT->Macro("${STAR}/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
101  gSystem->Load("StMiniMcEvent");
102  gSystem->Load("StEmbeddingUtilities");
103 
104  StEmbeddingQA* maker = new StEmbeddingQA(year, production, isSimulation);
105  maker->setZVertexCut(vzCut);
106  maker->setRefMultMinCut(refMultMinCut);
107  maker->setRefMultMaxCut(refMultMaxCut);
108 
109 // maker->setRapidityCut(1.0);
110 // maker->addTriggerIdCut(210020);
111 
112  maker->book(outputFileName);
113  maker->make(inputFileName, kTRUE);
114  maker->end();
115 
116  gBenchmark->Stop("Embedding QA from minimc tree");
117  gBenchmark->Show("Embedding QA from minimc tree");
118  gBenchmark->Reset();
119 }
120 
Float_t setPtMinCut(const Float_t val)
Set track and event selections, return new value.
Bool_t run(const TString inputFileList)
Either RunRealData or RunEmbedding according to the kIsSimulation flag.
Bool_t book(const TString outputFileName="")
Initialization.
Bool_t make(const TString inputFileName, const Bool_t isSimulation=kTRUE)
Either fillEmbedding or fillRealData according to the isSimulation flag.
static StEmbeddingQAUtilities * instance()
Get instance.
Bool_t end() const
Close output file.
void setZVertexCut(const Float_t vz)