CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  Refcount
 Simple reference-counted object. 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...
 
auto_ptr< Constraint_Intermedmake_constraint_intermed (string s)
 
std::auto_ptr
< Constraint_Intermed
make_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 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 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 EtaDepResElement &e)
 
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 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 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 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 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 Resolution &r)
 Output stream operator, print the content of this Resolution 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...
 
char switch (j)
 
double theta_to_eta (double theta)
 Convert polar angle to pseudorapidity. More...
 

Variables

const int nu_label = -1
 
 return
 

Typedef Documentation

typedef CLHEP::HepVector hitfit::Column_Vector

Definition at line 67 of file matutil.h.

typedef CLHEP::HepDiagMatrix hitfit::Diagonal_Matrix

Definition at line 68 of file matutil.h.

typedef CLHEP::HepLorentzVector hitfit::Fourvec

Typedef for a HepLorentzVector.

Definition at line 58 of file fourvec.h.

typedef CLHEP::HepMatrix hitfit::Matrix

Definition at line 66 of file matutil.h.

typedef CLHEP::Hep3Vector hitfit::Threevec

Typedef for a Hep3Vector.

Definition at line 63 of file fourvec.h.

Enumeration Type Documentation

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 59 of file Lepjets_Event_Jet.h.

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

Enumerator
x_offs 
y_offs 

Definition at line 151 of file Fourvec_Constrainer.cc.

Possible types of lepton in an instance of Lepjets_Event class.

Enumerator
lepton_label 
electron_label 
muon_label 

Definition at line 55 of file Lepjets_Event_Lep.h.

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 59 of file Top_Fit.h.

60 {
61  all_list = 0, // All events.
62  noperm_list = 1, // All jet assignments are correct.
63  semicorrect_list = 2, // Jets assigned to the correct top.
64  limited_isr_list = 3, // Top three jets are not ISR.
65  topfour_list = 4, // Top four jets are not ISR, any other jets are ISR.
66  btag_list = 5, // All tagged jets were assigned as b-jets.
67  htag_list = 6, // All tagged jets were assigned as b-jets or higgs.
68  n_lists = 7
69 };

Offset indices for the component of four-momentum variables.

Enumerator
p_offs 
phi_offs 
eta_offs 

Definition at line 141 of file Fourvec_Constrainer.cc.

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

Enumerator
nu_z 

Definition at line 164 of file Fourvec_Constrainer.cc.

Function Documentation

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 124 of file fourvec.cc.

References mathSSE::sqrt().

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

136 {
137  v.setE (sqrt (v.vect().mag2() + mass*mass));
138 }
T sqrt(T t)
Definition: SSEVec.h:48
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 99 of file fourvec.cc.

References mathSSE::sqrt().

111 {
112  CLHEP::Hep3Vector vect = v.vect();
113  double old_p2 = vect.mag2();
114  if (old_p2 == 0)
115  return;
116  double new_p2 = v.e()*v.e() - mass*mass;
117  if (new_p2 < 0)
118  new_p2 = 0;
119  vect *= sqrt (new_p2 / old_p2);
120  v.setVect (vect);
121 }
T sqrt(T t)
Definition: SSEVec.h:48
void hitfit::clear ( CLHEP::HepGenMatrix &  m)

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

Parameters
mThe matrix to reset.

Definition at line 168 of file matutil.cc.

References i, j, and m.

