#include "AliMagF.h"
#include "AliTracker.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
#include "AliESDtrack.h"
#include "AliESDfriend.h"
#include "AliESDfriendTrack.h"
+#include "AliMathBase.h"
#include "AliTPCseed.h"
#include "AliTPCclusterMI.h"
AliTPCcalibV0::AliTPCcalibV0() :
- TNamed(),
- fDebugStream(0),
+ AliTPCcalibBase(),
fStack(0),
- fOutput(0),
fESD(0),
fPdg(0),
fParticles(0),
fTPCdEdxEl(0),
fTPCdEdxP(0)
{
- G__SetCatchException(0);
- fDebugStream = new TTreeSRedirector("V0debug.root");
- fPdg = new TDatabasePDG;
-
-
+ fPdg = new TDatabasePDG;
// create output histograms
fTPCdEdx = new TH2F("TPCdEdX", "dE/dX; BetaGamma; TPC signal (a.u.)", 1000, 0.1, 10000, 300, 0, 300);
BinLogX(fTPCdEdx);
//
//
//
- delete fDebugStream;
}
-void AliTPCcalibV0::ProofSlaveBegin(TList * output)
-{
- // Called on PROOF - fill output list
-}
-void AliTPCcalibV0::ProcessESD(AliESD *esd, AliStack *stack){
+void AliTPCcalibV0::ProcessESD(AliESDEvent *esd, AliStack *stack){
//
//
//
//
Int_t sentries=fParticles->GetEntries();;
for (Int_t ipart=0; ipart<sentries; ipart++){
- TParticle *part = (TParticle*)fParticles->At(ipart);
+ part = (TParticle*)fParticles->At(ipart);
TParticle *p0 = 0;
TParticle *p1 = 0;
Float_t chi2C = v0kf->GetChi2();
//
//
- (*fDebugStream)<<"MCRC"<<
- "P.="<<part<<
- "type="<<type<<
- "chi2="<<chi2<<
- "chi2C="<<chi2C<<
- "minpt="<<minpt<<
- "id0="<<id0<<
- "id1="<<id1<<
- "Pn.="<<pn<<
- "Pp.="<<pp<<
- "tn.="<<trackN<<
- "tp.="<<trackP<<
- "nold.="<<nold<<
- "nnew.="<<nnew<<
- "v0.="<<v0<<
- "v0kf.="<<v0kf<<
- "v0kfc.="<<v0kfc<<
- "\n";
- delete v0kf;
- delete v0kfc;
- //
+ TTreeSRedirector *cstream = GetDebugStreamer();
+ if (cstream){
+ (*cstream)<<"MCRC"<<
+ "P.="<<part<<
+ "type="<<type<<
+ "chi2="<<chi2<<
+ "chi2C="<<chi2C<<
+ "minpt="<<minpt<<
+ "id0="<<id0<<
+ "id1="<<id1<<
+ "Pn.="<<pn<<
+ "Pp.="<<pp<<
+ "tn.="<<trackN<<
+ "tp.="<<trackP<<
+ "nold.="<<nold<<
+ "nnew.="<<nnew<<
+ "v0.="<<v0<<
+ "v0kf.="<<v0kf<<
+ "v0kfc.="<<v0kfc<<
+ "\n";
+ delete v0kf;
+ delete v0kfc;
+ //
+ }
+
+ if (cstream){
+ (*cstream)<<"MC"<<
+ "P.="<<part<<
+ "charge="<<charge<<
+ "type="<<type<<
+ "minpt="<<minpt<<
+ "id0="<<id0<<
+ "id1="<<id1<<
+ "P0.="<<p0<<
+ "P1.="<<p1<<
+ "nold="<<nold<<
+ "nnew="<<nnew<<
+ "\n";
+ }
}
- (*fDebugStream)<<"MC"<<
- "P.="<<part<<
- "charge="<<charge<<
- "type="<<type<<
- "minpt="<<minpt<<
- "id0="<<id0<<
- "id1="<<id1<<
- "P0.="<<p0<<
- "P1.="<<p1<<
- "nold="<<nold<<
- "nnew="<<nnew<<
- "\n";
+ fParticles->Delete();
}
- fParticles->Delete();
-
}
// Float_t betaGammaP = trackN->GetP()/fPdg->GetParticle(-2212)->Mass();
// Float_t betaGammaPi = trackN->GetP()/fPdg->GetParticle(-211)->Mass();
// Float_t betaGammaEl = trackN->GetP()/fPdg->GetParticle(11)->Mass();
-// Float_t dedxTeorP = TPCBetheBloch(betaGammaP);
-// Float_t dedxTeorPi = TPCBetheBloch(betaGammaPi);;
-// Float_t dedxTeorEl = TPCBetheBloch(betaGammaEl);;
+// Float_t dedxTeorP = BetheBlochAleph(betaGammaP);
+// Float_t dedxTeorPi = BetheBlochAleph(betaGammaPi);;
+// Float_t dedxTeorEl = BetheBlochAleph(betaGammaEl);;
// //
// //
// if (minChi2>50) continue;
//
// write output tree
if (minChi2>50) continue;
- (*fDebugStream)<<"V0"<<
- "ftype="<<ftype<<
- "v0.="<<v0<<
- "trackN.="<<trackN<<
- "trackP.="<<trackP<<
- //
- "betaGamma0="<<betaGamma0<<
- "betaGamma1="<<betaGamma1<<
- //
- "type="<<type<<
- "chi2C="<<minChi2C<<
- "v0K0.="<<v0K0<<
- "v0Gamma.="<<v0Gamma<<
- "v0Lambda42.="<<v0Lambda42<<
- "v0Lambda24.="<<v0Lambda24<<
- //
- "chi20K0.="<<chi2K0<<
- "chi2Gamma.="<<chi2Gamma<<
- "chi2Lambda42.="<<chi2Lambda42<<
- "chi2Lambda24.="<<chi2Lambda24<<
- //
- "chi20K0c.="<<chi2K0C<<
- "chi2Gammac.="<<chi2GammaC<<
- "chi2Lambda42c.="<<chi2Lambda42C<<
- "chi2Lambda24c.="<<chi2Lambda24C<<
- //
- "v0K0C.="<<v0K0C<<
- "v0GammaC.="<<v0GammaC<<
- "v0Lambda42C.="<<v0Lambda42C<<
- "v0Lambda24C.="<<v0Lambda24C<<
- //
- "massK0="<<massK0<<
- "massGamma="<<massGamma<<
- "massLambda42="<<massLambda42<<
- "massLambda24="<<massLambda24<<
- //
- "timeK0="<<timeK0<<
- "timeLambda42="<<timeLambda42<<
- "timeLambda24="<<timeLambda24<<
- "\n";
+ TTreeSRedirector *cstream = GetDebugStreamer();
+ if (cstream){
+ (*cstream)<<"V0"<<
+ "ftype="<<ftype<<
+ "v0.="<<v0<<
+ "trackN.="<<trackN<<
+ "trackP.="<<trackP<<
+ //
+ "betaGamma0="<<betaGamma0<<
+ "betaGamma1="<<betaGamma1<<
+ //
+ "type="<<type<<
+ "chi2C="<<minChi2C<<
+ "v0K0.="<<v0K0<<
+ "v0Gamma.="<<v0Gamma<<
+ "v0Lambda42.="<<v0Lambda42<<
+ "v0Lambda24.="<<v0Lambda24<<
+ //
+ "chi20K0.="<<chi2K0<<
+ "chi2Gamma.="<<chi2Gamma<<
+ "chi2Lambda42.="<<chi2Lambda42<<
+ "chi2Lambda24.="<<chi2Lambda24<<
+ //
+ "chi20K0c.="<<chi2K0C<<
+ "chi2Gammac.="<<chi2GammaC<<
+ "chi2Lambda42c.="<<chi2Lambda42C<<
+ "chi2Lambda24c.="<<chi2Lambda24C<<
+ //
+ "v0K0C.="<<v0K0C<<
+ "v0GammaC.="<<v0GammaC<<
+ "v0Lambda42C.="<<v0Lambda42C<<
+ "v0Lambda24C.="<<v0Lambda24C<<
+ //
+ "massK0="<<massK0<<
+ "massGamma="<<massGamma<<
+ "massLambda42="<<massLambda42<<
+ "massLambda24="<<massLambda24<<
+ //
+ "timeK0="<<timeK0<<
+ "timeLambda42="<<timeLambda42<<
+ "timeLambda24="<<timeLambda24<<
+ "\n";
+ }
if (type==1) fGammas->AddLast(v0);
//
//
Double_t n1 = TMath::Sqrt (m0[0]*m0[0] + m0[1]*m0[1] + m0[2]*m0[2]);
Double_t n2 = TMath::Sqrt (m1[0]*m1[0] + m1[1]*m1[1] + m1[2]*m1[2]);
Double_t mass = TMath::Sqrt(2.*(n1*n2 - (m0[0]*m1[0] + m0[1]*m1[1] + m0[2]*m1[2])));
- (*fDebugStream)<<"PI0"<<
- "v00.="<<v00<<
- "v01.="<<v01<<
- "mass="<<mass<<
- "p00.="<<p00<<
- "p01.="<<p01<<
- "pi0.="<<&pi0<<
- "\n";
+ TTreeSRedirector *cstream = GetDebugStreamer();
+ if (cstream){
+ (*cstream)<<"PI0"<<
+ "v00.="<<v00<<
+ "v01.="<<v01<<
+ "mass="<<mass<<
+ "p00.="<<p00<<
+ "p01.="<<p01<<
+ "pi0.="<<&pi0<<
+ "\n";
+ }
}
delete p01;
}
-AliKFParticle * AliTPCcalibV0::Fit(AliKFVertex & primVtx, AliESDv0 *v0, Int_t PDG1, Int_t PDG2){
+AliKFParticle * AliTPCcalibV0::Fit(AliKFVertex & /*primVtx*/, AliESDv0 *v0, Int_t PDG1, Int_t PDG2){
//
// Make KF Particle
//
return V0;
}
-
-
-Float_t AliTPCcalibV0::TPCBetheBloch(Float_t bg)
-{
- //
- // Bethe-Bloch energy loss formula
- //
- const Double_t kp1=0.76176e-1;
- const Double_t kp2=10.632;
- const Double_t kp3=0.13279e-4;
- const Double_t kp4=1.8631;
- const Double_t kp5=1.9479;
- Double_t dbg = (Double_t) bg;
- Double_t beta = dbg/TMath::Sqrt(1.+dbg*dbg);
- Double_t aa = TMath::Power(beta,kp4);
- Double_t bb = TMath::Power(1./dbg,kp5);
- bb=TMath::Log(kp3+bb);
- return ((Float_t)((kp2-aa-bb)*kp1/aa));
-}
-
-
-
-
-
-
-
TH2F * AliTPCcalibV0::GetHistograms() {
//
//