#include "h10.h" #include "TH2.h" #include "TStyle.h" #include "TNtuple.h" #include "TCanvas.h" #include "TMath.h" #include #include #include #include #include #include Int_t h10::Cut(Int_t * results){ //User supplied function for slim2 program //Called from h10::Loop for each event //returns 1 if event selected, 0 otherwise //For the cuts passed by this events, increment results[20] array (if interested) int cutflag=0; Float_t Pint_max=1.0; Float_t Pint_min=0.01; Float_t Pext_min=0.0; Float_t Pext_max=0.01; //1 track, nagative charge, associated with isolated PMT if(Nbr_tks!=1) return 0; results[1]++; // charge if(Qc[0]>0) return 0; //if track has a reconstructed vertex if(fabs(X_foil[0])<0.01 && fabs(Y_foil[0])<0.01) return 0; results[2]++; //energy of electron <0.1 if(Ind_scintil[0]==0) return 0; Int_t isc=Ind_scintil[0]-1; if(Sc[isc][8]*1000<0.2) return 0; results[3]++; Bool_t isolated=true; for(int j=0;jGhtrh and // no gamma Glthr0.2){ NGhigh++; Gcluster=i; } if(sci.ncluster[i].Esum>0.2) NGtotal++; } } // not second cluster between 1.5 and 2 Int_t NotherG=0; for(int j=0;j0.15){ NotherG++; } } } if( NGhigh!=1) return 0; results[6]++; if(NotherG!=0) return 0; results[7]++; // select only internal eg-events Float_t tfoil,dtfoil; Float_t Pint=TOFbg_int(sci.ncluster[Gcluster].Iseed,tfoil,dtfoil); Float_t Pext=TOFbg_ext(sci.ncluster[Gcluster].Iseed,tfoil,dtfoil); if(Pint>Pint_max) return 0; if(PintPext_max) return 0; results[9]++; Int_t ndfoil=Decodesrc(Xvert,Yvert,Zvert); if(ndfoil!=4) return 0; results[10]++; //Cut values for event preselection; //Selection code Bool_t twohits; twohits=(checklayer(0,0)&&checklayer(0,1)); if(!(twohits)) return 0; results[11]++; return 1; }