Changeset 355 in svn
- Timestamp:
- May 6, 2009, 9:37:14 PM (16 years ago)
- Location:
- trunk/src
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VeryForward.cc
r260 r355 117 117 { 118 118 int pid=abs(particle->PID); 119 float eta=fabs(particle->Eta);120 121 122 119 TRootZdcHits *elementZdc; 123 120 TLorentzVector genMomentum; 124 121 // 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 ) { 126 123 genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E); 127 124 // !!!!!!!!! vérifier que particle->Z est bien en micromÚtres!!! … … 136 133 //double theta = (1E-6)*sqrt( pow(tx,2) + pow(ty,2) ); 137 134 //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); 139 136 // 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 138 cout << "ZDC: T = " << particle->T << " ; " << flight_distance/speed_of_light << endl; 139 elementZdc->side = sign(particle->Eta); 142 140 143 141 … … 147 145 void VeryForward::RomanPots(ExRootTreeWriter *treeWriter, ExRootTreeBranch *branchRP220,ExRootTreeBranch *branchFP420,TRootGenParticle *particle) 148 146 { 149 int pid=abs(particle->PID); 150 float eta=fabs(particle->Eta); 147 int pid=particle->PID; 151 148 152 149 TRootRomanPotHits* elementRP220; … … 180 177 elementRP220->Ty = (1E-6)*p1.getTY(); // [rad] 181 178 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 182 cout << "T = " << particle->T << " ; " << flight_distance/speed_of_light << endl; 183 elementRP220->E = p1.getE(); // not yet implemented 184 184 elementRP220->q2 = -1; // not yet implemented 185 elementRP220->side = sign( eta);185 elementRP220->side = sign(particle->Eta); 186 186 187 187 } else if (p1.getStoppingElement()->getName()=="rp420_1" || p1.getStoppingElement()->getName()=="rp420_2") { … … 192 192 elementFP420->Tx = (1E-6)*p1.getTX(); // [rad] 193 193 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); 197 cout << "T = " << particle->T << " ; " << flight_distance/speed_of_light << endl; 198 elementFP420->T = particle->T + flight_distance/speed_of_light; 196 199 elementFP420->E = p1.getE(); // not yet implemented 197 200 elementFP420->q2 = -1; // not yet implemented 198 elementFP420->side = sign( eta);201 elementFP420->side = sign(particle->Eta); 199 202 } 200 203 201 204 } 202 // 203 // 205 // if(p1.stopped(beamline) && (p1.getStoppingElement()->getS() > 100)) 206 // cout << "Eloss =" << 7000.-p1.getE() << " ; " << p1.getStoppingElement()->getName() << endl; 204 207 } // if forward proton 205 208 } 206 209 207 210 // 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)) { 210 213 // 211 214 // 212 // 213 // 214 // 215 // } // CASTOR 216 // */ 217
Note:
See TracChangeset
for help on using the changeset viewer.