23 #ifndef Gw_CorrelatedSpaceLightTree3
83 return Form(
"%s_3D", GetName());
89 return Form(
"%s_3D", GetTitle());
133 static Bool_t first =
false;
135 if (first ==
false) {
138 Int_t dimX =
GetHisto(
"x")->GetNbinsX();
143 fX[0] = Short_t(Xn[0]+0.5);
144 fX[1] = Short_t(Xn[1]+0.5);
145 fX[2] = Short_t(Xn[2]+0.5);
169 Int_t dimX = h3->GetNbinsX();
174 for (Int_t i = 0; i < dimX; ++i) {
176 for (Int_t j = 0; j < dimX; ++j) {
178 for (Int_t k = 0; k < dimX; ++k) {
180 count = h3->GetBinContent(h3->GetBin(i,j,k));
181 for (Int_t l = 0; l < count; ++l) {
189 fTree->Project(h->GetName(),
"fX[0]",
"");
209 Int_t dimX = h1->GetNbinsX();
214 for (Int_t i = 0; i < nEvents; ++i) {
216 fX[0] = (Short_t)h1->GetRandom();
217 fX[1] = (Short_t)h1->GetRandom();
218 fX[2] = (Short_t)h1->GetRandom();
223 fTree->Project(h->GetName(),
"fX[0]",
"fX[0]>0",
"", nEvents, 0);
251 fLog <<
warning <<
"Axis number out of range, set to zero cos symetrical CS" <<
dolog;
257 fLog <<
error <<
"Gate list must be filled on axis x and y" <<
dolog;
276 h1 =
static_cast<TH1D*
> (
fHistoList->At(idx) );
287 Short_t inGate[dimProj];
288 Double_t energies[dimProj];
290 Int_t nEntries =
fTree->GetEntries();
291 for (Int_t i= 0; i < nEntries; ++i) {
297 nofGates = filter->
IsInside(energies, dimProj, inGate);
301 if (inGate[k] == 0) {
325 h1 =
static_cast<TH1D*
> (
fHistoList->At(idx) );
336 Short_t inGate1[dimProj];
337 Short_t inGate2[dimProj];
338 Double_t energies[dimProj+1];
340 Int_t nEntries =
fTree->GetEntries();
341 for (Int_t i= 0; i < nEntries; ++i) {
362 filter->
IsInside(energies, dimProj, inGate1, 0);
363 filter->
IsInside(energies, dimProj, inGate2, 1);
365 if(inGate1[0]*inGate2[0] == 1)
366 h1->Fill(energies[2]);
407 void CorrelatedSpaceLightTree3::Streamer(TBuffer &R__b)
411 if (R__b.IsReading()) {
412 CorrelatedSpaceLightTree3::Class()->ReadBuffer(R__b,
this);
420 fTree->Write(
"", kOverwrite);
421 CorrelatedSpaceLightTree3::Class()->WriteBuffer(R__b,
this);
Bool_t IsForBkg()
Is for bkg gates.
LogMessage & error(LogMessage &)
LogMessage & warning(LogMessage &)
virtual Int_t IsInside(Double_t *, Int_t, Short_t *, Int_t=0)
Get the pattern of energies inside the gates.
virtual Bool_t IsCombined()
Flag for combined.
LogMessage & nline(LogMessage &)
LogMessage & dolog(LogMessage &)
CSFilter base class for filter.
virtual Bool_t IsListFilled(Int_t)
Check if gate filled.
void SetCondition(Short_t cond)
Set dimension for gating.
virtual void SetProcessMethod(const char *)
To set the current method.
void SetDimension(Short_t dim)
Set dimension for projected space.