Esempio n. 1
0
File: main.c Progetto: iamfil/wine
void DrawMines ( HDC hdc, HDC hMemDC, BOARD *p_board )
{
    HGDIOBJ hOldObj;
    unsigned col, row;
    hOldObj = SelectObject (hMemDC, p_board->hMinesBMP);

    for( row = 1; row <= p_board->rows; row++ ) {
      for( col = 1; col <= p_board->cols; col++ ) {
        DrawMine( hdc, hMemDC, p_board, col, row, FALSE );
      }
    }
    SelectObject( hMemDC, hOldObj );
}
Esempio n. 2
0
File: main.c Progetto: iamfil/wine
void PressBox( BOARD *p_board, unsigned col, unsigned row )
{
    HDC hdc;
    HGDIOBJ hOldObj;
    HDC hMemDC;

    hdc = GetDC( p_board->hWnd );
    hMemDC = CreateCompatibleDC( hdc );
    hOldObj = SelectObject (hMemDC, p_board->hMinesBMP);

    DrawMine( hdc, hMemDC, p_board, col, row, TRUE );

    SelectObject( hMemDC, hOldObj );
    DeleteDC( hMemDC );
    ReleaseDC( p_board->hWnd, hdc );
}
Esempio n. 3
0
void compTopValidation()
{
   gROOT->SetStyle("Plain");
   gStyle->SetOptStat(1);
   
   TString sel  = "tt";

   TCanvas *c= new TCanvas("c","c",10,10,800,600);
   c->Print(sel + "/" + sel + ".ps[");    

   DrawMine("dimu_TTBar", "die_TTBar", sel, "diL", "otherTop", c);
   DrawMine("dimu_TTBar", "die_TTBar", sel, "diL","Reco", c);
   DrawMine("dimu_TTBar", "die_TTBar", sel, "diL", "Gen", c);
   DrawMine("dimu_TTBar", "die_TTBar", sel, "diL", "Bkg", c);
   DrawMine("dimu_TTBar", "die_TTBar", sel, "diL", "topMass",c);
//   DrawMine("dimu_TTBar", "die_TTBar", sel, "diL", "Wmass", c);
   DrawMine("dimu_TTBar", "die_TTBar", sel, "diL", "allW_finalMT", c);

   DrawMine("mue_TTBar", "mue_TTBar", sel, "mue", "otherTop", c);
   DrawMine("mue_TTBar", "mue_TTBar", sel, "mue","Reco", c);
   DrawMine("mue_TTBar", "mue_TTBar", sel, "mue", "Gen", c);
   DrawMine("mue_TTBar", "mue_TTBar", sel, "mue", "Bkg", c);
   DrawMine("mue_TTBar", "mue_TTBar", sel, "mue", "topMass",c);
   DrawMine("mue_TTBar", "mue_TTBar", sel, "mue", "Wmass", c);
   DrawMine("mue_TTBar", "mue_TTBar", sel, "mue", "allW_finalMT", c);

   DrawMine("muhad_TTBar", "ehad_TTBar", sel, "Lhad", "otherTop", c);
   DrawMine("muhad_TTBar", "ehad_TTBar", sel, "Lhad","Reco", c);
   DrawMine("muhad_TTBar", "ehad_TTBar", sel, "Lhad", "Gen", c);
   DrawMine("muhad_TTBar", "ehad_TTBar", sel, "Lhad", "Bkg", c);
   DrawMine("muhad_TTBar", "ehad_TTBar", sel, "Lhad", "topMass",c);
//   DrawMine("muhad_TTBar", "ehad_TTBar", sel, "Lhad", "Wmass", c);
   DrawMine("muhad_TTBar", "ehad_TTBar", sel, "Lhad", "allW_finalMT", c);

   DrawMine("mutau_TTBar", "etau_TTBar", sel, "Ltau", "otherTop", c);
   DrawMine("mutau_TTBar", "etau_TTBar", sel, "Ltau","Reco", c);
   DrawMine("mutau_TTBar", "etau_TTBar", sel, "Ltau", "Gen", c);
   DrawMine("mutau_TTBar", "etau_TTBar", sel, "Ltau", "Bkg", c);
   DrawMine("mutau_TTBar", "etau_TTBar", sel, "Ltau", "topMass",c);
//   DrawMine("mutau_TTBar", "etau_TTBar", sel, "Ltau", "Wmass", c);
   DrawMine("mutau_TTBar", "etau_TTBar", sel, "Ltau", "allW_finalMT", c);

   DrawMine("disemitau_TTBar", "disemitau_TTBar", sel, "tauRest", "otherTop", c);
   DrawMine("disemitau_TTBar", "disemitau_TTBar", sel, "tauRest","Reco", c);
   DrawMine("disemitau_TTBar", "disemitau_TTBar", sel, "tauRest", "Gen", c);
   DrawMine("disemitau_TTBar", "disemitau_TTBar", sel, "tauRest", "Bkg", c);
   DrawMine("disemitau_TTBar", "disemitau_TTBar", sel, "tauRest", "topMass",c);
//   DrawMine("disemitau_TTBar", "disemitau_TTBar", sel, "tauRest", "Wmass", c);
   DrawMine("disemitau_TTBar", "disemitau_TTBar", sel, "tauRest", "allW_finalMT", c);

 
   c->Print(sel + "/" + sel + ".ps]");    

	sel  = "tchan";

   TCanvas *c2= new TCanvas("c2","c2",10,10,800,600);
   c2->Print(sel + "/" + sel + ".ps[");

   DrawMine("TChannel", "TChannel", sel, "TChan", "Reco", c2);
   DrawMine("TChannel", "TChannel", sel, "TChan", "Gen", c2);
   DrawMine("TChannel", "TChannel", sel, "TChan", "Bkg", c2);
   DrawMine("TChannel", "TChannel", sel, "TChan", "topMass",c2);
//   DrawMine("TChannel", "TChannel", sel, "TChan", "Wmass", c2);
   DrawMine("TChannel", "TChannel", sel, "TChan", "allW_finalMT", c2);


   DrawMine("TbarChannel", "TbarChannel", sel, "TbarChan", "Reco", c2);
   DrawMine("TbarChannel", "TbarChannel", sel, "TbarChan", "Gen", c2);
   DrawMine("TbarChannel", "TbarChannel", sel, "TbarChan", "Bkg", c2);
   DrawMine("TbarChannel", "TbarChannel", sel, "TbarChan", "topMass",c2);
//   DrawMine("TbarChannel", "TbarChannel", sel, "TbarChan", "Wmass", c2);
   DrawMine("TbarChannel", "TbarChannel", sel, "TbarChan", "allW_finalMT", c2);

   c2->Print(sel + "/" + sel + ".ps]");  


	sel =  "tWchan";
   TCanvas *c3= new TCanvas("c3","c3",10,10,800,600);
   c3->Print(sel + "/" + sel + ".ps[");

   DrawMine("TWChannel", "TWChannel", sel, "TWChan", "Reco", c3);
   DrawMine("TWChannel", "TWChannel", sel, "TWChan", "Gen", c3);
   DrawMine("TWChannel", "TWChannel", sel, "TWChan", "Bkg", c3);
   DrawMine("TWChannel", "TWChannel", sel, "TWChan", "topMass",c3);
//   DrawMine("TWChannel", "TWChannel", sel, "TWChan", "Wmass", c3);
   DrawMine("TWChannel", "TWChannel", sel, "TWChan", "allW_finalMT", c3);


   DrawMine("TbarWChannel", "TbarWChannel", sel, "TbarWChan", "Reco", c3);
   DrawMine("TbarWChannel", "TbarWChannel", sel, "TbarWChan", "Gen", c3);
   DrawMine("TbarWChannel", "TbarWChannel", sel, "TbarWChan", "Bkg", c3);
   DrawMine("TbarWChannel", "TbarWChannel", sel, "TbarWChan", "topMass",c3);
//   DrawMine("TbarWChannel", "TbarWChannel", sel, "TbarWChan", "Wmass", c3);
   DrawMine("TbarWChannel", "TbarWChannel", sel, "TbarWChan", "allW_finalMT", c3);

   c3->Print(sel + "/" + sel + ".ps]");  

	sel =  "qcd";
   TCanvas *c4= new TCanvas("c4","c4",10,10,800,600);
   c4->Print(sel + "/" + sel + ".ps[");
   DrawMine("QCD", "QCD", sel, "QCD", "Bkg", c4);
   DrawMine("QCD", "QCD", sel, "QCD", "topMass",c4);
//   DrawMine("QCD", "QCD", sel, "QCD", "Wmass", c4);
   DrawMine("QCD", "QCD", sel, "QCD", "allW_finalMT", c4);
   c4->Print(sel + "/" + sel + ".ps]");  

	sel =  "wjets";
   TCanvas *c5= new TCanvas("c5","c5",10,10,800,600);
   c5->Print(sel + "/" + sel + ".ps[");
   DrawMine("WJets", "WJets", sel, "WJets", "Bkg", c5);
   DrawMine("WJets", "WJets", sel, "WJets", "topMass",c5);
//   DrawMine("WJets", "WJets", sel, "WJets", "Wmass", c5);
   DrawMine("WJets", "WJets", sel, "WJets", "allW_finalMT", c5);
   c5->Print(sel + "/" + sel + ".ps]");

 	sel =  "dy";
   TCanvas *c6= new TCanvas("c6","c6",10,10,800,600);
   c6->Print(sel + "/" + sel + ".ps[");
   DrawMine("ZJets", "ZJets", sel, "ZJets", "Bkg", c6);
   DrawMine("ZJets", "ZJets", sel, "ZJets", "topMass",c6);
//   DrawMine("ZJets", "ZJets", sel, "ZJets", "Wmass", c6);
   DrawMine("ZJets", "ZJets", sel, "ZJets", "allW_finalMT", c6);
   c6->Print(sel + "/" + sel + ".ps]");

	sel =  "wdata";
   TCanvas *c7= new TCanvas("c7","c7",10,10,800,600);
   c7->Print(sel + "/" + sel + ".ps[");
   DrawMine("WTemplateDefFormat", "WTemplateDefFormat", sel, "WTemplateDefFormat", "Bkg", c7);
   DrawMine("WTemplateDefFormat", "WTemplateDefFormat", sel, "WTemplateDefFormat", "topMass",c7);
//   DrawMine("WTemplateDefFormat", "WTemplateDefFormat", sel, "WTemplateDefFormat", "Wmass", c7);
   DrawMine("WTemplateDefFormat", "WTemplateDefFormat", sel, "WTemplateDefFormat", "allW_finalMT", c7);
   c7->Print(sel + "/" + sel + ".ps]");

	sel =  "qcdele";
   TCanvas *c8= new TCanvas("c8","c8",10,10,800,600);
   c8->Print(sel + "/" + sel + ".ps[");
   DrawMine("QCDEle", "QCDEle", sel, "QCDEle", "Bkg", c8);
   DrawMine("QCDEle", "QCDEle", sel, "QCDEle", "topMass",c8);
//   DrawMine("QCDEle", "QCDEle", sel, "QCDEle", "Wmass", c8);
   DrawMine("QCDEle", "QCDEle", sel, "QCDEle", "allW_finalMT", c8);
   c8->Print(sel + "/" + sel + ".ps]");  


	sel =  "data";
   TCanvas *c9= new TCanvas("c9","c9",10,10,800,600);
   c9->Print(sel + "/" + sel + ".ps[");
   DrawMine("Data", "Data", sel, "Data", "Bkg", c9);
   DrawMine("Data", "Data", sel, "Data", "topMass",c9);
//   DrawMine("Data", "Data", sel, "Data", "Wmass", c9);
   DrawMine("Data", "Data", sel, "Data", "allW_finalMT", c9);
   c9->Print(sel + "/" + sel + ".ps]");  
/*	sel =  "comphep";
   TCanvas *c10= new TCanvas("c10","c10",10,10,800,600);
   c10->Print(sel + "/" + sel + ".ps[");
   DrawMine("powheg", "comphep", sel, "", "Reco", c10);
   DrawMine("powheg", "comphep", sel, "", "Gen", c10);
   DrawMine("powheg", "comphep", sel, "", "Bkg", c10);
   DrawMine("powheg", "comphep", sel, "", "both", c10);
   DrawMine("powheg", "comphep", sel, "", "topMass",c10);
//   DrawMine("powheg", "comphep", sel, "", "Wmass", c10);
   DrawMine("powheg", "comphep", sel, "", "allW_finalMT", c10);
   c10->Print(sel + "/" + sel + ".ps]"); 
	sel =  "wbdown";
   TCanvas *c11= new TCanvas("c11","c11",10,10,800,600);
   c11->Print(sel + "/" + sel + ".ps[");
   DrawMine("WTemplateDefFormat", "bDownWTemplateDefFormat", sel, "", "Bkg", c11);
   c11->Print(sel + "/" + sel + ".ps]"); 

	sel =  "wcdown";
   TCanvas *c12= new TCanvas("c12","c12",10,10,800,600);
   c12->Print(sel + "/" + sel + ".ps[");
   DrawMine("WTemplateDefFormat", "cDownWTemplateDefFormat", sel, "", "Bkg", c12);
   c12->Print(sel + "/" + sel + ".ps]");*/

	/*sel =  "unphys";
   TCanvas *c13= new TCanvas("c13","c13",10,10,800,600);
   c13->Print(sel + "/" + sel + ".ps[");
   DrawMine("unphys", "unphys", sel, "gL", "Reco", c13);
   DrawMine("unphys", "unphys", sel, "gL", "Gen", c13);
   DrawMine("unphys", "unphys", sel, "gL", "Bkg", c13);
   DrawMine("unphys", "unphys", sel, "gL", "both", c13);
   DrawMine("unphys", "unphys", sel, "gL", "topMass",c13);
//   DrawMine("unphys", "unphys", sel, "gL", "Wmass", c13);
   DrawMine("unphys", "unphys", sel, "gL", "def_finalMT", c13);
   c13->Print(sel + "/" + sel + ".ps]"); 

	sel =  "r";
   TCanvas *c14= new TCanvas("c14","c14",10,10,800,600);
   c14->Print(sel + "/" + sel + ".ps[");
   DrawMine("r", "r", sel, "gL", "Reco", c14);
   DrawMine("r", "r", sel, "gL", "Gen", c14);
   DrawMine("r", "r", sel, "gL", "Bkg", c14);
   DrawMine("r", "r", sel, "gL", "both", c14);
   DrawMine("r", "r", sel, "gL", "topMass",c14);
//   DrawMine("r", "r", sel, "gL", "Wmass", c14);
   DrawMine("r", "r", sel, "gL", "def_finalMT", c14);
   c14->Print(sel + "/" + sel + ".ps]"); 



	sel =  "sm";
   TCanvas *c15= new TCanvas("c15","c15",10,10,800,600);
   c15->Print(sel + "/" + sel + ".ps[");
   DrawMine("sm", "sm", sel, "gL", "Reco", c15);
   DrawMine("sm", "sm", sel, "gL", "Gen", c15);
   DrawMine("sm", "sm", sel, "gL", "Bkg", c15);
   DrawMine("sm", "sm", sel, "gL", "both", c15);
   DrawMine("sm", "sm", sel, "gL", "topMass",c15);
//   DrawMine("sm", "sm", sel, "gL", "Wmass", c15);
   DrawMine("sm", "sm", sel, "gL", "def_finalMT", c15);
   c15->Print(sel + "/" + sel + ".ps]"); 



	sel =  "t";
   TCanvas *c16= new TCanvas("c16","c16",10,10,800,600);
   c16->Print(sel + "/" + sel + ".ps[");
   DrawMine("t", "t", sel, "gL", "Reco", c16);
   DrawMine("t", "t", sel, "gL", "Gen", c16);
   DrawMine("t", "t", sel, "gL", "Bkg", c16);
   DrawMine("t", "t", sel, "gL", "both", c16);
   DrawMine("t", "t", sel, "gL", "topMass",c16);
//   DrawMine("t", "t", sel, "gL", "Wmass", c16);
   DrawMine("t", "t", sel, "gL", "def_finalMT", c16);
   c16->Print(sel + "/" + sel + ".ps]"); */
}