]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
TRD1, 12 SM, 110 degree as default
authorpavlinov <pavlinov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Oct 2005 18:09:15 +0000 (18:09 +0000)
committerpavlinov <pavlinov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Oct 2005 18:09:15 +0000 (18:09 +0000)
EMCAL/AliEMCALClusterizerv1.cxx
EMCAL/AliEMCALGeometry.cxx
EMCAL/AliEMCALGeometry.h
EMCAL/AliEMCALGeometryOfflineTrd1.cxx
EMCAL/AliEMCALGeometryOfflineTrd1.h
EMCAL/AliEMCALRecPoint.cxx
EMCAL/AliEMCALv0.cxx
EMCAL/AliEMCALv0.h
EMCAL/AliEMCALv2.cxx

index ebdb023b9c3dc058f024a8977680de9fc52325db..0085172be7352765c07c0260a7f03190c94ec446 100644 (file)
@@ -355,7 +355,7 @@ Int_t AliEMCALClusterizerv1::AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d
     Int_t iphi=0;
     Int_t ieta=0;
    geom->GetCellIndex(d1->GetId(), nSupMod,nTower,nIphi,nIeta);
-   geom->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+   geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
    relid1[0]=ieta;
    relid1[1]=iphi;
 
@@ -367,7 +367,7 @@ Int_t AliEMCALClusterizerv1::AreNeighbours(AliEMCALDigit * d1, AliEMCALDigit * d
     Int_t iphi1=0;
     Int_t ieta1=0;
    geom->GetCellIndex(d2->GetId(), nSupMod1,nTower1,nIphi1,nIeta1);
-   geom->GetCellPhiEtaIndexInSModule(nTower1,nIphi1,nIeta1, iphi1,ieta1);
+   geom->GetCellPhiEtaIndexInSModule(nSupMod1, nTower1,nIphi1,nIeta1, iphi1,ieta1);
    Int_t relid2[2] ; 
    relid2[0]=ieta1;
    relid2[1]=iphi1;
@@ -485,7 +485,7 @@ void AliEMCALClusterizerv1::MakeClusters()
    int nSupMod=0, nTower=0, nIphi=0, nIeta=0;
    int iphi=0, ieta=0;
           geom->GetCellIndex(digit->GetId(), nSupMod,nTower,nIphi,nIeta);
-          geom->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+          geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
 
          /////////////////////////////////// 
 
@@ -524,7 +524,7 @@ void AliEMCALClusterizerv1::MakeClusters()
           // check that the digit is above the min E Cut
          ////////////////////
           geom->GetCellIndex(digitN->GetId(), nSupMod,nTower,nIphi,nIeta);
-          geom->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+          geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
          ////////////////
           if(Calibrate(digitN->GetAmp()+addOn[nSupMod-1][ieta-1][iphi-1]) < fMinECut  )  digitsC->Remove(digitN);
 //     cout<<" new digit above ECut "<<endl;
index 037ea74d297a831241947d58afd100d454dacf2b..7a7dfcf1bb1e1b5a0a20da5c40e0b8eb62e4f29d 100644 (file)
@@ -19,7 +19,7 @@
 // Geometry class  for EMCAL : singleton  
 // EMCAL consists of layers of scintillator and lead
 // Places the the Barrel Geometry of The EMCAL at Midrapidity
-// between 0 and 120 degrees of Phi and
+// between 80 and 180(or 190) degrees of Phi and
 // -0.7 to 0.7 in eta 
 // Number of Modules and Layers may be controlled by 
 // the name of the instance defined               
@@ -70,9 +70,12 @@ void AliEMCALGeometry::Init(void){
   // New geometry: EMCAL_55_25
   // 24-aug-04 for shish-kebab
   // SHISH_25 or SHISH_62
+  // 11-oct-05 - correction for final design
   fgInit = kFALSE; // Assume failed until proven otherwise.
   name   = GetName();
-  name.ToUpper(); 
+  name.ToUpper();
+  fKey110DEG = 0;
+  if(name.Contains("110DEG")) fKey110DEG = 1; // for GetAbsCellId
 
   fNZ             = 114;       // granularity along Z (eta) 
   fNPhi           = 168;       // granularity in phi (azimuth)
@@ -147,6 +150,10 @@ void AliEMCALGeometry::Init(void){
 
           if(name.Contains("FINAL")) { // 9-sep-05
             fNumberOfSuperModules = 10;
+            if(name.Contains("110DEG")) {
+              fNumberOfSuperModules = 12;// last two modules have size 10 degree in phi (180<phi<190)
+              fArm1PhiMax = 200.0; // for XEN1 and turn angle of super modules
+           }
             fPhiModuleSize = 12.26 - fPhiGapForSM / Float_t(fNPhi); // first assumption
             fEtaModuleSize = fPhiModuleSize;
           }
@@ -186,6 +193,7 @@ void AliEMCALGeometry::Init(void){
     fNCellsInTower  = fNPHIdiv*fNETAdiv;
     fNCellsInSupMod = fNCellsInTower*fNPhi*fNZ;
     fNCells         = fNCellsInSupMod*fNumberOfSuperModules;
+    if(name.Contains("110DEG")) fNCells -= fNCellsInSupMod;
 
     fLongModuleSize = fNECLayers*(fECScintThick + fECPbRadThickness);
     if(name.Contains("MAY05")) fLongModuleSize += (fFrontSteelStrip + fPassiveScintThick);
@@ -232,6 +240,7 @@ void AliEMCALGeometry::Init(void){
       if(fSteelFrontThick>0.) 
       printf(" fSteelFrontThick  %6.3f cm \n", fSteelFrontThick);
       printf(" fNPhi %i   |  fNZ %i \n", fNPhi, fNZ);
+      printf(" fNCellsInTower %i : fNCellsInSupMod %i : fNCells %i\n",fNCellsInTower, fNCellsInSupMod, fNCells);
       if(name.Contains("MAY05")){
        printf(" fFrontSteelStrip         %6.4f cm (thickness of front steel strip)\n", 
         fFrontSteelStrip);
@@ -256,6 +265,7 @@ void AliEMCALGeometry::Init(void){
         printf(" fEmptySpace     %7.4f cm\n", fEmptySpace);
       } else if(name.Contains("TRD1") && name.Contains("FINAL")){
         printf(" fPhiGapForSM  %7.4f cm \n",  fPhiGapForSM);
+        if(name.Contains("110DEG"))printf(" Last two modules have size 10 degree in  phi (180<phi<190)\n");
       }
     }
     printf("Granularity: %d in eta and %d in phi\n", GetNZ(), GetNPhi()) ;
@@ -586,9 +596,20 @@ Bool_t AliEMCALGeometry::IsInEMCAL(Double_t x, Double_t y, Double_t z) const {
 // == Shish-kebab cases ==
 //
 Int_t AliEMCALGeometry::GetAbsCellId(const int nSupMod, const int nTower, const int nIphi, const int nIeta)
-{ // 27-aug-04; corr. 21-sep-04
-  static Int_t id; // have to change from 1 to fNCells
-  id  = fNCellsInSupMod*(nSupMod-1);
+{ // 27-aug-04; 
+  // corr. 21-sep-04; 
+  //       13-oct-05; 110 degree case
+  // 1 <= nSupMod <= fNumberOfSuperModules
+  // 1 <= nTower  <= fNPHI * fNZ ( fNPHI * fNZ/2 for fKey110DEG=1)
+  // 1 <= nIphi   <= fNPHIdiv
+  // 1 <= nIeta   <= fNETAdiv
+  // 1 <= absid   <= fNCells
+  static Int_t id=0; // have to change from 1 to fNCells
+  if(fKey110DEG == 1 && nSupMod > 10) { // 110 degree case; last two supermodules
+    id  = fNCellsInSupMod*10 + (fNCellsInSupMod/2)*(nSupMod-11);
+  } else {
+    id  = fNCellsInSupMod*(nSupMod-1);
+  }
   id += fNCellsInTower *(nTower-1);
   id += fNPHIdiv *(nIphi-1);
   id += nIeta;
@@ -600,7 +621,7 @@ Int_t AliEMCALGeometry::GetAbsCellId(const int nSupMod, const int nTower, const
 //     printf("    nTower  %6i\n", nTower);
 //     printf("    nIphi   %6i\n", nIphi);
 //     printf("    nIeta   %6i\n", nIeta);
-    id = -1;
+    id = -TMath::Abs(id);
   }
   return id;
 }
@@ -615,32 +636,52 @@ Bool_t  AliEMCALGeometry::CheckAbsCellId(Int_t ind)
 
 Bool_t AliEMCALGeometry::GetCellIndex(const Int_t absId,Int_t &nSupMod,Int_t &nTower,Int_t &nIphi,Int_t &nIeta)
 { // 21-sep-04
-  static Int_t tmp=0;
+  // 19-oct-05;
+  static Int_t tmp=0, sm10=0;
   if(absId<=0 || absId>fNCells) {
 //     Info("GetCellIndex"," wrong abs Id %i !! \n", absId); 
     return kFALSE;
   }
-  nSupMod = (absId-1) / fNCellsInSupMod + 1;
-  tmp     = (absId-1) % fNCellsInSupMod;
+  sm10 = fNCellsInSupMod*10;
+  if(fKey110DEG == 1 && absId > sm10) { // 110 degree case; last two supermodules  
+    nSupMod = (absId-1-sm10) / (fNCellsInSupMod/2) + 11;
+    tmp     = (absId-1-sm10) % (fNCellsInSupMod/2);
+  } else {
+    nSupMod = (absId-1) / fNCellsInSupMod + 1;
+    tmp     = (absId-1) % fNCellsInSupMod;
+  }
 
   nTower  = tmp / fNCellsInTower + 1;
   tmp     = tmp % fNCellsInTower;
-
-  nIphi     = tmp / fNPHIdiv + 1;
-  nIeta     = tmp % fNPHIdiv + 1;
+  nIphi   = tmp / fNPHIdiv + 1;
+  nIeta   = tmp % fNPHIdiv + 1;
 
   return kTRUE;
 }
 
-void AliEMCALGeometry::GetCellPhiEtaIndexInSModule(const int nTower, const int nIphi, const int nIeta, 
+void AliEMCALGeometry::GetTowerPhiEtaIndexInSModule(const Int_t nSupMod, const int nTower,  int &iphit, int &ietat)
+{ // added nSupMod; have to check  - 19-oct-05 ! 
+  static Int_t nphi;
+
+  if(fKey110DEG == 1 && nSupMod>=11) nphi = fNPhi/2;
+  else                               nphi = fNPhi;
+
+  ietat = (nTower-1)/nphi + 1; // have to change from 1 to fNZ
+
+  iphit = (nTower-1)%nphi + 1; // have to change from 1 to fNPhi
+}
+
+void AliEMCALGeometry::GetCellPhiEtaIndexInSModule(const Int_t nSupMod, const int nTower, const int nIphi, const int nIeta, 
 int &iphi, int &ieta)
-{ // don't check validity of nTower, nIphi and nIeta index
-  // have to change  - 1-nov-04 ?? 
-  static Int_t iphit, ietat;
+{ // added nSupMod; have to check  - 19-oct-05 ! 
+  static Int_t iphit, ietat, nphi;
+
+  if(fKey110DEG == 1 && nSupMod>=11) nphi = fNPhi/2;
+  else                               nphi = fNPhi;
 
-  ietat = (nTower-1)/fNPhi;
-  ieta  = ietat*fNETAdiv + nIeta; // change from 1 to fNZ*fNETAdiv
+  ietat = (nTower-1)/nphi;
+  ieta  = ietat*fNETAdiv + nIeta; // have to change from 1 to fNZ*fNETAdiv
 
-  iphit = (nTower-1)%fNPhi;
-  iphi  = iphit*fNPHIdiv + nIphi;  // change from 1 to fNPhi*fNPHIdiv
+  iphit = (nTower-1)%nphi;
+  iphi  = iphit*fNPHIdiv + nIphi;  // have to change from 1 to fNPhi*fNPHIdiv
 }
index a22eacc4be4e0dad800727df52f3c0b564701757..a1bebbe27ce464bd8a79df1e58e3a57bcbceb80f 100644 (file)
@@ -104,7 +104,9 @@ public:
   // Dabs id <-> indexes; Shish-kebab case 
   Int_t   GetAbsCellId(const Int_t nSupMod, const Int_t nTower, const Int_t nIphi, const Int_t nIeta);
   Bool_t  GetCellIndex(const Int_t absId, Int_t &nSupMod, Int_t &nTower, Int_t &nIphi, Int_t &nIeta);
-  void    GetCellPhiEtaIndexInSModule(const Int_t nTower, const Int_t nIphi, const Int_t nIeta, Int_t &iphi, Int_t &ieta);
+  void    GetTowerPhiEtaIndexInSModule(const Int_t nSupMod, const Int_t nTower, Int_t &iphit, Int_t &ietat);
+  void    GetCellPhiEtaIndexInSModule(const Int_t nSupMod, const Int_t nTower, const Int_t nIphi, const Int_t nIeta,
+                                      Int_t &iphi, Int_t &ieta);
   Bool_t  CheckAbsCellId(Int_t ind); // replace the IsInECA
   // ---
   Float_t AngleFromEta(Float_t eta){ // returns theta in radians for a given pseudorapidity
@@ -175,8 +177,8 @@ private:
   Float_t fEtaTileSize;                  // 
   Float_t fLongModuleSize;               // 
   Int_t   fNPhiSuperModule;              // 6 - number supermodule in phi direction
-  Int_t   fNPHIdiv;                      // number phi dvizion
-  Int_t   fNETAdiv;                      // number eta divizion
+  Int_t   fNPHIdiv;                      // number phi divizion of module
+  Int_t   fNETAdiv;                      // number eta divizion of module
   //
   Int_t   fNCells;                       // number of cells in calo
   Int_t   fNCellsInSupMod;               // number cell in super module
@@ -185,11 +187,12 @@ private:
   Float_t fTrd1Angle;                    // angle in x-z plane (in degree) 
   Float_t f2Trd1Dx2;                     // 2*dx2 for TRD1
   Float_t fPhiGapForSM;                  // Gap betweeen supermodules in phi direction
+  Int_t   fKey110DEG;                    // for calculation abs cell id; 19-oct-05 
   // TRD2 options - 27-jan-07
   Float_t fTrd2AngleY;                   // angle in y-z plane (in degree) 
   Float_t f2Trd2Dy2;                     // 2*dy2 for TRD2
   Float_t fEmptySpace;                   // 2mm om fred drawing
-  // Sumper module as TUBS
+  // Super module as TUBS
   Float_t fTubsR;                        // radius of tubs 
   Float_t fTubsTurnAngle;                // turn angle of tubs in degree
 
index 9dd659cffb9b1c694225df20b3e05a325aace0e8..9842cd73037bb24f98d3220695ed329b71b37c9a 100644 (file)
@@ -92,7 +92,7 @@ void AliEMCALGeometryOfflineTrd1::Init()
   Int_t nSupMod, nTower, nIphi, nIeta, iphi, ieta;
   for(Int_t absId=1; absId<=fGeometry->GetNCells(); absId++){
     if(fGeometry->GetCellIndex(absId, nSupMod,nTower,nIphi,nIeta)){
-      fGeometry->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+      fGeometry->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
       TVector3 *v = new TVector3;
       v->SetX(fSMPositionEta[ieta-1].Y()); 
       v->SetZ(fSMPositionEta[ieta-1].X()); 
@@ -103,11 +103,11 @@ void AliEMCALGeometryOfflineTrd1::Init()
   }
 }
 
-TVector3& AliEMCALGeometryOfflineTrd1::PosInSuperModule(const Int_t nTower,const Int_t nIphi,const Int_t nIeta)
+TVector3& AliEMCALGeometryOfflineTrd1::PosInSuperModule(const int nSupMod, const Int_t nTower,const Int_t nIphi,const Int_t nIeta)
 { // 10-nov-04
   static Int_t iphi, ieta;
   static TVector3 v;
-  fGeometry->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+  fGeometry->GetCellPhiEtaIndexInSModule(nSupMod, nTower,nIphi,nIeta, iphi,ieta);
 
   // x-radius; y-phi; eta-z;
   v.SetXYZ(fSMPositionEta[ieta].Y(), fSMPositionPhi[iphi], fSMPositionEta[ieta].X());
@@ -125,11 +125,11 @@ double &lphi, double &leta)
   leta = fSMPositionEta[ie].X();
 }
 
-void AliEMCALGeometryOfflineTrd1::PositionInSuperModule(const Int_t nTower, const Int_t nIphi, const Int_t nIeta,
+void AliEMCALGeometryOfflineTrd1::PositionInSuperModule(const int nSupMod, const Int_t nTower, const Int_t nIphi, const Int_t nIeta,
 double &lphi, double &leta)
 {
   static Int_t iphi,ieta;
-  fGeometry->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta,iphi,ieta);
+  fGeometry->GetCellPhiEtaIndexInSModule(nSupMod, nTower,nIphi,nIeta,iphi,ieta);
   PositionInSuperModule(iphi,ieta, lphi,leta);
 }
 
@@ -163,7 +163,7 @@ void AliEMCALGeometryOfflineTrd1::PrintCell(Int_t absId)
 {
   Int_t nSupMod, nTower, nIphi, nIeta, iphi, ieta;
   if(fGeometry->GetCellIndex(absId, nSupMod,nTower,nIphi,nIeta)){
-     fGeometry->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+     fGeometry->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
      TVector3 *v = CellPosition(absId);
      printf("(%5i) X %8.3f Y %8.3f Z %8.3f | #sup.Mod %2i #tower %3i nIphi %1i nIeta %1i | iphi %2i ieta %2i\n",
            absId, v->X(),v->Y(),v->Z(), nSupMod,nTower,nIphi,nIeta, iphi,ieta);
index 5b83ba3fcfa4f380348f5685796171671086af20..ca8a3e2fffe19180946609863cdc8e4388d5b48b 100644 (file)
@@ -33,7 +33,7 @@ class AliEMCALGeometryOfflineTrd1 : public TNamed {
   virtual ~AliEMCALGeometryOfflineTrd1() { /* nothing */ };
   static   AliEMCALGeometryOfflineTrd1* GetInstance();
   // positon in SuperModule
-  TVector3&  PosInSuperModule(const int nTower, const int nIphi, const int nIeta); 
+  TVector3&  PosInSuperModule(const int nSupMod, const int nTower, const int nIphi, const int nIeta); 
 
  private:
   AliEMCALGeometryOfflineTrd1();
@@ -60,11 +60,11 @@ class AliEMCALGeometryOfflineTrd1 : public TNamed {
  public:
   // One Super Module
   void PositionInSuperModule(const int iphi, const int ieta, double &lphi, double &leta);
-  void PositionInSuperModule(const int nTower, const int nIphi, const int nIeta, double &lphi, double &leta);
+  void PositionInSuperModule(const int nSupMod, const int nTower, const int nIphi, const int nIeta, double &lphi, double &leta);
   // Position towers(cells)
   TVector3* CellPosition(int absId); // from 0 to fGeometry->GetNCells()
   // Global System
-  TRotation* Rotation(Int_t module); // module chabge from 1 to 12;
+  TRotation* Rotation(Int_t module); // module change from 1 to 12;
 
   // service methods
   void    PrintSuperModule();       // *MENU*
index 40469d822d7099a0871cb98ee5a50b9a6e148c62..7157e5ee0dbe2ba7f21fa573a3d9d998d92e1afb 100644 (file)
@@ -139,7 +139,7 @@ Bool_t AliEMCALRecPoint::AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * d
     int nSupMod=0, nTower=0, nIphi=0, nIeta=0;
     int iphi=0, ieta=0;
        geom->GetCellIndex(digit1->GetId(), nSupMod,nTower,nIphi,nIeta);
-       geom->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+       geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
        relid1[0]=ieta;
        relid1[1]=iphi;
 //  geom->AbsToRelNumbering(digit1->GetId(), relid1) ; 
@@ -150,7 +150,7 @@ Bool_t AliEMCALRecPoint::AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * d
     int nSupMod1=0, nTower1=0, nIphi1=0, nIeta1=0;
     int iphi1=0, ieta1=0;
        geom->GetCellIndex(digit2->GetId(), nSupMod1,nTower1,nIphi1,nIeta1);
-       geom->GetCellPhiEtaIndexInSModule(nTower1,nIphi1,nIeta1, iphi1,ieta1);
+       geom->GetCellPhiEtaIndexInSModule(nSupMod1,nTower1,nIphi1,nIeta1, iphi1,ieta1);
        relid2[0]=ieta1;
        relid2[1]=iphi1;
 //  geom->AbsToRelNumbering(digit2->GetId(), relid2) ; 
@@ -362,7 +362,7 @@ void  AliEMCALRecPoint::EvalDispersion(Float_t logWeight, TClonesArray * digits)
     int nSupMod=0, nTower=0, nIphi=0, nIeta=0;
     int iphi=0, ieta=0;
        geom->GetCellIndex(digit->GetId(), nSupMod,nTower,nIphi,nIeta);
-       geom->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+       geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
        etai=(Float_t)ieta;
        phii=(Float_t)iphi;
        //        printf("%f,%d,%d \n", fAmp, ieta, iphi) ;
@@ -417,7 +417,7 @@ void AliEMCALRecPoint::EvalLocalPosition(Float_t logWeight, TClonesArray * digit
     int nSupMod=0, nTower=0, nIphi=0, nIeta=0;
     int iphi=0, ieta=0;
        geom->GetCellIndex(digit->GetId(), nSupMod,nTower,nIphi,nIeta);
-       geom->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+       geom->GetCellPhiEtaIndexInSModule(nSupMod, nTower,nIphi,nIeta, iphi,ieta); //19-oct-05
        etai=(Float_t)ieta;
        phii=(Float_t)iphi;
 //Sub    geom->EtaPhiFromIndex(digit->GetId(), etai, phii);
@@ -505,7 +505,7 @@ void  AliEMCALRecPoint::EvalElipsAxis(Float_t logWeight,TClonesArray * digits)
       int nSupMod=0, nTower=0, nIphi=0, nIeta=0;
       int iphi=0, ieta=0;
       geom->GetCellIndex(digit->GetId(), nSupMod,nTower,nIphi,nIeta);
-      geom->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+      geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
       etai=(Float_t)ieta;
       phii=(Float_t)iphi;
     } else {
index 9d4e2a9dd4e8d7f3a53859852acf42dceb98cf00..ac4e968a0b04b820b0b9c4c5262563184720e508 100644 (file)
@@ -21,6 +21,7 @@
 // This class places a Geometry of the EMCAL in the ALICE Detector as defined in AliEMCALGeometry.cxx                 
 //*-- Author: Yves Schutz (SUBATECH)
 //*-- and   : Sahal Yacoob (LBL / UCT)
+//          : Aleksei Pavlinov (WSU)     SHASHLYK
 
 // This Version of AliEMCALv0 reduces the number of volumes placed in XEN1 (the envelope) to less than five hundred
 // The Envelope is Placed in Alice, And the Aluminium layer. Mini envelopes (XU) are then placed in XEN1.
@@ -542,9 +543,11 @@ void AliEMCALv0::CreateShishKebabGeometry()
   //  idAL = 1602;
   Double_t par[10], xpos=0., ypos=0., zpos=0.;
 
-  CreateSmod("XEN1"); // 18-may-05 
+  CreateSmod("XEN1");        // 18-may-05 
 
-  CreateEmod("SMOD","EMOD"); // 18-may-95
+  CreateEmod("SMOD","EMOD"); // 18-may-05
+
+  if(gn.Contains("110DEG")) CreateEmod("SM10","EMOD"); // 12-oct-05
 
   // Sensitive SC  (2x2 tiles)
   double parSCM0[5], *dummy = 0, parTRAP[11];
@@ -654,14 +657,17 @@ void AliEMCALv0::CreateShishKebabGeometry()
 }
 
 void AliEMCALv0::CreateSmod(const char* mother)
-{ // 18-may-05; mother="XEN1"; child="SMOD" or "SMON" and "SMOP"("TRD2" case)
+{ // 18-may-05; mother="XEN1"; 
+  // child="SMOD" from first to 10th, "SM10" (11th and 12th) (TRD1 case)
+  // child="SMON" and "SMOP"("TRD2" case)
   AliEMCALGeometry * g = GetGeometry(); 
   TString gn(g->GetName()); gn.ToUpper();
 
   Double_t par[1], parTubs[5], xpos=0., ypos=0., zpos=0., rpos=0., dphi=0., phi=0.0, phiRad=0.;
+  Double_t par1C = 0.;
   //  ===== define Super Module from air - 14x30 module ==== ;
   sampleWidth = double(g->GetECPbRadThick()+g->GetECScintThick());
-  printf("\n ## Super Module | sampleWidth %5.3f ## \n", sampleWidth);
+  printf("\n ## Super Module | sampleWidth %5.3f ## %s \n", sampleWidth, gn.Data());
   par[0] = g->GetShellThickness()/2.;
   par[1] = g->GetPhiModuleSize()*g->GetNPhi()/2.; 
   par[2] = g->GetEtaModuleSize()*15.; 
@@ -669,8 +675,9 @@ void AliEMCALv0::CreateSmod(const char* mother)
   int nphism = g->GetNumberOfSuperModules()/2; // 20-may-05
   if(nphism>0) {
     dphi = (g->GetArm1PhiMax() - g->GetArm1PhiMin())/nphism;
+    //    if(gn.Contains("110DEG")) dphi = (g->GetArm1PhiMax() - g->GetArm1PhiMin())/(nphism-1);
     rpos = (g->GetEnvelop(0) + g->GetEnvelop(1))/2.;
-    printf(" rpos %8.2f \n", rpos);
+    printf(" rpos %8.2f : dphi %6.1f degree \n", rpos, dphi);
   }
 
   if (gn.Contains("TRD2")) { // tubs - 27-jan-05
@@ -712,6 +719,13 @@ void AliEMCALv0::CreateSmod(const char* mother)
     idtmed[idAIR], par[0],par[1],par[2]);
     smodPar0 = par[0]; 
     smodPar2 = par[2];
+    if(gn.Contains("110DEG")) { // 12-oct-05
+      par1C = par[1];
+      par[1] /= 2.;
+      gMC->Gsvolu("SM10", "BOX", idtmed[idAIR], par, 3);
+      printf(" Super module with name \"SM10\" was created too par[1] = %f\n", par[1]);
+      par[1] = par1C;
+    }
   // Steel plate
     if(g->GetSteelFrontThickness() > 0.0) { // 28-mar-05
       par[0] = g->GetSteelFrontThickness()/2.;
@@ -722,7 +736,7 @@ void AliEMCALv0::CreateSmod(const char* mother)
     }
   }
 
-  int nr=0, i0=0;
+  int nr=0, nrsmod=0, i0=0;
   if(gn.Contains("TEST")) {nphism = 1;} // just only 2 super modules;
 
   // Turn whole super module
@@ -769,14 +783,20 @@ void AliEMCALv0::CreateSmod(const char* mother)
         printf("SMON %2i | %2i idrotm %3i phi %6.1f(%5.3f) xpos %7.2f ypos %7.2f zpos %7.2f \n", 
         i, nr, idrotm, phic, phicRad, xpos, ypos, -zpos);
       }
-   } else if(gn.Contains("WSUC")) {
-     xpos = ypos = zpos = 0.0;
-     idrotm = 0;
-     gMC->Gspos("SMOD", 1, mother, xpos, ypos, zpos, idrotm, "ONLY") ;
-     printf(" idrotm %3i phi %6.1f(%5.3f) xpos %7.2f ypos %7.2f zpos %7.2f \n", 
-     idrotm, phi, phiRad, xpos, ypos, zpos);
-     nr++;
-   } else {
+    } else if(gn.Contains("WSUC")) {
+      xpos = ypos = zpos = 0.0;
+      idrotm = 0;
+      gMC->Gspos("SMOD", 1, mother, xpos, ypos, zpos, idrotm, "ONLY") ;
+      printf(" idrotm %3i phi %6.1f(%5.3f) xpos %7.2f ypos %7.2f zpos %7.2f \n", 
+      idrotm, phi, phiRad, xpos, ypos, zpos);
+      nr++;
+    } else {
+      TString smName("SMOD"); // 12-oct-05
+      if(i==5 && gn.Contains("110DEG")) {
+        smName = "SM10";
+        nrsmod = nr;
+        nr     = 0;
+      }
       phi    = g->GetArm1PhiMin() + dphi*(2*i+1)/2.; // phi= 70, 90, 110, 130, 150, 170
       phiRad = phi*TMath::Pi()/180.;
 
@@ -785,11 +805,15 @@ void AliEMCALv0::CreateSmod(const char* mother)
       xpos = rpos * TMath::Cos(phiRad);
       ypos = rpos * TMath::Sin(phiRad);
       zpos = smodPar2; // 21-sep-04
-
+      if(i==5 && gn.Contains("110DEG")) {
+        xpos += (par1C/2. * TMath::Sin(phiRad)); 
+        ypos -= (par1C/2. * TMath::Cos(phiRad)); 
+      }
+      
       // 1th module in z-direction;
-      gMC->Gspos("SMOD", ++nr, mother, xpos, ypos, zpos, idrotm, "ONLY") ;
-      printf(" %2i idrotm %3i phi %6.1f(%5.3f) xpos %7.2f ypos %7.2f zpos %7.2f \n", 
-      nr, idrotm, phi, phiRad, xpos, ypos, zpos);
+      gMC->Gspos(smName.Data(), ++nr, mother, xpos, ypos, zpos, idrotm, "ONLY") ;
+      printf(" %s : %2i idrotm %3i phi %6.1f(%5.3f) xpos %7.2f ypos %7.2f zpos %7.2f : i %i \n", 
+      smName.Data(), nr, idrotm, phi, phiRad, xpos, ypos, zpos, i);
       // 2th module in z-direction;
       if(gn.Contains("TWIST") || gn.Contains("TRD")) {
       // turn arround X axis; 0<phi<360
@@ -797,15 +821,15 @@ void AliEMCALv0::CreateSmod(const char* mother)
         if(phiy>=360.) phiy -= 360.;
  
         AliMatrix(idrotm, 90.0, phi, 90.0, phiy, 180.0, 0.0);
-        gMC->Gspos("SMOD", ++nr, mother, xpos, ypos, -zpos, idrotm, "ONLY");
-        printf(" %2i idrotm %3i phiy %6.1f  xpos %7.2f ypos %7.2f zpos %7.2f \n", 
-        nr, idrotm, phiy, xpos, ypos, -zpos);
+        gMC->Gspos(smName.Data(), ++nr, mother, xpos, ypos, -zpos, idrotm, "ONLY");
+        printf(" %s : %2i idrotm %3i phiy %6.1f  xpos %7.2f ypos %7.2f zpos %7.2f \n", 
+        smName.Data(), nr, idrotm, phiy, xpos, ypos, -zpos);
       } else {
         gMC->Gspos("SMOD", ++nr, mother, xpos, ypos, -zpos, idrotm, "ONLY");
       }
     }
   }
-  printf(" Number of Super Modules %i \n", nr);
+  printf(" Number of Super Modules %i \n", nr+nrsmod);
 }
 
 void AliEMCALv0::CreateEmod(const char* mother, const char* child)
@@ -825,19 +849,21 @@ void AliEMCALv0::CreateEmod(const char* mother, const char* child)
     gMC->Gsvolu(child, "BOX", idtmed[idSTEEL], par, 3);
 
   } else if (gn.Contains("TRD1")){ // TRD1 system coordinate iz differnet
-    parEMOD[0] = g->GetEtaModuleSize()/2.;   // dx1
-    parEMOD[1] = g->Get2Trd1Dx2()/2.;        // dx2
-    parEMOD[2] = g->GetPhiModuleSize()/2.;;  // dy
-    parEMOD[3] = g->GetLongModuleSize()/2.;  // dz
-    gMC->Gsvolu(child, "TRD1", idtmed[idSTEEL], parEMOD, 4);
-    if(gn.Contains("WSUC") || gn.Contains("MAY05")){
-      parSCPA[0] = g->GetEtaModuleSize()/2. + tanTrd1*g->GetFrontSteelStrip();   // dx1
-      parSCPA[1] = parSCPA[0]               + tanTrd1*g->GetPassiveScintThick(); // dx2
-      parSCPA[2] = g->GetPhiModuleSize()/2.;     // dy
-      parSCPA[3] = g->GetPassiveScintThick()/2.; // dz
-      gMC->Gsvolu("SCPA", "TRD1", idtmed[idSC], parSCPA, 4);
-      zposSCPA   = -parEMOD[3] + g->GetFrontSteelStrip() + g->GetPassiveScintThick()/2.;
-      gMC->Gspos ("SCPA", ++nr, child, 0.0, 0.0, zposSCPA, 0, "ONLY");
+    if(strcmp(mother,"SMOD")==0) {
+      parEMOD[0] = g->GetEtaModuleSize()/2.;   // dx1
+      parEMOD[1] = g->Get2Trd1Dx2()/2.;        // dx2
+      parEMOD[2] = g->GetPhiModuleSize()/2.;;  // dy
+      parEMOD[3] = g->GetLongModuleSize()/2.;  // dz
+      gMC->Gsvolu(child, "TRD1", idtmed[idSTEEL], parEMOD, 4);
+      if(gn.Contains("WSUC") || gn.Contains("MAY05")){
+        parSCPA[0] = g->GetEtaModuleSize()/2. + tanTrd1*g->GetFrontSteelStrip();   // dx1
+        parSCPA[1] = parSCPA[0]               + tanTrd1*g->GetPassiveScintThick(); // dx2
+        parSCPA[2] = g->GetPhiModuleSize()/2.;     // dy
+        parSCPA[3] = g->GetPassiveScintThick()/2.; // dz
+        gMC->Gsvolu("SCPA", "TRD1", idtmed[idSC], parSCPA, 4);
+        zposSCPA   = -parEMOD[3] + g->GetFrontSteelStrip() + g->GetPassiveScintThick()/2.;
+        gMC->Gspos ("SCPA", ++nr, child, 0.0, 0.0, zposSCPA, 0, "ONLY");
+      }
     }
   } else if (gn.Contains("TRD2")){ // TRD2 as for TRD1 - 27-jan-05
     parEMOD[0] = g->GetEtaModuleSize()/2.;   // dx1
@@ -875,20 +901,22 @@ void AliEMCALv0::CreateEmod(const char* mother, const char* child)
     }    
   } else if(gn.Contains("TRD")) { // 30-sep-04; 27-jan-05 - as for TRD1 as for TRD2
     // X->Z(0, 0); Y->Y(90, 90); Z->X(90, 0)
-    fShishKebabModules = new TList;
     AliEMCALShishKebabTrd1Module *mod=0, *mTmp; // current module
-    for(int iz=0; iz<g->GetNZ(); iz++) { // 27-may-05; g->GetNZ() -> 26
-      if(iz==0) {
-        mod  = new AliEMCALShishKebabTrd1Module();
-      } else {
-        mTmp  = new AliEMCALShishKebabTrd1Module(*mod);
-        mod   = mTmp;
-      }
+    if(fShishKebabModules == 0) {
+      fShishKebabModules = new TList;
+      for(int iz=0; iz<g->GetNZ(); iz++) { // 27-may-05; g->GetNZ() -> 26
+        if(iz==0) { 
+          mod  = new AliEMCALShishKebabTrd1Module();
+        } else {
+          mTmp  = new AliEMCALShishKebabTrd1Module(*mod);
+          mod   = mTmp;
+        }
       fShishKebabModules->Add(mod);
+      }
     }
     for(int iz=0; iz<g->GetNZ(); iz++) {
       Double_t  angle=90., phiOK=0;
-      if(gn.Contains("TRD1")) { //27-jan-05 - as for TRD1 as for TRD2
+      if(gn.Contains("TRD1")) {
         mod = (AliEMCALShishKebabTrd1Module*)fShishKebabModules->At(iz);
         angle = mod->GetThetaInDegree();
         if(!gn.Contains("WSUC")) { // ALICE 
@@ -899,8 +927,13 @@ void AliEMCALv0::CreateEmod(const char* mother, const char* child)
           iz+1, angle, phiOK, angle-phiOK, mod->GetEtaOfCenterOfModule());
           xpos = mod->GetPosXfromR() + g->GetSteelFrontThickness() - smodPar0;
           zpos = mod->GetPosZ() - smodPar2;
-          for(int iy=0; iy<g->GetNPhi(); iy++) { // flat in phi
-            ypos = g->GetPhiModuleSize()*(2*iy+1 - g->GetNPhi())/2.;
+
+          int iyMax = g->GetNPhi();
+          if(strcmp(mother,"SMOD") && gn.Contains("110DEG")) {
+            iyMax /= 2;
+          }
+          for(int iy=0; iy<iyMax; iy++) { // flat in phi
+            ypos = g->GetPhiModuleSize()*(2*iy+1 - iyMax)/2.;
             gMC->Gspos(child, ++nr, mother, xpos, ypos, zpos, idrotm, "ONLY") ;
         //printf(" %2i xpos %7.2f ypos %7.2f zpos %7.2f idrotm %i\n", nr, xpos, ypos, zpos, idrotm);
           }
index 7be482043619f3ced178bc6e315b760bc8b08094..9cf35f5536cf0f23a34a1f0db227231efaa5ec3a 100644 (file)
@@ -10,6 +10,7 @@
 //*--                  
 //*-- Author: Yves Schutz (SUBATECH)
 //*-- and   : Sahal Yacoob (LBL / UCT) 
+//          : Aleksei Pavlinov (WSU)     SHASHLYK
 //#include <assert.h>
 
 // --- ROOT system ---
index 4dc0de4e82391e949ebb8b5639b890fcaefafe67..4e6190451fcbf2460f7433ab71803269bbba902e 100644 (file)
 /* $Id$ */
 
 //_________________________________________________________________________
-//*-- Implementation version v2 of EMCAL Manager class 
+//*-- Implementation version v2 of EMCAL Manager class; SHASHLYK version
 //*-- An object of this class does not produce digits
 //*-- It is the one to use if you do want to produce outputs in TREEH 
 //*--                  
-//*-- Author: Sahal Yacoob (LBL /UCT)
-//*--       : Jennifer Klay (LBL)
+//*-- Author : Aleksei Pavlinov (WSU)
+
 // This Class not stores information on all particles prior to EMCAL entry - in order to facilitate analysis.
 // This is done by setting fIShunt =2, and flagging all parents of particles entering the EMCAL.
 
-// 15/02/2002 .... Yves Schutz
-//  1. fSamplingFraction and fLayerToPreshowerRatio have been removed
-//  2. Timing signal is collected and added to hit
-
 // --- ROOT system ---
 #include "TParticle.h"
 #include "TVirtualMC.h"
@@ -219,12 +215,13 @@ void AliEMCALv2::StepManager(void){
         gMC->CurrentVolOffID(3, moduleNumber);
         gMC->CurrentVolOffID(1, yNumber);
         gMC->CurrentVolOffID(0, xNumber); // really x number now
+        if(strcmp(gMC->CurrentVolOffName(4),"SM10")==0) supModuleNumber += 10; // 13-oct-05
       } else {
         gMC->CurrentVolOffID(5, supModuleNumber);
         gMC->CurrentVolOffID(4, moduleNumber);
         gMC->CurrentVolOffID(1, yNumber);
-        gMC->CurrentVolOffID(0, xNumber); // really x number now
-        if    (strcmp(gMC->CurrentVolOffName(5),"SMOP")==0) supModuleNumber = nSMOP[supModuleNumber-1];
+        gMC->CurrentVolOffID(0, xNumber);
+        if     (strcmp(gMC->CurrentVolOffName(5),"SMOP")==0) supModuleNumber = nSMOP[supModuleNumber-1];
         else if(strcmp(gMC->CurrentVolOffName(5),"SMON")==0) supModuleNumber = nSMON[supModuleNumber-1];
         else   assert(0); // something wrong
       }
@@ -294,6 +291,8 @@ void AliEMCALv2::Browse(TBrowser* b)
 
 void AliEMCALv2::DrawCalorimeterCut(const char *name, int axis, double dcut)
 { // Size of tower is 5.6x5.6x24.8 (25.0); cut on Z axiz
+  TString g(fGeometry->GetName());
+  g.ToUpper();
   gMC->Gsatt("*", "seen", 0);
 
   int fill = 1;
@@ -304,6 +303,7 @@ void AliEMCALv2::DrawCalorimeterCut(const char *name, int axis, double dcut)
   TString sn(name);
   if(sn.Contains("SCM")) colo=5;
   SetVolumeAttributes(name, 1, colo, fill);
+  if(g.Contains("110DEG") && sn=="SMOD") SetVolumeAttributes("SM10", 1, colo, fill);
 
   TString st(GetTitle());
   st += ", zcut, ";
@@ -487,7 +487,7 @@ void AliEMCALv2::DrawAlicWithHits(int mode)
       //      printf(" de %f abs id %i smod %i tower %i | cell iphi %i : ieta %i\n",
       // de, absId, nSupMod, nTower, nIphi, nIeta); 
       if(nSupMod==3) {
-        fGeometry->GetCellPhiEtaIndexInSModule(nTower,nIphi,nIeta, iphi,ieta);
+        fGeometry->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, iphi,ieta);
         // printf(" iphi %i : ieta %i\n", iphi,ieta);
         h2->Fill(double(ieta),double(iphi), de);
       }