|
|
Go to the documentation of this file.
36 static constexpr
float REcal = 129.;
37 static constexpr
float ZEcal = 315.4;
53 float CorrectedEta(
float eta,
float zv)
const;
86 label_(iConfig.getParameter<
std::
string>(
"label")),
87 etMin_((
float)iConfig.getParameter<double>(
"ETmin")),
88 zMax_((
float)iConfig.getParameter<double>(
"ZMAX")),
89 chi2Max_((
float)iConfig.getParameter<double>(
"CHI2MAX")),
90 pTMinTra_((
float)iConfig.getParameter<double>(
"PTMINTRA")),
91 dR2Min_((
float)iConfig.getParameter<double>(
"DRmin") * (
float)iConfig.getParameter<double>(
"DRmin")),
92 dR2Max_((
float)iConfig.getParameter<double>(
"DRmax") * (
float)iConfig.getParameter<double>(
"DRmax")),
93 primaryVtxConstrain_(iConfig.getParameter<
bool>(
"PrimaryVtxConstrain")),
94 deltaZMax_((
float)iConfig.getParameter<double>(
"DeltaZMax")),
95 isoCut_((
float)iConfig.getParameter<double>(
"IsoCut")),
96 relativeIsolation_(iConfig.getParameter<
bool>(
"RelativeIsolation")) {
97 produces<TkEmCollection>(
label_);
106 auto result = std::make_unique<TkEmCollection>();
111 if (!L1TTTrackHandle.
isValid()) {
112 LogError(
"L1TkEmParticleProducer") <<
"\nWarning: L1TTTrackCollectionType not found in the event. Exit."
118 float zvtxL1tk = -999;
122 if (!L1VertexHandle.
isValid()) {
124 <<
"Warning: TkPrimaryVertexCollection not found in the event. Won't use any PrimaryVertex constraint."
128 std::vector<TkPrimaryVertex>::const_iterator vtxIter = L1VertexHandle->begin();
131 zvtxL1tk = vtxIter->zvertex();
139 LogError(
"L1TkEmParticleProducer") <<
"\nWarning: L1EmCollection not found in the event. Exit." << std::endl;
146 for (egIter = eGammaCollection.
begin(0); egIter != eGammaCollection.
end(0); ++egIter)
151 float et = egIter->et();
155 float eta = egIter->eta();
161 float phi = egIter->phi();
169 for (
const auto&
track : *L1TTTrackHandle) {
170 float Pt =
track.momentum().perp();
171 float Eta =
track.momentum().eta();
173 float z =
track.POCA().z();
183 if (dr2 < dR2Max_ && dr2 >=
dR2Min_) {
191 if (dr2 < dR2Max_ && dr2 >=
dR2Min_) {
196 float trkisol = -999;
197 float trkisolPV = -999;
201 trkisolPV = sumPtPV /
et;
238 float thetaprime = atan(-
REcal /
zv);
240 thetaprime = thetaprime +
M_PI;
241 float etaprime = -
log(
tan(0.5 * thetaprime));
247 float tanhalftheta =
exp(-
eta);
248 float tantheta = 2. * tanhalftheta / (1. - tanhalftheta * tanhalftheta);
261 float thetaprime = atan(tanthetaprime);
263 thetaprime = thetaprime +
M_PI;
264 etaprime = -
log(
tan(0.5 * thetaprime));
275 desc.add<
string>(
"label",
"EG");
279 desc.add<
double>(
"ETmin", -1.);
280 desc.add<
bool>(
"RelativeIsolation",
true);
281 desc.add<
double>(
"IsoCut", 0.23);
282 desc.add<
double>(
"ZMAX", 25.);
283 desc.add<
double>(
"CHI2MAX", 100.);
284 desc.add<
double>(
"PTMINTRA", 2.);
285 desc.add<
double>(
"DRmin", 0.07);
286 desc.add<
double>(
"DRmax", 0.30);
287 desc.add<
bool>(
"PrimaryVtxConstrain",
false);
288 desc.add<
double>(
"DeltaZMax", 0.6);
289 descriptions.
add(
"l1TkEmParticleProducer",
desc);
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
const edm::EDGetTokenT< L1TTTrackCollectionType > trackToken_
float CorrectedEta(float eta, float zv) const
T const * product() const
L1TkEmParticleProducer(const edm::ParameterSet &)
std::vector< T >::const_iterator const_iterator
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Class to store the L1 Track Trigger tracks.
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Log< level::Warning, false > LogWarning
#define DEFINE_FWK_MODULE(type)
static constexpr float EtaECal
std::vector< L1TTTrackType > L1TTTrackCollectionType
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< TkPrimaryVertex > TkPrimaryVertexCollection
edm::Ref< EGammaBxCollection > EGammaRef
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const_iterator begin(int bx) const
const_iterator end(int bx) const
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Tan< T >::type tan(const T &t)
static constexpr float REcal
~L1TkEmParticleProducer() override
Log< level::Error, false > LogError
const edm::EDGetTokenT< TkPrimaryVertexCollection > vertexToken_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
const bool primaryVtxConstrain_
Abs< T >::type abs(const T &t)
const edm::EDGetTokenT< EGammaBxCollection > egToken_
static constexpr float ZEcal
const bool relativeIsolation_