git://git.uio.no
/
u
/
mrichter
/
AliRoot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
05-jul-2001 NvE Clone() facility used in AddTrack() etc... of AliEvent & co. instead of
[u/mrichter/AliRoot.git]
/
RALICE
/
AliVertex.cxx
diff --git
a/RALICE/AliVertex.cxx
b/RALICE/AliVertex.cxx
index d11db62585096dec9e3387612fba7a105376a259..9550e8b0cb1f2c842a99f1fa24b9c3c7d9234129 100644
(file)
--- a/
RALICE/AliVertex.cxx
+++ b/
RALICE/AliVertex.cxx
@@
-33,8
+33,11
@@
// in an AliEvent.
// In this way the AliVertex just represents a 'logical structure' for the
// physics analysis which can be embedded in e.g. an AliEvent or AliVertex.
// in an AliEvent.
// In this way the AliVertex just represents a 'logical structure' for the
// physics analysis which can be embedded in e.g. an AliEvent or AliVertex.
+//
+// Note :
// Modifications made to the original vertices also affect the AliVertex objects
// Modifications made to the original vertices also affect the AliVertex objects
-// which are stored.
+// which are stored.
+//
// b) SetVertexCopy(1).
// Of every 'added' vertex a private copy will be made of which the pointer
// will be stored.
// b) SetVertexCopy(1).
// Of every 'added' vertex a private copy will be made of which the pointer
// will be stored.
@@
-43,7
+46,7
@@
// stored.
// This mode will allow 'adding' many different AliVertex objects by
// creating only one AliVertex instance in the main programme and using the
// stored.
// This mode will allow 'adding' many different AliVertex objects by
// creating only one AliVertex instance in the main programme and using the
-// AliVertex::Reset
() and
AliVertex::AddTrack and parameter setting memberfunctions.
+// AliVertex::Reset
,
AliVertex::AddTrack and parameter setting memberfunctions.
//
// Coding example to make 3 vertices v1, v2 and v3.
// ------------------------------------------------
//
// Coding example to make 3 vertices v1, v2 and v3.
// ------------------------------------------------
@@
-281,8
+284,8
@@
void AliVertex::ResetVertices()
// Reset the stored vertex list and delete all connecting tracks which
// were generated automatically via connect=1 in AddVertex().
// The max. number of vertices is set to the default value again.
// Reset the stored vertex list and delete all connecting tracks which
// were generated automatically via connect=1 in AddVertex().
// The max. number of vertices is set to the default value again.
-// All physics quantities are updated according to the rem
aining structur
e
-//
of connected
tracks.
+// All physics quantities are updated according to the rem
oval of th
e
+//
connecting
tracks.
AliTrack* t;
if (fConnects)
{
AliTrack* t;
if (fConnects)
{
@@
-290,21
+293,16
@@
void AliVertex::ResetVertices()
{
t=(AliTrack*)fConnects->At(i);
AliTrack* test=(AliTrack*)fTracks->Remove(t);
{
t=(AliTrack*)fConnects->At(i);
AliTrack* test=(AliTrack*)fTracks->Remove(t);
- if (test) fNtrk--;
+ if (test)
+ {
+ fNtrk--;
+ (Ali4Vector&)(*this)-=(Ali4Vector&)(*t);
+ fQ-=t->GetCharge();
+ }
}
fTracks->Compress();
}
}
fTracks->Compress();
}
- fQ=0;
- Double_t a[4]={0,0,0,0};
- Ali4Vector::SetVector(a,"sph");
- for (Int_t i=0; i<fNtrk; i++)
- {
- t=GetTrack(i);
- (*this)+=(Ali4Vector&)(*t);
- fQ+=t->GetCharge();
- }
-
fNvtx=0;
if (fNvmax>0) SetNvmax(fNvmax);
if (fConnects)
fNvtx=0;
if (fNvmax>0) SetNvmax(fNvmax);
if (fConnects)
@@
-339,8
+337,7
@@
void AliVertex::AddJet(AliJet& j,Int_t tracks)
fNjets++;
if (fJetCopy)
{
fNjets++;
if (fJetCopy)
{
- AliJet* jx=new AliJet(j);
- fJets->Add(jx);
+ fJets->Add(j.Clone());
}
else
{
}
else
{
@@
-386,8
+383,7
@@
void AliVertex::AddVertex(AliVertex& v,Int_t connect)
fNvtx++;
if (fVertexCopy)
{
fNvtx++;
if (fVertexCopy)
{
- AliVertex* vx=new AliVertex(v);
- fVertices->Add(vx);
+ fVertices->Add(v.Clone());
}
else
{
}
else
{