CMS 3D CMS Logo

Classes | Typedefs | Enumerations | Functions | Variables
hitfit Namespace Reference

Classes

class  Base_Constrainer
 Base class for $\chi^{2}$ constrained fitter. More...
 
class  Base_Constrainer_Args
 Hold on to parameters for the Base_Constrainer class. More...
 
class  Chisq_Constrainer
 Minimize a $\chi^{2}$ subject to a set of constraints. Based on the SQUAW algorithm. More...
 
class  Chisq_Constrainer_Args
 Hold on to parameters for the Chisq_Constrainer class. More...
 
class  Constrained_Top
 Do a constrained kinematic fitting for a $t\bar{t}\to\ell + \rm{jets}$ event. More...
 
class  Constrained_Top_Args
 Hold on to parameters for the Constrained_Top class. More...
 
class  Constrained_Z
 Do a constrained kinematic fitting for a $Z\to\ell^{+}\ell^{-} + \rm{jets}$ event. More...
 
class  Constrained_Z_Args
 Hold on to parameters for the Constrained_Z class. More...
 
class  Constraint
 Represent a mass constraint equation. Mass constraints come in two varieties, either saying that the sum of a set of labels should equal a constant:
More...
 
class  Constraint_Calculator
 Abstract base class for evaluating constraints. Users derive from this class and implement the eval() method. More...
 
class  Constraint_Intermed
 Abstract base classes for describing one side of a mass constraint. More...
 
class  Constraint_Intermed_Constant
 Concrete class for one side of mass constraint equation of the type:
$(1 + 2) = C$. More...
 
class  Constraint_Intermed_Labels
 Concrete class for one side of mass constraint equation of the type:
$(1 + 2) = (3 + 4)$. More...
 
class  Defaults
 Define an interface for getting parameter settings. More...
 
class  Defaults_Text
 A lightweight implementation of the Defaults interface that uses simple ASCII text files. More...
 
class  Defaults_Textrep
 The internal representation for a Defaults_Text object. More...
 
class  EtaDepResElement
 Represent a resolution and an $ \eta $ range in which the resolution is valid. More...
 
class  EtaDepResolution
 Hold on to $\eta$-dependent resolution. This class acts as a function object and returns Vector_Resolution as a function of $\eta$. It does not assume symmetry between $+\eta$ and $-\eta$. The interpretation of $\eta$ as physics $\eta$ or detector $\eta$ is left to users's implementation. More...
 
class  FE_Obj
 Represent a single object in a Fourvec_Event, this is just a dumb data container. Each object in a Fourvec_Event has the following attributes: More...
 
class  Fit_Result
 Hold the result of one kinematic fit. More...
 
class  Fit_Result_Vec
 Holds pointers to a set of Fit_Result objects, resulting from different jet permutation with some consistent selection. The results are ordered by increasing $\chi^{2}$ values. A maximum length for the list of Fit_Result objects may be specified; when new results, those with the largest $\chi^{2}$ value fall off the end. More...
 
class  Fit_Results
 Holds set(s) of results from more than one kinematic fits. More...
 
class  Fourvec_Constrainer
 Do a kinematic fit for a set of four-momenta, given a set of mass constraints. More...
 
class  Fourvec_Constrainer_Args
 Hold on to parameters for the Fourvec_Constrainer class. More...
 
class  Fourvec_Constraint_Calculator
 Concrete realization of the Constraint_Calculator class. Evaluate constraints at the point described by x and y (well-measured and poorly-measured variables, respectively). The results should be stored in F. Bx and By should be set to the gradients of F with respect to x and y, respectively. More...
 
class  Fourvec_Event
 Represent an event for kinematic fitting as a collection of four-momenta. Each object is represented as an instance of FE_Obj. There may be an object for a neutrino. If that is the case, it is always at the end of the object list. It is not included in the count returned by nobjs(). But is is included in nobjs_all(). More...
 
class  Gentop_Args
 Hold on to parameters for the toy event generator. More...
 
class  JetTranslatorBase
 Template class of function object to translate jet physics object to HitFit's Lepjets_Event_Jet object. Users need to write an implementation of a template specialization of this class for their jet physics object class. Then users combine this header file and their implementation for their analysis code. With this approach, it is possible to use HitFit for different jet physics object class in different experiments. More...
 
class  Lepjets_Event
 Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list of leptons (as represented by the Lepjets_Event_Lep class) and jets (as represented by Lepjets_Event_Jet class). Also recorded are: More...
 
class  Lepjets_Event_Jet
 A class to represent a jet in an instance of Lepjets_Event class. The class is derived from the Lepjets_Event_Lep class. In addition to the information stored in Lepjets_Event_Lep class, this class holds the following information: More...
 
class  Lepjets_Event_Lep
 Represent a lepton in an instance of Lepjets_Event class. This class hold the following information: More...
 
class  LeptonTranslatorBase
 Template class of function object to translate lepton physics object to HitFit's Lepjets_Event_Lep object. Users need to write an implementation of a template specialization of this class for their lepton physics object class. Then users combine this header file and their implementation for their analysis code. With this approach, it is possible to use HitFit for different lepton physics object class in different experiments. More...
 
class  METTranslatorBase
 Template class of function object to translate missing transverse energy physics object to HitFit's Fourvec object. Users need to write an implementation of a template specialization of this class for their missing transverse energy physics object class, Then users combine this header file and their implementation for their analysis code. With this approach, it is possible to use HitFit for different missing transverse energy physics object class indifferent experiments. More...
 
class  Objpair
 Represent a pair of objects in Pair_Table. More...
 
class  Pair_Table
 A lookup table to speed up constraint evaluation using Fourvec_Constrainer. More...
 
class  Resolution
 Calculate and represent resolution for a physical quantity. More...
 
class  Row_Vector
 Row-vector class. CLHEP doesn't have a row-vector class, so HitFit uses its own. This is only a simple wrapper around Matrix that tries to constrain the shape to a row vector. It will raise an assertion if you try to assign to it something that isn't a row vector. More...
 
class  RunHitFit
 Template class of experiment-independent interface to HitFit. This class is intended to be used inside the programming environment of a specific experiment, where each type of physics objects has its own class/type. For using HitFit with generic four-vector classes, user can't use this class and have to use the Top_Fit class directly. The reason is: this class is designed assuming electron and muon are represented by different object type, a situation which is guaranteed to happen in any experiments. The class contains some static integer constants to limit the maximum amount of jets in an event before fitting. See the description of those constants for details. The numbers of permutations for $t\bar{t}$ and $t\bar{t}H$ as a function of the number of jets $N_{\mathrm{jet}}$ in the event for a few values of are. More...
 
