ROOT logo
plotDiscreteWeight(Int_t len=5)
{
  AliQuenchingWeights afq;
  afq.InitMult();
  afq.PlotDiscreteWeights();
}

plotDiscreteWeightMacro(Int_t len=5)
{
  AliQuenchingWeights afq;
  afq.InitMult();

  TCanvas *c = new TCanvas("cdisc","Discrete Weight for Multiple Scattering",0,0,500,400);
  TH2F *hframe = new TH2F("hdisc","",2,0,1.1,2,0,1);
  hframe->SetStats(0);
  hframe->SetXTitle("#hat{q} [GeV^{2}/fm]");
  hframe->SetYTitle("Probability #Delta E = 0 , p_{0}");
  hframe->Draw();

  TGraph *gq=new TGraph(20);
  Int_t i=0;
  for(Double_t q=0.1;q<=1.05;q+=0.05){
    Double_t disc,cont;
    afq.CalcMult(1,1.0, q, len, cont, disc);
    //cout << " " << q << " " << disc << endl;
    gq->SetPoint(i,q,disc);i++;
  }
  gq->SetMarkerStyle(20);
  gq->Draw("pl");

  TGraph *gg=new TGraph(20);
  Int_t i=0;
  for(Double_t q=0.05;q<=1.05;q+=0.05){
    Double_t disc,cont;
    afq.CalcMult(2,1.0, q, 5., cont, disc);
    //cout << " " << q << " " << disc << endl;
    gg->SetPoint(i,q,disc);i++;
  }
  gg->SetMarkerStyle(24);
  gg->Draw("pl");

  TLegend *l1a = new TLegend(0.5,0.6,.95,0.8);
  l1a->SetFillStyle(0);
  l1a->SetBorderSize(0);
  Char_t label[100];
  sprintf(label,"L = %d fm",len);
  l1a->AddEntry(gq,label,"");
  l1a->AddEntry(gq,"quark","pl");
  l1a->AddEntry(gg,"gluon","pl");
  l1a->Draw();

  c->Update();

}
 plotDiscreteWeight.C:1
 plotDiscreteWeight.C:2
 plotDiscreteWeight.C:3
 plotDiscreteWeight.C:4
 plotDiscreteWeight.C:5
 plotDiscreteWeight.C:6
 plotDiscreteWeight.C:7
 plotDiscreteWeight.C:8
 plotDiscreteWeight.C:9
 plotDiscreteWeight.C:10
 plotDiscreteWeight.C:11
 plotDiscreteWeight.C:12
 plotDiscreteWeight.C:13
 plotDiscreteWeight.C:14
 plotDiscreteWeight.C:15
 plotDiscreteWeight.C:16
 plotDiscreteWeight.C:17
 plotDiscreteWeight.C:18
 plotDiscreteWeight.C:19
 plotDiscreteWeight.C:20
 plotDiscreteWeight.C:21
 plotDiscreteWeight.C:22
 plotDiscreteWeight.C:23
 plotDiscreteWeight.C:24
 plotDiscreteWeight.C:25
 plotDiscreteWeight.C:26
 plotDiscreteWeight.C:27
 plotDiscreteWeight.C:28
 plotDiscreteWeight.C:29
 plotDiscreteWeight.C:30
 plotDiscreteWeight.C:31
 plotDiscreteWeight.C:32
 plotDiscreteWeight.C:33
 plotDiscreteWeight.C:34
 plotDiscreteWeight.C:35
 plotDiscreteWeight.C:36
 plotDiscreteWeight.C:37
 plotDiscreteWeight.C:38
 plotDiscreteWeight.C:39
 plotDiscreteWeight.C:40
 plotDiscreteWeight.C:41
 plotDiscreteWeight.C:42
 plotDiscreteWeight.C:43
 plotDiscreteWeight.C:44
 plotDiscreteWeight.C:45
 plotDiscreteWeight.C:46
 plotDiscreteWeight.C:47
 plotDiscreteWeight.C:48
 plotDiscreteWeight.C:49
 plotDiscreteWeight.C:50
 plotDiscreteWeight.C:51
 plotDiscreteWeight.C:52
 plotDiscreteWeight.C:53
 plotDiscreteWeight.C:54
 plotDiscreteWeight.C:55