19 string fname =
"FastSimulation/Muons/data/resolutionL1.data";
21 std::string
path(getenv(
"CMSSW_SEARCH_PATH"));
24 std::cout <<
"File " << fname <<
" not found in " << path << std::endl;
25 throw Genexception(
" resolution list not found for FastMuonLvl1Trigger.");
30 std::ifstream & listfile = *
f1();
34 for (
int ieta=0; ieta<3; ieta++) {
35 for (
int i=0;
i<
NPT;
i++) {
44 ind =
i*NPTL1 + ieta*(NPT*
NPTL1);
65 if (AbsEta>2.40 || Pt<3) { StatusCode=
false;}
70 if (AbsEta<1.04) ieta = 0 ;
71 else if (AbsEta<2.07) ieta = 1 ;
72 else if (AbsEta<2.40) ieta = 2 ;
88 int OldCharge = aMuon->
charge();
89 int NewCharge = -OldCharge;
102 static float vecpt[
NPT] = {
103 1., 2., 3., 4., 5., 6., 7., 8., 9.,
104 10., 11., 12., 13., 14., 15., 16., 17., 18., 19.,
105 20., 21., 22., 23., 24., 25., 26., 27., 28., 29.,
106 30., 31., 32., 33., 34., 35., 36., 37., 38., 39.,
107 40., 41., 42., 43., 44., 45., 46., 47., 48., 49.,
108 50., 51., 52., 53., 54., 55., 56., 57., 58., 59.,
109 60., 61., 62., 63., 64., 65., 66., 67., 68., 69.,
110 70., 71., 72., 73., 74., 75., 76., 77., 78., 79.,
111 80., 81., 82., 83., 84., 85., 86., 87., 88., 89.,
112 90., 91., 92., 93., 94., 95., 96., 97., 98., 99.,
113 100., 110., 120., 130., 140., 150., 160., 170., 180., 190.,
114 200., 210., 220., 230., 240., 250., 260., 270., 280., 290.,
115 300., 310., 320., 330., 340., 350., 360., 370., 380., 390.,
116 400., 500., 600., 700., 800., 900., 1000. };
118 for (
int i=0;
i<
NPT;
i++) {
119 if (pt<vecpt[
i])
return i;
~FML1PtSmearer()
Destructor.
void setPtPacked(unsigned pt)
set packed pt-code of muon candidate
FML1PtSmearer(const RandomEngine *engine)
Constructor (read in the parametrizations from a data file)
const RandomEngine * random
bool smear(SimpleL1MuGMTCand *)
smear the transverse momentum of a SimplL1MuGMTCand
int charge() const
get charge
static const float ptScale[32]
void setCharge(int charge)
set charge and packed code of muon candidate
int IndexOfPtgen(float pt)
float ChargeMisIdent(int ieta, double pt)
float smearedPt() const
return the smeared L1 Pt value before discretization in 32-bit
const LorentzVector getMomentum() const
double flatShoot(double xmin=0.0, double xmax=1.0) const
void setPtValue(float ptVal)
Set Pt Value.