void SetInitParams(Int_t mint, Int_t maxt, Int_t thr, Int_t maxval=128);
+ void SetCutOnEta(Bool_t cut) { fCutOnEta = cut; }
+ void SetEtaMax(Float_t max) { fEtaMax = max; }
+ void SetEtaMin(Float_t min) { fEtaMin = min; }
+
+ Float_t GetCutOnEta() { return fCutOnEta; }
+ Float_t GetEtaMax() { return fEtaMax; }
+ Float_t GetEtaMin() { return fEtaMin; }
+
protected:
TString fFile; // File holding raw-data.
Int_t fEvent; // Current event.
Int_t fInitThreshold; // Threshold.
Int_t fInitMaxVal; // Maximum-signal value (all signals above mapped to saturation color).
+ Bool_t fCutOnEta; // Bool for apply eta cut
+ Float_t fEtaMax; // Maximum eta value for cut
+ Float_t fEtaMin; // Minimum eta value for cut
+
private:
AliEveTPCLoader(const AliEveTPCLoader&); // Not implemented
AliEveTPCLoader& operator=(const AliEveTPCLoader&); // Not implemented
#include <EveDet/AliEveTPCLoader.h>
#include <EveDet/AliEveTPCData.h>
+#include <TEveScene.h>
#include <TEveManager.h>
#include <TEveGValuators.h>
+#include <TGDoubleSlider.h>
#include <TSystem.h>
#include <TVirtualPad.h>
fUpdateSectors (0),
fReloadSectors (0),
fCreateSectors3D (0),
- fDeleteSectors3D (0)
+ fDeleteSectors3D (0),
+
+ gEtaRange(0),
+ gCutOnEta(0)
+
{
// Constructor.
"AliEveTPCLoaderEditor", this, "DoDeleteSectors3D()");
AddFrame(f, new TGLayoutHints(kLHintsExpandX, 8,8,8,0));
}
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+ fCreateSectors3D = new TGTextButton(f, "Show 2D");
+ f->AddFrame(fCreateSectors3D, new TGLayoutHints(kLHintsExpandX, 0,4,0,0));
+ fCreateSectors3D->Connect("Clicked()",
+ "AliEveTPCLoaderEditor", this, "DoShowSectors2D()");
+ fDeleteSectors3D = new TGTextButton(f, "Hide 2D");
+ f->AddFrame(fDeleteSectors3D, new TGLayoutHints(kLHintsExpandX, 4,0,0,0));
+ fDeleteSectors3D->Connect("Clicked()",
+ "AliEveTPCLoaderEditor", this, "DoHideSectors2D()");
+ AddFrame(f, new TGLayoutHints(kLHintsExpandX, 8,8,8,0));
+ }
+
+ // Eta cuts slider
+
+ {
+ TGHorizontalFrame* f = new TGHorizontalFrame(this);
+
+ gEtaRange = new TEveGDoubleValuator(f,"Eta range:", 40, 0);
+ gEtaRange->SetNELength(6);
+ gEtaRange->SetLabelWidth(50);
+ gEtaRange->Build();
+ gEtaRange->GetSlider()->SetWidth(180);
+ gEtaRange->SetLimits(-1.5, 1.5, TGNumberFormat::kNESRealTwo);
+ gEtaRange->SetValues(-1.5, 1.5, TGNumberFormat::kNESRealTwo);
+
+ gCutOnEta = new TGCheckButton(f, "Set", 10);
+ gCutOnEta->SetEnabled(kTRUE);
+
+ f->AddFrame(gEtaRange, new TGLayoutHints(kLHintsExpandX, 10, 10, 10, 10));
+ f->AddFrame(gCutOnEta, new TGLayoutHints(kLHintsNormal, 10, 10, 10, 10));
+
+ AddFrame(f, new TGLayoutHints(kLHintsExpandX, 8,8,8,0));
+ }
+
}
/******************************************************************************/
{
// Slot for UpdateSectors.
+ if(gCutOnEta)
+ fM->SetCutOnEta(gCutOnEta->IsOn());
+
+ if(gEtaRange)
+ {
+ fM->SetEtaMin(gEtaRange->GetMin());
+ fM->SetEtaMax(gEtaRange->GetMax());
+ }
+
fM->UpdateSectors();
}
{
// Slot for ReloadSectors.
+ if(gCutOnEta)
+ fM->SetCutOnEta(gCutOnEta->IsOn());
+
+ if(gEtaRange)
+ {
+ fM->SetEtaMin(gEtaRange->GetMin());
+ fM->SetEtaMax(gEtaRange->GetMax());
+ }
+
+
fM->ReloadSectors();
}
{
// Slot for CreateSectors3D.
+ if(gCutOnEta)
+ fM->SetCutOnEta(gCutOnEta->IsOn());
+
+ if(gEtaRange)
+ {
+ fM->SetEtaMin(gEtaRange->GetMin());
+ fM->SetEtaMax(gEtaRange->GetMax());
+ }
+
fM->CreateSectors3D();
}
fM->DeleteSectors3D();
}
+
+void AliEveTPCLoaderEditor::DoShowSectors2D()
+{
+
+ for(Int_t i = 0; i< 36; i++)
+ {
+ if(gEve->GetEventScene()->FirstChild()->FindChild("AliEveTPCLoader")->FindChild(Form("Sector2D %d",i)))
+ {
+ gEve->GetEventScene()->FirstChild()->FindChild("AliEveTPCLoader")->FindChild(Form("Sector2D %d",i))->SetRnrSelf(kTRUE);
+ gEve->GetEventScene()->FirstChild()->FindChild("AliEveTPCLoader")->FindChild(Form("Sector2D %d",i))->SetRnrChildren(kTRUE);
+ }
+ }
+
+}
+
+void AliEveTPCLoaderEditor::DoHideSectors2D()
+{
+
+ for(Int_t i = 0; i< 36; i++)
+ {
+ if(gEve->GetEventScene()->FirstChild()->FindChild("AliEveTPCLoader")->FindChild(Form("Sector2D %d",i)))
+ {
+ gEve->GetEventScene()->FirstChild()->FindChild("AliEveTPCLoader")->FindChild(Form("Sector2D %d",i))->SetRnrSelf(kFALSE);
+ gEve->GetEventScene()->FirstChild()->FindChild("AliEveTPCLoader")->FindChild(Form("Sector2D %d",i))->SetRnrChildren(kFALSE);
+ }
+ }
+
+}
+
fPointSetMaxVal (0),
fDriftVel (1.07),
- fZStep (250.0/900)
+ fZStep (250.0/900),
+ fCutOnEta (kFALSE),
+ fEtaMin (-1.5),
+ fEtaMax (1.5)
+
{
// Constructor.
- fRnrFrame = kFALSE;
+ fRnrFrame = kTRUE;
ComputeBBox();
}
TBuffer3D buffer(TBuffer3DTypes::kGeneric);
+ SetMainColor(36);
+ SetMainTransparency(100);
+
// Section kCore
buffer.fID = this;
buffer.fColor = GetMainColor();
Float_t x0, z0;
Float_t ym = ys + 0.5*ph;
Float_t zs = fZStep/fDriftVel;
+ Float_t eta, x1, y1, z1, x, y, z, c, s, zL;
while (iter.NextPad())
{
if (val <= fThreshold || time < fMinTime || time > fMaxTime)
continue;
+ if (fCutOnEta)
+ {
+
+ x1 = xs + (pad+0.5)*pw;
+ y1 = ym;
+ z1 = (time+0.5)*zs;
+
+ c = TMath::Cos((fSectorID + 0.5)*20*TMath::Pi()/180 - TMath::PiOver2());
+ s = TMath::Sin((fSectorID + 0.5)*20*TMath::Pi()/180 - TMath::PiOver2());
+ zL = AliEveTPCSectorData::GetZLength();
+
+ if (fSectorID < 18)
+ {
+ x = -c*x1-s*y1;
+ y = -s*x1+c*y1;
+ z = -z1+zL;
+ }
+ else
+ {
+ x = c*x1+s*y1;
+ y = -s*x1+c*y1;
+ z = z1-zL;
+ }
+
+ eta = -TMath::Log(TMath::Tan(0.5*TMath::ACos(z/TMath::Sqrt(x*x + y*y + z*z))));
+
+ if(!(eta < fEtaMax && eta > fEtaMin) && !(-eta < fEtaMax && -eta > fEtaMin))
+ continue;
+
+ }
+
if (fPointSetOn && val <= fPointSetMaxVal)
{
fPointSetArray.Fill(xs + (pad+0.5)*pw, ym, (time+0.5)*zs, val);
void SetDriftVel(Float_t v) { fDriftVel = v; IncRTS(); }
void SetZStep(Float_t step) { fZStep = step; IncRTS(); }
+ void SetCutOnEta(Bool_t cut) { fCutOnEta = cut; IncRTS(); }
+ void SetEtaMax(Float_t max) { fEtaMax = max; IncRTS(); }
+ void SetEtaMin(Float_t min) { fEtaMin = min; IncRTS(); }
+
+ Float_t GetCutOnEta() { return fCutOnEta; }
+ Float_t GetEtaMax() { return fEtaMax; }
+ Float_t GetEtaMin() { return fEtaMin; }
+
virtual void SetRnrFrame(Bool_t rf);
virtual void ComputeBBox();
Float_t fDriftVel; // Drift velocity for 'z' coordinate.
Float_t fZStep; // Z width of a time-bin.
+ Bool_t fCutOnEta; // Bool used to apply eta cut
+ Float_t fEtaMin; // Minimum eta value for eta cut
+ Float_t fEtaMax; // Maximum eta value for eta cut
+
ClassDef(AliEveTPCSector3D, 0); // Visualization of TPC raw-data in 3D.
};