Rev 318 | Rev 321 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 318 | Rev 319 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | .appendField(new Blockly.FieldNumber(0, 0, Infinity, 0.0001), "mass0"); |
22 | .appendField(new Blockly.FieldNumber(0, 0, Infinity, 0.0001), "mass0"); |
23 | this.appendDummyInput() |
23 | this.appendDummyInput() |
24 | .setAlign(Blockly.ALIGN_RIGHT) |
24 | .setAlign(Blockly.ALIGN_RIGHT) |
25 | .appendField("Max mass [GeV/c2] :") |
25 | .appendField("Max mass [GeV/c2] :") |
26 | .appendField(new Blockly.FieldNumber(0, 0, Infinity, 0.0001), "mass1"); |
26 | .appendField(new Blockly.FieldNumber(0, 0, Infinity, 0.0001), "mass1"); |
- | 27 | //this.appendValueInput("histogram").setCheck("histogram").appendField("Histogram"); |
|
27 | this. |
28 | this.appendDummyInput().appendField("Histograms"); |
28 |
|
29 | this.appendStatementInput("histogram") |
29 | . |
30 | .setCheck("histogram"); |
30 | this.setInputsInline(false); |
31 | this.setInputsInline(false); |
31 | this.setOutput(true, "particle list"); |
32 | this.setOutput(true, "particle list"); |
32 | this.setColour(120); |
33 | this.setColour(120); |
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.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://belle.jp/'); |
35 | this.setHelpUrl('http://belle.jp/'); |
35 | } |
36 | } |
36 | }; |
37 | }; |
37 | 38 | ||
38 | Blockly.Blocks['particle_selector'] = { |
39 | Blockly.Blocks['particle_selector'] = { |
39 | init: function() { |
40 | init: function() { |
40 | this.appendDummyInput() |
41 | this.appendDummyInput() |
41 | .appendField("Select Particles"); |
42 | .appendField("Select Particles"); |
42 | this.appendValueInput("list1") |
43 | this.appendValueInput("list1") |
43 | .setCheck("particle list") |
44 | .setCheck("particle list") |
44 | .appendField("Particle"); |
45 | .appendField("Particle"); |
45 | this.appendDummyInput() |
46 | this.appendDummyInput() |
46 | .appendField("Charge") |
47 | .appendField("Charge") |
47 | .appendField(new Blockly.FieldDropdown([["-1", "-1"], ["0", "0"], ["1", "1"], ["Any", "2"]]), "chargelist"); |
48 | .appendField(new Blockly.FieldDropdown([["-1", "-1"], ["0", "0"], ["1", "1"], ["Any", "2"]]), "chargelist"); |
48 | this.appendDummyInput() |
49 | this.appendDummyInput() |
49 | .appendField("Type") |
50 | .appendField("Type") |
50 | .appendField(new Blockly.FieldDropdown([["electron", "ELECTRON"], ["muon", "MUON"], ["pion", "PION"], ["kaon", "KAON"], ["proton", "PROTON"], ["photon", "PHOTON"], ["D", "D"], ["D*", "DSTAR"], ["Phi", "PHI"],["J/Psi", "JPSI"], ["B", "B"], ["all particles", "ALL"]]), "simplepid"); |
51 | .appendField(new Blockly.FieldDropdown([["electron", "ELECTRON"], ["muon", "MUON"], ["pion", "PION"], ["kaon", "KAON"], ["proton", "PROTON"], ["photon", "PHOTON"], ["D", "D"], ["D*", "DSTAR"], ["Phi", "PHI"],["J/Psi", "JPSI"], ["B", "B"], ["all particles", "ALL"]]), "simplepid"); |
- | 52 | //this.appendValueInput("histogram").setCheck("histogram").appendField("Histogram"); |
|
51 | this. |
53 | this.appendDummyInput().appendField("Histograms"); |
52 |
|
54 | this.appendStatementInput("histogram") |
53 | . |
55 | .setCheck("histogram"); |
54 | this.setInputsInline(false); |
56 | this.setInputsInline(false); |
55 | this.setOutput(true, "particle list"); |
57 | this.setOutput(true, "particle list"); |
56 | this.setColour(65); |
58 | this.setColour(65); |
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.'); |
59 | 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://belle.jp/'); |
60 | this.setHelpUrl('http://belle.jp/'); |
Line 81... | Line 83... | ||
81 | .appendField(new Blockly.FieldNumber(0, -Infinity, Infinity, 0.0001), "max"); |
83 | .appendField(new Blockly.FieldNumber(0, -Infinity, Infinity, 0.0001), "max"); |
82 | this.appendDummyInput() |
84 | this.appendDummyInput() |
83 | .appendField("Variable") |
85 | .appendField("Variable") |
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"); |
86 | .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); |
87 | this.setInputsInline(true); |
- | 88 | this.setPreviousStatement(true); |
|
86 | this. |
89 | this.setNextStatement(true); |
87 | this.setColour(20); |
90 | 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'); |
91 | 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://belle2.jp/'); |
92 | this.setHelpUrl('http://belle2.jp/'); |
90 | } |
93 | } |
91 | }; |
94 | }; |