#include "Digitizer.h" using namespace std; void Digitizer::DigitizeS4(){ Int_t DEBUG=0; // creato: S. Borisov, INFN Roma2 e MEPHI, Sett 2007 TString ciao,modo="ns"; Int_t i,j,t,NdF,pmt,NdFT,S4,S4v=0,S4p=32; Float_t E0,E1=1e-6,Ert,X,Y,Z,x,y,z,V[3],Xs[2],Ys[2],Zs[2],Yp[6],q,w,p=0.1,l,l0=500; Xs[0]=-24.1; Xs[1]=24.1; Ys[0]=-24.1; Ys[1]=24.1; Zs[0]=-0.5; Zs[1]=0.5; Yp[0]=-20.; Yp[2]=-1.; Yp[4]=17.; for(i=0;i<3;i++) Yp[2*i+1]=Yp[2*i]+3; srand(time(NULL)); // --- activate branches: // fhBookTree->SetBranchStatus("Nthtof",1); //modified by E.Vannuccini 03/08 // fhBookTree->SetBranchStatus("Ipltof",1); // fhBookTree->SetBranchStatus("Ipaddle",1); // fhBookTree->SetBranchStatus("Xintof",1); // fhBookTree->SetBranchStatus("Yintof",1); // fhBookTree->SetBranchStatus("Xouttof",1); // fhBookTree->SetBranchStatus("Youttof",1); // fhBookTree->SetBranchStatus("Ereltof",1); // fhBookTree->SetBranchStatus("Timetof",1); NdFT=0; Ert=0; for(i=0;iXs[0] && xYs[0] && yZs[0] && zXs[0] && xYs[0] && yZs[0] && z>ciao; } if((xXs[1]-p)&&(y>Ys[0]+p && yZs[0]+p && z=Yp[2*t] && yXs[0]+p && xYs[1]-p)&&(z>Zs[0]+p && zXs[0]+p && xYs[0]+p && yZs[1]-p))V[2]=-V[2]; x+=V[0]; y+=V[1]; z+=V[2]; l=0; //cout<>ciao; } } } Ert=Ert/0.002; q=(Float_t)(random())/(Float_t)0x7fffffff; w=0.7; //E0=(Float_t)(4064./7.); E0=4064./7.; if(Ert<1) S4=0; else S4=(Int_t)(4064.*(1.-exp(-(Ert-1.)/E0))); i=S4/4; if(S4%4==0) S4v=S4+S4p; else if(S4%4==1){ if(q>ciao; }