]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSBeamTestDigSPD.cxx
V11 SSD geometry (E. Cattaruzza)
[u/mrichter/AliRoot.git] / ITS / AliITSBeamTestDigSPD.cxx
index 28d006058b2771a324bdd7c218a320e51a142fa5..e303073938692871f48da26755b3c72200a619bc 100644 (file)
@@ -6,7 +6,6 @@
 //                                                //
 ////////////////////////////////////////////////////
 
-#include "AliITS.h"
 #include "AliITSdigitSPD.h"
 #include "AliRawReader.h"
 #include "AliRawReader.h"
@@ -22,23 +21,19 @@ ClassImp(AliITSBeamTestDigSPD)
 
 
 //_____________________________________________________________
-  AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(): AliITSBeamTestDig()
-{
+  AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(): AliITSBeamTestDig(),
+fFlagHeader(0){
   //
   // Constructor
   //
-
-  
 }
 
 //_____________________________________________________________
-  AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title)
-{
+AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title),
+fFlagHeader(0){
   //
   // Constructor
   //
-
 }
 
 //__________________________________________________________________
@@ -57,19 +52,22 @@ void AliITSBeamTestDigSPD::Exec(Option_t* /*opt*/)
   //Reads raw data for SPD, fill SPD digits tree
 
 
+  if(!fITSgeom){
+    Error("Exec","fITSgeom is null!");
+    return;
+  }
   TBranch* branch = fTreeD->GetBranch("ITSDigitsSPD");
 
-  AliITSgeom* geom = fBt->GetITSgeom();
   Int_t nsdd=0;
   Int_t nspd=0;
   Int_t nssd=0;
-  for(Int_t nlay=1;nlay<=geom->GetNlayers();nlay++){
-    for(Int_t nlad=1;nlad<=geom->GetNladders(nlay);nlad++){
-      for(Int_t ndet=1;ndet<=geom->GetNdetectors(nlay);ndet++){
-       Int_t index=geom->GetModuleIndex(nlay,nlad,ndet);
-       if(geom->GetModuleTypeName(index)=="kSPD") nspd++;
-       if(geom->GetModuleTypeName(index)=="kSDD") nsdd++;
-       if(geom->GetModuleTypeName(index)=="kSSD") nssd++;
+  for(Int_t nlay=1;nlay<=fITSgeom->GetNlayers();nlay++){
+    for(Int_t nlad=1;nlad<=fITSgeom->GetNladders(nlay);nlad++){
+      for(Int_t ndet=1;ndet<=fITSgeom->GetNdetectors(nlay);ndet++){
+       Int_t index=fITSgeom->GetModuleIndex(nlay,nlad,ndet);
+       if(fITSgeom->GetModuleTypeName(index)=="kSPD") nspd++;
+       if(fITSgeom->GetModuleTypeName(index)=="kSDD") nsdd++;
+       if(fITSgeom->GetModuleTypeName(index)=="kSSD") nssd++;
       }
     }
   }