CMS 3D CMS Logo

presh_detectors Class Reference

Algorithm generating rotation, translation & copy-numbers for the ECal-Preshower detectors. More...

#include <DetectorDescription/Algorithm/src/presh_detectors.h>

Inheritance diagram for presh_detectors:

AlgoImpl

List of all members.

Public Member Functions

bool checkParameters ()
 subclass must check the supplied parameters ParE_, ParS_
int copyno () const
 copy-number calculation
 presh_detectors (AlgoPos *, std::string label)
 initializes the algorithm
DDRotationMatrix rotation ()
 subclass must calculate a rotation matrix
void stream (std::ostream &) const
DDTranslation translation ()
 subclass must calculate a translation std::vector
 ~presh_detectors ()
 your comment here ...

Private Member Functions

void defineConstants ()
void topHalfXPlane ()

Private Attributes

std::vector< intIQUAD_MAX_
std::vector< intIQUAD_MIN_
DDRotation rot_
double waf_active_
double waf_inter_col_sep_
double waf_intra_col_sep_
double wedge_length_
double wedge_offset_
double y_offset_
double z_offset_
double ZLEAD_
double zwedge_ceramic_diff_


Detailed Description

Algorithm generating rotation, translation & copy-numbers for the ECal-Preshower detectors.

Definition at line 19 of file presh_detectors.h.


Constructor & Destructor Documentation

presh_detectors::presh_detectors ( AlgoPos p,
std::string  label 
)

initializes the algorithm

currently, the constructor also builds the various layers of preshower tubes. Rotations & translations generated by this algorithm are the ones used for placing the wedges & sensitive detectors inside the two 'active' layers of the preshower

Definition at line 19 of file presh_detectors.cc.

00020  : AlgoImpl(p,label)
00021 { 
00022 }

presh_detectors::~presh_detectors (  ) 

your comment here ...

Definition at line 25 of file presh_detectors.cc.

00026   { }


Member Function Documentation

bool presh_detectors::checkParameters (  )  [virtual]

subclass must check the supplied parameters ParE_, ParS_

whether they are correct and should select this paricular algorithm.

If the parameters are correct by should not select this particular algorithm, checkParamters must return false otherwise true.

The std::string err_ is to be used to be extended with error information in case any errors have been detected. Error information must be attached to err_ because of the possibility of already contained error information.

In case of errors: If an DDException is thrown by the algorithm implementation, further processing of any other implementations of the algorithm will be stopped. If no exception is thrown, checkParamters must return false. It's preferable not to throw an exception in case of errors. The algorithm implementation will throw if all checkParamters() of all registered algorithm implementations have returned false.

Implements AlgoImpl.

Definition at line 28 of file presh_detectors.cc.

References defineConstants(), and topHalfXPlane().

00029 {
00030   static bool once_ = false;
00031   if (!once_) {
00032    // preshPrepareTubs();
00033     defineConstants();
00034     once_=true;
00035   }
00036   
00037   topHalfXPlane();
00038   return true;
00039 }

int presh_detectors::copyno (  )  const [virtual]

copy-number calculation

In case incr_==0 it makes sense to overload this method, otherwise the invocation-count count_ will be returned as copy-number

If incr_ !=0 the copy-number will be curr_, the actual position in the range [start_,end_,incr_], unless this methods is overloaded.

Reimplemented from AlgoImpl.

Definition at line 56 of file presh_detectors.cc.

00057 {
00058   return 0;
00059 }

void presh_detectors::defineConstants (  )  [private]

Definition at line 108 of file presh_detectors.cc.

References IQUAD_MAX_, IQUAD_MIN_, waf_active_, waf_inter_col_sep_, waf_intra_col_sep_, wedge_length_, wedge_offset_, and zwedge_ceramic_diff_.

Referenced by checkParameters().

00109 {
00110    std::vector<double> & gmx = *(new std::vector<double>(21,19));
00111    std::vector<double> & gmn = *(new std::vector<double>(21,1));
00112    
00113    gmx[1] = 5;
00114    gmx[2] = 7;
00115    gmx[3] = 10;
00116    gmx[4] = 11;
00117    gmx[5] = 13;
00118    gmx[6] = 13;
00119    gmx[7] = 14;
00120    gmx[8] = 15;
00121    gmx[9] = 16;
00122    gmx[10] = 17;
00123    gmx[11] = 17;
00124    gmx[12] = 17;
00125    gmx[13] = 18;
00126    
00127    gmn[14] = 4;
00128    gmn[15] = 4;
00129    gmn[16] = 6;
00130    gmn[17] = 6;
00131    gmn[18] = 8;
00132    gmn[19] = 8;
00133    gmn[20] = 8;
00134    
00135    /* These are 'global' parameters in the sense that they are always the
00136       same in subsequent usage of the algorithm */
00137    DDVector iquad_max(DDName("IQUAD_MAX","preshower"),&gmx);
00138    DDVector iquad_min(DDName("IQUAD_MIN","preshower"),&gmn);
00139    
00140    waf_intra_col_sep_ = DDConstant(DDName("waf_intra_col_sep","preshower"));
00141    waf_inter_col_sep_ = DDConstant(DDName("waf_inter_col_sep","preshower"));
00142    waf_active_   = DDConstant(DDName("waf_active","preshower"));
00143    wedge_length_ = DDConstant(DDName("wedge_length","preshower")); 
00144    wedge_offset_ = DDConstant(DDName("wedge_offset","preshower")); 
00145    zwedge_ceramic_diff_ = DDConstant(DDName("zwedge_ceramic_diff","preshower"));
00146    
00147    IQUAD_MAX_ = DDVector(DDName("IQUAD_MAX","preshower"));
00148    IQUAD_MIN_ = DDVector(DDName("IQUAD_MIN","preshower"));
00149 }

