|
|
Go to the documentation of this file.
39 static constexpr
float REcal = 129.;
40 static constexpr
float ZEcal = 315.4;
56 float CorrectedEta(
float eta,
float zv)
const;
90 iConfig.getParameter<
edm::
InputTag>(
"L1TrackInputTag"))),
112 produces<TkEmCollection>(
label_);
121 auto result = std::make_unique<TkEmCollection>();
134 float zvtxL1tk = -999;
138 if (!L1VertexHandle.
isValid()) {
140 <<
"Warning: TkPrimaryVertexCollection not found in the event. Won't use any PrimaryVertex constraint."
142 primaryVtxConstrain =
false;
144 std::vector<TkPrimaryVertex>::const_iterator vtxIter = L1VertexHandle->begin();
147 zvtxL1tk = vtxIter->zvertex();
150 if (!L1TTTrackHandle.
isValid()) {
151 LogError(
"L1TkEmParticleProducer") <<
"\nWarning: L1TTTrackCollectionType not found in the event. Exit."
159 LogError(
"L1TkEmParticleProducer") <<
"\nWarning: L1EmCollection not found in the event. Exit." << std::endl;
164 for (egIter = eGammaCollection.
begin(0); egIter != eGammaCollection.
end(0); ++egIter)
169 float eta = egIter->eta();
175 float phi = egIter->phi();
176 float et = egIter->et();
184 float trkisol = -999;
187 float trkisolPV = -999;
189 for (
const auto&
track : *L1TTTrackHandle) {
190 float Pt =
track.momentum().perp();
191 float Eta =
track.momentum().eta();
193 float z =
track.POCA().z();
203 if (dr < dRMax_ && dr >=
dRMin_) {
212 if (dr < dRMax_ && dr >=
dRMin_) {
220 trkisolPV = sumPtPV /
et;
228 if (primaryVtxConstrain) {
273 float tanthetaprime =
delta * tantheta / (
delta - zv);
275 float thetaprime = atan(tanthetaprime);
277 thetaprime = thetaprime +
M_PI;
279 float etaprime = -
log(
tan(thetaprime / 2.));
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
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
std::vector< TkPrimaryVertex > TkPrimaryVertexCollection
bool primaryVtxConstrain_
edm::Ref< EGammaBxCollection > EGammaRef
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Geom::Theta< T > theta() const
const_iterator begin(int bx) const
const_iterator end(int bx) const
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.
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
T getParameter(std::string const &) const
const edm::EDGetTokenT< std::vector< TTTrack< Ref_Phase2TrackerDigi_ > > > trackToken_
Abs< T >::type abs(const T &t)
const edm::EDGetTokenT< EGammaBxCollection > egToken_
static constexpr float ZEcal
void addDefault(ParameterSetDescription const &psetDescription)