//*-- AUTHOR : Jaroslav Bielcik //*-- Modified : 18/06/2002 //_HADES_CLASS_DESCRIPTION ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // HMdcClosePairCutsPar // // Container storing the cuts to make close pair rejection // // If the all values of the cuts are larger than those from mdc-rich tracklet // // than traclet is single. Cuts on mdc cluster size, mdc contributing wires // // and integrated charge in ring are stored. // // Because first two mdc variables are depending on theta,phi angle , // // there are different cuts for several theta,phi regions. There are 8 bins in theta space: // // mdc cls finder level bins: // // 0: 4 // // 1: 5 // // 2: 6 // // theta bins: // // 0: 10-20 degrees // // 1: 20-30 degrees // // 2: 30-40 degrees // // 3: 40-50 degrees // // 4: 50-60 degrees // // 5: 60-70 degrees // // 6: 70-80 degrees // // 7: 80-90 degrees // // There are three bins in phi space // // phi bins: // // 0: 0-10 & 50-60 // // 1: 10-20 & 40-50 // // 2: 20-30 & 30-40 // // The rejection power S/B ratio depends on minimal single lepton efficiency therefore there are // // 4 bins of efficiency // // efficiency bins: // // 0: 80-85 // // 1: 85-90 // // 2: 90-95 // // 3: 95-100 // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// using namespace std; #include #include "hades.h" #include "hruntimedb.h" #include "hspectrometer.h" #include "hmdcdetector.h" #include "hpario.h" #include "hdetpario.h" #include #include #include "hmdcclosepaircutspar.h" #include "hmessagemgr.h" ClassImp(HMdcClosePairCutsParCut) ClassImp(HMdcClosePairCutsParEf) ClassImp(HMdcClosePairCutsParPhi) ClassImp(HMdcClosePairCutsParTheta) ClassImp(HMdcClosePairCutsPar) HMdcClosePairCutsParEf::HMdcClosePairCutsParEf(Int_t n) { // constructor creates a TClonesArray of type // HMdcClosePairCutsParCut array = new TObjArray(n); for (Int_t i = 0; i< n; ++i) array->AddAt(new HMdcClosePairCutsParCut(),i); } HMdcClosePairCutsParEf::~HMdcClosePairCutsParEf() { // destructor array->Delete(); delete array; } Int_t HMdcClosePairCutsParEf::getSize() { // return the size of the pointer array return array->GetEntries(); } HMdcClosePairCutsParPhi::HMdcClosePairCutsParPhi(Int_t m, Int_t n) { // constructor creates an array of pointers of type // HMdcClosePairCutsParEf array = new TObjArray(m); for (Int_t i = 0; i < m; i++) { array->AddAt(new HMdcClosePairCutsParEf(n),i); } } HMdcClosePairCutsParPhi::~HMdcClosePairCutsParPhi() { // destructor array->Delete(); delete array; } Int_t HMdcClosePairCutsParPhi::getSize() { // return the size of the pointer array return array->GetEntries(); } HMdcClosePairCutsParTheta::HMdcClosePairCutsParTheta(Int_t l, Int_t m, Int_t n) { // constructor creates an array of pointers of type // HMdcClosePairCutsParPhi array = new TObjArray(l); for (Int_t i = 0; i < l; i++) { array->AddAt(new HMdcClosePairCutsParPhi(m,n),i); } } HMdcClosePairCutsParTheta::~HMdcClosePairCutsParTheta() { // destructor array->Delete(); delete array; } Int_t HMdcClosePairCutsParTheta::getSize() { // return the size of the pointer array return array->GetEntries(); } HMdcClosePairCutsPar::HMdcClosePairCutsPar(const Char_t* name,const Char_t* title, const Char_t* context,Int_t h,Int_t l,Int_t m,Int_t n) : HParSet(name,title,context) { //creating array of the HMdcClosePairCutsParTheta //container has a tree structure //fName="MdcClosePairCutsPar"; //fTitle="close pair rejection parameters for Mdc-Rich"; comment="no comment"; strcpy(detName,"Mdc"); if (gHades) { fMdc =(HMdcDetector*)(((HSpectrometer*)(gHades->getSetup()))->getDetector("Mdc")); } else { fMdc = 0; } array=new TObjArray(l); for (Int_t i=0; iAddAt(new HMdcClosePairCutsParTheta(l,m,n),i); theta_bin_size=10; phi_bin_size=10; theta_nbin=l; phi_nbin=m; } HMdcClosePairCutsPar::~HMdcClosePairCutsPar() { // destructor array->Delete(); delete array; } Int_t HMdcClosePairCutsPar::getSize() { // return the size of the pointer array return array->GetEntries(); } Bool_t HMdcClosePairCutsPar::init(HParIo* inp,Int_t* set) { // intitializes the container from an input Int_t myset[1]={1}; HDetParIo* input=inp->getDetParIo("HMdcParIo"); if (input) return (input->init(this,myset)); return kFALSE; } Int_t HMdcClosePairCutsPar::write(HParIo* output) { // writes the container to an output HDetParIo* out=output->getDetParIo("HMdcParIo"); if (out) return out->write(this); return -1; } void HMdcClosePairCutsPar::clear() { for(Int_t n=0;ngetMsg()->info(10,HMessageMgr::DET_MDC,GetName(), "%2i %2i %2i %2i %4.2f %6.2f %4.0f %4.0f %5.0f\n",lev,th,p,e,cut.getEfficiency(),cut.getSig2Back(),cut.getMdcClsSizeCut(),cut.getMdcContWiresCut(),cut.getRichIntChargeCut()); //printf("%2i %2i %2i %4.2f %6.2f %4.0f %4.0f %4.0f %5.0f\n",th,p,e,cut.getEfficiency(),cut.getSig2Back(),cut.getMdcClsSizeCut(),cut.getMdcContWiresCut(),cut.getMdcMergedClsCut(),cut.getRichIntChargeCut()); } } } } } Bool_t HMdcClosePairCutsPar::passCuts(Float_t mdc_level,Float_t mdc_the,Float_t mdc_phi,Float_t min_eff,Float_t mdc_clustersize,Float_t mdc_nwires,Float_t rich_intcharge){ //////////////////////////////////////////////////////////////////////////////////////////////////// // The usefull function to check whether values in cluster pass the CPR cuts: // // mdc_level ... 4-6 // // mdc_the,mdc_phi angles in degrees // // min_eff 80,85,90 or 95 // //////////////////////////////////////////////////////////////////////////////////////////////////// Float_t mdc_cluster_cut,mdc_wires_cut,rich_charge_cut; HMdcClosePairCutsParCut cut; Int_t mdc_theta_bin=calculateMdcThetaBin(mdc_the); Int_t mdc_phi_bin=calculateMdcPhiBin(mdc_phi); Int_t mdc_level_bin=calculateMdcLevelBin(mdc_level); Int_t min_eff_bin=calculateMdcEffBin(min_eff); if(mdc_theta_bin>-1&&mdc_phi_bin>-1&&min_eff_bin>-1&&mdc_level_bin>-1){ cut=(*this)[mdc_level_bin][mdc_theta_bin][mdc_phi_bin][min_eff_bin]; mdc_cluster_cut=cut.getMdcClsSizeCut(); mdc_wires_cut=cut.getMdcContWiresCut(); rich_charge_cut=cut.getRichIntChargeCut(); if(mdc_clustersize=80&&min_eff<85) return 0; if( min_eff>=85&&min_eff<90) return 1; if( min_eff>=90&&min_eff<95) return 2; if( min_eff>=95) return 3; return -1; }