FlyoDoc_2011 Pisa 2011 by GmP --- 011
Public Member Functions | Public Attributes | Protected Attributes

Reazione Class Reference

#include <reazione.h>

Inheritance diagram for Reazione:
ReaCsid ReaEleb ReaEtad ReaGam ReaKld ReaKmd ReaKpd ReaKsd ReaLambda ReaPb ReaPi0d Reapmd Reappd

List of all members.

Public Member Functions

 Reazione ()
void Leggi_schede_rea ()
ReazioneSelect_reation ()
int Get_Id ()
double Get_Slope ()
std::string Get_Titolo ()
void Reset_Rea ()
void Stampa ()
void PrintPinc ()
void PrintPbers ()
void Makelist ()
void AddNt ()
void SubNt ()
void AddGen ()
void Norma_Rate ()
void Simple_List ()
void Fine_run ()
void MaxSpettro ()
virtual int Get_Beam ()
virtual double Produci ()
double UProduci ()
ParticellaNuovaPart (const char *)
ParticellaNuovaBullet (const char *)

Public Attributes

double mdltz
double edltz1
double edltz2
double mspair
double mbrem
double eeb
double eleb
int Pipev
int Pair_done
int Totpair
int Tailsrt_done
int Tailsrt
int Tailong_done
int Tailong
int Dalitz_done
int Totdltz
int Brem_done
int Totbrem
int rea_type
int rea_pattern
int Totpart
int TotpartSave
int Gasint_Done
gvet Xtarg
gvet Pbeam
gvet Vbeam
gvet Xbers
gvet Pbers
gvet Vbers
int ss_done
double ss0
double ss1
double ss2
Particellaavo
ParticellaLastpart
ParticellaLastpartSave
Reazionenext
Reazioneup

Protected Attributes

std::string header
int id
long type
int generati
int veri
int trasmessi
int scrnt
double vxb
double vyb
double vzb
double ppb
double inc_pinc
double inc_teta
double branch
double prodrate
double rate
double prob
double pincmx
double Dnsudp
double maxspettro
double ctau_avo_su_mass
gvet Pinc_ppp
gvet Vinc_ppp
double wpinc
double wpincq
int ubeam
gvet Pinc
gvet Ctarg
double rtarg
double dztarg
double wpbers
double drbers
gvet Pbersa
gvet Cbers
gvet Ccoll
double rbers
double dzbers
double rcoll
double dzcoll
double slope

Detailed Description

--- Classe R e a z i o n e Base Class to describe the reactions

Author:
Giuseppe Pierazzini

Definition at line 18 of file reazione.h.


Constructor & Destructor Documentation

Reazione::Reazione ( )

Genera la lista delle reazioni da simulare leggendo i parametri di definizione nella file di tipo .epc.

Definition at line 35 of file reazione.cpp.

{

// Create a new Reaction with links.
  TotRea++;
  id = TotRea;
  if ( last_parz == 0 ) Reaction= this;
  else              last_parz->next = this;
  up = last_parz;
  LastReaction=last_parz = this;
  this->next = 0;
  SelRea=this;
// reset counters for   special Reactions ....


  ss_done=-1; // for thre bodies decay ..partfase ss calculation... -1 == not done; 1 == ok
  Pair_done=Totpair=0;
  Gasint_Done=0;
  Dalitz_done=Totdltz=0;
  Tailsrt_done=Tailsrt=0;
  Tailong_done=Tailong=0;
  Brem_done=Totbrem=0;
  Pipev=Totpart=0;
  avo =  Lastpart=0;
  header="";
  rea_type=rea_pattern=0;
// type =-1 beam, 0=decadimento (default) ,1=urto.  che accade nelle cl derivate
  generati = veri = scrnt=trasmessi=ubeam=0;
  branch=prodrate=rate = prob = 0.0;
  Dnsudp=maxspettro=0.0;
  inc_pinc=vxb=vyb=vzb=inc_teta=0.0;
  slope=wpinc = 0.0;
  rtarg = dztarg = 0.0;
  rbers = dzbers = 0.0;
  ctau_avo_su_mass=0.0;


  if ( up!=0 )
    {
      Ccoll=up->Ccoll;
      rcoll=up->rcoll;
      dzcoll=up->dzcoll;
    }

// controllo dello zero (bias) del sistema del lab. Tutti i rivelatori sono
// spostati di conseguenza..
  if ( Lab_Zero[0]==NOTDEFINED )
    {
      Gout<<"\n \n *** System lab origin NOT defined.. forced to zero!!!";
      Lab_Zero.setvn ( 0.,0.,0. );
    }


// legge le schede di definizione della reazione

  Leggi_schede_rea();

}

