8 #include "CLHEP/Units/PhysicalConstants.h" 9 #include "CLHEP/Units/SystemOfUnits.h" 21 double R = point.
mag();
22 double tmp = R / CLHEP::c_light / CLHEP::ns;
26 int subdet =
id.subdetId();
33 dist = rEB /
sin(theta);
34 }
else if (subdet == static_cast<int>(
EcalEndcap)) {
36 dist = zEE /
cos(theta);
39 dist = zES /
cos(theta);
44 dist = rHB /
sin(theta);
45 }
else if (subdet == static_cast<int>(
HcalEndcap)) {
47 dist = zHE /
cos(theta);
48 }
else if (subdet == static_cast<int>(
HcalOuter)) {
50 dist = rHO /
sin(theta);
53 dist = zHF /
cos(theta);
56 double tmp1 = dist / CLHEP::c_light / CLHEP::ns;
58 std::cout <<
"Detector " << det <<
"/" << subdet <<
" Eta/Theta " << eta <<
"/" << theta / CLHEP::deg <<
" Dist " 59 << dist / CLHEP::cm <<
" 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)
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Abs< T >::type abs(const T &t)
static const double zFrontES
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