Skip to content

Commit 4e7fbb2

Browse files
Modify FillExposure to work with older sbnanaobj
1 parent bd106d5 commit 4e7fbb2

1 file changed

Lines changed: 24 additions & 3 deletions

File tree

sbncode/CAFMaker/FillExposure.cxx

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ namespace caf
66

77
caf::SRBNBInfo makeSRBNBInfo(sbn::BNBSpillInfo const& info)
88
{
9+
float FOM = info.FOM;
10+
float PreFitFOM = info.PreFitFOM;
11+
float NoMultiWireFOM = info.NoMultiWireFOM;
12+
float finalFOM = -999.;
13+
std::cout << "makeSRBNBInfo: Choosing FOM from available" << std::endl;
14+
std::cout << "makeSRBNBInfo: Manually calculated width:" << FOM << std::endl;
15+
std::cout << "makeSRBNBInfo: Pre-Fit width from database:" << PreFitFOM << std::endl;
16+
std::cout << "makeSRBNBInfo: Assuming width of 1.0:" << NoMultiWireFOM << std::endl;
17+
if((FOM > 0.0) & (FOM < 1.0)){
18+
finalFOM = FOM;
19+
std::cout << "makeSRBNBInfo: Chose manually calculated width" << std::endl;
20+
}
21+
else if((PreFitFOM > 0.0) & (PreFitFOM < 1.0)){
22+
finalFOM = PreFitFOM;
23+
std::cout << "makeSRBNBInfo: Chose pre-fit width" << std::endl;
24+
}
25+
else if((NoMultiWireFOM > 0.0) & (NoMultiwireFOM < 1.0))
26+
{
27+
finalFOM = 100.+NoMultiWireFOM;
28+
std::cout << "makeSRBNBInfo: Chose assumed width of 1.0" << std::endl;
29+
std::cout << "makeSRBNBInfo: Note, that this gets prefixed with 100 so it doesn't get automatically included in standard FOM cuts" << std::endl;
30+
}
31+
932
caf::SRBNBInfo single_store;
1033
single_store.spill_time_sec = info.spill_time_s;
1134
single_store.spill_time_nsec = info.spill_time_ns;
@@ -23,9 +46,7 @@ namespace caf
2346
single_store.VPTG1 = info.VPTG1;
2447
single_store.HPTG2 = info.HPTG2;
2548
single_store.VPTG2 = info.VPTG2;
26-
single_store.FOM = info.FOM;
27-
single_store.PreFitFOM = info.PreFitFOM;
28-
single_store.NoMultiWireFOM = info.NoMultiWireFOM;
49+
single_store.FOM = finalFOM;
2950
single_store.VP873 = info.VP873;
3051
single_store.VP873Offset = info.VP873Offset;
3152
single_store.VP875Offset = info.VP875Offset;

0 commit comments

Comments
 (0)