Fork me on GitHub

Changeset 385 in svn for trunk


Ignore:
Timestamp:
May 15, 2009, 7:29:49 PM (15 years ago)
Author:
Xavier Rouby
Message:

not final

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/interface/VeryForward.h

    r374 r385  
    6969   bool relative_energy;
    7070   int kickers_on;
    71 
     71   static unsigned int counter;
    7272
    7373};
  • trunk/src/VeryForward.cc

    r377 r385  
    9191void VeryForward::init() {
    9292  //Initialisation of Hector
     93  static unsigned int counter;
     94  counter =0;
    9395  relative_energy = true; // should always be true
    9496  kickers_on = 1;         // should always be 1
     
    122124                           && fabs(particle->Eta) > DET->VFD_min_zdc ) {
    123125    elementZdc = (TRootZdcHits*) branchZDC->NewEntry();
     126
     127
     128    elementZdc->pid = particle->PID;
    124129
    125130     
     
    192197 
    193198  // to go faster, why not rejecting particles already going into the ZDC?
     199  if( particle->PID == pP)
    194200  if( (particle->Status == 1) &&  (fabs(genMomentum.Eta()) > DET->CEN_max_calo_fwd) )
    195201    {
    196202      //cout << "VeryForward :: M = " << mass << "\t Q = " << charge << "\t\t " << particle->PID << endl;
    197       H_BeamParticle p1(mass,charge); /// put here particle->CHARGE and particle->MASS
     203      H_BeamParticle p1(mass,charge);
    198204      p1.smearAng();   p1.smearPos(); // vertex smearing
    199       p1.setPosition(p1.getX()+DET->RP_cross_x,p1.getY()+DET->RP_cross_y,p1.getTX()-1*kickers_on*DET->RP_cross_ang,p1.getTY(),0);
    200       p1.set4Momentum(particle->Px,particle->Py,particle->Pz,particle->E);
    201      
     205        cout << "x = " << p1.getX() + DET->RP_cross_x
     206             << " y= " << p1.getY() + DET->RP_cross_y
     207             << " tx= " << p1.getTX() - kickers_on*DET->RP_cross_ang
     208             << " ty=" << p1.getTY() << endl;
     209      p1.setPosition(p1.getX()+DET->RP_cross_x,p1.getY()+DET->RP_cross_y,p1.getTX()-kickers_on*DET->RP_cross_ang,p1.getTY(),0);
     210      //p1.set4Momentum(particle->Px,particle->Py,particle->Pz,particle->E);
     211      p1.setE(particle->E);
     212       
    202213      H_BeamLine *beamline;
    203214      if(genMomentum.Eta() >0) beamline = beamline1;
     
    208219      if(p1.stopped(beamline)) {
    209220        if (p1.getStoppingElement()->getName()=="rp220_1" || p1.getStoppingElement()->getName()=="rp220_2") {
     221          static unsigned int counter;
     222          counter++;
     223          if (counter==1) {
     224                p1.getPath(0,"p1path.txt");
     225                cout << "RP : " << particle->PID << "\t" << charge << "=" << particle->Charge
     226                     << "\t" << mass << "=" << particle->M
     227                     << "\t E=" << particle->E
     228                     << endl;           
     229          }
    210230          p1.propagate(DET->RP_220_s);
    211231          elementRP220 = (TRootRomanPotHits*) branchRP220->NewEntry();
     
    238258            elementRP220->q2 = -1;                // not yet implemented
    239259            elementRP220->side = sign(particle->Eta);
     260
     261
     262                elementRP220->pid = particle->PID;
    240263         
    241264        } else if (p1.getStoppingElement()->getName()=="rp420_1" || p1.getStoppingElement()->getName()=="rp420_2") {
     
    270293          elementFP420->q2 = -1;                // not yet implemented
    271294          elementFP420->side = sign(particle->Eta);
     295
     296
     297                elementFP420->pid = particle->PID;
    272298        }
    273299
Note: See TracChangeset for help on using the changeset viewer.