#include "THBTprocessor.h" /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ //_____________________________________________________________________________ /////////////////////////////////////////////////////////////////////////////// // // // class THBTprocessor // // // // Wrapper class to HBT processor fortran code. // // For more information see AliGenHBTprocessor class // // HBT processor is written by Lanny Ray // // // // Comunication is done via COMMON BLOCKS declared in HBTprocCOMMON.h // // using cfortran.h routines // // User should use class AliGenHBTprocessor and all their interface // // see there for more description // // // // Wrapper class written by // // Piotr Krzysztof Skowronski (Piotr.Skowronski@cern.ch) // // // /////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include "HBTprocCOMMON.h" #ifndef WIN32 # define hbtprocessor hbtprocessor_ # define ctest ctest_ # define type_of_call #else # define hbtprocessor HBTPROCESSOR # define ctest CTEST # define type_of_call _stdcall #endif using std::cout; using std::endl; ClassImp(THBTprocessor) extern "C" void type_of_call hbtprocessor(); extern "C" void type_of_call ctest(); /*************************************************/ THBTprocessor::THBTprocessor()// it is better not to intialize it:TGenerator("THBTprocessor","THBTprocessor") //because it allocates memmory for TObjArray::fParticles which is not used in our case //and we are using TClonesArray in import paerticles { //constructor PARAMETERS.ALICE = 1; //flag that we are working in AliRoot (0==STAR stand alone mode) PARAMETERS.pi = TMath::Pi();//3.141592654; PARAMETERS.rad = 180.0/TMath::Pi(); PARAMETERS.hbc = 0.19732891; fParticles = 0; Initialize(); //Enforce initialization (cleaning all commons) } /*****************************************************************************************/ #if ROOT_VERSION_CODE <= ROOT_VERSION(5,11,2) void THBTprocessor::GenerateEvent() const #else void THBTprocessor::GenerateEvent() #endif { //Starts processing Info("GenerateEvent","Entering Fortran"); ctest(); hbtprocessor(); Info("GenerateEvent","Exited Fortran"); if(PARAMETERS.errorcode) { TString message("HBT Processor (fortran part) finished with errors\n"); message+="Error code is "; message+=PARAMETERS.errorcode; message+="\n"; message+="See hbt_simulation.out file for more detailed information."; Fatal("GenerateEvent","%s",message.Data()); } else Info("GenerateEvent","GOOD ! HBT Processor finished without errors"); } /*****************************************************************************************/ void THBTprocessor::Initialize() const { //IT RESETS ALL THE PREVIOUS SETTINGS //Call this method to set default values in PARAMETERS & MESH //and zero other common block if(gDebug) Info("Initialize","Setting Default valuses in all COMMON BLOCKS"); PARAMETERS.ref_control = 2; PARAMETERS.switch_1d = 3; PARAMETERS.switch_3d = 1; PARAMETERS.switch_type = 3; PARAMETERS.switch_coherence = 0; PARAMETERS.switch_coulomb = 3; PARAMETERS.switch_fermi_bose= 1; PARAMETERS.trk_accep = 1.0; PARAMETERS.print_full = 1; PARAMETERS.print_sector_data= 1; PARAMETERS.n_pid_types = 2; PARAMETERS.pid[0] = 8; PARAMETERS.pid[1] = 9; PARAMETERS.deltap = 0.1; PARAMETERS.maxit = 50; PARAMETERS.delchi = 1.0; PARAMETERS.irand = 76564; PARAMETERS.lambda = 0.6; PARAMETERS.R_1d = 7.0; PARAMETERS.Rside = 6.0; PARAMETERS.Rout = 7.0; PARAMETERS.Rlong = 4.0; PARAMETERS.Rperp = 6.0; PARAMETERS.Rparallel = 4.0; PARAMETERS.R0 = 4.0; PARAMETERS.Q0 = 9.0; PARAMETERS.n_part_1_trk = 0; PARAMETERS.n_part_2_trk = 0; PARAMETERS.n_part_tot_trk = 0; PARAMETERS.n_part_used_1_trk = 0; PARAMETERS.n_part_used_2_trk = 0; PARAMETERS.n_part_1_trk2 = 0; PARAMETERS.n_part_2_trk2 = 0; PARAMETERS.n_part_tot_trk2 = 0; PARAMETERS.n_part_used_1_trk2 = 0; PARAMETERS.n_part_used_2_trk2 = 0; PARAMETERS.n_part_used_1_ref = 0; PARAMETERS.n_part_used_2_ref = 0; PARAMETERS.n_part_used_1_inc = 0; PARAMETERS.n_part_used_2_inc = 0; PARAMETERS.num_pairs_like = 0; PARAMETERS.num_pairs_unlike = 0; PARAMETERS.num_pairs_like_ref = 0; PARAMETERS.num_pairs_like_inc = 0; PARAMETERS.num_pairs_unlike_inc = 0; PARAMETERS.event_line_counter = 0; PARAMETERS.file10_line_counter = 0; PARAMETERS.chisq_wt_like_1d = 1.0; PARAMETERS.chisq_wt_unlike_1d = 1.0; PARAMETERS.chisq_wt_like_3d_fine = 1.0; PARAMETERS.chisq_wt_unlike_3d_fine = 1.0; PARAMETERS.chisq_wt_like_3d_coarse = 1.0; PARAMETERS.chisq_wt_unlike_3d_coarse= 1.0; PARAMETERS.chisq_wt_hist1_1 = 1.0; PARAMETERS.chisq_wt_hist1_2 = 1.0; // /////internal comment 25 fields /*********************************************/ MESH.n_pt_bins = 50; //OK MESH.pt_min = 0.1; //Pt in GeV/c //OK MESH.pt_max = 0.98; //Pt in GeV/c MESH.n_phi_bins = 50; //OK MESH.phi_min = 0.0; //OK MESH.phi_max = 360.0; //OK MESH.n_eta_bins = 50; //OK MESH.eta_min =-1.5; //OK MESH.eta_max = 1.5; //OK MESH.n_1d_fine = 10; //OK MESH.binsize_1d_fine = 0.01; //ok MESH.n_1d_coarse = 2; //O MESH.binsize_1d_coarse= 0.05; //ok MESH.n_3d_fine = 8; //OK MESH.binsize_3d_fine = 0.01; //ok MESH.n_3d_coarse = 2; //OK MESH.binsize_3d_coarse= 0.08; //ok MESH.n_3d_fine_project= 3; //OK MESH.n_px_bins = 20; //OK MESH.px_min =-1.0; //OK MESH.px_max = 1.0; //OK MESH.n_py_bins = 20; //OK MESH.py_min =-1.0; //OK MESH.py_max = 1.0; //OK MESH.n_pz_bins = 70; //OK MESH.pz_min =-3.6; //OK MESH.pz_max = 3.6; //OK /*********************************************/ Int_t i; //loop variable for (i =0; iClear(); for (Int_t i=0; i < TRK_MAXLEN; i++) { if (TRACK1.trk_E[i] == 0.) continue; Float_t px = TRACK1.trk_px[i]; Float_t py = TRACK1.trk_py[i]; Float_t pz = TRACK1.trk_pz[i]; // Float_t pE = TRACK.trk_E[i]; Float_t mass = PARTICLE.part_mass[TRACK1.trk_ge_pid[i]]; TParticle * p =new TParticle(0,0,0,0,0,0,px,py,pz, TMath::Sqrt(mass*mass+px*px+py*py+pz*pz), 0,0,0,0); fParticles->Add(p); } return fParticles; } /*****************************************************************************************/ void THBTprocessor::PrintEvent() const { //Prints all particles (common block data) cout<<"Print Event"<