CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Enumerations | Functions | Variables
pftools Namespace Reference

General option file parser. More...

Classes

class  CalibCompare
 
class  Calibratable
 Wraps essential single particle calibration data ready for export to a Root file. More...
 
class  CalibratableElement
 Small wrapper class for storing individual rechit and cluster information. More...
 
class  CalibrationResultWrapper
 A small class designed to hold the result of a calibration of a SingleParticleWrapper. More...
 
class  Calibrator
 Abstract base class for Particle Flow calibration algorithms. More...
 
class  CaloBox
 
class  CaloEllipse
 
class  CaloRing
 
class  CaloWindow
 
class  CandidateWrapper
 Small wrapper class to store information associated with PFCandidates. More...
 
class  Deposition
 This class holds an arbitrary energy deposition, specified in terms of angular position, energy, depth (optional) and detector element type. More...
 
class  DetectorElement
 Represents an energy-measuring region of our detector. More...
 
class  Erl_mlp
 
class  Exercises3
 
class  IO
 
class  LinearCalibrator
 
class  ParticleDeposit
 
class  ParticleFiltrationDecision
 Articulates the decision of the ParticleFilter in RecoParticleFlow/PFAnalyses. More...
 
class  PFClusterCalibration
 
class  PFToolsException
 General purpose exception class for use by classes in the pftools namespace. More...
 
class  SpaceManager
 A tool to associate SpaceVoxels with Calibrator objects. More...
 
class  SpaceVoxel
 A multi-dimensional volume element to subdivide the detector into different calibration regions. More...
 
class  TestCaloWindow
 
class  TreeUtility
 Utility class to create particles and detector elements from a Root file. More...
 
class  Utils
 

Typedefs

typedef boost::shared_ptr
< Calibratable
CalibratablePtr
 
typedef boost::shared_ptr
< Calibrator
CalibratorPtr
 
typedef boost::shared_ptr
< Deposition
DepositionPtr
 
typedef boost::shared_ptr
< DetectorElement
DetectorElementPtr
 
typedef boost::shared_ptr
< ParticleDeposit
ParticleDepositPtr
 
typedef
ParticleFiltrationDecisionRefVector::iterator 
particleFiltrationDecision_iterator
 
typedef edm::RefToBase
< pftools::ParticleFiltrationDecision
ParticleFiltrationDecisionBaseRef
 
typedef std::vector
< pftools::ParticleFiltrationDecision
ParticleFiltrationDecisionCollection
 
typedef edm::Ref
< ParticleFiltrationDecisionCollection
ParticleFiltrationDecisionRef
 
typedef edm::RefProd
< ParticleFiltrationDecisionCollection
ParticleFiltrationDecisionRefProd
 
typedef edm::RefVector
< ParticleFiltrationDecisionCollection
ParticleFiltrationDecisionRefVector
 
typedef std::pair< double, double > Point
 
typedef PointVector::const_iterator PointCit
 
typedef PointVector::iterator PointIt
 
typedef std::vector< PointPointVector
 
typedef boost::shared_ptr
< SpaceManager
SpaceManagerPtr
 
typedef boost::shared_ptr
< SpaceVoxel
SpaceVoxelPtr
 

Enumerations

enum  CalibrationProvenance {
  UNCALIBRATED = 0, LINEAR = 1, BAYESIAN = 2, LINEARECAL = 3,
  LINEARHCAL =4, LINEARCORR = -1, NONE = 99
}
 
enum  CalibrationTarget {
  UNDEFINED = 0, CLUSTER = 1, RECHIT = 2, PFCANDIDATE = 3,
  PFELEMENT = 4, CORR_CLUSTER = -1, PRE_RECHIT = 6, PRE_PFCANDIDATE = 7
}
 
enum  DetectorElementType {
  ECAL = 0, HCAL = 1, PRESHOWER = 2, OFFSET = 3,
  ECAL2 = 4, HCAL2 = 5
}
 
enum  Region { NOREGION = 0, BARREL_POS = 1, TRANSITION_POS = 2, ENDCAP_POS = 3 }
 

Functions

std::ostream & operator<< (std::ostream &s, const PFClusterCalibration &cc)
 
std::ostream & operator<< (std::ostream &stream, const CaloBox &cb)
 
