ROOT logo
#ifndef ALICELOGO_C
#define ALICELOGO_C
#include <TGraph.h>
#include <TBox.h>
#include <TEllipse.h>
#include <TPad.h>
#include <TCanvas.h>
#include <TMath.h>
#include <TString.h>
#include <TImage.h>
#include <TH1.h>
#include <TLine.h>
#include <TColor.h>

/** 
 * Structure to draw the ALICE logo on a pad (canvas).  The logo and
 * text is drawn using ROOT primitives and the result is somewhat
 * scalable.
 *
 * Note, you can save the logo as a PNG, PDF, or SVG to include it in
 * some other document or the like.  
 *
 * How to use
 * 
 * @code 
 * {
 *   TH1* h = new TH1F("h", "h", 60, -3, 3);
 *   h->SetFillColor(kRed+1);
 *   h->SetFillStyle(3001);
 *   h->FillRandom("gaus");
 *   h->Draw();
 *   
 *   gROOT->LoadMacro("AliceLogo.C");
 *   AliceLogo* al = new AliceLogo();
 *   // al->Draw(0, .75, .4, .25, "preliminary");
 *   // al->Draw(0, .75, .4, .25, "performance");
 *   // al->Draw(0, .75, .4, .25, "","text l3 many particles");
 *   al->Draw(0, .75, .4, .25, "preliminary", "text l3 many particles");
 * }
 * @endcode
 *
 * There are many options for colours and options for preliminary,
 * performance and just the logo.
 *
 * The logo produced does not exactly match the logos found on the
 * ALICE web-site 
 *
 *   https://aliceinfo.cern.ch/Figure/alice_logo
 *
 * In particular, the 'C' was hard to get right.  However, the logo
 * does follow the charter as described in 
 * 
 *   http://aliweb.cern.ch/system/files/documents/charter/charte_A5_120628.pdf
 *
 * Use the static member function(s) AliceLogo::Check to see how well
 * this code reproduces the logos.  Note, you need the official logos
 * in PNG format for this.  Here's a list of places to get them:
 *
 * - https://aliceinfo.cern.ch/Figure/sites/aliceinfo.cern.ch.Figure/files/Figures/General/elopez/2012-Jul-04-Preliminary_Logo.png
 * - https://aliceinfo.cern.ch/Figure/sites/aliceinfo.cern.ch.Figure/files/Figures/General/elopez/2012-Jul-04-Performance_Logo.png
 * - https://aliceinfo.cern.ch/Figure/sites/aliceinfo.cern.ch.Figure/files/Figures/General/elopez/2012-Jul-04-4_Color_Logo_CB.png
 *
 * @author Christian Holm Christensen <cholm@nbi.dk>
 */