class  Top_Decaykin
 A class to hold functions to calculate kinematic quantities of interest in $ t\bar{t} \to \ell + 4 \mathrm{jets} $ events. This class has no state, only static member functions. More...
 
class  Top_Fit
 Handle and fit jet permutations of an event. This is the primary interface between user's Lepjets_Event and HitFit kinematic fitting algorithm. More...
 
class  Top_Fit_Args
 Hold on to parameters for the Top_Fit class. More...
 
class  Vector_Resolution
 Calculate and represent resolution for a vector of $p$, pseudorapidity $\eta$, and azimuthal angle $\phi$. An instance of this class holds three Resolution objects, one each for $p$, $\eta$, and $\phi$. In addition, we have a flag to indicate if the momentum resolution is in $p_{T}$ or $p$. This flag is set by appending [/et] at the end of the string. More...
 

Typedefs

typedef CLHEP::HepVector Column_Vector
 
typedef CLHEP::HepDiagMatrix Diagonal_Matrix
 
typedef CLHEP::HepLorentzVector Fourvec
 Typedef for a HepLorentzVector. More...
 
typedef CLHEP::HepMatrix Matrix
 
typedef CLHEP::Hep3Vector Threevec
 Typedef for a Hep3Vector. More...
 

Enumerations

enum  Jet_Labels {
  isr_label = 0, lepb_label = 11, hadb_label = 12, hadw1_label = 13,
  hadw2_label = 14, higgs_label = 15, unknown_label = 20
}
 
enum  Kt_Offsets { x_offs = 0, y_offs = 1 }
 
enum  Lepton_Labels { lepton_label = 1, electron_label = 2, muon_label = 3 }
 
enum  Lists {
  all_list = 0, noperm_list = 1, semicorrect_list = 2, limited_isr_list = 3,
  topfour_list = 4, btag_list = 5, htag_list = 6, n_lists = 7
}
 
enum  Offsets { p_offs = 0, phi_offs = 1, eta_offs = 2 }
 
enum  Unmeasured_Variables { nu_z = 1 }
 

Functions

void adjust_e_for_mass (Fourvec &v, double mass)
 Adjust the energy component of four-vector v (leaving the three-vector part unchanged) so that the four-vector has mass as specified in the argument. More...
 
void adjust_p_for_mass (Fourvec &v, double mass)
 Adjust the three-vector part of v, leaving the energy unchanged,. More...
 
void clear (CLHEP::HepGenMatrix &m)
 Helper function: Reset all elements of a matrix to 0. More...
 
double delta_r (const Fourvec &a, const Fourvec &b)
 Find the distance between two four-vectors in the two-dimensional space $\eta-\phi$. More...
 
double deteta (const Fourvec &v, double zvert)
 NOT USED ANYMORE: Get the detector $\eta$ (D0-specific), requires z-vertex. More...
 
double eta_to_theta (double eta)
 Convert pseudorapidity to polar angle. More...
 
Lepjets_Event gentop (const Gentop_Args &args, CLHEP::HepRandomEngine &engine)
 Generate a $t\bar{t} \to \ell + 4~\mathrm{jets}$ event. More...
 
Lepjets_Event gentth (const Gentop_Args &args, CLHEP::HepRandomEngine &engine)
 Generate a $t\bar{t}H \to \ell + b\bar{b} + 4~\mathrm{jets}$ event. More...
 
char jetTypeChar (int type)
 Helper function: Translate jet type code from integer to char. The following notation is used for each type of jet: More...
 
std::string jetTypeString (int type)
 Helper function: Translate jet type code from integer to char. The following notation is used for each type of jet: More...
 
template<class T >
std::string jetTypeString (std::vector< T > jet_types)
 Helper function: Translate jet type code from a list of numbers to a string. More...
 
unique_ptr< Constraint_Intermedmake_constraint_intermed (string s)
 
std::unique_ptr< Constraint_Intermedmake_constraint_intermed (std::string s)
 
bool operator< (const EtaDepResElement &a, const EtaDepResElement &b)
 Comparison operator, compare two EtaDepResElement instances based on their respective valid $\eta$ ranges. More...
 
bool operator< (const Fit_Result &a, const Fit_Result &b)
 Sort fit results based on their $\chi^{2}$. More...
 
std::ostream & operator<< (std::ostream &s, const Objpair &o)
 Output stream operator, print the content of this Objpair to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Fit_Results &res)
 Output stream operator, print the content of this Fit_Results to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const EtaDepResElement &e)
 
std::ostream & operator<< (std::ostream &s, const Pair_Table &p)
 Output stream operator, print the content of this Pair_Table to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Constraint &c)
 Output stream operator, print the content of this Constraint to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Fit_Result_Vec &resvec)
 Output stream operator, print the content of this Fit_Result_Vec to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const FE_Obj &o)
 Output stream operator, print the content of this FE_Obj object to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Lepjets_Event_Lep &l)
 Output stream operator, print the content of this Lepjets_Event_Lep to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Base_Constrainer &f)
 Output stream operator, print the content of this Base_Constrainer to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Fit_Result &res)
 Output stream operator, print the content of this Fit_Result to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Lepjets_Event_Jet &l)
 Output stream operator, print the content of this Lepjets_Event_Jet to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Resolution &r)
 Output stream operator, print the content of this Resolution to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Fourvec_Event &fe)
 Output stream operator, print the content of this Fourvec_Event object to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Fourvec_Constrainer &c)
 Output stream operator, print the content of this Fourvec_Constrainer to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Constrained_Z &cz)
 Output stream operator, print the content of this Constrained_Z to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Constrained_Top &ct)
 Output stream operator, print the content of this Constrained_Top object to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const hitfit::Constraint_Intermed &ci)
 Output stream operator, print the content of this Constraint_Intermed to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Vector_Resolution &r)
 Output stream operator, print the content of this Vector_Resolution object to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Lepjets_Event &ev)
 Output stream operator, print the content of this Lepjets_Event to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Defaults_Text &def)
 
std::ostream & operator<< (std::ostream &s, const Top_Fit &fitter)
 Output stream operator, print the content of this Top_Fit object to an output stream. More...
 
double phidiff (double phi)
 Normalized difference in azimuthal angles to a range between $[-\pi \dot \pi]$. More...
 
