Skip to content

Commit 372f088

Browse files
updates to yamls, KPP test changed to be applied to both conventional and AI tracking
1 parent c32f103 commit 372f088

File tree

5 files changed

+67
-40
lines changed

5 files changed

+67
-40
lines changed

etc/services/data-ai.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ services:
4343
name: EBHB
4444
- class: org.jlab.service.dc.DCTBEngine
4545
name: DCTB
46+
- class: org.jlab.service.fmt.FMTEngine
47+
name: FMT
4648
- class: org.jlab.service.ftof.FTOFTBEngine
4749
name: FTOFTB
4850
- class: org.jlab.service.eb.EBTBEngine

etc/services/data-aicv.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ services:
5252
# DC AI assisted TB tracking
5353
- class: org.jlab.service.dc.DCTBEngineAI
5454
name: DCTAI
55+
- class: org.jlab.service.fmt.FMTEngine
56+
name: FMT
5557
- class: org.jlab.service.ftof.FTOFTBEngine
5658
name: FTOFTB
5759
- class: org.jlab.service.eb.EBTBEngine

etc/services/kpp.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ services:
2323
# DC using clustering: regular HB tracking
2424
- class: org.jlab.service.dc.DCHBPostClusterConv
2525
name: DCHB
26+
# DC using clustering on AI hits: NN assisted HB tracking
27+
- class: org.jlab.service.dc.DCHBPostClusterAI
28+
name: DCHAI
2629
- class: org.jlab.service.ftof.FTOFHBEngine
2730
name: FTOFHB
2831
- class: org.jlab.service.ec.ECEngine
@@ -41,13 +44,22 @@ services:
4144
name: LTCC
4245
- class: org.jlab.service.eb.EBHBEngine
4346
name: EBHB
47+
- class: org.jlab.service.eb.EBHBAIEngine
48+
name: EBHAI
4449
# DC regular TB tracking
4550
- class: org.jlab.service.dc.DCTBEngine
4651
name: DCTB
52+
# DC AI assisted TB tracking
53+
- class: org.jlab.service.dc.DCTBEngineAI
54+
name: DCTAI
55+
- class: org.jlab.service.fmt.FMTEngine
56+
name: FMT
4757
- class: org.jlab.service.ftof.FTOFTBEngine
4858
name: FTOFTB
4959
- class: org.jlab.service.eb.EBTBEngine
5060
name: EBTB
61+
- class: org.jlab.service.eb.EBTBAIEngine
62+
name: EBTAI
5163
- class: org.jlab.rec.rich.RICHEBEngine
5264
name: RICH
5365
- class: org.jlab.service.rtpc.RTPCEngine
@@ -66,14 +78,10 @@ configuration:
6678
# magfieldTorusYShift: "0.0"
6779
# magfieldTorusZShift: "0.0"
6880
# examples of yaml settings for DC services
69-
# DCI:
70-
# variation: default
81+
# DCRC:
7182
# dcGeometryVariation: rga_spring2018
7283
# dcT2DFunc: "Polynomial"
7384
# dcWireDistortion: "true"
74-
# DCRC:
75-
# variation: default
76-
# dcGeometryVariation: rga_spring2018
7785
# example of how to set variation and timestamp for a service, uncomment to use
7886
# EBTB:
7987
# variation: default

validation/advanced-tests/run-advanced-tests.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ esac
2929

3030

3131
chmod +x install-claracre-clas.sh
32-
echo Y | ./install-claracre-clas.sh -f 4.3.9 -l local
32+
echo Y | ./install-claracre-clas.sh -f 5.0.2 -j 11 -l local
3333
if [ $? != 0 ] ; then echo "clara installation error" ; exit 1 ; fi
3434
rm install-claracre-clas.sh
3535

