Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion L1Trigger/L1TMuonOverlapPhase1/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@
<use name="roofit"/>
<use name="root"/>
<use name="xerces-c"/>
<use name="Utilities/Xerces"/>
116 changes: 0 additions & 116 deletions L1Trigger/L1TMuonOverlapPhase1/interface/AngleConverterBase.h

This file was deleted.

3 changes: 1 addition & 2 deletions L1Trigger/L1TMuonOverlapPhase1/interface/MuonStubMakerBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "DataFormats/GEMDigi/interface/GEMPadDigiCollection.h"
#include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
#include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h"
#include "DataFormats/MuonDetId/interface/DTChamberId.h"
#include "DataFormats/MuonDetId/interface/RPCDetId.h"
#include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
Expand Down Expand Up @@ -167,7 +166,7 @@ class RpcDigiToStubsConverter : public DigiToStubsConverterBase {
const RpcClusterization* rpcClusterization;
};

//forward declaration - MuonGeometryTokens is defined and used in the AngleConverterBase
//forward declaration - MuonGeometryTokens is defined and used in the OmtfAngleConverter
struct MuonGeometryTokens;

class MuonStubMakerBase {
Expand Down
37 changes: 24 additions & 13 deletions L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/AlgoMuon.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ class AlgoMuon {
//hardware pt
int getPtConstr() const { return goldenPaternConstr == nullptr ? 0 : goldenPaternConstr->key().thePt; }

//hardware upt, in the phase1 the upt scale unit is 1 GeV, while for the pt the unit is 0.5GeV
int getPtUnconstr() const {
return goldenPaternUnconstr == nullptr ? 0 : (goldenPaternUnconstr->key().thePt - 1) / 2 + 1;
}
//hardware upt, in the pattens scale, not in the GMT scale
int getPtUnconstr() const { return goldenPaternUnconstr == nullptr ? 0 : goldenPaternUnconstr->key().thePt; }

int getChargeConstr() const { return goldenPaternConstr == nullptr ? -1 : goldenPaternConstr->key().theCharge; }

Expand Down Expand Up @@ -125,21 +123,29 @@ class AlgoMuon {
this->goldenPaternUnconstr = goldenPaternUnconstr;
}

int getQuality() const { return quality; }

void setQuality(int quality = 0) { this->quality = quality; }

int getChargeNNConstr() const { return chargeNNConstr; }

void setChargeNNConstr(int chargeNn = 0) { chargeNNConstr = chargeNn; }

int getPtNNConstr() const { return ptNNConstr; }
float getPtNNConstr() const { return ptNNConstr; }

void setPtNNConstr(float ptNn = 0) { ptNNConstr = ptNn; }

void setPtNNConstr(int ptNn = 0) { ptNNConstr = ptNn; }
float getPtNNUnconstr() const { return ptNNUnconstr; }

int getChargeNNUnconstr() const { return chargeNNUnconstr; }
void setPtNNUnconstr(float ptNnUnconstr) { ptNNUnconstr = ptNnUnconstr; }

void setChargeNNUnconstr(int chargeNnUnconstr = 0) { chargeNNUnconstr = chargeNnUnconstr; }
int getDxyNn() const { return dxyNN; }

int getPtNNUnconstr() const { return ptNNUnconstr; }
void setDxyNn(int dxyNn = 0) { dxyNN = dxyNn; }

void setPtNNUnconstr(int ptNnUnconstr = 0) { ptNNUnconstr = ptNnUnconstr; }
const std::vector<double>& getNnOutputs() const { return nnOutputs; }

void setNnOutputs(const std::vector<double>& nnOutputs) { this->nnOutputs = nnOutputs; }

private:
///FIXME maybe the gpResult cannot be a reference or pointer, ad not a copy
Expand All @@ -165,11 +171,16 @@ class AlgoMuon {

std::vector<std::shared_ptr<AlgoMuon>> killedMuons;

int ptNNConstr = 0;
int quality = 0;

float ptNNConstr = 0;
int chargeNNConstr = 0;

int ptNNUnconstr = 0;
int chargeNNUnconstr = 0;
float ptNNUnconstr = 0;

int dxyNN = 0;

std::vector<double> nnOutputs;
};

typedef std::shared_ptr<AlgoMuon> AlgoMuonPtr;
Expand Down
117 changes: 117 additions & 0 deletions L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/FinalMuon.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* FinalMuon.h
*
* Created on: Dec 17, 2024
* Author: kbunkow
*/

#ifndef L1T_OmtfP1_FinalMuon_H
#define L1T_OmtfP1_FinalMuon_H

#include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/AlgoMuon.h"

#include <ostream>
#include <memory>
#include <vector>

class FinalMuon {
public:
FinalMuon() {};
FinalMuon(const AlgoMuonPtr& algoMuon)
: algoMuon(algoMuon), quality(algoMuon->getQuality()), firedLayerCnt(algoMuon->getFiredLayerCnt()) {};

virtual ~FinalMuon() {};

const AlgoMuonPtr& getAlgoMuon() const { return algoMuon; }

int getSign() const { return sign; }

void setSign(int sign = 0) { this->sign = sign; }

void setBx(int bx = 0) { this->bx = bx; }

int getBx() const { return bx; }

int getProcessor() const { return processor; }

void setProcessor(int processor = -1) { this->processor = processor; }

void setTrackFinderType(l1t::tftype mtfType) { this->mtfType = mtfType; }
l1t::tftype trackFinderType() const { return mtfType; }

int getQuality() const { return quality; }

void setQuality(int quality = 0) { this->quality = quality; }

float getPtGev() const { return ptGev; }

void setPtGev(float ptGev = -1) { this->ptGev = ptGev; }

float getPtUnconstrGev() const { return ptUnconstrGev; }

void setPtUnconstrGev(float ptUnconstrGev = -1) { this->ptUnconstrGev = ptUnconstrGev; }

float getEtaRad() const { return etaRad; }

void setEtaRad(float etaRad = -10) { this->etaRad = etaRad; }

float getPhiRad() const { return phiRad; }

void setPhiRad(float phiRad = -10) { this->phiRad = phiRad; }

int getPtGmt() const { return ptGmt; }

void setPtGmt(int ptGmt = 0) { this->ptGmt = ptGmt; }

int getPtUnconstrGmt() const { return ptUnconstrGmt; }

void setPtUnconstrGmt(int ptUnconstrGmt = 0) { this->ptUnconstrGmt = ptUnconstrGmt; }

int getPhiGmt() const { return phiGmt; }

void setPhiGmt(int phiGmt = 0) { this->phiGmt = phiGmt; }

int getEtaGmt() const { return etaGmt; }

void setEtaGmt(int etaGmt = 0) { this->etaGmt = etaGmt; }

int getFiredLayerCnt() const { return firedLayerCnt; }

void setFiredLayerCnt(int firedLayerCnt = 0) { this->firedLayerCnt = firedLayerCnt; }

int getFiredLayerBits() const { return firedLayerBits; }

void setFiredLayerBits(int firedLayerBits = 0) { this->firedLayerBits = firedLayerBits; }

friend std::ostream& operator<<(std::ostream& out, const FinalMuon& finalMuon);

private:
AlgoMuonPtr algoMuon;

int bx = 0;
int processor = -1;
l1t::tftype mtfType = l1t::omtf_pos;

int quality = 0;

int sign = 0;

float ptGev = -1;
float ptUnconstrGev = -1;
float phiRad = -10;
float etaRad = -10;

int ptGmt = 0;
int ptUnconstrGmt = 0;
int phiGmt = 0;
int etaGmt = 0;

int firedLayerCnt = 0;

int firedLayerBits = 0;
};

typedef std::shared_ptr<FinalMuon> FinalMuonPtr;
typedef std::vector<FinalMuonPtr> FinalMuons;

#endif /* FinalMuon */
5 changes: 2 additions & 3 deletions L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/GoldenPattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ class GoldenPattern : public GoldenPatternBase {
///Reset contents of all data vectors, keeping the vectors size
virtual void reset();

///Propagate phi from given reference layer to MB2 or ME2
///expressed in integer MicroGMT scale: 1.1/2.61*240 = 101
int propagateRefPhi(int phiRef, int etaRef, unsigned int iRefLayer) override;
///Propagates phi from a given reference layer (iRefLayer) to a selected iLayer
int propagateRefPhi(int phiRef, int etaRef, unsigned int iRefLayer, unsigned int iLayer) override;

protected:
///Distributions for all reference layers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,8 @@ class GoldenPatternBase {
const std::vector<int>& extrapolatedPhi,
const MuonStubPtr& refStub);

///Propagate phi from given reference layer to MB2 or ME2
///ME2 is used if eta of reference hit is larger than 1.1
///expressed in integer MicroGMT scale: 1.1/2.61*240 = 101
virtual int propagateRefPhi(int phiRef, int etaRef, unsigned int iRefLayer) = 0;
///Propagates phi from a given reference layer (iRefLayer) to a selected iLayer
virtual int propagateRefPhi(int phiRef, int etaRef, unsigned int iRefLayer, unsigned int iLayer) = 0;

resultsArrayType& getResults() { return results; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ class GoldenPatternResult {

void set(int refLayer, int phi, int eta, int refHitPhi);

void setStubResult(float pdfVal, bool valid, int pdfBin, int layer, MuonStubPtr stub);

void setStubResult(int layer, StubResult& stubResult);

int getRefLayer() const { return this->refLayer; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define L1T_OmtfP1_IOMTFRECONSTRUCTIONOBSERVER_H_

#include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/AlgoMuon.h"
#include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/FinalMuon.h"
#include "L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/OMTFinput.h"

#include "FWCore/Framework/interface/EventSetup.h"
Expand Down Expand Up @@ -40,12 +41,11 @@ class IOMTFEmulationObserver {
const std::shared_ptr<OMTFinput>& input,
const AlgoMuons& algoCandidates,
const AlgoMuons& gbCandidates,
const std::vector<l1t::RegionalMuonCand>& candMuons) = 0;
const FinalMuons& finalMuons) = 0;

virtual void observeEventBegin(const edm::Event& iEvent) {}

virtual void observeEventEnd(const edm::Event& iEvent,
std::unique_ptr<l1t::RegionalMuonCandBxCollection>& finalCandidates) {};
virtual void observeEventEnd(const edm::Event& iEvent, FinalMuons& finalMuons) {};

virtual void endJob() = 0;
};
Expand Down
Loading