struct AliceLogo 
{
  /** 
   * Tags
   */
  enum ETag {
    kNone = 0, 
    kPreliminary, 
    kPerformance
  };
  /** 
   * Colour options 
   */
  enum {
    kBW          = 0,    // Black and white only 
    kText        = 0x1,  // Text is coloured dark-blue
    kL3          = 0x2,  // Colour L3 red
    kParticles   = 0x4,  // Particles coloured red
    kMany        = 0x8,  // Many particles in many colours
    kPad         = 0x10, // BAckground from pad 
    kReverse     = 0x20  // Text is white 
  };
  /**
   * Constructor 
   */
  AliceLogo(Bool_t debug=false)
    : fPad(0), 
      fAspect(1),
      fL3Thick(.05),
      fL3Height(.63), 
      fL3Width(0),
      fDebug(debug)
  {
    fRed    = TColor::GetColor(226,   0, 26);
    fYellow = TColor::GetColor(238, 125, 17);
    fPink   = TColor::GetColor(202,  71, 67);
    fBlue   = TColor::GetColor(40,   58, 68);
  }
  /** 
   * Parse a string with colour options 
   * 
   * @param what 
   * 
   * @return Colour flags 
   */
  static UInt_t ParseColors(const TString& what)
  {
    UInt_t col = AliceLogo::kBW;
    if (what.Contains("l3",    TString::kIgnoreCase)) col |= kL3;
    if (what.Contains("text",  TString::kIgnoreCase)) col |= kText;
    if (what.Contains("part",  TString::kIgnoreCase)) col |= kParticles;
    if (what.Contains("many",  TString::kIgnoreCase)) col |= kMany;
    if (what.Contains("pad",   TString::kIgnoreCase)) col |= kPad;
    if (what.Contains("rever", TString::kIgnoreCase)) col |= kReverse;
    return col;
  }
  /** 
   * Parse a tag string 
   * 
   * @param what String to parse 
   * 
   * @return Tag 
   */
  static UShort_t ParseTag(const TString& what)
  {
    UShort_t tag = AliceLogo::kNone;
    if      (what.BeginsWith("pre", TString::kIgnoreCase)) tag = kPreliminary;
    else if (what.BeginsWith("per", TString::kIgnoreCase)) tag = kPerformance;
    return tag;
  }
  /**
   * Draw everything 
   * 
   * @param p      Pad to draw in
   * @param x      Starting X position
   * @param y      Starting Y position
   * @param h      Relative height 
   * @param tag    Tag 
   * @param colors Color options
   */
  void Draw(TVirtualPad* p, Double_t x=.77, Double_t y=.35, Double_t h=.25, 
	    const TString& tag="", const TString& colors="")
  {
    Draw(p, x, y, h, ParseTag(tag), ParseColors(colors));
  }
  /** 
   * Draw everything 
   * 
   * @param p      Pad to draw in 
   * @param x      Starting X position
   * @param y      Starting Y position
   * @param h      Relative height 
   * @param tag    Tag 
   * @param color  Color options
   */
  void Draw(TVirtualPad* p, Double_t x, Double_t y, Double_t h,
	    UShort_t tag, UInt_t color)
  {
    if (!p) p = gPad;
    if (!p) { 
      Error("AliceLogo::Draw", "No pad to draw in");
      return;
    }
    if (fDebug) 
      Printf("Pad to draw logo in: %s", p->GetName());
    // p->SetFixedAspectRatio(true);
    Int_t    pH  = p->YtoPixel(0);
    if (fDebug) {
      Int_t    pW  = p->XtoPixel(1);
      Double_t pA  = Double_t(pW) / pH;
      Printf("pA=%d/%d=%lf", pW, pH, pA);
    }


    if (tag == 0) { 
      fAspect   =  1437. / 1933. ;
      fL3Height = .75;
      fL3Thick  *= 1.1;
    }
    else { 
      fAspect   = 1835. / 2272. ;
      fL3Height = .63;
    }
    fL3Width   = fL3Height / fAspect;
    Int_t    hP   = Int_t(h * pH+.5); // Height in pixels 
    Int_t    wP   = Int_t(fAspect * hP + .5); // Width in pixels 
    Int_t    xP   = p->XtoPixel(x); // X pos in pixels 
    Int_t    rP   = xP + wP; // Right in pixels; 
    Double_t topX = p->PixeltoX(rP);
    Double_t topY = y + h; // p->PixeltoY(tP); // y + h;
    if (fDebug){
      Int_t    yP   = p->YtoPixel(y); // X pos in pixels 
      Int_t    tP   = yP - hP; // Top in pixels
      Printf("(x,y)=(%d,%d) hP=%d wP=%d xP=%d yP=%d rP=%d tP=%d", 
	     xP, yP, hP, wP, xP, yP, rP, tP);
    }
    if (topX > 1 || topY > 1) { 
      Warning("AliceLogo::Draw", "with (x,y)=(%f,%f) and h=%f -> top=(%f,%f)",
	      x, y, h, topX, topY);
      topX = TMath::Min(topX, 1.);
      topY = TMath::Min(topY, 1.);
    }

    p->cd();
    fPad = new TPad("logo", "logo", x, y, topX, topY);
    fPad->SetFixedAspectRatio(true);
    fPad->SetFillColor(fDebug ? kGreen-4 : 0);
    fPad->SetFillStyle(fDebug ? 4030     : 0);
    fPad->SetBorderSize(fDebug ? 1 : 0);
    fPad->SetBorderMode(fDebug ? 1 : 0);
    fPad->SetLineColor(fDebug ? kBlue+1 : 0);
    fPad->SetLineWidth(fDebug ? 1 : 0);
    fPad->SetTopMargin(0);
    fPad->SetBottomMargin(0);
    fPad->SetLeftMargin(0);
    fPad->SetRightMargin(0);
    fPad->Draw();
    if (fDebug)
      Printf("(x,y)=(%f,%f) (tx,ty)=(%f,%f) (x1,y1)=(%f,%f) (x2,y2)=(%f,%f)", 
	     x, y, topX, topY, GetX1(), GetY1(), GetX2(), GetY2());
    
    if (fDebug) {
      Int_t    ppH  = fPad->YtoPixel(0);
      Int_t    ppW  = fPad->XtoPixel(1);
      Double_t ppA  = Double_t(ppW) / ppH;
      Printf("ppA=%d/%d=%lf A=%lf",ppW, ppH, ppA, fAspect);      
      // Printf("ppA/A=%lf/%lf=%lf", ppA, fAspect, ppA/fAspect);
    }

    Int_t bg = (color & kPad) ? p->GetFillColor() : Int_t(kWhite);

    DrawL3(color, (color & kReverse && !(color & kL3) ? bg : kWhite));

    Int_t txtFg = kBlack;
    if (color & kText)
      txtFg = (color & kReverse ? kWhite : fBlue);
    DrawALICE(txtFg, bg);
    if      (tag == kPreliminary) DrawLabel(txtFg, bg, true);
    else if (tag == kPerformance) DrawLabel(txtFg, bg, false);
   
    p->cd();
  }
  /** 
   * Draw the L3 outline.  Note, this is put in a sub-pad of it's own. 
   * 
   * @param color Colour flags
   * @param bg    Background color 
   */
  void DrawL3(UInt_t color, Int_t bg)
  {
    printf("Drawing L3 image ");
    fPad->cd();
    Double_t       o = TMath::Max((1-fL3Width)/2,0.);
    TVirtualPad* pad = new TPad("l3","L3",o, 1-fL3Height, 
				TMath::Min(fL3Width+o,1.), 1);
    pad->SetFixedAspectRatio(true);
    pad->SetFillColor(fDebug ? kGreen-4 : 0);
    pad->SetFillStyle(fDebug ? 4030     : 0);
    pad->SetBorderSize(fDebug ? 1 : 0);
    pad->SetBorderMode(fDebug ? 1 : 0);
    pad->SetLineColor(fDebug ? kRed+1 : 0);
    pad->SetLineWidth(fDebug ? 1 : 0);
    pad->SetTopMargin(0);
    pad->SetBottomMargin(0);
    pad->SetLeftMargin(0);
    pad->SetRightMargin(0);
    pad->Draw();
    
    Int_t lcol = (color & kL3 ? fRed : kBlack);
    if (color & kReverse && lcol == kBlack) lcol = kWhite;

    Double_t dA = 2 * TMath::Pi() / 8;
    Double_t ro = .5 + .5 * (1 -  TMath::Cos(dA/2));
    Double_t ri = ro - 1. / fL3Height * fL3Thick;
    Double_t x0 = .5;
    Double_t y0 = .5;
    TGraph*  gi = new TGraph(9);
    TGraph*  go = new TGraph(9);
    gi->SetName("L3_inner");
    go->SetName("L3_outer");
    SetAttr(gi, gi, bg);
    SetAttr(go, go, lcol);
    for (Int_t i = 0; i < 9; i++) { 
      Double_t a = (i + .5) * dA;
      go->SetPoint(i, x0 + ro * TMath::Cos(a), y0 + ro * TMath::Sin(a));
      gi->SetPoint(i, x0 + ri * TMath::Cos(a), y0 + ri * TMath::Sin(a));
    }
    pad->cd();
    printf(".");
    go->Draw("lf same");
    printf(".");
    gi->Draw("lf same");

    Double_t len = .26;
    if (color & kMany) {
      Double_t w = 0.02;
      for (Int_t i = 0; i < 36; i++) {
	Int_t col = fYellow;
	switch (i) { 
	case 1: case 5: case 10: case 20: case 24: case 27: case 33: case 34:
	  col = fBlue; break;
	case 3: case 4: case 8: case 16: case 19: case 23: case 29: case 30: 
	case 32: 
	  col = fPink; break;
	case 9: case 12: case 14: case 18: case 25: case 28: case 35:
	  col = fRed; break;
	default:
	  break;
	}
	double l = len;
	switch (i) { 
	case 1: case 9: case 8: case 10: case 19: case 21: case 33:
	  l += 0.005; break; 
	case 2: case 7:  case 11: case 12: case 15: case 16: case 20: case 34:
	  l += 0.02;  break;
	case 3:  case 6: case 13: case 17: case 25: case 29:
	  l += 0.01;  break;
	case 23: case 27: case 28: 
	  l -= 0.005;
	default:      break;
	}

	printf(".");
	DrawSpoke(i * 360/36, w, l, col);
      }
    }
    else {
      Double_t w  = .015;
      Int_t col = (color & kParticles ? fRed : kBlack);
      if (bg != kWhite) col = kWhite;
      for (Int_t i = 0; i < 18; i++) {
	double l = len;
	switch (i) { 
	case 0: case 2:                     
	  break;
	case 1:  case 6:  case 8:         
	case 10: case 17:
	  l += .02; break;
	case 3: case 4: case 5: case 7: case 12: 
	  l += .01; break;
	case 15: 
	  l += .005; break;
	case 16:
	  l -= .005; break;
	default:
	  break;
	}
	printf(".");
	DrawSpoke(i * 360/18, w, l, col);
      }
    }
    fPad->cd();
    printf("\n");
  }
  /** 
   * Draw a spoke in the L3 outline. 
   * 
   * @param ang Rotation angle in degrees. 
   * @param w   Width
   * @param len Length of spoke 
   * @param fg  Foreground colour 
   */
  void DrawSpoke(Int_t ang, Double_t w, Double_t len, Int_t fg)
  {
    Double_t r1 = .12;

    Double_t xx = r1;
    Double_t yy = w/2;
    Double_t xl = r1+len;

    Double_t rad = TMath::Pi() / 180 * ang;
    Double_t xtl  = .5 + xx * TMath::Cos(rad) - yy * TMath::Sin(rad);
    Double_t ytl  = .5 + xx * TMath::Sin(rad) + yy * TMath::Cos(rad);
    Double_t xbl  = .5 + xx * TMath::Cos(rad) + yy * TMath::Sin(rad);
    Double_t ybl  = .5 + xx * TMath::Sin(rad) - yy * TMath::Cos(rad);
    Double_t xtr  = .5 + xl * TMath::Cos(rad) - yy * TMath::Sin(rad);
    Double_t ytr  = .5 + xl * TMath::Sin(rad) + yy * TMath::Cos(rad);
    Double_t xbr  = .5 + xl * TMath::Cos(rad) + yy * TMath::Sin(rad);
    Double_t ybr  = .5 + xl * TMath::Sin(rad) - yy * TMath::Cos(rad);

    TGraph* tri = new TGraph(4);
    SetAttr(tri, tri, fg);
    tri->SetName(Form("spoke_tr_%03d", ang));
    tri->SetPoint(0, 0.5,0.5);
    tri->SetPoint(3, 0.5,0.5);
    tri->SetPoint(1, xtl, ytl);
    tri->SetPoint(2, xbl, ybl);
    tri->Draw("same lf");

    TGraph* lne = new TGraph(4);
    SetAttr(lne, lne, fg);
    lne->SetName(Form("spoke_ln_%03d", ang));
    lne->SetPoint(0, xtl, ytl);
    lne->SetPoint(1, xbl, ybl);
    lne->SetPoint(2, xbr, ybr);
    lne->SetPoint(3, xtr, ytr);
    lne->SetPoint(4, xtl, ytl);
    lne->Draw("same lf");
    
  }
  /** 
   * Draw the text ALICE in a separate pad 
   * 
   */
  void DrawALICE(Int_t fg, Int_t bg)
  {
    printf("Drawing ALICE title ");
    fPad->cd();
    Double_t o  = TMath::Max((1-fL3Width)/2,0.);
    Double_t r  = fL3Width/2;
    Double_t t  = r*TMath::Sin(TMath::Pi()/8-.05);
    Double_t t2 = r*TMath::Sin(TMath::Pi()/8+.05);
    // Middle-bottom-left point is 
    Double_t mblX = o;
    Double_t mblY = (1-fL3Height/2) - t;
    // Bottom-left point is 
    Double_t blY = (1-fL3Height);
    Double_t blX = .5 - t2;
    // Slope
    Double_t a = (blY - mblY) / (blX - mblX);
    // Y is then, using y  = y1 + a (x - x1)
    Double_t b = mblY + a * (.5 - mblX);

    Double_t top = 1-fL3Height-fL3Thick;
    Double_t hh  = 2 * (top - b);
    Double_t bot = TMath::Max(top - hh,0.);
    TVirtualPad* pad = new TPad("alice", "alice", o, bot+.005, 
				TMath::Min(o+fL3Width,1.), top+.005);
    pad->SetFixedAspectRatio(true);
    pad->SetFillColor(fDebug ? kGreen-4 : 0);
    pad->SetFillStyle(fDebug ? 4030     : 0);
    pad->SetBorderSize(fDebug ? 1 : 0);
    pad->SetBorderMode(fDebug ? 1 : 0);
    pad->SetLineColor(fDebug ? kMagenta+1 : 0);
    pad->SetLineWidth(fDebug ? 1 : 0);
    pad->SetTopMargin(0);
    pad->SetBottomMargin(0);
    pad->SetLeftMargin(0);
    pad->SetRightMargin(0);
    pad->Draw();
    pad->cd();

    Double_t wp = pad->XtoPixel(1);
    Double_t hp = pad->YtoPixel(0);
    a           = hp / wp;
    
    Double_t w = .15;
    printf(".");
    DrawA(0,            0.01, w, a, fg, bg);
    printf(".");
    DrawL(.5 - 5.8*a*w, 0.01, w, a, fg);
    printf(".");
    DrawI(.5 - 1.5*a*w, 0.01, w, a, fg);
    printf(".");
    DrawC(.5 + 2.6*a*w, 0.00, /*w,*/ a, fg, bg);
    printf(".");
    DrawE(1  - 3.5*a*w, 0.01, w, a, fg);
    fPad->cd();

    printf("\n");
  }
  /** 
   * Draw the letter A 
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   * @param bg   Background colour
   */
  void DrawA(Double_t x, Double_t y, Double_t w, Double_t a,
	     Int_t fg, Int_t bg)
  {
    Double_t u = 4.5 * w;
    Double_t r = u / 2;
    TBox* b1 = new TBox(x, y, x + a * w, y + 1 - r);
    SetAttr(b1, b1, fg);
    b1->Draw();
    b1->DrawBox(x + (u-w) * a, y,         x + u * a, y + 1 - r);
    b1->DrawBox(x,             y+1-r-2*w, x + u * a,     y + 1 - r -w);
    TEllipse* a1 = new TEllipse(x+u*a/2, y+1-r-.01, (r-.005)*a, r, 0, 180);
    SetAttr(a1, a1, fg);
    a1->Draw("only");
    TEllipse* a2 = new TEllipse(x+u*a/2, y+1-r-.01, (r-w-.005)*a, r-w, 0, 180);
    SetAttr(a2, a2, bg);
    a2->Draw("only");

#if 0
    // To draw as lines - note line width does not scale 
    Int_t lw = w*gPad->YtoPixel(0);
    Double_t x1 = x+a*w/2;
    Double_t x2 = x+a*(u-w/2);
    Double_t y1 = y + 1 - r - 1.5*w;
    TLine*    l1 = new TLine(x1, y, x1, y+1-r);
    l1->SetLineWidth(lw);
    l1->SetLineColor(kBlue);
    l1->Draw();
    l1->DrawLine(x2, y,x2, y+1-r);
    l1->DrawLine(x1, y1,x2, y1);
    
    TEllipse* a3 = new TEllipse(x+u*a/2, y+1-r-.01, 
				(r-w/2-.005)*a, r-w/2, 0, 180);
    a3->SetFillStyle(0);
    a3->SetFillColor(0);
    // Int_t lw = w*gPad->YtoPixel(0);
    Printf("Setting line width to %d", lw);
    a3->SetLineWidth(lw);
    a3->SetLineColor(kBlue);
    a3->Draw("only");
#endif
  }
  /** 
   * Draw the letter L
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   */
  void DrawL(Double_t x, Double_t y, Double_t w, Double_t a, Int_t fg)
  {
    TBox* b1 = new TBox(x, y, x+3.1 * a * w, y + w);
    SetAttr(b1, b1, fg);
    b1->Draw();
    b1->DrawBox(x, y , x + a * w,y+.99);
  }
  /** 
   * Draw the letter I
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   */
  void DrawI(Double_t x, Double_t y, Double_t w, Double_t a, Int_t fg)
  {    
    TBox* b1 = new TBox(x, y, x+3 * a * w, y + w);
    SetAttr(b1, b1, fg);
    b1->Draw();
    b1->DrawBox(x+a*w,y,x+2*a*w,y+.99);
    b1->DrawBox(x,y+1-w,x+3*a*w,y+.99);
  }
  /** 
   * Draw the letter C
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   * @param bg   Background colour
   */
  void DrawC(Double_t x, Double_t y, Double_t a, Int_t fg, Int_t bg)
  {
    Int_t    nO   = 13;
    Double_t dx   = 0; 
    Double_t pO[] = { 
      /* 0 */  0.698245  +dx, 0.271355,
      /* 1 */  0.590204  +dx, 0.0755058,
      /* 2 */  0.424947  +dx, 0.00,
      /* 3 */  0.220343  +dx, 0.015668+.005,
      /* 4 */  0.0629551 +dx, 0.15668,
      /* 5 */  0.00786939+dx, 0.329027,
      /* 6 */  -0.005,        0.564046,
      /* 7 */  0.00786939+dx, 1-0.329027,
      /* 8 */  0.0629551 +dx, 1-0.15668,
      /* 9 */  0.220343  +dx, 1-0.015668-.005,
      /* 10 */ 0.424947  +dx, .99,
      /* 11 */ 0.590204  +dx, 1-0.0755058,
      /* 12 */ 0.6982450 +dx, 1-0.271355, 0 };
    TGraph* gO = new TGraph(nO);
    gO->SetName("c_ext");
    gO->SetLineColor(fDebug ? kGreen+1 : fg);
    gO->SetLineWidth(fDebug ? 1        : 0);
    gO->SetFillColor(fDebug ? kGreen+1 : fg);
    gO->SetFillStyle(fDebug ? 0 : 1001);
    for (Int_t i = 0; i < nO; i++) 
      gO->SetPoint(i, x+pO[2*i]*a,y+pO[2*i+1]);
    gO->Draw("fc same");
    Int_t    nI   = 11;
    Double_t pI[] = { 
      /* 0 */ 0.551869, 1-0.713617,
      /* 1 */ 0.481045, 1-0.821127,
      /* 2 */ 0.363004, 1-0.853799,
      /* 3 */ 0.213486, 1-0.783625,
      /* 4 */ 0.158508, 1-0.635277,
      /* 4 */ 0.158,    0.5, // 1-0.635277,
      /* 5 */ 0.158508, 0.635277,
      /* 6 */ 0.213486, 0.773625,
      /* 7 */ 0.363004, 0.853799,
      /* 8 */ 0.481045, 0.821127,
      /* 9 */ 0.551869, 0.713617, 0 };
    TGraph* gI = new TGraph(nI);
    gI->SetName("c_int");
    gI->SetLineColor(fDebug ? kGreen+1 : bg);
    gI->SetLineWidth(fDebug ? 1        : 0);
    gI->SetFillColor(fDebug ? kGreen+1 : bg);
    gI->SetFillStyle(fDebug ? 0 : 1001);
    for (Int_t i = 0; i < nI; i++) 
      gI->SetPoint(i, x+pI[2*i]*a,y+pI[2*i+1]);
    gI->Draw("fc same");


    TGraph* gC = new TGraph(5);
    gC->SetName("c_cut");
    SetAttr(gC, gC, bg);
    gC->SetPoint(0, gO->GetX()[0],    gO->GetY()[0]);
    gC->SetPoint(1, gI->GetX()[0],    gI->GetY()[0]);
    gC->SetPoint(2, gI->GetX()[nI-1], gI->GetY()[nI-1]);
    gC->SetPoint(3, gO->GetX()[nO-1], gO->GetY()[nO-1]);
    gC->SetPoint(4, gO->GetX()[0],    gO->GetY()[0]);
    gC->Draw("fl same");
  }
  /** 
   * Draw the letter E 
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   */
  void DrawE(Double_t x, Double_t y, Double_t w, Double_t a, Int_t fg)
  {
    Double_t u = 3.5;
    TBox* b1 = new TBox(x, y, x + a * w, y + .99);
    SetAttr(b1, b1, fg);
    b1->Draw();
    b1->DrawBox(x, y,            x + u*a*w,      y+w);
    b1->DrawBox(x, y+.99-w,      x + u*a*w,      y+.99);
    b1->DrawBox(x, y+.5-w/2+.02, x + (u-.1)*a*w, y+.5+w/2+.02);
  }
  /** 
   * Draw the letter F 
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   */
  void DrawF(Double_t x, Double_t y, Double_t w, Double_t a, Int_t fg)
  {
    Double_t u = 3.5;
    TBox* b1 = new TBox(x, y, x + a * w, y + .99);
    SetAttr(b1, b1, fg);
    b1->Draw();
    b1->DrawBox(x, y+.99-w,      x + u*a*w,      y+.99);
    b1->DrawBox(x, y+.5-w/2+.02, x + (u-.1)*a*w, y+.5+w/2+.02);
  }
  /** 
   * Draw the label text ("Preliminary" or "Performance") in it's own pad 
   * 
   * @param fg Foreground colour 
   * @param bg Background colour 
   * @param preliminary If true, draw preliminary, otherwise performance
   */
  void DrawLabel(Int_t fg, Int_t bg, bool preliminary=true)
  {
    printf("Drawing stamp ");
    fPad->cd();

    Double_t top = .08;
    Double_t bot = 0;
    TVirtualPad* pad = new TPad("label", "label", 0, bot, 1, top);
    pad->SetFixedAspectRatio(true);
    pad->SetFillColor(fDebug ? kGreen-4 : 0);
    pad->SetFillStyle(fDebug ? 4030     : 0);
    pad->SetBorderSize(fDebug ? 1 : 0);
    pad->SetBorderMode(fDebug ? 1 : 0);
    pad->SetLineColor(fDebug ? kCyan+2 : 0);
    pad->SetLineWidth(fDebug ? 1 : 0);
    pad->SetTopMargin(0);
    pad->SetBottomMargin(0);
    pad->SetLeftMargin(0);
    pad->SetRightMargin(0);
    pad->Draw();
    pad->cd();

    Double_t wp = pad->XtoPixel(1);
    Double_t hp = pad->YtoPixel(0);
    Double_t a  = hp / wp;
    
    Double_t w = .15;
    if (preliminary) {
      printf("."); DrawP(0,            0.01, w, a, fg, bg);
      printf("."); DrawR(6.3  * w * a, 0.01, w, a, fg, bg);
      printf("."); DrawE(13   * w * a, 0.01, w, a, fg);
      printf("."); DrawL(18.7 * w * a, 0.01, w, a, fg);
      printf("."); DrawI(23.3 * w * a, 0.01, w, a, fg);
      printf("."); DrawM(29   * w * a, 0.01, w, a, fg);
      printf("."); DrawI(37.2 * w * a, 0.01, w, a, fg);
      printf("."); DrawN(42.5 * w * a, 0.01, w, a, fg);
      printf("."); DrawA(49.4 * w * a, 0.01, w, a, fg, bg);
      printf("."); DrawR(56.4 * w * a, 0.01, w, a, fg, bg);
      printf("."); DrawY(62.3 * w * a, 0.01, w, a, fg);
    }
    else { 
      printf("."); DrawP(0,            0.01, w, a, fg, bg);
      printf("."); DrawE(6.3  * w * a, 0.01, w, a, fg);
      printf("."); DrawR(12   * w * a, 0.01, w, a, fg, bg);
      printf("."); DrawF(18.7 * w * a, 0.01, w, a, fg);
      printf("."); DrawO(24   * w * a, 0.01, w, a, fg, bg);
      printf("."); DrawR(30.7 * w * a, 0.01, w, a, fg, bg);
      printf("."); DrawM(37.5 * w * a, 0.01, w, a, fg);
      printf("."); DrawA(45.5 * w * a, 0.01, w, a, fg, bg);
      printf("."); DrawN(52.4 * w * a, 0.01, w, a, fg);
      printf("."); DrawC(58.7 * w * a, 0.01, /*w,*/ a, fg, bg);
      printf("."); DrawE(64.8 * w * a, 0.01, w, a, fg);
    }

    fPad->cd();
    printf("\n"); 
  }    
  /** 
   * Draw the letter O
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   * @param bg   Background colour
   */
  void DrawO(Double_t x, Double_t y, Double_t w, Double_t a, Int_t fg, Int_t bg)
  {
    Double_t fw = 4.8;

    TEllipse* a1 = new TEllipse(x+fw/2*a*w, y + .495, a*w*fw/2, .495, 0, 360);
    SetAttr(a1, a1, fg);
    a1->Draw("only");
    TEllipse* a2 = new TEllipse(x+fw/2*a*w, y + .495, a*w*(fw/2-1), .495-w);
    SetAttr(a2, a2, bg);
    a2->Draw("only");
  }
  /** 
   * Draw the letter P 
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   * @param bg   Background colour
   */
  void DrawP(Double_t x, Double_t y, Double_t w, Double_t a, Int_t fg, Int_t bg)
  {
    Double_t u  = 4.3 * w;
    Double_t r  = 4.3 * w / 2;

    TBox* b1 = new TBox(x, y, x + a * w, y + .99);
    SetAttr(b1, b1, fg);
    b1->Draw();
    b1->DrawBox(x + a * w, y + .99 - w, x + 2.5 * a * w, y + .99);
    b1->DrawBox(x + a * w, y + .99 - u, x + 2.5 * a * w, y + .99 - u + w);
    TEllipse* a1 = new TEllipse(x+2.5*a*w, y + .99 - r, a*r, r-.01, -90, 90);
    SetAttr(a1, a1, fg);
    a1->Draw("only");
    TEllipse* a2 = new TEllipse(x+2.5*a*w, y + .99 - r, a*(r-w), r-w-.01, 
				-90, 90);
    SetAttr(a2, a2, bg);
    a2->Draw("only");
  }
  /** 
   * Draw the letter R
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   * @param bg   Background colour
   */
  void DrawR(Double_t x, Double_t y, Double_t w, Double_t a, Int_t fg, Int_t bg)
  {
    DrawP(x, y, w, a, fg, bg);

    Double_t u   = 4.3 * w;
    Double_t fw  = 2.5 + 4.3 / 2;
    Double_t ang = 60 * TMath::Pi() / 180;
    Double_t o   = w / TMath::Sin(ang);

    TGraph* g = new TGraph(5);
    SetAttr(g, g, fg);
    // Top right
    g->SetPoint(0, x+a*(2*w+o), y+1-u+.01);
    // Top left 
    g->SetPoint(1, x+a*2*w,     y+1-u+.01);
    // Bottom left 
    g->SetPoint(2, x+a*(fw*w-o+.06), y);
    // Bottom right
    g->SetPoint(3, x+a*(fw*w+.06),     y);
    g->SetPoint(4, g->GetX()[0], g->GetY()[0]);
    g->Draw("same lf");
  }
  /** 
   * Draw the letter M
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   */
  void DrawM(Double_t x, Double_t y, Double_t w, Double_t a, Int_t fg) 
  {
    TBox* b1 = new TBox(x, y, x + a * w, y + 1);
    SetAttr(b1, b1, fg);
    b1->Draw();
    b1->DrawBox(x+4.8*a*w, y, x+5.8*a*w, y+1);
    
    Double_t ang = 28 * TMath::Pi() / 180;
    Double_t o = w / TMath::Sin(ang);

    TGraph* gl = new TGraph(7);
    SetAttr(gl, gl, fg);
    gl->SetPoint(0, x+a*w, y+1);
    gl->SetPoint(1, x+a*w, y+1-o);
    gl->SetPoint(2, x+a*w*(1+3.8/2), y+w);
    gl->SetPoint(3, x+a*w*4.8, y+1-o);
    gl->SetPoint(4, x+a*w*4.8, y+1);
    gl->SetPoint(5, x+a*w*(1+3.8/2), y+w+o);
    gl->SetPoint(6, x+a*w, y+1);
    gl->Draw("same lf");

  }
  /** 
   * Draw the letter N 
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   */
  void DrawN(Double_t x, Double_t y, Double_t w, Double_t a, Int_t fg) 
  {
    Double_t fw = 4.6;
    TBox* b1 = new TBox(x, y, x + a * w, y + 1);
    SetAttr(b1, b1, fg);
    b1->Draw();
    b1->DrawBox(x+a*w*(fw-1), y, x+a*w*(fw), y+1);
    
    Double_t ang = 28 * TMath::Pi() / 180;
    Double_t o = w / TMath::Sin(ang);

    TGraph* gl = new TGraph(5);
    gl->SetLineColor(fDebug ? kGreen+1 : fg);
    gl->SetLineWidth(fDebug ? 1        : 0);
    gl->SetFillColor(fDebug ? kGreen+1 : fg);
    gl->SetFillStyle(fDebug ? 0 : 1001);
    gl->SetPoint(0, x+a*w, y+1);
    gl->SetPoint(1, x+a*w, y+1-o);
    gl->SetPoint(2, x+a*w*(fw-1), y);
    gl->SetPoint(3, x+a*w*(fw-1), y+o);
    gl->SetPoint(4, x+a*w, y+1);
    gl->Draw("same lf");
  }
  /** 
   * Draw the letter Y
   * 
   * @param x    Base X coordinate 
   * @param y    Base Y coordinate 
   * @param w    Line width 
   * @param a    Aspect ratio of pad 
   * @param fg   Foreground colour
   */
  void DrawY(Double_t x, Double_t y, Double_t w, Double_t a, Int_t fg)
  {
    Double_t u  = 4 * w;
    Double_t fw = 5.5;

    TBox* b1 = new TBox(x+a*w*(fw/2-.5), y, x + a * w *(fw/2+.5), y + 1 - u);
    b1->SetLineColor(fDebug ? kGreen+1 : fg);
    b1->SetFillColor(fDebug ? 0 : fg);
    b1->SetFillStyle(fDebug ? 0 : 1001);
    b1->Draw();

    Double_t ang = 40 * TMath::Pi() / 180;
    Double_t o  = w / TMath::Sin(ang);
    Double_t o2 = w / TMath::Cos(ang);


    TGraph* g = new TGraph(8);
    SetAttr(g, g, fg);
    g->SetPoint(0, x+a*w*(fw/2-.5), y + 1-u);
    g->SetPoint(1, x,             y + 1);
    g->SetPoint(2, x+a*o2,        y + 1);
    g->SetPoint(3, x+a*w*fw/2,    y + 1 - u + o);
    g->SetPoint(4, x+a*w*fw-a*o2, y+1);
    g->SetPoint(5, x+a*w*fw,      y+1);
    g->SetPoint(6, x+a*w*(fw/2+.5), y + 1-u);
    g->SetPoint(7, x+a*w*(fw/2-.5), y + 1-u);

    
    g->Draw("same lf");
  }
  /** 
   * Set Line and Fill attributes
   * 
   * @param lne Line attribute interface 
   * @param fll Fill attribute interface 
   * @param col Colour 
   */
  void SetAttr(TAttLine* lne, TAttFill* fll, Int_t col) 
  {
    if (lne) {
      lne->SetLineColor(fDebug ? kGreen+1 : col);
      lne->SetLineWidth(fDebug ? 1        : 0);
    }
    if (fll) { 
      fll->SetFillColor(fDebug ? kGreen+1 : col);
      fll->SetFillStyle(fDebug ? 0        : 1001);
    }
  }
  Double_t GetX1() const { return fPad ? fPad->GetXlowNDC() : -1; }
  Double_t GetX2() const { return fPad ? GetX1()+fPad->GetWNDC() : -1; }
  Double_t GetY1() const { return fPad ? fPad->GetYlowNDC() : -1; }
  Double_t GetY2() const { return fPad ? GetY1()+fPad->GetHNDC() : -1; }
  Double_t GetCX() const { return fPad ? (GetX1()+GetX2())/2 : -1; }
  Double_t GetCY() const { return fPad ? (GetY1()+GetY2())/2 : -1; }
  /** 
   * run a simple test
   * 
   * @param what 
   */
  static void Test(const TString& what)
  {
    Test(AliceLogo::ParseTag(what), AliceLogo::ParseColors(what), 
	 what.Contains("debug", TString::kIgnoreCase));
  }
  /** 
   * Run a simple test
   * 
   * @param tag 
   * @param col 
   * @param debug 
   */
  static void Test(UShort_t tag, UInt_t col, Bool_t debug)
  {
    TCanvas* c = new TCanvas("test", "Test of AliceLogo");
    c->SetFillColor(kYellow-10);
    TH1* h = new TH1F("h", "h", 60, -3, 3);
    h->SetFillColor(kRed+1);
    h->SetFillStyle(3001);
    h->FillRandom("gaus");
    h->Draw();
    
    AliceLogo* dut = new AliceLogo(debug);
    dut->Draw(c, .75, .4, .25, tag, col);

    c->SaveAs("test.png");
    c->SaveAs("test.pdf");
    c->SaveAs("test.svg");
  }
  /** 
   * Check compatiblity by overlaying this logo on 'official' images
   * 
   * @param what 
   */
  static void Check(const TString& what)
  {
    Check(AliceLogo::ParseTag(what), AliceLogo::ParseColors(what), 
	 what.Contains("debug", TString::kIgnoreCase));
  }
  /** 
   * Check compatiblity by overlaying this logo on 'official' images
   * 
   * @param tag 
   * @param col 
   * @param debug 
   */
  static void Check(UShort_t tag, UInt_t col, Bool_t debug=true)
  {
    
    TImage* img = TImage::Create();
    TString imgName = "2012-Jul-04-Base_Logo.png";
    // Int_t   logoW   = 0; // img->GetWidth();
    // Int_t   logoH   = 0; // img->GetHeight();
    switch (tag) { 
    case AliceLogo::kPreliminary: 
      // logoW   = 1849;
      // logoH   = 2277;
      imgName = "2012-Jul-04-Preliminary_Logo.png"; 
      break;
    case AliceLogo::kPerformance: 
      imgName = "2012-Jul-04-Performance_Logo.png";
      break;
    default:
      if (col & kMany) 
	imgName = "2012-Jul-04-4_Color_Logo_CB.png";
      else
	imgName = "2012-Jul-04-Base_Logo.png";
    }
    Printf("Reading %s", imgName.Data());
    img->ReadImage(imgName);
    Int_t    logoW = img->GetWidth();
    Int_t    logoH = img->GetHeight();
    Double_t logoA = Float_t(logoH) / logoW; 

    Printf("Logo dimensions (wxh): (%d x %d)", logoW, logoH);
    Int_t myHeight = 800;
    TCanvas* c = new TCanvas("check", "Check of AliceLogo", 
			     (myHeight-22)/logoA, myHeight);
    c->SetTopMargin(0);
    c->SetRightMargin(0);
    c->SetBottomMargin(0);
    c->SetLeftMargin(0);
    c->SetFillColor(debug ? kRed-4 : kWhite);
    c->SetBorderSize(0);
    c->SetBorderMode(0);
    if (col & AliceLogo::kReverse /*&& !(col & AliceLogo::kL3)*/ && !debug) 
      c->SetFillColor(kBlack);
    
    if (debug) img->Draw();

    AliceLogo* dut = new AliceLogo(debug);
    dut->Draw(c, 0, 0, 1, tag, col);

    c->SaveAs("check.svg");
  }

