CMS 3D CMS Logo

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 (const LHCOpticsApproximator &org)
 
 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...
 
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

◆ ApertureType

Enumerator
NO_APERTURE 
RECTELLIPSE 

Definition at line 214 of file LHCOpticsApproximator.h.

214 { NO_APERTURE, RECTELLIPSE };

Constructor & Destructor Documentation

◆ LHCApertureApproximator() [1/2]

LHCApertureApproximator::LHCApertureApproximator ( )

Definition at line 965 of file LHCOpticsApproximator.cc.

965  {
966  rect_x_ = rect_y_ = r_el_x_ = r_el_y_ = 0.0;
968 }

References ap_type_, NO_APERTURE, r_el_x_, r_el_y_, rect_x_, and rect_y_.

◆ LHCApertureApproximator() [2/2]

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

Definition at line 970 of file LHCOpticsApproximator.cc.

973  rect_x_ = rect_x;
974  rect_y_ = rect_y;
975  r_el_x_ = r_el_x;
976  r_el_y_ = r_el_y;
977  ap_type_ = type;
978 }

References ap_type_, r_el_x_, r_el_y_, rect_x_, and rect_y_.

Member Function Documentation

◆ CheckAperture()

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

Definition at line 980 of file LHCOpticsApproximator.cc.

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 }

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

Member Data Documentation

◆ ap_type_

ApertureType LHCApertureApproximator::ap_type_
private

Definition at line 228 of file LHCOpticsApproximator.h.

Referenced by LHCApertureApproximator().

◆ r_el_x_

double LHCApertureApproximator::r_el_x_
private

Definition at line 227 of file LHCOpticsApproximator.h.

Referenced by LHCApertureApproximator().

◆ r_el_y_

double LHCApertureApproximator::r_el_y_
private

Definition at line 227 of file LHCOpticsApproximator.h.

Referenced by LHCApertureApproximator().

◆ rect_x_

double LHCApertureApproximator::rect_x_
private

Definition at line 227 of file LHCOpticsApproximator.h.

Referenced by LHCApertureApproximator().

◆ rect_y_

double LHCApertureApproximator::rect_y_
private

Definition at line 227 of file LHCOpticsApproximator.h.

Referenced by LHCApertureApproximator().

LHCApertureApproximator::ApertureType::RECTELLIPSE
LHCOpticsApproximator::LHCOpticsApproximator
LHCOpticsApproximator()
Definition: LHCOpticsApproximator.cc:59
LHCApertureApproximator::r_el_x_
double r_el_x_
Definition: LHCOpticsApproximator.h:227
LHCApertureApproximator::rect_x_
double rect_x_
Definition: LHCOpticsApproximator.h:227
LHCApertureApproximator::r_el_y_
double r_el_y_
Definition: LHCOpticsApproximator.h:227
LHCApertureApproximator::ap_type_
ApertureType ap_type_
Definition: LHCOpticsApproximator.h:228
recoMuon::in
Definition: RecoMuonEnumerators.h:6
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
LHCOpticsApproximator::Transport
bool Transport(const double *in, double *out, bool check_apertures=false, bool invert_beam_coord_sytems=true) const
Definition: LHCOpticsApproximator.cc:102
LHCApertureApproximator::ApertureType::NO_APERTURE
LHCApertureApproximator::rect_y_
double rect_y_
Definition: LHCOpticsApproximator.h:227
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
mps_fire.result
result
Definition: mps_fire.py:311