Example #1
0
void THSRooFit::SetDataWeight(){
  if(!fInWeights) return;
  if(fInWeights->GetSpeciesID(fWeightName)<0) return;
  RooArgList setWeights;
  RooRealVar wvar(fWeightName,fWeightName,0);
  setWeights.add(wvar);
  setWeights.Print();
  RooDataSet wData("weights","weights",setWeights) ;

  //Loop over the weights find the entry for the event ID
  for(Int_t ev=0;ev<fData->numEntries();ev++){
    const RooArgSet* vars=fData->get(ev);
    fInWeights->GetEntryBinarySearch((Long64_t)vars->getRealValue(fIDBranchName));
    // wvar.setVal(fInWeights->GetWeight(fWeightName));
    wvar.setVal(fInWeights->GetWeight(fWeightName));
    wData.add(setWeights);
  }
  wData.Print();
  ((RooDataSet*)fData)->merge(&wData);
  fData->Print();
  RooDataSet* tmpData=0;
  tmpData=new RooDataSet(TString("Weight_")+fWeightName+fData->GetName(),fData->GetTitle(),(RooDataSet*)fData,*fData->get(),0,fWeightName);
  fData->SetName("Empty");fData->reset();fData=0;
  fData=tmpData;
  fData->Print();
  if(ftoWS) fWS->import(*fData); //import if told to
  else if(!(fDataBins))fWS->import(*fData); //or no databins to confuse it 
}
Example #2
0
void CubeSlideEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
{
    if (!slideRotations.empty()) {
        glEnable(GL_CULL_FACE);
        glCullFace(GL_FRONT);
        paintSlideCube(mask, region, data);
        glCullFace(GL_BACK);
        paintSlideCube(mask, region, data);
        glDisable(GL_CULL_FACE);

        if (dontSlidePanels) {
            foreach (EffectWindow * w, panels) {
                WindowPaintData wData(w);
                effects->paintWindow(w, 0, infiniteRegion(), wData);
            }
        }
Example #3
0
 foreach (EffectWindow * w, stickyWindows) {
     WindowPaintData wData(w);
     effects->paintWindow(w, 0, infiniteRegion(), wData);
 }