std::ostream & operator<< (std::ostream &s, const CaloEllipse &em)
 
std::ostream & operator<< (std::ostream &s, const DetectorElement &de)
 
std::ostream & operator<< (std::ostream &s, const pftools::SpaceVoxel &sv)
 
std::ostream & operator<< (std::ostream &s, const Calibratable &calib_)
 
std::ostream & operator<< (std::ostream &s, const CalibratableElement &ce_)
 

Variables

const char *const DetElNames [] = { "ECAL", "HCAL", "PRESHOWER", "OFFSET", "ECAL2", "HCAL2" }
 
const char *const RegionNames [] = { "NOREGION", "BARREL_POS", "TRANSITION_POS", "ENDCAP_POS" }
 

Detailed Description

General option file parser.

Utility functions.

* IO io("myfile.opt");
* fECALthresh = 0.05;
* io.GetOpt("ECAL", "threshold", fECALthresh);
*
Author
Colin Bernet
Date
January 2002
Author
Colin Bernet
Date
January 2006

Typedef Documentation

typedef boost::shared_ptr<Calibratable> pftools::CalibratablePtr

Definition at line 26 of file TreeUtility.h.

typedef boost::shared_ptr<Calibrator> pftools::CalibratorPtr

Definition at line 65 of file Calibrator.h.

typedef boost::shared_ptr<Deposition> pftools::DepositionPtr

Definition at line 77 of file Deposition.h.

typedef boost::shared_ptr<DetectorElement> pftools::DetectorElementPtr

Definition at line 83 of file DetectorElement.h.

typedef boost::shared_ptr<ParticleDeposit> pftools::ParticleDepositPtr

Definition at line 103 of file ParticleDeposit.h.

Definition at line 55 of file ParticleFiltrationDecision.h.

Definition at line 57 of file ParticleFiltrationDecision.h.

Definition at line 46 of file ParticleFiltrationDecision.h.

Definition at line 49 of file ParticleFiltrationDecision.h.

Definition at line 51 of file ParticleFiltrationDecision.h.

Definition at line 53 of file ParticleFiltrationDecision.h.

typedef std::pair<double, double> pftools::Point

Definition at line 18 of file CaloEllipse.h.

typedef PointVector::const_iterator pftools::PointCit

Definition at line 20 of file CaloEllipse.h.

typedef PointVector::iterator pftools::PointIt

Definition at line 21 of file CaloEllipse.h.

typedef std::vector<Point> pftools::PointVector

Definition at line 19 of file CaloEllipse.h.

typedef boost::shared_ptr<SpaceManager> pftools::SpaceManagerPtr

Definition at line 126 of file SpaceManager.h.

typedef boost::shared_ptr<SpaceVoxel> pftools::SpaceVoxelPtr

Definition at line 89 of file SpaceVoxel.h.

Enumeration Type Documentation

Enumerator
UNCALIBRATED 
LINEAR 
BAYESIAN 
LINEARECAL 
LINEARHCAL 
LINEARCORR 
NONE 

Definition at line 12 of file CalibrationProvenance.h.

Enumerator
UNDEFINED 
CLUSTER 
RECHIT 
PFCANDIDATE 
PFELEMENT 
CORR_CLUSTER 
PRE_RECHIT 
PRE_PFCANDIDATE 

Definition at line 16 of file CalibrationProvenance.h.

Enumerator
ECAL 
HCAL 
PRESHOWER 
OFFSET 
ECAL2 
HCAL2 

Definition at line 19 of file DetectorElementType.h.

Enumerator
NOREGION 
BARREL_POS 
TRANSITION_POS 
ENDCAP_POS 

Definition at line 7 of file Region.h.

Function Documentation

std::ostream & pftools::operator<< ( std::ostream &  s,
const PFClusterCalibration cc 
)

Definition at line 314 of file PFClusterCalibration.cc.

References pftools::PFClusterCalibration::allowNegativeEnergy_, pftools::PFClusterCalibration::barrelEndcapEtaDiv_, pftools::PFClusterCalibration::correctionLowLimit_, pftools::PFClusterCalibration::doCorrection_, pftools::PFClusterCalibration::doEtaCorrection_, pftools::PFClusterCalibration::ecalOnlyDiv_, pftools::PFClusterCalibration::globalP0_, pftools::PFClusterCalibration::globalP1_, pftools::PFClusterCalibration::hcalOnlyDiv_, pftools::PFClusterCalibration::lowEP0_, pftools::PFClusterCalibration::lowEP1_, and alignCSCRings::s.

