00001 00002 //______________________________________________________________________ 00003 // Draw QA histograms 00004 // - Output filename are automatically determined by 00005 // StEmbeddingQAMaker 00006 // - You don't need to put year, production and particlename. Those 00007 // are obtained from the embedding output filename 00008 // - 'outputDirectory' is the directory where the output figures 00009 // are printed. 00010 // - You can check the embedding output only by settting isEmbeddingOnly = kTRUE 00011 void drawEmbeddingQA( 00012 const TString outputDirectory = "./", 00013 const TString embeddingFile = "qa_embedding_2005_P07ie.root", 00014 const TString realDataFile = "qa_real_2005_P07ie.root", 00015 const Int_t geantid = 8, 00016 const Double_t ptmax = 5.0, // default is 5 GeV/c 00017 const Bool_t isEmbeddingOnly = kFALSE, 00018 const Int_t parentGeantId = 0 00019 ){ 00020 gROOT->Macro("${STAR}/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C"); 00021 gSystem->Load("StMiniMcEvent"); 00022 gSystem->Load("StEmbeddingUtilities"); 00023 00024 // Set relevant cut parameters here used in the base QA 00025 // The default parameters can be found in the constructor of StRoot/StEmbeddingUtilities/StEmbeddingQAUtilities.cxx 00026 // You should have consistent parameters in both doEmbeddingQAMaker.C and drawEmbeddingQA.C 00027 // Below are the examples how to change the parameters 00028 // All values used here are default ones 00029 // 00030 // NOTE: These are just used to print them out in the pdf, not really affect the real QA process 00031 const StEmbeddingQAUtilities* utility = StEmbeddingQAUtilities::instance() ; 00032 // utility->setPtMinCut(0.1); 00033 // utility->setPtMaxCut(10.0); 00034 // utility->setEtaCut(1.5); 00035 // utility->setNHitCut(10); 00036 // utility->setNHitToNPossCut(0.51); 00037 // utility->setDcaCut(3.0); 00038 // utility->setNSigmaCut(2.0); 00039 // utility->setRapidityCut(10.0); 00040 // utility->setZVertexCut(30.0); 00041 // // 00042 // // Default is no trigger cut, you can add multiple trigger id's like 00043 // utility->addTriggerIdCut(290001); 00044 // utility->addTriggerIdCut(290004); 00045 00046 00047 StEmbeddingQADraw* maker = new StEmbeddingQADraw(embeddingFile, realDataFile, geantid, isEmbeddingOnly); 00048 maker->setParentGeantId(parentGeantId) ; 00049 maker->init(); 00050 maker->setOutputDirectory(outputDirectory); 00051 00052 00053 // Flag for output figures (default is false) 00054 // maker->setPNGOn() ; // Print png file 00055 // maker->setGIFOn() ; // Print gif file 00056 // maker->setJPGOn() ; // Print jpg file 00057 // maker->setEPSOn() ; // Print eps file 00058 // maker->setPSOn() ; // Print ps file 00059 00060 // Set maximum pt to be drawn 00061 maker->setPtMax(ptmax) ; 00062 00063 // Draw all QA plots 00064 maker->draw(); 00065 00066 // or draw each QA 00067 // Event-wise QA 00068 // maker->drawEvent(); 00069 00070 // MC tracks 00071 // maker->drawMcTrack(); 00072 00073 // Reconstructed track compared with real data 00074 // Either 00075 // maker->drawTrack(); 00076 // or 00077 // maker->drawGeantId(); 00078 // maker->drawRapidity(); 00079 // maker->drawMomentum(); 00080 // maker->drawPt(); 00081 // maker->drawdEdx(); 00082 // maker->drawDca(); 00083 // maker->drawNHit(); 00084 00085 maker->finish() ; 00086 } 00087 00088 //______________________________________________________________________ 00089 // You need to put year, production and particlename 00090 // if you determine the output filename by hand in StEmbeddingQAMaker. 00091 // Please put the correct year, production and particleName since 00092 // those are printed in the legend for each QA, and are used 00093 // for the output figure name. 00094 void drawEmbeddingQA( 00095 const TString outputDirectory, 00096 const TString embeddingFile, 00097 const TString realDataFile, 00098 const Int_t year, 00099 const TString production, 00100 const Int_t geantid, 00101 const Double_t ptmax, 00102 const Bool_t isEmbeddingOnly = kFALSE, 00103 const Int_t parentgeantId = 0 00104 ){ 00105 gROOT->Macro("${STAR}/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C"); 00106 gSystem->Load("StMiniMcEvent"); 00107 gSystem->Load("StEmbeddingUtilities"); 00108 00109 StEmbeddingQADraw* maker = new StEmbeddingQADraw(embeddingFile, realDataFile, year, production, geantid, isEmbeddingOnly); 00110 // maker->setParentGeantId(parentGeantId) ; 00111 maker->init(); 00112 maker->setOutputDirectory(outputDirectory); 00113 00114 // Flag for output figures (default is false) 00115 // maker->setPNGOn() ; // Print png file 00116 // maker->setGIFOn() ; // Print gif file 00117 // maker->setJPGOn() ; // Print jpg file 00118 // maker->setEPSOn() ; // Print eps file 00119 // maker->setPSOn() ; // Print ps file 00120 00121 // Set maximum pt to be drawn 00122 maker->setPtMax(ptmax) ; 00123 00124 // Draw all QA plots 00125 maker->draw(); 00126 00127 // or draw each QA 00128 // Event-wise QA 00129 // maker->drawEvent(); 00130 00131 // MC tracks 00132 // maker->drawMcTrack(); 00133 00134 // Reconstructed track compared with real data 00135 // Either 00136 // maker->drawTrack(); 00137 // or 00138 // maker->drawGeantId(); 00139 // maker->drawRapidity(); 00140 // maker->drawMomentum(); 00141 // maker->drawPt(); 00142 // maker->drawdEdx(); 00143 // maker->drawDca(); 00144 // maker->drawNHit(); 00145 00146 maker->finish() ; 00147 } 00148 00149
1.5.9