once.
* visscan_init.C - register HF AOD fireand and aod_HF macro (disabled
by default).
* HF classes & macros - sanitize whitespace.
fgAODfriends = new TList;
fgAODfriends->SetOwner(kTRUE);
}
- fgAODfriends->Add(new TObjString(friendFileName));
+ if (fgAODfriends->FindObject(friendFileName) == 0)
+ {
+ fgAODfriends->Add(new TObjString(friendFileName));
+ }
}
void AliEveEventManager::SetRawFileName(const TString& raw)
fAODobj(0x0),
fRecBirthHF(0,0,0),
- fRecDecayHF(0,0,0),
+ fRecDecayHF(0,0,0),
fRecDecayP_HF(0,0,0),
fPointingAngleHF(0),
fPosTrack(0),
fRnrStyle(0),
fPointingLine(0),
-
+
fnProng(0),
fAODIndex(-1),
fChi2SecondVtx(-1),
-
+
fProngDCA(0x0),
fProngd0(0x0),
fProngMaxProbPdg(0x0),
//______________________________________________________________________________
AliEveHF::AliEveHF(TEveRecTrack* tNeg, TEveRecTrack* tPos, Double_t primVtx[3], AliAODRecoDecay* aodObj, Double_t /*firstPointTrack*/[3], TEveTrackPropagator* rs) :
-
+
TEvePointSet(),
fAODobj(aodObj),
fPosTrack(new TEveTrack(tPos, rs)),
fRnrStyle(rs),
fPointingLine(new TEveLine("Pointing line")),
-
+
fnProng(aodObj->GetNProngs()),
fAODIndex(-1),
fChi2SecondVtx(aodObj->GetReducedChi2()),
-
+
fProngDCA(0),
fProngd0(0),
fProngMaxProbPdg(0),
fInvariantMassAntiPart(0),
fDecay(0)
{
-
+
// Constructor with full HF specification.
// Override from TEveElement.
fPickable = kTRUE;
//_____________________________________________________________________________
void AliEveHF::SetProngDCA() const
-{
+{
for(Int_t ip=0; ip<fnProng; ip++)
fProngDCA[ip] = fAODobj->GetDCA(ip);
}
//______________________________________________________________________________
void AliEveHF::Setd0Prong() const
-{
+{
for(Int_t ip=0; ip<fnProng; ip++)
fProngd0[ip] = fAODobj->Getd0Prong(ip);
}
// Should be moved to TEveTrack property eventually (or AliEveTrack creation)
Double_t pid[5];
Int_t pos = -1;
-
+
for (Int_t ip=0; ip<fnProng; ip++){
- fAODobj->GetPIDProng(ip, pid);
+ fAODobj->GetPIDProng(ip, pid);
- fProngMaxProbPid[ip]=pid[0]; //lascio cosi perchè mi da errore se lo uso come puntatore
+ fProngMaxProbPid[ip]=pid[0]; //lascio cosi perchè mi da errore se lo uso come puntatore
for (Int_t pp=1; pp<5; pp++)
- if (pid[pp]>pid[pp-1]) {
+ if (pid[pp]>pid[pp-1]) {
fProngMaxProbPid[ip]=pid[pp];
pos = pp;}
switch (pos)
- {
- case 0:
+ {
+ case 0:
fProngMaxProbPdg[ip] = -11;
- case 1:
+ case 1:
fProngMaxProbPdg[ip] = -13;
- case 2:
+ case 2:
fProngMaxProbPdg[ip] = 211;
- case 3:
+ case 3:
fProngMaxProbPdg[ip] = 321;
- case 4:
+ case 4:
fProngMaxProbPdg[ip] = 2212;
}
}
-
+
}
//________________________________________________________________________________________
{
UInt_t pdg2[2];
Double_t mPDG,minv;
-
- switch (decay)
- {
+
+ switch (decay)
+ {
case 0: // D0->Kpi
pdg2[0]=211; pdg2[1]=321;
mPDG=TDatabasePDG::Instance()->GetParticle(421)->Mass();
minv = fAODobj->InvMass(fnProng,pdg2);
fInvariantMassPart=minv;
-
+
pdg2[0]=321; pdg2[1]=211;
minv = fAODobj->InvMass(fnProng,pdg2);
fInvariantMassAntiPart=minv;
break;
}
-
+
}
//______________________________________________________________________________
{
UInt_t pdg2[2];
Double_t mPDG,minv;
-
+
Bool_t retval=kFALSE;
- switch (decay)
- {
+ switch (decay)
+ {
case 0: // D0->Kpi
pdg2[0]=211; pdg2[1]=321;
mPDG=TDatabasePDG::Instance()->GetParticle(421)->Mass();
//______________________________________________________________________________
void AliEveHFList::FilterByPt(Float_t minPt, Float_t maxPt)
{
-
+
fMinPt = minPt;
fMaxPt = maxPt;
Float_t cosPointingAngle = hf->GetCosPointingAngle();
Bool_t show = cosPointingAngle >= fMinCosPointingAngle && cosPointingAngle <= fMaxCosPointingAngle;
hf->SetRnrState(show);
-
+
ElementChanged();
gEve->Redraw3D();
}
{
AliEveHF *hf = (AliEveHF*) *i;
Int_t nProng=(Int_t)hf->GetAODobj()->GetNProngs();
- for(Int_t ip = 1; ip < nProng; ++ip) {
+ for(Int_t ip = 1; ip < nProng; ++ip) {
Double_t d0 = hf->Getd0Prong(ip);
Bool_t show = d0 >= fMind0 && d0 <= fMaxd0;
hf->SetRnrState(show);
Double_t dca;
AliEveHF *hf();
-
+
for(List_i i = fChildren.begin(); i != fChildren.end(); ++i)
{
AliEveHF* hf = (AliEveHF*) *i;
Int_t nProng=(Int_t)hf->GetAODobj()->GetNProngs();
- for(Int_t ip = 1; ip < nProng; ++ip) {
+ for(Int_t ip = 1; ip < nProng; ++ip) {
dca = hf->GetProngDCA(ip);
Bool_t show = dca >= fMinDaughterDCA && dca <= fMaxDaughterDCA;
hf->SetRnrState(show);
- }
+ }
}
ElementChanged();
gEve->Redraw3D();
}
-
+
/******************************************************************************/
//______________________________________________________________________________
/*void AliEveHFList::FilterByCheckedPidMinProb(Int_t rFlag,Int_t rDaughter, Int_t rPid, Float_t rProb)
if (!rDaughter) {// Negative daughter checked
pid = hf->GetNegMaxProbPdg();
prob = hf->GetNegMaxProbPid();
- show = (pid == fNegCheckedPid && prob > fNegCheckedProb) || !rFlag ;
+ show = (pid == fNegCheckedPid && prob > fNegCheckedProb) || !rFlag ;
}
else if (rDaughter) {// Positive daughter checked
pid = hf->GetPosMaxProbPdg();
prob = hf->GetPosMaxProbPid();
- show = (pid == fPosCheckedPid && prob > fPosCheckedProb) || !rFlag ;
+ show = (pid == fPosCheckedPid && prob > fPosCheckedProb) || !rFlag ;
}
hf->SetRnrState(show);
exit }
ElementChanged();
gEve->Redraw3D();
}
-
-
Float_t GetCosPointingAngle() {return fPointingAngleHF; }
AliAODRecoDecay *GetAODobj() {return fAODobj; }
-
+
Int_t GetAODIndex() const { return fAODIndex; }
void SetAODIndex(Int_t ind) { fAODIndex = ind;}
virtual const Text_t* GetName() const { return Form("AOD_HF_%i",fAODIndex); }
virtual const Text_t* GetTitle() const { return Form("AOD_HF_%i",fAODIndex); }
-
+
//Prongs Property
Double_t GetProngDCA(Int_t iProng) { return fProngDCA[iProng]; }
Double_t Getd0Prong(Int_t iProng) { return fProngd0[iProng]; }
void Setd0Prong() const ;
-
+
void CalculateInvMass(Int_t decay);
Bool_t SelectInvMass(Int_t decay, Float_t decayCuts);
-
+
void SetMaxProbPdgPid();
Int_t GetPdgProngMaxProb(Int_t iProng) { return fProngMaxProbPdg[iProng]; }
Double_t GetPidProngMaxProb(Int_t iProng) { return fProngMaxProbPid[iProng]; }
-
+
TEveTrackPropagator* GetPropagator() const { return fRnrStyle; }
TEveTrack* GetNegTrack() { return fNegTrack; }
protected:
- AliAODRecoDecay *fAODobj;
+ AliAODRecoDecay *fAODobj;
TEveVector fRecBirthHF; // Reconstucted birth point of neutral particle
TEveVector fRecDecayHF; // Point of closest approach
TEveVector fRecDecayP_HF;
- Double_t fPointingAngleHF; // Track Pointing Angle
+ Double_t fPointingAngleHF; // Track Pointing Angle
TEveTrack *fNegTrack;
TEveTrack *fPosTrack;
Int_t fAODIndex; // Index in HF loop array.
Double_t fChi2SecondVtx; //Secondary Vertex Chi-square.
- Double_t *fProngDCA;//[fnProng] Distance at the point of closest approach.
- Double_t *fProngd0;//[fnProng] Impact Paramter if each prong.
+ Double_t *fProngDCA;//[fnProng] Distance at the point of closest approach.
+ Double_t *fProngd0;//[fnProng] Impact Paramter if each prong.
Int_t *fProngMaxProbPdg;//[fnProng] Maximum PDG probability for the negative daughter
Double_t *fProngMaxProbPid;//[fnProng] Maximum PID probability for the negative daughter
-
+
Double_t fInvariantMassPart;
Double_t fInvariantMassAntiPart;
Int_t fDecay;
-
+
private:
AliEveHF(const AliEveHF&); // Not implemented
AliEveHF& operator=(const AliEveHF&); // Not implemented
-
+
ClassDef(AliEveHF,0); // Visual representation of a AliEveHF.
};
virtual const Text_t* GetTitle() const { return fTitle; }
virtual void SetTitle(const Text_t* t) { fTitle = t; }
- virtual void SetTracksColor(Color_t cNeg, Color_t cPos, Int_t ip)
+ virtual void SetTracksColor(Color_t cNeg, Color_t cPos, Int_t ip)
{fProngColor[ip] = cNeg; fProngColor[ip++] = cPos;}
virtual Bool_t CanEditMainColor() const { return kTRUE; }
void FilterByDCA(Float_t minDaughterDCA, Float_t maxDaughterDCA);
void FilterByd0(Float_t mind0, Float_t maxd0);
//void FilterByCheckedPidMinProb(Int_t rFlag, Int_t rDaughter, Int_t rPid, Float_t rProb);
-
+
// void SetProngCheckedPid(Int_t rProngCheckedPid) const;
Int_t GetProngCheckedPid(Int_t iProng) {return fProngCheckedPid[iProng];}
// void SetProngCheckedProb(Float_t rProngCheckedProb) const;
Float_t fMinCosPointingAngle;
Float_t fMaxCosPointingAngle;
-
+
Float_t fMind0;
Float_t fMaxd0;
Int_t* fProngCheckedPid;//[fnProng]
Float_t* fProngCheckedProb;//[fnProng]
-
+
Float_t fDeltaInvariantMass;
Int_t fDecay;
#endif
-
// Set values of widgets
fInfoLabel0->SetText(Form("CosPointingAngle = %f", fM->GetCosPointingAngle()));
fInfoLabel1->SetText(Form("Pt = %f", fM->GetPt()));
-
+
fInfoLabel2->SetText(Form("PDG Invariant Mass = %f", TDatabasePDG::Instance()->GetParticle(421)->Mass()));
-
+
}
/******************************************************************************/
Int_t daughterIndex = 0;
TEvePointSet *negDaughterCluster = 0;
TEvePointSet *posDaughterCluster = 0;
-
+
daughterIndex = negTrack->GetIndex();
sprintf(macroWithIndex,"clusters_from_index(%d)",daughterIndex);
Long_t negResult = gInterpreter->ProcessLine(macroWithIndex);
if (negResult) {
negDaughterCluster = reinterpret_cast<TEvePointSet*>(negResult);
if (negDaughterCluster){
- negDaughterCluster->SetMarkerStyle(4);
- negDaughterCluster->SetMarkerSize(1.5);
+ negDaughterCluster->SetMarkerStyle(4);
+ negDaughterCluster->SetMarkerSize(1.5);
negDaughterCluster->SetMarkerColor(kBlue+3);
}
}
if (posResult) {
posDaughterCluster = reinterpret_cast<TEvePointSet*>(posResult);
if (posDaughterCluster){
- posDaughterCluster->SetMarkerStyle(4);
- posDaughterCluster->SetMarkerSize(1.5);
+ posDaughterCluster->SetMarkerStyle(4);
+ posDaughterCluster->SetMarkerSize(1.5);
posDaughterCluster->SetMarkerColor(kRed+3);
}
}
if (posDaughterCluster) bpScene->AddElement(posDaughterCluster);
// This is the to-do list for the bending plane:
- // 1. fix the view to orthographic XOY (no rotation allowed but moving the center ok) ->done!
+ // 1. fix the view to orthographic XOY (no rotation allowed but moving the center ok) ->done!
// 2. show axis and tickles along X and Y ->done!
// -> note for the projection the cartesian scales are not very useful
// -> propose a phi and R scale which rotates with a reset at 0;
// This part is for displaying the information
//
slot = pack->NewSlot();
-
+
TEveWindowFrame *frame = slot->MakeFrame(new TRootEmbeddedCanvas());
frame->SetElementName("Details");
TLatex* ltx = new TLatex(0.05, 0.9, info);
ltx->SetTextSize(0.08);
ltx->DrawLatex(0.05, 0.8, info);
-
+
sprintf(info,"p_{T} = %.3f [GeV/c]",fM->GetPt());
ltx->DrawLatex(0.05, 0.7, info);
ltx->DrawLatex(0.05, 0.6, info);
sprintf(info, "D^{0} inv. mass = %.3f", fM->GetInvariantMassPart());
- ltx->DrawLatex(0.05, 0.5, info);
+ ltx->DrawLatex(0.05, 0.5, info);
sprintf(info, "D^{0}bar inv. mass = %.3f", fM->GetInvariantMassAntiPart());
- ltx->DrawLatex(0.05, 0.4, info);
+ ltx->DrawLatex(0.05, 0.4, info);
gEve->Redraw3D();
}
TGLabel *fInfoLabel0; // label
TGLabel *fInfoLabel1; // label
- TGLabel *fInfoLabel2; // label
+ TGLabel *fInfoLabel2; // label
TGButton *fXButton;
fMinMaxCosPointingAngle->Connect("ValueSet()", "AliEveHFListEditor", this, "DoMinMaxCosPointingAngle()");
AddFrame(fMinMaxCosPointingAngle, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
-
+
fValueInvMass = new TEveGDoubleValuator(this, "Invariant Mass:", 80, 0);
fValueInvMass->SetNELength(5);
fValueInvMass->SetLabelWidth(120);
fValueInvMass->GetSlider()->SetWidth(200);
fValueInvMass->SetLimits(0,1, TGNumberFormat::kNESRealTwo);
fValueInvMass->Connect("ValueSet()", "AliEveHFListEditor", this, "DoMinMaxInvMass()");
- AddFrame(fValueInvMass, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
-
+ AddFrame(fValueInvMass, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
+
}
void DoMinMaxPt();
void DoMinMaxCosPointingAngle();
void DoMinMaxInvMass();
-
+
protected:
AliEveHFList *fM; // Model object.
// Declare widgets
-
+
TEveGDoubleValuator* fMinMaxPt;
TEveGDoubleValuator* fMinMaxCosPointingAngle;
TEveGDoubleValuator* fValueInvMass;
* full copyright notice. *
**************************************************************************/
-class AliAODRecoDecayHF;
+class AliAODRecoDecayHF;
void aod_hf_init_rectrack(TEveRecTrack& rt, AliExternalTrackParam* tp)
{
AliEveHF* aod_make_HF(TEveTrackPropagator* rnrStyle, AliAODVertex* primAODVtx,
AliESDtrack* neg, AliESDtrack* pos, AliAODRecoDecayHF* rd, Int_t i)
-{
+{
TEveRecTrack rcPos;
TEveRecTrack rcNeg;
//TEveRecV0 rcV0;
- /*Double_t p[3];
- p[0]=rd->PxProng(0); p[1]=rd->PyProng(0); p[2]=rd->PzProng(0);
- rcV0.fPPos.Set(p);
- p[0]=rd->PxProng(1); p[1]=rd->PyProng(1); p[2]=rd->PzProng(1);
- rcV0.fPNeg.Set(p);
+ /*
+ Double_t p[3];
+ p[0]=rd->PxProng(0); p[1]=rd->PyProng(0); p[2]=rd->PzProng(0);
+ rcV0.fPPos.Set(p);
+ p[0]=rd->PxProng(1); p[1]=rd->PyProng(1); p[2]=rd->PzProng(1);
+ rcV0.fPNeg.Set(p);
- p[0]=rd->Px(); p[1]=rd->Py(); p[2]=rd->Pz();
+ p[0]=rd->Px(); p[1]=rd->Py(); p[2]=rd->Pz();
*/
-
- Double_t primVtx[3]={primAODVtx->GetX(), primAODVtx->GetY(), primAODVtx->GetZ(),};
-
+
+ Double_t primVtx[3]={primAODVtx->GetX(), primAODVtx->GetY(), primAODVtx->GetZ()};
+
Double_t v[3] = {rd->Xv(),rd->Yv(),rd->Zv()};
printf("vertex %f %f %f\n",v[0],v[1],v[2]);
-
+
aod_hf_init_rectrack(rcNeg, neg);
//rcNeg.fIndex = v0->GetNindex();
aod_hf_init_rectrack(rcPos, pos);
AliEveHF* myHF = new AliEveHF(&rcNeg, &rcPos, primVtx ,rd, v, rnrStyle);
myHF->SetElementName(Form("D0->Kpi %d", i));
- myHF->SetElementTitle(Form("CosPointingAngle %f",
- rd->CosPointingAngle()));
+ myHF->SetElementTitle(Form("CosPointingAngle %f", rd->CosPointingAngle()));
myHF->SetAODIndex(i);
return myHF;
}
AliEveHFList* aod_HF()
-{ Bool_t useParFiles=kFALSE;
+{
+ Bool_t useParFiles=kFALSE;
gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");
LoadLibraries(useParFiles);
-
-
+
AliAODEvent* aod = AliEveEventManager::AssertAOD();
AliESDEvent* esd = AliEveEventManager::AssertESD();
-
- /*gSystem->Load("libANALYSIS");
- gSystem->Load("libANALYSISalice");
- gSystem->Load("libCORRFW");
- gSystem->Load("libPWG3base");
- gSystem->Load("libPWG3vertexingHF");
+ /*
+ gSystem->Load("libANALYSIS");
+ gSystem->Load("libANALYSISalice");
+ gSystem->Load("libCORRFW");
+ gSystem->Load("libPWG3base");
+ gSystem->Load("libPWG3vertexingHF");
*/
// load MC particles
- TClonesArray *mcArray =
- (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
- if(!mcArray) {
+ TClonesArray *mcArray =
+ (TClonesArray*) aod->FindListObject(AliAODMCParticle::StdBranchName());
+ if (!mcArray) {
printf("MC particles branch not found!\n");
return;
}
-
AliAODVertex* primVtx_aod = (AliAODVertex*) aod->GetPrimaryVertex();
// AliESDVertex *primVtx_esd = (AliESDVertex*) esd->GetPrimaryVertex();
-
AliEveHFList* cont = new AliEveHFList("AOD HF vertices");
cont->SetMainColor(2);
TEveTrackPropagator* rnrStyle = cont->GetPropagator();
TEvePointSet* pointsD0toKpi = new TEvePointSet("D0->Kpi vertex locations");
// load D0->Kpi candidates
- TClonesArray *arrayD0toKpi = (TClonesArray*)aod->GetList()->FindObject("D0toKpi");
-
+ TClonesArray *arrayD0toKpi = (TClonesArray*) aod->FindListObject("D0toKpi");
+
// load 3prong candidates
- // TClonesArray *array3Prong =
- // (TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
+ // TClonesArray *array3Prong =
+ // (TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
Int_t countD0 = 0;
- for (Int_t iD0toKpi=0; iD0toKpi<(arrayD0toKpi->GetEntriesFast()); iD0toKpi++) {
+ for (Int_t iD0toKpi=0; iD0toKpi<arrayD0toKpi->GetEntriesFast(); iD0toKpi++)
+ {
AliAODRecoDecayHF2Prong *rd = (AliAODRecoDecayHF2Prong*)arrayD0toKpi->UncheckedAt(iD0toKpi);
Bool_t unsetvtx=kFALSE;
- if(!rd->GetOwnPrimaryVtx()) {
+ if (!rd->GetOwnPrimaryVtx()) {
rd->SetOwnPrimaryVtx(primVtx_aod);
unsetvtx=kTRUE;
- }
+ }
// REAL D0 particle. If you want to draw only real D0 un-comment these lines
//Int_t labD0 = rd->MatchToMC(421,mcArray);
//if(labD0<0) continue;
- AliAODTrack* negAODTr = rd->GetDaughter(0);
- AliAODTrack* posAODTr = rd->GetDaughter(1);
-
- AliVVertex *secv = rd->GetSecondaryVtx();
+ AliAODTrack *negAODTr = rd->GetDaughter(0);
+ AliAODTrack *posAODTr = rd->GetDaughter(1);
+
+ AliVVertex *secv = rd->GetSecondaryVtx();
AliESDtrack *negTr = new AliESDtrack(negAODTr);
AliESDtrack *posTr = new AliESDtrack(posAODTr);
if(unsetvtx) {
rd->UnsetOwnPrimaryVtx();
- }
-
+ }
}
//cont->SetTitle("test");
cont->MakeHFs();
gEve->Redraw3D();
- pointsD0toKpi->SetTitle(Form("N=%d",pointsD0toKpi->Size()));
+ pointsD0toKpi->SetTitle(Form("N=%d", pointsD0toKpi->Size()));
pointsD0toKpi->SetMarkerStyle(4);
pointsD0toKpi->SetMarkerSize(1.5);
pointsD0toKpi->SetMarkerColor(kViolet);
return cont;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
gShowTRD = gShowMUON = gShowMUONRPhi = gShowMUONRhoZ = kFALSE;
}
+ AliEveEventManager::AddAODfriend("AliAOD.VertexingHF.root");
+
TEveUtil::LoadMacro("alieve_init.C");
alieve_init(".", -1);
exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TPC", "vplot_tpc.C+", "vplot_tpc", "", kFALSE));
+ exec->AddMacro(new AliEveMacro(AliEveMacro::kAOD, "ANA HF", "aod_HF.C", "aod_HF", "", kFALSE));
exec->AddMacro(new AliEveMacro(AliEveMacro::kAOD, "ANA Jets", "jetplane.C", "jetplane", "", kFALSE));
//==============================================================================