3 #include "vdt/vdtMath.h" 4 #include "Math/GenVector/etaMax.h" 9 template<
typename Scalar>
13 const Scalar big_z_scaled =
17 if (std::fabs(z_scaled) < big_z_scaled) {
18 return vdt::fast_log(z_scaled+
std::sqrt(z_scaled*z_scaled+1.0));
21 return z>0 ? vdt::fast_log(2.0*z_scaled + 0.5/z_scaled) : -vdt::fast_log(-2.0*z_scaled);
29 return z + etaMax<Scalar>();
32 return z - etaMax<Scalar>();
40 #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__) 41 std::atomic<int> PFCluster::depthCorMode_{0};
42 std::atomic<double> PFCluster::depthCorA_{0.89};
43 std::atomic<double> PFCluster::depthCorB_{7.3};
44 std::atomic<double> PFCluster::depthCorAp_{0.89};
45 std::atomic<double> PFCluster::depthCorBp_{4.0};
47 int PFCluster::depthCorMode_ = 0;
48 double PFCluster::depthCorA_ = 0.89;
49 double PFCluster::depthCorB_ = 7.3;
50 double PFCluster::depthCorAp_ = 0.89;
51 double PFCluster::depthCorBp_ = 4.0;
58 double x,
double y,
double z ) :
63 posrep_( position_.Rho(), position_.
Eta(), position_.
Phi() ),
109 return isHadron ? corrA : corrA*(corrB +
log(energy));
130 CaloCluster::operator=(other);
148 const std::vector< reco::PFRecHitFraction >& fracs =
152 <<
", layer: "<<cluster.
layer()
153 <<
"\tE = "<<cluster.
energy()
155 <<pos.X()<<
","<<pos.Y()<<
","<<pos.Z()<<
" | " 157 <<posrep.Rho()<<
","<<posrep.Eta()<<
","<<posrep.Phi()<<
" | " 158 <<fracs.size()<<
" rechits";
160 for(
unsigned i=0;
i<fracs.size();
i++) {
162 if( !fracs[
i].recHitRef().isAvailable() )
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.
std::vector< reco::PFRecHitFraction > rechits_
vector of rechit fractions (transient)
PFLayer::Layer layer_
transient layer
Fraction of a PFRecHit (rechits can be shared between several PFCluster's)
PFCluster & operator=(const PFCluster &)
std::vector< std::pair< DetId, float > > hitsAndFractions_
static std::atomic< double > depthCorB_
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
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
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 std::vector< reco::PFRecHitFraction > & recHitFractions() const
vector of rechit fractions
const PFRecHitRef & recHitRef() const
void reset()
resets the CaloCluster (position, energy, hitsAndFractions)
Power< A, B >::type pow(const A &a, const B &b)