// --- Standard library ---
-#include <iostream.h>
-
// --- AliRoot header files ---
#include "AliPHOSFastRecParticle.h"
ClassImp(AliPHOSFastRecParticle) ;
+//____________________________________________________________________________
+AliPHOSFastRecParticle::AliPHOSFastRecParticle() : TParticle()
+{
+ // ctor
+ fType = 0 ;
+}
+
//____________________________________________________________________________
AliPHOSFastRecParticle::AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp)
{
// copy ctor
- fType = rp.fType ;
+ fType = rp.fType ;
fPdgCode = rp.fPdgCode;
fStatusCode = rp.fStatusCode;
fMother[0] = rp.fMother[0];
TParticle & pnoconst = (TParticle &)(pp) ;
AliPHOSFastRecParticle & p = (AliPHOSFastRecParticle &)(pnoconst) ;
-
+ fType = 0 ;
fPdgCode = p.fPdgCode;
fStatusCode = p.fStatusCode;
fMother[0] = p.fMother[0];
{
// Execute action corresponding to one event
// This member function is called when a AliPHOSFastRecParticle is clicked with the locator
-
+
if (!gPad->IsEditable())
return ;
-
+
static TPaveText * clustertext = 0 ;
-
+
switch (event) {
case kButton1Down: {
break ;
}
}
+
}
//____________________________________________________________________________
-TString AliPHOSFastRecParticle::Name()
+TString AliPHOSFastRecParticle::Name()const
{
- // Returns the name of the particle type
-
- TString name ;
- switch (fType) {
- case kGAMMA:
- name = "PHOTON" ;
- break ;
- case kELECTRON:
- name = "ELECTRON" ;
- break ;
- case kCHARGEDHA:
- name = "CHARGED_HA" ;
- break ;
- case kNEUTRALHA:
- name = "NEUTRAL_HA" ;
- break ;
- case kNEUTRALEM:
- name = "NEUTRAL_EM" ;
- break ;
- case kGAMMAHA:
- name = "PHOTON_HA" ;
- break ;
+ // Returns the name of the particle type (only valid if PIDv1 is employed)
- }
+ TString name ;
+
+ if(fType == 127)
+ name = "PHOTON_LOPU_HIEF" ; //PCA = 001 TOF = 111 CPV = 111
+
+ if(fType == 511)
+ name = "PHOTON_HIPU_LOEF" ; //PCA = 011 TOF = 111 CPV = 111
+
+ if(fType == 255)
+ name = "PHOTON_MED_PU_EF" ; //PCA = 111 TOF = 111 CPV = 111
+
+ if((fType == 383)||(fType == 447))
+ name = "PHOTON_STRANGE" ; //PCA = 101 or 110 TOF = 111 CPV = 111
+
+ if(fType == 63)
+ name = "NEUTRAL_FAST_HADRON" ; //PCA = 000 TOF = 111 CPV = 111
+
+ if((fType == 504) || (fType == 505) ||(fType == 248)||(fType == 249)||(fType == 120)||(fType == 121))
+ name = "CHARGED_FAST_EM" ; //PCA = 111, 011 or 001 TOF =111 CPV = 000 or 001
+
+ if((fType == 56)||(fType == 57))
+ name = "CHARGED_FAST_HADRON" ; //PCA = 000 TOF = 111 CPV = 000 or 001
+
+ if((fType < 8)&&(fType > 0))
+ name = "NEUTRAL_SLOW_HADRON" ; //PCA = 000 TOF = 000 CPV = 001 or 011 or 111
+
+ if((fType == 0))
+ name = "CHARGED_SLOW_HADRON" ; //PCA = 000 TOF = 000 CPV = 000
+
+ if((fType == 448) || (fType == 449) ||(fType == 192)||(fType == 193)||(fType == 64)||(fType == 64))
+ name = "CHARGED_SLOW_EM" ; //PCA = 111, 011 or 001 TOF =000 CPV = 000 or 001
+
return name ;
}
+
+//______________________________________________________________________________
+void AliPHOSFastRecParticle::SetType(Int_t type) {
+ // sets the particle type
+ fType = type ;
+
+ if((type == 127) || (fType == 511) || (fType == 255) ||(fType == 383)||(fType == 447)){
+ fPdgCode = 22 ;
+ return ;
+ }
+
+ if ((fType == 63)|| ((fType < 8)&&(fType > 0)) ){
+ fPdgCode = 2112 ;
+ return ;
+ }
+ if ( ((fType == 504) || (fType == 505) ||(fType == 248)||(fType == 249)||(fType == 120)||(fType == 121)) ){
+ fPdgCode = 11 ;
+ return ;
+ }
+ if ((fType == 448) || (fType == 449) ||(fType == 192)||(fType == 193)||(fType == 64)||(fType == 64)){
+ fPdgCode = 13 ;
+ return ;
+ }
+ if((fType == 56)||(fType == 57)){
+ fPdgCode = 211 ;
+ return ;
+ }
+ if (fType == 0){
+ fPdgCode = 2212 ;
+ return ;
+ }
+
+}
+
//______________________________________________________________________________
void AliPHOSFastRecParticle::Paint(Option_t *)
{
}
//____________________________________________________________________________
-void AliPHOSFastRecParticle::Print(const char * opt)
+void AliPHOSFastRecParticle::Print(Option_t * opt)const
{
// Print the type, energy and momentum of the reconstructed particle
- cout << "AliPHOSFastRecParticle > " << "type is " << Name() << endl
- << " " << "Energy = " << fE << endl
- << " " << "Px = " << fPx << endl
- << " " << "Py = " << fPy << endl
- << " " << "Pz = " << fPz << endl ;
+ TString message ;
+ message = "AliPHOSFastRecParticle > type is %s\n" ;
+ message += " Energy = %f\n" ;
+ message += " Px = %f\n" ;
+ message += " Py = %f\n" ;
+ message += " Pz = %f\n" ;
+ Info("Print", message.Data(),
+ Name().Data(),
+ fE,
+ fPx,
+ fPy,
+ fPz );
}