8 #include "CLHEP/Units/PhysicalConstants.h" 9 #include "CLHEP/Units/SystemOfUnits.h" 22 double R = point.
mag();
23 double tmp = R/CLHEP::c_light/CLHEP::ns;
27 int subdet =
id.subdetId();
34 dist = rEB/
sin(theta);
35 }
else if (subdet == static_cast<int>(
EcalEndcap)) {
37 dist = zEE/
cos(theta);
40 dist = zES/
cos(theta);
45 dist = rHB/
sin(theta);
46 }
else if (subdet == static_cast<int>(
HcalEndcap)) {
48 dist = zHE/
cos(theta);
49 }
else if (subdet == static_cast<int>(
HcalOuter)) {
51 dist = rHO/
sin(theta);
54 dist = zHF/
cos(theta);
57 double tmp1 = dist/CLHEP::c_light/CLHEP::ns;
59 std::cout <<
"Detector " << det <<
"/" << subdet <<
" Eta/Theta " << eta
60 <<
"/" << theta/CLHEP::deg <<
" Dist " << dist/CLHEP::cm
61 <<
" R " << R <<
" TOF " << tmp <<
":" << tmp1 << std::endl;
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
static const double zFrontHE
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
static const double zFrontHF
static const double rFrontHB
static const double zFrontEE
static const double rFrontEB
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
static const double zFrontES
std::vector< std::vector< double > > tmp
static const double rFrontHO
double timeOfFlight(DetId id, const CaloGeometry *geo, bool debug=false)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point