NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcInvmass Class Reference

Construction of invariant mass and combinatorial background. More...

#include "NcInvmass.h"

Inheritance diagram for NcInvmass:

Detailed Description

Construction of invariant mass and combinatorial background.


Copyright(c) 1999 NCFS/IIHE, All Rights Reserved. *
*
Authors: The Netherlands Center for Fundamental Studies (NCFS). *
The Inter-university Institute for High Energies (IIHE). *
Website : http://www.iihe.ac.be *
Contact : Nick van Eijndhoven (nickve.nl@gmail.com) *
*
Contributors are mentioned in the code where appropriate. *
*
No part of this software may be used, copied, modified or distributed *
by any means nor transmitted or translated into machine language for *
commercial purposes without written permission by the IIHE representative. *
Permission to use the software strictly for non-commercial purposes *
is hereby granted without fee, provided that the above copyright notice *
appears in all copies and that both the copyright notice and this *
permission notice appear in the supporting documentation. *
This software is provided "as is" without express or implied warranty. *
The authors make no claims that this software is free of error, or is *
consistent with any particular standard of merchantability, or that it *
will meet your requirements for any particular application, other than *
indicated in the corresponding documentation. *
This software should not be relied on for solving a problem whose *
incorrect solution could result in injury to a person or loss of property. *
If you do use this software in such a manner, it is at your own risk. *
The authors disclaim all liability for direct or consequential damage *
resulting from your use of this software. *

// Class NcInvmass
// Construction of invariant mass and combinatorial background.
//
// Example :
// ---------
//
// TObjArray* photons=new TObjArray(); // Array with photon tracks for pi0 rec.
//
// // Code to create some photon tracks from pi0 decays
// Int_t ntracks=200;
// for (Int_t i=0; i<ntracks; i++)
// {
// photons->Add(new Nctrack);
// ...
// ...
// ...
// }
//
// // Perform the invariant mass and comb. bkg. reconstruction
//
// TObjArray* allm=q.Invmass(photons,photons); // All reconstructed invariant masses
//
// TH1F* hall=new TH1F("hall","hall",200,0,2); // Histo with M_inv of all combinations
//
// Int_t nall=0;
// if (allm) nall=allm->GetEntries();
//
// NcTrack* t;
// Float_t minv;
// for (Int_t j=0; j<nall; j++)
// {
// t=(NcTrack*)allm->At(j);
// if (t)
// {
// minv=t->GetMass();
// hall->Fill(minv);
// }
// }
//
// TObjArray* bkgm=q.CombBkg(photons,photons); // Reconstructed comb. background
//
// TH1F* hbkg=new TH1F("hbkg","hbkg",200,0,2); // Histo with M_inv. of comb. background
//
// Int_t nbkg=0;
// if (bkgm) nbkg=bkgm->GetEntries();
//
// for (Int_t j=0; j<nbkg; j++)
// {
// t=(NcTrack*)bkgm->At(j);
// if (t)
// {
// minv=t->GetMass();
// hbkg->Fill(minv);
// }
// }
//
// TH1F* hsig=new TH1F("sig","sig",200,0,2); // Histo with the bkg. subtracted signal
// hsig->Sumw2();
// hsig->Add(hall,hbkg,1,-1);
//
//
// Note : By default the storage of the reconstructed information is performed
// in separate TObjArrays for the signal and comb. background resp.
// In order to limit the memory usage, NcInvmass::SetStorageMode(1) may be
// used to activate only a single TObjArray to store the reconstructed information.
// Consequently, the following statements
//
// TObjArray* allm=q.Invmass(photons,photons);
// TObjArray* bkgm=q.CombBkg(photons,photons);
//
// will result in the fact that after he invokation of CombBkg
// the information of "allm" is lost due to the fact that the storage is
// is re-used for "bkgm" in case the "single storage" option has been selected.
// Usage of the, in that case invalid, pointer "allm" may cause your
// program to crash.
//
// * Thus : In case of single storage usage, all invokations of the returned
// array pointer have to be completed before invoking any memberfunction
// of the same NcInvmass object again.
//
//
//
//--- Author: Nick van Eijndhoven 12-apr-1999 Utrecht University
//- Modified: NvE $Date: 2010-03-19 11:10:02 +0100 (Fri, 19 Mar 2010) $ NCFS

Definition at line 16 of file NcInvmass.h.

