]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
From Boris and Antonin: Add DCA and pt cuts for v0s.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 26 Apr 2008 19:33:45 +0000 (19:33 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 26 Apr 2008 19:33:45 +0000 (19:33 +0000)
EVE/EveBase/AliEveV0.cxx
EVE/EveBase/AliEveV0.h
EVE/EveBase/AliEveV0Editor.cxx
EVE/EveBase/AliEveV0ListEditor.cxx
EVE/EveBase/AliEveV0ListEditor.h

index 76bf1627544f7d6634646e8040ca38be2dbf269c..fcdd140885d2b42aac85e1181016e1e9f83b6d78 100644 (file)
@@ -140,7 +140,11 @@ AliEveV0List::AliEveV0List() :
   fNegColor(0),
   fPosColor(0),
   fMinRCut(0),
-  fMaxRCut(250)
+  fMaxRCut(250),
+  fMinDaughterDCA(0),
+  fMaxDaughterDCA(1),
+  fMinPt(0),
+  fMaxPt(20)
 {
   // Default constructor.
 
@@ -158,7 +162,11 @@ AliEveV0List::AliEveV0List(TEveTrackPropagator* rs) :
   fNegColor(0),
   fPosColor(0),
   fMinRCut(0),
-  fMaxRCut(250)
+  fMaxRCut(250),
+  fMinDaughterDCA(0),
+  fMaxDaughterDCA(1),
+  fMinPt(0),
+  fMaxPt(20)
 {
   // Constructor with given track-propagator..
 
@@ -178,7 +186,11 @@ AliEveV0List::AliEveV0List(const Text_t* name, TEveTrackPropagator* rs) :
   fNegColor(0),
   fPosColor(0),
   fMinRCut(0),
-  fMaxRCut(100)
+  fMaxRCut(100),
+  fMinDaughterDCA(0),
+  fMaxDaughterDCA(1),
+  fMinPt(0),
+  fMaxPt(20)
 {
   // Standard constructor.
 
@@ -229,3 +241,45 @@ void AliEveV0List::FilterByRadius(Float_t minR, Float_t maxR)
   ElementChanged();
   gEve->Redraw3D();
 }
+
+/******************************************************************************/
+
+//______________________________________________________________________________
+void AliEveV0List::FilterByDaughterDCA(Float_t minDaughterDCA, Float_t maxDaughterDCA)
+{
+  // Select visibility of elements based on the DCA between daughters.
+
+  fMinDaughterDCA = minDaughterDCA;
+  fMaxDaughterDCA = maxDaughterDCA;
+
+  for(List_i i = fChildren.begin(); i != fChildren.end(); ++i)
+  {
+    AliEveV0* v0 = (AliEveV0*) *i;
+    Float_t  dca = v0->GetDaughterDCA();
+    Bool_t  show = dca >= fMinDaughterDCA && dca <= fMaxDaughterDCA;
+    v0->SetRnrState(show);
+  }
+  ElementChanged();
+  gEve->Redraw3D();
+}
+
+/******************************************************************************/
+
+//______________________________________________________________________________
+void AliEveV0List::FilterByPt(Float_t minPt, Float_t maxPt)
+{
+  // Select visibility of elements based on the V0 pt.
+
+  fMinPt = minPt;
+  fMaxPt = maxPt;
+
+  for(List_i i = fChildren.begin(); i != fChildren.end(); ++i)
+  {
+    AliEveV0* v0 = (AliEveV0*) *i;
+    Float_t  pt = v0->GetPt();
+    Bool_t  show = pt >= fMinPt && pt <= fMaxPt;
+    v0->SetRnrState(show);
+  }
+  ElementChanged();
+  gEve->Redraw3D();
+}
index fbd94bdf4cb76eb4e7e21c1df06514aa93854208..c327549fa0e242c57ba4cbe5a9b86a698ee9b52b 100644 (file)
@@ -56,6 +56,7 @@ public:
   void SetDaughterDCA(Float_t dca) { fDaughterDCA = dca; }
 
   Float_t GetRadius() const { return fRecDecayV.Perp(); }
+  Float_t GetPt()     const { return fRecDecayP.Perp(); }
 
   Bool_t GetOnFlyStatus()    const { return fOnFlyStatus; }
   void   SetOnFlyStatus(Bool_t fs) { fOnFlyStatus = fs; }
@@ -129,6 +130,8 @@ public:
   void   MakeV0s();
 
   void   FilterByRadius(Float_t minR, Float_t maxR);
+  void   FilterByDaughterDCA(Float_t minDaughterDCA, Float_t maxDaughterDCA);
+  void   FilterByPt(Float_t minPt, Float_t maxPt);
 
 protected:
   TString              fTitle;
@@ -145,6 +148,12 @@ protected:
   Float_t              fMinRCut;
   Float_t              fMaxRCut;
 
+  Float_t              fMinDaughterDCA;
+  Float_t              fMaxDaughterDCA;
+
+  Float_t              fMinPt;
+  Float_t              fMaxPt;
+
 private:
   void Init();
 
index b7c917952cce291992d9faa450f60ea064db118e..88c7ec50e1c647cd03fe51500aa9c6863270e0ec 100644 (file)
@@ -66,8 +66,8 @@ void AliEveV0Editor::SetModel(TObject* obj)
   fM = dynamic_cast<AliEveV0*>(obj);
 
   // Set values of widgets
-  fInfoLabel0->SetText(Form("DCA = %f, Radius = %f", fM->GetDaughterDCA(), fM->GetRadius()));
-  fInfoLabel1->SetText(Form("Some other relevant stuff."));
+  fInfoLabel0->SetText(Form("Radius = %f, DCA = %f", fM->GetRadius(), fM->GetDaughterDCA()));
+  fInfoLabel1->SetText(Form("Pt = %f", fM->GetPt()));
 }
 
 /******************************************************************************/
index 396e9b670d721ca2361f7ed1825cc88ac8d25f0a..8f1a655587a3f22a80b69932d69c421c6c3e4f97 100644 (file)
@@ -34,7 +34,9 @@ AliEveV0ListEditor::AliEveV0ListEditor(const TGWindow *p, Int_t width, Int_t hei
              UInt_t options, Pixel_t back) :
   TGedFrame(p, width, height, options | kVerticalFrame, back),
   fM(0),
-  fMinMaxRCut(0)
+  fMinMaxRCut(0),
+  fMinMaxDaughterDCA(0),
+  fMinMaxPt(0)
 {
   // Constructor.
 
@@ -53,6 +55,24 @@ AliEveV0ListEditor::AliEveV0ListEditor(const TGWindow *p, Int_t width, Int_t hei
    fMinMaxRCut->SetLimits(0, 100, TGNumberFormat::kNESRealOne);
    fMinMaxRCut->Connect("ValueSet()", "AliEveV0ListEditor", this, "DoMinMaxRCut()");
    AddFrame(fMinMaxRCut, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+
+   fMinMaxDaughterDCA = new TEveGDoubleValuator(this,"DCA:", 130, 0);
+   fMinMaxDaughterDCA->SetNELength(5);
+   fMinMaxDaughterDCA->SetLabelWidth(74);
+   fMinMaxDaughterDCA->Build();
+   fMinMaxDaughterDCA->GetSlider()->SetWidth(200);
+   fMinMaxDaughterDCA->SetLimits(0, 1, TGNumberFormat::kNESRealTwo);
+   fMinMaxDaughterDCA->Connect("ValueSet()", "AliEveV0ListEditor", this, "DoMinMaxDaughterDCA()");
+   AddFrame(fMinMaxDaughterDCA, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+
+   fMinMaxPt = new TEveGDoubleValuator(this,"pT:", 130, 0);
+   fMinMaxPt->SetNELength(5);
+   fMinMaxPt->SetLabelWidth(74);
+   fMinMaxPt->Build();
+   fMinMaxPt->GetSlider()->SetWidth(200);
+   fMinMaxPt->SetLimits(0, 20, TGNumberFormat::kNESRealOne);
+   fMinMaxPt->Connect("ValueSet()", "AliEveV0ListEditor", this, "DoMinMaxPt()");
+   AddFrame(fMinMaxPt, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
 }
 
 /******************************************************************************/
@@ -68,6 +88,8 @@ void AliEveV0ListEditor::SetModel(TObject* obj)
   // fXYZZ->SetValue(fM->GetXYZZ());
 
   fMinMaxRCut->SetValues(fM->fMinRCut, fM->fMaxRCut);
+  fMinMaxDaughterDCA->SetValues(fM->fMinDaughterDCA, fM->fMaxDaughterDCA);
+  fMinMaxPt->SetValues(fM->fMinPt, fM->fMaxPt);
 }
 
 /******************************************************************************/
@@ -87,3 +109,13 @@ void AliEveV0ListEditor::DoMinMaxRCut()
 {
   fM->FilterByRadius(fMinMaxRCut->GetMin(), fMinMaxRCut->GetMax());
 }
+
+void AliEveV0ListEditor::DoMinMaxDaughterDCA()
+{
+  fM->FilterByDaughterDCA(fMinMaxDaughterDCA->GetMin(), fMinMaxDaughterDCA->GetMax());
+}
+
+void AliEveV0ListEditor::DoMinMaxPt()
+{
+  fM->FilterByPt(fMinMaxPt->GetMin(), fMinMaxPt->GetMax());
+}
index dfeb20785c215e5a4cdf48d5e83740010e93954d..4c3644ab8c2ca2154014ee7f562d707e3589297f 100644 (file)
@@ -35,6 +35,8 @@ public:
 
   // Declare callback/slot methods
   void DoMinMaxRCut();
+  void DoMinMaxDaughterDCA();
+  void DoMinMaxPt();
 
 protected:
   AliEveV0List            *fM; // Model object.
@@ -42,6 +44,8 @@ protected:
   // Declare widgets
   // TGSomeWidget*   fXYZZ;
   TEveGDoubleValuator* fMinMaxRCut;
+  TEveGDoubleValuator* fMinMaxDaughterDCA;
+  TEveGDoubleValuator* fMinMaxPt;
 
 private:
   AliEveV0ListEditor(const AliEveV0ListEditor&);            // Not implemented