task becomes a subtask of PHOS; TreeD filling changed
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 May 2001 22:44:08 +0000 (22:44 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 May 2001 22:44:08 +0000 (22:44 +0000)
PHOS/AliPHOSDigitizer.cxx
PHOS/AliPHOSPIDv1.cxx

index 709ba51354ff8bf597186630ebf9a9d62e538ff2..d36be0a34013cba615d8c0ecd1274c942a829f63 100644 (file)
@@ -65,8 +65,7 @@
 
 #include "AliRun.h"
 #include "AliPHOSDigit.h"
-#include "AliPHOSHit.h"
-#include "AliPHOSv1.h"
+#include "AliPHOS.h"
 #include "AliPHOSDigitizer.h"
 #include "AliPHOSSDigitizer.h"
 #include "AliPHOSGeometry.h"
@@ -138,7 +137,8 @@ void AliPHOSDigitizer::Init()
     
     // add Task to //root/Tasks folder
     TTask * roottasks = (TTask*)gROOT->GetRootFolder()->FindObject("Tasks") ; 
-    roottasks->Add(this) ; 
+    TTask * phostasks = (TTask*)(roottasks->GetListOfTasks()->FindObject("PHOS"));
+    phostasks->Add(this) ; 
     
     fInitialized = kTRUE ;
   }
@@ -195,7 +195,8 @@ AliPHOSDigitizer::AliPHOSDigitizer(const char *headerFile,const char *sDigitsTit
   
   // add Task to //root/Tasks folder
   TTask * roottasks = (TTask*)gROOT->GetRootFolder()->FindObject("Tasks") ; 
-  roottasks->Add(this) ; 
+  TTask * phostasks = (TTask*)(roottasks->GetListOfTasks()->FindObject("PHOS"));
+  phostasks->Add(this) ; 
   fInitialized = kTRUE ;
   
 }
@@ -229,8 +230,7 @@ Bool_t AliPHOSDigitizer::Combinator()
   // Makes all desirable combinations of Signal+Background,
   // returns kFALSE when all combinations are made.
   // May be useful to introduce options like "One-to-One", "All-to-One" and "All-to-All" ?
-
-  // realizing "One-to-One" option...
+  //realizing "One-to-One" option...
 
   if(!fInitialized)
     Init() ;
@@ -268,8 +268,8 @@ void AliPHOSDigitizer::Digitize(Option_t *option)
 
   fDigits->Clear() ;
 
-  AliPHOS * PHOS = (AliPHOS *) gAlice->GetDetector("PHOS") ;   
-  AliPHOSGeometry *geom = AliPHOSGeometry::GetInstance( PHOS->GetGeometry()->GetName(), PHOS->GetGeometry()->GetTitle() );
+  AliPHOS * phos = (AliPHOS *) gAlice->GetDetector("PHOS") ;   
+  AliPHOSGeometry *geom = AliPHOSGeometry::GetInstance( phos->GetGeometry()->GetName(), phos->GetGeometry()->GetTitle() );
 
   //Making digits with noise, first EMC
   Int_t nEMC = geom->GetNModules()*geom->GetNPhi()*geom->GetNZ();
@@ -449,9 +449,10 @@ void AliPHOSDigitizer::WriteDigits()
     cwd->cd();
   }
 
-  digitsBranch->Fill() ;
+  digitsBranch->Fill() ;      
   digitizerBranch->Fill() ;
   
+//    gAlice->TreeD()->Fill() ;  // YK 28.05.2001
   gAlice->TreeD()->Write(0,kOverwrite) ;  
 
   //remove fSDigitizer before new event.  
@@ -658,9 +659,8 @@ void AliPHOSDigitizer::MixWith(char* HeaderFile, char* sDigitsTitle)
   
 }
 //__________________________________________________________________