void roteta (Fourvec &v, double eta)
 Rotate four-vector v through a polar angle such that the four-vector pseudorapidity changes by a desired value. More...
 
void rottheta (Fourvec &v, double theta)
 Rotate four-vector v through a polar angle. More...
 
double scalar (const CLHEP::HepGenMatrix &m)
 Return the $1 \times 1$ matrix as a scalar. Raise an assertion if the matris is not $1 \times 1$. More...
 
double theta_to_eta (double theta)
 Convert polar angle to pseudorapidity. More...
 

Variables

const int nu_label = -1
 

Typedef Documentation

◆ Column_Vector

typedef CLHEP::HepVector hitfit::Column_Vector

Definition at line 63 of file matutil.h.

◆ Diagonal_Matrix

typedef CLHEP::HepDiagMatrix hitfit::Diagonal_Matrix

Definition at line 64 of file matutil.h.

◆ Fourvec

typedef CLHEP::HepLorentzVector hitfit::Fourvec

Typedef for a HepLorentzVector.

Definition at line 55 of file fourvec.h.

◆ Matrix

typedef CLHEP::HepMatrix hitfit::Matrix

Definition at line 62 of file matutil.h.

◆ Threevec

typedef CLHEP::Hep3Vector hitfit::Threevec

Typedef for a Hep3Vector.

Definition at line 60 of file fourvec.h.

Enumeration Type Documentation

◆ Jet_Labels

Possible types of jet in an instance of Lepjets_Event class.

Enumerator
isr_label 
lepb_label 
hadb_label 
hadw1_label 
hadw2_label 
higgs_label 
unknown_label 

Definition at line 54 of file Lepjets_Event_Jet.h.

◆ Kt_Offsets

Offset indices for the components of missing transverse energy (or $k_{T}$) variables.

Enumerator
x_offs 
y_offs 

Definition at line 133 of file Fourvec_Constrainer.cc.

◆ Lepton_Labels

Possible types of lepton in an instance of Lepjets_Event class.

Enumerator
lepton_label 
electron_label 
muon_label 

Definition at line 51 of file Lepjets_Event_Lep.h.

◆ Lists

Indices for the various results lists we store in Fit_Results.

Enumerator
all_list 
noperm_list 
semicorrect_list 
limited_isr_list 
topfour_list 
btag_list 
htag_list 
n_lists 

Definition at line 53 of file Top_Fit.h.

53  {
54  all_list = 0, // All events.
55  noperm_list = 1, // All jet assignments are correct.
56  semicorrect_list = 2, // Jets assigned to the correct top.
57  limited_isr_list = 3, // Top three jets are not ISR.
58  topfour_list = 4, // Top four jets are not ISR, any other jets are ISR.
59  btag_list = 5, // All tagged jets were assigned as b-jets.
60  htag_list = 6, // All tagged jets were assigned as b-jets or higgs.
61  n_lists = 7
62  };

◆ Offsets

Offset indices for the component of four-momentum variables.

Enumerator
p_offs 
phi_offs 
eta_offs 

Definition at line 127 of file Fourvec_Constrainer.cc.

◆ Unmeasured_Variables

If there is a neutrino, then it is at index 1 of the vector of poorly-measured variables.

Enumerator
nu_z 

Definition at line 143 of file Fourvec_Constrainer.cc.

Function Documentation

◆ adjust_e_for_mass()

void hitfit::adjust_e_for_mass ( Fourvec v,
double  mass 
)

Adjust the energy component of four-vector v (leaving the three-vector part unchanged) so that the four-vector has mass as specified in the argument.

Parameters
vThe four-vector to scale.
massThe desired-mass of the four-vector.
Output:
v The scaled four-vector.

Definition at line 119 of file fourvec.cc.

References EgHLTOffHistBins_cfi::mass, mathSSE::sqrt(), and findQualityFiles::v.

Referenced by hitfit::Top_Fit::fit_one_perm().

131  {
132  v.setE(sqrt(v.vect().mag2() + mass * mass));
133  }
T sqrt(T t)
Definition: SSEVec.h:23

◆ adjust_p_for_mass()

void hitfit::adjust_p_for_mass ( Fourvec v,
double  mass 
)

Adjust the three-vector part of v, leaving the energy unchanged,.

so that the four-vector has mass as specified in the argument.

Parameters
vThe four-vector to scale.
massThe desired mass of the four-vector.
Output:
v The scaled four-vector.

Definition at line 95 of file fourvec.cc.

References EgHLTOffHistBins_cfi::mass, mathSSE::sqrt(), and findQualityFiles::v.

107  {
108  CLHEP::Hep3Vector vect = v.vect();
109  double old_p2 = vect.mag2();
110  if (old_p2 == 0)
111  return;
112  double new_p2 = v.e() * v.e() - mass * mass;
113  if (new_p2 < 0)
114  new_p2 = 0;
115  vect *= sqrt(new_p2 / old_p2);
116  v.setVect(vect);
117  }
T sqrt(T t)
Definition: SSEVec.h:23

◆ clear()

void hitfit::clear ( CLHEP::HepGenMatrix &  m)

Helper function: Reset all elements of a matrix to 0.

Parameters
mThe matrix to reset.

Definition at line 151 of file matutil.cc.

References mps_fire::i, dqmiolumiharvest::j, and visualization-live-secondInstance_cfg::m.

158  {
159  int nrow = m.num_row();
160  int ncol = m.num_col();
161  for (int i = 1; i <= nrow; i++)
162  for (int j = 1; j <= ncol; j++)
163  m(i, j) = 0;
164  }

◆ delta_r()

double hitfit::delta_r ( const Fourvec a,
const Fourvec b 
)

Find the distance between two four-vectors in the two-dimensional space $\eta-\phi$.

Definition at line 238 of file fourvec.cc.

References a, b, phidiff(), and mathSSE::sqrt().

Referenced by DD4hep_TrackingMaterialPlotter::fill_gradient(), TrackingMaterialPlotter::fill_gradient(), DD4hep_ListGroups::fillGradient(), ListGroups::fillGradient(), and HGCalCLUEAlgoT< TILE, STRATEGY >::makeClusters().

249  {
250  double deta = a.pseudoRapidity() - b.pseudoRapidity();
251  double dphi = phidiff(a.phi() - b.phi());
252  return sqrt(deta * deta + dphi * dphi);
253  }
double phidiff(double phi)
Normalized difference in azimuthal angles to a range between .
Definition: fourvec.cc:220
T sqrt(T t)
Definition: SSEVec.h:23
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ deteta()

