GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Hades » Pluto » [SOLVED] Beam Smear and Cross Sections
Re: Bear Smear and Cross Sections [message #13896 is a reply to message #13812] Tue, 28 August 2012 08:53 Go to previous messageGo to previous message
Ingo Froehlich is currently offline  Ingo Froehlich
Messages: 167
Registered: March 2004
Location: IKF - Frankfurt
first-grade participant
From: *dip.t-dialin.net
You can also construct in a similar way like follows, but I haven't tested the performance with 64 if-constructions

    TH1F *distribution = new TH1F("distribution", "Angular distribution", 10, -1 , 1 );
    distribution->SetBinContent(1,20.);
    distribution->SetBinContent(2,16.);
    distribution->SetBinContent(3,11.);
    distribution->SetBinContent(4,8.);
    distribution->SetBinContent(5,5.);
    distribution->SetBinContent(6,4.);
    distribution->SetBinContent(7,3.);
    distribution->SetBinContent(8,2.5);
    distribution->SetBinContent(9,2.);
    distribution->SetBinContent(10,1.);

    TH1F *distribution2 = new TH1F("distribution2", "Angular distribution2", 10, -1 , 1 );
    distribution2->SetBinContent(1,10.);
    distribution2->SetBinContent(2,11.);
    distribution2->SetBinContent(3,12.);
    distribution2->SetBinContent(4,13);
    distribution2->SetBinContent(5,14);
    distribution2->SetBinContent(6,17);
    distribution2->SetBinContent(7,30);
    distribution2->SetBinContent(8,40);
    distribution2->SetBinContent(9,45);
    distribution2->SetBinContent(10,60);
    
    TH1F *distribution3 = new TH1F("distribution3", "Angular distribution2", 10, -1 , 1 );
    distribution3->SetBinContent(1,1.);
    distribution3->SetBinContent(2,1.);
    distribution3->SetBinContent(3,1.);
    distribution3->SetBinContent(4,1);
    distribution3->SetBinContent(5,1);
    distribution3->SetBinContent(6,1);
    distribution3->SetBinContent(7,3);
    distribution3->SetBinContent(8,4);
    distribution3->SetBinContent(9,4);
    distribution3->SetBinContent(10,6);

    model->AddHistogram(distribution,"if (_y < 1.601) _f = Eval(_x);");
    model->AddHistogram(distribution2,"if (_y > 1.600 && _y < 1.801) _f = Eval(_x);");
    model->AddHistogram(distribution3,"if (_y > 1.800) _f = Eval(_x);");



--
Ingo Froehlich
IKF - University of Frankfurt
069-798-47027, FAX: -47024
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New Pluto web page
Next Topic: [SOLVED] PAnyDistribution broke in v5.40.5
Goto Forum:
  


Current Time: Tue Dec 03 02:37:40 CET 2024

Total time taken to generate the page: 0.00979 seconds