Fork me on GitHub

Changeset 100 in svn for trunk/src/VeryForward.cc


Ignore:
Timestamp:
Dec 18, 2008, 2:39:26 PM (16 years ago)
Author:
severine ovyn
Message:

Remove datacard bug + CaloTowers OK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VeryForward.cc

    r94 r100  
    2626//------------------------------------------------------------------------------
    2727
    28 VeryForward::VeryForward() {
    29  
     28VeryForward::VeryForward(string DetDatacard) {
     29 
     30 DET = new RESOLution();
     31 DET->ReadDataCard(DetDatacard);
     32 
    3033  //Initialisation of Hector
    3134  relative_energy = true; // should always be true
     
    6265  TLorentzVector genMomentum;
    6366  // Zero degree calorimeter, for forward neutrons and photons
    64   if (particle->Status ==1 && (pid == pN || pid == pGAMMA ) && eta > VFD_min_zdc ) {
     67  if (particle->Status ==1 && (pid == pN || pid == pGAMMA ) && eta > DET->VFD_min_zdc ) {
    6568    genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
    6669    // !!!!!!!!! vérifier que particle->Z est bien en micromÚtres!!!
     
    7578    //double theta = (1E-6)*sqrt( pow(tx,2) + pow(ty,2) );
    7679    //double flight_distance = (DET->ZDC_S - particle->Z*(1E-6))/cos(theta) ; // assumes that Z is in micrometers
    77     double flight_distance = (VFD_s_zdc - particle->Z*(1E-6));
     80    double flight_distance = (DET->VFD_s_zdc - particle->Z*(1E-6));
    7881    // assumes also that the emission angle is so small that 1/(cos theta) = 1
    7982    elementZdc->T = 0*particle->T + flight_distance/speed_of_light; // assumes highly relativistic particles
     
    9598  genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
    9699  // if forward proton
    97   if( (pid == pP)  && (particle->Status == 1) &&  (fabs(genMomentum.Eta()) > CEN_max_calo_fwd) )
     100  if( (pid == pP)  && (particle->Status == 1) &&  (fabs(genMomentum.Eta()) > DET->CEN_max_calo_fwd) )
    98101    {
    99102      // !!!!!!!! put here particle->CHARGE and particle->MASS
     
    112115      if(p1.stopped(beamline)) {
    113116        if (p1.getStoppingElement()->getName()=="rp220_1" || p1.getStoppingElement()->getName()=="rp220_2") {
    114           p1.propagate(RP_220_s);
     117          p1.propagate(DET->RP_220_s);
    115118          elementRP220 = (TRootRomanPotHits*) branchRP220->NewEntry();
    116119          elementRP220->X  = (1E-6)*p1.getX();  // [m]
     
    125128         
    126129        } else if (p1.getStoppingElement()->getName()=="rp420_1" || p1.getStoppingElement()->getName()=="rp420_2") {
    127           p1.propagate(RP_420_s);
     130          p1.propagate(DET->RP_420_s);
    128131          elementFP420 = (TRootRomanPotHits*) branchFP420->NewEntry();
    129132          elementFP420->X  = (1E-6)*p1.getX();  // [m]
Note: See TracChangeset for help on using the changeset viewer.