Total cross sections: The pp cocktail at 1.25GeV

//
//This macros demonstrates how to set up a cocktail with total cross sections
//
{


    
    //The first action we have to take is to activate the plugins
    //this is done in Pluto via commands. In the same stap we
    //can already forward the options to the plugins
    
    //As an first example let us activate the elementary plugin
    //This adds a lot of composite particles into the data base
    //and some models for total cross sections we need later
    makeDistributionManager()->Exec("elementary");

    
    //Next step is to activate the bremsstrahlung.
    //In our case the Kaptari/Kaempfer version
    //We want to use weighting, otherwise there is no total
    //normalization
    makeDistributionManager()->Exec("brems: kaptari; weighting");

    //There are 3 "sub-versions": Please choose one out
    //of them:
    
    //makeDistributionManager()->Exec("brems: delta");
    makeDistributionManager()->Exec("brems: sum");  
    //makeDistributionManager()->Exec("brems: elastic");
    
    //makeDistributionManager()->Exec("brems: fsi");  
    
    //The Delta production is done via
    //the Teis model
    //for double pi0 production there is model
    //let us add a model
    //The corresponding decay is added automatically into the data base
    PTCrossWeight *my_cross = 
	new PTCrossWeight("p + p_to_p_p_pi0_pi0/tcross",
			  "Cross section for double pi0 production", -1);
    my_cross->SetCrossSection(0.2 * 0.001 * 2); //0.2mb times 2 (see below) 
    makeDistributionManager()->Add(my_cross);
    
    //Activate the Krivoruchenko Dalitz
    makeDistributionManager()->Exec("dalitz_mod: krivoruchenko");

    //Enable the generator mod: It is very usefull to enable a flat
    //generator to acquire enough statistics for the high mass region
    
    //There is another topic in this context: For broad resonances we
    //should disable the static b.r. scaling and use the dGamma/dM as
    //a mass-dependent b.r.
    //Let us put the threshold to 100 MeV
    makeDistributionManager()->Exec("dalitz_mod: static_br_thresh=0.100 ; flat_generator");
    
    //The krivoruchenko mod enables by default also the QED form factor
    //If you want the VMD version, uncomment the following line:
    //makeDistributionManager()->Enable("vmd");
    
    //Once we are done, print the collection just to see if the plugins worked:    
    makeDistributionManager()->Print("root");

    //Set up the reaction:
    //N.B: if you want to write a file, add a filename at the "NULL" position
    
    PReaction *my_reaction = 
	//	new PReaction("1.25", "p", "p", "p D+ [p pi0 [g dilepton [e+ e-]]]", NULL, 1, 0, 0, 0);
	new PReaction("1.25", "p", "p", "p D+ [p pi0 [g dilepton [e+ e-]]]", "pp_1.25", 1, 0, 0, 0);
    my_reaction->AddReaction("p p pi0 pi0 [g dilepton [e+ e-]]");
    //pi0 decay as defined above. Double pi0 already taken into account
    //-> therefore we leave one pi0 undecayed
    
    //Add Delta, if you want that:
    my_reaction->AddReaction("p D+ [p dilepton [e+ e-]]");
    //Add Bremsstrahlung, if you want that:
    //my_reaction->AddReaction("p p dilepton [e+ e-]");
    //keep in mind double counting, if you enabled brems with "delta" or "sum"

    my_reaction->Print();

    //Attach a control histogram
    TH1F *pp_sum = 
	new TH1F ("pp_sum", "pp DiLepton mass (coherent sum)", 100, 0., 0.6);
    pp_sum->Sumw2();

    my_reaction->Do(pp_sum, "_x=[dilepton]->M()");

    my_reaction->Preheating(100);

    my_reaction->Loop(10000);

    
    //It is very crucial to correct the histo for binsize
    PUtils::correct(pp_sum); 


    TCanvas *c1 = new TCanvas("ee_mass", "ee invmass", 800, 800);
    c1->SetLogy(1);
    pp_sum->Draw();

}
 pp_cocktail_1.25.C:1
 pp_cocktail_1.25.C:2
 pp_cocktail_1.25.C:3
 pp_cocktail_1.25.C:4
 pp_cocktail_1.25.C:5
 pp_cocktail_1.25.C:6
 pp_cocktail_1.25.C:7
 pp_cocktail_1.25.C:8
 pp_cocktail_1.25.C:9
 pp_cocktail_1.25.C:10
 pp_cocktail_1.25.C:11
 pp_cocktail_1.25.C:12
 pp_cocktail_1.25.C:13
 pp_cocktail_1.25.C:14
 pp_cocktail_1.25.C:15
 pp_cocktail_1.25.C:16
 pp_cocktail_1.25.C:17
 pp_cocktail_1.25.C:18
 pp_cocktail_1.25.C:19
 pp_cocktail_1.25.C:20
 pp_cocktail_1.25.C:21
 pp_cocktail_1.25.C:22
 pp_cocktail_1.25.C:23
 pp_cocktail_1.25.C:24
 pp_cocktail_1.25.C:25
 pp_cocktail_1.25.C:26
 pp_cocktail_1.25.C:27
 pp_cocktail_1.25.C:28
 pp_cocktail_1.25.C:29
 pp_cocktail_1.25.C:30
 pp_cocktail_1.25.C:31
 pp_cocktail_1.25.C:32
 pp_cocktail_1.25.C:33
 pp_cocktail_1.25.C:34
 pp_cocktail_1.25.C:35
 pp_cocktail_1.25.C:36
 pp_cocktail_1.25.C:37
 pp_cocktail_1.25.C:38
 pp_cocktail_1.25.C:39
 pp_cocktail_1.25.C:40
 pp_cocktail_1.25.C:41
 pp_cocktail_1.25.C:42
 pp_cocktail_1.25.C:43
 pp_cocktail_1.25.C:44
 pp_cocktail_1.25.C:45
 pp_cocktail_1.25.C:46
 pp_cocktail_1.25.C:47
 pp_cocktail_1.25.C:48
 pp_cocktail_1.25.C:49
 pp_cocktail_1.25.C:50
 pp_cocktail_1.25.C:51
 pp_cocktail_1.25.C:52
 pp_cocktail_1.25.C:53
 pp_cocktail_1.25.C:54
 pp_cocktail_1.25.C:55
 pp_cocktail_1.25.C:56
 pp_cocktail_1.25.C:57
 pp_cocktail_1.25.C:58
 pp_cocktail_1.25.C:59
 pp_cocktail_1.25.C:60
 pp_cocktail_1.25.C:61
 pp_cocktail_1.25.C:62
 pp_cocktail_1.25.C:63
 pp_cocktail_1.25.C:64
 pp_cocktail_1.25.C:65
 pp_cocktail_1.25.C:66
 pp_cocktail_1.25.C:67
 pp_cocktail_1.25.C:68
 pp_cocktail_1.25.C:69
 pp_cocktail_1.25.C:70
 pp_cocktail_1.25.C:71
 pp_cocktail_1.25.C:72
 pp_cocktail_1.25.C:73
 pp_cocktail_1.25.C:74
 pp_cocktail_1.25.C:75
 pp_cocktail_1.25.C:76
 pp_cocktail_1.25.C:77
 pp_cocktail_1.25.C:78
 pp_cocktail_1.25.C:79
 pp_cocktail_1.25.C:80
 pp_cocktail_1.25.C:81
 pp_cocktail_1.25.C:82
 pp_cocktail_1.25.C:83
 pp_cocktail_1.25.C:84
 pp_cocktail_1.25.C:85
 pp_cocktail_1.25.C:86
 pp_cocktail_1.25.C:87
 pp_cocktail_1.25.C:88
 pp_cocktail_1.25.C:89
 pp_cocktail_1.25.C:90
 pp_cocktail_1.25.C:91
 pp_cocktail_1.25.C:92
 pp_cocktail_1.25.C:93
 pp_cocktail_1.25.C:94
 pp_cocktail_1.25.C:95
 pp_cocktail_1.25.C:96
 pp_cocktail_1.25.C:97
 pp_cocktail_1.25.C:98
 pp_cocktail_1.25.C:99
 pp_cocktail_1.25.C:100
 pp_cocktail_1.25.C:101
 pp_cocktail_1.25.C:102