CMS 3D CMS Logo

Public Types | Public Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes

CaloHitMaker Class Reference

#include <CaloHitMaker.h>

Inheritance diagram for CaloHitMaker:
EcalHitMaker HcalHitMaker PreshowerHitMaker

List of all members.

Public Types

typedef ROOT::Math::Plane3D Plane3D
typedef math::XYZVector XYZPoint
typedef math::XYZVector XYZVector

Public Member Functions

virtual bool addHit (double r, double phi, unsigned layer=0)=0
 CaloHitMaker (const CaloGeometryHelper *calo, DetId::Detector det, int subdetn, int cal, unsigned sht=0)
const CaloGeometryHelpergetCalorimeter () const
virtual const std::map
< uint32_t, float > & 
getHits ()=0
virtual void setSpotEnergy (double e)=0
virtual ~CaloHitMaker ()

Static Protected Member Functions

static XYZPoint intersect (const Plane3D &p, const XYZPoint &a, const XYZPoint &b, double &t, bool segment, bool debug=false)

Protected Attributes

bool EMSHOWER
bool HADSHOWER
std::map< uint32_t, float > hitMap_
double interactionLength
bool MIP
double moliereRadius
const CaloGeometryHelpermyCalorimeter
unsigned showerType_
double spotEnergy
const CalorimeterPropertiestheCaloProperties

Private Attributes

DetId::Detector base_
int onCal_
int subdetn_

Detailed Description

Definition at line 20 of file CaloHitMaker.h.


Member Typedef Documentation

Reimplemented in EcalHitMaker.

Definition at line 26 of file CaloHitMaker.h.

Reimplemented in EcalHitMaker, HcalHitMaker, and PreshowerHitMaker.

Definition at line 25 of file CaloHitMaker.h.

Reimplemented in EcalHitMaker, HcalHitMaker, and PreshowerHitMaker.

Definition at line 24 of file CaloHitMaker.h.


Constructor & Destructor Documentation

CaloHitMaker::CaloHitMaker ( const CaloGeometryHelper calo,
DetId::Detector  det,
int  subdetn,
int  cal,
unsigned  sht = 0 
)
virtual CaloHitMaker::~CaloHitMaker ( ) [inline, virtual]

Definition at line 29 of file CaloHitMaker.h.

{;}

Member Function Documentation

virtual bool CaloHitMaker::addHit ( double  r,
double  phi,
unsigned  layer = 0 
) [pure virtual]
const CaloGeometryHelper* CaloHitMaker::getCalorimeter ( ) const [inline]

Definition at line 35 of file CaloHitMaker.h.

References myCalorimeter.

    {
      //      std::cout << "CaloHitMaker is returning myCalorimeter " << myCalorimeter << std::endl;
      return myCalorimeter;
    }
virtual const std::map<uint32_t,float>& CaloHitMaker::getHits ( ) [pure virtual]
CaloHitMaker::XYZPoint CaloHitMaker::intersect ( const Plane3D p,
const XYZPoint a,
const XYZPoint b,
double &  t,
bool  segment,
bool  debug = false 
) [static, protected]

computes the intersection between a straight line defined by a & b and a plan

Definition at line 38 of file CaloHitMaker.cc.

References gather_cfg::cout.

Referenced by EcalHitMaker::ecalCellLine(), EcalHitMaker::getPads(), and PreshowerHitMaker::PreshowerHitMaker().

{
  t=-9999.;
  // En Attendant //
  XYZVector normal = p.Normal();
  double AAA = normal.X();
  double BBB = normal.Y();
  double CCC = normal.Z();
  //  double DDD = p.Distance(Point(0.,0.,0.));
  double DDD = p.HesseDistance();
  //  double denom = p.A()*(b.X()-a.X()) + p.B()*(b.Y()-a.Y()) + p.C()*(b.Z()-a.Z());
  double denom = AAA*(b.X()-a.X()) + BBB*(b.Y()-a.Y()) + CCC*(b.Z()-a.Z());
  if(denom!=0.)
    {
      // t=-(p.A()*a.X()+p.B()*a.Y()+p.C()*a.Z()+p.D());
      t=-(AAA*a.X()+BBB*a.Y()+CCC*a.Z()+DDD);
      t/=denom;
      if(debug) std::cout << " T = " << t <<std::endl; 
      if(segment)
        {
          if(t>=0&&t<=1)
            return XYZPoint(a.X()+(b.X()-a.X())*t,
                            a.Y()+(b.Y()-a.Y())*t,
                            a.Z()+(b.Z()-a.Z())*t);      
        }
      else
        {
          return XYZPoint(a.X()+(b.X()-a.X())*t,
                          a.Y()+(b.Y()-a.Y())*t,
                          a.Z()+(b.Z()-a.Z())*t);      
        }
          
     
    }

  return XYZPoint(0.,0.,0.);
}
virtual void CaloHitMaker::setSpotEnergy ( double  e) [pure virtual]

Member Data Documentation

Definition at line 57 of file CaloHitMaker.h.

Referenced by CaloHitMaker().

bool CaloHitMaker::EMSHOWER [protected]
bool CaloHitMaker::HADSHOWER [protected]
std::map<uint32_t,float> CaloHitMaker::hitMap_ [protected]
double CaloHitMaker::interactionLength [protected]

Definition at line 49 of file CaloHitMaker.h.

Referenced by CaloHitMaker(), EcalHitMaker::getPads(), and HcalHitMaker::HcalHitMaker().

bool CaloHitMaker::MIP [protected]

Definition at line 54 of file CaloHitMaker.h.

Referenced by HcalHitMaker::addHit(), and CaloHitMaker().

double CaloHitMaker::moliereRadius [protected]
int CaloHitMaker::onCal_ [private]

Definition at line 59 of file CaloHitMaker.h.

Referenced by CaloHitMaker().

unsigned CaloHitMaker::showerType_ [protected]

Definition at line 63 of file CaloHitMaker.h.

double CaloHitMaker::spotEnergy [protected]
int CaloHitMaker::subdetn_ [private]

Definition at line 58 of file CaloHitMaker.h.

Referenced by CaloHitMaker().

Definition at line 47 of file CaloHitMaker.h.

Referenced by CaloHitMaker().