Rev 302 | Rev 319 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 302 | Rev 318 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | this.appendDummyInput() |
3 | this.appendDummyInput() |
4 | .appendField("Combine 2 particles"); |
4 | .appendField("Combine 2 particles"); |
5 | this.appendValueInput("list1") |
5 | this.appendValueInput("list1") |
6 | .setCheck("particle list") |
6 | .setCheck("particle list") |
7 | .setAlign(Blockly.ALIGN_RIGHT) |
7 | .setAlign(Blockly.ALIGN_RIGHT) |
8 | .appendField(" |
8 | .appendField("Particle 1"); |
9 | this.appendValueInput("list2") |
9 | this.appendValueInput("list2") |
10 | .setCheck("particle list") |
10 | .setCheck("particle list") |
11 | .setAlign(Blockly.ALIGN_RIGHT) |
11 | .setAlign(Blockly.ALIGN_RIGHT) |
12 | .appendField(" |
12 | .appendField("Particle 2"); |
13 | this.appendDummyInput() |
13 | this.appendDummyInput() |
14 | .appendField("Same particle lists?") |
14 | .appendField("Same particle lists?") |
15 | .appendField(new Blockly.FieldDropdown([["No", "0"], ["Yes", "1"]]), "sameparticles"); |
15 | .appendField(new Blockly.FieldDropdown([["No", "0"], ["Yes", "1"]]), "sameparticles"); |
16 | this.appendDummyInput() |
16 | this.appendDummyInput() |
17 | .appendField("Set identity to") |
17 | .appendField("Set identity to") |
Line 28... | Line 28... | ||
28 | .setCheck("histogram") |
28 | .setCheck("histogram") |
29 | .appendField("Histogram"); |
29 | .appendField("Histogram"); |
30 | this.setInputsInline(false); |
30 | this.setInputsInline(false); |
31 | this.setOutput(true, "particle list"); |
31 | this.setOutput(true, "particle list"); |
32 | this.setColour(120); |
32 | this.setColour(120); |
33 | this.setTooltip('Combine two particles in the new particle by making combinations between particles in two input |
33 | this.setTooltip('Combine two particles in the new particle by making combinations between particles in two input lists. If the input connector is empty, the full particle list will be used'); |
34 | this.setHelpUrl('http:// |
34 | this.setHelpUrl('http://belle.jp/'); |
35 | } |
35 | } |
36 | }; |
36 | }; |
37 | 37 | ||
38 | Blockly.Blocks['particle_selector'] = { |
38 | Blockly.Blocks['particle_selector'] = { |
39 | init: function() { |
39 | init: function() { |
40 | this.appendDummyInput() |
40 | this.appendDummyInput() |
41 | .appendField("Select Particles"); |
41 | .appendField("Select Particles"); |
42 | this.appendValueInput("list1") |
42 | this.appendValueInput("list1") |
43 | .setCheck("particle list") |
43 | .setCheck("particle list") |
44 | .appendField(" |
44 | .appendField("Particle"); |
45 | this.appendDummyInput() |
45 | this.appendDummyInput() |
46 | .appendField("Charge") |
46 | .appendField("Charge") |
47 | .appendField(new Blockly.FieldDropdown([["-1", "-1"], ["0", "0"], ["1", "1"], ["Any", "2"]]), "chargelist"); |
47 | .appendField(new Blockly.FieldDropdown([["-1", "-1"], ["0", "0"], ["1", "1"], ["Any", "2"]]), "chargelist"); |
48 | this.appendDummyInput() |
48 | this.appendDummyInput() |
49 | .appendField("Type") |
49 | .appendField("Type") |
Line 52... | Line 52... | ||
52 | .setCheck("histogram") |
52 | .setCheck("histogram") |
53 | .appendField("Histogram"); |
53 | .appendField("Histogram"); |
54 | this.setInputsInline(false); |
54 | this.setInputsInline(false); |
55 | this.setOutput(true, "particle list"); |
55 | this.setOutput(true, "particle list"); |
56 | this.setColour(65); |
56 | this.setColour(65); |
57 | this.setTooltip('Create a new list of particles based on the |
57 | this.setTooltip('Create a new list of particles based on the input particle list. If the input is empty, all the particles in the event are used.'); |
58 | this.setHelpUrl('http:// |
58 | this.setHelpUrl('http://belle.jp/'); |
59 | } |
59 | } |
60 | }; |
60 | }; |
61 | 61 | ||
62 | Blockly.Blocks['histogram_creator'] = { |
62 | Blockly.Blocks['histogram_creator'] = { |
63 | init: function() { |
63 | init: function() { |
Line 84... | Line 84... | ||
84 | .appendField(new Blockly.FieldDropdown([["mass", "GetMass"], ["momentum", "GetMomentum"], ["energy", "GetEnergy"],["charge", "GetCharge"], ["identity", "GetPid"],["polar angle", "GetTheta"],["cos(polar ang.)", "GetCosTheta"],["px", "GetXMomentum"],["py", "GetYMomentum"],["pz", "GetZMomentum"],["pT", "GetTransverseMomentum"]]), "varname"); |
84 | .appendField(new Blockly.FieldDropdown([["mass", "GetMass"], ["momentum", "GetMomentum"], ["energy", "GetEnergy"],["charge", "GetCharge"], ["identity", "GetPid"],["polar angle", "GetTheta"],["cos(polar ang.)", "GetCosTheta"],["px", "GetXMomentum"],["py", "GetYMomentum"],["pz", "GetZMomentum"],["pT", "GetTransverseMomentum"]]), "varname"); |
85 | this.setInputsInline(true); |
85 | this.setInputsInline(true); |
86 | this.setOutput(true, "histogram"); |
86 | this.setOutput(true, "histogram"); |
87 | this.setColour(20); |
87 | this.setColour(20); |
88 | this.setTooltip('This block handles the histogram creation and filling. Define a number of bins, minimum and maximum of the range and assign a variable to plot'); |
88 | this.setTooltip('This block handles the histogram creation and filling. Define a number of bins, minimum and maximum of the range and assign a variable to plot'); |
89 | this.setHelpUrl('http:// |
89 | this.setHelpUrl('http://belle2.jp/'); |
90 | } |
90 | } |
91 | }; |
91 | }; |
92 | 92 | ||
93 | Blockly.Blocks['simple_analysis'] = { |
93 | Blockly.Blocks['simple_analysis'] = { |
94 | init: function() { |
94 | init: function() { |
Line 109... | Line 109... | ||
109 | this.appendValueInput("list") |
109 | this.appendValueInput("list") |
110 | .setCheck("particle list") |
110 | .setCheck("particle list") |
111 | .appendField("Particle List"); |
111 | .appendField("Particle List"); |
112 | this.setColour(230); |
112 | this.setColour(230); |
113 | this.setTooltip('Run the analysis, specify data source, number of events, first event and a list of particles to process.'); |
113 | this.setTooltip('Run the analysis, specify data source, number of events, first event and a list of particles to process.'); |
114 | this.setHelpUrl('http:// |
114 | this.setHelpUrl('http://belle2.jp/'); |
115 | } |
115 | } |
116 | }; |
116 | }; |
117 | 117 | ||
118 | Blockly.Blocks['particle_mass_fix'] = { |
118 | Blockly.Blocks['particle_mass_fix'] = { |
119 | init: function() { |
119 | init: function() { |
Line 123... | Line 123... | ||
123 | .setCheck("particle list") |
123 | .setCheck("particle list") |
124 | .appendField("Particle List"); |
124 | .appendField("Particle List"); |
125 | this.setOutput(true, "particle list"); |
125 | this.setOutput(true, "particle list"); |
126 | this.setColour(150); |
126 | this.setColour(150); |
127 | this.setTooltip(''); |
127 | this.setTooltip(''); |
128 | this.setHelpUrl('http:// |
128 | this.setHelpUrl('http://belle2.jp/'); |
129 | } |
129 | } |
130 | }; |
130 | }; |
131 | 131 | ||
132 | Blockly.Blocks['primary_list'] = { |
132 | Blockly.Blocks['primary_list'] = { |
133 | init: function() { |
133 | init: function() { |
Line 138... | Line 138... | ||
138 | .appendField("Histogram:"); |
138 | .appendField("Histogram:"); |
139 | this.setInputsInline(true); |
139 | this.setInputsInline(true); |
140 | this.setOutput(true, "particle list"); |
140 | this.setOutput(true, "particle list"); |
141 | this.setColour(180); |
141 | this.setColour(180); |
142 | this.setTooltip('Create a list of primary particles, if not used, the primary particles are used in the empty particle list connectors'); |
142 | this.setTooltip('Create a list of primary particles, if not used, the primary particles are used in the empty particle list connectors'); |
143 | this.setHelpUrl('http:// |
143 | this.setHelpUrl('http://belle2.jp/'); |
144 | } |
144 | } |
145 | }; |
145 | }; |