Pluto v6.3.0
Loading...
Searching...
No Matches
make_demo_pfilter.C File Reference

Go to the source code of this file.

Functions

 for (int i=0;i< nev;i++)
eff_elec Divide (gen)
p AddCommand ("echo ********************************************************************************")
p AddCommand ("echo Usage: This filter works in 2 modi:")
p AddCommand ("echo Usage: 1.) inclusive:")
p AddCommand ("echo Usage: default")
p AddCommand ("echo Usage: Add in your macro after filter attachment:")
p AddCommand ("echo Usage: makeDistributionManager()->Startup(\"_filter_exclusive=1\");")
p AddCommand ("echo Usage: Momentum smearing is applied, you can change:")
p AddCommand ("echo Usage: makeDistributionManager()->Startup(\"_filter_smear_factor=....\");")
p AddCommand ("echo Debug mode: makeDistributionManager()->Startup(\"_filter_debug=1\");")
p AddCommand ("_filter_debug=0")
p Write ()
s AddCommand ("echo This event loop uses the demo filter ")
l AddCommand ("if (_filter_debug); echo **** New event called")
l AddCommand (eff_elec,"eff_ep = Eval(); rnd = sampleFlat(); if (rnd>eff_ep); [e+]->SetInActive(); removed=1")
l AddCommand ("if (_filter_debug && removed); echo e+: $_x, $_y, $_z eff: $eff_ep <removed>")
l AddCommand ("if (_filter_debug && !removed); echo e+: $_x, $_y, $_z eff: $eff_ep")
l AddCommand ("formore e+; goto _start")
l AddCommand ("if (_filter_debug && removed); echo e-: $_x, $_y, $_z eff: $eff_em <removed>")
l AddCommand ("if (_filter_debug && !removed); echo e-: $_x, $_y, $_z eff: $eff_em")
l AddCommand ("formore e-; goto _start2")
l AddCommand ("if (!_filter_exclusive); goto _end;")
l AddCommand (eff_protons,"eff_p = Eval(); rnd = sampleFlat(); if (rnd>eff_p); [p]->SetInActive(); removed=1")
l AddCommand ("if (_filter_debug && removed); echo p: $_x, $_y, $_z eff: $eff_p <removed>")
l AddCommand ("if (_filter_debug && !removed); echo p: $_x, $_y, $_z eff: $eff_p")
l AddCommand ("formore p; goto _start_proton_loop")
l AddCommand ("_end:")

Variables

TH3F * eff_elec
TH3F * eff_protons
int nev = 1000000
TFile * f = new TFile("pluto_demo_filter.root", "RECREATE")
PCommandList * p = new PCommandList("_main", "echo **** This is our demo filter, v1")
PCommandList * s
PCommandList * l = new PCommandList("_loop")

Function Documentation

◆ AddCommand() [1/25]

l AddCommand ( "_end:" )

◆ AddCommand() [2/25]

p AddCommand ( )

◆ AddCommand() [3/25]

s AddCommand ( "echo ********************************************************************************" )

◆ AddCommand() [4/25]

p AddCommand ( "echo Debug mode: makeDistributionManager()->Startup(\"_filter_debug=1\");" )

◆ AddCommand() [5/25]

s AddCommand ( "echo This event loop uses the demo filter " )

◆ AddCommand() [6/25]

p AddCommand ( "echo Usage: Add in your macro after filter attachment:" )

◆ AddCommand() [7/25]

p AddCommand ( "echo Usage: default" )

◆ AddCommand() [8/25]

p AddCommand ( "echo Usage: makeDistributionManager()->Startup(\"_filter_exclusive=1\");" )

◆ AddCommand() [9/25]

p AddCommand ( "echo Usage: makeDistributionManager()->Startup(\"_filter_smear_factor=....\");" )

◆ AddCommand() [10/25]

p AddCommand ( "echo Usage: 1.)

◆ AddCommand() [11/25]

p AddCommand ( "echo Usage: Momentum smearing is applied,
you can change:"  )

◆ AddCommand() [12/25]

p AddCommand ( "echo Usage: This filter works in 2 modi:" )

◆ AddCommand() [13/25]

l AddCommand ( "formore e+; goto _start" )

◆ AddCommand() [14/25]

l AddCommand ( "formore e-; goto _start2" )

◆ AddCommand() [15/25]

l AddCommand ( "formore p; goto _start_proton_loop" )

◆ AddCommand() [16/25]

l AddCommand ( "if (!_filter_exclusive); goto _end;" )

◆ AddCommand() [17/25]

l AddCommand ( "if (_filter_debug && !removed); echo e+: $_x,
$_y,
$_z eff:$eff_ep" )

◆ AddCommand() [18/25]

l AddCommand ( "if (_filter_debug && !removed); echo e-: $_x,
$_y,
$_z eff:$eff_em" )

◆ AddCommand() [19/25]

l AddCommand ( "if (_filter_debug && !removed); echo p: $_x,
$_y,
$_z eff:$eff_p" )

◆ AddCommand() [20/25]

l AddCommand ( "if (_filter_debug && removed); echo e+: $_x,
$_y,
$_z eff:$eff_ep< removed >" )

◆ AddCommand() [21/25]

l AddCommand ( "if (_filter_debug && removed); echo e-: $_x,
$_y,
$_z eff:$eff_em< removed >" )

◆ AddCommand() [22/25]

l AddCommand ( "if (_filter_debug && removed); echo p: $_x,
$_y,
$_z eff:$eff_p< removed >" )

◆ AddCommand() [23/25]

l AddCommand ( "if (_filter_debug); echo **** New event called" )

◆ AddCommand() [24/25]

l AddCommand ( eff_elec )

◆ AddCommand() [25/25]

l AddCommand ( eff_protons )

◆ Divide()

eff_protons Divide ( gen )

◆ for()

for ( )

Definition at line 55 of file make_demo_pfilter.C.

◆ Write()

p Write ( )

Variable Documentation

◆ eff_elec

TH3F* eff_elec
Initial value:
=
new TH3F ("eff_elec", "Efficiency matrix electrons", 30, 0, 1500, 20, -1, 1, 20, 0, 360)

Definition at line 48 of file make_demo_pfilter.C.

◆ eff_protons

TH3F* eff_protons
Initial value:
=
new TH3F ("eff_protons", "Efficiency matrix protons", 30, 0, 1500, 20, -1, 1, 20, 0, 360)

Definition at line 50 of file make_demo_pfilter.C.

◆ f

TFile* f = new TFile("pluto_demo_filter.root", "RECREATE")

Definition at line 89 of file make_demo_pfilter.C.

◆ l

PCommandList* l = new PCommandList("_loop")

Definition at line 127 of file make_demo_pfilter.C.

◆ nev

int nev = 1000000

Definition at line 54 of file make_demo_pfilter.C.

◆ p

PCommandList* p = new PCommandList("_main", "echo **** This is our demo filter, v1")

Definition at line 92 of file make_demo_pfilter.C.

◆ s

Initial value:
=
new PCommandList("_startup",
"echo ********************************************************************************")

Definition at line 117 of file make_demo_pfilter.C.