Member Function Documentation

void Reazione::AddGen ( )

Incrementa il numero degli eventi generati per ciascuna reazione richiesta.

Definition at line 491 of file reazione.cpp.

{
  generati++;
//   remember the last event type...
  evento_.Gen.lastype=evento_.Gen.type;
  evento_.Gen.type =type;
}
void Reazione::Fine_run ( )

Un sommario di fine run.

Definition at line 568 of file reazione.cpp.

{
  int gen=0,totnt=0,Vtot=0,VTtot=0,Tpair=0,Tlsrt=0,Tlong=0, Totpipev=0 ;
  int tgasdone=0;
  int Tdlz=0,Tbrem=0;
  Reazione *pts;
// calcolo dei protoni equivalenti su targhetta.
// vedi nota 01/GmP  Pisa 19.6.99
  double totime=TBurst->Get_TTempo();
  Gout<<"\n\n ----------   F i n e _ R u n "<<evento_.Gen.Run<<"  -----------\n";
  Gout.setf ( ios::floatfield , ios::scientific );
  Gout<<setprecision ( 5 )
  <<"\n\nTot PPP "<<Protoni<<"   in "<< totime <<" ns"<<endl;



  Gout.setf ( ios::left, ios::adjustfield );
  pts = Reaction;
  Gout<<"\nBeam  type Id   Gen       Gas      Dlz   Pair  Brem  Hsr     Hlg   Piped   Writ       Titolo";

  while ( pts != 0 )
    {
      Gout<<"\n <"
      <<setw ( 4 ) <<pts->avo->Get_Nome() <<" "
      <<setw ( 4 ) <<pts->type<<" "
      <<setw ( 3 ) <<pts->id<<"> "
      <<setw ( 8 ) <<pts->generati<<"   "
      <<setw ( 8 ) <<pts->Gasint_Done<<" "
      <<setw ( 5 ) <<pts->Totdltz<<" "
      <<setw ( 5 ) <<pts->Totpair<<" "
      <<setw ( 5 ) <<pts->Totbrem<<" "
      <<setw ( 5 ) <<pts->Tailsrt<<" "
      <<setw ( 5 ) <<pts->Tailong<<" "
      <<setw ( 7 ) <<pts->Pipev<<" "
      <<setw ( 7 ) <<pts->scrnt<<" "
      <<setw ( 25 ) <<pts->header;

      gen+=   pts->generati;
      tgasdone+=pts->Gasint_Done;
      totnt+= pts->scrnt;
      Vtot+=  pts->veri;
      VTtot+= pts->trasmessi;
      Tlsrt+= pts->Tailsrt;
      Tlong+= pts->Tailong;
      Tpair+= pts->Totpair;
      Tdlz+=  pts->Totdltz;
      Tbrem+= pts->Totbrem;
      Totpipev+= pts->Pipev;
      pts =   pts->next;
    }

  Gout<<"\n  T o t a l i :  "
  <<setw ( 8 ) <<gen<<"   "
  <<setw ( 8 ) <<tgasdone<<" "
  <<setw ( 5 ) <<Tdlz<<" "
  <<setw ( 5 ) <<Tpair<<" "
  <<setw ( 5 ) <<Tbrem<<" "
  <<setw ( 5 ) <<Tlsrt<<" "
  <<setw ( 5 ) <<Tlong<<" "
  <<setw ( 7 ) <<Totpipev<<" "
  <<setw ( 7 ) <<totnt<<" "
  <<" All Reactions";
  Gout<<"\n\nTau per ppp produced   "<<totime/Protoni<<" Tau per evento written "<< totime/totnt <<endl;
  Gout<<"\n\nLast event ="<<setw ( 8 ) <<evento_.Gen.Event<<" Normal end run....."<<std::endl;
  return;
}
void Reazione::Makelist ( )

