]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPC.cxx
closing files properly
[u/mrichter/AliRoot.git] / TPC / AliTPC.cxx
index a06c280e3447274b4bb0fd2bcb277280f4682738..f08e3fb4cab032095fcfd3420e5cf6e6681046cf 100644 (file)
@@ -100,7 +100,8 @@ ClassImp(AliTPC)
                   fNoiseDepth(0),
                   fNoiseTable(0),
                   fCurrentNoise(0),
-                  fActiveSectors(0)
+                  fActiveSectors(0),
+                   fGainFactor(1.)
                    
 
 {
@@ -133,7 +134,8 @@ AliTPC::AliTPC(const char *name, const char *title)
                   fNoiseDepth(0),
                   fNoiseTable(0),
                   fCurrentNoise(0),
-                   fActiveSectors(0)
+                   fActiveSectors(0),
+                   fGainFactor(1.)
                   
 {
   //
@@ -1229,7 +1231,6 @@ void AliTPC::Hits2Digits()
 
   for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {
     //PH    runLoader->GetEvent(iEvent);
-    SetActiveSectors();   
     Hits2Digits(iEvent);
   }
 
@@ -1244,6 +1245,7 @@ void AliTPC::Hits2Digits(Int_t eventnumber)
  //----------------------------------------------------
   AliRunLoader* rl = (AliRunLoader*)fLoader->GetEventFolder()->FindObject(AliRunLoader::GetRunLoaderName());
   rl->GetEvent(eventnumber);
+  SetActiveSectors();   
   if (fLoader->TreeH() == 0x0) {
     if(fLoader->LoadHits()) {
       AliError("Can not load hits.");
@@ -1796,6 +1798,7 @@ void AliTPC::MakeSector(Int_t isec,Int_t nrows,TTree *TH,
   AliTPCcalibDB* const calib=AliTPCcalibDB::Instance();
 
   Float_t gasgain = fTPCParam->GetGasGain();
+  gasgain = gasgain/fGainFactor;
   Int_t i;
   Float_t xyz[5]; 
 
@@ -2236,14 +2239,6 @@ void AliTPC::SetTreeAddress2()
 //     else
 //       AliDebug(1,"fHitType&2 Failed (can not find branch)");
 //   }
-  //set address to TREETR
-  
-  TTree *treeTR = TreeTR();
-  if (treeTR && fTrackReferences) {
-    branch = treeTR->GetBranch(GetName());
-    if (branch) branch->SetAddress(&fTrackReferences);
-  }
-
 }
 
 void AliTPC::FinishPrimary()