CMS 3D CMS Logo

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

Classes

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

Typedefs

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

Enumerations

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

Functions

void adjust_e_for_mass (Fourvec &v, double mass)
 Adjust the energy component of four-vector v (leaving the three-vector part unchanged) so that the four-vector has mass as specified in the argument. More...
 
void adjust_p_for_mass (Fourvec &v, double mass)
 Adjust the three-vector part of v, leaving the energy unchanged,. More...
 
void clear (CLHEP::HepGenMatrix &m)
 Helper function: Reset all elements of a matrix to 0. More...
 
double delta_r (const Fourvec &a, const Fourvec &b)
 Find the distance between two four-vectors in the two-dimensional space $\eta-\phi$. More...
 
double deteta (const Fourvec &v, double zvert)
 NOT USED ANYMORE: Get the detector $\eta$ (D0-specific), requires z-vertex. More...
 
double eta_to_theta (double eta)
 Convert pseudorapidity to polar angle. More...
 
Lepjets_Event gentop (const Gentop_Args &args, CLHEP::HepRandomEngine &engine)
 Generate a $t\bar{t} \to \ell + 4~\mathrm{jets}$ event. More...
 
Lepjets_Event gentth (const Gentop_Args &args, CLHEP::HepRandomEngine &engine)
 Generate a $t\bar{t}H \to \ell + b\bar{b} + 4~\mathrm{jets}$ event. More...
 
char jetTypeChar (int type)
 Helper function: Translate jet type code from integer to char. The following notation is used for each type of jet: More...
 
std::string jetTypeString (int type)
 Helper function: Translate jet type code from integer to char. The following notation is used for each type of jet: More...
 
template<class T >
std::string jetTypeString (std::vector< T > jet_types)
 Helper function: Translate jet type code from a list of numbers to a string. More...
 
unique_ptr< Constraint_Intermedmake_constraint_intermed (string s)
 
std::unique_ptr< Constraint_Intermedmake_constraint_intermed (std::string s)
 
bool operator< (const EtaDepResElement &a, const EtaDepResElement &b)
 Comparison operator, compare two EtaDepResElement instances based on their respective valid $\eta$ ranges. More...
 
bool operator< (const Fit_Result &a, const Fit_Result &b)
 Sort fit results based on their $\chi^{2}$. More...
 
std::ostream & operator<< (std::ostream &s, const Objpair &o)
 Output stream operator, print the content of this Objpair to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const Fit_Results &res)
 Output stream operator, print the content of this Fit_Results to an output stream. More...
 
std::ostream & operator<< (std::ostream &s, const 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 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 EtaDepResElement &e)
 
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...
 
double theta_to_eta (double theta)
 Convert polar angle to pseudorapidity. More...
 

Variables

const int nu_label = -1
 

Typedef Documentation

typedef CLHEP::HepVector hitfit::Column_Vector

Definition at line 66 of file matutil.h.

typedef CLHEP::HepDiagMatrix hitfit::Diagonal_Matrix

Definition at line 67 of file matutil.h.

typedef CLHEP::HepLorentzVector hitfit::Fourvec

Typedef for a HepLorentzVector.

Definition at line 57 of file fourvec.h.

typedef CLHEP::HepMatrix hitfit::Matrix

Definition at line 65 of file matutil.h.

typedef CLHEP::Hep3Vector hitfit::Threevec

Typedef for a Hep3Vector.

Definition at line 62 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 58 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 150 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 54 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 58 of file Top_Fit.h.

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

Offset indices for the component of four-momentum variables.

Enumerator
p_offs 
phi_offs 
eta_offs 

Definition at line 140 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 163 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 123 of file fourvec.cc.

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

Referenced by hitfit::Top_Fit::fit_one_perm(), and operator<<().

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

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

Referenced by operator<<().

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

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

Parameters
mThe matrix to reset.

Definition at line 167 of file matutil.cc.

References mps_fire::i, funct::m, and create_public_lumi_plots::ncol.