Procedura per creare la lista dei decadimenti di una reazione.

Definition at line 252 of file reazione.cpp.

{
  char line[156];
  string label,a0,a1,a2,a3,a4,a5;



  // possibili patterns di dati in input:
  //      lb  0  1  2  3  4  5     indice di pattern
  // 0)   pa                     solo beam
  // 2)   pa  =  pb pc           decadimento in due corpi
  // 3)   pa  =  pb pc pd        decadimento in tre corpi
  // 4)   pa  =  pb pc pd pe     decadimento in quattro corpi
  // 5)   pa  =  pb pc pd pe pf   decadimento in cinque  corpi
  // 8)   pa pb   = pc pd        urto in due corpi (solo nella prima linea)
  // 9)   pa pb   = pc pd pe     urto in tre corpi (solo nella prima linea)

  Cardcur->getline ( line, 156 );         // da rivedere....!!!!!!!!!!
  while ( !Cardcur->eof() )
    {
      // Decodifico la linea


      a0=a1=a2=a3=a4=a5="";
      stringstream scheda;
      scheda<<line;
      scheda>>label>>a0>>a1>>a2>>a3>>a4>>a5;
                        
                

      if ( Dbginput==1 ) Gout<<"\n\n Mklist reads:  "<<line;

      if ( label.size()     ==0  ||
           label.find ( "**" )  ==0  ||
           label.find ( "\\\\" ) ==0  ||
           label.find ( "//" )  ==0 )
        {
          Cardcur->getline ( line, 156 );   //line empty or comment ...read next line
          continue;
        }
        
      if ( ( a0.size() !=0 &&a1.size() !=0) && ( a0!= "="&& a1 != "=" ) )


        {  // check the = position....
          cout<<"\n Input card error ...: "<<line<<"  ......exit";
          Gout<<"\n Input card error ...: "<<line<<"  ......exit  "
          << a0<< "  "<<a0.size() << "  " << a1<< "  "<<a1.size() << "  " << a2<< "  "<<a2.size();
          exit ( 0 );
        }

      if ( label.find ( "fine" )  ==0  ||
           label.find ( "end" )  ==0  ||
           label.find ( "done" )  ==0 )
        {
          if ( Dbginput==1 ) Gout<<"\n "<<label;
          return;
        }

// extract particles
      const char *p0=0,*p1=0,*p2=0,*p3=0,*p4=0,*p5=0;

// beam particle
      p0= Matter->Ptbsdat ( label.c_str() );
      if ( p0==0 )
        {
          cout<<"\n Reaction  card error ...:  "<<line<<"  ......exit";
          Gout<<"\n Reaction  card error ...:  "<<line<<"  ......exit";
          exit ( 0 );
        }

      pattern=-1;
// è solo un beam
      if ( a0.size() ==0 ) pattern = BEAM;

      else if ( a0 == "=" ) // è un decadimento
        {
          p1 = Matter->Ptbsdat ( a1.c_str() );
          p2 = Matter->Ptbsdat ( a2.c_str() );
          p3 = Matter->Ptbsdat ( a3.c_str() );
          p4 = Matter->Ptbsdat ( a4.c_str() );
          p5 = Matter->Ptbsdat ( a5.c_str() );
          if ( p1!=0 && p2!=0 ) pattern = DECAY2;
          if ( p1!=0 && p2!=0 && p3 !=0 ) pattern = DECAY3;
          if ( p1!=0 && p2!=0 && p3 !=0 && p4!=0 ) pattern = DECAY4;
          if ( p1!=0 && p2!=0 && p3 !=0 && p4!=0 && p5!=0 ) pattern = DECAY5;


//        Gout<<"\n "<<a0<<" "<<a1<<" "<<a2<<" "<<a3<<" "<<a4<<" "<<a5<<" "<<a5<<pattern<<endl;
        }

      else if ( a1 == "=" ) // è un urto
        {
          p1 = Matter->Ptbsdat ( a0.c_str() );
          p2 = Matter->Ptbsdat ( a2.c_str() );
          p3 = Matter->Ptbsdat ( a3.c_str() );
          p4 = Matter->Ptbsdat ( a4.c_str() );
          if ( p1!=0 && p2!=0 && p3 !=0 ) pattern = URTO2;
          if ( p1!=0 && p2!=0 && p3 !=0 && p4!=0 ) pattern = URTO3;

        }

      if ( Dbginput==1 ) Gout<<"\n Pattern found = "<<pattern;
      Gout.flush();

      if ( pattern == -1 )
        {
          Gout << "\n MakeLista: Pattern errore 2 ... exit";
          exit ( 0 );
        }

      if ( ( pattern == 0 ) && avo != 0 )
        {
          Gout << "\n MakeLista: avo errore 0,4,5... exit";
          exit ( 0 );
        }
// definisco l'avo della lista se non gia' fatto.
// altrimenti definisco il pontatore padre della decadimento...
      Particella *padre, *madre, *ccms;

      if ( avo == 0 )
        { 
          if ( pattern==URTO2||pattern==URTO3 )
            {
                rea_type=1; //urto
              avo = padre = NuovaBullet ( p0 );   //Type == Bullet
            }
          else //decay o beam
            {
              rea_type=0; 
              avo = padre = NuovaPart ( p0 );
              avo->Set_Type ( Beam ); // è la prima particella della lista... è il fascio.
            }

          if ( pattern==BEAM )
            { 
              rea_type=-1;
              Cardcur->getline ( line, 156 );
              continue;
            }
        }
      else padre = avo->Ptr_Particle ( p0 );
      if ( padre == 0 )
        {
          Gout << "\n MakeLista: Wrong name or chaining error < "<<p0<<" > ....exit. "<<endl;
          exit ( 0 );
        }

//======================================
//======================================
      if ( pattern == BEAM );
    
      else if ( pattern == DECAY2 ) padre->Decay_in_2 ( p1, p2 );
      else if ( pattern == DECAY3 ) padre->Decay_in_3 ( p1,p2,p3 );
      else if ( pattern == DECAY4 ) padre->Decay_in_4 ( p1,p2,p3,p4 ); 
      else if ( pattern == DECAY5 ) padre->Decay_in_5 ( p1,p2,p3,p4,p5 );
      
     
      
      //**************************************************************************
//    Sezione urti da rivedere
      else if ( pattern == URTO2 ) // two bodies final status // da controllare....!!!!!
        {
          madre = NuovaPart ( p1 );
          madre->Set_Type ( Bers );
          padre->Aggiorna_link_Bullet ( madre );
// attenzione  Cms deve essere definita  meglio.... Anzi va ridefinita ad ogni interazione...
          ccms = NuovaPart ( Cms );
          ccms->Set_Type ( Bari );
          if ( Dbginput==1 ) Gout<<"\n Define dummy Res: "<<Cms;
          padre->Aggiorna_link ( 0, madre, 0, 0 );
          madre->Aggiorna_link ( 0, 0,ccms, padre );
          ccms->Decay_in_2 ( p2, p3 );
        }
      else if ( pattern == URTO3 ) // three bodies final status

        {
          madre = NuovaPart ( p1 );
          madre->Set_Type ( Bers );
          padre->Aggiorna_link_Bullet ( madre );
          ccms = NuovaPart ( Cms );
          ccms->Set_Type ( Bari );
          if ( Dbginput==1 ) Gout<<"\n Define dummy Res: "<<Cms;
          padre->Aggiorna_link ( 0, madre, 0, 0 );
          madre->Aggiorna_link ( 0, 0,ccms, padre );
          ccms->Decay_in_3 ( p2,p3,p4 );
        }

      Cardcur->getline ( line, 156 );
    }
}
void Reazione::MaxSpettro ( )

