FlyoDoc_2011 Pisa 2011 by GmP --- 011
|
00001 /*************************************************************************** 00002 carte.cpp - description 00003 ------------------- 00004 begin : Sat Dec 9 2000 00005 copyright : (C) 2000 by Giuseppe M Pierazzini 00006 email : pierazzini@unipi.it 00007 *************************************************************************** 00008 * * 00009 * NA48 simulation program. New version 3.02.2005 * 00010 * * 00011 ***************************************************************************/ 00012 00013 // Cp in obj 00014 #include <flyoh.h> 00015 #include <flyoana.h> 00016 #include <analisi.h> 00017 /* 00018 #define ATOLW atol(strtok(0," \n")) 00019 #define ATOFW atof(strtok(0," \n"))*/ 00020 #define NOTDEFINED -999999. 00021 00022 //using namespace std; 00023 00039 void DevGeoTipo ( string ); 00040 void ReaTipo ( string ); 00041 int AnaTipo ( string ); 00042 00043 00044 /*--------------------------------------------------------------*/ 00045 /* R e a d i n */ 00046 /*--------------------------------------------------------------*/ 00047 /* it reads in the input data cards Readin */ 00048 00049 void 00050 Legge_input_file ( const char *datin ) 00051 { 00052 // random generator inizialitialization correlato o no 00053 // Correla =0 no correlazione 00054 // Correla =1 inizializza la partenza con il numero di run 00055 // Correla =2 inizializza con num. evento e run 00056 // Correla =4 per special run K+ e K- 00057 Device *dev=Apparato; 00058 std::ifstream Card; 00059 //------------------------------- 00060 Card.open ( datin, ios::in ); 00061 if ( !Card ) 00062 { 00063 Gout<<"\n Input file NOT opened ==> "<< datin; 00064 Gout<<"\n no input files ..program stop !!! \n"<<endl; 00065 exit ( -1 ); 00066 } 00067 else 00068 Gout<<"\n Read the input_file ==> "<<datin<<endl; 00069 00070 00071 //-------------------------------- 00072 char line[156]; 00073 string stringline,label,label2; 00074 double a1,a2,a3; 00075 int ia1,ia2; 00076 00077 Card.getline ( line, 156 ); 00078 while ( !Card.eof() ) 00079 { 00080 00081 Cardcur=&Card; 00082 // decodifica 00083 stringline=line; 00084 stringstream scheda; 00085 scheda<<line; 00086 scheda>>label; 00087 if ( Dbginput==1 ) 00088 { 00089 Gout<<"\n Carte label: "<<label<<" Linea:"<<line; 00090 } 00091 00092 if ( stringline.size() <1 || 00093 label.find ( "**" ) ==0 || 00094 label.find ( "\\\\" ) ==0 || 00095 label.find ( "//" ) ==0 ) 00096 { 00097 Card.getline ( line, 156 ); 00098 continue; 00099 } //line empty or comment ...read next line 00100 00101 if ( label.find ( "end_a" ) ==0 ) break; 00102 else if ( label.find ( "done" ) ==0 ); 00103 else if ( label.find ( "stopr" ) ==0 ) 00104 { 00105 Gout<< "\n Stop by operator. "; 00106 exit ( 0 ); /* for internal debug */ 00107 } 00108 else if ( label.find ( "nota" ) ==0 ) Commenta ( datin ); //end with: done,end,fine,*/ 00109 else if ( label.find ( "note" ) ==0 ) Commenta ( datin ); 00110 else if ( label.find ( "comme" ) ==0 ) Commenta ( datin ); 00111 //-----Key words begin -------- 00112 else if ( label.find ( "corr" ) ==0 ) scheda>>Correla; 00113 else if ( label.find ( "run" ) ==0 ) 00114 { 00115 if ( evento_.Gen.Run==0 ) scheda>>evento_.Gen.Run; 00116 } 00117 else if ( label.find ( "maxev" ) ==0 ) 00118 { 00119 if ( evento_.Mxev==0 ) scheda>>evento_.Mxev; 00120 } 00121 else if ( label.find ( "labze" ) ==0 ) 00122 { 00123 if ( Lab_Zero[0]!=-999999. ) 00124 { 00125 Gout<<"\n 'labzero' card out of sequence..put at beginning!! exit..."<<endl; 00126 exit ( 0 ); 00127 } 00128 scheda>>a1>>a2>>a3; 00129 Lab_Zero.setvn ( a1,a2,a3 ); 00130 } 00131 else if ( label.find ( "fiduc" ) ==0 ) 00132 { 00133 scheda>>a1>>a2; 00134 Beg_fid=a1-Lab_Zero[2]; 00135 double aux =a2-Lab_Zero[2]; 00136 if ( aux>0. ) End_fid=aux; 00137 } 00138 else if ( label.find ( "zona" ) ==0 ) 00139 { 00140 scheda>>a1; 00141 Zona=a1-Lab_Zero[2]; 00142 if ( Zona<100. ) Zona=100000.; 00143 } 00144 else if ( label.find ( "debgl" ) ==0 ) scheda>>evento_.Debg_last; 00145 else if ( label.find ( "debgf" ) ==0 ) scheda>>evento_.Debg_first; 00146 else if ( label.find ( "ppp" ) ==0 ) scheda>>ppp; 00147 else if ( label.find ( "tburst" ) ==0 ) 00148 { 00149 scheda>>a1; 00150 TBurst->Set_Tburst ( a1 ); 00151 } 00152 else if ( label.find ( "illum" ) ==0 ) Luce=new Illumina(); // default 0 00153 else if ( label.find ( "radx" ) ==0 ) 00154 { 00155 scheda>>ia1>>ia2; 00156 Radio=new Radiografia ( ia1,ia2 ); 00157 } 00158 else if ( label.find ( "error" ) ==0 ) Errori=1; 00159 else if ( label.find ( "scatt" ) ==0 ) Scatter=1; 00160 else if ( label.find ( "perdi" ) ==0 ) Perdita=1; 00161 else if ( label.find ( "pairp" ) ==0 ) Abilita_Pair=1; 00162 else if ( label.find ( "brems" ) ==0 ) Abilita_Brems=1; 00163 else if ( label.find ( "wrtntal" ) ==0 ) WrtNt=10; 00164 else if ( label.find ( "wrtnt" ) ==0 ) WrtNt = 1; // default 0 00165 else if ( label.find ( "tracc" ) ==0 ) Wtrk = 1; // default 0 00166 // else if(strncmp(word,"verti", 5)==0) Vertice = 1; // default 0 00167 00168 /* else if ( label.find ( "pipe" ) ==0 ) 00169 { 00170 if(Pipeline>0) scheda>>Tpipe; 00171 else Tpipe=0.; 00172 } 00173 */ 00174 else if ( label.find ( "trigg" ) ==0 ) Trigger_low_on=1; 00175 else if ( label.find ( "dbginput" ) ==0 ) Dbginput = 1; 00176 else if ( label.find ( "materiali" ) ==0 ); 00177 else if ( label.find ( "data_bas" ) ==0 ); 00178 else if ( label.find ( "unseen" ) ==0 ) 00179 { 00180 string wrd; 00181 scheda>>wrd; 00182 while ( scheda.eof() ==0 ) 00183 { 00184 Matter->Notseen ( wrd.c_str() ); 00185 scheda>>wrd; 00186 } 00187 } 00188 00189 //========== 00190 else if ( label.find ( "beam" ) ==0 ) 00191 { 00192 scheda>>label2; 00193 ReaTipo (label2 ); 00194 } 00195 else if ( label.find ( "decay" ) ==0 || label.find ( "urto" ) ==0 ) 00196 { 00197 scheda>>label2; 00198 ReaTipo ( label2 ); 00199 } 00200 //=========== 00201 else if ( label.find ( "devic" ) ==0 ) 00202 { 00203 scheda>>label2; 00204 DevGeoTipo ( label2 ); 00205 } 00206 else if ( AnaTipo ( label ) ==1 ); 00207 else if ( label.find ( "include" ) ==0 ) // more data file 00208 { 00209 00210 string newfile; 00211 scheda>>newfile; 00212 if ( newfile.size() >0 ) 00213 { 00214 Gout<<"\n New input file ==> "<<newfile<<" called by " <<datin; 00215 Legge_input_file ( newfile.c_str() ); 00216 Gout<<"\n Back to file ==> "<<datin; 00217 } 00218 else 00219 { 00220 Gout<<"\n New file called by ==> "<<datin<<" not opened... Error "<<endl; 00221 exit ( -1 ); 00222 } 00223 00224 } 00225 else if ( label.find ( "pr_data" ) ==0&&Matter !=0 ) Matter->Show(); 00226 else if ( label.find ( "pr_reaz" ) ==0&&Reaction!=0 ) Reaction->Stampa(); 00227 else if ( label.find ( "pr_mate" ) ==0&&Elemento!=0 ) Elemento->Show(); 00228 else if ( label.find ( "pr_devId" ) ==0&&Apparato!=0 ) Apparato->PrgeomId(); 00229 else if ( label.find ( "pr_devic" ) ==0&&Apparato!=0 ) 00230 { 00231 dev=Apparato; 00232 Gout<<"\n\n================== Detectors block =====================\n"; 00233 while ( dev!=0 ) 00234 { 00235 dev->Prgeom(); 00236 dev=dev->next; 00237 } 00238 Gout<<"\n=========== End apparatus list ============\n \n \n"; 00239 } 00240 else Gout<<"\n Scheda errata ?? : "<<stringline<< " of size "<< stringline.size(); 00241 //---------- Key words end ---------- 00242 Card.getline ( line, 156 ); 00243 } 00244 Gout<<"\n End reading; close the file ==> "<<datin; 00245 Card.close(); 00246 } 00247 00248 00249 void Sommario_Input_Data() 00250 { 00251 //-------------------------------------------------------------------------- 00252 00253 Gout<<"\n\n *********************************************"; 00254 Gout<<"\n -- Driving Parameters S u m m a r y --"<<endl; 00255 00256 00257 if ( Apparato!=0 ) 00258 { 00259 // final summary 00260 00261 Gout<<setprecision ( 4 ); 00262 Gout<<"\n Run number = "<<evento_.Gen.Run; 00263 Gout<<"\n Max Events = "<< evento_.Mxev; 00264 Gout<<"\n Debug, first event = "<<evento_.Debg_first; 00265 Gout<<"\n Debug, last event = "<<evento_.Debg_last; 00266 Gout<<"\n Lab System bias x,y,z= "<< setw ( 9 ) <<Lab_Zero[0]<<" "<<setw ( 9 ) 00267 <<Lab_Zero[1]<<" "<<setw ( 9 ) <<Lab_Zero[2]; 00268 Gout<<"\n Max z (Zona) = "<<Zona; 00269 Gout<<"\n Beg_fid <-> End_fid = "<<Beg_fid<<" <-> "<< End_fid; 00270 Gout<<"\n Protons: ppp = "<< ppp; 00271 Gout<<"\n T Burst in sec = "<< TBurst->Get_Tburst() *1.e-9; 00272 Gout<<"\n Production ppp/ns = "<< ppp/TBurst->Get_Tburst() 00273 << " with Tau "<<TBurst->Get_Tburst() /ppp; 00274 00275 Gout<<"\n----\n"; 00276 Gout<<"\n Random. Correlated = "<< 00277 ( Correla?Correla-1?Correla-3?Correla-4?"Run+CP":"K+K-":"Run+Ev":"Run":"no" ); 00278 Gout<<"\n Dbginput status = "<< ( Dbginput?"si":"no" ); 00279 Gout<<"\n Error smearing = "<< ( Errori?"si":"no" ); 00280 Gout<<"\n PairProduction = "<< ( Abilita_Pair?"si":"no" ); 00281 Gout<<"\n Bremsstrhalung = "<< ( Abilita_Brems?"si":"no" ); 00282 Gout<<"\n Multiple Scattering = "<< ( Scatter?"si":"no" ); 00283 Gout<<"\n Energy loss = "<< ( Perdita?"si":"no" ); 00284 Gout<<"\n----\n"; 00285 00286 Gout<<"\n Trigger low level = "<< ( Trigger_low_on?" on ":"no" ); 00287 Gout<<"\n Pipeline status = "<< ( Pipeline?" on ":"off" ); 00288 if ( Pipeline==1 ) Gout<<"\n Pipeline max time window = "<<Tpipe<< " ns"; 00289 Gout<<"\n Write dati (WrtN) = "<< ( WrtNt?"si":"no" ) <<" "<<WrtNt; 00290 Gout<<"\n Write data_out = "<< ( WrtNt?WrtNt-10?"good":"All":"no" ) <<" "<<WrtNt; 00291 00292 Gout<<"\n Write data out type = "<<Wrtype<<" "<<Wrt_type_out; 00293 Gout<<"\n Illumina end coord. = "<< ( Luce?"si":"no" ); 00294 Gout<<"\n Write radx picture = "<< ( Radio?"si":"no" ); 00295 if ( Radio!=0 ) 00296 Gout<<" - Rivelatori tra "<<Radio->primo_dev<<" e "<<Radio->ultimo_dev; 00297 Gout<<"\n Write tracks out = "<< ( Wtrk?"si":"no" ); 00298 00299 00300 Gout<<"\n----\n"; 00301 Gout<<"\n Fit User defined = "<< ( Ausr?"si":"no" ) <<" "<<Ausr; 00302 Gout<<"\n Fit K->2pi0->4gam = "<< ( K4g?"si":"no" ) <<" "<<K4g; 00303 Gout<<"\n Fit K->3pi0->6gam = "<< ( K6g?"si":"no" ) <<" "<<K6g; 00304 Gout<<"\n Fit K->2pi = "<< ( K2p?"si":"no" ) <<" "<<K2p; 00305 Gout<<"\n Fit K->3pi = "<< ( K3p?"si":"no" ) <<" "<<K3p; 00306 Gout<<"\n Fit K->2pi0 2gam = "<< ( K2p2g?"si":"no" ) <<" "<<K2p2g<< " to be coded... "; 00307 Gout<<"\n Fit K->pi l nu = "<< ( K3l?"si":"no" ) <<" "<<K3l; 00308 Gout<<"\n Fit K->pi A(pi+pi-) = "<< ( Ka2pi?"si":"no" ) <<" "<<Ka2pi; 00309 Gout<<"\n Fit Pi0->2gam = "<< ( Pi2g?"si":"no" ) <<" "<<Pi2g; 00310 Gout<<"\n Fit Eta->2gam = "<< ( E2g?"si":"no" ) <<" "<<E2g; 00311 Gout<<"\n Fit Eta->3pi0->6gam = "<< ( E6g?"si":"no" ) <<" "<<E6g; 00312 Gout<<"\n Fit K->l nu = "<< ( Kl2?"si":"no" ) <<" "<<Kl2; 00313 Gout<<"\n Fit K->e v g = "<< ( Ke2g?"si":"no" ) <<" "<<Ke2g; 00314 Gout<<"\n Fit K->pic g g = "<< ( Kpc2g?"si":"no" ) <<" "<<Kpc2g<< " to be coded... "; 00315 Gout<<"\n Fit K->pic pi0 = "<< ( Kpcpi0?"si":"no" ) <<" "<<Kpcpi0; 00316 Gout<<"\n Fit K->pic pi0 pi0 = "<< ( Kpc2p0?"si":"no" ) <<" "<<Kpc2p0; 00317 Gout<<"\n Fit K->pi0 pi0 e nu = "<< ( K2p0enu?"si":"no" ) <<" "<<K2p0enu; 00318 Gout<<"\n Fit K->p- pi+ e nu = "<< ( K2pcenu?"si":"no" ) <<" "<<K2pcenu; 00319 Gout<<"\n Fit K->pic 3 g = "<< ( Kpc3g?"si":"no" ) <<" "<<Kpc3g<< " to be coded... "; 00320 Gout<<"\n Fit K->pic nu nu = "<< ( Kpivv?"si":"no" ) <<" "<<Kpivv; 00321 Gout<<"\n Fit K->mu nu = "<< ( Kmunu?"si":"no" ) <<" "<<Kmunu; 00322 Gout<<"\n Fit K->pip pi0 = "<< ( Kpip0?"si":"no" ) <<" "<<Kpip0; 00323 Gout<<"\n Fit K->pip pi0ee = "<< ( Kpip0ee?"si":"no" ) <<" "<<Kpip0; 00324 00325 Gout<<"\n Fit K->pi0 nu nu = "<< ( Kpovv?"si":"no" ) <<" "<<Kpovv; 00326 Gout<<"\n Fit K->e nu g = "<< ( Kevg?"si":"no" ) <<" "<<Kevg<< " to be coded... "; 00327 Gout<<"\n Fit K->mu nu g = "<< ( Kmvg?"si":"no" ) <<" "<<Kmvg<< " to be coded... "<<endl; 00328 // 00329 00330 Gout<<"\n\n ************ End parameter list ***********\n\n"; 00331 00332 } 00333 00334 } 00335 //============================================================= 00336 //---------------- D e v G e o T i p o ----------------------- 00337 void DevGeoTipo ( string geometria ) 00338 { 00339 00340 /********************** vedi Device.h 00341 Scelta della classe che descrive il rivelatore 00342 00343 Control word in epc shape class device Type 00344 (first 5 characters)done 00345 no no Device 0 00346 rettangolo parallelepipedo DevRt 1 00347 rettrett parall. con buco rett. DevRtRt 2 00348 cilindro cilindro DevCln 3 00349 rettcili parall. con buco cili. DevRtCl 4 00350 cilirett cilin. con buco rett. DevClRt 5 00351 corona corona cilindrica DevCrn 6 00352 ottagono ottagonale DevOt 7 00353 ottagono ott.con buco ottag. DevOtOt 8 00354 ottagono ott. con buco cil. DevOtCl 9 00355 cilindro cilind. con buco ott. DevClOt 10 00356 00357 00358 magnete magnete DevMagn 20 00359 quadrupolo quadrupolo magnetico DevQuad 21 00360 magnete Mag.con buco per filtro DevFlt 22 00361 fluka Dec.Reg. shape-beam-gas DevFluka 23 00362 00363 chamber Mwire Chamber DevMwc 50 00364 lkr48 calorimetro(Na48) DevLkr 51 00365 chod hodoscopio (NA62) DevChod 52 00366 hac48 Adron.calor(NA48) DevHac 53 00367 ytax acromat collimator DevYTax 54 00368 xtax acromat collimator DevXTax 55 00369 bluetube Blu tube DevBlue 57 00370 00371 software no shape DevTrk 100 00372 basedev Rivelatore di base DevBase 500 00373 **********************/ 00374 00375 Device *dev=0; 00376 if ( geometria.size() == 0 ) 00377 { 00378 Gout<<"\n Device geometry error !!! \n"<<endl; 00379 exit ( 0 ); 00380 } 00381 00382 // definizione dello zero (bias) del sistema del lab. Tutti i rivelatori sono 00383 // spostati di conseguenza.. 00384 if ( Lab_Zero[0]==NOTDEFINED ) 00385 { 00386 Gout<<"\n \n *** System lab origin NOT defined.. forced to zero!!!"; 00387 Lab_Zero.setvn ( 0.,0.,0. ); 00388 } 00389 00390 // choice of device geom 00391 00392 if ( geometria.find ( "cedar" ) ==0 ) dev= new DevCedar; 00393 else if ( geometria.find ( "chamb" ) ==0 ) dev= new DevMwc; //==CiliCili 00394 else if ( geometria.find ( "chanti") ==0 ) dev= new DevChanti; 00395 else if ( geometria.find ( "chod" ) ==0 ) dev= new DevChod; 00396 else if ( geometria.find ( "cilin" ) ==0 ) dev= new DevCln; //==Cilindrico 00397 else if ( geometria.find ( "cilir" ) ==0 ) dev= new DevClRt; 00398 else if ( geometria.find ( "cilot" ) ==0 ) dev= new DevClOt;//==Cili_otto 00399 else if ( geometria.find ( "coron" ) ==0 ) dev= new DevCrn; //==CiliCili 00400 else if ( geometria.find ( "fluka" ) ==0 ) dev= new DevFluka; 00401 else if ( geometria.find ( "gigat" ) ==0 ) dev= new DevGtk; 00402 else if ( geometria.find ( "hac48" ) ==0 ) dev= new DevHac; 00403 else if ( geometria.find ( "hod48" ) ==0 ) dev= new DevChod; 00404 else if ( geometria.find ( "irc" ) ==0 ) dev= new DevIrc; 00405 else if ( geometria.find ( "lav" ) ==0 ) dev= new DevLav; 00406 else if ( geometria.find ( "lkr48" ) ==0 ) dev= new DevLkr; 00407 else if ( geometria.find ( "lkr62" ) ==0 ) dev= new DevLkr; 00408 else if ( geometria.find ( "lveto" ) ==0 ) dev= new DevLav; 00409 else if ( geometria.find ( "magne" ) ==0 ) dev= new DevMagn; 00410 else if ( geometria.find ( "muflt" ) ==0 ) dev= new DevFlt; 00411 else if ( geometria.find ( "muveto") ==0 ) dev= new DevMuv; 00412 else if ( geometria.find ( "ottag" ) ==0 ) dev= new DevOt; //==Ottagonale 00413 else if ( geometria.find ( "ottci" ) ==0 ) dev= new DevOtCl; //==Ottag_cil 00414 else if ( geometria.find ( "ottot" ) ==0 ) dev= new DevOtOt; //==Ottag_otta 00415 else if ( geometria.find ( "quadr" ) ==0 ) dev= new DevQuad; 00416 else if ( geometria.find ( "retre" ) ==0 ) dev= new DevRtRt; //==Ret_ret 00417 else if ( geometria.find ( "retta" ) ==0 ) dev= new DevRt; //==Rettangolare 00418 else if ( geometria.find ( "rettc" ) ==0 ) dev= new DevRtCl; //==Rett_cil 00419 else if ( geometria.find ( "rette" ) ==0 ) dev= new DevRt; //==Rettangolare 00420 else if ( geometria.find ( "rettr" ) ==0 ) dev= new DevRtRt; //==Ret_ret 00421 else if ( geometria.find ( "rich" ) ==0 ) dev= new DevRich; 00422 else if ( geometria.find ( "sac" ) ==0 ) dev= new DevSac; 00423 else if ( geometria.find ( "settor") ==0 ) dev= new DevSector; 00424 else if ( geometria.find ( "sfera" ) ==0 ) dev= new DevSfera; 00425 else if ( geometria.find ( "straw" ) ==0 ) dev= new DevStraw; 00426 else if ( geometria.find ( "sveto" ) ==0 ) dev= new DevSveto; 00427 else if ( geometria.find ( "xtax" ) ==0 ) dev= new DevXTax; 00428 else if ( geometria.find ( "ytax" ) ==0 ) dev= new DevYTax; 00429 00430 else 00431 { 00432 Gout<<"\n Device => geom wrong!!! "<<geometria; 00433 exit ( 0 ); 00434 } 00435 //Gout<<endl; 00436 } 00437 //============================================================== 00438 //--------------------- R e a T i p o ------------------------ 00439 void ReaTipo ( string label ) 00440 { 00441 Reazione *rea=0; 00442 const char *part; 00443 00444 if ( label.size() == 0 ) 00445 { 00446 Gout<<"\n Decay error !!! \n"<<endl; 00447 } 00448 part= Matter->Ptbsdat ( label.c_str() ); 00449 00450 00451 // choice of reaction type 00452 if ( part==Kapl ) rea=new ReaKld ( ); 00453 else if ( part==Kaps ) rea=new ReaKsd ( ); 00454 else if ( part==Kap0 ) rea=new ReaK0d ( ); 00455 else if ( part==Kapm ) rea=new ReaKmd ( ); 00456 else if ( part==Kapp ) rea=new ReaKpd ( ); 00457 else if ( part==Pim ) rea=new Reapmd ( ); 00458 else if ( part==Pip ) rea=new Reappd ( ); 00459 else if ( part==Mum ) rea=new Reamumd ( ); 00460 else if ( part==Mup ) rea=new Reamupd ( ); 00461 else if ( part==Eta ) rea=new ReaEtad ( ); 00462 else if ( part==Elec ) rea=new ReaEleb ( ); 00463 else if ( part==Elep ) rea=new ReaEleb ( ); 00464 else if ( part==Protone ) rea=new ReaPb ( ); 00465 else if ( part==Gam ) rea=new ReaGam ( ); 00466 else if ( part==Lambda ) rea=new ReaLambda ( ); 00467 else if ( label.find ( "csi" ) ==0 ) rea=new ReaCsid ( ); 00468 else if ( label.find ( "pi0d" ) ==0 ) rea=new ReaPi0d ( ); 00469 else 00470 { 00471 Gout<<"\n Decay wrong starting label!!! "<< label<<" \n"<<endl; 00472 exit ( 0 ); 00473 } 00474 00475 } 00476 //=========================================================== 00477 //---------------- A n a T i p o ---------------------------- 00478 00479 int AnaTipo ( string ipotesi ) 00480 { 00481 // fits 00482 //int K4g,K6g,K2p,K3p,K3l,Ka2pi,Pi2g,E2g,E6g,K2p2g,Bea; 00483 //int Kenu,Kpc2g,Kpcp0,Kpcp0g,Kpc2p0,K2p0enu,K2pcenu,Kpc3g; 00484 if ( ipotesi == "fascio") Bea=1; 00485 else if ( ipotesi == "user") Ausr=1; 00486 else if ( ipotesi == "k4g") K4g=1; 00487 else if ( ipotesi == "k6g") K6g=1; 00488 else if ( ipotesi == "kppgg") K2p2g=1; 00489 else if ( ipotesi == "k2p") K2p=1; 00490 else if ( ipotesi == "k3p") K3p=1; 00491 else if ( ipotesi == "k3l") K3l=1; 00492 else if ( ipotesi == "ka2pi") Ka2pi=1; 00493 else if ( ipotesi == "pi2g") Pi2g=1; 00494 else if ( ipotesi == "e2g") E2g=1; 00495 else if ( ipotesi == "e6g") E6g=1; 00496 else if ( ipotesi == "kl2") Kl2=1; 00497 else if ( ipotesi == "ke2g") Ke2g=1; 00498 else if ( ipotesi == "kpc2g") Kpc2g=1; 00499 else if ( ipotesi == "kpcpi0") Kpcpi0=1; 00500 else if ( ipotesi == "kpc2p0") Kpc2p0=1; 00501 else if ( ipotesi == "kppcenu") K2p0enu=1; 00502 else if ( ipotesi == "kpp0enu") K2pcenu=1; 00503 else if ( ipotesi == "kpivv") Kpivv=1; 00504 else if ( ipotesi == "kmunu") Kmunu=1; 00505 00506 00507 else if ( ipotesi == "kpip0") Kpip0=1; 00508 else if ( ipotesi == "kpip0ee") Kpip0ee=1; 00509 00510 else if ( ipotesi == "klambda") Klambda=1; 00511 00512 else if ( ipotesi == "kpovv") Kpovv=1; 00513 else if ( ipotesi == "kevg") Kevg=1; 00514 else if ( ipotesi == "kpievg") Kpievg=1; 00515 else if ( ipotesi == "kmvg") Kmvg=1; 00516 else return 0; 00517 return 1; 00518 } 00519 00520 //====================== 00521 00522 void Commenta ( const char *datin ) 00523 { 00524 char line[80]; 00525 string logistica; 00526 Cardcur->getline ( line, 80 ); 00527 Gout<<"\n\n || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" ; 00528 Gout<<"\n || ---- U S E R N O T E / Promemoria ----"; 00529 Gout<<"\n || from file: "<<datin ; 00530 while ( !Cardcur->eof() ) 00531 { 00532 Gout<<"\n |> "; 00533 Gout<<line; 00534 logistica=line; 00535 if ( logistica.size() !=0 ) 00536 { 00537 if ( logistica.find ( "done" ) == 0 ) break; 00538 if ( logistica.find ( "end" ) == 0 ) break; 00539 if ( logistica.find ( "fine" ) == 0 ) break; 00540 if ( logistica.find ( "stop" ) == 0 ) break; 00541 if ( logistica.find ( "*/" ) == 0 ) break; 00542 } 00543 Cardcur->getline ( line, 80 ); 00544 } 00545 Gout<<"\n || ---- User Note / Promemoria E N D ---- "; 00546 Gout<<"\n || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n" ; 00547 00548 } 00549