double hitfit::deteta ( const Fourvec v,
double  zvert 
)

NOT USED ANYMORE: Get the detector $\eta$ (D0-specific), requires z-vertex.

Parameters
vThe four-vector on which to operate.
zvertz-vertex of the event.

Definition at line 205 of file fourvec.cc.

References theta_to_eta(), and findQualityFiles::v.

Referenced by HcalNumberingFromPS::unitID().

216  {
217  return theta_to_eta(cal_th(v.theta(), zvert));
218  }
double theta_to_eta(double theta)
Convert polar angle to pseudorapidity.
Definition: fourvec.cc:191

◆ eta_to_theta()

double hitfit::eta_to_theta ( double  eta)

Convert pseudorapidity to polar angle.

Parameters
etaThe value of pseudorapidity to convert.

Definition at line 177 of file fourvec.cc.

References PVValHelper::eta, and JetChargeProducer_cfi::exp.

Referenced by roteta().

187  {
188  return 2 * atan(exp(-eta));
189  }

◆ gentop()

Lepjets_Event hitfit::gentop ( const Gentop_Args args,
CLHEP::HepRandomEngine &  engine 
)

Generate a $t\bar{t} \to \ell + 4~\mathrm{jets}$ event.

Parameters
argsThe parameter settings for this event.
engineThe underlying random number generator.

Definition at line 513 of file gentop.cc.

References writedatasetfile::args, WZElectronSkims53X_cff::decay, electron_label, makeMEIFBenchmarkPlots::ev, hadb_label, hadw1_label, hadw2_label, lepb_label, muon_label, and AlCaHLTBitMon_ParallelJobs::p.

524  {
525  CLHEP::RandBreitWigner rbw(engine);
526  CLHEP::RandGauss rgauss(engine);
527 
528  // Get the t decay momentum in the ttbar rest frame.
529  Threevec p = rand_pt(args.t_pt_mean(), engine);
530 
531  // Make the t/tbar vectors.
532  Fourvec lept = make_massive(p, args.mt(), args.sigma_mt(), engine);
533  Fourvec hadt = make_massive(-p, args.mt(), args.sigma_mt(), engine);
534 
535  // Boost the rest frame.
536  Fourvec boost = rand_boost(args, engine);
537  lept.boost(boost.boostVector());
538  hadt.boost(boost.boostVector());
539 
540  // Decay t -> b W, leptonic side.
541  Fourvec lepb, lepw;
542  double mlb = rgauss.fire(args.mb(), args.sigma_mb());
543  double mlw = rbw.fire(args.mw(), args.sigma_mw());
544  decay(lept, mlb, mlw, engine, lepb, lepw);
545 
546  // Decay t -> b W, hadronic side.
547  Fourvec hadb, hadw;
548  double mhb = rgauss.fire(args.mb(), args.sigma_mb());
549  double mhw = rbw.fire(args.mw(), args.sigma_mw());
550  decay(hadt, mhb, mhw, engine, hadb, hadw);
551 
552  // Decay W -> l nu.
553  Fourvec lep, nu;
554  decay(lepw, 0, 0, engine, lep, nu);
555 
556  // Decay W -> qqbar.
557  Fourvec q1, q2;
558  decay(hadw, 0, 0, engine, q1, q2);
559 
560  // Fill in the event.
561  Lepjets_Event ev(0, ++next_evnum);
562  Vector_Resolution lep_res(args.muon() ? args.muo_res_str() : args.ele_res_str());
563  Vector_Resolution jet_res(args.jet_res_str());
564  Resolution kt_res = (args.kt_res_str());
565 
566  ev.add_lep(Lepjets_Event_Lep(lep, args.muon() ? muon_label : electron_label, lep_res));
567 
568  ev.add_jet(Lepjets_Event_Jet(lepb, lepb_label, jet_res));
569  ev.add_jet(Lepjets_Event_Jet(hadb, hadb_label, jet_res));
570  ev.add_jet(Lepjets_Event_Jet(q1, hadw1_label, jet_res));
571  ev.add_jet(Lepjets_Event_Jet(q2, hadw2_label, jet_res));
572 
573  ev.met() = nu;
574  ev.kt_res() = kt_res;
575 
576  // Simulate SVX tagging.
577  tagsim(args, ev, engine);
578 
579  // Smear the event, if requested.
580  if (args.smear())
581  ev.smear(engine, args.smear_dir());
582 
583  // Done!
584  return ev;
585  }
Definition: CLHEP.h:16
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
CLHEP::Hep3Vector Threevec
Typedef for a Hep3Vector.
Definition: fourvec.h:60

◆ gentth()

Lepjets_Event hitfit::gentth ( const Gentop_Args args,
CLHEP::HepRandomEngine &  engine 
)

Generate a $t\bar{t}H \to \ell + b\bar{b} + 4~\mathrm{jets}$ event.

Parameters
argsThe parameter settings for this event.
engineThe underlying random number generator.

Definition at line 587 of file gentop.cc.

References writedatasetfile::args, WZElectronSkims53X_cff::decay, electron_label, makeMEIFBenchmarkPlots::ev, hadb_label, hadw1_label, hadw2_label, higgs_label, lepb_label, and muon_label.