Calcola il valore massimo dello spettro di produzione tenendo conto del beam e delle sezioni d'urto differenziali dn/dpdw fornite da Double, in un angolo solido coperto dal collimatore virtuale. Il massimo della sezione d'urto si trova con una loop tra il massimo ed il minimo impulso suddividendo l'intervallo in step di Dp=wpinc*0.05. Il massimo trovato denominato maxspettro, per ciascuna reazione, viene memorizzato ed utilizzato in seguito per selezionare gli eventi. Nella loop si calcola l'integrale della sezione d'urto differenziale che moltiplicato per il B.R. della reazione in esame fornisce un valore (abbastanza) proporzionale al rate di produzione " Prodrate" delle reazioni generate in quell'angolo solido e in quell'intervallo di impulsi. L'inverso di Prodrate equivale, grossomodo, al numero di particelle_beam necessarie per generare un evento.

Definition at line 21 of file reaprod.cpp.

{
  Particella *pr=avo;
  Reazione* prea=up;
  double dW;
  Gout<<"\n\n   ----------> P r o d u z i o n e <------------  ";
  Gout<<"\n "<<pr->Get_Nome() <<" Beam pruduction probability "
  <<" for the reaction "<<header<<endl;



  if ( inc_pinc<=0.0 )
    { Gout << " \n Incident pinc non defined.... exit "; exit ( 0 );}


  Gout<<"\n Production parameters: \n inc_pinc="
  <<setprecision ( 2 ) <<fixed
  <<setw ( 8 ) <<inc_pinc
  <<" teta="<<setw ( 8 ) <<inc_teta;

  Gout<<"\n Virtual collimator position and dimension...";

  gvet dcoll  = Ccoll-Ctarg; dcoll.Norma();
  Ctarg.print ( "Targ" );
  Ccoll.print ( "Ccol" );Gout<< "  r="<<rcoll;
  dcoll.print ( "dcoll" );
  dW=PiGreco*rcoll*rcoll/ ( dcoll.z*dcoll.z ); // angolo solido coperto dal collimatore virtuale
  Gout<<"\nSolide angle   dW = "<< dW;


  //----------------------------------------------------------------
  while ( prea!=0 )
  {


    // verifico se lo stesso di una  reazione precedente....
    if ( avo->Get_Idm() ==prea->avo->Get_Idm() && Pinc.norma==prea->Pinc.norma )
    {
      maxspettro=prea->maxspettro;
      Dnsudp=prea->Dnsudp;
      prodrate=rate*Dnsudp;
      pincmx=prea->pincmx;

      Gout<<"\n -------";
      Gout<<"\n Maxspettro has found previuos reaction with the same beam!"
      << "   got the same parametrs...";


      Gout<<"\n\n "
      <<setprecision ( 7 ) <<fixed
      <<"  EV/PPP "
      <<setw ( 13 ) << prodrate<<" Max="
      <<setw ( 13 ) <<maxspettro  <<"  at "
      <<setprecision ( 2 ) <<fixed
      <<setw ( 6 ) <<pincmx<<" GeV  for "
      <<setw ( 6 ) <<avo->Get_Nome()
      <<" with "<< rate <<" of B.R.";


      Gout<<"\n ----------------------------------------\n";
      if ( next!=0 ) next->MaxSpettro();
      return;
    }
    prea=prea->up;
  }
  //========================== end  verifica  ========================---

  //loop
// Non !!! Integro sulla sup del collimatore virtuale



  //==========================================
  // integration loop
  //  calcolo il  momentum spectrum...nell'intervallo Pinc +- Wpinc
  //  for particles produced versus the collimator center direction...

  double stepp= wpinc*0.05;   //40 step in pinc
  ppb=Pinc.norma-wpinc;
  double mxpp= Pinc.norma+wpinc+stepp*0.5;
  Dnsudp=0.0;
  Gout<<"\n\n       T A B E L L A ";
  Gout<<"\n     teta         p       dN/dpdw    ";

  // fix parameters for beam particle  production
  // attenzione se l'angolo di produzione è diverso andrebbe corretto...
  vxb=vyb=0.0,vzb=1.0;
  double tett=0.0, Pmedio=0.0;

  while ( ppb<= mxpp )
  {
    /************************* n o t e *******************
    calcolo di wexp!
    la formula di Doble/Gatignon
    dn/do alla targhetta

    */
    if(ubeam==0) prob=Produci(); //Creare una routine utente.....
    else       prob=1000.0;   //prob è la sezione d'urto differenziale!!!!
   
    if ( maxspettro<prob ) { maxspettro=prob;pincmx=ppb;}
    Dnsudp+=prob; //Integro in funzione di p
    Pmedio+=prob*ppb;
    //   qui teta sempre nulla   tra la direzione del p e del  beam generato

    Gout<<"\n "
    <<setprecision ( 4 ) <<fixed
    <<setw ( 9 ) <<tett<<"  "
    <<setw ( 9 ) <<ppb<<"  "
    <<setw ( 9 ) <<prob;

    ppb+=stepp;
  }

  Pmedio= Pmedio/Dnsudp;

  Gout<<"\n\n Doble production max spettrum"<<setw ( 13 ) <<maxspettro
  <<"\n for "<<setw ( 6 ) <<avo->Get_Nome()
  <<"  at "<<setprecision ( 2 ) <<fixed<<setw ( 6 )
  <<pincmx<<" GeV "
  <<"\n with B.R  "<< rate <<" and  P_med "<<Pmedio
  <<setprecision ( 8 ) <<"  in Dw = "<< dW;

  //  Domega by the defining collimator.divided by 16 step of domega.. vedi loop up.
  //

  Dnsudp=Dnsudp*stepp*dW;
  prodrate=rate*Dnsudp;



  Gout<<"\n\n Ev/PPP "
  <<setprecision ( 7 ) <<fixed<<setw ( 13 ) << prodrate;


  Gout<<"\n ----------------------------------------\n";

  if ( next!=0 ) next->MaxSpettro();

}
void Reazione::Norma_Rate ( )

