Changeset 100 in svn for trunk/src/VeryForward.cc
- Timestamp:
- Dec 18, 2008, 2:39:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VeryForward.cc
r94 r100 26 26 //------------------------------------------------------------------------------ 27 27 28 VeryForward::VeryForward() { 29 28 VeryForward::VeryForward(string DetDatacard) { 29 30 DET = new RESOLution(); 31 DET->ReadDataCard(DetDatacard); 32 30 33 //Initialisation of Hector 31 34 relative_energy = true; // should always be true … … 62 65 TLorentzVector genMomentum; 63 66 // 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 ) { 65 68 genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E); 66 69 // !!!!!!!!! vérifier que particle->Z est bien en micromÚtres!!! … … 75 78 //double theta = (1E-6)*sqrt( pow(tx,2) + pow(ty,2) ); 76 79 //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)); 78 81 // assumes also that the emission angle is so small that 1/(cos theta) = 1 79 82 elementZdc->T = 0*particle->T + flight_distance/speed_of_light; // assumes highly relativistic particles … … 95 98 genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E); 96 99 // 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) ) 98 101 { 99 102 // !!!!!!!! put here particle->CHARGE and particle->MASS … … 112 115 if(p1.stopped(beamline)) { 113 116 if (p1.getStoppingElement()->getName()=="rp220_1" || p1.getStoppingElement()->getName()=="rp220_2") { 114 p1.propagate( RP_220_s);117 p1.propagate(DET->RP_220_s); 115 118 elementRP220 = (TRootRomanPotHits*) branchRP220->NewEntry(); 116 119 elementRP220->X = (1E-6)*p1.getX(); // [m] … … 125 128 126 129 } 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); 128 131 elementFP420 = (TRootRomanPotHits*) branchFP420->NewEntry(); 129 132 elementFP420->X = (1E-6)*p1.getX(); // [m]
Note:
See TracChangeset
for help on using the changeset viewer.