@@ -64,7 +64,6 @@ ls twoTrackEvents_809.hipo > files.list
6464
echo "set fileList $PWD/files.list" >> cook.clara
6565
echo "set servicesFile $CLARA_HOME/plugins/clas12/config/kpp.yaml" >> cook.clara
6666
echo "run local" >> cook.clara
67-
echo "run local" >> cook.clara
6867
echo "exit" >> cook.clara
6968
$CLARA_HOME/bin/clara-shell cook.clara
7069
#if [ $? != 0 ] ; then echo "reconstruction with clara failure" ; exit 1 ; fi

validation/advanced-tests/src/kpptracking/KppTrackingTest.java

Lines changed: 49 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,54 @@
1212
* @author naharrison
1313
*/
1414
public class KppTrackingTest {
15-
16-
@Test
17-
public void testKppTracking() {
18-
19-
HipoDataSource reader = new HipoDataSource();
20-
reader.open("out_twoTrackEvents_809.hipo");
21-
22-
int totalCount = 0;
23-
int twoTrackCount = 0;
24-
while(reader.hasEvent()) {
25-
totalCount++;
26-
DataEvent event = reader.getNextEvent();
27-
if(event.hasBank("REC::Particle")) {
28-
DataBank recBank = event.getBank("REC::Particle");
29-
boolean foundElectron = false;
30-
boolean foundCharged = false;
31-
for(int k = 0; k < recBank.rows(); k++) {
32-
byte charge = recBank.getByte("charge", k);
33-
int pid = recBank.getInt("pid", k);
34-
if(foundElectron == false && pid == 11) foundElectron = true;
35-
else if(charge != 0) foundCharged = true;
36-
}
37-
if(foundElectron && foundCharged) twoTrackCount++;
38-
}
39-
}
40-
41-
reader.close();
42-
43-
System.out.println("Total count: " + totalCount + ". 2 track count: " + twoTrackCount);
44-
45-
assertEquals(twoTrackCount > 30, true); // this should be stricter!
46-
47-
}
15+
16+
@Test
17+
public void testKppTracking() {
18+
19+
HipoDataSource reader = new HipoDataSource();
20+
reader.open("out_twoTrackEvents_809.hipo");
21+
22+
int totalCount = 0;
23+
int twoTrackCountCV = 0;
24+
int twoTrackCountAI = 0;
25+
while (reader.hasEvent()) {
26+
totalCount++;
27+
DataEvent event = reader.getNextEvent();
28+
if(this.checkTracks(event, "REC::Particle")) twoTrackCountCV++;
29+
if(this.checkTracks(event, "RECAI::Particle")) twoTrackCountAI++;
30+
}
31+
reader.close();
32+
33+
System.out.println("\nConventional tracking results:");
34+
System.out.println("\tTotal count: " + totalCount + "\n\t2-track count: " + twoTrackCountCV);
35+
System.out.println("\nAI tracking results:");
36+
System.out.println("\tTotal count: " + totalCount + "\n\t2-track count: " + twoTrackCountAI);
37+
38+
assertEquals(twoTrackCountCV > 30, true); // this should be stricter!
39+
assertEquals(twoTrackCountAI > 30, true); // this should be stricter!
40+
41+
}
42+
43+
private boolean checkTracks(DataEvent event, String recBank) {
44+
boolean value = false;
45+
if (event.hasBank(recBank)) {
46+
DataBank bank = event.getBank(recBank);
47+
boolean foundElectron = false;
48+
boolean foundCharged = false;
49+
for (int k = 0; k < bank.rows(); k++) {
50+
byte charge = bank.getByte("charge", k);
51+
int pid = bank.getInt("pid", k);
52+
if (foundElectron == false && pid == 11) {
53+
foundElectron = true;
54+
} else if (charge != 0) {
55+
foundCharged = true;
56+
}
57+
}
58+
if (foundElectron && foundCharged) {
59+
value = true;
60+
}
61+
}
62+
return value;
63+
}
4864

4965
}

0 commit comments

Comments
 (0)