Una volta noti tutte le probabilità di generazione di ciascuna reazione, questa procedura normalizza il vettore delle probabilità a UNO per rendere più efficiente la selezione.

Definition at line 668 of file reazione.cpp.

{
  Reazione *pts;

  double tprob=0.0,sigmat=0.0;
  Gout<<"\n\n  Rates normalization....";
  pts = Reaction;
  while ( pts != 0 )
    {
      sigmat+=pts->prodrate;
      pts = pts->next;
    }
  pts=Reaction;
        
        // rinormnalizzazione della sezione d'urto totale.....
         // sigmat*=10.;
        
  while ( pts != 0 )
    {

      // calcolo del rate di produzione normalizzato
      pts->rate=pts->prodrate/sigmat;
      tprob+=pts->rate;
      pts->prob=tprob;  // probabilita' integrale... per la generazione.





      Gout.setf ( ios::floatfield , ios::scientific );

      Gout<<"\n Rea: "
      <<setprecision ( 3 ) <<setw ( 2 ) <<pts->id
      <<"   Ev/PPP " <<setw ( 11 ) <<pts->prodrate
      <<"   Normalizzato "<<setw ( 8 ) <<pts->rate
      <<"  Integrale " <<setw ( 8 ) <<pts->prob
      <<"   " <<setw ( 8 ) <<pts->header;
      pts = pts->next;

    }
  //  fattore di normalizzazione della sezione d'urto.....
  double Aggiusta_Protoni=0.05;
  Protoni=Aggiusta_Protoni*evento_.Mxev/sigmat;
  double tgen=TBurst->Get_Tburst() * ( Protoni/ppp );
  double tmedio=tgen/evento_.Mxev;
  Gout<<"\n\n For all reactions: "
  <<setprecision ( 5 ) <<setw ( 2 )
  <<" Ev/PPP " <<setw ( 11 ) <<sigmat
  <<"\n Needed Protons  "<<setw ( 8 ) <<Protoni
  <<"   for  "<<setw ( 8 ) <<evento_.Mxev<<" Events "
  <<"\n Production time   "<<setw ( 6 ) << tgen<<" ns  with Tau "
  <<setw ( 6 ) << tmedio<<" ns between two events.   "
        <<setw ( 6 ) << 1000000./tmedio<<" kfreq  Eventi secondo\n-----------------------";

//separazione temporale in ns tra due protoni no sterili.....

  TBurst->Set_Tmed ( tmedio );

}
void Reazione::Reset_Rea ( )

