Fork me on GitHub

Changeset 355 in svn


Ignore:
Timestamp:
May 6, 2009, 9:37:14 PM (16 years ago)
Author:
Xavier Rouby
Message:

update

Location:
trunk/src
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VeryForward.cc

    r260 r355  
    117117{
    118118  int pid=abs(particle->PID);
    119   float eta=fabs(particle->Eta);
    120  
    121  
    122119  TRootZdcHits *elementZdc;
    123120  TLorentzVector genMomentum;
    124121  // Zero degree calorimeter, for forward neutrons and photons
    125   if (particle->Status ==1 && (pid == pN || pid == pGAMMA ) && eta > DET->VFD_min_zdc ) {
     122  if (particle->Status ==1 && (pid == pN || pid == pGAMMA ) && fabs(particle->Eta) > DET->VFD_min_zdc ) {
    126123    genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
    127124    // !!!!!!!!! vérifier que particle->Z est bien en micromÚtres!!!
     
    136133    //double theta = (1E-6)*sqrt( pow(tx,2) + pow(ty,2) );
    137134    //double flight_distance = (DET->ZDC_S - particle->Z*(1E-6))/cos(theta) ; // assumes that Z is in micrometers
    138     double flight_distance = (DET->VFD_s_zdc - particle->Z*(1E-6));
     135    double flight_distance = DET->VFD_s_zdc - particle->Z*(1E-6);
    139136    // assumes also that the emission angle is so small that 1/(cos theta) = 1
    140     elementZdc->T = 0*particle->T + flight_distance/speed_of_light; // assumes highly relativistic particles
    141     elementZdc->side = sign(eta);
     137    elementZdc->T = particle->T + flight_distance/speed_of_light; // assumes highly relativistic particles
     138cout << "ZDC: T = " << particle->T << " ; " << flight_distance/speed_of_light << endl;
     139    elementZdc->side = sign(particle->Eta);
    142140   
    143141   
     
    147145void VeryForward::RomanPots(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchRP220,ExRootTreeBranch *branchFP420,TRootGenParticle *particle)
    148146{
    149   int pid=abs(particle->PID);
    150   float eta=fabs(particle->Eta);
     147  int pid=particle->PID;
    151148 
    152149  TRootRomanPotHits* elementRP220;
     
    180177          elementRP220->Ty = (1E-6)*p1.getTY(); // [rad]
    181178          elementRP220->S = p1.getS();          // [m]
    182           elementRP220->T = -1;                 // not yet implemented
    183           elementRP220->E = p1.getE();  // not yet implemented
     179          // in first approximation only ! this number is always lower than the real distance-of-flight
     180          double flight_distance = p1.getS() - particle->Z*(1E-6);
     181          elementRP220->T = particle->T + flight_distance/speed_of_light; // assumes highly relativistic particles
     182cout << "T = " << particle->T << " ; " << flight_distance/speed_of_light << endl;
     183          elementRP220->E = p1.getE();          // not yet implemented
    184184          elementRP220->q2 = -1;                // not yet implemented
    185           elementRP220->side = sign(eta);
     185          elementRP220->side = sign(particle->Eta);
    186186         
    187187        } else if (p1.getStoppingElement()->getName()=="rp420_1" || p1.getStoppingElement()->getName()=="rp420_2") {
     
    192192          elementFP420->Tx = (1E-6)*p1.getTX(); // [rad]
    193193          elementFP420->Ty = (1E-6)*p1.getTY(); // [rad]
    194           elementFP420->S = p1.getS();        // [m]
    195           elementFP420->T = -1;                       // not yet implemented
     194          elementFP420->S = p1.getS();          // [m]
     195          // in first approximation only ! this number is always lower than the real distance-of-flight
     196          double flight_distance = p1.getS() - particle->Z*(1E-6);
     197cout << "T = " << particle->T << " ; " << flight_distance/speed_of_light << endl;
     198          elementFP420->T = particle->T + flight_distance/speed_of_light;
    196199          elementFP420->E = p1.getE();          // not yet implemented
    197200          elementFP420->q2 = -1;                // not yet implemented
    198           elementFP420->side = sign(eta);
     201          elementFP420->side = sign(particle->Eta);
    199202        }
    200203
    201204      }
    202       //                if(p1.stopped(beamline) && (p1.getStoppingElement()->getS() > 100))
    203       //                        cout << "Eloss ="  << 7000.-p1.getE() << " ; " << p1.getStoppingElement()->getName() << endl;
     205      //  if(p1.stopped(beamline) && (p1.getStoppingElement()->getS() > 100))
     206      //     cout << "Eloss ="  << 7000.-p1.getE() << " ; " << p1.getStoppingElement()->getName() << endl;
    204207    } // if forward proton
    205208}
    206209
    207210    // Forward particles in CASTOR ?
    208     //           /*      if (particle->Status == 1 && (fabs(particle->Eta) > DET->MIN_CALO_VFWD)
    209     //                             && (fabs(particle->Eta) < DET->MAX_CALO_VFWD)) {
     211    //    if (particle->Status == 1 && (fabs(particle->Eta) > DET->MIN_CALO_VFWD)
     212    //                              && (fabs(particle->Eta) < DET->MAX_CALO_VFWD)) {
    210213    //
    211214    //
    212     //                                               } // CASTOR
    213     //                                                         */
    214     //
     215    //    } // CASTOR
     216    // */
     217
Note: See TracChangeset for help on using the changeset viewer.