314  {
315  s << "PFClusterCalibration: dump...\n";
316  s << "barrelEndcapEtaDiv:\t" << cc.barrelEndcapEtaDiv_ << ", ecalOnlyDiv:\t" << cc.ecalOnlyDiv_;
317  s << ", \nhcalOnlyDiv:\t" << cc.hcalOnlyDiv_ << ", doCorrection:\t" << cc.doCorrection_;
318  s << ", \nallowNegativeEnergy:\t" << cc.allowNegativeEnergy_;
319  s << ", \ncorrectionLowLimit:\t" << cc.correctionLowLimit_ << ",parameters:\t" << cc.globalP0_ << ", ";
320  s << cc.globalP1_ << ", " << cc.lowEP0_ << ", " << cc.lowEP1_;
321  s << "\ndoEtaCorrection:\t" << cc.doEtaCorrection_;
322  return s;
323 }
std::ostream & pftools::operator<< ( std::ostream &  stream,
const CaloBox cb 
)

Definition at line 139 of file CaloBox.cc.

References pftools::CaloBox::centerEta_, pftools::CaloBox::centerPhi_, and pftools::CaloBox::dump().

139  {
140  stream << "CaloBox at " << cb.centerEta_ << ", " << cb.centerPhi_ << ":\n";
141  cb.dump(stream, 1.0, "\n");
142  return stream;
143 }
double centerEta_
Definition: CaloBox.h:27
double centerPhi_
Definition: CaloBox.h:28
std::ostream & dump(std::ostream &stream, double norm=1.0, std::string rowDelim="\n") const
Definition: CaloBox.cc:82
std::ostream & pftools::operator<< ( std::ostream &  s,
const CaloEllipse em 
)

Definition at line 135 of file CaloEllipse.cc.

References pftools::CaloEllipse::getEccentricity(), pftools::CaloEllipse::getMajorMinorAxes(), pftools::CaloEllipse::getPosition(), pftools::CaloEllipse::getTheta(), alignCSCRings::s, and toolbox::toString().

135  {
136  s << "CaloEllipse at position = " << toString(em.getPosition()) << ", theta = "
137  << em.getTheta() << ", major/minor axes = " << toString(
138  em.getMajorMinorAxes()) << ", eccentricity = " << em.getEccentricity() << "\n";
139 
140  return s;
141 }
double getEccentricity() const
Definition: CaloEllipse.cc:87
Point getMajorMinorAxes(double sigma=1.0) const
Definition: CaloEllipse.cc:48
std::string toString(const char *format,...)
Definition: xdaq_compat.cc:4
double getTheta() const
Definition: CaloEllipse.cc:23
Point getPosition() const
Definition: CaloEllipse.cc:97
std::ostream & pftools::operator<< ( std::ostream &  s,
const DetectorElement de 
)

Definition at line 38 of file DetectorElement.cc.

References DetElNames, pftools::DetectorElement::getCalib(), pftools::DetectorElement::getType(), and alignCSCRings::s.

38  {
39  s << "DetectorElement: " << pftools::DetElNames[de.getType()] << ", \tcalib: " << de.getCalib();
40 
41  return s;
42 }
DetectorElementType getType() const
const char *const DetElNames[]
double getCalib() const
std::ostream & pftools::operator<< ( std::ostream &  s,
const pftools::SpaceVoxel sv 
)

Definition at line 113 of file SpaceVoxel.cc.

References pftools::SpaceVoxel::print(), and alignCSCRings::s.

113  {
114  sv.print(s);
115  return s;
116 }
void print(std::ostream &s) const
Definition: SpaceVoxel.cc:65
std::ostream & pftools::operator<< ( std::ostream &  s,
const Calibratable calib_ 
)

Definition at line 6 of file Calibratable.cc.