Lo stato della reazione è azzerata (reset) all'inizio di ogni evento.

Definition at line 734 of file reazione.cpp.

{

  Particella *pr= LastpartSave->next,*questa=0;
  Lastpart->next=0;
  Lastpart= LastpartSave;

  LastpartSave->next=0;
  Totpart=TotpartSave;
  avo->Restore_Link();
  avo->Reset_Stato();

// free the memory.... or destroy the partucle....
  while ( pr!=0 )
    {
      questa=pr;
      pr=pr->next;
      delete questa;  // here delete the particle
    }

  ss_done=-1; //ss calculation in partfase for three bodies...
  Pair_done=0;
  Brem_done=0;
  Dalitz_done=0;
  Tailsrt_done=0;
  Tailong_done=0;
  mbrem=mdltz=mspair=eeb=eleb=edltz1=edltz2=0.0;
  GasIdo=0;
}
Reazione * Reazione::Select_reation ( )

Seleziona, per ciascun evento, il tipo di reazione da simulare secondo la loro probabilità di generazione.

Definition at line 643 of file reazione.cpp.

{
  Reazione *pts;
  double prb = Pran();

  pts = Reaction;
  while ( pts != 0 )
    {
      if ( prb <= pts->prob )
        {
          return ( pts );
        }
      pts = pts->next;
    }

  return ( pts );
}
void Reazione::Simple_List ( )