  TVirtualPad* fPad;      // Our pad 
  Double_t     fAspect;   // Aspect ratio of our pad 
  Double_t     fL3Thick;  // Fraction of canvas height
  Double_t     fL3Height; // Fraction of canvas height 
  Double_t     fL3Width;  // Width of L3 sub-pad
  Bool_t       fDebug;    // Debug (make outline only)
  Int_t        fRed;      // The red color 
  Int_t        fYellow;   // The yellow-ish color
  Int_t        fPink;     // The dark-red pink-ish color 
  Int_t        fBlue;     // The blue gray-ish color 
};

#endif
//
// EOF
//
 AliceLogo.C:1
 AliceLogo.C:2
 AliceLogo.C:3
 AliceLogo.C:4
 AliceLogo.C:5
 AliceLogo.C:6
 AliceLogo.C:7
 AliceLogo.C:8
 AliceLogo.C:9
 AliceLogo.C:10
 AliceLogo.C:11
 AliceLogo.C:12
 AliceLogo.C:13
 AliceLogo.C:14
 AliceLogo.C:15
 AliceLogo.C:16
 AliceLogo.C:17
 AliceLogo.C:18
 AliceLogo.C:19
 AliceLogo.C:20
 AliceLogo.C:21
 AliceLogo.C:22
 AliceLogo.C:23
 AliceLogo.C:24
 AliceLogo.C:25
 AliceLogo.C:26
 AliceLogo.C:27
 AliceLogo.C:28
 AliceLogo.C:29
 AliceLogo.C:30
 AliceLogo.C:31
 AliceLogo.C:32
 AliceLogo.C:33
 AliceLogo.C:34
 AliceLogo.C:35
 AliceLogo.C:36
 AliceLogo.C:37
 AliceLogo.C:38
 AliceLogo.C:39
 AliceLogo.C:40
 AliceLogo.C:41
 AliceLogo.C:42
 AliceLogo.C:43
 AliceLogo.C:44
 AliceLogo.C:45
 AliceLogo.C:46
 AliceLogo.C:47
 AliceLogo.C:48
 AliceLogo.C:49
 AliceLogo.C:50
 AliceLogo.C:51
 AliceLogo.C:52
 AliceLogo.C:53
 AliceLogo.C:54
 AliceLogo.C:55
 AliceLogo.C:56
 AliceLogo.C:57
 AliceLogo.C:58
 AliceLogo.C:59
 AliceLogo.C:60
 AliceLogo.C:61
 AliceLogo.C:62
 AliceLogo.C:63
 AliceLogo.C:64
 AliceLogo.C:65
 AliceLogo.C:66
 AliceLogo.C:67
 AliceLogo.C:68
 AliceLogo.C:69
 AliceLogo.C:70
 AliceLogo.C:71
 AliceLogo.C:72
 AliceLogo.C:73
 AliceLogo.C:74
 AliceLogo.C:75
 AliceLogo.C:76
 AliceLogo.C:77
 AliceLogo.C:78
 AliceLogo.C:79
 AliceLogo.C:80
 AliceLogo.C:81
 AliceLogo.C:82
 AliceLogo.C:83
 AliceLogo.C:84
 AliceLogo.C:85
 AliceLogo.C:86
 AliceLogo.C:87
 AliceLogo.C:88
 AliceLogo.C:89
 AliceLogo.C:90
 AliceLogo.C:91
 AliceLogo.C:92
 AliceLogo.C:93
 AliceLogo.C:94
 AliceLogo.C:95
 AliceLogo.C:96
 AliceLogo.C:97
 AliceLogo.C:98
 AliceLogo.C:99
 AliceLogo.C:100
 AliceLogo.C:101
 AliceLogo.C:102
 AliceLogo.C:103
 AliceLogo.C:104
 AliceLogo.C:105
 AliceLogo.C:106
 AliceLogo.C:107
 AliceLogo.C:108
 AliceLogo.C:109
 AliceLogo.C:110
 AliceLogo.C:111
 AliceLogo.C:112
 AliceLogo.C:113
 AliceLogo.C:114
 AliceLogo.C:115
 AliceLogo.C:116
 AliceLogo.C:117
 AliceLogo.C:118
 AliceLogo.C:119
 AliceLogo.C:120
 AliceLogo.C:121
 AliceLogo.C:122
 AliceLogo.C:123
 AliceLogo.C:124
 AliceLogo.C:125
 AliceLogo.C:126
 AliceLogo.C:127
 AliceLogo.C:128
 AliceLogo.C:129
 AliceLogo.C:130
 AliceLogo.C:131
 AliceLogo.C:132
 AliceLogo.C:133
 AliceLogo.C:134
 AliceLogo.C:135
 AliceLogo.C:136
 AliceLogo.C:137
 AliceLogo.C:138
 AliceLogo.C:139
 AliceLogo.C:140
 AliceLogo.C:141
 AliceLogo.C:142
 AliceLogo.C:143
 AliceLogo.C:144
 AliceLogo.C:145
 AliceLogo.C:146
 AliceLogo.C:147
 AliceLogo.C:148
 AliceLogo.C:149
 AliceLogo.C:150
 AliceLogo.C:151
 AliceLogo.C:152
 AliceLogo.C:153
 AliceLogo.C:154
 AliceLogo.C:155
 AliceLogo.C:156
 AliceLogo.C:157
 AliceLogo.C:158
 AliceLogo.C:159
 AliceLogo.C:160
 AliceLogo.C:161
 AliceLogo.C:162
 AliceLogo.C:163
 AliceLogo.C:164
 AliceLogo.C:165
 AliceLogo.C:166
 AliceLogo.C:167
 AliceLogo.C:168
 AliceLogo.C:169
 AliceLogo.C:170
 AliceLogo.C:171
 AliceLogo.C:172
 AliceLogo.C:173
 AliceLogo.C:174
 AliceLogo.C:175
 AliceLogo.C:176
 AliceLogo.C:177
 AliceLogo.C:178
 AliceLogo.C:179
 AliceLogo.C:180
 AliceLogo.C:181
 AliceLogo.C:182
 AliceLogo.C:183
 AliceLogo.C:184
 AliceLogo.C:185
 AliceLogo.C:186
 AliceLogo.C:187
 AliceLogo.C:188
 AliceLogo.C:189
 AliceLogo.C:190
 AliceLogo.C:191
 AliceLogo.C:192
 AliceLogo.C:193
 AliceLogo.C:194
 AliceLogo.C:195
 AliceLogo.C:196
 AliceLogo.C:197
 AliceLogo.C:198
 AliceLogo.C:199
 AliceLogo.C:200
 AliceLogo.C:201
 AliceLogo.C:202
 AliceLogo.C:203
 AliceLogo.C:204
 AliceLogo.C:205
 AliceLogo.C:206
 AliceLogo.C:207
 AliceLogo.C:208
 AliceLogo.C:209
 AliceLogo.C:210
 AliceLogo.C:211
 AliceLogo.C:212
 AliceLogo.C:213
 AliceLogo.C:214
 AliceLogo.C:215
 AliceLogo.C:216
 AliceLogo.C:217
 AliceLogo.C:218
 AliceLogo.C:219
 AliceLogo.C:220
 AliceLogo.C:221
 AliceLogo.C:222
 AliceLogo.C:223
 AliceLogo.C:224
 AliceLogo.C:225
 AliceLogo.C:226
 AliceLogo.C:227
 AliceLogo.C:228
 AliceLogo.C:229
 AliceLogo.C:230
 AliceLogo.C:231
 AliceLogo.C:232
 AliceLogo.C:233
 AliceLogo.C:234
 AliceLogo.C:235
 AliceLogo.C:236
 AliceLogo.C:237
 AliceLogo.C:238
 AliceLogo.C:239
 AliceLogo.C:240
 AliceLogo.C:241
 AliceLogo.C:242
 AliceLogo.C:243
 AliceLogo.C:244
 AliceLogo.C:245
 AliceLogo.C:246
 AliceLogo.C:247
 AliceLogo.C:248
 AliceLogo.C:249
 AliceLogo.C:250
 AliceLogo.C:251
 AliceLogo.C:252
 AliceLogo.C:253
 AliceLogo.C:254
 AliceLogo.C:255
 AliceLogo.C:256
 AliceLogo.C:257
 AliceLogo.C:258
 AliceLogo.C:259
 AliceLogo.C:260
 AliceLogo.C:261
 AliceLogo.C:262
 AliceLogo.C:263
 AliceLogo.C:264
 AliceLogo.C:265
 AliceLogo.C:266
 AliceLogo.C:267
 AliceLogo.C:268
 AliceLogo.C:269
 AliceLogo.C:270
 AliceLogo.C:271
 AliceLogo.C:272
 AliceLogo.C:273
 AliceLogo.C:274
 AliceLogo.C:275
 AliceLogo.C:276
 AliceLogo.C:277
 AliceLogo.C:278
 AliceLogo.C:279
 AliceLogo.C:280
 AliceLogo.C:281
 AliceLogo.C:282
 AliceLogo.C:283
 AliceLogo.C:284
 AliceLogo.C:285
 AliceLogo.C:286
 AliceLogo.C:287
 AliceLogo.C:288
 AliceLogo.C:289
 AliceLogo.C:290
 AliceLogo.C:291
 AliceLogo.C:292
 AliceLogo.C:293
 AliceLogo.C:294
 AliceLogo.C:295
 AliceLogo.C:296
 AliceLogo.C:297
 AliceLogo.C:298
 AliceLogo.C:299
 AliceLogo.C:300
 AliceLogo.C:301
 AliceLogo.C:302
 AliceLogo.C:303
 AliceLogo.C:304
 AliceLogo.C:305
 AliceLogo.C:306
 AliceLogo.C:307
 AliceLogo.C:308
 AliceLogo.C:309
 AliceLogo.C:310
 AliceLogo.C:311
 AliceLogo.C:312
 AliceLogo.C:313
 AliceLogo.C:314
 AliceLogo.C:315
 AliceLogo.C:316
 AliceLogo.C:317
 AliceLogo.C:318
 AliceLogo.C:319
 AliceLogo.C:320
 AliceLogo.C:321
 AliceLogo.C:322
 AliceLogo.C:323
 AliceLogo.C:324
 AliceLogo.C:325
 AliceLogo.C:326
 AliceLogo.C:327
 AliceLogo.C:328
 AliceLogo.C:329
 AliceLogo.C:330
 AliceLogo.C:331
 AliceLogo.C:332
 AliceLogo.C:333
 AliceLogo.C:334
 AliceLogo.C:335
 AliceLogo.C:336
 AliceLogo.C:337
 AliceLogo.C:338
 AliceLogo.C:339
 AliceLogo.C:340
 AliceLogo.C:341
 AliceLogo.C:342
 AliceLogo.C:343
 AliceLogo.C:344
 AliceLogo.C:345
 AliceLogo.C:346
 AliceLogo.C:347
 AliceLogo.C:348
 AliceLogo.C:349
 AliceLogo.C:350
 AliceLogo.C:351
 AliceLogo.C:352
 AliceLogo.C:353
 AliceLogo.C:354
 AliceLogo.C:355
 AliceLogo.C:356
 AliceLogo.C:357
 AliceLogo.C:358
 AliceLogo.C:359
 AliceLogo.C:360
 AliceLogo.C:361
 AliceLogo.C:362
 AliceLogo.C:363
 AliceLogo.C:364
 AliceLogo.C:365
 AliceLogo.C:366
 AliceLogo.C:367
 AliceLogo.C:368
 AliceLogo.C:369
 AliceLogo.C:370
 AliceLogo.C:371
 AliceLogo.C:372
 AliceLogo.C:373
 AliceLogo.C:374
 AliceLogo.C:375
 AliceLogo.C:376
 AliceLogo.C:377
 AliceLogo.C:378
 AliceLogo.C:379
 AliceLogo.C:380
 AliceLogo.C:381
 AliceLogo.C:382
 AliceLogo.C:383
 AliceLogo.C:384
 AliceLogo.C:385
 AliceLogo.C:386
 AliceLogo.C:387
 AliceLogo.C:388
 AliceLogo.C:389
 AliceLogo.C:390
 AliceLogo.C:391
 AliceLogo.C:392
 AliceLogo.C:393
 AliceLogo.C:394
 AliceLogo.C:395
 AliceLogo.C:396
 AliceLogo.C:397
 AliceLogo.C:398
 AliceLogo.C:399
 AliceLogo.C:400
 AliceLogo.C:401
 AliceLogo.C:402
 AliceLogo.C:403
 AliceLogo.C:404
 AliceLogo.C:405
 AliceLogo.C:406
 AliceLogo.C:407
 AliceLogo.C:408
 AliceLogo.C:409
 AliceLogo.C:410
 AliceLogo.C:411
 AliceLogo.C:412
 AliceLogo.C:413
 AliceLogo.C:414
 AliceLogo.C:415
 AliceLogo.C:416
 AliceLogo.C:417
 AliceLogo.C:418
 AliceLogo.C:419
 AliceLogo.C:420
 AliceLogo.C:421
 AliceLogo.C:422
 AliceLogo.C:423
 AliceLogo.C:424
 AliceLogo.C:425
 AliceLogo.C:426
 AliceLogo.C:427
 AliceLogo.C:428
 AliceLogo.C:429
 AliceLogo.C:430
 AliceLogo.C:431
 AliceLogo.C:432
 AliceLogo.C:433
 AliceLogo.C:434
 AliceLogo.C:435
 AliceLogo.C:436
 AliceLogo.C:437
 AliceLogo.C:438
 AliceLogo.C:439
 AliceLogo.C:440
 AliceLogo.C:441
 AliceLogo.C:442
 AliceLogo.C:443
 AliceLogo.C:444
 AliceLogo.C:445
 AliceLogo.C:446
 AliceLogo.C:447
 AliceLogo.C:448
 AliceLogo.C:449
 AliceLogo.C:450
 AliceLogo.C:451
 AliceLogo.C:452
 AliceLogo.C:453
 AliceLogo.C:454
 AliceLogo.C:455
 AliceLogo.C:456
 AliceLogo.C:457
 AliceLogo.C:458
 AliceLogo.C:459
 AliceLogo.C:460
 AliceLogo.C:461
 AliceLogo.C:462
 AliceLogo.C:463
 AliceLogo.C:464
 AliceLogo.C:465
 AliceLogo.C:466
 AliceLogo.C:467
 AliceLogo.C:468
 AliceLogo.C:469
 AliceLogo.C:470
 AliceLogo.C:471
 AliceLogo.C:472
 AliceLogo.C:473
 AliceLogo.C:474
 AliceLogo.C:475
 AliceLogo.C:476
 AliceLogo.C:477
 AliceLogo.C:478
 AliceLogo.C:479
 AliceLogo.C:480
 AliceLogo.C:481
 AliceLogo.C:482
 AliceLogo.C:483
 AliceLogo.C:484
 AliceLogo.C:485
 AliceLogo.C:486
 AliceLogo.C:487
 AliceLogo.C:488
 AliceLogo.C:489
 AliceLogo.C:490
 AliceLogo.C:491
 AliceLogo.C:492
 AliceLogo.C:493
 AliceLogo.C:494
 AliceLogo.C:495
 AliceLogo.C:496
 AliceLogo.C:497
 AliceLogo.C:498
 AliceLogo.C:499
 AliceLogo.C:500
 AliceLogo.C:501
 AliceLogo.C:502
 AliceLogo.C:503
 AliceLogo.C:504
 AliceLogo.C:505
 AliceLogo.C:506
 AliceLogo.C:507
 AliceLogo.C:508
 AliceLogo.C:509
 AliceLogo.C:510
 AliceLogo.C:511
 AliceLogo.C:512
 AliceLogo.C:513
 AliceLogo.C:514
 AliceLogo.C:515
 AliceLogo.C:516
 AliceLogo.C:517
 AliceLogo.C:518
 AliceLogo.C:519
 AliceLogo.C:520
 AliceLogo.C:521
 AliceLogo.C:522
 AliceLogo.C:523
 AliceLogo.C:524
 AliceLogo.C:525
 AliceLogo.C:526
 AliceLogo.C:527
 AliceLogo.C:528
 AliceLogo.C:529
 AliceLogo.C:530
 AliceLogo.C:531
 AliceLogo.C:532
 AliceLogo.C:533
 AliceLogo.C:534
 AliceLogo.C:535
 AliceLogo.C:536
 AliceLogo.C:537
 AliceLogo.C:538
 AliceLogo.C:539
 AliceLogo.C:540
 AliceLogo.C:541
 AliceLogo.C:542
 AliceLogo.C:543
 AliceLogo.C:544
 AliceLogo.C:545
 AliceLogo.C:546
 AliceLogo.C:547
 AliceLogo.C:548
 AliceLogo.C:549
 AliceLogo.C:550
 AliceLogo.C:551
 AliceLogo.C:552
 AliceLogo.C:553
 AliceLogo.C:554
 AliceLogo.C:555
 AliceLogo.C:556
 AliceLogo.C:557
 AliceLogo.C:558
 AliceLogo.C:559
 AliceLogo.C:560
 AliceLogo.C:561
 AliceLogo.C:562
 AliceLogo.C:563
 AliceLogo.C:564
 AliceLogo.C:565
 AliceLogo.C:566
 AliceLogo.C:567
 AliceLogo.C:568
 AliceLogo.C:569
 AliceLogo.C:570
 AliceLogo.C:571
 AliceLogo.C:572
 AliceLogo.C:573
 AliceLogo.C:574
 AliceLogo.C:575
 AliceLogo.C:576
 AliceLogo.C:577
 AliceLogo.C:578
 AliceLogo.C:579
 AliceLogo.C:580
 AliceLogo.C:581
 AliceLogo.C:582
 AliceLogo.C:583
 AliceLogo.C:584
 AliceLogo.C:585
 AliceLogo.C:586
 AliceLogo.C:587
 AliceLogo.C:588
 AliceLogo.C:589
 AliceLogo.C:590
 AliceLogo.C:591
 AliceLogo.C:592
 AliceLogo.C:593
 AliceLogo.C:594
 AliceLogo.C:595
 AliceLogo.C:596
 AliceLogo.C:597
 AliceLogo.C:598
 AliceLogo.C:599
 AliceLogo.C:600
 AliceLogo.C:601
 AliceLogo.C:602
 AliceLogo.C:603
 AliceLogo.C:604
 AliceLogo.C:605
 AliceLogo.C:606
 AliceLogo.C:607
 AliceLogo.C:608
 AliceLogo.C:609
 AliceLogo.C:610
 AliceLogo.C:611
 AliceLogo.C:612
 AliceLogo.C:613
 AliceLogo.C:614
 AliceLogo.C:615
 AliceLogo.C:616
 AliceLogo.C:617
 AliceLogo.C:618
 AliceLogo.C:619
 AliceLogo.C:620
 AliceLogo.C:621
 AliceLogo.C:622
 AliceLogo.C:623
 AliceLogo.C:624
 AliceLogo.C:625
 AliceLogo.C:626
 AliceLogo.C:627
 AliceLogo.C:628
 AliceLogo.C:629
 AliceLogo.C:630
 AliceLogo.C:631
 AliceLogo.C:632
 AliceLogo.C:633
 AliceLogo.C:634
 AliceLogo.C:635
 AliceLogo.C:636
 AliceLogo.C:637
 AliceLogo.C:638
 AliceLogo.C:639
 AliceLogo.C:640
 AliceLogo.C:641
 AliceLogo.C:642
 AliceLogo.C:643
 AliceLogo.C:644
 AliceLogo.C:645
 AliceLogo.C:646
 AliceLogo.C:647
 AliceLogo.C:648
 AliceLogo.C:649
 AliceLogo.C:650
 AliceLogo.C:651
 AliceLogo.C:652
 AliceLogo.C:653
 AliceLogo.C:654
 AliceLogo.C:655
 AliceLogo.C:656
 AliceLogo.C:657
 AliceLogo.C:658
 AliceLogo.C:659
 AliceLogo.C:660
 AliceLogo.C:661
 AliceLogo.C:662
 AliceLogo.C:663
 AliceLogo.C:664
 AliceLogo.C:665
 AliceLogo.C:666
 AliceLogo.C:667
 AliceLogo.C:668
 AliceLogo.C:669
 AliceLogo.C:670
 AliceLogo.C:671
 AliceLogo.C:672
 AliceLogo.C:673
 AliceLogo.C:674
 AliceLogo.C:675
 AliceLogo.C:676
 AliceLogo.C:677
 AliceLogo.C:678
 AliceLogo.C:679
 AliceLogo.C:680
 AliceLogo.C:681
 AliceLogo.C:682
 AliceLogo.C:683
 AliceLogo.C:684
 AliceLogo.C:685
 AliceLogo.C:686
 AliceLogo.C:687
 AliceLogo.C:688
 AliceLogo.C:689
 AliceLogo.C:690
 AliceLogo.C:691
 AliceLogo.C:692
 AliceLogo.C:693
 AliceLogo.C:694
 AliceLogo.C:695
 AliceLogo.C:696
 AliceLogo.C:697
 AliceLogo.C:698
 AliceLogo.C:699
 AliceLogo.C:700
 AliceLogo.C:701
 AliceLogo.C:702
 AliceLogo.C:703
 AliceLogo.C:704
 AliceLogo.C:705
 AliceLogo.C:706
 AliceLogo.C:707
 AliceLogo.C:708
 AliceLogo.C:709
 AliceLogo.C:710
 AliceLogo.C:711
 AliceLogo.C:712
 AliceLogo.C:713
 AliceLogo.C:714
 AliceLogo.C:715
 AliceLogo.C:716
 AliceLogo.C:717
 AliceLogo.C:718
 AliceLogo.C:719
 AliceLogo.C:720
 AliceLogo.C:721
 AliceLogo.C:722
 AliceLogo.C:723
 AliceLogo.C:724
 AliceLogo.C:725
 AliceLogo.C:726
 AliceLogo.C:727
 AliceLogo.C:728
 AliceLogo.C:729
 AliceLogo.C:730
 AliceLogo.C:731
 AliceLogo.C:732
 AliceLogo.C:733
 AliceLogo.C:734
 AliceLogo.C:735
 AliceLogo.C:736
 AliceLogo.C:737
 AliceLogo.C:738
 AliceLogo.C:739
 AliceLogo.C:740
 AliceLogo.C:741
 AliceLogo.C:742
 AliceLogo.C:743
 AliceLogo.C:744
 AliceLogo.C:745
 AliceLogo.C:746
 AliceLogo.C:747
 AliceLogo.C:748
 AliceLogo.C:749
 AliceLogo.C:750
 AliceLogo.C:751
 AliceLogo.C:752
 AliceLogo.C:753
 AliceLogo.C:754
 AliceLogo.C:755
 AliceLogo.C:756
 AliceLogo.C:757
 AliceLogo.C:758
 AliceLogo.C:759
 AliceLogo.C:760
 AliceLogo.C:761
 AliceLogo.C:762
 AliceLogo.C:763
 AliceLogo.C:764
 AliceLogo.C:765
 AliceLogo.C:766
 AliceLogo.C:767
 AliceLogo.C:768
 AliceLogo.C:769
 AliceLogo.C:770
 AliceLogo.C:771
 AliceLogo.C:772
 AliceLogo.C:773
 AliceLogo.C:774
 AliceLogo.C:775
 AliceLogo.C:776
 AliceLogo.C:777
 AliceLogo.C:778
 AliceLogo.C:779
 AliceLogo.C:780
 AliceLogo.C:781
 AliceLogo.C:782
 AliceLogo.C:783
 AliceLogo.C:784
 AliceLogo.C:785
 AliceLogo.C:786
 AliceLogo.C:787
 AliceLogo.C:788
 AliceLogo.C:789
 AliceLogo.C:790
 AliceLogo.C:791
 AliceLogo.C:792
 AliceLogo.C:793
 AliceLogo.C:794
 AliceLogo.C:795
 AliceLogo.C:796
 AliceLogo.C:797
 AliceLogo.C:798
 AliceLogo.C:799
 AliceLogo.C:800
 AliceLogo.C:801
 AliceLogo.C:802
 AliceLogo.C:803
 AliceLogo.C:804
 AliceLogo.C:805
 AliceLogo.C:806
 AliceLogo.C:807
 AliceLogo.C:808
 AliceLogo.C:809
 AliceLogo.C:810
 AliceLogo.C:811
 AliceLogo.C:812
 AliceLogo.C:813
 AliceLogo.C:814
 AliceLogo.C:815
 AliceLogo.C:816
 AliceLogo.C:817
 AliceLogo.C:818
 AliceLogo.C:819
 AliceLogo.C:820
 AliceLogo.C:821
 AliceLogo.C:822
 AliceLogo.C:823
 AliceLogo.C:824
 AliceLogo.C:825
 AliceLogo.C:826
 AliceLogo.C:827
 AliceLogo.C:828
 AliceLogo.C:829
 AliceLogo.C:830
 AliceLogo.C:831
 AliceLogo.C:832
 AliceLogo.C:833
 AliceLogo.C:834
 AliceLogo.C:835
 AliceLogo.C:836
 AliceLogo.C:837
 AliceLogo.C:838
 AliceLogo.C:839
 AliceLogo.C:840
 AliceLogo.C:841
 AliceLogo.C:842
 AliceLogo.C:843
 AliceLogo.C:844
 AliceLogo.C:845
 AliceLogo.C:846
 AliceLogo.C:847
 AliceLogo.C:848
 AliceLogo.C:849
 AliceLogo.C:850
 AliceLogo.C:851
 AliceLogo.C:852
 AliceLogo.C:853
 AliceLogo.C:854
 AliceLogo.C:855
 AliceLogo.C:856
 AliceLogo.C:857
 AliceLogo.C:858
 AliceLogo.C:859
 AliceLogo.C:860
 AliceLogo.C:861
 AliceLogo.C:862
 AliceLogo.C:863
 AliceLogo.C:864
 AliceLogo.C:865
 AliceLogo.C:866
 AliceLogo.C:867
 AliceLogo.C:868
 AliceLogo.C:869
 AliceLogo.C:870
 AliceLogo.C:871
 AliceLogo.C:872
 AliceLogo.C:873
 AliceLogo.C:874
 AliceLogo.C:875
 AliceLogo.C:876
 AliceLogo.C:877
 AliceLogo.C:878
 AliceLogo.C:879
 AliceLogo.C:880
 AliceLogo.C:881
 AliceLogo.C:882
 AliceLogo.C:883
 AliceLogo.C:884
 AliceLogo.C:885
 AliceLogo.C:886
 AliceLogo.C:887
 AliceLogo.C:888
 AliceLogo.C:889
 AliceLogo.C:890
 AliceLogo.C:891
 AliceLogo.C:892
 AliceLogo.C:893
 AliceLogo.C:894
 AliceLogo.C:895
 AliceLogo.C:896
 AliceLogo.C:897
 AliceLogo.C:898
 AliceLogo.C:899
 AliceLogo.C:900
 AliceLogo.C:901
 AliceLogo.C:902
 AliceLogo.C:903
 AliceLogo.C:904
 AliceLogo.C:905
 AliceLogo.C:906
 AliceLogo.C:907
 AliceLogo.C:908
 AliceLogo.C:909
 AliceLogo.C:910
 AliceLogo.C:911
 AliceLogo.C:912
 AliceLogo.C:913
 AliceLogo.C:914
 AliceLogo.C:915
 AliceLogo.C:916
 AliceLogo.C:917
 AliceLogo.C:918
 AliceLogo.C:919
 AliceLogo.C:920
 AliceLogo.C:921
 AliceLogo.C:922
 AliceLogo.C:923
 AliceLogo.C:924
 AliceLogo.C:925
 AliceLogo.C:926
 AliceLogo.C:927
 AliceLogo.C:928
 AliceLogo.C:929
 AliceLogo.C:930
 AliceLogo.C:931
 AliceLogo.C:932
 AliceLogo.C:933
 AliceLogo.C:934
 AliceLogo.C:935
 AliceLogo.C:936
 AliceLogo.C:937
 AliceLogo.C:938
 AliceLogo.C:939
 AliceLogo.C:940
 AliceLogo.C:941
 AliceLogo.C:942
 AliceLogo.C:943
 AliceLogo.C:944
 AliceLogo.C:945
 AliceLogo.C:946
 AliceLogo.C:947
 AliceLogo.C:948
 AliceLogo.C:949
 AliceLogo.C:950
 AliceLogo.C:951
 AliceLogo.C:952
 AliceLogo.C:953
 AliceLogo.C:954
 AliceLogo.C:955
 AliceLogo.C:956
 AliceLogo.C:957
 AliceLogo.C:958
 AliceLogo.C:959
 AliceLogo.C:960
 AliceLogo.C:961
 AliceLogo.C:962
 AliceLogo.C:963
 AliceLogo.C:964
 AliceLogo.C:965
 AliceLogo.C:966
 AliceLogo.C:967
 AliceLogo.C:968
 AliceLogo.C:969
 AliceLogo.C:970
 AliceLogo.C:971
 AliceLogo.C:972
 AliceLogo.C:973
 AliceLogo.C:974
 AliceLogo.C:975
 AliceLogo.C:976
 AliceLogo.C:977
 AliceLogo.C:978
 AliceLogo.C:979
 AliceLogo.C:980
 AliceLogo.C:981
 AliceLogo.C:982
 AliceLogo.C:983
 AliceLogo.C:984
 AliceLogo.C:985
 AliceLogo.C:986
 AliceLogo.C:987
 AliceLogo.C:988
 AliceLogo.C:989
 AliceLogo.C:990
 AliceLogo.C:991
 AliceLogo.C:992
 AliceLogo.C:993
 AliceLogo.C:994
 AliceLogo.C:995
 AliceLogo.C:996
 AliceLogo.C:997
 AliceLogo.C:998
 AliceLogo.C:999
 AliceLogo.C:1000
 AliceLogo.C:1001
 AliceLogo.C:1002
 AliceLogo.C:1003
 AliceLogo.C:1004
 AliceLogo.C:1005
 AliceLogo.C:1006
 AliceLogo.C:1007
 AliceLogo.C:1008
 AliceLogo.C:1009
 AliceLogo.C:1010
 AliceLogo.C:1011
 AliceLogo.C:1012
 AliceLogo.C:1013
 AliceLogo.C:1014
 AliceLogo.C:1015
 AliceLogo.C:1016
 AliceLogo.C:1017
 AliceLogo.C:1018
 AliceLogo.C:1019
 AliceLogo.C:1020
 AliceLogo.C:1021
 AliceLogo.C:1022
 AliceLogo.C:1023
 AliceLogo.C:1024
 AliceLogo.C:1025
 AliceLogo.C:1026
 AliceLogo.C:1027
 AliceLogo.C:1028
 AliceLogo.C:1029
 AliceLogo.C:1030
 AliceLogo.C:1031
 AliceLogo.C:1032
 AliceLogo.C:1033
 AliceLogo.C:1034
 AliceLogo.C:1035
 AliceLogo.C:1036
 AliceLogo.C:1037
 AliceLogo.C:1038
 AliceLogo.C:1039
 AliceLogo.C:1040
 AliceLogo.C:1041
 AliceLogo.C:1042
 AliceLogo.C:1043
 AliceLogo.C:1044
 AliceLogo.C:1045