#include <CaloHitMaker.h>
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 CaloGeometryHelper * | getCalorimeter () const |
virtual const std::map < CaloHitID, 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< CaloHitID, float > | hitMap_ |
double | interactionLength |
bool | MIP |
double | moliereRadius |
const CaloGeometryHelper * | myCalorimeter |
unsigned | showerType_ |
double | spotEnergy |
const CalorimeterProperties * | theCaloProperties |
Private Attributes | |
DetId::Detector | base_ |
int | onCal_ |
int | subdetn_ |
Definition at line 21 of file CaloHitMaker.h.
Reimplemented in EcalHitMaker.
Definition at line 27 of file CaloHitMaker.h.
Reimplemented in EcalHitMaker, HcalHitMaker, and PreshowerHitMaker.
Definition at line 26 of file CaloHitMaker.h.
Reimplemented in EcalHitMaker, HcalHitMaker, and PreshowerHitMaker.
Definition at line 25 of file CaloHitMaker.h.
CaloHitMaker::CaloHitMaker | ( | const CaloGeometryHelper * | calo, |
DetId::Detector | det, | ||
int | subdetn, | ||
int | cal, | ||
unsigned | sht = 0 |
||
) |
Definition at line 10 of file CaloHitMaker.cc.
References base_, DetId::Ecal, EcalBarrel, EcalEndcap, EcalPreshower, Calorimeter::ecalProperties(), EMSHOWER, HADSHOWER, DetId::Hcal, Calorimeter::hcalProperties(), CalorimeterProperties::interactionLength(), interactionLength, Calorimeter::layer1Properties(), MIP, CalorimeterProperties::moliereRadius(), moliereRadius, myCalorimeter, onCal_, subdetn_, and theCaloProperties.
:myCalorimeter(theCalo),theCaloProperties(NULL),base_(basedet),subdetn_(subdetn),onCal_(cal),showerType_(sht) { // std::cout << " FamosCalorimeter " << basedet << " " << cal << std::endl; EMSHOWER=(sht==0); HADSHOWER=(sht==1); MIP=(sht==2); if(base_==DetId::Ecal&&(subdetn_==EcalBarrel||subdetn==EcalEndcap)&&onCal_) theCaloProperties = (CalorimeterProperties*)myCalorimeter->ecalProperties(onCal_); // is it really necessary to cast here ? if(base_==DetId::Ecal&&subdetn_==EcalPreshower&&onCal_) theCaloProperties = (PreshowerProperties*)myCalorimeter->layer1Properties(onCal_); if(base_==DetId::Hcal&&cal) theCaloProperties = myCalorimeter->hcalProperties(onCal_); if(theCaloProperties) { moliereRadius=theCaloProperties->moliereRadius(); interactionLength=theCaloProperties->interactionLength(); } else { moliereRadius=999; interactionLength=999; } }
virtual CaloHitMaker::~CaloHitMaker | ( | ) | [inline, virtual] |
Definition at line 30 of file CaloHitMaker.h.
{;}
virtual bool CaloHitMaker::addHit | ( | double | r, |
double | phi, | ||
unsigned | layer = 0 |
||
) | [pure virtual] |
Implemented in EcalHitMaker, HcalHitMaker, and PreshowerHitMaker.
const CaloGeometryHelper* CaloHitMaker::getCalorimeter | ( | ) | const [inline] |
Definition at line 36 of file CaloHitMaker.h.
References myCalorimeter.
{ // std::cout << "CaloHitMaker is returning myCalorimeter " << myCalorimeter << std::endl; return myCalorimeter; }
virtual const std::map<CaloHitID,float>& CaloHitMaker::getHits | ( | ) | [pure virtual] |
Implemented in EcalHitMaker, HcalHitMaker, and PreshowerHitMaker.
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] |
Implemented in EcalHitMaker, HcalHitMaker, and PreshowerHitMaker.
DetId::Detector CaloHitMaker::base_ [private] |
Definition at line 58 of file CaloHitMaker.h.
Referenced by CaloHitMaker().
bool CaloHitMaker::EMSHOWER [protected] |
Definition at line 53 of file CaloHitMaker.h.
Referenced by HcalHitMaker::addHit(), CaloHitMaker(), EcalHitMaker::getPads(), HcalHitMaker::HcalHitMaker(), HcalHitMaker::setDepth(), and EcalHitMaker::setTrackParameters().
bool CaloHitMaker::HADSHOWER [protected] |
Definition at line 54 of file CaloHitMaker.h.
Referenced by HcalHitMaker::addHit(), CaloHitMaker(), EcalHitMaker::getPads(), and HcalHitMaker::setDepth().
std::map<CaloHitID,float> CaloHitMaker::hitMap_ [protected] |
Definition at line 65 of file CaloHitMaker.h.
Referenced by HcalHitMaker::addHit(), PreshowerHitMaker::addHit(), PreshowerHitMaker::getHits(), HcalHitMaker::getHits(), and EcalHitMaker::getHits().
double CaloHitMaker::interactionLength [protected] |
Definition at line 50 of file CaloHitMaker.h.
Referenced by CaloHitMaker(), EcalHitMaker::getPads(), and HcalHitMaker::HcalHitMaker().
bool CaloHitMaker::MIP [protected] |
Definition at line 55 of file CaloHitMaker.h.
Referenced by HcalHitMaker::addHit(), and CaloHitMaker().
double CaloHitMaker::moliereRadius [protected] |
Definition at line 49 of file CaloHitMaker.h.
Referenced by PreshowerHitMaker::addHit(), CaloHitMaker(), EcalHitMaker::getPads(), and HcalHitMaker::HcalHitMaker().
const CaloGeometryHelper* CaloHitMaker::myCalorimeter [protected] |
Definition at line 47 of file CaloHitMaker.h.
Referenced by HcalHitMaker::addHit(), PreshowerHitMaker::addHit(), EcalHitMaker::buildGeometry(), EcalHitMaker::buildSegments(), CaloHitMaker(), EcalHitMaker::configureGeometry(), EcalHitMaker::EcalHitMaker(), getCalorimeter(), EcalHitMaker::getHits(), EcalHitMaker::hcalCellLine(), EcalHitMaker::preshowerCellLine(), and PreshowerHitMaker::PreshowerHitMaker().
int CaloHitMaker::onCal_ [private] |
Definition at line 60 of file CaloHitMaker.h.
Referenced by CaloHitMaker().
unsigned CaloHitMaker::showerType_ [protected] |
Definition at line 64 of file CaloHitMaker.h.
double CaloHitMaker::spotEnergy [protected] |
Definition at line 51 of file CaloHitMaker.h.
Referenced by EcalHitMaker::addHit(), HcalHitMaker::addHit(), EcalHitMaker::addHitDepth(), HcalHitMaker::setSpotEnergy(), EcalHitMaker::setSpotEnergy(), and PreshowerHitMaker::setSpotEnergy().
int CaloHitMaker::subdetn_ [private] |
Definition at line 59 of file CaloHitMaker.h.
Referenced by CaloHitMaker().
const CalorimeterProperties* CaloHitMaker::theCaloProperties [protected] |
Definition at line 48 of file CaloHitMaker.h.
Referenced by CaloHitMaker().