598  {
599  CLHEP::RandBreitWigner rbw(engine);
600  CLHEP::RandGauss rgauss(engine);
601 
602  // Generate three-vectors for two tops.
603  Threevec p_t1 = rand_pt(args.t_pt_mean(), engine);
604  Threevec p_t2 = rand_pt(args.t_pt_mean(), engine);
605 
606  // Conserve momentum.
607  Threevec p_h = -(p_t1 + p_t2);
608 
609  // Construct the 4-vectors.
610  Fourvec lept = make_massive(p_t1, args.mt(), args.sigma_mt(), engine);
611  Fourvec hadt = make_massive(p_t2, args.mt(), args.sigma_mt(), engine);
612  Fourvec higgs = make_massive(p_h, args.mh(), args.sigma_mh(), engine);
613 
614  // Boost the rest frame.
615  Fourvec boost = rand_boost(args, engine);
616  lept.boost(boost.boostVector());
617  hadt.boost(boost.boostVector());
618  higgs.boost(boost.boostVector());
619 
620  // Decay t -> b W, leptonic side.
621  Fourvec lepb, lepw;
622  decay(lept, rgauss.fire(args.mb(), args.sigma_mb()), rbw.fire(args.mw(), args.sigma_mw()), engine, lepb, lepw);
623 
624  // Decay t -> b W, hadronic side.
625  Fourvec hadb, hadw;
626  decay(hadt, rgauss.fire(args.mb(), args.sigma_mb()), rbw.fire(args.mw(), args.sigma_mw()), engine, hadb, hadw);
627 
628  // Decay W -> l nu.
629  Fourvec lep, nu;
630  decay(lepw, 0, 0, engine, lep, nu);
631 
632  // Decay W -> qqbar.
633  Fourvec q1, q2;
634  decay(hadw, 0, 0, engine, q1, q2);
635 
636  // Decay H -> bbbar.
637  Fourvec hb1, hb2;
638  decay(higgs, rgauss.fire(args.mb(), args.sigma_mb()), rgauss.fire(args.mb(), args.sigma_mb()), engine, hb1, hb2);
639 
640  // Fill in the event.
641  Lepjets_Event ev(0, ++next_evnum);
642  Vector_Resolution lep_res(args.muon() ? args.muo_res_str() : args.ele_res_str());
643  Vector_Resolution jet_res(args.jet_res_str());
644  Resolution kt_res = (args.kt_res_str());
645 
646  ev.add_lep(Lepjets_Event_Lep(lep, args.muon() ? muon_label : electron_label, lep_res));
647 
648  ev.add_jet(Lepjets_Event_Jet(lepb, lepb_label, jet_res));
649  ev.add_jet(Lepjets_Event_Jet(hadb, hadb_label, jet_res));
650  ev.add_jet(Lepjets_Event_Jet(q1, hadw1_label, jet_res));
651  ev.add_jet(Lepjets_Event_Jet(q2, hadw2_label, jet_res));
652  ev.add_jet(Lepjets_Event_Jet(hb1, higgs_label, jet_res));
653  ev.add_jet(Lepjets_Event_Jet(hb2, higgs_label, jet_res));
654 
655  ev.met() = nu;
656  ev.kt_res() = kt_res;
657 
658  // Simulate SVX tagging.
659  tagsim(args, ev, engine);
660 
661  // Smear the event, if requested.
662  if (args.smear())
663  ev.smear(engine, args.smear_dir());
664 
665  // Done!
666  return ev;
667  }
Definition: CLHEP.h:16
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
CLHEP::Hep3Vector Threevec
Typedef for a Hep3Vector.
Definition: fourvec.h:60

◆ jetTypeChar()

char hitfit::jetTypeChar ( int  type)

Helper function: Translate jet type code from integer to char. The following notation is used for each type of jet:

  • g ISR/gluon.
  • b leptonic $ b- $ quark.
  • B hadronic $ b- $ quark.
  • w hadronic jet from $ W- $ boson.
  • H $ b- $ jet from Higgs boson.
  • ? Unknown.
Parameters
typeThe jet type code

Definition at line 224 of file Lepjets_Event_Jet.cc.

References hadb_label, hadw1_label, hadw2_label, higgs_label, isr_label, dqmiolumiharvest::j, lepb_label, and unknown_label.

Referenced by jetTypeString().

234  {
235  switch (j) {
236  case hitfit::isr_label:
237  return 'g';
238  case hitfit::lepb_label:
239  return 'b';
240  case hitfit::hadb_label:
241  return 'B';
242  case hitfit::hadw1_label:
243  return 'W';
244  case hitfit::hadw2_label:
245  return 'W';
246  case hitfit::higgs_label:
247  return 'h';
249  return '?';
250  default:
251  return '?';
252  }
253 
254  return '?';
255  }

◆ jetTypeString() [1/2]

std::string hitfit::jetTypeString ( int  type)

Helper function: Translate jet type code from integer to char. The following notation is used for each type of jet:

  • g ISR/gluon.
  • b leptonic $ b- $ quark.
  • B hadronic $ b- $ quark.
  • w hadronic jet from $ W- $ boson.
  • H $ b- $ jet from Higgs boson.
  • ? Unknown.
Parameters
typeThe jet type code

Definition at line 257 of file Lepjets_Event_Jet.cc.

References hadb_label, hadw1_label, hadw2_label, higgs_label, isr_label, dqmiolumiharvest::j, lepb_label, AlCaHLTBitMon_QueryRunRegistry::string, and unknown_label.

Referenced by hitfit::Lepjets_Event::jet_permutation().

267  {
268  switch (j) {
269  case hitfit::isr_label:
270  return std::string("g");
271  case hitfit::lepb_label:
272  return std::string("b");
273  case hitfit::hadb_label:
274  return std::string("B");
275  case hitfit::hadw1_label:
276  return std::string("W");
277  case hitfit::hadw2_label:
278  return std::string("W");
279  case hitfit::higgs_label:
280  return std::string("h");
282  return std::string("?");
283  default:
284  return std::string("?");
285  }
286 
287  return std::string("?");
288  }

◆ jetTypeString() [2/2]

template<class T >
std::string hitfit::jetTypeString ( std::vector< T jet_types)

Helper function: Translate jet type code from a list of numbers to a string.

  • g ISR/gluon.
  • b leptonic $ b- $ quark.
  • B hadronic $ b- $ quark.
  • w hadronic jet from $ W- $ boson.
  • H $ b- $ jet from Higgs boson.
  • ? Unknown.
Parameters
jet_typesThe jet type codes in vector form.

Definition at line 248 of file Lepjets_Event_Jet.h.

References dqmiolumiharvest::j, jetTypeChar(), and runTheMatrix::ret.

248  {
249  std::ostringstream ret;
250 
251  for (size_t j = 0; j != jet_types.size(); ++j) {
252  ret << jetTypeChar((int)(jet_types[j]));
253  }
254 
255  return ret.str();
256  }
ret
prodAgent to be discontinued
char jetTypeChar(int type)
Helper function: Translate jet type code from integer to char. The following notation is used for eac...

◆ make_constraint_intermed() [1/2]

unique_ptr<Constraint_Intermed> hitfit::make_constraint_intermed ( string  s)

Definition at line 284 of file Constraint_Intermed.cc.

References mps_fire::i, SummaryClient_cfi::labels, and alignCSCRings::s.

