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:

  • Missing transverse energy.
  • $ z- $ vertex (Irrelevant for non-D0 experiment)
  • Run and event number (Irrelevant for non-D0 experiment)
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:

  • SVX (Secondary Vertex) tag flag (Irrelevant for non-D0 experiment).
  • SLT (Soft Lepton Tag) flag (Irrelevant for non-D0 experiment).
  • SLT lepton four-momentum (Irrelevant for non-D0 experiment).
  • SLT lepton energy deposition (Irrelevant for non-D0 experiment).
More...
class  Lepjets_Event_Lep
 Represent a lepton in an instance of Lepjets_Event class. This class hold the following information:

  • Four-momentum.
  • The type code (electron, muon, or generic lepton).
  • The resolution in Vector_Resolution type.
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.
typedef CLHEP::HepMatrix Matrix
typedef CLHEP::Hep3Vector Threevec
 Typedef for a Hep3Vector.

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.
void adjust_p_for_mass (Fourvec &v, double mass)
 Adjust the three-vector part of v, leaving the energy unchanged,.
void clear (CLHEP::HepGenMatrix &m)
 Helper function: Reset all elements of a matrix to 0.
double delta_r (const Fourvec &a, const Fourvec &b)
 Find the distance between two four-vectors in the two-dimensional space $\eta-\phi$.
double deteta (const Fourvec &v, double zvert)
 NOT USED ANYMORE: Get the detector $\eta$ (D0-specific), requires z-vertex.
double eta_to_theta (double eta)
 Convert pseudorapidity to polar angle.
Lepjets_Event gentop (const Gentop_Args &args, CLHEP::HepRandomEngine &engine)
 Generate a $t\bar{t} \to \ell + 4~\mathrm{jets}$ event.
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.
char 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.

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:

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

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.

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

std::auto_ptr
< Constraint_Intermed
make_constraint_intermed (std::string s)
auto_ptr< Constraint_Intermedmake_constraint_intermed (string s)
bool operator< (const Fit_Result &a, const Fit_Result &b)
 Sort fit results based on their $\chi^{2}$.
bool operator< (const EtaDepResElement &a, const EtaDepResElement &b)
 Comparison operator, compare two EtaDepResElement instances based on their respective valid $\eta$ ranges.
std::ostream & operator<< (std::ostream &s, const Constraint &c)
 Output stream operator, print the content of this Constraint to an output stream.
std::ostream & operator<< (std::ostream &s, const Constrained_Z &cz)
 Output stream operator, print the content of this Constrained_Z to an output stream.
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.
std::ostream & operator<< (std::ostream &s, const Defaults_Text &def)
std::ostream & operator<< (std::ostream &s, const Fit_Result &res)
 Output stream operator, print the content of this Fit_Result to an output stream.
std::ostream & operator<< (std::ostream &s, const Resolution &r)
 Output stream operator, print the content of this Resolution to an output stream.
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.
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.
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.
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.
std::ostream & operator<< (std::ostream &s, const Objpair &o)
 Output stream operator, print the content of this Objpair to an output stream.
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.
std::ostream & operator<< (std::ostream &s, const EtaDepResElement &e)
std::ostream & operator<< (std::ostream &s, const Fit_Results &res)
 Output stream operator, print the content of this Fit_Results to an output stream.
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.
std::ostream & operator<< (std::ostream &s, const Base_Constrainer &f)
 Output stream operator, print the content of this Base_Constrainer to an output stream.
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.
std::ostream & operator<< (std::ostream &s, const Pair_Table &p)
 Output stream operator, print the content of this Pair_Table to an output stream.
std::ostream & operator<< (std::ostream &s, const Fourvec_Constrainer &c)
 Output stream operator, print the content of this Fourvec_Constrainer to an output stream.
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.
std::ostream & operator<< (std::ostream &s, const Lepjets_Event &ev)
 Output stream operator, print the content of this Lepjets_Event to an output stream.
double phidiff (double phi)
 Normalized difference in azimuthal angles to a range between $[-\pi \dot \pi]$.
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.
void rottheta (Fourvec &v, double theta)
 Rotate four-vector v through a polar angle.
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$.
double theta_to_eta (double theta)
 Convert polar angle to pseudorapidity.