Referenced by DTTFFEDReader::analyse(), IsoTrig::analyze(), DTDeadFlag::cellStatus(), DTStatusFlag::cellStatus(), DTT0::cellT0(), dqmstorepb::ROOTFilePB_Histo::Clear(), IsoTrig::clearChgIsolnTreeVectors(), npstat::BoxND< Numeric >::copyFrom(), CSCALCTDigi::CSCALCTDigi(), doBZ2Compression(), gen::PomwigHadronizer::doSharedResources(), Herwig6Hadronizer::doSharedResources(), DQMNet::dqmhash(), DTTracoTrig::DTTracoTrig(), EcalRegressionData::EcalRegressionData(), edm::BeamHaloProducer::endLuminosityBlock(), L1GtExternalCondition::evaluateCondition(), L1GtHfBitCountsCondition::evaluateCondition(), L1GtHfRingEtSumsCondition::evaluateCondition(), L1GtBptxCondition::evaluateCondition(), L1GtCastorCondition::evaluateCondition(), L1GtEnergySumCondition::evaluateCondition(), L1GtJetCountsCondition::evaluateCondition(), L1GtCorrelationCondition::evaluateCondition(), L1GtMuonCondition::evaluateCondition(), l1t::EnergySumCondition::evaluateCondition(), l1t::ExternalCondition::evaluateCondition(), l1t::CorrCondition::evaluateCondition(), l1t::CorrWithOverlapRemovalCondition::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(), EcalRegressionData::fill(), HGCalTriggerNtupleGen::fill(), reco::FlavorHistoryEvent::FlavorHistoryEvent(), MultiHitGenerator::hitSets(), HitTripletGenerator::hitTriplets(), pat::PATTriggerProducer::ModuleLabelToPathAndFlags::init(), cond::Iov_t::Iov_t(), Vispa.Views.LineDecayView.LineDecayContainer::keyPressEvent(), 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(), MultiHitGeneratorFromPairAndLayers::pairGenerator(), FFTJetProducer::produce(), EcalFEtoDigi::readInput(), DTTracoLUTs::reset(), AlignmentParameterSelector::selectedParameters(), CaloRecHit::setFlagField(), edm::EventSetup::setKnownRecordsSupplier(), DTMtime::slMtime(), DTPerformance::slPerformance(), DTRangeT0::slRangeT0(), FBaseSimEvent::theTable(), RPCCosmicSeedrecHitFinder::unsetInput(), HcalTB02Analysis::update(), edm::ThinnedAssociationsHelper::updateFromParentProcess(), Vispa.Main.Application.Application::updateStartupScreen(), MultiVertexFitter::vertices(), CastorHitCorrection::~CastorHitCorrection(), DTTracoLUTs::~DTTracoLUTs(), HitPairGenerator::~HitPairGenerator(), LinTrackCache::~LinTrackCache(), and PhysicsTools::MVATrainerLooper::TrainerContainer::~TrainerContainer().

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

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

Referenced by TrackingMaterialPlotter::fill_gradient(), and ListGroups::fillGradient().

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

References theta_to_eta().

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

Convert pseudorapidity to polar angle.

Parameters
etaThe value of pseudorapidity to convert.

Definition at line 184 of file fourvec.cc.

References JetChargeProducer_cfi::exp.

Referenced by roteta().

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

References hitfit::Lepjets_Event::add_jet(), hitfit::Lepjets_Event::add_lep(), SelectingProcedure_cff::decay, hitfit::Gentop_Args::ele_res_str(), electron_label, ev, 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(), AlCaHLTBitMon_ParallelJobs::p, 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().

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

References hitfit::Lepjets_Event::add_jet(), hitfit::Lepjets_Event::add_lep(), SelectingProcedure_cff::decay, hitfit::Gentop_Args::ele_res_str(), electron_label, ev, 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().

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

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

Referenced by jetTypeString().

254 {
255 
256 
257  switch (j) {
258 
259  case hitfit::isr_label:
260  return 'g';
261  case hitfit::lepb_label:
262  return 'b';
263  case hitfit::hadb_label:
264  return 'B';
265  case hitfit::hadw1_label:
266  return 'W';
267  case hitfit::hadw2_label:
268  return 'W';
269  case hitfit::higgs_label:
270  return 'h';
272  return '?';
273  default:
274  return '?';
275  }
276 
277  return '?';
278 
279 }
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 282 of file Lepjets_Event_Jet.cc.

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

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

292 {
293 
294 
295  switch (j) {
296 
297  case hitfit::isr_label:
298  return std::string("g");
299  case hitfit::lepb_label:
300  return std::string("b");
301  case hitfit::hadb_label:
302  return std::string("B");
303  case hitfit::hadw1_label:
304  return std::string("W");
305  case hitfit::hadw2_label:
306  return std::string("W");
307  case hitfit::higgs_label:
308  return std::string("h");
310  return std::string("?");
311  default:
312  return std::string("?");
313  }
314 
315  return std::string("?");
316 
317 }
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 257 of file Lepjets_Event_Jet.h.

References jetTypeChar().

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

Definition at line 320 of file Constraint_Intermed.cc.

References hitfit::Constraint_Intermed_Constant::Constraint_Intermed_Constant(), mps_fire::i, and tablePrinter::labels.

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

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

The string should be either a numeric constant like

80.4

or a list of integers in parenthesis like

(1 2 4)

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

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

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

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

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

103 {
104 
105  if (a.IsOverlap(b)) { return false;}
106  return !(a._EtaMax > b._EtaMin);
107 
108 }
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 195 of file Fit_Result.cc.

References hitfit::Fit_Result::_chisq, and funct::abs().

