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];
fPolarTheta = p.fPolarTheta;
fPolarPhi = p.fPolarPhi;
fParticlePDG = p.fParticlePDG;
+
}
//____________________________________________________________________________
{
// 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: {
delete clustertext ;
clustertext = 0 ;
gPad->Update() ;
- break ;
+ break ;
}
-
}
-
-}
-
-//____________________________________________________________________________
-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:
- 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
+
+
+ if ( name.Contains("PHOTON") )
+ fPdgCode = 22 ; // Sets the pdg GetName() to gamma
+ if ( name.Contains("NEUTRAL") )
+ fPdgCode = 2112 ; // Sets the pdg GetName() to neutron
+ if ( name.Contains("CHARGED_FAST_EM") )
+ fPdgCode = 11 ; // Sets the pdg GetName() to electron
+ if ( name.Contains("CHARGED_SLOW_EM") )
+ fPdgCode = 13 ; // Sets the pdg GetName() to muon
+ if ( name.Contains("CHARGED_FAST_HADRON") )
+ fPdgCode = 211 ; // Sets the pdg GetName() to pion
+ if ( name.Contains("CHARGED_SLOW_HADRON") )
+ fPdgCode = 2212 ; // Sets the pdg GetName() to proton
+
return name ;
}
//____________________________________________________________________________
void AliPHOSFastRecParticle::Print(const char * opt)
{
- // Print the typr, energy and momentum
+ // Print the type, energy and momentum of the reconstructed particle
cout << "AliPHOSFastRecParticle > " << "type is " << Name() << endl
<< " " << "Energy = " << fE << endl