Public Member Functions

 NcInvmass ()
 
 ~NcInvmass ()
 
TObjArray * CombBkg (TObjArray *a1, TObjArray *a2)
 
Int_t GetPhiSwitch () const
 
Int_t GetStorageMode () const
 
Int_t GetThetaSwitch () const
 
TObjArray * Invmass (TObjArray *a1, TObjArray *a2)
 
void SetPhiSwitch (Int_t i=1)
 
void SetStorageMode (Int_t m)
 
void SetThetaSwitch (Int_t i=1)
 

Protected Attributes

Int_t fBkg
 
TObjArray * fMbkg
 
TObjArray * fMinv
 
Int_t fMode
 
Int_t fNewphi
 
Int_t fNewtheta
 
Double_t fPi
 
NcRandom fRndm
 

Private Member Functions

void Combine (TObjArray *a1, TObjArray *a2)
 

Constructor & Destructor Documentation

◆ NcInvmass()

NcInvmass::NcInvmass ( )
// Creation of an NcInvmass object and initialisation of parameters.

Definition at line 129 of file NcInvmass.cxx.

◆ ~NcInvmass()

NcInvmass::~NcInvmass ( )
// Destructor to delete dynamically allocated memory.

Definition at line 146 of file NcInvmass.cxx.

Member Function Documentation

◆ CombBkg()

TObjArray * NcInvmass::CombBkg ( TObjArray * a1,
TObjArray * a2 )
// Perform two-particle combinatorial background reconstruction.

Definition at line 251 of file NcInvmass.cxx.

◆ Combine()

void NcInvmass::Combine ( TObjArray * a1,
TObjArray * a2 )
private
// Perform two-particle invariant mass reconstruction.

Definition at line 271 of file NcInvmass.cxx.

◆ GetPhiSwitch()

Int_t NcInvmass::GetPhiSwitch ( ) const
// Provide the phi switching flag.

Definition at line 227 of file NcInvmass.cxx.

◆ GetStorageMode()

Int_t NcInvmass::GetStorageMode ( ) const
// Provide mode of storage for the result arrays for inv. mass and comb. background.

Definition at line 205 of file NcInvmass.cxx.

◆ GetThetaSwitch()

Int_t NcInvmass::GetThetaSwitch ( ) const
// Provide the theta switching flag.

Definition at line 216 of file NcInvmass.cxx.

◆ Invmass()

TObjArray * NcInvmass::Invmass ( TObjArray * a1,
TObjArray * a2 )
// Perform two-particle invariant mass reconstruction.

Definition at line 238 of file NcInvmass.cxx.

◆ SetPhiSwitch()

void NcInvmass::SetPhiSwitch ( Int_t i = 1)
// Enable/Disable (1/0) switching of phi angle in comb. bkg. reconstruction.
// Default : Switching of phi is enabled.

Definition at line 192 of file NcInvmass.cxx.

◆ SetStorageMode()

void NcInvmass::SetStorageMode ( Int_t m)
// Set storage mode for the result arrays for inv. mass and comb. background.

Definition at line 167 of file NcInvmass.cxx.

◆ SetThetaSwitch()

void NcInvmass::SetThetaSwitch ( Int_t i = 1)
// Enable/Disable (1/0) switching of theta angle in comb. bkg. reconstruction.
// Default : Switching of theta is enabled.

Definition at line 179 of file NcInvmass.cxx.

Member Data Documentation

◆ fBkg

Int_t NcInvmass::fBkg
protected

Definition at line 33 of file NcInvmass.h.

◆ fMbkg

TObjArray* NcInvmass::fMbkg
protected

Definition at line 38 of file NcInvmass.h.

◆ fMinv

TObjArray* NcInvmass::fMinv
protected

Definition at line 37 of file NcInvmass.h.

◆ fMode

Int_t NcInvmass::fMode
protected

Definition at line 32 of file NcInvmass.h.

◆ fNewphi

Int_t NcInvmass::fNewphi
protected

Definition at line 36 of file NcInvmass.h.

◆ fNewtheta

Int_t NcInvmass::fNewtheta
protected

Definition at line 35 of file NcInvmass.h.

◆ fPi

Double_t NcInvmass::fPi
protected

Definition at line 31 of file NcInvmass.h.

◆ fRndm

NcRandom NcInvmass::fRndm
protected

Definition at line 34 of file NcInvmass.h.


The documentation for this class was generated from the following files: