// $Id: hrichcuttracklet.cc,v 1.2 2003-01-24 18:25:44 halo Exp $ // Last update by Thomas Eberl: 03/01/17 15:20:16 // using namespace std; #include #include #include #include #include #include #include #include #include "hhitmatch.h" #include "phyanadef.h" #include "hrichcuttracklet.h" #include "hrichcuto.h" #include "hkicktrack.h" #include "kickdef.h" #include "hparticle.h" #include "hrichhit.h" #include "hades.h" #include "hiterator.h" #include "hcategory.h" #include "hphysicsconstants.h" #include "hrecevent.h" #include "hlocation.h" HRichCutTracklet::HRichCutTracklet() : HRichCutO() { } HRichCutTracklet::HRichCutTracklet(Text_t *name, Text_t *title) : HRichCutO(name, title) { setStandardCuts(); TDatime dt; dt.Set(); TString stitle(title); stitle.Append("_"); stitle+=dt.GetDate(); stitle.Append("_"); stitle+=dt.GetTime(); SetTitle(stitle.Data()); // TString sname(name); // sname.Append("_"); // sname+=dt.GetDate(); // sname.Append("_"); // sname+=dt.GetTime(); // SetName(sname.Data()); } void HRichCutTracklet::switchTo(char *s) { TString state(s); // compare to available inner states of the cut // and to switch to state if (!state.CompareTo("matchedGoodRing")) { Int_t swt[] = {1,1,1,1,1,1,1,1}; Float_t val[] = {4.,5.,2.8,200.,1.7,1.8}; setState(swt,val); } else if (!state.CompareTo("angularMatch")) { Int_t swt[] = {0,1,0,0,0,0,1,1}; Float_t val[] = {0,0,0,0,1.7,1.8}; setState(swt,val); } else cout<<"requested state "<GetName()<<" not found"<getRichTheta() - h->getMdcTheta()) < nRichMdcTheta) && (!kRichMdcPhi || TMath::Abs(h->getRichPhi() - h->getMdcPhi()) < nRichMdcPhi) ) ret_val=kTRUE; return ret_val; } Bool_t HRichCutTracklet::isGoodRing(HHitMatch *h) { Bool_t ret_val=kFALSE; if ( (!kRingPatMat || h->getRingPatMat() > nRingPatMat) && (!kRingPadNr || h->getRingPadNr() > nRingPadNr) && (!kRingCentroid || h->getCentroid() < nRingCentroid) && (!kRingAvChrg || ((Float_t)h->getRingAmplitude())/((Float_t)h->getRingPadNr()) > nRingAvChrg) ) ret_val=kTRUE; return ret_val; } ClassImp(HRichCutTracklet)