bool ClassificationData::removeLastSample(){ if( totalNumSamples == 0 ){ warningLog << "removeLastSample() - Failed to remove sample, the training dataset is empty!" << std::endl; return false; } return removeSample( totalNumSamples-1 ); }
void SampleView::setupMainConnections(){ // Pop-up add sample dialog when add sample button clicked. connect(addSampleButton_, SIGNAL(clicked()), this, SLOT(addNewSampleDialog())); // Remove selected sample. Slot function will determine which sample is selected. connect(removeSampleButton_, SIGNAL(clicked()), this, SLOT(removeSample())); // When the user selects a different sample from the list (and thus the model), the QDataWidgetMapper will need to know the new index. connect(sampleListView_->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), modelToWidgetMapper_, SLOT(setCurrentModelIndex(QModelIndex))); // Updates the sample name within the model as the user changes the name within the widget. connect(nameEdit_, SIGNAL(textEdited(QString)), this, SLOT(updateSampleName(QString))); // Updates the sample chemical symbol within the model as the user changes the symbol within the widget. connect(chemEdit_, SIGNAL(textEdited(QString)), this, SLOT(updateSampleChemSymbol(QString))); }
void comp7to10() { initSamples("comp7to10"); setOutputDirectory("DelphesV07toV10"); int nbins; float low,high; TString var,xtitle; doOverflowAddition(true); doRatio_=false; setStackMode(false,false,false); //stack,norm,label override stackSignal_=false; selection_ = "(1)"; //no cuts! nbins=40; low=0; high=1000; var="MET"; xtitle="MET (GeV)"; // if (plotsToMake.Contains("all")||plotsToMake.Contains("001")) drawPlots(var,nbins,low,high,xtitle,"Events", "MET",0,"GeV"); nbins=40; low=0; high=2000; var="HT"; xtitle="HT (GeV)"; // if (plotsToMake.Contains("all")||plotsToMake.Contains("001")) drawPlots(var,nbins,low,high,xtitle,"Events", "HT",0,"GeV"); nbins=10; low=0; high=10; var="njets40"; xtitle=var; // if (plotsToMake.Contains("all")||plotsToMake.Contains("001")) drawPlots(var,nbins,low,high,xtitle,"Events", "njets40",0,"GeV"); //nbjets is not trivial to plot removeSample("tt-4p-0-600-v1510_14TEV_v10"); //plot only v07 savePlots_=false; nbins=4; low=0; high=4; var="nbjets40tight"; xtitle=var; // if (plotsToMake.Contains("all")||plotsToMake.Contains("002")) drawPlots(var,nbins,low,high,xtitle,"Events", var,0,""); TH1D* bjets_v07=(TH1D*) totalsm->Clone("bjets_v07"); addSample("tt-4p-0-600-v1510_14TEV_v10",kBlue,"v10 tt"); removeSample("tt-4p-0-600-v1510_14TEV_v07"); //plot only v10 var="nbjets40medium"; xtitle=var; // if (plotsToMake.Contains("all")||plotsToMake.Contains("002")) drawPlots(var,nbins,low,high,xtitle,"Events", var,0,""); TH1D* bjets_v10=(TH1D*) totalsm->Clone("bjets_v10"); renewCanvas(); bjets_v07->SetLineColor(kRed); bjets_v10->SetLineColor(kBlue); bjets_v10->Draw("e hist"); bjets_v07->Draw("e hist same"); thecanvas->SaveAs("DelphesV07toV10/bjets.pdf"); cout<<"Fraction of events in 0 b-tag bin (v07) = "<<bjets_v07->GetBinContent(1) / bjets_v07->Integral()<<endl; cout<<"Fraction of events in 0 b-tag bin (v10) = "<<bjets_v10->GetBinContent(1) / bjets_v10->Integral()<<endl; savePlots_=true; }
VrmlNodeTextureSample::~VrmlNodeTextureSample() { delete[] pix; removeSample(this); }