Referenced by DTTFFEDReader::analyse(), ClusterAnalyzer::analyze(), ecaldqm::SelectiveReadoutTask::beginEvent(), stor::ExpirableQueue< T, Policy >::clearIfStale(), npstat::BoxND< Numeric >::copyFrom(), pftools::SpaceManager::createCalibrators(), CSCALCTDigi::CSCALCTDigi(), DTTracoTrig::DTTracoTrig(), TowerBlockFormatter::EndEvent(), L1GtBptxCondition::evaluateCondition(), L1GtCastorCondition::evaluateCondition(), L1GtExternalCondition::evaluateCondition(), L1GtHfBitCountsCondition::evaluateCondition(), L1GtHfRingEtSumsCondition::evaluateCondition(), L1GtJetCountsCondition::evaluateCondition(), L1GtEnergySumCondition::evaluateCondition(), L1GtMuonCondition::evaluateCondition(), L1GtCorrelationCondition::evaluateCondition(), FEConfigBadStripInfo::FEConfigBadStripInfo(), FEConfigBadTTInfo::FEConfigBadTTInfo(), FEConfigBadXTInfo::FEConfigBadXTInfo(), FEConfigFgrInfo::FEConfigFgrInfo(), FEConfigLinInfo::FEConfigLinInfo(), FEConfigLUTInfo::FEConfigLUTInfo(), FEConfigMainInfo::FEConfigMainInfo(), FEConfigPedInfo::FEConfigPedInfo(), FEConfigSlidingInfo::FEConfigSlidingInfo(), FEConfigSpikeInfo::FEConfigSpikeInfo(), FEConfigTimingInfo::FEConfigTimingInfo(), FEConfigWeightInfo::FEConfigWeightInfo(), cond::RDBMS::globalTag(), evf::FUResourceQueue::initialize(), evf::FUResourceTable::initialize(), stor::InitMsgCollection::InitMsgCollection(), Vispa.Views.LineDecayView.LineDecayContainer::keyPressEvent(), ora::SelectOperation::nextCursorRow(), ODBadTTInfo::ODBadTTInfo(), ODBadXTInfo::ODBadXTInfo(), ODCCSConfig::ODCCSConfig(), ODCond2ConfInfo::ODCond2ConfInfo(), ODDCCConfig::ODDCCConfig(), ODDCUConfig::ODDCUConfig(), ODEcalCycle::ODEcalCycle(), ODFEDAQConfig::ODFEDAQConfig(), ODFEDelaysInfo::ODFEDelaysInfo(), ODFEPedestalOffsetInfo::ODFEPedestalOffsetInfo(), ODFEWeightsInfo::ODFEWeightsInfo(), ODGolBiasCurrentInfo::ODGolBiasCurrentInfo(), ODJBH4Config::ODJBH4Config(), ODLaserConfig::ODLaserConfig(), ODLTCConfig::ODLTCConfig(), ODLTSConfig::ODLTSConfig(), ODScanConfig::ODScanConfig(), ODSRPConfig::ODSRPConfig(), ODTCCConfig::ODTCCConfig(), ODTCCEEConfig::ODTCCEEConfig(), ODTowersToByPassInfo::ODTowersToByPassInfo(), ODTTCciConfig::ODTTCciConfig(), ODTTCFConfig::ODTTCFConfig(), ODVfeToRejectInfo::ODVfeToRejectInfo(), FFTJetProducer::produce(), EcalFEtoDigi::readInput(), DTTracoLUTs::reset(), CaloRecHit::setFlagField(), ora::Sequences::sinchronizeAll(), RPCCosmicSeedrecHitFinder::unsetInput(), Vispa.Main.Application.Application::updateStartupScreen(), MultiVertexFitter::vertices(), edm::CosMuoGenProducer::~CosMuoGenProducer(), DTTracoLUTs::~DTTracoLUTs(), evf::FUResourceTable::~FUResourceTable(), LinTrackCache::~LinTrackCache(), ora::MultiIndexDataTrie::~MultiIndexDataTrie(), ora::RelationalBuffer::~RelationalBuffer(), ora::RelationalDeleter::~RelationalDeleter(), PhysicsTools::MVATrainerLooper::TrainerContainer::~TrainerContainer(), and ora::TransactionCache::~TransactionCache().