308  {
309  // Skip leading spaces, `=', '< ... >'.
310  string::size_type i = 0;
311  while (i < s.size() && s[i] == ' ')
312  ++i;
313  if (s[i] == '=')
314  ++i;
315  while (i < s.size() && s[i] == ' ')
316  ++i;
317  if (i < s.size() && s[i] == '<') {
318  i = s.find('>', i);
319  if (i == string::npos)
320  return unique_ptr<Constraint_Intermed>();
321  ++i;
322  }
323  while (i < s.size() && s[i] == ' ')
324  ++i;
325 
326  // Fail if there's nothing left.
327  if (i == s.size())
328  return unique_ptr<Constraint_Intermed>();
329 
330  if (s[i] == '(') {
331  // List of labels.
332  // Make a Constraint_Intermed_Labels instance.
333  vector<int> labels;
334  ++i;
335  while (i < s.size()) {
336  while (i < s.size() && s[i] == ' ')
337  ++i;
338  if (i < s.size() && s[i] == ')')
339  break;
340  if (i < s.size())
341  labels.push_back(atoi(s.c_str() + i));
342  while (i < s.size() && s[i] != ' ' && s[i] != ')')
343  ++i;
344  }
345  return unique_ptr<Constraint_Intermed>(new Constraint_Intermed_Labels(labels));
346  } else {
347  // Make a Constraint_Intermed_Constant instance.
348  return unique_ptr<Constraint_Intermed>(new Constraint_Intermed_Constant(atof(s.c_str() + i)));
349  }
350  }
uint16_t size_type

◆ make_constraint_intermed() [2/2]

std::unique_ptr<Constraint_Intermed> hitfit::make_constraint_intermed ( std::string  s)

Helper function to parse input string s and construct the appropriate Constraint_Intermed instance. Returns null if the input string cannot be interpreted as a mass constraint.

The string should be either a numeric constant like

80.4

or a list of integers in parenthesis like

(1 2 4)

Leading spaces are ignored, as is text in a leading <> construction.

Parameters
sThe string to parse which contains information about the mass constraint.
Return:
Valid pointer to the appropriate type of constraint object, i.e. a Constraint_Intermed_Constant or a Constraint_Intermed_Labels.
NULL pointer if the input string cannot be interpreted as a mass constraint.

Referenced by hitfit::Constraint::Constraint().

◆ operator<() [1/2]

bool hitfit::operator< ( const EtaDepResElement a,
const EtaDepResElement b 
)

Comparison operator, compare two EtaDepResElement instances based on their respective valid $\eta$ ranges.

Parameters
aThe first instance of EtaDepResElement to be compared.
bThe second instance of EtaDepResElement to be compared.
Return:
TRUE if a's upper limit is less than b's lower limit.
FALSE all other cases.

Definition at line 79 of file EtaDepResElement.cc.

References a, and b.

