]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALRecParticle.cxx
Correcting some trivial warnings on Alpha
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALRecParticle.cxx
CommitLineData
a83bd548 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15/* $Id$ */
16//_________________________________________________________________________
17// A Reconstructed Particle in EMCAL
18// To become a general class of AliRoot ?
19// Why should I put meaningless comments
20// just to satisfy
21// the code checker
22//
23//*-- Author: Yves Schutz (SUBATECH)
24
25
26// --- ROOT system ---
27
28// --- Standard library ---
29
30
31// --- AliRoot header files ---
a83bd548 32#include "AliEMCALRecParticle.h"
33#include "AliEMCALGetter.h"
34#include "TParticle.h"
35
36ClassImp(AliEMCALRecParticle)
37
38
39//____________________________________________________________________________
40 AliEMCALRecParticle::AliEMCALRecParticle(const AliEMCALRecParticle & rp)
41{
42 // copy ctor
43
44 fEMCALTrackSegment = rp.fEMCALTrackSegment ;
45 fDebug = kFALSE ;
46 fType = rp.fType ;
47 fIndexInList = rp.fIndexInList ;
48
49 fPdgCode = rp.fPdgCode;
50 fStatusCode = rp.fStatusCode;
51 fMother[0] = rp.fMother[0];
52 fMother[1] = rp.fMother[1];
53 fDaughter[0] = rp.fDaughter[0];
54 fDaughter[1] = rp.fDaughter[1];
55 fWeight = rp.fWeight;
56 fCalcMass = rp.fCalcMass;
57 fPx = rp.fPx;
58 fPy = rp.fPy;
59 fPz = rp.fPz;
60 fE = rp.fE;
61 fVx = rp.fVx;
62 fVy = rp.fVy;
63 fVz = rp.fVz;
64 fVt = rp.fVt;
65 fPolarTheta = rp.fPolarTheta;
66 fPolarPhi = rp.fPolarPhi;
67 fParticlePDG = rp.fParticlePDG;
68
69}
70
71//____________________________________________________________________________
72const Int_t AliEMCALRecParticle::GetNPrimaries() const
73{
88cb7938 74 return -1;
a83bd548 75}
76
77//____________________________________________________________________________
78const Int_t AliEMCALRecParticle::GetNPrimariesToRecParticles() const
79{
a83bd548 80 Int_t rv = 0 ;
88cb7938 81 AliEMCALGetter * gime = AliEMCALGetter::Instance() ;
82 Int_t ecaRPindex = dynamic_cast<AliEMCALTrackSegment*>(gime->TrackSegments()->At(GetEMCALTSIndex()))->GetECAIndex();
83 dynamic_cast<AliEMCALTowerRecPoint*>(gime->ECARecPoints()->At(ecaRPindex))->GetPrimaries(rv) ;
84 return rv ;
a83bd548 85}
86
87//____________________________________________________________________________
88const TParticle * AliEMCALRecParticle::GetPrimary(Int_t index) const
89{
90 if ( index > GetNPrimariesToRecParticles() ) {
91 if (fDebug)
88cb7938 92 Warning("GetPrimary", "AliEMCALRecParticle::GetPrimary -> %d is larger that the number of primaries %d",
93 index, GetNPrimaries()) ;
94 return 0 ;
a83bd548 95 }
0798b21e 96 Int_t dummy ;
97 AliEMCALGetter * gime = AliEMCALGetter::Instance() ;
88cb7938 98
0798b21e 99 Int_t ecaRPindex = dynamic_cast<AliEMCALTrackSegment*>(gime->TrackSegments()->At(GetEMCALTSIndex()))->GetECAIndex();
100 Int_t primaryindex = dynamic_cast<AliEMCALTowerRecPoint*>(gime->ECARecPoints()->At(ecaRPindex))->GetPrimaries(dummy)[index] ;
101 return gime->Primary(primaryindex) ;
a83bd548 102}
103