]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDstackLayer.cxx
minor change, making helper methods globally available
[u/mrichter/AliRoot.git] / TRD / AliTRDstackLayer.cxx
index 22f8c5321136117605d7814cdfe783a5419066c1..761a25779239d3f0e0887b09199ba5476b702210 100644 (file)
@@ -81,6 +81,7 @@ z0, Double_t zLength, UChar_t stackNr, AliTRDrecoParam *p):
 // Standard constructor.
 // Initialize also the underlying AliTRDpropagationLayer using the copy constructor.
 
+       SetT0(layer.IsT0());
        for(int i=0; i<kMaxRows; i++) fPositions[i] = 0;
 }
 
@@ -97,6 +98,7 @@ AliTRDstackLayer::AliTRDstackLayer(const AliTRDpropagationLayer &layer):
 {
 // Standard constructor using only AliTRDpropagationLayer.
        
+       SetT0(layer.IsT0());
        for(int i=0; i<kMaxRows; i++) fPositions[i] = 0;
 }
 
@@ -113,6 +115,7 @@ AliTRDstackLayer::AliTRDstackLayer(const AliTRDstackLayer &layer):
 {
 // Copy Constructor (performs a deep copy)
        
+       SetT0(layer.IsT0());
        for(Int_t i = 0; i < kMaxRows; i++) fPositions[i] = layer.fPositions[i];
 //     BuildIndices();
 }
@@ -148,6 +151,7 @@ void AliTRDstackLayer::Copy(TObject &o) const
        layer.fStackNr     = fStackNr;
        layer.fDebugStream = fDebugStream;
        layer.fRecoParam   = fRecoParam;
+       layer.SetT0(IsT0());
        
        AliTRDpropagationLayer::Copy(layer); // copies everything into layer
        for(UChar_t i = 0; i < kMaxRows; i++) layer.fPositions[i] = 0;
@@ -493,7 +497,7 @@ void AliTRDstackLayer::GetClusters(Double_t *cond, Int_t *index, Int_t& ncl, Int
 
        //Preordering in Direction z saves a lot of loops (boundary checked)
        for(UChar_t z = zlo; z <= zhi; z++){
-               UInt_t upper = (z != fNRows-1) ? fPositions[z+1] : fN;
+               UInt_t upper = (z < fNRows-1) ? fPositions[z+1] : fN;
                for(Int_t y = fPositions[z]; y < (Int_t)upper; y++){
                        if(ncl == BufferSize){
                                AliWarning("Buffer size riched. Some clusters may be lost.");
@@ -540,8 +544,8 @@ void AliTRDstackLayer::PrintClusters() const
 {
 // Prints the position of each cluster in the stacklayer on the stdout
 //
-       printf("fDebugStream = %#o\n", ((Int_t) fDebugStream));
-       printf("fRecoParam   = %#o\n", ((Int_t) fRecoParam));
+  //printf("fDebugStream = %#o\n", ((Int_t) fDebugStream));
+  //printf("fRecoParam   = %#o\n", ((Int_t) fRecoParam));
        
        for(Int_t i = 0; i < fN; i++){
                printf("AliTRDstackLayer: index=%i, Cluster: X = %3.3f, Y = %3.3f, Z = %3.3f\n", i,  fClusters[i]->GetX(),fClusters[i]->GetY(),fClusters[i]->GetZ());