Subversion Repositories f9daq

Rev

Rev 266 | Rev 271 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 266 Rev 267
Line 8... Line 8...
8
        .appendField("1. Particle");
8
        .appendField("1. Particle");
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("2. Particle");
12
        .appendField("2. Particle");
-
 
13
    this.appendDummyInput()
-
 
14
        .appendField("Same particle lists?")
-
 
15
        .appendField(new Blockly.FieldDropdown([["No", "0"], ["Yes", "1"]]), "sameparticles");
13
    this.appendDummyInput()
16
    this.appendDummyInput()
14
        .appendField("New Particle")
17
        .appendField("New Particle")
15
        .appendField(new Blockly.FieldDropdown([["electron", "ELECTRON"], ["muon", "MUON"], ["pion", "PION"], ["kaon", "KAON"], ["proton", "PROTON"], ["photon", "PHOTON"], ["Ks", "KS"], ["D", "D"], ["D*", "DSTAR"], ["J/Psi", "JPSI"]]), "simplepid");
18
        .appendField(new Blockly.FieldDropdown([["electron", "ELECTRON"], ["muon", "MUON"], ["pion", "PION"], ["kaon", "KAON"], ["proton", "PROTON"], ["photon", "PHOTON"], ["Ks", "KS"], ["D", "D"], ["D*", "DSTAR"], ["J/Psi", "JPSI"]]), "simplepid");
16
    this.appendDummyInput()
19
    this.appendDummyInput()
17
        .setAlign(Blockly.ALIGN_RIGHT)
20
        .setAlign(Blockly.ALIGN_RIGHT)
18
        .appendField("Min mass [GeV] :")
21
        .appendField("Min mass [GeV] :")
19
        .appendField(new Blockly.FieldNumber(0, 0, Infinity, 0.0001), "mass0");
22
        .appendField(new Blockly.FieldNumber(0, 0, Infinity, 0.0001), "mass0");
20
    this.appendDummyInput()
23
    this.appendDummyInput()
21
        .setAlign(Blockly.ALIGN_RIGHT)
24
        .setAlign(Blockly.ALIGN_RIGHT)
22
        .appendField("Max mass  [GeV] :")
25
        .appendField("Max mass  [GeV] :")
23
        .appendField(new Blockly.FieldNumber(0, 0, Infinity, 0.0001), "mass1");
26
        .appendField(new Blockly.FieldNumber(0, 0, Infinity, 0.0001), "mass1");
24
    this.appendValueInput("histogram")
27
    this.appendValueInput("histogram")
25
        .setCheck("histogram")
28
        .setCheck("histogram")
26
        .appendField("Histogram");
29
        .appendField("Histogram");
27
    this.setInputsInline(false);
30
    this.setInputsInline(false);
28
    this.setOutput(true, "particle list");
31
    this.setOutput(true, "particle list");
29
    this.setColour(120);
32
    this.setColour(120);
30
    this.setTooltip('');
33
    this.setTooltip('Combine two particles in the new particle by making combinations between particles in two input lists');
31
    this.setHelpUrl('http://www.example.com/');
34
    this.setHelpUrl('http://www.example.com/');
32
  }
35
  }
33
};
36
};
34
 
37
 
35
Blockly.Blocks['particle_selector'] = {
38
Blockly.Blocks['particle_selector'] = {
Line 49... Line 52...
49
        .setCheck("histogram")
52
        .setCheck("histogram")
50
        .appendField("Histogram");
53
        .appendField("Histogram");
51
    this.setInputsInline(false);
54
    this.setInputsInline(false);
52
    this.setOutput(true, "particle list");
55
    this.setOutput(true, "particle list");
53
    this.setColour(65);
56
    this.setColour(65);
54
    this.setTooltip('');
57
    this.setTooltip('Create a new list of particles based on the original particle list or any input particle list');
55
    this.setHelpUrl('http://www.example.com/');
58
    this.setHelpUrl('http://www.example.com/');
56
  }
59
  }
57
};
60
};
58
 
61
 