-void AliPHOSDigitizer::Print(Option_t* option)const 
-{
-  // Prints the parameters of the digitizer  
+void AliPHOSDigitizer::Print(Option_t* option)const {
+  // Print Digitizer's parameters
   if(fInitialized){
     
     cout << "------------------- "<< GetName() << " -------------" << endl ;
@@ -688,9 +688,8 @@ void AliPHOSDigitizer::Print(Option_t* option)const
   
 }
 //__________________________________________________________________
-void AliPHOSDigitizer::PrintDigits(Option_t * option)
-{
-  // Prints the list of produced digits
+void AliPHOSDigitizer::PrintDigits(Option_t * option){
+  // Print a table of digits
 
   cout << "AliPHOSDigitiser:"<< endl ;
   cout << "       Number of entries in Digits list " << fDigits->GetEntriesFast() << endl ;
@@ -733,3 +732,5 @@ void AliPHOSDigitizer::SetDigitsBranch(const char* title)
   fDigitsTitle = title ;
 
 }
+//__________________________________________________________________
index 197a481f550038ec03c649b93400312c32182c5c..f0230f2234adbef1239a12443749dc808a61de3d 100644 (file)
@@ -95,6 +95,7 @@ AliPHOSPIDv1::AliPHOSPIDv1():AliPHOSPID()
 AliPHOSPIDv1::AliPHOSPIDv1(const char * headeFile,const char * tsBranchTitle):AliPHOSPID()
 { 
   //ctor with the indication on where to look for the track segments
+
   fHeaderFileName = headeFile ;
 
   fTSTitle = tsBranchTitle ;
@@ -126,7 +127,8 @@ AliPHOSPIDv1::AliPHOSPIDv1(const char * headeFile,const char * tsBranchTitle):Al
   
   // add Task to //root/Tasks folder
   TTask * roottasks = (TTask*)gROOT->GetRootFolder()->FindObject("Tasks") ; 
-  roottasks->Add(this) ; 
+  TTask * phostasks = (TTask*)(roottasks->GetListOfTasks()->FindObject("PHOS"));
+  phostasks->Add(this) ; 
 
   fDispersion = 2.0; 
   fCpvEmcDistance = 3.0 ;
@@ -167,7 +169,8 @@ void AliPHOSPIDv1::Init()
     
     // add Task to //root/Tasks folder
     TTask * roottasks = (TTask*)gROOT->GetRootFolder()->FindObject("Tasks") ; 
-    roottasks->Add(this) ; 
+    TTask * phostasks = (TTask*)(roottasks->GetListOfTasks()->FindObject("PHOS"));
+    phostasks->Add(this) ; 
 
     fDispersion = 2.0; 
     fCpvEmcDistance = 3.0 ;
@@ -523,7 +526,7 @@ void  AliPHOSPIDv1::WriteRecParticles()
   
   rpBranch->Fill() ;
   pidBranch->Fill() ;
-  gAlice->TreeR()->Fill() ;  
+//    gAlice->TreeR()->Fill() ;    // YK 28.05.01  
   gAlice->TreeR()->Write(0,kOverwrite) ;  
   
 }
@@ -532,7 +535,7 @@ void  AliPHOSPIDv1::PlotDispersionCuts()const
 {
   // produces a plot of the dispersion cut
   TCanvas*  lambdas = new TCanvas("lambdas","Cuts on the ellipse axis",200,10,700,500);
-  
   if(fIDOptions.Contains("ell",TString::kIgnoreCase ) ){
     TF2 * ell = new TF2("Elliptic Cuts",fFormula->GetName(),0,3,0,3) ;
     ell->SetMinimum(0.0000001) ;
@@ -610,7 +613,8 @@ TVector3 AliPHOSPIDv1::GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRec
 //____________________________________________________________________________
 void AliPHOSPIDv1::PrintRecParticles(Option_t * option)
 {
-  // Prints the list of reconstructed particles
+  // Print table of reconstructed particles
+
   cout << "AliPHOSPIDv1: " << endl ;
   cout << "       found " << fRecParticles->GetEntriesFast() << " RecParticles " << endl ;