double Angle(void){ return 90.0; } const char* AngleStr(const char *prefix="", const char *suffix="") { static char _anglestr[256]; sprintf(_anglestr, "%s%d^{#circ}%s", prefix, (int)Angle(), suffix); return _anglestr; } void GetTupTdn(double &tup, double &tdn, double z_vertex=65.0) { // Reasonable maximum time for photons at this angle double depth = 6.0; // cm into BCAL for center of shower (approx.) double theta = Angle()/57.3; double L_to_BCAL = 65.0/sin(theta) + depth; double tshower = L_to_BCAL/30.0; // ns. Center of shower double z = z_vertex + L_to_BCAL*cos(theta); double eff_c = 16.0; //cm/ns tup = tshower + ( z - 17.0)/eff_c; tdn = tshower + (407.0 - z)/eff_c; // Shift due to electronic pulse offset (rough) double epulse_shift = 5.0; tup += epulse_shift; tdn += epulse_shift; } double Tmax(void) { double tup, tdn; GetTupTdn(tup, tdn); return tup>tdn ? tup:tdn; } double Tmin(void) { double tup, tdn; GetTupTdn(tup, tdn); return tup