208 {
209  return abs (a._chisq) < abs (b._chisq);
210 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
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 85 of file Objpair.cc.

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

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

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

125 {
126  for (std::vector<Fit_Result_Vec>::size_type i=0; i < res._v.size(); i++)
127  s << "List " << i << "\n" << res._v[i];
128  return s;
129 }
uint16_t size_type
Definition: Electron.h:6
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 123 of file Pair_Table.cc.

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

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

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

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

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

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

192 {
193  for (std::vector<std::shared_ptr<Fit_Result>>::size_type i=0; i < resvec._v.size(); i++)
194  s << "Entry " << i << "\n" << *resvec._v[i];
195  return s;
196 }
uint16_t size_type
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 185 of file EtaDepResElement.cc.

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

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

References hitfit::Lepjets_Event_Lep::dump().

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

References hitfit::Lepjets_Event_Jet::dump().

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

References hitfit::Base_Constrainer::print().

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

232 {
233  s << "chisq: " << res._chisq << "\n";
234  s << "umwhad: " << res._umwhad << "\n";
235  s << "utmass: " << res._utmass << "\n";
236  s << "mt: " << res._mt << "\n";
237  s << "sigmt: " << res._sigmt << "\n";
238  s << res._ev;
239  s << "pullx: " << res._pullx.T();
240  s << "pully: " << res._pully.T();
241  return s;
242 }
Definition: Electron.h:6
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 245 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 mps_fire::i.

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

References hitfit::Fourvec_Constrainer::_args, hitfit::Fourvec_Constrainer::_constraints, hitfit::Fourvec_Constrainer::_mass_constraint, adjust_e_for_mass(), adjust_p_for_mass(), runEdmFileComparison::base, EnergyCorrector::c, createBeamHaloJobs::constraints, funct::cos(), dot(), MillePedeFileConverter_cfg::e, hitfit::Fourvec_Constrainer_Args::e_com(), PVValHelper::eta, hitfit::FE_Obj::eta_error, eta_offs, ev, JetChargeProducer_cfi::exp, F(), hitfit::Objpair::for_constraint(), hitfit::Pair_Table::get_pair(), hitfit::Fourvec_Event::has_neutrino(), hitfit::Objpair::i(), mps_fire::i, hitfit::Objpair::j(), gen::k, hitfit::Fourvec_Event::kt(), hitfit::Fourvec_Event::kt_x_error(), hitfit::Fourvec_Event::kt_xy_covar(), hitfit::Fourvec_Event::kt_y_error(), hitfit::FE_Obj::mass, hitfit::FE_Obj::muon_p, hitfit::Fourvec_Event::nobjs(), hitfit::Pair_Table::npairs(), hitfit::Fourvec_Event::nu(), nu_z, GetRecoTauVFromDQM_MC_cff::obj, hitfit::Fourvec_Event::obj(), hitfit::FE_Obj::p, AlCaHLTBitMon_ParallelJobs::p, p1, p2, hitfit::FE_Obj::p_error, p_offs, hitfit::FE_Obj::phi_error, phi_offs, EnergyCorrector::pt, hiDetachedQuadStep_cff::pt1, hiDetachedQuadStep_cff::pt2, alignCSCRings::s, hitfit::Fourvec_Event::set_nu_p(), hitfit::Fourvec_Event::set_obj_p(), hitfit::Fourvec_Event::set_x_p(), Validation_hcalonly_cfi::sign, funct::sin(), mathSSE::sqrt(), tmp, hitfit::Fourvec_Constrainer_Args::use_e(), findQualityFiles::v, x_offs, geometryCSVtoXML::xx, DOFs::Y, and y_offs.

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

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

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

References hitfit::Constrained_Z::_constrainer.

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

References hitfit::Constrained_Top::_constrainer.

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

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

Referenced by hitfit::Base_Constrainer::~Base_Constrainer().

314 {
315  ci.print (s);
316  return s;
317 }
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 386 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.

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

References hitfit::Lepjets_Event::dump().

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

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

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

References hitfit::Top_Fit::_constrainer.

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

References M_PI.

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

240 {
241  while (phi < -M_PI)
242  phi += 2 * M_PI;
243  while (phi > M_PI)
244  phi -= 2*M_PI;
245  return phi;
246 }
#define M_PI
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 162 of file fourvec.cc.

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

Referenced by hitfit::Vector_Resolution::phi_sigma().

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

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

Referenced by roteta().

151 {
152  double s = sin (theta), c = cos (theta);
153  double old_pt = v.perp();
154  double new_pt = old_pt*c - v.z()*s;
155  v.setZ (old_pt*s + v.z()*c);
156 
157  v.setX (v.x() * new_pt / old_pt);
158  v.setY (v.y() * new_pt / old_pt);
159 }
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 183 of file matutil.cc.

References funct::m.

Referenced by PhotonValidator::analyze(), PhotonAnalyzer::analyze(), hitfit::Fourvec_Constraint_Calculator::eval(), hitfit::Chisq_Constrainer::fit(), conddblib::listObject(), and Traj2TrackHits::split().

195 {
196  assert (m.num_row() == 1 && m.num_col() == 1);
197  return m (1, 1);
198 }
double hitfit::theta_to_eta ( double  theta)

Convert polar angle to pseudorapidity.

Parameters
thetaThe polar angle to convert.

Definition at line 199 of file fourvec.cc.

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

Referenced by deteta(), and roteta().

209 {
210  return - log (tan (theta / 2));
211 }
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 185 of file Fourvec_Event.h.

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