// ------------------------------------------------------------------------- // ----- HypStatDecay source file ----- // ----- Created 10/06/08 by A. Sanchez ----- // ------------------------------------------------------------------------- #include #include "TClonesArray.h" #include "TFile.h" #include "TLorentzVector.h" #include "TTree.h" //#include "TRandom.h" #include "TVector3.h" //#include "THParticle.h" #include "HypStatDecay.h" using namespace std; #include "cfortran.h" extern "C" { extern struct { int n, AG[1000], ZG[1000], HG[1000]; float PXs[1000], PYs[1000], PZs[1000], EP[1000],GM[1000] ; } frag_; } extern "C" void initia_(double* she, int* an, int* zn, int* hn);//install DPM extern "C" void razhyp_gen__(double* shell ); //to generate events // ----- Default constructor ------------------------------------------ HypStatDecay::HypStatDecay() { iEvent = fev = 0; //fMass = 0.; fNtr =0; fMom.SetXYZ(0.,0.,0.); //fInputFile = NULL; //fInputTree = NULL; //fFrag = NULL; } // ------------------------------------------------------------------------ // ----- Standard constructor ----------------------------------------- HypStatDecay::HypStatDecay(const Char_t* fileName) { iEvent = fev =0; //fMass = 0.; fNtr =0; fMom.SetXYZ(0.,0.,0.); fFileName = fileName; // fInputFile = new TFile(fFileName); // fInputTree = (TTree*) fInputFile->Get("data"); // fParticles = new TClonesArray("THParticle",100); // fInputTree->SetBranchAddress("Particles", &fParticles); she= 3.; if(strcmp(fFileName,"12C")==0){ std::cout<<" 12C + Xi- --> 13BLL "< 14BLL "< 11BeLL "< 12BeLL "< 10LiLL "<0.){ //gamma emission //----photon emitted from excited hypfragment tvL.SetXYZ(frag_.PXs[i],frag_.PYs[i],frag_.PZs[i]); v = GetPgCMSLab((frag_.GM[i])*1000,frag_.EP[i],tvL,r); fPx.push_back(v.Px()/1000); fPy.push_back(v.Py()/1000); fPz.push_back(v.Pz()/1000); fMass.push_back(0.); fPid.push_back(22); //cout<<" pid 22 "<0&&frag_.ZG[i]>0&&frag_.AG[i]>0)|| // (frag_.HG[i]==0 &&(frag_.ZG[i]>1)&&frag_.AG[i]>1)) fPid.push_back(1000000000+10000000*frag_.HG[i]+10000* frag_.ZG[i] +10 * frag_.AG[i]); //cout<<" pid frag22 "<0 &&frag_.ZG[i]>0&&frag_.AG[i]>0) { fPid.push_back(1000000000+10000000*frag_.HG[i]+10000* frag_.ZG[i] +10 * frag_.AG[i]); } if(frag_.HG[i]==0 &&frag_.ZG[i]>0&&frag_.AG[i]>0){ if(frag_.ZG[i]==1&&frag_.AG[i]==1)fPid.push_back(2212);//proton else fPid.push_back(1000000000+10000000*frag_.HG[i]+10000* frag_.ZG[i] +10 * frag_.AG[i]); } if(frag_.HG[i]==0&&frag_.ZG[i]==0&&frag_.AG[i]==1) { fPid.push_back(2112);//neutron } // if(frag_.HG[i]==0&&frag_.ZG[i]==1&&frag_.AG[i]==1){ // fPid.push_back(2212);//proton // } if(frag_.HG[i]==1&&frag_.ZG[i]==0&&frag_.AG[i]==1) { fPid.push_back(3122);//lambda } //cout<<"pid fra "<1000000000&&(ion<1010000000)) { ion -= 1000000000; ZI = ion/10000; ion -= 10000*ZI; AI = ion/10; L = 0; cout<<" ion charge "<1010000000||ion>1020000000)) { ion -= 1000000000; L = ion/10000000; ion -= 10000000*L; ZI = ion/10000; ion -= 10000*ZI; AI = ion/10; cout<Uniform(cos(0.* TMath::DegToRad()),cos(180.* TMath::DegToRad()))); //phi = r->Uniform(0,360) * TMath::DegToRad(); /* Xgam = Pgam*TMath::Sin(theta)*TMath::Cos(phi); Ygam = Pgam*TMath::Sin(theta)*TMath::Sin(phi); Zgam = Pgam*TMath::Cos(theta); */ //cout<<"pgamCM "<Close(); // delete fInputFile; // } // fInputFile = NULL; } // ------------------------------------------------------------------------ ClassImp(HypStatDecay)