-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Produce lepton time-life info table without using intermediate lepton…
… collection
- Loading branch information
Showing
13 changed files
with
487 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#ifndef DataFormats_NanoAOD_LeptonTimeLifeInfo_h | ||
#define DataFormats_NanoAOD_LeptonTimeLifeInfo_h | ||
|
||
/** | ||
\class LeptonTimeLifeInfo | ||
\brief Structure to hold lepton life-time information | ||
\author Michal Bluj, NCBJ, Warsaw | ||
*/ | ||
|
||
#include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h" | ||
#include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h" | ||
#include "DataFormats/GeometryVector/interface/GlobalPoint.h" | ||
#include "DataFormats/GeometryVector/interface/GlobalVector.h" | ||
#include "DataFormats/TrackReco/interface/Track.h" | ||
#include "DataFormats/VertexReco/interface/Vertex.h" | ||
|
||
class LeptonTimeLifeInfo { | ||
public: | ||
LeptonTimeLifeInfo(); | ||
~LeptonTimeLifeInfo() {} | ||
|
||
// Secondary vertex | ||
void setSV(reco::Vertex sv) { | ||
sv_ = sv; | ||
hasSV_ = true; | ||
} | ||
const reco::Vertex& sv() const { return sv_; } | ||
bool hasSV() const { return hasSV_; } | ||
void setFlightVector(GlobalVector flight_vec, const GlobalError& flight_cov) { | ||
flight_vec_ = flight_vec; | ||
flight_cov_ = flight_cov; | ||
} | ||
// Flight-path | ||
const GlobalVector& flightVector() const { return flight_vec_; } | ||
const GlobalError& flightCovariance() const { return flight_cov_; } | ||
void setFlightLength(Measurement1D flightLength) { flightLength_ = flightLength; } | ||
const Measurement1D& flightLength() const { return flightLength_; } | ||
// Point of closest approach | ||
void setPCA(GlobalPoint pca, const GlobalError& pca_cov) { | ||
pca_ = pca; | ||
pca_cov_ = pca_cov_; | ||
} | ||
const GlobalPoint& pca() const { return pca_; } | ||
const GlobalError& pcaCovariance() const { return pca_cov_; } | ||
// Impact parameter | ||
void setIP(GlobalVector ip_vec, const GlobalError& ip_cov) { | ||
ip_vec_ = ip_vec; | ||
ip_cov_ = ip_cov; | ||
} | ||
const GlobalVector& ipVector() const { return ip_vec_; } | ||
const GlobalError& ipCovariance() const { return ip_cov_; } | ||
void setIPLength(Measurement1D ipLength) { ipLength_ = ipLength; } | ||
const Measurement1D& ipLength() const { return ipLength_; } | ||
// Track | ||
void setTrack(const reco::Track* track) { track_ = track; } | ||
const reco::Track* track() const { return track_; } | ||
bool hasTrack() const { return track_ != nullptr; } | ||
void setBFiled_z(float bField_z) { bField_z_ = bField_z; } | ||
float bField_z() const { return bField_z_; } | ||
|
||
private: | ||
bool hasSV_; | ||
reco::Vertex sv_; | ||
GlobalVector flight_vec_, ip_vec_; | ||
GlobalPoint pca_; | ||
GlobalError flight_cov_, pca_cov_, ip_cov_; | ||
Measurement1D flightLength_, ipLength_; | ||
const reco::Track* track_; | ||
float bField_z_; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "DataFormats/NanoAOD/interface/LeptonTimeLifeInfo.h" | ||
|
||
LeptonTimeLifeInfo::LeptonTimeLifeInfo() | ||
: hasSV_(false), | ||
sv_(reco::Vertex()), | ||
flight_vec_(GlobalVector()), | ||
ip_vec_(GlobalVector()), | ||
pca_(GlobalPoint()), | ||
flight_cov_(GlobalError()), | ||
pca_cov_(GlobalError()), | ||
ip_cov_(GlobalError()), | ||
flightLength_(Measurement1D()), | ||
ipLength_(Measurement1D()), | ||
track_(nullptr), | ||
bField_z_(0.){}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.