* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Particle modified by PHOS response to be used by AliPHOSvFast
-//*-- Y. Schutz: SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// A Particle modified by PHOS response and produced by AliPHOSvFast
+// To become a general class of AliRoot ?
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
// --- Standard library ---
-#include <iostream>
+#include <iostream.h>
// --- AliRoot header files ---
#include "TPad.h"
#include "TPaveText.h"
-ClassImp(AliPHOSFastRecParticle)
+ClassImp(AliPHOSFastRecParticle) ;
//____________________________________________________________________________
AliPHOSFastRecParticle::AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp)
{
+ // copy ctor
+
fType = rp.fType ;
-// fPdgCode = rp.fPdgCode;
-// fStatusCode = rp.fStatusCode;
-// fMother[0] = rp.fMother[0];
-// fMother[1] = rp.fMother[1];
-// fDaughter[0] = rp.fDaughter[0];
-// fDaughter[1] = rp.fDaughter[1];
-// fWeight = rp.fWeight;
-// fCalcMass = rp.fCalcMass;
-// fPx = rp.fPx;
-// fPy = rp.fPy;
-// fPz = rp.fPz;
-// fE = rp.fE;
-// fVx = rp.fVx;
-// fVy = rp.fVy;
-// fVz = rp.fVz;
-// fVt = rp.fVt;
-// fPolarTheta = rp.fPolarTheta;
-// fPolarPhi = rp.fPolarPhi;
-// fParticlePDG = rp.fParticlePDG;
+ fPdgCode = rp.fPdgCode;
+ fStatusCode = rp.fStatusCode;
+ fMother[0] = rp.fMother[0];
+ fMother[1] = rp.fMother[1];
+ fDaughter[0] = rp.fDaughter[0];
+ fDaughter[1] = rp.fDaughter[1];
+ fWeight = rp.fWeight;
+ fCalcMass = rp.fCalcMass;
+ fPx = rp.fPx;
+ fPy = rp.fPy;
+ fPz = rp.fPz;
+ fE = rp.fE;
+ fVx = rp.fVx;
+ fVy = rp.fVy;
+ fVz = rp.fVz;
+ fVt = rp.fVt;
+ fPolarTheta = rp.fPolarTheta;
+ fPolarPhi = rp.fPolarPhi;
+ fParticlePDG = rp.fParticlePDG;
}
//____________________________________________________________________________
AliPHOSFastRecParticle::AliPHOSFastRecParticle(const TParticle & pp)
{
- TParticle & pnoconst = const_cast<TParticle &>(pp) ;
- AliPHOSFastRecParticle & p = static_cast<AliPHOSFastRecParticle&>(pnoconst) ;
+ // ctor from a TParticle (crummy?!)
+
+ TParticle & pnoconst = (TParticle &)(pp) ;
+ AliPHOSFastRecParticle & p = (AliPHOSFastRecParticle &)(pnoconst) ;
fPdgCode = p.fPdgCode;
fStatusCode = p.fStatusCode;
fParticlePDG = p.fParticlePDG;
}
-//____________________________________________________________________________
- AliPHOSFastRecParticle::~AliPHOSFastRecParticle()
-{
-}
-
//____________________________________________________________________________
Int_t AliPHOSFastRecParticle::DistancetoPrimitive(Int_t px, Int_t py)
{
{
// Execute action corresponding to one event
// This member function is called when a AliPHOSFastRecParticle is clicked with the locator
- //
-
+
if (!gPad->IsEditable())
return ;
}
}
+
+//____________________________________________________________________________
+Int_t * AliPHOSFastRecParticle::GetPrimaries(Int_t & number)
+{
+ // Retrieves the unique primary particle at the origine of the present reconstruced particle
+
+ number = 1 ;
+ Int_t * list = new Int_t[1] ;
+ list[0] = fPrimary ;
+
+ return list ;
+}
+
//____________________________________________________________________________
TString AliPHOSFastRecParticle::Name()
{
+ // Returns the name of the particle type
+
TString name ;
switch (fType) {
case kGAMMA:
case kELECTRON:
name = "ELECTRON" ;
break ;
- case kNEUTRAL:
- name = "NEUTRAL" ;
- break ;
- case kCHARGEDHADRON:
- name = "CHARGED HADRON" ;
+ case kCHARGEDHA:
+ name = "CHARGED_HA" ;
break ;
- case kNEUTRALHADRON:
- name = "NEUTRAL HADRON" ;
+ case kNEUTRALHA:
+ name = "NEUTRAL_HA" ;
break ;
case kNEUTRALEM:
- name = "NEUTRAL EM" ;
+ name = "NEUTRAL_EM" ;
break ;
- case kGAMMAHADRON:
- name = "PHOTON HADRON" ;
+ case kGAMMAHA:
+ name = "PHOTON_HA" ;
break ;
}
//______________________________________________________________________________
void AliPHOSFastRecParticle::Paint(Option_t *)
{
-// Paint this ALiRecParticle in theta,phi coordinate as a TMarker with its current attributes
+ // Paint this ALiRecParticle in theta,phi coordinate as a TMarker with its current attributes
Double_t kRADDEG = 180. / TMath::Pi() ;
- Coord_t x = Phi() * kRADDEG ;
- Coord_t y = Theta() * kRADDEG ;
- Color_t markercolor = 1 ;
- Size_t markersize = 1. ;
- Style_t markerstyle = 5 ;
-
- if (!gPad->IsBatch()) {
- gVirtualX->SetMarkerColor(markercolor) ;
- gVirtualX->SetMarkerSize (markersize) ;
- gVirtualX->SetMarkerStyle(markerstyle) ;
- }
- gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
- gPad->PaintPolyMarker(1,&x,&y,"") ;
+ Coord_t x = Phi() * kRADDEG ;
+ Coord_t y = Theta() * kRADDEG ;
+ Color_t markercolor = 1 ;
+ Size_t markersize = 1. ;
+ Style_t markerstyle = 5 ;
+
+ if (!gPad->IsBatch()) {
+ gVirtualX->SetMarkerColor(markercolor) ;
+ gVirtualX->SetMarkerSize (markersize) ;
+ gVirtualX->SetMarkerStyle(markerstyle) ;
+ }
+ gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+ gPad->PaintPolyMarker(1,&x,&y,"") ;
}
//____________________________________________________________________________
void AliPHOSFastRecParticle::Print()
{
+ // Print the typr, energy and momentum
+
cout << "AliPHOSFastRecParticle > " << "type is " << Name() << endl
<< " " << "Energy = " << fE << endl
<< " " << "Px = " << fPx << endl