24 TString
output(
const char*, std::string&,
const char*);
25 TString
output(
const char*, std::string&, std::string&,
const char*);
41 configBlockIO ( cfg );
42 configBlockHist( cfg );
43 configBlockFit ( cfg );
44 configBlockSpecific( cfg );
59 readVector ( cfg.
read<std::string>(
"corrHistNames" ), corrHistNameList_ );
60 readLabels ( cfg.
read<std::string>(
"corrAxesLabels"), corrAxesLabelList_);
61 readVector ( cfg.
read<std::string>(
"effHistNames" ), effHistNameList_ );
62 readLabels ( cfg.
read<std::string>(
"effAxesLabels" ), effAxesLabelList_ );
63 readVector ( cfg.
read<std::string>(
"cmpObjectLabels"), cmpObjLabelList_ );
66 std::cerr <<
"ERROR during reading of config file" << std::endl;
67 std::cerr <<
" misspelled variables in cfg ?" << std::endl;
68 std::cerr <<
" [--called in configBlockSpecific--]" << std::endl;
76 TString buffer(
output(pre, name, post) );
77 buffer.Remove(buffer.Last(
'.'), buffer.Length());
89 TString buffer( name );
90 if( ((TString)buffer(buffer.Last(
'_')+1, buffer.Length())).IsDigit() )
91 buffer.Remove(buffer.Last(
'_'), buffer.Length());
92 buffer.Remove(0, buffer.Last (
'_')+1);
93 TString
output( writeTo_.c_str() );
103 std::vector<TObjArray> effSampleList;
104 loadHistograms(effHistNameList_, effSampleList);
106 TCanvas *canv =
new TCanvas(
"canv",
"histograms", 600, 600);
107 setCanvasStyle( *canv );
117 for(
unsigned int jdx=0; jdx<effHistNameList_.size()/2; ++jdx){
118 TPostScript psFile(
output(
"/inspectMatch_", effHistNameList_[2*jdx],
"eps"), 113);
121 TLegend* leg =
new TLegend(legXLeft_,legYLower_,legXRight_,legYUpper_);
122 setLegendStyle( *leg );
127 std::vector<TObjArray>::const_iterator
hist = effSampleList.begin();
128 for(
unsigned int idx=0; hist!=effSampleList.end(); ++
hist, ++idx){
129 TH1F& href = *((TH1F*)(*hist)[2*jdx]);
130 TH1F& hcmp = *((TH1F*)(*hist)[2*jdx+1]);
131 setHistStyles( hcmp, jdx, idx );
135 char xstring[100], ystring[100];
136 if( idx<effAxesLabelList_.size() )
137 sprintf(xstring, effAxesLabelList_[jdx].c_str(), cmpObjLabelList_[1].c_str());
138 sprintf(ystring,
"match^{%s}/match^{%s}", cmpObjLabelList_[0].c_str(), cmpObjLabelList_[1].c_str());
139 hcmp.GetXaxis()->SetTitle( xstring );
140 hcmp.GetYaxis()->SetTitle( ystring );
141 hcmp.SetMinimum(0.85*hcmp.GetMinimum());
142 hcmp.SetMaximum(1.25*hcmp.GetMaximum());
143 divideHistograms(hcmp, href, 1);
147 divideHistograms(hcmp, href, 1);
150 leg->AddEntry( &hcmp, legend( idx ).c_str(),
"PL" );
164 std::vector<TObjArray> corrSampleList;
165 loadHistograms(corrHistNameList_, corrSampleList);
167 TCanvas *canv =
new TCanvas(
"canv",
"histograms", 600, 600);
168 setCanvasStyle( *canv );
177 for(
unsigned int jdx=0; jdx<corrHistNameList_.size(); ++jdx){
182 std::vector<TObjArray>::const_iterator
hist = corrSampleList.begin();
183 for(
unsigned int idx=0; hist!=corrSampleList.end(); ++
hist, ++idx){
184 TLegend* leg =
new TLegend(legXLeft_,legYLower_,legXRight_,legYUpper_);
185 setLegendStyle( *leg );
187 TPostScript psFile(
output(
"/inspectCorrel_", corrHistNameList_[jdx], outputLabelList_[idx],
"eps"), 113);
190 TH2F& hcmp = *((TH2F*)(*hist)[jdx]);
191 hcmp.SetLineColor ( histColor_[idx] );
192 hcmp.SetFillColor ( histColor_[idx] );
193 hcmp.SetMarkerColor( histColor_[idx] );
194 char xstring[100], ystring[100];
195 if( jdx<corrAxesLabelList_.size() ){
196 sprintf(xstring, corrAxesLabelList_[jdx].c_str(), cmpObjLabelList_[0].c_str() );
197 sprintf(ystring, corrAxesLabelList_[jdx].c_str(), cmpObjLabelList_[1].c_str() );
199 setAxesStyle( hcmp, xstring, ystring );
200 leg->AddEntry( &hcmp, legend( idx ).c_str(),
"FL" );
213 int main(
int argc,
char* argv[])
216 gStyle->SetOptStat( 0 );
217 gStyle->SetOptFit ( 0 );
219 gStyle->SetStatColor(0);
220 gStyle->SetStatBorderSize(0);
221 gStyle->SetStatX(0.93);
222 gStyle->SetStatY(0.93);
223 gStyle->SetStatW(0.18);
224 gStyle->SetStatH(0.18);
228 <<
" Missing argument" << std::endl;
236 if( !strcmp(plots.
writeAs().c_str(),
"ps") ){
240 }
else if( !strcmp(plots.
writeAs().c_str(),
"eps") ){
246 <<
" Unknown file format requested: "
247 << plots.
writeAs() << std::endl;
253 std::cout <<
"works " <<
"thanx and GoodBye " << std::endl;
void configBlockSpecific(ConfigFile &)
T read(const std::string &key) const
std::vector< std::string > effHistNameList_
def main
— Main —############################
void readVector(std::string s, std::vector< T > &vec)
std::vector< std::string > effAxesLabelList_
TString output(const char *, std::string &, const char *)
virtual void readConfig(std::string)
std::vector< std::string > corrHistNameList_
void fillTargetHistograms()
void loadHistograms(std::vector< std::string > &, std::vector< TObjArray > &)
std::vector< std::string > corrAxesLabelList_
boost::shared_ptr< edm::ProcessDesc > readConfig(const std::string &config)
std::vector< std::string > cmpObjLabelList_