* 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)
{
- fType = rp.fType ;
+ // copy ctor
+
+ fType = rp.fType ;
fPdgCode = rp.fPdgCode;
fStatusCode = rp.fStatusCode;
fMother[0] = rp.fMother[0];
//____________________________________________________________________________
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;
fPolarTheta = p.fPolarTheta;
fPolarPhi = p.fPolarPhi;
fParticlePDG = p.fParticlePDG;
-}
-//____________________________________________________________________________
- AliPHOSFastRecParticle::~AliPHOSFastRecParticle()
-{
}
//____________________________________________________________________________
{
// Execute action corresponding to one event
// This member function is called when a AliPHOSFastRecParticle is clicked with the locator
- //
-
+
if (!gPad->IsEditable())
return ;
delete clustertext ;
clustertext = 0 ;
gPad->Update() ;
- break ;
+ break ;
}
-
}
-
}
+
//____________________________________________________________________________
TString AliPHOSFastRecParticle::Name()
{
+ // Returns the name of the particle type
+
TString name ;
switch (fType) {
- case kGAMMA:
+ case kNEUTRALEMFAST:
name = "PHOTON" ;
break ;
- case kELECTRON:
+ case kCHARGEDEMFAST:
name = "ELECTRON" ;
break ;
- case kNEUTRAL:
- name = "NEUTRAL" ;
+ case kCHARGEDHAFAST:
+ name = "CHARGED_HA_FAST" ;
break ;
- case kCHARGEDHADRON:
- name = "CHARGED HADRON" ;
+ case kNEUTRALHASLOW:
+ name = "NEUTRAL_HA_SLOW" ;
break ;
- case kNEUTRALHADRON:
- name = "NEUTRAL HADRON" ;
+ case kNEUTRALEMSLOW:
+ name = "NEUTRAL_EM_SLOW" ;
break ;
- case kNEUTRALEM:
- name = "NEUTRAL EM" ;
- break ;
- case kGAMMAHADRON:
- name = "PHOTON HADRON" ;
+ case kNEUTRALHAFAST:
+ name = "NEUTRAL_HA_FAST" ;
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()
+void AliPHOSFastRecParticle::Print(const char * opt)
{
+ // Print the type, energy and momentum of the reconstructed particle
+
cout << "AliPHOSFastRecParticle > " << "type is " << Name() << endl
<< " " << "Energy = " << fE << endl
<< " " << "Px = " << fPx << endl