FlyoDoc_2011 Pisa 2011 by GmP --- 011
|
00001 /*************************************************************************** 00002 particella.h - description 00003 ------------------- 00004 begin : Sun Nov 26 2000 00005 copyright : (C) 2000 by Giuseppe m Pierazzini 00006 email : pierazzini@unipi.it 00007 *************************************************************************** 00008 * * 00009 * NA48 titles for simulation program. * 00010 * * 00011 ***************************************************************************/ 00012 // Pisa 28.10.99 00013 //------------------------------------------------------------ 00014 // classe P a r t i c e l l a 00015 00016 #ifndef PARTICELLA_H 00017 #define PARTICELLA_H 00018 00019 class Reazione; 00020 class Part_db; 00021 class Device; 00022 00028 class Particella 00029 { 00030 friend class Device; 00031 friend class DevStraw; 00032 friend class Part_db; 00033 friend class Bufdev; 00034 friend class Reagas; 00035 friend class Illumina; 00036 // inserire altri nomi se necessario.... 00037 00038 protected: 00039 const char *nome; //nome della particella 00040 const char *fato; // fato di end fly 00041 const char *type; // Beam,carico,beam...... 00042 unsigned long long devstory; // 64 bit code to memorize hit devices...see scrivi colpi 00043 int devhit; // l'ultimo device colpito 00044 int ido; // indice progressivo della particella nella reaz. 00045 int id; // indice logico --attenzione Vedi Set_Id() per la corretta definizione... 00046 int idm; // indice della part. nel database part_db 00047 int see; // visibilita' nei rivelatori 00048 int nata; // indice di nascita...non zero se generata nell'evento. 00049 int Ifato; // integer fato flag Vedi Fato sopra. 00050 00051 00052 int Pair_Production,Brems_Production; // =1 puo' fare pair o brems.. = 2 ha fatto.... 00053 double charg,massa,width,ctau; // parametri fisici 00054 gvet Gx ; // vett. pos. inziale 00055 qvet Gp ; // quadrivettore iniziale 00056 qvet Pbar; // quadrivettore 00057 qvet Pburst; // quadrivettore 00058 qvet Qpatre; // quadrivettore del padre generatore 00059 00060 double tmp; // tempo di produzione 00061 00062 double prandom;// to restore the link and parametrs... in reset..... 00063 Part_db *pointer_db; 00064 // puntatori alle particelle di : sinistra,destra,sopra,sotto, urto 00065 Particella *lfsav,*rgsav,*upsav,*dwsav; 00066 00067 public: 00068 // int Irdm_count,Gauss_count,Irdm_last_count,Gauss_last_count; 00069 Reazione *rea_madre; 00070 gvet X, Vers; 00071 qvet P; 00072 double cstar,fistar; // costet e fi rispetto alla line di volo del padre .... 00073 double pathok,path_max,path_done,last_path; //tracing parameters.... 00085 00086 00087 Particella *lf, *rg, *up, *dw,*cls, *next; 00088 Particella (); 00089 00090 virtual ~Particella () {}; 00091 // Procedure 00092 const char *Get_Nome() { 00093 return nome; 00094 } 00095 const char *Get_Fato() { 00096 return fato; 00097 } 00098 const char *Get_Type() { 00099 return type; 00100 } 00101 int Last_Devhit() { 00102 return devhit; 00103 } 00104 int Get_Ifato() { 00105 return Ifato; 00106 } 00107 unsigned long long Get_DevStory() { 00108 return devstory; 00109 }; 00110 00111 int Get_Idm() { 00112 return idm; 00113 } 00114 int Get_Id() { 00115 return id; 00116 } 00117 int Get_Ido() { 00118 return ido; 00119 } 00120 int Get_See() { 00121 return see; 00122 } 00123 int Get_Nata() { 00124 return nata; 00125 } 00126 double Get_Massa() { 00127 return massa; 00128 } 00129 double Get_Massq() { 00130 return P.mq; 00131 } 00132 double Get_Width() { 00133 return width; 00134 } 00135 double Get_Ctau() { 00136 return ctau; 00137 } 00138 double Get_Charg() { 00139 return charg; 00140 } 00141 gvet & Get_Gx() { 00142 return Gx; 00143 } 00144 qvet & Get_Gp() { 00145 return Gp; 00146 }; 00147 double Get_Gpx() { 00148 return Gp[0]; 00149 } 00150 double Get_Gpy() { 00151 return Gp[1]; 00152 } 00153 double Get_Gpz() { 00154 return Gp[2]; 00155 } 00156 double Get_Gpn() { 00157 return Gp.norma; 00158 } 00159 void Set_Id(); 00160 void Set_Type(const char *tip) { 00161 type=tip; 00162 }; 00163 // void Set_undef (){fato = Undef; Ifato=0;}; 00164 00165 void Set_Nata() { 00166 nata=1; 00167 } 00168 void Set_Fato ( const char *w,int ift ) { 00169 fato=w; 00170 Ifato=ift; 00171 } 00172 void Set_Massa ( double m ) { 00173 massa=m; 00174 } 00175 void Set_Pbar() { 00176 Pbar=P; 00177 } 00178 void Save_Link(); 00179 void Restore_Link(); 00180 void Update_Devstory(int ); 00181 void P2Gp() { 00182 Gp=P; 00183 } 00184 void X2Gx() { 00185 Gx=X; 00186 } 00187 void Move ( double ); 00188 void Debug_out (); 00189 void Spia ( char *, Device *,Device *,int,int ); 00190 void Reset_Stato(); 00191 void Stampa_questa_particella(); 00192 void Stampa_particle ( Reazione * ); 00193 00194 Particella * Decay_in_2( const char *,const char * ); 00195 Particella * Decay_in_3( const char *,const char*,const char *); 00196 Particella * Decay_in_4( const char *,const char*,const char *,const char *); 00197 Particella * Decay_in_5( const char *,const char*,const char *,const char *,const char *); 00198 void Aggiorna_link ( Particella *, Particella *, Particella *, 00199 Particella * ); 00200 void Aggiorna_link_Bullet ( Particella *); 00201 void Aggiusta_link ( Particella *, Particella *, Particella *, 00202 Particella * ); 00203 00204 virtual void DecParm() {}; //parametri massa e angoli di decadimento: 00205 virtual void DecParm_Pair() {}; 00206 virtual void DecParm_Brems() {}; 00207 virtual double Get_Ecut() { 00208 return 1.0; 00209 }; // dummy per PartBrem; 00210 virtual int Get_Brems ( Device *,double &,double & ) { 00211 return 0; 00212 }; 00213 // virtual double Get_Brems() {return 0.0;} 00214 virtual void Get_Pair ( Device *,double &,double & ) {}; 00215 00216 // virtual bersaglio 00217 virtual void Get_Bersaglio ( Device *, double ) {}; 00218 00219 00220 00221 virtual int Svalues() { 00222 return 0; 00223 }; 00224 virtual double Get_e1() { 00225 return 0.0; 00226 }; 00227 virtual double Get_e2() { 00228 return 0.0; 00229 }; 00230 virtual double Get_e3() { 00231 return 0.0; 00232 }; 00233 virtual double Get_S1() { 00234 return 0.0; 00235 }; 00236 virtual double Get_S2() { 00237 return 0.0; 00238 }; 00239 virtual double Get_S3() { 00240 return 0.0; 00241 }; 00242 virtual int Get_ss_done() { 00243 return -1; 00244 }; 00245 00246 int Main_Loop(); 00247 void MkCluster(); 00248 00249 void Make_decay_chain (); 00250 int Voldec ( Particella *, Particella * ); 00251 int Trasport (); 00252 Particella *Get_Pointer ( char * ); 00253 Particella *Ptr_Particle ( const char * ); 00254 00255 }; 00256 00257 #if defined(MAIN) 00258 // Particle flags . 00259 const char *Undef = "undef", *Lost = "lost",*Nata="nata"; 00260 const char *Decay= "decay",*Decfar="decfar",*Gasint="gasint"; 00261 const char *Bucin= "bucin",*Inbuc="inbuc"; 00262 const char *Distr= "distr"; 00263 const char *Novede = "Unseen"; 00264 #endif 00265 00266 #if !defined(MAIN) 00267 // Particle flags . 00268 extern const char *Undef, *Lost,*Nata,*Decay,*Decfar,*Gasint; 00269 extern const char *Bucin,*Inbuc; 00270 extern const char *Distr; 00271 extern const char *Novede; 00272 #endif 00273 00274 #if defined(MAIN) 00275 int Partflag; 00276 const char *Partname; 00277 #endif 00278 #if !defined(MAIN) 00279 extern int Partflag; 00280 extern const char *Partname; 00281 #endif 00282 00283 00284 00285 00286 00287 00288 00289 00290 00291 #endif 00292