Skip to content

Commit 450b036

Browse files
committed
Merge tag '09_15_01' into develop
sbnobj 09_15_01
2 parents 1f08a63 + aacb6da commit 450b036

5 files changed

Lines changed: 37 additions & 11 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
1515

1616
find_package(cetmodules 3.20.00 REQUIRED)
17-
project(sbnobj VERSION 09.15.00 LANGUAGES CXX)
17+
project(sbnobj VERSION 09.15.01 LANGUAGES CXX)
1818

1919
message(STATUS
2020
"\n-- ============================================================================="

sbnobj/Common/Reco/SimpleFlashMatchVars.h

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ namespace sbn
1111
struct Charge {
1212
double q; //!< charge in slc
1313
TVector3 center; //!< Weighted center position [cm]
14-
Charge(double q_ = -1., TVector3 center_ = TVector3(-999, -999, -999)) :
15-
q(q_), center(center_)
14+
TVector3 width; //!< Weighted width [cm]
15+
Charge(double q_ = -1., TVector3 center_ = TVector3(-999, -999, -999),
16+
TVector3 width_ = TVector3(-999, -999, -999)) :
17+
q(q_), center(center_), width(width_)
1618
{}
1719
};
1820
struct Flash {
1921
double pe; //!< photo-electrons on flash
2022
TVector3 center; //!< Weighted center position [cm]
21-
Flash(double pe_ = -1., TVector3 center_ = TVector3(-999, -999, -999)) :
22-
pe(pe_), center(center_)
23+
TVector3 width; //!< Weighted width [cm]
24+
Flash(double pe_ = -1., TVector3 center_ = TVector3(-999, -999, -999),
25+
TVector3 width_ = TVector3(-999, -999, -999)) :
26+
pe(pe_), center(center_), width(width_)
2327
{}
2428
};
2529
struct Score {
@@ -28,14 +32,19 @@ namespace sbn
2832
double z; //!< score for z metric
2933
double rr; //!< score for rr metric
3034
double ratio; //!< score for ratio metric
35+
double slope; //!< score for z/y slope metric
36+
double petoq; //!< score for light/charge quotient metric
3137
Score (
3238
double total_ = -1.,
3339
double y_ = -1., double z_ = -1.,
34-
double rr_ = -1., double ratio_ = -1.) :
35-
total(total_), y(y_), z(z_), rr(rr_), ratio(ratio_)
40+
double rr_ = -1., double ratio_ = -1.,
41+
double slope_ = -1., double petoq_ = -1.) :
42+
total(total_), y(y_), z(z_), rr(rr_), ratio(ratio_),
43+
slope(slope_), petoq(petoq_)
3644
{}
3745
Score (int no_score) : // for no match fill all with the code
38-
total(no_score), y(no_score), z(no_score), rr(no_score), ratio(no_score)
46+
total(no_score), y(no_score), z(no_score), rr(no_score), ratio(no_score),
47+
slope(no_score), petoq(no_score)
3948
{}
4049
};
4150

sbnobj/Common/Reco/classes_def.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,16 @@
3434
<class name="sbn::SimpleFlashMatch" ClassVersion="11">
3535
<version ClassVersion="11" checksum="27328003"/>
3636
</class>
37-
<class name="sbn::SimpleFlashMatch::Charge" ClassVersion="11">
37+
<class name="sbn::SimpleFlashMatch::Charge" ClassVersion="12">
38+
<version ClassVersion="12" checksum="3766218077"/>
3839
<version ClassVersion="11" checksum="4057441913"/>
3940
</class>
40-
<class name="sbn::SimpleFlashMatch::Flash" ClassVersion="11">
41+
<class name="sbn::SimpleFlashMatch::Flash" ClassVersion="12">
42+
<version ClassVersion="12" checksum="3025111821"/>
4143
<version ClassVersion="11" checksum="3396465673"/>
4244
</class>
43-
<class name="sbn::SimpleFlashMatch::Score" ClassVersion="11">
45+
<class name="sbn::SimpleFlashMatch::Score" ClassVersion="12">
46+
<version ClassVersion="12" checksum="3706842367"/>
4447
<version ClassVersion="11" checksum="3697420401"/>
4548
</class>
4649
<class name="std::vector<sbn::SimpleFlashMatch>" />

sbnobj/Common/SBNEventWeight/EventWeightParameterSet.cxx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,18 @@ void EventWeightParameterSet::Sample(CLHEP::HepRandomEngine& engine) {
109109
}
110110
}
111111

112+
void EventWeightParameterSet::FillKnobValues() {
113+
114+
for (auto& it : fParameterMap) {
115+
const EventWeightParameter& p = it.first;
116+
for(auto width: p.fWidths)
117+
it.second.push_back(p.fMean + width);
118+
}
119+
120+
}
121+
122+
123+
112124
} // namespace evwgh
113125
} // namespace sbn
114126

sbnobj/Common/SBNEventWeight/EventWeightParameterSet.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ class EventWeightParameterSet {
113113
void AddParameter(std::string name, float width, float mean=0, size_t covIndex=0);
114114
void AddParameter(std::string name, std::vector<float> widths, float mean=0, size_t covIndex=0);
115115

116+
void FillKnobValues();
117+
116118
/**
117119
* Specify a covariance matrix for correlated throws.
118120
*

0 commit comments

Comments
 (0)