79  {
80  if (a.IsOverlap(b)) {
81  return false;
82  }
83  return !(a._EtaMax > b._EtaMin);
84  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator<() [2/2]

bool hitfit::operator< ( const Fit_Result a,
const Fit_Result b 
)

Sort fit results based on their $\chi^{2}$.

Parameters
aThe first instance of Fit_Result to compare.
bThe second instance of Fit_Result to compare.
Return:
TRUE if the first instance has smaller absolute value of $\chi^{2}$ than b.
FALSE all other cases.

Definition at line 174 of file Fit_Result.cc.

References a, funct::abs(), and b.

187  {
188  return abs(a._chisq) < abs(b._chisq);
189  }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator<<() [1/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Objpair o 
)

Output stream operator, print the content of this Objpair to an output stream.

Parameters
sThe stream to which to write.
oThe instance of Objpair to be printed.

Definition at line 74 of file Objpair.cc.

References isotrackApplyRegressor::k, EcalTangentSkim_cfg::o, and alignCSCRings::s.

85  {
86  s << o._i << " " << o._j;
87  for (unsigned k = 0; k < o._for_constraint.size(); ++k)
88  s << " " << static_cast<int>(o._for_constraint[k]);
89  return s;
90  }

◆ operator<<() [2/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Fit_Results res 
)

Output stream operator, print the content of this Fit_Results to an output stream.

Parameters
sThe output stream to which to write.
resThe instance Fit_Results to be printed.

Definition at line 104 of file Fit_Results.cc.

References mps_fire::i, and alignCSCRings::s.

115  {
116  for (std::vector<Fit_Result_Vec>::size_type i = 0; i < res._v.size(); i++)
117  s << "List " << i << "\n" << res._v[i];
118  return s;
119  }
uint16_t size_type
Definition: Electron.h:6

◆ operator<<() [3/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const EtaDepResElement e 
)
Parameters
sThe output stream to write to.
eThe instance of EtaDepResElement to be printed.
Return:
The output stream s

Definition at line 110 of file EtaDepResElement.cc.

References MillePedeFileConverter_cfg::e, and alignCSCRings::s.

110  {
111  s << "(" << e._EtaMin << " to " << e._EtaMax << ")"
112  << " / " << e.GetResolution();
113  return s;
114  }

◆ operator<<() [4/21]

std::ostream & hitfit::operator<< ( std::ostream &  s,
const Pair_Table p 
)

Output stream operator, print the content of this Pair_Table to an output stream.

Parameters
sThe stream to which to write.
pThe instance of Pair_Table to be printed.

Definition at line 115 of file Pair_Table.cc.

References mps_fire::i, AlCaHLTBitMon_ParallelJobs::p, and alignCSCRings::s.

126  {
127  for (int i = 0; i < p.npairs(); i++)
128  s << " " << p.get_pair(i) << "\n";
129  return s;
130  }

◆ operator<<() [5/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Constraint c 
)

Output stream operator, print the content of this Constraint to an output stream.

Parameters
sThe stream to which to write.
cThe instance of Constraint to be printed.

Definition at line 149 of file Constraint.cc.

References DummyCfis::c, and alignCSCRings::s.

160  {
161  s << *c._lhs.get() << " = " << *c._rhs.get();
162  return s;
163  }

◆ operator<<() [6/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Fit_Result_Vec resvec 
)

Output stream operator, print the content of this Fit_Result_Vec to an output stream.

Parameters
sThe output stream to which to write.
resvecThe instance of Fit_Result_Vec to be printed.

Definition at line 159 of file Fit_Result_Vec.cc.

References hitfit::Fit_Result_Vec::_v, mps_fire::i, alignCSCRings::s, and trackerHitRTTI::vector.

170  {
171  for (std::vector<std::shared_ptr<Fit_Result>>::size_type i = 0; i < resvec._v.size(); i++)
172  s << "Entry " << i << "\n" << *resvec._v[i];
173  return s;
174  }
uint16_t size_type

◆ operator<<() [7/21]

std::ostream & hitfit::operator<< ( std::ostream &  s,
const FE_Obj o 
)

Output stream operator, print the content of this FE_Obj object to an output stream.

Parameters
sThe output stream to which to write.
oThe instance of FE_Obj to be printed.

Definition at line 80 of file Fourvec_Event.cc.

References EcalTangentSkim_cfg::o, and alignCSCRings::s.

91  {
92  s << o.p << " - " << o.mass << " - " << o.label << "\n";
93  s << " errors: " << o.p_error << " " << o.phi_error << " " << o.eta_error;
94  if (o.muon_p)
95  s << " (mu)";
96  s << "\n";
97  return s;
98  }

◆ operator<<() [8/21]

std::ostream & hitfit::operator<< ( std::ostream &  s,
const Lepjets_Event_Lep l 
)

Output stream operator, print the content of this Lepjets_Event_Lep to an output stream.

Parameters
sThe stream to which to write.
lThe instance of Lepjets_Event_Lep to be printed.

Definition at line 187 of file Lepjets_Event_Lep.cc.

References MainPageGenerator::l, and alignCSCRings::s.

198  {
199  return l.dump(s);
200  }

◆ operator<<() [9/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Base_Constrainer f 
)

Output stream operator, print the content of this Base_Constrainer to an output stream.

Parameters
sThe output stream to which to write.
fThe instance of Base_Constrainer to be printed.

Definition at line 191 of file Base_Constrainer.cc.

References f, and alignCSCRings::s.

202  {
203  return f.print(s);
204  }
double f[11][100]

◆ operator<<() [10/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Fit_Result res 
)

Output stream operator, print the content of this Fit_Result to an output stream.

Parameters
sThe output stream to which to write.
resThe instance of Fit_Result to be printed.

Definition at line 199 of file Fit_Result.cc.

References alignCSCRings::s.

210  {
211  s << "chisq: " << res._chisq << "\n";
212  s << "umwhad: " << res._umwhad << "\n";
213  s << "utmass: " << res._utmass << "\n";
214  s << "mt: " << res._mt << "\n";
215  s << "sigmt: " << res._sigmt << "\n";
216  s << res._ev;
217  s << "pullx: " << res._pullx.T();
218  s << "pully: " << res._pully.T();
219  return s;
220  }
Definition: Electron.h:6

◆ operator<<() [11/21]

std::ostream & hitfit::operator<< ( std::ostream &  s,
const Lepjets_Event_Jet l 
)

Output stream operator, print the content of this Lepjets_Event_Jet to an output stream.

Parameters
sThe stream to which to write.
lThe instance of Lepjets_Event_Jet to be printed.

Definition at line 209 of file Lepjets_Event_Jet.cc.

References MainPageGenerator::l, and alignCSCRings::s.

220  {
221  return l.dump(s);
222  }

◆ operator<<() [12/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Resolution r 
)

Output stream operator, print the content of this Resolution to an output stream.

Parameters
sThe stream to which to write.
rThe instance of Resolution to be printed.

Definition at line 212 of file Resolution.cc.

References alignCSCRings::s.

223  {
224  if (r._inverse)
225  s << "-";
226  s << r._constant_sigma << "," << r._resolution_sigma << "," << r._noise_sigma;
227  return s;
228  }

◆ operator<<() [13/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Fourvec_Event fe 
)

Output stream operator, print the content of this Fourvec_Event object to an output stream.

Parameters
sThe stream to which to write.
feThe instance of Fourvec_Event to be printed.

Definition at line 220 of file Fourvec_Event.cc.

References mps_fire::i, and alignCSCRings::s.

231  {
232  s << "kt: (" << fe._kt.x() << ", " << fe._kt.y() << "); "
233  << " error: " << fe._kt_x_error << " " << fe._kt_y_error << " " << fe._kt_xy_covar << "\n";
234  s << "x: " << fe._x << "\n";
235  for (unsigned i = 0; i < fe._objs.size(); i++)
236  s << i + 1 << ": " << fe._objs[i];
237  return s;
238  }

◆ operator<<() [14/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Fourvec_Constrainer c 
)

Output stream operator, print the content of this Fourvec_Constrainer to an output stream.

Parameters
sThe output stream to which to write.
cThe instance of Fourvec_Constrainer to be printed.

Definition at line 220 of file Fourvec_Constrainer.cc.

References DummyCfis::c, mps_fire::i, ALPAKA_ACCELERATOR_NAMESPACE::caPixelDoublets::if(), and alignCSCRings::s.

231  {
232  s << "Constraints: (e_com = " << c._args.e_com() << ") ";
233  if (c._args.use_e())
234  s << "(E)";
235  s << "\n";
236 
237  for (std::vector<Constraint>::size_type i = 0; i < c._constraints.size(); i++)
238  s << " " << c._constraints[i] << "\n";
239 
240  if (!c._mass_constraint.empty()) {
241  s << "Mass constraint:\n";
242  s << c._mass_constraint[0] << "\n";
243  }
244  return s;
245  }
uint16_t size_type
if(threadIdxLocalY==0 &&threadIdxLocalX==0)

◆ operator<<() [15/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Constrained_Z cz 
)

Output stream operator, print the content of this Constrained_Z to an output stream.

Parameters
sThe output stream to which to wrire.
czThe instance of Constrained_Z to be printed.

Definition at line 236 of file Constrained_Z.cc.

References hitfit::Constrained_Z::_constrainer, and alignCSCRings::s.

247  {
248  return s << cz._constrainer;
249  }

◆ operator<<() [16/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Constrained_Top ct 
)

Output stream operator, print the content of this Constrained_Top object to an output stream.

Parameters
sThe output stream to which to write.
ctThe instance of Constrained_Top to be printed.

Definition at line 298 of file Constrained_Top.cc.

References hgcalPlots::ct, and alignCSCRings::s.

309  {
310  return s << ct._constrainer;
311  }

◆ operator<<() [17/21]

std::ostream & hitfit::operator<< ( std::ostream &  s,
const hitfit::Constraint_Intermed ci 
)

Output stream operator, print the content of this Constraint_Intermed to an output stream.

Parameters
sThe output stream to write.
ciThe instance of Constraint_Intermed to be printed.
Return:
The stream s.

Definition at line 268 of file Constraint_Intermed.cc.

References hitfit::Constraint_Intermed::print(), and alignCSCRings::s.

279  {
280  ci.print(s);
281  return s;
282  }
virtual void print(std::ostream &s) const =0

◆ operator<<() [18/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Vector_Resolution r 
)

Output stream operator, print the content of this Vector_Resolution object to an output stream.

Parameters
sThe stream to which to write.
rThe instance of Vector_Resolution to be printed.

Definition at line 346 of file Vector_Resolution.cc.

References alignCSCRings::s.

357  {
358  s << r._p_res << "/ " << r._eta_res << "/ " << r._phi_res;
359  if (r._use_et)
360  s << "/et";
361  s << "\n";
362  return s;
363  }

◆ operator<<() [19/21]

std::ostream & hitfit::operator<< ( std::ostream &  s,
const Lepjets_Event ev 
)

Output stream operator, print the content of this Lepjets_Event to an output stream.

Parameters
sThe output stream to which to write.
evThe instance of Lepjets_Event to be printed.

Definition at line 566 of file Lepjets_Event.cc.

References makeMEIFBenchmarkPlots::ev, and alignCSCRings::s.

577  {
578  return ev.dump(s);
579  }

◆ operator<<() [20/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Defaults_Text def 
)

Output stream operator. Print out all parameters' names and their values.

Parameters
sThe output stream to write.
defThe instance to print.
Return:
The output stream s

Definition at line 430 of file Defaults_Text.cc.

References spu::def(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and alignCSCRings::s.

441  {
442  for (std::map<std::string, std::string>::const_iterator it = def._rep->_map.begin(); it != def._rep->_map.end();
443  it++) {
444  s << "[" << it->first << "] = [" << it->second << "]\n";
445  }
446 
447  return s;
448  }
int def(FILE *, FILE *, int)

◆ operator<<() [21/21]

std::ostream& hitfit::operator<< ( std::ostream &  s,
const Top_Fit fitter 
)

Output stream operator, print the content of this Top_Fit object to an output stream.

Parameters
sThe output stream to which to write.
fitterThe instance of Top_Fit to be printed.

Definition at line 548 of file Top_Fit.cc.

References hitfit::Top_Fit::_constrainer, and alignCSCRings::s.

559  {
560  return s << fitter._constrainer;
561  }

◆ phidiff()

double hitfit::phidiff ( double  phi)

Normalized difference in azimuthal angles to a range between $[-\pi \dot \pi]$.

Parameters
phiThe azimuthal to be normalized.

Definition at line 220 of file fourvec.cc.

References M_PI.

Referenced by ResolutionCreator::analyze(), delta_r(), MuonMesh::isClusteredWith(), MuonMesh::isDuplicateOf(), ForwardDiskSectorBuilderFromWedges::operator()(), PtAssignment::process(), L1MuDTMuonSorter::runCOL(), and L1MuBMMuonSorter::runCOL().

230  {
231  while (phi < -M_PI)
232  phi += 2 * M_PI;
233  while (phi > M_PI)
234  phi -= 2 * M_PI;
235  return phi;
236  }
#define M_PI

◆ roteta()

void hitfit::roteta ( Fourvec v,
double  eta 
)

Rotate four-vector v through a polar angle such that the four-vector pseudorapidity changes by a desired value.

Parameters
vThe four-vector to rotate.
etaThe desired change in the pseudorapidity.
Output:
v The rotated four-vector.

Definition at line 156 of file fourvec.cc.

References PVValHelper::eta, HLT_2024v14_cff::eta1, HLT_2024v14_cff::eta2, eta_to_theta(), rottheta(), theta_to_eta(), and findQualityFiles::v.

168  {
169  double theta1 = v.theta();
170  double eta1 = theta_to_eta(theta1);
171  double eta2 = eta1 + eta;
172  double theta2 = eta_to_theta(eta2);
173 
174  rottheta(v, theta1 - theta2);
175  }
double theta_to_eta(double theta)
Convert polar angle to pseudorapidity.
Definition: fourvec.cc:191
double eta_to_theta(double eta)
Convert pseudorapidity to polar angle.
Definition: fourvec.cc:177
void rottheta(Fourvec &v, double theta)
Rotate four-vector v through a polar angle.
Definition: fourvec.cc:135

◆ rottheta()

void hitfit::rottheta ( Fourvec v,
double  theta 
)

Rotate four-vector v through a polar angle.

Parameters
vThe four-vector to rotate.
thetaThe rotation angle.
Output:
v The rotated vector.

Definition at line 135 of file fourvec.cc.

References DummyCfis::c, funct::cos(), alignCSCRings::s, funct::sin(), tauSpinnerTable_cfi::theta, and findQualityFiles::v.

Referenced by roteta().

146  {
147  double s = sin(theta), c = cos(theta);
148  double old_pt = v.perp();
149  double new_pt = old_pt * c - v.z() * s;
150  v.setZ(old_pt * s + v.z() * c);
151 
152  v.setX(v.x() * new_pt / old_pt);
153  v.setY(v.y() * new_pt / old_pt);
154  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22

◆ scalar()

double hitfit::scalar ( const CLHEP::HepGenMatrix &  m)

Return the $1 \times 1$ matrix as a scalar. Raise an assertion if the matris is not $1 \times 1$.

Parameters
mThe matrix to convert, must be $1 \times 1$.

Definition at line 166 of file matutil.cc.

References cms::cuda::assert(), and visualization-live-secondInstance_cfg::m.

Referenced by PhotonValidator::analyze(), hitfit::Chisq_Constrainer::fit(), and Traj2TrackHits::split().

178  {
179  assert(m.num_row() == 1 && m.num_col() == 1);
180  return m(1, 1);
181  }
assert(be >=bs)

◆ theta_to_eta()

double hitfit::theta_to_eta ( double  theta)

Convert polar angle to pseudorapidity.

Parameters
thetaThe polar angle to convert.

Definition at line 191 of file fourvec.cc.

References CrabHelper::log, funct::tan(), and tauSpinnerTable_cfi::theta.

Referenced by deteta(), and roteta().

201  {
202  return -log(tan(theta / 2));
203  }
Tan< T >::type tan(const T &t)
Definition: Tan.h:22

Variable Documentation

◆ nu_label

const int hitfit::nu_label = -1

A special label used for neutrino.

Definition at line 178 of file Fourvec_Event.h.

Referenced by hitfit::Fourvec_Event::add(), hitfit::Constrained_Top::Constrained_Top(), and hitfit::Fourvec_Event::set_nu_p().