175 {
176  int nrow = m.num_row();
177  int ncol = m.num_col();
178  for (int i=1; i <= nrow; i++)
179  for (int j=1; j <= ncol; j++)
180  m(i, j) = 0;
181 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
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 250 of file fourvec.cc.

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

Referenced by TrackingMaterialPlotter::fill_gradient().

261 {
262  double deta = a.pseudoRapidity() - b.pseudoRapidity();
263  double dphi = phidiff (a.phi() - b.phi());
264  return sqrt (deta*deta + dphi*dphi);
265 }
double phidiff(double phi)
Normalized difference in azimuthal angles to a range between .
Definition: fourvec.cc:231
T sqrt(T t)
Definition: SSEVec.h:48
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
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 215 of file fourvec.cc.

References theta_to_eta().

226 {
227  return theta_to_eta (cal_th (v.theta(), zvert));
228 }
double theta_to_eta(double theta)
Convert polar angle to pseudorapidity.
Definition: fourvec.cc:200
double hitfit::eta_to_theta ( double  eta)

Convert pseudorapidity to polar angle.

Parameters
etaThe value of pseudorapidity to convert.

Definition at line 185 of file fourvec.cc.

References create_public_lumi_plots::exp.

Referenced by roteta().

195 {
196  return 2 * atan (exp (-eta));
197 }
T eta() const
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 560 of file gentop.cc.

References hitfit::Lepjets_Event::add_jet(), hitfit::Lepjets_Event::add_lep(), hitfit::Gentop_Args::ele_res_str(), electron_label, hadb_label, hadw1_label, hadw2_label, hitfit::Gentop_Args::jet_res_str(), hitfit::Lepjets_Event::kt_res(), hitfit::Gentop_Args::kt_res_str(), lepb_label, hitfit::Gentop_Args::mb(), hitfit::Lepjets_Event::met(), hitfit::Gentop_Args::mt(), hitfit::Gentop_Args::muo_res_str(), hitfit::Gentop_Args::muon(), muon_label, hitfit::Gentop_Args::mw(), q1, q2, hitfit::Gentop_Args::sigma_mb(), hitfit::Gentop_Args::sigma_mt(), hitfit::Gentop_Args::sigma_mw(), hitfit::Gentop_Args::smear(), hitfit::Lepjets_Event::smear(), hitfit::Gentop_Args::smear_dir(), and hitfit::Gentop_Args::t_pt_mean().

572 {
573  CLHEP::RandBreitWigner rbw (engine);
574  CLHEP::RandGauss rgauss (engine);
575 
576  // Get the t decay momentum in the ttbar rest frame.
577  Threevec p = rand_pt (args.t_pt_mean(), engine);
578 
579  // Make the t/tbar vectors.
580  Fourvec lept = make_massive ( p, args.mt(), args.sigma_mt(), engine);
581  Fourvec hadt = make_massive (-p, args.mt(), args.sigma_mt(), engine);
582 
583  // Boost the rest frame.
584  Fourvec boost = rand_boost (args, engine);
585  lept.boost (boost.boostVector());
586  hadt.boost (boost.boostVector());
587 
588  // Decay t -> b W, leptonic side.
589  Fourvec lepb, lepw;
590  double mlb = rgauss.fire (args.mb(), args.sigma_mb());
591  double mlw = rbw.fire (args.mw(), args.sigma_mw());
592  decay (lept,
593  mlb,
594  mlw,
595  engine,
596  lepb,
597  lepw);
598 
599  // Decay t -> b W, hadronic side.
600  Fourvec hadb, hadw;
601  double mhb = rgauss.fire (args.mb(), args.sigma_mb());
602  double mhw = rbw.fire (args.mw(), args.sigma_mw());
603  decay (hadt,
604  mhb,
605  mhw,
606  engine,
607  hadb,
608  hadw);
609 
610  // Decay W -> l nu.
611  Fourvec lep, nu;
612  decay (lepw, 0, 0, engine, lep, nu);
613 
614  // Decay W -> qqbar.
615  Fourvec q1, q2;
616  decay (hadw, 0, 0, engine, q1, q2);
617 
618  // Fill in the event.
619  Lepjets_Event ev (0, ++next_evnum);
620  Vector_Resolution lep_res (args.muon() ?
621  args.muo_res_str() :
622  args.ele_res_str());
623  Vector_Resolution jet_res (args.jet_res_str());
624  Resolution kt_res = (args.kt_res_str());
625 
626  ev.add_lep (Lepjets_Event_Lep (lep,
627  args.muon() ? muon_label : electron_label,
628  lep_res));
629 
630  ev.add_jet (Lepjets_Event_Jet (lepb, lepb_label, jet_res));
631  ev.add_jet (Lepjets_Event_Jet (hadb, hadb_label, jet_res));
632  ev.add_jet (Lepjets_Event_Jet ( q1, hadw1_label, jet_res));
633  ev.add_jet (Lepjets_Event_Jet ( q2, hadw2_label, jet_res));
634 
635  ev.met() = nu;
636  ev.kt_res() = kt_res;
637 
638  // Simulate SVX tagging.
639  tagsim (args, ev, engine);
640 
641  // Smear the event, if requested.
642  if (args.smear())
643  ev.smear (engine, args.smear_dir());
644 
645  // Done!
646  return ev;
647 }
double q2[4]
Definition: TauolaWrapper.h:88
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:58
CLHEP::Hep3Vector Threevec
Typedef for a Hep3Vector.
Definition: fourvec.h:63
double q1[4]
Definition: TauolaWrapper.h:87
dictionary args
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 650 of file gentop.cc.

References hitfit::Lepjets_Event::add_jet(), hitfit::Lepjets_Event::add_lep(), hitfit::Gentop_Args::ele_res_str(), electron_label, hadb_label, hadw1_label, hadw2_label, higgs_label, hitfit::Gentop_Args::jet_res_str(), hitfit::Lepjets_Event::kt_res(), hitfit::Gentop_Args::kt_res_str(), lepb_label, hitfit::Gentop_Args::mb(), hitfit::Lepjets_Event::met(), hitfit::Gentop_Args::mh(), hitfit::Gentop_Args::mt(), hitfit::Gentop_Args::muo_res_str(), hitfit::Gentop_Args::muon(), muon_label, hitfit::Gentop_Args::mw(), q1, q2, hitfit::Gentop_Args::sigma_mb(), hitfit::Gentop_Args::sigma_mh(), hitfit::Gentop_Args::sigma_mt(), hitfit::Gentop_Args::sigma_mw(), hitfit::Gentop_Args::smear(), hitfit::Lepjets_Event::smear(), hitfit::Gentop_Args::smear_dir(), and hitfit::Gentop_Args::t_pt_mean().

662 {
663  CLHEP::RandBreitWigner rbw (engine);
664  CLHEP::RandGauss rgauss (engine);
665 
666  // Generate three-vectors for two tops.
667  Threevec p_t1 = rand_pt (args.t_pt_mean(), engine);
668  Threevec p_t2 = rand_pt (args.t_pt_mean(), engine);
669 
670  // Conserve momentum.
671  Threevec p_h = -(p_t1 + p_t2);
672 
673  // Construct the 4-vectors.
674  Fourvec lept = make_massive (p_t1, args.mt(), args.sigma_mt(), engine);
675  Fourvec hadt = make_massive (p_t2, args.mt(), args.sigma_mt(), engine);
676  Fourvec higgs = make_massive ( p_h, args.mh(), args.sigma_mh(), engine);
677 
678  // Boost the rest frame.
679  Fourvec boost = rand_boost (args, engine);
680  lept.boost (boost.boostVector());
681  hadt.boost (boost.boostVector());
682  higgs.boost (boost.boostVector());
683 
684  // Decay t -> b W, leptonic side.
685  Fourvec lepb, lepw;
686  decay (lept,
687  rgauss.fire (args.mb(), args.sigma_mb()),
688  rbw.fire (args.mw(), args.sigma_mw()),
689  engine,
690  lepb,
691  lepw);
692 
693  // Decay t -> b W, hadronic side.
694  Fourvec hadb, hadw;
695  decay (hadt,
696  rgauss.fire (args.mb(), args.sigma_mb()),
697  rbw.fire (args.mw(), args.sigma_mw()),
698  engine,
699  hadb,
700  hadw);
701 
702  // Decay W -> l nu.
703  Fourvec lep, nu;
704  decay (lepw, 0, 0, engine, lep, nu);
705 
706  // Decay W -> qqbar.
707  Fourvec q1, q2;
708  decay (hadw, 0, 0, engine, q1, q2);
709 
710  // Decay H -> bbbar.
711  Fourvec hb1, hb2;
712  decay (higgs,
713  rgauss.fire (args.mb(), args.sigma_mb()),
714  rgauss.fire (args.mb(), args.sigma_mb()),
715  engine,
716  hb1,
717  hb2);
718 
719  // Fill in the event.
720  Lepjets_Event ev (0, ++next_evnum);
721  Vector_Resolution lep_res (args.muon() ?
722  args.muo_res_str() :
723  args.ele_res_str());
724  Vector_Resolution jet_res (args.jet_res_str());
725  Resolution kt_res = (args.kt_res_str());
726 
727  ev.add_lep (Lepjets_Event_Lep (lep,
728  args.muon() ? muon_label : electron_label,
729  lep_res));
730 
731  ev.add_jet (Lepjets_Event_Jet (lepb, lepb_label, jet_res));
732  ev.add_jet (Lepjets_Event_Jet (hadb, hadb_label, jet_res));
733  ev.add_jet (Lepjets_Event_Jet ( q1, hadw1_label, jet_res));
734  ev.add_jet (Lepjets_Event_Jet ( q2, hadw2_label, jet_res));
735  ev.add_jet (Lepjets_Event_Jet ( hb1, higgs_label, jet_res));
736  ev.add_jet (Lepjets_Event_Jet ( hb2, higgs_label, jet_res));
737 
738  ev.met() = nu;
739  ev.kt_res() = kt_res;
740 
741  // Simulate SVX tagging.
742  tagsim (args, ev, engine);
743 
744  // Smear the event, if requested.
745  if (args.smear())
746  ev.smear (engine, args.smear_dir());
747 
748  // Done!
749  return ev;
750 }
double q2[4]
Definition: TauolaWrapper.h:88
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:58
CLHEP::Hep3Vector Threevec
Typedef for a Hep3Vector.
Definition: fourvec.h:63
double q1[4]
Definition: TauolaWrapper.h:87
dictionary args
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

Referenced by jetTypeString().

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

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

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 258 of file Lepjets_Event_Jet.h.

References j, jetTypeChar(), and run_regression::ret.

259 {
260 
261 
262  std::ostringstream ret;
263 
264  for (size_t j = 0 ; j != jet_types.size() ; ++j) {
265  ret << jetTypeChar((int) (jet_types[j]));
266  }
267 
268  return ret.str();
269 }
int j
Definition: DBlmapReader.cc:9
char jetTypeChar(int type)
Helper function: Translate jet type code from integer to char. The following notation is used for eac...
auto_ptr<Constraint_Intermed> hitfit::make_constraint_intermed ( string  s)

Definition at line 321 of file Constraint_Intermed.cc.

References i, and reco_calib_source_client_cfg::labels.

345 {
346  // Skip leading spaces, `=', '< ... >'.
347  string::size_type i = 0;
348  while (i < s.size() && s[i] == ' ')
349  ++i;
350  if (s[i] == '=')
351  ++i;
352  while (i < s.size() && s[i] == ' ')
353  ++i;
354  if (i < s.size() && s[i] == '<') {
355  i = s.find ('>', i);
356  if (i == string::npos)
357  return auto_ptr<Constraint_Intermed> ();
358  ++i;
359  }
360  while (i < s.size() && s[i] == ' ')
361  ++i;
362 
363  // Fail if there's nothing left.
364  if (i == s.size())
365  return auto_ptr<Constraint_Intermed> ();
366 
367  if (s[i] == '(') {
368  // List of labels.
369  // Make a Constraint_Intermed_Labels instance.
370  vector<int> labels;
371  ++i;
372  while (i < s.size()) {
373  while (i < s.size() && s[i] == ' ')
374  ++i;
375  if (i < s.size() && s[i] == ')')
376  break;
377  if (i < s.size())
378  labels.push_back (atoi (s.c_str() + i));
379  while (i < s.size() && s[i] != ' ' && s[i] != ')')
380  ++i;
381  }
382  return auto_ptr<Constraint_Intermed>
383  (new Constraint_Intermed_Labels (labels));
384  }
385  else {
386  // Make a Constraint_Intermed_Constant instance.
387  return auto_ptr<Constraint_Intermed>
388  (new Constraint_Intermed_Constant (atof (s.c_str() + i)));
389  }
390 }
int i
Definition: DBlmapReader.cc:9
uint16_t size_type
std::auto_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().

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 103 of file EtaDepResElement.cc.

References hitfit::EtaDepResElement::_EtaMax, hitfit::EtaDepResElement::_EtaMin, and hitfit::EtaDepResElement::IsOverlap().

104 {
105 
106  if (a.IsOverlap(b)) { return false;}
107  return !(a._EtaMax > b._EtaMin);
108 
109 }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
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 196 of file Fit_Result.cc.

References hitfit::Fit_Result::_chisq, and abs.

209 {
210  return abs (a._chisq) < abs (b._chisq);
211 }
#define abs(x)
Definition: mlp_lapack.h:159
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
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 86 of file Objpair.cc.

References hitfit::Objpair::_for_constraint, hitfit::Objpair::_i, hitfit::Objpair::_j, gen::k, and alignCSCRings::s.

97 {
98  s << o._i << " " << o._j;
99  for (unsigned k = 0; k < o._for_constraint.size(); ++k)
100  s << " " << static_cast<int> (o._for_constraint[k]);
101  return s;
102 }
int k[5][pyjets_maxn]
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 118 of file Fit_Results.cc.

References hitfit::Fit_Results::_v, and i.

129 {
130  for (std::vector<Fit_Result_Vec>::size_type i=0; i < res._v.size(); i++)
131  s << "List " << i << "\n" << res._v[i];
132  return s;
133 }
int i
Definition: DBlmapReader.cc:9
uint16_t size_type
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 124 of file Pair_Table.cc.

References hitfit::Pair_Table::get_pair(), i, hitfit::Pair_Table::npairs(), and alignCSCRings::s.

135 {
136  for (int i=0; i < p.npairs(); i++)
137  s << " " << p.get_pair (i) << "\n";
138  return s;
139 }
int i
Definition: DBlmapReader.cc:9
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 163 of file Constraint.cc.

References hitfit::Constraint::_lhs, hitfit::Constraint::_rhs, and alignCSCRings::s.

174 {
175  s << *c._lhs.get() << " = " << *c._rhs.get();
176  return s;
177 }
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 88 of file Fourvec_Event.cc.

References hitfit::FE_Obj::eta_error, hitfit::FE_Obj::label, hitfit::FE_Obj::mass, hitfit::FE_Obj::muon_p, hitfit::FE_Obj::p, hitfit::FE_Obj::p_error, hitfit::FE_Obj::phi_error, and alignCSCRings::s.

99 {
100  s << o.p << " - " << o.mass << " - " << o.label << "\n";
101  s << " errors: " << o.p_error << " " << o.phi_error << " " << o.eta_error;
102  if (o.muon_p)
103  s << " (mu)";
104  s << "\n";
105  return s;
106 }
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 186 of file EtaDepResElement.cc.

References hitfit::EtaDepResElement::_EtaMax, hitfit::EtaDepResElement::_EtaMin, hitfit::EtaDepResElement::GetResolution(), and alignCSCRings::s.

187 {
188 
189  s << "(" << e._EtaMin << " to " << e._EtaMax << ")" << " / " << e.GetResolution ();
190  return s ;
191 
192 }
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 193 of file Fit_Result_Vec.cc.

References hitfit::Fit_Result_Vec::_v, and i.

204 {
205  for (std::vector<Fit_Result*>::size_type i=0; i < resvec._v.size(); i++)
206  s << "Entry " << i << "\n" << *resvec._v[i];
207  return s;
208 }
int i
Definition: DBlmapReader.cc:9
uint16_t size_type
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 211 of file Lepjets_Event_Lep.cc.

References hitfit::Lepjets_Event_Lep::dump().

222 {
223  return l.dump (s);
224 }
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 228 of file Lepjets_Event_Jet.cc.

References hitfit::Lepjets_Event_Jet::dump().

239 {
240  return l.dump (s);
241 }
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 215 of file Base_Constrainer.cc.

References hitfit::Base_Constrainer::print().

226 {
227  return f.print (s);
228 }
double f[11][100]
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 222 of file Fit_Result.cc.

References hitfit::Fit_Result::_chisq, hitfit::Fit_Result::_ev, hitfit::Fit_Result::_mt, hitfit::Fit_Result::_pullx, hitfit::Fit_Result::_pully, hitfit::Fit_Result::_sigmt, hitfit::Fit_Result::_umwhad, hitfit::Fit_Result::_utmass, and alignCSCRings::s.

233 {
234  s << "chisq: " << res._chisq << "\n";
235  s << "umwhad: " << res._umwhad << "\n";
236  s << "utmass: " << res._utmass << "\n";
237  s << "mt: " << res._mt << "\n";
238  s << "sigmt: " << res._sigmt << "\n";
239  s << res._ev;
240  s << "pullx: " << res._pullx.T();
241  s << "pully: " << res._pully.T();
242  return s;
243 }
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 246 of file Fourvec_Event.cc.

References hitfit::Fourvec_Event::_kt, hitfit::Fourvec_Event::_kt_x_error, hitfit::Fourvec_Event::_kt_xy_covar, hitfit::Fourvec_Event::_kt_y_error, hitfit::Fourvec_Event::_objs, hitfit::Fourvec_Event::_x, and i.

257 {
258  s << "kt: (" << fe._kt.x() << ", " << fe._kt.y() << "); "
259  << " error: " << fe._kt_x_error << " " << fe._kt_y_error << " "
260  << fe._kt_xy_covar << "\n";
261  s << "x: " << fe._x << "\n";
262  for (unsigned i = 0; i < fe._objs.size(); i++)
263  s << i+1 << ": " << fe._objs[i];
264  return s;
265 }
int i
Definition: DBlmapReader.cc:9
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 254 of file Fourvec_Constrainer.cc.

References hitfit::Fourvec_Constrainer::_args, hitfit::Fourvec_Constrainer::_constraints, hitfit::Fourvec_Constrainer::_mass_constraint, hitfit::Fourvec_Constrainer_Args::e_com(), i, reco::if(), alignCSCRings::s, and hitfit::Fourvec_Constrainer_Args::use_e().

265 {
266  s << "Constraints: (e_com = " << c._args.e_com() << ") ";
267  if (c._args.use_e())
268  s << "(E)";
269  s << "\n";
270 
271  for (std::vector<Constraint>::size_type i=0; i < c._constraints.size(); i++)
272  s << " " << c._constraints[i] << "\n";
273 
274  if (c._mass_constraint.size() > 0) {
275  s << "Mass constraint:\n";
276  s << c._mass_constraint[0] << "\n";
277  }
278  return s;
279 }
int i
Definition: DBlmapReader.cc:9
uint16_t size_type
if(dp >Float(M_PI)) dp-
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 259 of file Resolution.cc.

References hitfit::Resolution::_constant_sigma, hitfit::Resolution::_inverse, hitfit::Resolution::_noise_sigma, hitfit::Resolution::_resolution_sigma, and alignCSCRings::s.

270 {
271  if (r._inverse) s << "-";
272  s << r._constant_sigma << ","
273  << r._resolution_sigma << ","
274  << r._noise_sigma;
275  return s;
276 }
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 262 of file Constrained_Z.cc.

References hitfit::Constrained_Z::_constrainer.

273 {
274  return s << cz._constrainer;
275 }
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 334 of file Constrained_Top.cc.

References hitfit::Constrained_Top::_constrainer.

345 {
346  return s << ct._constrainer;
347 }
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 304 of file Constraint_Intermed.cc.

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

315 {
316  ci.print (s);
317  return s;
318 }
virtual void print(std::ostream &s) const =0
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 387 of file Vector_Resolution.cc.

References hitfit::Vector_Resolution::_eta_res, hitfit::Vector_Resolution::_p_res, hitfit::Vector_Resolution::_phi_res, hitfit::Vector_Resolution::_use_et, and alignCSCRings::s.

398 {
399  s << r._p_res << "/ " << r._eta_res << "/ " << r._phi_res;
400  if (r._use_et)
401  s << "/et";
402  s << "\n";
403  return s;
404 }
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 626 of file Lepjets_Event.cc.

References hitfit::Lepjets_Event::dump().

637 {
638  return ev.dump (s);
639 }
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 460 of file Defaults_Text.cc.

References hitfit::Defaults_Textrep::_map, hitfit::Defaults_Text::_rep, and alignCSCRings::s.

471 {
472 
473  for (std::map<std::string,std::string>::const_iterator it = def._rep->_map.begin() ;
474  it != def._rep->_map.end() ;
475  it++) {
476  s << "[" << it->first << "] = [" << it->second << "]\n";
477  }
478 
479  return s;
480 }
JetCorrectorParameters::Definitions def
Definition: classes.h:12
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 593 of file Top_Fit.cc.

References hitfit::Top_Fit::_constrainer.

604 {
605  return s << fitter._constrainer;
606 }
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 231 of file fourvec.cc.

References M_PI, and phi.

Referenced by ResolutionCreator::analyze(), delta_r(), DDTIBLayerAlgo_MTCC::execute(), MuonMesh::isClusteredWith(), MuonMesh::isDuplicateOf(), ForwardDiskSectorBuilderFromWedges::operator()(), and L1MuDTMuonSorter::runCOL().

241 {
242  while (phi < -M_PI)
243  phi += 2 * M_PI;
244  while (phi > M_PI)
245  phi -= 2*M_PI;
246  return phi;
247 }
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10
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 163 of file fourvec.cc.

References eta(), eta_to_theta(), rottheta(), and theta_to_eta().

175 {
176  double theta1 = v.theta ();
177  double eta1 = theta_to_eta (theta1);
178  double eta2 = eta1 + eta;
179  double theta2 = eta_to_theta (eta2);
180 
181  rottheta (v, theta1 - theta2);
182 }
double theta_to_eta(double theta)
Convert polar angle to pseudorapidity.
Definition: fourvec.cc:200
T eta() const
double eta_to_theta(double eta)
Convert pseudorapidity to polar angle.
Definition: fourvec.cc:185
void rottheta(Fourvec &v, double theta)
Rotate four-vector v through a polar angle.
Definition: fourvec.cc:141
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 141 of file fourvec.cc.

References trackerHits::c, funct::cos(), alignCSCRings::s, and funct::sin().

Referenced by roteta().

152 {
153  double s = sin (theta), c = cos (theta);
154  double old_pt = v.perp();
155  double new_pt = old_pt*c - v.z()*s;
156  v.setZ (old_pt*s + v.z()*c);
157 
158  v.setX (v.x() * new_pt / old_pt);
159  v.setY (v.y() * new_pt / old_pt);
160 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
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 184 of file matutil.cc.

References m.

Referenced by PhotonValidator::analyze(), PhotonAnalyzer::analyze(), hitfit::Chisq_Constrainer::fit(), and Trajectory::recHitsV().

196 {
197  assert (m.num_row() == 1 && m.num_col() == 1);
198  return m (1, 1);
199 }
char hitfit::switch ( j  )

Definition at line 258 of file Lepjets_Event_Jet.cc.

References hadb_label, hadw1_label, hadw2_label, higgs_label, isr_label, lepb_label, and unknown_label.

258  {
259 
260  case hitfit::isr_label:
261  return 'g';
262  case hitfit::lepb_label:
263  return 'b';
264  case hitfit::hadb_label:
265  return 'B';
266  case hitfit::hadw1_label:
267  return 'W';
268  case hitfit::hadw2_label:
269  return 'W';
270  case hitfit::higgs_label:
271  return 'h';
273  return '?';
274  default:
275  return '?';
276  }
double hitfit::theta_to_eta ( double  theta)

Convert polar angle to pseudorapidity.

Parameters
thetaThe polar angle to convert.

Definition at line 200 of file fourvec.cc.

References create_public_lumi_plots::log, and funct::tan().

Referenced by deteta(), and roteta().

210 {
211  return - log (tan (theta / 2));
212 }
Geom::Theta< T > theta() const
Tan< T >::type tan(const T &t)
Definition: Tan.h:22

Variable Documentation

const int hitfit::nu_label = -1

A special label used for neutrino.

Definition at line 186 of file Fourvec_Event.h.

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

hitfit::return

Definition at line 278 of file Lepjets_Event_Jet.cc.

Referenced by RunManager::abortEvent(), FastElectronSeedGenerator::addASeedToThisCluster(), ElectronSeedGenerator::addSeed(), DQMHOAlCaRecoStream::analyze(), PerformanceAnalyzer::analyze(), edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::analyze(), edmtest::DQMXMLFileEventSetupAnalyzer::analyze(), DQMHcalDiJetsAlCaReco::analyze(), DQMHcalPhiSymAlCaReco::analyze(), AlCaElectronsTest::analyze(), PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::analyze(), ZeePlots::analyze(), PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::analyze(), edm::FlatEGunASCIIWriter::analyze(), DQMAnalyzer::analyze(), cms::Analyzer_minbias::analyze(), TrackerHitAnalyzer::analyze(), ElectronCalibrationUniv::analyze(), HiEvtPlaneFlatCalib::analyze(), L1TdeRCT::analyze(), edm::HepMCProduct::applyVtxGen(), CustomConfigs::Base(), MCElectronAnalyzer::beginJob(), MCPhotonAnalyzer::beginJob(), MCPizeroAnalyzer::beginJob(), PhotonsWithConversionsAnalyzer::beginJob(), SimpleConvertedPhotonAnalyzer::beginJob(), AlCaElectronsTest::beginJob(), gen::Pythia6Gun::beginJob(), edm::FlatEGunASCIIWriter::beginJob(), cms::Analyzer_minbias::beginJob(), TopValidation::beginJob(), edm::BaseFlatGunProducer::beginRun(), EcalDeadCellTriggerPrimitiveFilter::beginRun(), DTLocalTriggerTask::bookHistos(), DTLocalTriggerTask::bookWheelHistos(), edm::HepMCProduct::boostToLab(), sim::FieldBuilder::build(), EPOS::EPOS_Wrapper::byte_num_to_double(), EPOS::EPOS_Wrapper::byte_num_to_int(), ElectronHcalHelper::checkSetup(), ElectronEnergyCorrector::classBasedParameterizationEnergy(), pos::PixelHdwAddress::compare(), TrackerGeometryCompare::compareSurfaceDeformations(), IMACalibBlock::complete(), SiPixelInformationExtractor::computeStatus(), sim::LocalFieldManager::ConfigureForTrack(), TFParams::copie_colonne_mat(), ElectronMomentumCorrector::correct(), SiPixelTrackerMapCreator::create(), EcalTPGParamBuilder::create_header(), RestoreRandomSeeds_cff::customise(), TimeMemorySummary::customise(), DataMixer_DataConditions_3_8_X_data2010::customise(), ECALHCAL::customise(), HCAL::customise(), SingleNuE10::customise(), SingleMuPt10::customise(), IgProfInfo::customise(), customise_RPCgeom37X::customise(), TimeMemoryG4Info::customise(), TimeMemoryInfo::customise(), SimCalorimetry_EcalSelectiveReadoutProducers_setBeamcom09_cff::customise(), SimCalorimetry_setPreshowerHighGain_cff::customise(), SimCalorimetry_setPreshowerLowGain_cff::customise(), APDSimu_cff::customise(), RussianRoulette_cff::customise(), DigiToRecoNoPU::customise(), SimTracker_SetDeconv_cff::customise(), Pomwig_custom::customise(), SimTracker_SetPeak_cff::customise(), noAbortPDGid_custom::customise(), customise::customise(), useSource_custom::customise(), DigiToRecoPU::customise(), ProcessFromBareGEN_cff::customise(), SimWithCastor_cff::customise(), SimWithoutCastor_cff::customise(), customise_stdgeom::customise(), customizePU::customise(), ZmumuStandaloneSelectionAll::customise(), rh_customizeAll::customise(), pf_01_customize_HLT::customise(), SaveRandomSeedsDigi::customise(), customise_phase1_hcal::customise(), RestoreRandomSeedsDigi::customise(), RestoreRandomSeedsSim::customise(), SaveRandomSeedsSim::customise(), 12_customise_overlay_both_events::customise(), NoHcalZeroSuppression_cff::customise(), MixingModule::customise(), 11_customise_simulate_new_partial_event::customise(), 01_customise_select_zmumu_and_replace::customise(), step1_ZMM_7Tev::customise(), step2_ZMM_7Tev::customise(), reproc2011_2012_cff::customiseG4(), gen::TauolaInterface::decodeMDTAU(), TFParams::diff_mat(), edm::EDFilter::doEndLuminosityBlock(), FWCollectionSummaryModelCellRenderer::draw(), SiPixelTrackerMap::drawModule(), PerformanceAnalyzer::endJob(), MCElectronAnalyzer::endJob(), MCPhotonAnalyzer::endJob(), MCPizeroAnalyzer::endJob(), PhotonsWithConversionsAnalyzer::endJob(), SimpleConvertedPhotonAnalyzer::endJob(), AlCaElectronsTest::endJob(), ElectronConversionRejectionValidator::endJob(), cms::Analyzer_minbias::endJob(), TrackerHitAnalyzer::endJob(), TkConvValidator::endJob(), PhotonValidator::endJob(), ElectronCalibrationUniv::endJob(), TopValidation::endJob(), PiZeroAnalyzer::endJob(), DijetRatio< Jet >::endJob(), PhiSymmetryCalibration::endRun(), trivialParser::eraseSpaces(), L1ExtraParticleMapProd::evaluateForwardRapidityGap(), CustomConfigs::FASTSIM(), MonRunList::fetchLastNRuns(), RunList::fetchLastNRuns(), MonRunList::fetchRuns(), RunList::fetchRuns(), IMACalibBlock::Fill(), L3CalibBlock::Fill(), fill_mat(), AlCaElectronsTest::fillAroundBarrel(), DQMSourceEleCalib::fillAroundBarrel(), AlCaElectronsTest::fillAroundEndcap(), DQMSourceEleCalib::fillAroundEndcap(), CaloSubdetectorGeometry::fillDefaultNamedParameters(), IMACalibBlock::fillMap(), SiPixelHistoPlotter::fillNamedImageBuffer(), SiStripHistoPlotter::fillNamedImageBuffer(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1MuGMTParametersKeysOnlineProd::fillObjectKeys(), DTTFRSKeysOnlineProd::fillObjectKeys(), L1MuTriggerScaleKeysOnlineProd::fillObjectKeys(), RCTObjectKeysOnlineProd::fillObjectKeys(), DTTFTSCObjectKeysOnlineProd::fillObjectKeys(), gen::Cascade2Hadronizer::fillTmpStorage(), gen::Pythia6Hadronizer::fillTmpStorage(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), PulseFitWithFunction::Fit_parab(), evf::FUEventProcessor::forkProcessesFromEDM(), cmsPerfPublish::getArchVersionFromLog(), Generator::HepMC2G4(), hInit(), CustomConfigs::HLTDropPrevious(), TMarkov::init(), PulseFitWithShape::init(), SeedFromProtoTrack::init(), TPNFit::init(), PulseFitWithFunction::init(), TMatacq::init(), gen::EvtGenInterface::init(), CaloSubdetectorGeometry::initializeParms(), RunManager::initializeRun(), TPedValues::insert(), TFParams::inverse_mat(), CustomConfigs::L1T(), CustomConfigs::L1THLT(), SETSeedFinder::limitCombinatorics(), RPCDcsInfo::makeDcsInfo(), RPCRecHitProbability::makeDcsInfo(), DQMDcsInfo::makeDcsInfo(), DQMProvInfo::makeDcsInfo(), RPCMonitorDigi::makeDcsInfo(), DQMProvInfo::makeHLTKeyInfo(), DQMProvInfo::makeProvInfo(), MuonRoadTrajectoryBuilder::makeTrajectories_0(), mtrTransfer(), SensitiveDetector::NaNTrap(), ZGoldenFilter::newEvent(), TTUInput::operator=(), IteratedMedianCMNSubtractor::pairMedian(), Generator::particleAssignDaughters(), pos::PixelTimeFormatter::PixelTimeFormatter(), BlockSolver::pour(), sim::LocalFieldManager::print(), TFParams::print_mat(), TFParams::print_mat_nk(), BTagDifferentialPlot::process(), CustomConfigs::ProcessName(), SeedGeneratorFromRegionHitsEDProducer::produce(), IsoTracks::produce(), bestPVselector< T1 >::produce(), TrackFromPVSelector::produce(), MuonFromPVSelector::produce(), BaseEvtVtxGenerator::produce(), GsfElectronFromPVSelector::produce(), ZllArbitrator< T1 >::produce(), AlCaEcalHcalReadoutsProducer::produce(), MixEvtVtxGenerator::produce(), L1ExtraParticleMapProd::produce(), BetaBoostEvtVtxGenerator::produce(), AlCaECALRecHitReducer::produce(), MixBoostEvtVtxGenerator::produce(), HiEvtPlaneFlatProducer::produce(), GsfElectronCoreEcalDrivenProducer::produceEcalDrivenCore(), GsfElectronCoreProducer::produceTrackerDrivenCore(), TFParams::produit_mat(), TFParams::produit_mat_int(), SiStripClusterCollection::put(), ElectronHcalHelper::readEvent(), L3CalibBlock::reset(), IMACalibBlock::riempiMtr(), IMACalibBlock::riempiVtr(), cmsPerfSuite.PerfSuite::runCmsReport(), ElectronSeedGenerator::seedsFromThisCluster(), SingleEleCalibSelector::select(), gen::TauolaInterface::selectDecayByMDTAU(), gen::Pythia6Service::setCSAParams(), GsfElectronAlgo::setCutBasedPreselectionFlag(), PhysicsList::SetCuts(), JetMatchingHook::setEventNumber(), gen::Pythia6Service::setGeneralParams(), Generator::setGenEvent(), gen::Pythia6Service::setSLHAFromHeader(), CalibCoeff::setStatus(), setStyle(), CalibCoeff::setValue(), DDG4ProductionCuts::SetVerbosity(), BlockSolver::shrink(), TFParams::somme_mat_int(), TFParams::somme_mat_int_scale(), pos::PixelTimeFormatter::stopTimer(), TagNames::TagNames(), TrackerSeedGenerator::trackerSeeds(), TFParams::transpose_mat(), timeUnitHelper::unpack(), getBeamSpotDB::unpack(), CommonUtil::unpack(), CommonMethods::unpack(), beamvalidation::unpack(), TFParams::zero_mat(), and ElectronHcalHelper::~ElectronHcalHelper().