-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic strip reco v3 #10605
Dynamic strip reco v3 #10605
Changes from all commits
6f399b3
7a53594
95f3fb0
a90295c
b729963
b75f447
be2fd1b
dc1625e
7462cdc
10bfa9d
55e8a57
01212fc
760321e
58113d5
cc6bf3c
a451d55
e1c054f
c26646c
9e81b22
b71d423
00052a2
a8ebbe6
0fbd342
40fae23
5ac4715
48e4e2f
96af3ab
7b3568d
ff1b211
abaac8e
d3058a0
1765f58
16846ea
5fd9900
72a0586
3a3c707
732990d
3115aed
398866a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,32 +14,57 @@ class RecoTauPiZero : public CompositePtrCandidate { | |
kStrips = 3 | ||
}; | ||
|
||
RecoTauPiZero():CompositePtrCandidate(),algoName_(kUndefined){ | ||
this->setPdgId(111); } | ||
|
||
RecoTauPiZero(PiZeroAlgorithm algoName): | ||
CompositePtrCandidate(), algoName_(algoName) { this->setPdgId(111); } | ||
RecoTauPiZero() | ||
: CompositePtrCandidate(), | ||
algoName_(kUndefined) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. initialize data members here instead of the body of the constructor (for all simple initializations) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @slava77 I'm not sure what you mean here - does this mean set bendCorrEta_ = 0 (e.g.) outside of the RecoTauPiZero() : CompositePtrCandidate(), algoName_ brackets? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant to initialize it in the member initializer list; the comma-separated list between ":" and "{" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm afraid I still don't understand - at least, it's not compiling if I do: or if I do:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sigh. May I suggest to leaf through an entry level book on c++ programming before working on a next PR? |
||
{ | ||
this->setPdgId(111); | ||
bendCorrEta_ = 0.; | ||
bendCorrPhi_ = 0.; | ||
} | ||
|
||
RecoTauPiZero(PiZeroAlgorithm algoName) | ||
: CompositePtrCandidate(), | ||
algoName_(algoName) | ||
{ | ||
this->setPdgId(111); | ||
bendCorrEta_ = 0.; | ||
bendCorrPhi_ = 0.; | ||
} | ||
|
||
/// constructor from values | ||
RecoTauPiZero(Charge q, const LorentzVector& p4, | ||
const Point& vtx = Point( 0, 0, 0 ), | ||
int pdgId = 111, int status = 0, bool integerCharge = true, | ||
PiZeroAlgorithm algoName=kUndefined): | ||
CompositePtrCandidate( | ||
q, p4, vtx, pdgId, status, integerCharge ),algoName_(algoName) {} | ||
PiZeroAlgorithm algoName = kUndefined) | ||
: CompositePtrCandidate(q, p4, vtx, pdgId, status, integerCharge ), | ||
algoName_(algoName) | ||
{ | ||
bendCorrEta_ = 0.; | ||
bendCorrPhi_ = 0.; | ||
} | ||
|
||
/// constructor from values | ||
RecoTauPiZero(Charge q, const PolarLorentzVector& p4, | ||
const Point& vtx = Point( 0, 0, 0 ), | ||
int pdgId = 111, int status = 0, bool integerCharge = true, | ||
PiZeroAlgorithm algoName=kUndefined): | ||
CompositePtrCandidate( | ||
q, p4, vtx, pdgId, status, integerCharge ),algoName_(algoName) {} | ||
PiZeroAlgorithm algoName=kUndefined) | ||
: CompositePtrCandidate(q, p4, vtx, pdgId, status, integerCharge ), | ||
algoName_(algoName) | ||
{ | ||
bendCorrEta_ = 0.; | ||
bendCorrPhi_ = 0.; | ||
} | ||
|
||
/// constructor from a Candidate | ||
explicit RecoTauPiZero( | ||
const Candidate & p, PiZeroAlgorithm algoName=kUndefined): | ||
CompositePtrCandidate(p),algoName_(algoName) { this->setPdgId(111); } | ||
explicit RecoTauPiZero(const Candidate& p, PiZeroAlgorithm algoName = kUndefined) | ||
: CompositePtrCandidate(p), | ||
algoName_(algoName) | ||
{ | ||
this->setPdgId(111); | ||
bendCorrEta_ = 0.; | ||
bendCorrPhi_ = 0.; | ||
} | ||
|
||
/// destructor | ||
~RecoTauPiZero(){}; | ||
|
@@ -62,11 +87,20 @@ class RecoTauPiZero : public CompositePtrCandidate { | |
/// Check whether a given algo produced this pi zero | ||
bool algoIs(PiZeroAlgorithm algo) const; | ||
|
||
void print(std::ostream& out=std::cout) const; | ||
/// Size of correction to account for spread of photon energy in eta and phi | ||
/// in case charged pions make nuclear interactions or photons convert within the tracking detector | ||
float bendCorrEta() const { return bendCorrEta_; } | ||
float bendCorrPhi() const { return bendCorrPhi_; } | ||
void setBendCorrEta(float bendCorrEta) { bendCorrEta_ = bendCorrEta; } | ||
void setBendCorrPhi(float bendCorrPhi) { bendCorrPhi_ = bendCorrPhi; } | ||
|
||
void print(std::ostream& out = std::cout) const; | ||
|
||
private: | ||
PiZeroAlgorithm algoName_; | ||
|
||
float bendCorrEta_; | ||
float bendCorrPhi_; | ||
}; | ||
|
||
std::ostream & operator<<(std::ostream& out, const RecoTauPiZero& c); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,15 @@ PFTau::PFTau() | |
hcalTotOverPLead_ = NAN; | ||
hcalMaxOverPLead_ = NAN; | ||
hcal3x3OverPLead_ = NAN; | ||
ecalStripSumEOverPLead_= NAN; | ||
ecalStripSumEOverPLead_ = NAN; | ||
bremsRecoveryEOverPLead_ = NAN; | ||
electronPreIDOutput_ = NAN; | ||
electronPreIDDecision_= NAN; | ||
electronPreIDDecision_ = NAN; | ||
caloComp_ = NAN; | ||
segComp_ = NAN; | ||
muonDecision_ = NAN; | ||
decayMode_=kNull; | ||
decayMode_ = kNull; | ||
bendCorrMass_ = 0.; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where is the signalConeSize_ initialization? |
||
} | ||
|
||
PFTau::PFTau(Charge q, const LorentzVector& p4, const Point& vtx) | ||
|
@@ -40,12 +41,13 @@ PFTau::PFTau(Charge q, const LorentzVector& p4, const Point& vtx) | |
ecalStripSumEOverPLead_= NAN; | ||
bremsRecoveryEOverPLead_ = NAN; | ||
electronPreIDOutput_ = NAN; | ||
electronPreIDDecision_= NAN; | ||
electronPreIDDecision_ = NAN; | ||
|
||
caloComp_ = NAN; | ||
segComp_ = NAN; | ||
muonDecision_ = NAN; | ||
decayMode_=kNull; | ||
decayMode_ = kNull; | ||
bendCorrMass_ = 0.; | ||
} | ||
|
||
PFTau* PFTau::clone() const { return new PFTau(*this); } | ||
|
@@ -177,22 +179,6 @@ void PFTau::setIsolationTauChargedHadronCandidatesRefs(const PFRecoTauChargedHad | |
|
||
PFTau::hadronicDecayMode PFTau::decayMode() const { return decayMode_; } | ||
|
||
PFTau::hadronicDecayMode PFTau::calculateDecayMode() const { | ||
unsigned int nCharged = signalTauChargedHadronCandidates().size(); | ||
unsigned int nPiZeros = signalPiZeroCandidates().size(); | ||
// If no tracks exist, this is definitely not a tau! | ||
if ( !nCharged ) return kNull; | ||
// Find the maximum number of PiZeros our parameterization can hold | ||
const unsigned int maxPiZeros = kOneProngNPiZero; | ||
// Determine our track index | ||
unsigned int trackIndex = (nCharged - 1)*(maxPiZeros + 1); | ||
// Check if we handle the given number of tracks | ||
if ( trackIndex >= kRareDecayMode ) return kRareDecayMode; | ||
|
||
if(nPiZeros>maxPiZeros) nPiZeros=maxPiZeros; | ||
return static_cast<PFTau::hadronicDecayMode>(trackIndex + nPiZeros); | ||
} | ||
|
||
void PFTau::setDecayMode(const PFTau::hadronicDecayMode& dm){ decayMode_=dm;} | ||
|
||
// Setting information about the isolation region | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
<lcgdict> | ||
|
||
<class name="reco::PFTau" ClassVersion="18"> | ||
<class name="reco::PFTau" ClassVersion="19"> | ||
<version ClassVersion="19" checksum="4003955973"/> | ||
<version ClassVersion="18" checksum="1318776182"/> | ||
<version ClassVersion="17" checksum="1523260402"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please put the old indentation back so that only essential changes appear in diffs |
||
<version ClassVersion="16" checksum="2695990650"/> | ||
<version ClassVersion="15" checksum="4105994460"/> | ||
<version ClassVersion="14" checksum="3087106015"/> | ||
<version ClassVersion="13" checksum="1088944403"/> | ||
<version ClassVersion="12" checksum="3369965409"/> | ||
<version ClassVersion="11" checksum="2334259986"/> | ||
<version ClassVersion="16" checksum="2695990650"/> | ||
<version ClassVersion="15" checksum="4105994460"/> | ||
<version ClassVersion="14" checksum="3087106015"/> | ||
<version ClassVersion="13" checksum="1088944403"/> | ||
<version ClassVersion="12" checksum="3369965409"/> | ||
<version ClassVersion="11" checksum="2334259986"/> | ||
<field name="signalPiZeroCandidates_" transient="true"/> | ||
<field name="isolationPiZeroCandidates_" transient="true"/> | ||
<field name="signalTauChargedHadronCandidates_" transient="true"/> | ||
<field name="isolationTauChargedHadronCandidates_" transient="true"/> | ||
<version ClassVersion="10" checksum="2369119060"/> | ||
<version ClassVersion="10" checksum="2369119060"/> | ||
</class> | ||
|
||
<class name="std::vector<reco::PFTau>"/> | ||
|
@@ -265,7 +266,8 @@ isolationTauChargedHadronCandidates_.clear(); | |
<class name="edm::Wrapper<edm::Association<std::vector<reco::PFTauDecayMode> > >"/> | ||
<class name="edm::Wrapper<edm::Association<std::vector<reco::PFTau> > >"/> | ||
|
||
<class name="reco::RecoTauPiZero" ClassVersion="13"> | ||
<class name="reco::RecoTauPiZero" ClassVersion="14"> | ||
<version ClassVersion="14" checksum="3535311745"/> | ||
<version ClassVersion="13" checksum="3687187514"/> | ||
<version ClassVersion="12" checksum="453348937"/> | ||
<version ClassVersion="11" checksum="2458276705"/> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use float here and below (to match the internal precision)