DDRotationMatrix presh_detectors::rotation (  )  [virtual]

subclass must calculate a rotation matrix

depending on the current position curr_ in the range [start_,end_,incr_] and the user supplied parameters ParE_, ParS_

Implements AlgoImpl.

Definition at line 49 of file presh_detectors.cc.

00050 {
00051   // pseudo-implementation
00052   return DDRotationMatrix();
00053 }

void presh_detectors::stream ( std::ostream &  os  )  const

Definition at line 101 of file presh_detectors.cc.

00102 {
00103   os << "algorithm to place wedges & silicon strip detectors of the ecal preshower";
00104 }

void presh_detectors::topHalfXPlane (  )  [private]

Definition at line 62 of file presh_detectors.cc.

References DDpos(), I, int, IQUAD_MAX_, IQUAD_MIN_, waf_active_, waf_inter_col_sep_, waf_intra_col_sep_, wedge_length_, wedge_offset_, and zwedge_ceramic_diff_.

Referenced by checkParameters().

00063 {
00064    int NX(0), icopy(0);
00065   
00066    DDLogicalPart SF(DDName("SF","preshower"));
00067    
00068    DDLogicalPart SWED(DDName("SWED","preshower"));
00069    DDLogicalPart BOX(DDName("SFBX","preshower"));
00070   
00071    DDRotation w_rot(DDName("MROT_1001","preshower"));
00072    DDRotation b_rot(DDName("MROT_1000","preshower"));
00073    double zlead1=0;
00074    for(int I=1; I<=20; ++I) {
00075      for(int J=IQUAD_MAX_[I]; J>=IQUAD_MIN_[I]; --J) {
00076        ++NX;
00077        ++icopy;
00078        double XPOS = -1.*(J*waf_intra_col_sep_+(int(J/2))*waf_inter_col_sep_ - waf_intra_col_sep_/2.);
00079        double YPOS = (20-I)*waf_active_ + wedge_length_/2. + 0.05*cm;
00080        DDTranslation trans(XPOS,YPOS,zlead1+wedge_offset_);
00081        DDpos(SWED,SF,icopy,trans,w_rot);
00082        trans = DDTranslation(XPOS,YPOS,zlead1+zwedge_ceramic_diff_);
00083        DDpos(BOX ,SF,icopy,trans,b_rot);
00084      }
00085      for(int J=IQUAD_MIN_[I]; J<=IQUAD_MAX_[I]; ++J) {
00086        ++NX;
00087        ++icopy;
00088        // = -XPOS from above
00089        double XPOS = (J*waf_intra_col_sep_ + (int(J/2))*waf_inter_col_sep_ - waf_intra_col_sep_/2.);              
00090        // = same as YPOS from above
00091        double YPOS = (20-I)*waf_active_ + wedge_length_/2. + 0.05*cm;
00092        DDTranslation trans(XPOS,YPOS,zlead1+wedge_offset_);
00093        DDpos(SWED,SF,icopy,trans,w_rot);
00094        trans = DDTranslation(XPOS,YPOS,zlead1+zwedge_ceramic_diff_);
00095        DDpos(BOX ,SF,icopy,trans,b_rot);
00096      }
00097    }
00098    
00099 }

DDTranslation presh_detectors::translation (  )  [virtual]

subclass must calculate a translation std::vector

depending on the current position curr_ in the range [start_,end_,incr_] and the user supplied parameters ParE_, ParS_

Implements AlgoImpl.

Definition at line 42 of file presh_detectors.cc.

00043 {
00044   // pseudo-implementation
00045   return DDTranslation();
00046 }


Member Data Documentation

std::vector<int> presh_detectors::IQUAD_MAX_ [private]

Definition at line 55 of file presh_detectors.h.

Referenced by defineConstants(), and topHalfXPlane().

std::vector<int> presh_detectors::IQUAD_MIN_ [private]

Definition at line 55 of file presh_detectors.h.

Referenced by defineConstants(), and topHalfXPlane().

DDRotation presh_detectors::rot_ [private]

Definition at line 53 of file presh_detectors.h.

double presh_detectors::waf_active_ [private]

Definition at line 52 of file presh_detectors.h.

Referenced by defineConstants(), and topHalfXPlane().

double presh_detectors::waf_inter_col_sep_ [private]

Definition at line 51 of file presh_detectors.h.

Referenced by defineConstants(), and topHalfXPlane().

double presh_detectors::waf_intra_col_sep_ [private]

Definition at line 51 of file presh_detectors.h.

Referenced by defineConstants(), and topHalfXPlane().

double presh_detectors::wedge_length_ [private]

Definition at line 52 of file presh_detectors.h.

Referenced by defineConstants(), and topHalfXPlane().

double presh_detectors::wedge_offset_ [private]

Definition at line 52 of file presh_detectors.h.

Referenced by defineConstants(), and topHalfXPlane().

double presh_detectors::y_offset_ [private]

Definition at line 54 of file presh_detectors.h.

double presh_detectors::z_offset_ [private]

Definition at line 54 of file presh_detectors.h.

double presh_detectors::ZLEAD_ [private]

Definition at line 50 of file presh_detectors.h.

double presh_detectors::zwedge_ceramic_diff_ [private]

Definition at line 52 of file presh_detectors.h.

Referenced by defineConstants(), and topHalfXPlane().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:30:16 2009 for CMSSW by  doxygen 1.5.4