CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes
LHCApertureApproximator Class Reference

#include <LHCOpticsApproximator.h>

Inheritance diagram for LHCApertureApproximator:
LHCOpticsApproximator

Public Types

enum  ApertureType { ApertureType::NO_APERTURE, ApertureType::RECTELLIPSE }
 
- Public Types inherited from LHCOpticsApproximator
enum  beam_type { lhcb1, lhcb2 }
 
enum  polynomials_selection { AUTOMATIC, PREDEFINED }
 

Public Member Functions

bool CheckAperture (const double *in, bool invert_beam_coord_sytems=true) const
 
 LHCApertureApproximator ()
 
 LHCApertureApproximator (const LHCOpticsApproximator &in, double rect_x, double rect_y, double r_el_x, double r_el_y, ApertureType type=ApertureType::RECTELLIPSE)
 
- Public Member Functions inherited from LHCOpticsApproximator
void AddRectEllipseAperture (const LHCOpticsApproximator &in, double rect_x, double rect_y, double r_el_x, double r_el_y)
 
bool CheckInputRange (const double *in, bool invert_beam_coord_sytems=true) const
 
beam_type GetBeamType () const
 
double GetDx (double mad_init_x, double mad_init_thx, double mad_init_y, double mad_init_thy, double mad_init_xi, double d_mad_xi=0.001)
 
double GetDxds (double mad_init_x, double mad_init_thx, double mad_init_y, double mad_init_thy, double mad_init_xi, double d_mad_xi=0.001)
 
void GetLinearApproximation (double atPoint[], double &Cx, double &Lx, double &vx, double &Cy, double &Ly, double &vy, double &D, double ep=1E-5)
 
void GetLineariasedTransportMatrixX (double mad_init_x, double mad_init_thx, double mad_init_y, double mad_init_thy, double mad_init_xi, TMatrixD &tr_matrix, double d_mad_x=10e-6, double d_mad_thx=10e-6)
 returns linearised transport matrix for x projection | dx_out/dx_in dx_out/dthx_in | | dthx_out/dx_in dthx_out/dthx_in | More...
 
void GetLineariasedTransportMatrixY (double mad_init_x, double mad_init_thx, double mad_init_y, double mad_init_thy, double mad_init_xi, TMatrixD &tr_matrix, double d_mad_y=10e-6, double d_mad_thy=10e-6)
 returns linearised transport matrix for y projection | dy_out/dy_in dy_out/dthy_in | | dthy_out/dy_in dthy_out/dthy_in | More...
 
 LHCOpticsApproximator ()
 
 LHCOpticsApproximator (std::string name, std::string title, TMultiDimFet::EMDFPolyType polynom_type, std::string beam_direction, double nominal_beam_momentum)
 begin and end position along the beam of the particle to transport, training_tree, prefix of data branch in the tree More...
 
 LHCOpticsApproximator (const LHCOpticsApproximator &org)
 
const LHCOpticsApproximatoroperator= (const LHCOpticsApproximator &org)
 
double ParameterOutOfRangePenalty (double par_m[], bool invert_beam_coord_sytems=true) const
 
void PrintCoordinateOpticalFunctions (TMultiDimFet &parametrization, const std::string &coord_name, const std::vector< std::string > &input_vars)
 
void PrintInputRange ()
 
void PrintOpticalFunctions ()
 
void Test (TTree *inp_tree, TFile *f_out, std::string data_prefix=std::string("def"), std::string base_out_dir=std::string(""))
 
void TestAperture (TTree *in_tree, TTree *out_tree)
 x, theta_x, y, theta_y, ksi, mad_accepted, parametriz_accepted More...
 
void Train (TTree *inp_tree, std::string data_prefix=std::string("def"), polynomials_selection mode=PREDEFINED, int max_degree_x=10, int max_degree_tx=10, int max_degree_y=10, int max_degree_ty=10, bool common_terms=false, double *prec=nullptr)
 
bool Transport (const double *in, double *out, bool check_apertures=false, bool invert_beam_coord_sytems=true) const
 
bool Transport (const MadKinematicDescriptor *in, MadKinematicDescriptor *out, bool check_apertures=false, bool invert_beam_coord_sytems=true) const
 
bool Transport2D (const double *in, double *out, bool check_apertures=false, bool invert_beam_coord_sytems=true) const
 
bool Transport_m_GeV (double in_pos[3], double in_momentum[3], double out_pos[3], double out_momentum[3], bool check_apertures, double z2_z1_dist) const
 pos, momentum: x,y,z; pos in m, momentum in GeV/c More...
 

Private Attributes

ApertureType ap_type_
 
double r_el_x_
 
double r_el_y_
 
double rect_x_
 
double rect_y_
 

Detailed Description

Definition at line 212 of file LHCOpticsApproximator.h.

Member Enumeration Documentation

Enumerator
NO_APERTURE 
RECTELLIPSE 

Definition at line 214 of file LHCOpticsApproximator.h.

214 { NO_APERTURE, RECTELLIPSE };

Constructor & Destructor Documentation

LHCApertureApproximator::LHCApertureApproximator ( )
LHCApertureApproximator::LHCApertureApproximator ( const LHCOpticsApproximator in,
double  rect_x,
double  rect_y,
double  r_el_x,
double  r_el_y,
ApertureType  type = ApertureType::RECTELLIPSE 
)

Member Function Documentation

bool LHCApertureApproximator::CheckAperture ( const double *  in,
bool  invert_beam_coord_sytems = true 
) const

Definition at line 980 of file LHCOpticsApproximator.cc.

References recoMuon::in, submitPVResolutionJobs::out, and mps_fire::result.

982 {
983  double out[5];
984  bool result = Transport(in, out, false, invert_beam_coord_sytems);
985 
987  result = result && out[0] < rect_x_ && out[0] > -rect_x_ && out[2] < rect_y_ && out[2] > -rect_y_ &&
988  (out[0] * out[0] / (r_el_x_ * r_el_x_) + out[2] * out[2] / (r_el_y_ * r_el_y_) < 1);
989  }
990  return result;
991 }
bool Transport(const double *in, double *out, bool check_apertures=false, bool invert_beam_coord_sytems=true) const
tuple result
Definition: mps_fire.py:311

Member Data Documentation

ApertureType LHCApertureApproximator::ap_type_
private

Definition at line 228 of file LHCOpticsApproximator.h.

Referenced by LHCApertureApproximator().

double LHCApertureApproximator::r_el_x_
private

Definition at line 227 of file LHCOpticsApproximator.h.

Referenced by LHCApertureApproximator().

double LHCApertureApproximator::r_el_y_
private

Definition at line 227 of file LHCOpticsApproximator.h.

Referenced by LHCApertureApproximator().

double LHCApertureApproximator::rect_x_
private

Definition at line 227 of file LHCOpticsApproximator.h.

Referenced by LHCApertureApproximator().

double LHCApertureApproximator::rect_y_
private

Definition at line 227 of file LHCOpticsApproximator.h.

Referenced by LHCApertureApproximator().