Variables

const int nu_label = -1

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.

                {
  isr_label = 0,
  lepb_label = 11,
  hadb_label = 12,
  hadw1_label = 13,
  hadw2_label = 14,
  higgs_label = 15,
  unknown_label = 20
};

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.

             {
  x_offs = 0,
  y_offs = 1
} Kt_Offsets;

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.

                   {
  lepton_label = 1,  // generic lepton
  electron_label = 2,
  muon_label = 3
};

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.

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

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.

             {
  p_offs = 0,
  phi_offs = 1,
  eta_offs = 2
} Offsets;

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 scaleCards::mass, and mathSSE::sqrt().

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

{
  v.setE (sqrt (v.vect().mag2() + mass*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 99 of file fourvec.cc.

References scaleCards::mass, and mathSSE::sqrt().

{
  CLHEP::Hep3Vector vect = v.vect();
  double old_p2 = vect.mag2();
  if (old_p2 == 0)
    return;
  double new_p2 = v.e()*v.e() - mass*mass;
  if (new_p2 < 0)
    new_p2 = 0;
  vect *= sqrt (new_p2 / old_p2);
  v.setVect (vect);
}
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(), pftools::SpaceManager::createCalibrators(), CSCALCTDigi::CSCALCTDigi(), DTTracoTrig::DTTracoTrig(), TowerBlockFormatter::EndEvent(), L1GtCorrelationCondition::evaluateCondition(), L1GtCastorCondition::evaluateCondition(), L1GtJetCountsCondition::evaluateCondition(), L1GtBptxCondition::evaluateCondition(), L1GtExternalCondition::evaluateCondition(), L1GtMuonCondition::evaluateCondition(), L1GtEnergySumCondition::evaluateCondition(), L1GtHfRingEtSumsCondition::evaluateCondition(), L1GtHfBitCountsCondition::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(), 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(), edm::CosMuoGenProducer::~CosMuoGenProducer(), edm::CosMuoGenSource::~CosMuoGenSource(), DTTracoLUTs::~DTTracoLUTs(), evf::FUResourceTable::~FUResourceTable(), LinTrackCache::~LinTrackCache(), ora::MultiIndexDataTrie::~MultiIndexDataTrie(), ora::RelationalBuffer::~RelationalBuffer(), ora::RelationalDeleter::~RelationalDeleter(), PhysicsTools::MVATrainerLooper::TrainerContainer::~TrainerContainer(), and ora::TransactionCache::~TransactionCache().

{
  int nrow = m.num_row();
  int ncol = m.num_col();
  for (int i=1; i <= nrow; i++)
    for (int j=1; j <= ncol; j++)
      m(i, j) = 0;
}
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().

{
  double deta = a.pseudoRapidity() - b.pseudoRapidity();
  double dphi = phidiff (a.phi() - b.phi());
  return sqrt (deta*deta + dphi*dphi);
}
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().

{
  return theta_to_eta (cal_th (v.theta(), zvert));
}
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().

{
  return 2 * atan (exp (-eta));
}
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().

{
  CLHEP::RandBreitWigner rbw (engine);
  CLHEP::RandGauss rgauss (engine);

  // Get the t decay momentum in the ttbar rest frame.
  Threevec p = rand_pt (args.t_pt_mean(), engine);

  // Make the t/tbar vectors.
  Fourvec lept = make_massive ( p, args.mt(), args.sigma_mt(), engine);
  Fourvec hadt = make_massive (-p, args.mt(), args.sigma_mt(), engine);

  // Boost the rest frame.
  Fourvec boost = rand_boost (args, engine);
  lept.boost (boost.boostVector());
  hadt.boost (boost.boostVector());

  // Decay t -> b W, leptonic side.
  Fourvec lepb, lepw;
  double mlb = rgauss.fire (args.mb(), args.sigma_mb());
  double mlw = rbw.fire (args.mw(), args.sigma_mw());
  decay (lept, 
         mlb,
         mlw,
         engine,
         lepb,
         lepw);

  // Decay t -> b W, hadronic side.
  Fourvec hadb, hadw;
  double mhb = rgauss.fire (args.mb(), args.sigma_mb());
  double mhw = rbw.fire (args.mw(), args.sigma_mw());
  decay (hadt, 
         mhb,
         mhw,
         engine,
         hadb,
         hadw);

  // Decay W -> l nu.
  Fourvec lep, nu;
  decay (lepw, 0, 0, engine, lep, nu);

  // Decay W -> qqbar.
  Fourvec q1, q2;
  decay (hadw, 0, 0, engine, q1, q2);

  // Fill in the event.
  Lepjets_Event ev (0, ++next_evnum);
  Vector_Resolution lep_res (args.muon() ? 
                             args.muo_res_str() :
                             args.ele_res_str());
  Vector_Resolution jet_res (args.jet_res_str());
  Resolution kt_res = (args.kt_res_str());

  ev.add_lep (Lepjets_Event_Lep (lep,
                                 args.muon() ? muon_label : electron_label,
                                 lep_res));

  ev.add_jet (Lepjets_Event_Jet (lepb,  lepb_label, jet_res));
  ev.add_jet (Lepjets_Event_Jet (hadb,  hadb_label, jet_res));
  ev.add_jet (Lepjets_Event_Jet (  q1, hadw1_label, jet_res));
  ev.add_jet (Lepjets_Event_Jet (  q2, hadw2_label, jet_res));

  ev.met() = nu;
  ev.kt_res() = kt_res;

  // Simulate SVX tagging.
  tagsim (args, ev, engine);

  // Smear the event, if requested.
  if (args.smear())
    ev.smear (engine, args.smear_dir());

  // Done!
  return ev;
}
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().

{
  CLHEP::RandBreitWigner rbw (engine);
  CLHEP::RandGauss rgauss (engine);

  // Generate three-vectors for two tops.
  Threevec p_t1 = rand_pt (args.t_pt_mean(), engine);
  Threevec p_t2 = rand_pt (args.t_pt_mean(), engine);

  // Conserve momentum.
  Threevec p_h = -(p_t1 + p_t2);

  // Construct the 4-vectors.
  Fourvec lept = make_massive  (p_t1, args.mt(), args.sigma_mt(), engine);
  Fourvec hadt = make_massive  (p_t2, args.mt(), args.sigma_mt(), engine);
  Fourvec higgs = make_massive ( p_h, args.mh(), args.sigma_mh(), engine);

  // Boost the rest frame.
  Fourvec boost = rand_boost (args, engine);
  lept.boost (boost.boostVector());
  hadt.boost (boost.boostVector());
  higgs.boost (boost.boostVector());

  // Decay t -> b W, leptonic side.
  Fourvec lepb, lepw;
  decay (lept, 
         rgauss.fire (args.mb(), args.sigma_mb()),
         rbw.fire (args.mw(), args.sigma_mw()),
         engine,
         lepb,
         lepw);

  // Decay t -> b W, hadronic side.
  Fourvec hadb, hadw;
  decay (hadt, 
         rgauss.fire (args.mb(), args.sigma_mb()),
         rbw.fire (args.mw(), args.sigma_mw()),
         engine,
         hadb,
         hadw);

  // Decay W -> l nu.
  Fourvec lep, nu;
  decay (lepw, 0, 0, engine, lep, nu);

  // Decay W -> qqbar.
  Fourvec q1, q2;
  decay (hadw, 0, 0, engine, q1, q2);

  // Decay H -> bbbar.
  Fourvec hb1, hb2;
  decay (higgs, 
         rgauss.fire (args.mb(), args.sigma_mb()),
         rgauss.fire (args.mb(), args.sigma_mb()),
         engine,
         hb1,
         hb2);

  // Fill in the event.
  Lepjets_Event ev (0, ++next_evnum);
  Vector_Resolution lep_res (args.muon() ? 
                             args.muo_res_str() :
                             args.ele_res_str());
  Vector_Resolution jet_res (args.jet_res_str());
  Resolution kt_res = (args.kt_res_str());

  ev.add_lep (Lepjets_Event_Lep (lep,
                                 args.muon() ? muon_label : electron_label,
                                 lep_res));

  ev.add_jet (Lepjets_Event_Jet (lepb,  lepb_label, jet_res));
  ev.add_jet (Lepjets_Event_Jet (hadb,  hadb_label, jet_res));
  ev.add_jet (Lepjets_Event_Jet (  q1, hadw1_label, jet_res));
  ev.add_jet (Lepjets_Event_Jet (  q2, hadw2_label, jet_res));
  ev.add_jet (Lepjets_Event_Jet ( hb1, higgs_label, jet_res));
  ev.add_jet (Lepjets_Event_Jet ( hb2, higgs_label, jet_res));

  ev.met() = nu;
  ev.kt_res() = kt_res;

  // Simulate SVX tagging.
  tagsim (args, ev, engine);

  // Smear the event, if requested.
  if (args.smear())
    ev.smear (engine, args.smear_dir());

  // Done!
  return ev;
}
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 245 of file Lepjets_Event_Jet.cc.

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

Referenced by jetTypeString().

{


    switch (j) {

    case hitfit::isr_label:
        return 'g';
    case hitfit::lepb_label:
        return 'b';
    case hitfit::hadb_label:
        return 'B';
    case hitfit::hadw1_label:
        return 'W';
    case hitfit::hadw2_label:
        return 'W';
    case hitfit::higgs_label:
        return 'h';
    case hitfit::unknown_label:
        return '?';
    default:
        return '?';
    }

    return '?';

}
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 283 of file Lepjets_Event_Jet.cc.

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

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

{


    switch (j) {

    case hitfit::isr_label:
        return std::string("g");
    case hitfit::lepb_label:
        return std::string("b");
    case hitfit::hadb_label:
        return std::string("B");
    case hitfit::hadw1_label:
        return std::string("W");
    case hitfit::hadw2_label:
        return std::string("W");
    case hitfit::higgs_label:
        return std::string("h");
    case hitfit::unknown_label:
        return std::string("?");
    default:
        return std::string("?");
    }

    return std::string("?"); 

}
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.

{


    std::ostringstream ret;

    for (size_t j = 0 ; j != jet_types.size() ; ++j) {
        ret << jetTypeChar((int) (jet_types[j]));
    }

    return ret.str();
}
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().

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.

{
  // Skip leading spaces, `=', '< ... >'.
  string::size_type i = 0;
  while (i < s.size() && s[i] == ' ')
    ++i;
  if (s[i] == '=')
    ++i;
  while (i < s.size() && s[i] == ' ')
    ++i;
  if (i < s.size() && s[i] == '<') {
    i = s.find ('>', i);
    if (i == string::npos)
      return auto_ptr<Constraint_Intermed> ();
    ++i;
  }
  while (i < s.size() && s[i] == ' ')
    ++i;

  // Fail if there's nothing left.
  if (i == s.size())
    return auto_ptr<Constraint_Intermed> ();

  if (s[i] == '(') {
    // List of labels.
    // Make a Constraint_Intermed_Labels instance.
    vector<int> labels;
    ++i;
    while (i < s.size()) {
      while (i < s.size() && s[i] == ' ')
        ++i;
      if (i < s.size() && s[i] == ')')
        break;
      if (i < s.size())
        labels.push_back (atoi (s.c_str() + i));
      while (i < s.size() && s[i] != ' ' && s[i] != ')')
        ++i;
    }
    return auto_ptr<Constraint_Intermed>
      (new Constraint_Intermed_Labels (labels));
  }
  else {
    // Make a Constraint_Intermed_Constant instance.
    return auto_ptr<Constraint_Intermed>
      (new Constraint_Intermed_Constant (atof (s.c_str() + i)));
  }
}
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.

{
  return abs (a._chisq) < abs (b._chisq);
}
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().

{

    if (a.IsOverlap(b)) { return false;}
    return !(a._EtaMax > b._EtaMin);

}
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.

{
  s << *c._lhs.get() << " = " << *c._rhs.get();
  return s;
}
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.

{
  return s << cz._constrainer;
}
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.

{
  return s << ct._constrainer;
}
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.

{

    for (std::map<std::string,std::string>::const_iterator it = def._rep->_map.begin() ;
     it != def._rep->_map.end() ;
     it++) {
         s << "[" << it->first << "] = [" << it->second << "]\n";
    }

  return s;
}
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.

{
  s << "chisq: "  << res._chisq  << "\n";
  s << "umwhad: " << res._umwhad << "\n";
  s << "utmass: " << res._utmass << "\n";
  s << "mt: "     << res._mt     << "\n";
  s << "sigmt: "  << res._sigmt << "\n";
  s << res._ev;
  s << "pullx: " << res._pullx.T();
  s << "pully: " << res._pully.T();
  return s;
}
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.

{
  if (r._inverse) s << "-";
  s << r._constant_sigma << ","
    << r._resolution_sigma << ","
    << r._noise_sigma;
  return s;
}
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().

{
  return l.dump (s);
}
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().

{
  return l.dump (s);
}
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.

{
  for (std::vector<Fit_Result*>::size_type i=0; i < resvec._v.size(); i++)
    s << "Entry " << i << "\n" << *resvec._v[i];
  return s;
}
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.

{
  ci.print (s);
  return s;
}
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.

{
  s << o._i << " " << o._j;
  for (unsigned k = 0; k < o._for_constraint.size(); ++k)
    s << " " << static_cast<int> (o._for_constraint[k]);
  return s;
}
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.

{
  s << r._p_res << "/ " << r._eta_res << "/ " << r._phi_res;
  if (r._use_et)
    s << "/et";
  s << "\n";
  return s;
}
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.

{

    s << "(" << e._EtaMin << " to " << e._EtaMax << ")" << " / " << e.GetResolution ();
    return s ;

}
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.

{
  for (std::vector<Fit_Result_Vec>::size_type i=0; i < res._v.size(); i++)
    s << "List " << i << "\n" << res._v[i];
  return s;
}
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.

{
  s << o.p << " - " << o.mass << " - " << o.label << "\n";
  s << "    errors: " << o.p_error << " " << o.phi_error << " " << o.eta_error;
  if (o.muon_p)
    s << " (mu)";
  s << "\n";
  return s;
}
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().

{
  return f.print (s);
}
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.

{
  return s << fitter._constrainer;
}
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.

{
  for (int i=0; i < p.npairs(); i++)
    s << " " << p.get_pair (i) << "\n";
  return s;
}
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, if(), alignCSCRings::s, and hitfit::Fourvec_Constrainer_Args::use_e().

{
  s << "Constraints: (e_com = " << c._args.e_com() << ") ";
  if (c._args.use_e())
    s << "(E)";
  s << "\n";

  for (std::vector<Constraint>::size_type i=0; i < c._constraints.size(); i++)
    s << "  " << c._constraints[i] << "\n";

  if (c._mass_constraint.size() > 0) {
    s << "Mass constraint:\n";
    s << c._mass_constraint[0] << "\n";
  }
  return s;
}
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.

{
  s << "kt: (" << fe._kt.x() << ", " << fe._kt.y() << "); "
    << " error: " << fe._kt_x_error << " " << fe._kt_y_error << " "
    << fe._kt_xy_covar << "\n";
  s << "x: " << fe._x << "\n";
  for (unsigned i = 0; i < fe._objs.size(); i++)
    s << i+1 << ": " << fe._objs[i];
  return s;
}
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().

{
  return ev.dump (s);
}
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(), and L1MuDTWedgeSorter::runCOL().

{
  while (phi < -M_PI)
    phi += 2 * M_PI;
  while (phi > M_PI)
    phi -= 2*M_PI;
  return phi;
}
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().

{
  double theta1 = v.theta ();
  double eta1 = theta_to_eta (theta1);
  double eta2 = eta1 + eta;
  double theta2 = eta_to_theta (eta2);

  rottheta (v, theta1 - theta2);
}
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().

{
  double s = sin (theta), c = cos (theta);
  double old_pt = v.perp();
  double new_pt =  old_pt*c - v.z()*s;
  v.setZ (old_pt*s + v.z()*c);

  v.setX (v.x() * new_pt / old_pt);
  v.setY (v.y() * new_pt / old_pt);
}
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(), loopername::produce(), prodname::produce(), and Trajectory::recHitsV().

{
  assert (m.num_row() == 1 && m.num_col() == 1);
  return m (1, 1);
}
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().

{
  return - log (tan (theta / 2));
}

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().