#include "PamVMCNDDig.h" #include #include #define DEBUG 0 using TMath::Log; using TMath::Exp; using TMath::Abs; ClassImp(PamVMCNDDig) void PamVMCNDDig::Digitize(){ if(DEBUG) cout<<"Starting ND Digitization...."<GetEntriesFast(); //sorting by time and put results into vector fpHits if (HitsNum > 1){ for(Int_t i=0; iGetEntriesFast(); i++){ Time = 0.; for(Int_t j=0; jGetEntriesFast(); j++){ hit = (PamVMCDetectorHit*)hc->At(j); if((hit->GetTOF()>Time) && (!IsInsideVector(hit))){ hit1 = hit; Time = hit->GetTOF(); } } fpHits.push_back(hit1); } } //now we separate hits by tubes for(Int_t i = fpHits.size()-1; i>=0; i--){ hit = (PamVMCDetectorHit*)fpHits.at(i); pos = hit->GetPOS()-1; tubeHits[pos].push_back(hit); } fpHits.clear();// we don't need it //From this moment all hits sorted by time and present in tubes for(Int_t i = 0; i 0 ){ for(UInt_t j = 0; jGetEREL())*1.e6; //initial amplitude of this signal; Time = hit->GetTOF(); for(UInt_t k = 1; k<=j; k++){ hit0 = (PamVMCDetectorHit*)tubeHits[i].at(k-1); //hit1 = (PamVMCDetectorHit*)tubeHits[i].at(j); if (tauHits[i].at(k-1)> 0) Uback += keVtomV*(hit0->GetEREL())*1.e6*Exp((hit0->GetTOF()-/*hit1->GetTOF()*/hit->GetTOF())/Abs(tauHits[i].at(k-1))); } tauHits[i].push_back(frandom->Gaus(Tau,SigmaTau)); if (DEBUG){ cout<<"++++++HIT+++++++"< Tresh) && (TimeShowercut)) cout<<" Particle detected as NEUTRON"< Tresh) && (TimeShowercut)) NdN++; } } } if(DEBUG) cout<<"==== Total nuber of detected neutrons for for event ==="<