References EnergyCorrector::c, pftools::Calibratable::cand_energyEcal_, pftools::Calibratable::cand_energyEvent_, pftools::Calibratable::cand_energyHcal_, pftools::Calibratable::cand_energyNeutralEM_, pftools::Calibratable::cand_energyNeutralHad_, pftools::Calibratable::cand_eta_, pftools::Calibratable::cand_phi_, pftools::Calibratable::cands_, pftools::Calibratable::cands_num_, pftools::Calibratable::cluster_energyEcal_, pftools::Calibratable::cluster_energyEvent_, pftools::Calibratable::cluster_energyHcal_, pftools::CandidateWrapper::energy_, pftools::CandidateWrapper::energyEcal_, pftools::CandidateWrapper::energyHcal_, pftools::CandidateWrapper::eta_, pftools::CandidateWrapper::phi_, pftools::Calibratable::rechits_energyEcal_, pftools::Calibratable::rechits_energyEvent_, pftools::Calibratable::rechits_energyHcal_, alignCSCRings::s, pftools::Calibratable::sim_energyEvent_, pftools::Calibratable::sim_etaEcal_, pftools::Calibratable::sim_phiEcal_, pftools::Calibratable::tb_energyEcal_, pftools::Calibratable::tb_energyEvent_, pftools::Calibratable::tb_energyHcal_, pftools::Calibratable::tb_eta_, pftools::Calibratable::tb_phi_, and pftools::CandidateWrapper::type_.

6  {
7  s << "Calibratable summary:\n\tsim:\t\t(" << calib_.sim_energyEvent_
8  << "),\t[" << calib_.sim_etaEcal_ << ", " << calib_.sim_phiEcal_
9  << "]\n";
10  s << "\ttestbeam:\t(" << calib_.tb_energyEvent_ << ", "
11  << calib_.tb_energyEcal_ << ", " << calib_.tb_energyHcal_ << "), ["
12  << calib_.tb_eta_ << ", " << calib_.tb_phi_ << "]\n";
13  s << "\trechits:\t(" << calib_.rechits_energyEvent_ << ", "
14  << calib_.rechits_energyEcal_ << ", " << calib_.rechits_energyHcal_
15  << ")\n";
16  s << "\tcluster:\t(" << calib_.cluster_energyEvent_ << ", "
17  << calib_.cluster_energyEcal_ << ", " << calib_.cluster_energyHcal_
18  << ")\n";
19  s << "\tcands:\t\t(" << calib_.cand_energyEvent_ << ", "
20  << calib_.cand_energyEcal_ << ", " << calib_.cand_energyHcal_
21  << "), ";
22  s << "\t[" << calib_.cand_eta_ << ", " << calib_.cand_phi_ << "], "
23  << calib_.cands_num_ << " of them\n";
24  for (std::vector<CandidateWrapper>::const_iterator c =
25  calib_.cands_.begin(); c != calib_.cands_.end(); ++c) {
26  const CandidateWrapper& cw = *c;
27  s << "\t\t\t\tType: " << cw.type_ << ", (" << cw.energy_ << ", "
28  << cw.energyEcal_ << ", " << cw.energyHcal_ << ") at [ "
29  << cw.eta_ << ", " << cw.phi_ << "]\n";
30  }
31  s << "\t\tNeutral EM energy: " << calib_.cand_energyNeutralEM_ << "\n";
32  s << "\t\tNeutral Had energy: " << calib_.cand_energyNeutralHad_ << "\n";
33 
34  return s;
35 }
std::vector< CandidateWrapper > cands_
Definition: Calibratable.h:196
Small wrapper class to store information associated with PFCandidates.
Definition: Calibratable.h:66
std::ostream & pftools::operator<< ( std::ostream &  s,
const CalibratableElement ce_ 
)

Definition at line 37 of file Calibratable.cc.

References pftools::CalibratableElement::energy_, pftools::CalibratableElement::eta_, pftools::CalibratableElement::phi_, and alignCSCRings::s.

38  {
39  s << "CalibratableElement: (energy, eta, phi) = (" << ce.energy_ << ", "
40  << ce.eta_ << ", " << ce.phi_ << ")";
41 
42  return s;
43 }

Variable Documentation

const char* const pftools::DetElNames[] = { "ECAL", "HCAL", "PRESHOWER", "OFFSET", "ECAL2", "HCAL2" }
const char* const pftools::RegionNames[] = { "NOREGION", "BARREL_POS", "TRANSITION_POS", "ENDCAP_POS" }