59
Blockly.Blocks['histogram_creator'] = {
62
Blockly.Blocks['histogram_creator'] = {
Line 80... Line 83...
80
        .appendField("Variable")
83
        .appendField("Variable")
81
        .appendField(new Blockly.FieldDropdown([["mass", "GetMass"], ["momentum", "GetMomentum"], ["energy", "GetEnergy"]]), "varname");
84
        .appendField(new Blockly.FieldDropdown([["mass", "GetMass"], ["momentum", "GetMomentum"], ["energy", "GetEnergy"]]), "varname");
82
    this.setInputsInline(true);
85
    this.setInputsInline(true);
83
    this.setOutput(true, "histogram");
86
    this.setOutput(true, "histogram");
84
    this.setColour(20);
87
    this.setColour(20);
85
    this.setTooltip('');
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');
86
    this.setHelpUrl('http://www.example.com/');
89
    this.setHelpUrl('http://www.example.com/');
87
  }
90
  }
88
};
91
};
89
 
92
 
90
Blockly.Blocks['simple_analysis'] = {
93
Blockly.Blocks['simple_analysis'] = {
91
  init: function() {
94
  init: function() {
92
    this.appendDummyInput()
95
    this.appendDummyInput()
93
        .appendField("Belle II Masterclass");
96
        .appendField("Belle II Masterclass");
94
    this.appendDummyInput()
97
    this.appendDummyInput()
95
        .appendField("Number of events: ")
98
        .appendField("Number of events: ")
96
        .appendField(new Blockly.FieldNumber(5000, 0), "neve");
99
        .appendField(new Blockly.FieldNumber(5000, 0), "neve");
97
    this.appendDummyInput()
100
    this.appendDummyInput()
-
 
101
        .appendField("First event: ")
-
 
102
        .appendField(new Blockly.FieldNumber(0, 0), "first");
-
 
103
    this.appendDummyInput()
98
        .appendField("Data Source")
104
        .appendField("Data Source")
99
        .appendField(new Blockly.FieldDropdown([["hadron-1", "1"], ["hadron-2", "2"]]), "datasource");
105
        .appendField(new Blockly.FieldDropdown([["hadron-1", "1"], ["hadron-2", "2"]]), "datasource");
-
 
106
    this.appendDummyInput()
-
 
107
        .appendField("Print particle list?")
-
 
108
        .appendField(new Blockly.FieldDropdown([["No", "0"], ["Yes", "1"]]), "print");
100
    this.appendValueInput("list")
109
    this.appendValueInput("list")
101
        .setCheck("particle list")
110
        .setCheck("particle list")
102
        .appendField("Particle List");
111
        .appendField("Particle List");
103
    this.setColour(230);
112
    this.setColour(230);
104
    this.setTooltip('');
113
    this.setTooltip('Run the analysis, specify data source, number of events, first event and a list of particles to process.');
105
    this.setHelpUrl('http://www.example.com/');
114
    this.setHelpUrl('http://www.example.com/');
106
  }
115
  }
107
};
116
};
108
 
117
 
109
Blockly.Blocks['particle_mass_fix'] = {
118
Blockly.Blocks['particle_mass_fix'] = {
Line 113... Line 122...
113
    this.appendValueInput("list")
122
    this.appendValueInput("list")
114
        .setCheck("particle list")
123
        .setCheck("particle list")
115
        .appendField("Particle List");
124
        .appendField("Particle List");
116
    this.setOutput(true, "particle list");
125
    this.setOutput(true, "particle list");
117
    this.setColour(150);
126
    this.setColour(150);
118
    this.setTooltip('');
127
    this.setTooltip('');
119
    this.setHelpUrl('http://www.example.com/');
128
    this.setHelpUrl('http://www.example.com/');
120
  }
129
  }
121
};
130
};
122
 
131
 
123
Blockly.Blocks['primary_list'] = {
132
Blockly.Blocks['primary_list'] = {
Line 128... Line 137...
128
        .setCheck("histogram")
137
        .setCheck("histogram")
129
        .appendField("Histogram:");
138
        .appendField("Histogram:");
130
    this.setInputsInline(true);
139
    this.setInputsInline(true);
131
    this.setOutput(true, "particle list");
140
    this.setOutput(true, "particle list");
132
    this.setColour(180);
141
    this.setColour(180);
133
    this.setTooltip('');
142
    this.setTooltip('Create a list of primary particles, if not used, the primary particles are used in the empty particle list connectors');
134
    this.setHelpUrl('http://www.example.com/');
143
    this.setHelpUrl('http://www.example.com/');
135
  }
144
  }
136
};
145
};