Lista delle particelle delle reazioni in elaborazione.

Definition at line 771 of file reazione.cpp.

{
  // itaration method ...do not use this procedura in the loop....
  Particella *loopx;


  Gout<<"\n \nEV  "<<Eventi_Fatti<<"  Reaction particle list: "<< header;
  loopx = avo;
  Gout
  <<"\n     n        id   idm  nome  type    ch       mas    width    t_life          <  G.Z       Gp   >    <   Dead at: X           >      path      fato    Ifato";

  while ( loopx != 0 )
    {
      Gout<<"\n"
      <<setprecision ( 2 ) <<fixed
      <<setw ( 8 ) << loopx->Get_Ido() <<" "
      <<setw ( 8 ) << loopx->Get_Id() <<" "
      <<setw ( 3 ) << loopx->Get_Idm() <<" "
      <<setw ( 6 ) << loopx->Get_Nome() <<" "
      <<setw ( 6 ) << loopx->Get_Type() <<" "
      <<setw ( 6 ) << loopx->Get_Charg() <<" "
      <<setw ( 8 ) << loopx->Get_Massa() <<" "
      <<setw ( 8 ) << loopx->Get_Width() <<" "
      <<setw ( 8 ) << loopx->Get_Ctau() <<"      "
      <<setw ( 9 ) << loopx->Get_Gx().z <<" "
      <<setw ( 9 ) << loopx->Get_Gp().norma<<"     "
      <<setw ( 9 ) << loopx->X.x <<" "
      <<setw ( 9 ) << loopx->X.y <<" "
      <<setw ( 9 ) << loopx->X.z <<"   "
      <<setw ( 9 ) << loopx->path_done<<"   "
      <<setw ( 8 ) << loopx->Get_Fato() <<" "
      <<setw ( 6 ) << loopx->Get_Ifato();
      loopx = loopx->next;
    }
  Gout<<endl;
  if ( next!=0 ) next->Simple_List(); //iterate... attention
}
void Reazione::Stampa ( )

Stampa per summary delle reazioni

Definition at line 506 of file reazione.cpp.

{
//  using namespace std;
  Reazione *pts;
  pts = Reaction;
  while ( pts != 0 )
    {
      Gout<<"\n\n[Stampa_reazioni] \n  Reaction n. "<< setw ( 5 ) <<pts->id<<" [ "<<pts->header<<" ]";
      Gout<<"\n  Reaction pattern type:         "<<pts->rea_pattern;
      Gout<<"\n  Interaction parameter (slope): "<<pts->slope;
      Gout<<"\n  Tipo di reazione: "<< pts->rea_type
      <<"\n  Beam:   "<< ( pts->ubeam?"Gaussian profile by user":"Standard" );
      Gout<<"\n  Tot.rate = "
      <<setprecision ( 4 ) <<fixed
      <<setw ( 8 ) << pts->rate;
      Gout<<"\n  Prod target "
      <<setprecision ( 2 ) <<fixed
      <<setw ( 8 ) <<pts->Ctarg[0]<<" "
      <<setw ( 8 ) <<pts->Ctarg[1]<<" "
      <<setw ( 8 ) <<pts->Ctarg[2]<<" r="
      <<setw ( 8 ) << pts->rtarg<<" dz="
      <<setw ( 8 ) << pts->dztarg;

      pts->avo->Stampa_particle ( this );
      pts = pts->next;
    }

  Gout<<endl;
}

Member Data Documentation

Flag di Pileup

Definition at line 50 of file reazione.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables