]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added option TGeo in the constructor in order to initialize some parameters directly...
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 5 Mar 2008 18:05:25 +0000 (18:05 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 5 Mar 2008 18:05:25 +0000 (18:05 +0000)
ITS/AliITSsegmentation.h
ITS/AliITSsegmentationSDD.cxx
ITS/AliITSsegmentationSDD.h
ITS/AliITSsegmentationSPD.cxx
ITS/AliITSsegmentationSPD.h
ITS/AliITSsegmentationSSD.cxx
ITS/AliITSsegmentationSSD.h

index c23f70553aff99344bebbacff5e5a88362125f7c..f6beaa7529e79a37c6af320ce08f37a9748ac019 100644 (file)
@@ -5,7 +5,7 @@
 #include "AliLog.h"
 #include "AliITSgeom.h"
 
-/* $Id:$ */
+/* $Id$ */
 
 //----------------------------------------------
 //                                             -
@@ -113,7 +113,7 @@ public TObject {
                     //SDD: Drift distance of the 1/2detector (x axis)-microns
                     //SSD: Full length of the detector (x axis)- microns
     Float_t fDz;    //SPD: Full length of the detector (z axis)- microns
-                    //SDD: Length of half-detector (z axis) - microns
+                    //SDD: Full Length of the detector (z axis) - microns
                     //SSD: Full width of the detector (z axis)- microns
     Float_t fDy;    //SPD:  Full thickness of the detector (y axis) -um 
                     //SDD: Full thickness of the detector (y axis) - microns
index 553b68e67c58810d3ed361a7a12274f33dcc7f06..dda7b9e3020c8e6d5e5bdd9b051baa7cf0bc5992 100644 (file)
@@ -14,7 +14,9 @@
  **************************************************************************/
 #include <Riostream.h>
 #include <TMath.h>
-
+#include <TGeoManager.h>
+#include <TGeoVolume.h>
+#include <TGeoBBox.h>
 #include "AliITSsegmentationSDD.h"
 #include "AliITSgeomSDD.h"
 #include "AliITSresponseSDD.h"
@@ -44,7 +46,7 @@
 //                               Z                                         //
 /////////////////////////////////////////////////////////////////////////////
 
-/* $Id:$ */
+/* $Id$ */
 
 const Float_t AliITSsegmentationSDD::fgkDxDefault = 35085.;
 const Float_t AliITSsegmentationSDD::fgkDzDefault = 75264.;
@@ -71,7 +73,7 @@ fSetDriftSpeed(0){
   InitFromGeom(geom);
 }
 //______________________________________________________________________
-AliITSsegmentationSDD::AliITSsegmentationSDD() : AliITSsegmentation(),
+AliITSsegmentationSDD::AliITSsegmentationSDD(Option_t *opt) : AliITSsegmentation(),
 fNsamples(0),
 fNanodes(0),
 fPitch(0),
@@ -80,6 +82,21 @@ fDriftSpeed(0),
 fSetDriftSpeed(0){
   // Default constructor
   Init();
+  if(strstr(opt,"TGeo")){
+    if(!gGeoManager){
+      AliError("Geometry is not initialized\n");
+      return;
+    }
+    TGeoVolume *v=NULL;
+    v = gGeoManager->GetVolume("ITSsddSensitivL3");
+    if(!v){
+      AliWarning("TGeo volume ITSsddSensitivL3 not found (hint: use v11Hybrid geometry)\n Using hardwired default values"); 
+    }
+    else {
+      TGeoBBox *s=(TGeoBBox*)v->GetShape();
+      SetDetSize(s->GetDX()*10000.,s->GetDZ()*20000.,s->GetDY()*20000.);
+    }
+  }
 }
 
 //______________________________________________________________________
index 6d52b351c5d81a86a26b0472832964cdc0fac0db..9b51ebfe5b476add94e0bdd40ec292b8e1d2e5a5 100644 (file)
@@ -13,7 +13,7 @@ public AliITSsegmentation {
  public:
 
 
-    AliITSsegmentationSDD();
+    AliITSsegmentationSDD(Option_t *opt="");
     AliITSsegmentationSDD(const AliITSsegmentationSDD &source);
     AliITSsegmentationSDD& operator=(const AliITSsegmentationSDD &source);
     AliITSsegmentationSDD(AliITSgeom *gm);
index 2a92057c636693256a6930d004ed9edd38685ca6..2956ffef1f9d70b261c6b0fe688b8f5549eaaa5b 100644 (file)
@@ -13,6 +13,9 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+#include <TGeoManager.h>
+#include <TGeoVolume.h>
+#include <TGeoBBox.h>
 #include "AliITSsegmentationSPD.h"
 //#include "AliITSgeom.h"
 //////////////////////////////////////////////////////
@@ -23,7 +26,7 @@
 ClassImp(AliITSsegmentationSPD)
 
 //_____________________________________________________________________________
-  AliITSsegmentationSPD::AliITSsegmentationSPD(): AliITSsegmentation(),
+  AliITSsegmentationSPD::AliITSsegmentationSPD(Option_t *opt): AliITSsegmentation(),
 fNpx(0),
 fNpz(0){
   // Default constructor
@@ -31,6 +34,35 @@ fNpz(0){
     fCellSizeX[k] = 0.;
     fCellSizeZ[k] = 0.;
   }
+
+  if(strstr(opt,"TGeo")){
+    if(!gGeoManager){
+      AliError("Geometry is not initialized\n");
+      return;
+    }
+    TGeoVolume *v=NULL;
+    v = gGeoManager->GetVolume("ITSSPDlay1-sensor");
+    if(!v){
+      AliWarning("TGeo volume ITSSPDlay1-sensor not found (hint: use v11Hybrid geometry)\n Using hardwired default values");
+      SetDetSize(12800,69600,200); 
+    }
+    else {
+      TGeoBBox *s=(TGeoBBox*)v->GetShape();
+      SetDetSize(s->GetDX()*20000.,s->GetDZ()*20000.,s->GetDY()*20000.);
+    }
+    Float_t bx[256],bz[280];
+    Int_t i;
+    SetNPads(256,160);  // Number of Bins in x and z
+    for(i=000;i<256;i++) bx[i] =  50.0; // in x all are 50 microns.
+    for(i=000;i<160;i++) bz[i] = 425.0; // most are 425 microns except below
+    for(i=160;i<280;i++) bz[i] =   0.0; // Outside of detector.
+    bz[ 31] = bz[ 32] = 625.0; // first chip boundry
+    bz[ 63] = bz[ 64] = 625.0; // first chip boundry
+    bz[ 95] = bz[ 96] = 625.0; // first chip boundry
+    bz[127] = bz[128] = 625.0; // first chip boundry
+    bz[160] = 425.0; // Set so that there is no zero pixel size for fNz.
+    SetBinSize(bx,bz); // Based on AliITSgeomSPD for now.
+  }
 }
 
 //_____________________________________________________________________________
index e51bf915f2100e7d629181341f7860771b083a9e..8decc2a4cc023d951e1a1eaea46be8fcc110f020 100644 (file)
@@ -12,7 +12,7 @@ class AliITSsegmentationSPD :
 public AliITSsegmentation {
  public:
 
-    AliITSsegmentationSPD();
+    AliITSsegmentationSPD(Option_t *opt="" );
     AliITSsegmentationSPD(AliITSgeom *gm);
     AliITSsegmentationSPD(const AliITSsegmentationSPD &source);
     virtual ~AliITSsegmentationSPD(){}
index 5ca62512dd48634e3a6d669a99cf1d387db86ce2..f935225f3e8802afda416e29b921b3908f68f0b1 100644 (file)
@@ -17,6 +17,9 @@
 
 #include <Riostream.h>
 #include <TMath.h>
+#include <TGeoManager.h>
+#include <TGeoVolume.h>
+#include <TGeoBBox.h>
 #include "AliITSsegmentationSSD.h"
 
 //////////////////////////////////////////////////////
@@ -31,7 +34,7 @@ const Float_t AliITSsegmentationSSD::fgkPitchDefault = 95.;
 const Int_t AliITSsegmentationSSD::fgkNstripsDefault = 768;
 
 ClassImp(AliITSsegmentationSSD)
-AliITSsegmentationSSD::AliITSsegmentationSSD(): AliITSsegmentation(),
+AliITSsegmentationSSD::AliITSsegmentationSSD(Option_t *opt): AliITSsegmentation(),
 fNstrips(0),
 fStereoP(0),
 fStereoN(0),
@@ -42,6 +45,25 @@ fStereoPl6(0),
 fStereoNl6(0),
 fLayer(0){
     // default constructor
+    SetDetSize(fgkDxDefault,fgkDzDefault,fgkDyDefault);
+    SetPadSize(fgkPitchDefault,0.);
+    SetNPads(fgkNstripsDefault,0);
+    SetAngles();
+  if(strstr(opt,"TGeo")){
+    if(!gGeoManager){
+      AliError("Geometry is not initialized\n");
+      return;
+    }
+    TGeoVolume *v=NULL;
+    v = gGeoManager->GetVolume("ITSssdSensitivL5");
+    if(!v){
+      AliWarning("TGeo volumeITSssdSensitivL5  not found (hint: use v11Hybrid geometry)\n Using hardwired default values"); 
+    }
+    else {
+      TGeoBBox *s=(TGeoBBox*)v->GetShape();
+      SetDetSize(s->GetDX()*20000.,s->GetDZ()*20000.,s->GetDY()*20000.);
+    }
+  }
 }
 //----------------------------------------------------------------------
 AliITSsegmentationSSD::AliITSsegmentationSSD(AliITSgeom *geom):
@@ -56,12 +78,10 @@ fStereoPl6(0),
 fStereoNl6(0),
 fLayer(0){
     // constuctor
-    fCorr = 0;
     SetDetSize(fgkDxDefault,fgkDzDefault,fgkDyDefault);
     SetPadSize(fgkPitchDefault,0.);
     SetNPads(fgkNstripsDefault,0);
     SetAngles();
-    fLayer = 0;
 }
 //______________________________________________________________________
 void AliITSsegmentationSSD::Copy(TObject &obj) const {
index 74332009f5c4459c156712c0190a7f3ed045c8a5..4329fbf9a811a84adb6a622495cd3d7527d6b019 100644 (file)
@@ -9,7 +9,7 @@ class AliITSsegmentationSSD :
 public AliITSsegmentation {
  public:
 
-    AliITSsegmentationSSD();
+    AliITSsegmentationSSD(Option_t *opt="");
     AliITSsegmentationSSD(AliITSgeom *gm);
     AliITSsegmentationSSD(const AliITSsegmentationSSD &source);
     virtual ~AliITSsegmentationSSD(){}