Fork me on GitHub

Changeset 62 in svn


Ignore:
Timestamp:
Dec 1, 2008, 11:59:19 AM (16 years ago)
Author:
severine ovyn
Message:

Read BField info from datacard

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/DataCardDet.dat

    r33 r62  
    1212FP420_S          420                    // distance of the RP to the IP, in meters
    1313FP420_X          0.004                  // distance of the RP to the beam, in meters
     14
     15#Magnetic Field
     16TRACKING_RADIUS   129                   //radius of the BField coverage
     17TRACKING_LENGTH   300                   //length of the BField coverage
     18BFIELD_X          0
     19BFIELD_Y          0
     20BFIELD_Z         3.8
     21
    1422
    1523#energy resolution for electron/photon
  • trunk/interface/BFieldProp.h

    r54 r62  
    2929    void Propagation(const TRootGenParticle *Part,TLorentzVector &genMomentum);
    3030
    31     int TRACKING_RADIUS;
    32     int TRACKING_LENGTH;
    3331    int MAXITERATION;
    3432    int MINSEGLENGTH;
  • trunk/interface/SmearUtil.h

    r55 r62  
    4545  float FP420_S; // distance of the RP to the IP, in meters
    4646  float FP420_X; // distance of the RP to the beam, in meters
     47
     48  //Magnetic Field information
     49  int TRACKING_RADIUS;                      //radius of the BField coverage
     50  int TRACKING_LENGTH;                      //length of the BField coverage
     51  float BFIELD_X;         
     52  float BFIELD_Y;         
     53  float BFIELD_Z;         
    4754
    4855 
  • trunk/src/BFieldProp.cc

    r59 r62  
    2727TrackPropagation::TrackPropagation() {
    2828
    29  TRACKING_RADIUS = 129;
    30  TRACKING_LENGTH = 300;
    3129 MAXITERATION = 20000;
    3230 MINSEGLENGTH = 70;
     
    7169     double vz = pz/M;
    7270
    73      double Bx = 0;
    74      double By = 0;
    75      double Bz = 3.8;
     71     double Bx = BFIELD_X;
     72     double By = BFIELD_Y;
     73     double Bz = BFIELD_Z;
    7674
    7775     double ax =  (q/M)*(Bz*vy - By*vz);
  • trunk/src/SmearUtil.cc

    r61 r62  
    4343FP420_X      =  0.004;// distance of the RP to the beam, in meters
    4444
     45TRACKING_RADIUS  = 129;                   //radius of the BField coverage
     46TRACKING_LENGTH  = 300;                   //length of the BField coverage
     47BFIELD_X         = 0.0;
     48BFIELD_Y         = 0.0;
     49BFIELD_Z         = 3.8;
    4550
    4651ELG_Scen =        0.05;                  // S term for central ECAL
     
    124129    else if(strstr(temp_string.c_str(),"MAX_CALO_FWD")){curstring >> varname >> value; MAX_CALO_FWD = value;}
    125130    else if(strstr(temp_string.c_str(),"MAX_MU")){curstring >> varname >> value; MAX_MU = value;}
     131    else if(strstr(temp_string.c_str(),"TRACKING_RADIUS")){curstring >> varname >> value; TRACKING_RADIUS = (int)value;}
     132    else if(strstr(temp_string.c_str(),"TRACKING_LENGTH")){curstring >> varname >> value; TRACKING_LENGTH = (int)value;}
     133    else if(strstr(temp_string.c_str(),"BFIELD_X")){curstring >> varname >> value; BFIELD_X = value;}
     134    else if(strstr(temp_string.c_str(),"BFIELD_Y")){curstring >> varname >> value; BFIELD_Y = value;}
     135    else if(strstr(temp_string.c_str(),"BFIELD_Z")){curstring >> varname >> value; BFIELD_Z = value;}
    126136    else if(strstr(temp_string.c_str(),"ELG_Scen")){curstring >> varname >> value; ELG_Scen = value;}
    127137    else if(strstr(temp_string.c_str(),"ELG_Ncen")){curstring >> varname >> value; ELG_Ncen = value;}
     
    241251        << left << setw(5) <<FP420_X       <<""<< right << setw(10)<<"*"<<"\n";
    242252  f_out<<"*                                                                    *"<<"\n";
     253  f_out<<"#***********************************                                 *"<<"\n";
     254  f_out<<"# Magnetic field needed informations                                 *"<<"\n";
     255  f_out<<"#***********************************                                 *"<<"\n";
     256  f_out<<"*                                                                    *"<<"\n";
     257  f_out << left << setw(55) <<"* Radius of the BField coverage:              "<<""
     258        << left << setw(5) <<TRACKING_RADIUS <<""<< right << setw(10)<<"*"<<"\n";
     259  f_out << left << setw(55) <<"* Length of the BField coverage:              "<<""
     260        << left << setw(5) <<TRACKING_LENGTH <<""<< right << setw(10)<<"*"<<"\n";
     261  f_out << left << setw(55) <<"* BField X component:                         "<<""
     262        << left << setw(5) <<BFIELD_X <<""<< right << setw(10)<<"*"<<"\n";
     263  f_out << left << setw(55) <<"* BField Y component:                         "<<""
     264        << left << setw(5) <<BFIELD_Y <<""<< right << setw(10)<<"*"<<"\n";
     265  f_out << left << setw(55) <<"* BField Z component:                         "<<""
     266        << left << setw(5) <<BFIELD_Z <<""<< right << setw(10)<<"*"<<"\n";
     267  f_out<<"*                                                                    *"<<"\n";
    243268  f_out<<"#************************************                                *"<<"\n";
    244269  f_out<<"# Electromagnetic smearing parameters                                *"<<"\n";
Note: See TracChangeset for help on using the changeset viewer.