]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSsimulationSDD.cxx
Ctrl-M removed at the end of each line. Arrays with unknown size defined via new...
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationSDD.cxx
index 4c3322ca04da2e92b9caddfc78bee596df5118b4..5b737e4f87adab9fb23a3f1d8e4b15faa3c65c0f 100644 (file)
@@ -150,13 +150,7 @@ AliITSsimulationSDD::AliITSsimulationSDD(){
     fNofMaps       = 0;
     fMaxNofSamples = 0;
     fITS           = 0;
-    fTreeB        = 0;
-    fD.Set(0);
-    fT1.Set(0);
-    fT2.Set(0);
-    fTol.Set(0);
-    fNoise.Set(0);
-    fBaseline.Set(0);
+    fTreeB         = 0;
     SetScaleFourier();
     SetPerpendTracksFlag();
     SetDoFFT();
@@ -303,12 +297,6 @@ AliITSsimulationSDD::~AliITSsimulationSDD() {
     delete fStream;
     delete fElectronics;
 
-    fD.Set(0);
-    fT1.Set(0);
-    fT2.Set(0);
-    fTol.Set(0);
-    fNoise.Set(0);
-    fBaseline.Set(0);
     fITS = 0;
 
     if (fHis) {
@@ -520,7 +508,9 @@ void AliITSsimulationSDD::HitsToAnalogDigits(AliITSmodule *mod,TObjArray *alst,
        // passing through detector
        if (!depEnergy) {
            Warning("HitsToAnalogDigits", 
-                   "This particle has passed without losing energy!");
+                   "fTrack = %d hit=%d module=%d This particle has"
+                   " passed without losing energy!",
+                   itrack,ii,mod->GetIndex());
            continue;
        } // end if !depEnergy
 
@@ -531,7 +521,10 @@ void AliITSsimulationSDD::HitsToAnalogDigits(AliITSmodule *mod,TObjArray *alst,
        if(drPath < 0) drPath = -drPath;
        drPath = sddLength-drPath;
        if(drPath < 0) {
-           Warning("HitsToAnalogDigits","negative drift path %e",drPath);
+           Warning("HitsToAnalogDigits",
+                   "negative drift path drPath=%e sddLength=%e dxL[0]=%e "
+                   "xL[0]=%e",
+                   drPath,sddLength,dxL[0],xL[0]);
            continue;
        } // end if drPath < 0
 
@@ -559,8 +552,9 @@ void AliITSsimulationSDD::HitsToAnalogDigits(AliITSmodule *mod,TObjArray *alst,
            driftPath = sddLength-driftPath;
            detector  = 2*(hitDetector-1) + iWing;
            if(driftPath < 0) {
-               Warning("HitsToAnalogDigits","Warning: negative drift path %e",
-                       driftPath);
+               Warning("HitsToAnalogDigits","negative drift path "
+                       "driftPath=%e sddLength=%e avDrft=%e dxL[0]=%e "
+                       "xL[0]=%e",driftPath,sddLength,avDrft,dxL[0],xL[0]);
                continue;
            } // end if driftPath < 0
 
@@ -580,11 +574,13 @@ void AliITSsimulationSDD::HitsToAnalogDigits(AliITSmodule *mod,TObjArray *alst,
            //   Anode
            xAnode = 10000.*(avAnode)/anodePitch + nofAnodes/2;  // +1?
            if(xAnode*anodePitch > sddWidth || xAnode*anodePitch < 0.) 
-                         Warning("HitsToAnalogDigits","Z = %e",
-                                 xAnode*anodePitch);
+                         Warning("HitsToAnalogDigits",
+                                 "Exceedubg sddWidth=%e Z = %e",
+                                 sddWidth,xAnode*anodePitch);
            iAnode = (Int_t) (1.+xAnode); // xAnode?
            if(iAnode < 1 || iAnode > nofAnodes) {
-               Warning("HitToAnalogDigits","Wrong iAnode: %d",iAnode);
+               Warning("HitToAnalogDigits","Wrong iAnode: 1<%d>%d",
+                       iAnode,nofAnodes);
                continue;
            } // end if iAnode < 1 || iAnode > nofAnodes
 
@@ -1370,6 +1366,7 @@ void AliITSsimulationSDD::Compress1D(){
     static Bool_t open=kTRUE;
     static TFile *outFile;
     Bool_t write = fResponse->OutputOption();
+    TDirectory *savedir = gDirectory;
  
     if (write ) {
        if(open) {
@@ -1386,12 +1383,7 @@ void AliITSsimulationSDD::Compress1D(){
     fStream->ClearStream();
 
     // back to galice.root file
-
-    TTree *fAli=gAlice->TreeK();
-    TFile *file = 0;
-
-    if (fAli) file =fAli->GetCurrentFile();
-    file->cd();
+    if(savedir) savedir->cd();
 }
 //______________________________________________________________________
 void AliITSsimulationSDD::StoreAllDigits(){