]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSmodule.cxx
change default reco params to kLowMult, change kLowMult clustering threshold to 0...
[u/mrichter/AliRoot.git] / ITS / AliITSmodule.cxx
index 055f17317459132ce5b200168ebbc2cb032ba901..b9e45cb059896623409e1a495c9bc11bda025a6c 100644 (file)
@@ -1,6 +1,6 @@
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                          *
+ *                                                                        *
  * Author: The ALICE Off-line Project.                                    *
  * Contributors are mentioned in the code where appropriate.              *
  *                                                                        *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
- $Id$ 
-*/
-/*
- $Log$
- Revision 1.9.8.4  2003/06/13 16:31:00  nilsen
- Introducing a backward incompatibility to hit files created before June 12
- 2002. The enterance hit is no longer recorded. The starting position of
- every hit is used instead. Added GetPositionL0 to AliITShit, fixed up
- AliITSmodule to use starting location of hit and not enterance hits, and
- StepManager in AliITSvPPRasymm no longer records enterence hit to hit file.
-
-*/
+/* $Id$ */
+
 #include <TArrayI.h>
 
 #include <stdlib.h>
@@ -51,20 +40,24 @@ ClassImp(AliITSmodule)
 // Constructors and deconstructor
 //________________________________________________________________________
 //
-AliITSmodule::AliITSmodule() {
+AliITSmodule::AliITSmodule():
+fITS(0),
+fIndex(0),
+fHitsM(0),
+fTrackIndex(0),
+fHitIndex(0) {
     // constructor
 
-    fHitsM       = 0;
-    fTrackIndex  = 0;
-    fHitIndex    = 0;
-    fITS         = 0;
-
 }
 //_________________________________________________________________________
-AliITSmodule::AliITSmodule(Int_t index) {
+AliITSmodule::AliITSmodule(Int_t index):
+fITS(0),
+fIndex(index),
+fHitsM(0),
+fTrackIndex(0),
+fHitIndex(0) {
   // constructor
 
-    fIndex      = index;
     fHitsM      = new TObjArray();
     fTrackIndex = new TArrayI(16);
     fHitIndex   = new TArrayI(16);
@@ -85,21 +78,25 @@ AliITSmodule::~AliITSmodule() {
     fITS = 0; // We don't delete this pointer since it is just a copy.
 }
 //____________________________________________________________________________
-AliITSmodule::AliITSmodule(const AliITSmodule &source){
+AliITSmodule::AliITSmodule(const AliITSmodule &source):TObject(source),
+fITS(source.fITS),
+fIndex(source.fIndex),
+fHitsM(source.fHitsM),
+fTrackIndex(source.fTrackIndex),
+fHitIndex(source.fHitIndex){
 ////////////////////////////////////////////////////////////////////////
 //     Copy Constructor 
 ////////////////////////////////////////////////////////////////////////
-  Error("AliITSmodule","AliITSmodule class has not to be copied! Exit.");
-  exit(1);
+
 }
 //_____________________________________________________________________________
 AliITSmodule& AliITSmodule::operator=(const AliITSmodule &source){
 ////////////////////////////////////////////////////////////////////////
 //    Assignment operator 
 ////////////////////////////////////////////////////////////////////////
-  Error("AliITSmodule","AliITSmodule class has not to be copied! Exit.");
-  exit(1);
-  return *this; // fake return neded on Sun
+  this->~AliITSmodule();
+  new(this) AliITSmodule(source);
+  return *this;
 }
 //_________________________________________________________________________
 // 
@@ -123,12 +120,13 @@ Int_t AliITSmodule::AddHit(AliITShit* hit,Int_t t,Int_t h) {
 }
 //___________________________________________________________________________
 Double_t AliITSmodule::PathLength(Int_t index,AliITShit *itsHit1,
-                                 AliITShit *itsHit2){
+                                 AliITShit *itsHit2) {
   // path lenght
    Float_t  x1g,y1g,z1g;   
    Float_t  x2g,y2g,z2g;
    Double_t s;
 
+   index = 0;
    itsHit1->GetPositionG(x1g,y1g,z1g);
    itsHit2->GetPositionG(x2g,y2g,z2g);
 
@@ -143,10 +141,11 @@ void AliITSmodule::PathLength(Int_t index,
                              Int_t status,Int_t &nseg,
                              Float_t &x1,Float_t &y1,Float_t &z1,
                              Float_t &dx1,Float_t &dy1,Float_t &dz1,
-                             Int_t &flag){
+                             Int_t &flag) const{
   // path length
     static Float_t x0,y0,z0;
 
+    index = 0;
     if ((status&0x0002)!=0){ // entering
        x0 = x;
        y0 = y;
@@ -351,7 +350,7 @@ void AliITSmodule::MedianHitG(Int_t index,
 //___________________________________________________________________________
 Bool_t AliITSmodule::MedianHitL( AliITShit *itsHit1, 
                             AliITShit *itsHit2, 
-                            Float_t &xMl, Float_t &yMl, Float_t &zMl){
+                            Float_t &xMl, Float_t &yMl, Float_t &zMl) const{
   // median hit
    Float_t x1l,y1l,z1l;
    Float_t x2l,y2l,z2l;