3 #include "vdt/vdtMath.h" 4 #include "Math/GenVector/etaMax.h" 9 template <
typename Scalar>
16 if (std::fabs(z_scaled) < big_z_scaled) {
17 return vdt::fast_log(z_scaled +
std::sqrt(z_scaled * z_scaled + 1.0));
20 return z > 0 ? vdt::fast_log(2.0 * z_scaled + 0.5 / z_scaled) : -vdt::fast_log(-2.0 * z_scaled);
27 return z + etaMax<Scalar>();
29 return z - etaMax<Scalar>();
37 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__) 38 std::atomic<int> PFCluster::depthCorMode_{0};
39 std::atomic<double> PFCluster::depthCorA_{0.89};
40 std::atomic<double> PFCluster::depthCorB_{7.3};
41 std::atomic<double> PFCluster::depthCorAp_{0.89};
42 std::atomic<double> PFCluster::depthCorBp_{4.0};
44 int PFCluster::depthCorMode_ = 0;
45 double PFCluster::depthCorA_ = 0.89;
46 double PFCluster::depthCorB_ = 7.3;
47 double PFCluster::depthCorAp_ = 0.89;
48 double PFCluster::depthCorBp_ = 4.0;
55 posrep_(position_.Rho(), position_.Eta(), position_.
Phi()),
90 return isHadron ? corrA : corrA * (corrB +
log(energy));
108 CaloCluster::operator=(other);
124 const std::vector<reco::PFRecHitFraction>& fracs = cluster.
recHitFractions();
127 <<
", layer: " << cluster.
layer() <<
"\tE = " << cluster.
energy() <<
"\tXYZ: " << pos.X() <<
"," << pos.Y() <<
"," 129 <<
"\tREP: " << posrep.Rho() <<
"," << posrep.Eta() <<
"," << posrep.Phi() <<
" | " << fracs.size() <<
" rechits";
131 for (
unsigned i = 0;
i < fracs.size();
i++) {
133 if (!fracs[
i].recHitRef().isAvailable())
136 out << fracs[
i] <<
", ";
PFLayer::Layer layer() const
cluster layer, see PFLayer.h in this directory
void setLayer(PFLayer::Layer layer)
set layer
const math::XYZPoint & position() const
cluster centroid position
math::XYZPoint position_
cluster centroid position
static const char layer_[]
CaloID caloID_
bitmask for detector information
void addHitAndFraction(DetId id, float fraction)
double energy_
cluster energy
static std::atomic< double > depthCorAp_
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
PFLayer::Layer layer_
transient layer
Fraction of a PFRecHit (rechits can be shared between several PFCluster's)
PFCluster & operator=(const PFCluster &)
static std::atomic< double > depthCorB_
std::vector< reco::PFRecHitFraction > rechits_
vector of rechit fractions (transient)
std::ostream & operator<<(std::ostream &, BeamSpot beam)
const CaloID & caloID() const
const REPPoint & positionREP() const
cluster position: rho, eta, phi
layer definition for PFRecHit and PFCluster
void reset()
resets clusters parameters
double energy() const
cluster energy
std::vector< std::pair< DetId, float > > hitsAndFractions_
void resetHitsAndFractions()
reset only hits and fractions
std::string printHitAndFraction(unsigned i) const
print hitAndFraction
static reco::CaloID toCaloID(Layer layer)
static double getDepthCorrection(double energy, bool isBelowPS=false, bool isHadron=false)
REPPoint posrep_
cluster position: rho, eta, phi (transient)
XYZPointD XYZPoint
point in space with cartesian internal representation
const std::vector< reco::PFRecHitFraction > & recHitFractions() const
vector of rechit fractions
void addRecHitFraction(const reco::PFRecHitFraction &frac)
add a given fraction of the rechit
static std::atomic< double > depthCorBp_
int color_
color (transient)
float time_
Michalis :Add timing and depth information.
static std::atomic< double > depthCorA_
static Layer fromCaloID(const reco::CaloID &id)
ROOT::Math::PositionVector3D< ROOT::Math::CylindricalEta3D< double > > REPPoint
const PFRecHitRef & recHitRef() const
void reset()
resets the CaloCluster (position, energy, hitsAndFractions)
Power< A, B >::type pow(const A &a, const B &b)