EMCAL Space Frame now included in geometry
authorjklay <jklay@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 6 Sep 2008 00:25:37 +0000 (00:25 +0000)
committerjklay <jklay@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 6 Sep 2008 00:25:37 +0000 (00:25 +0000)
EMCAL/AliEMCALSpaceFrame.cxx [new file with mode: 0644]
EMCAL/AliEMCALSpaceFrame.h [new file with mode: 0644]
EMCAL/AliEMCALv0.cxx
EMCAL/AliEMCALv0.h
EMCAL/EMCALbaseLinkDef.h
EMCAL/libEMCALbase.pkg

diff --git a/EMCAL/AliEMCALSpaceFrame.cxx b/EMCAL/AliEMCALSpaceFrame.cxx
new file mode 100644 (file)
index 0000000..99b0d68
--- /dev/null
@@ -0,0 +1,282 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+#include <TVirtualMC.h>
+#include <TGeoManager.h>
+#include <TGeoVolume.h>
+#include <TGeoMedium.h>
+#include <TGeoMatrix.h>
+#include <TGeoVolume.h>
+#include <TGeoTube.h>
+#include <TGeoCone.h>
+#include <TGeoPcon.h>
+#include <TGeoCompositeShape.h>
+
+#include "AliConst.h"
+#include "AliEMCALSpaceFrame.h"
+#include "AliMagF.h"
+#include "AliRun.h"
+ClassImp(AliEMCALSpaceFrame)
+//_____________________________________________________________________________
+AliEMCALSpaceFrame::AliEMCALSpaceFrame() 
+  : TNamed("EMCALSpaceFrame","Steel Space Frame that supports EMCAL"),
+    fNumCross(0),
+    fNumSubSets(0),
+    fTotalHalfWidth(0.),
+    fBeginPhi(0.),
+    fEndPhi(0.),
+    fTotalPhi(0.),
+    fBeginRadius(0.),
+    fHalfFrameTrans(0.),
+    fFlangeHeight(0.),
+    fFlangeWidth(0.),
+    fRibHeight(0.),
+    fRibWidth(0.),
+    fCrossBottomWidth(0.),
+    fCrossTopWidth(0.),
+    fCrossBottomHeight(0.),
+    fCrossBottomRadThick(0.),
+    fCrossBeamArcLength(0.),
+    fCrossBottomStartRadius(0.),
+    fCrossTopHeight(0.),
+    fCrossTopRadThick(0.),
+    fCrossTopStart(0.),
+    fEndRadius(0.),
+    fEndBeamRadThick(0),
+    fEndBeamBeginRadius(0)
+{
+  // default constructor for EMCAL Space Frame
+  //initialize parameters
+  fNumCross = 12; 
+  fNumSubSets = 3;
+  fTotalHalfWidth = 152.3;   // Half Width of a Half Frame
+                            // (CalFrame comes in 2 sections) 
+  fBeginPhi = 76.8;
+  fEndPhi = 193.03;
+  fBeginRadius = 490.;
+  
+  fHalfFrameTrans = fTotalHalfWidth+57.2/2.;  // Half Frame Connector is 57.2cm wide,
+                           // Supermodule is 340cm wide
+                            // Sources: HALF-FRAME-CONNECTOR-27E226A.pdf
+                            // provided by LBL
+
+  fFlangeWidth = 15.2;
+  fRibWidth = 1.5;
+  fCrossBottomHeight = 15.2;
+  fCrossBottomRadThick = 1.5;
+  fCrossTopHeight = 1.5;
+  fCrossTopRadThick = 35./2.;
+
+  fTotalPhi = fEndPhi - fBeginPhi;
+  fFlangeHeight = fBeginRadius + 3.;
+  fRibHeight = fFlangeHeight + 35;
+  fCrossBottomWidth = 0.5/(Double_t)fNumSubSets * (2.*fTotalHalfWidth - 8. * fFlangeWidth);
+  fCrossTopWidth = fCrossBottomWidth; // fCrossBottomWidth + fFlangeWidth - fRibWidth;
+                                      // for future release pending
+                                      // overlap correction - new TGeoVolume creation
+
+  fCrossBeamArcLength = (112.62597)/(fNumCross-1)-.001; // To account for shape of TGeoBBox
+  fCrossBottomStartRadius = fBeginRadius + fCrossBottomRadThick;
+  fCrossTopStart = fBeginRadius + 2.*fCrossBottomRadThick + fCrossTopRadThick+0.015; // 0.015 is a 
+                                                                                    // bubblegum and duct tape
+                                                                                    // fix for an overlap problem
+                                                                                    // will be worked out in future releases 
+  fEndRadius = fRibHeight+1.15;
+  fEndBeamRadThick = fCrossBottomRadThick+fCrossTopRadThick;
+  fEndBeamBeginRadius = fBeginRadius + fEndBeamRadThick;
+}
+
+//_____________________________________________________________________________
+AliEMCALSpaceFrame::AliEMCALSpaceFrame(const AliEMCALSpaceFrame &frame) 
+  : TNamed(frame.GetName(),frame.GetTitle()),
+    fNumCross(frame.fNumCross),
+    fNumSubSets(frame.fNumSubSets),
+    fTotalHalfWidth(frame.fTotalHalfWidth),
+    fBeginPhi(frame.fBeginPhi),
+    fEndPhi(frame.fEndPhi),
+    fTotalPhi(frame.fTotalPhi),
+    fBeginRadius(frame.fBeginRadius),
+    fHalfFrameTrans(frame.fHalfFrameTrans),
+    fFlangeHeight(frame.fFlangeHeight),
+    fFlangeWidth(frame.fFlangeWidth),
+    fRibHeight(frame.fRibHeight),
+    fRibWidth(frame.fRibWidth),
+    fCrossBottomWidth(frame.fCrossBottomWidth),
+    fCrossTopWidth(frame.fCrossTopWidth),
+    fCrossBottomHeight(frame.fCrossBottomHeight),
+    fCrossBottomRadThick(frame.fCrossBottomRadThick),
+    fCrossBeamArcLength(frame.fCrossBeamArcLength),
+    fCrossBottomStartRadius(frame.fCrossBottomStartRadius),
+    fCrossTopHeight(frame.fCrossTopHeight),
+    fCrossTopRadThick(frame.fCrossTopRadThick),
+    fCrossTopStart(frame.fCrossTopStart),
+    fEndRadius(frame.fEndRadius),
+    fEndBeamRadThick(frame.fEndBeamRadThick),
+    fEndBeamBeginRadius(frame.fEndBeamBeginRadius)
+{
+  // copy constructor for EMCAL Space Frame
+
+}
+
+//_____________________________________________________________________________
+void AliEMCALSpaceFrame::CreateGeometry()
+{
+  AliDebug(1,"Create CalFrame Geometry");
+  //////////////////////////////////////Setup/////////////////////////////////////////
+  TGeoVolume* top = gGeoManager->GetVolume("ALIC");
+  TGeoMedium *steel = gGeoManager->GetMedium("EMCAL_S steel$");
+  TGeoMedium *air = gGeoManager->GetMedium("EMCAL_Air$");
+
+       
+  //////////////////////////////////// Volumes ///////////////////////////////////////  
+  TGeoVolume *calFrameMO = 
+    gGeoManager->MakeTubs("CalFrame", air, fBeginRadius-2.1,fEndRadius,
+                         fTotalHalfWidth*3,fBeginPhi-3,fEndPhi+3);     // Mother Volume
+
+  calFrameMO->SetVisibility(kFALSE);
+
+  // Half Frame Mother Volume
+  TGeoVolume *calHalfFrameMO = 
+    gGeoManager->MakeTubs("HalfFrame", air, fBeginRadius-2,fEndRadius,
+                         fTotalHalfWidth,fBeginPhi-2.9,fEndPhi+2.9);
+
+  calHalfFrameMO->SetVisibility(kFALSE);
+
+  TGeoVolume *endBeams = 
+    gGeoManager->MakeBox("End Beams", steel, fEndBeamRadThick, fCrossTopHeight, fTotalHalfWidth); // End Beams
+
+  TGeoVolume *skin = 
+    gGeoManager->MakeTubs("skin", steel, fRibHeight+0.15, fEndRadius, 
+                         fTotalHalfWidth, fBeginPhi, fEndPhi);// back frame
+
+  TGeoVolume *flangeVolume = 
+    gGeoManager->MakeTubs("supportBottom", steel, fBeginRadius, fFlangeHeight, 
+                         fFlangeWidth, fBeginPhi, fEndPhi);            // FlangeVolume Beams
+
+  TGeoVolume *ribVolume = 
+    gGeoManager->MakeTubs("RibVolume", steel, fFlangeHeight, fRibHeight, fRibWidth, fBeginPhi, fEndPhi);
+
+  TGeoVolume *subSetCross = 
+    gGeoManager->MakeTubs("subSetCross", air, fBeginRadius-1,  fBeginRadius+2*fCrossBottomRadThick+
+                          2*fCrossTopRadThick+0.15, fCrossBottomWidth, fBeginPhi, fEndPhi);            // Cross Beam Containers
+  subSetCross->SetVisibility(kFALSE);
+  /*                                           // Obsolete for now
+  TGeoVolume *subSetCrossTop = 
+    gGeoManager->MakeTubs("SubSetCrossTop", air, fBeginRadius+2*fCrossBottomRadThick-1, fBeginRadius+2*fCrossBottomRadThick+
+                          2*fCrossTopRadThick+1, fCrossTopWidth, fBeginPhi, fEndPhi);  // Cross 
+  subSetCrossTop->SetVisibility(kFALSE);
+  */                    
+  TGeoVolume *crossBottomBeams = 
+    gGeoManager->MakeBox("crossBottom", steel, fCrossBottomRadThick, fCrossBottomHeight, fCrossBottomWidth); // Cross Beams
+
+  TGeoVolume *crossTopBeams = 
+    gGeoManager->MakeBox("crossTop", steel, fCrossTopRadThick, fCrossTopHeight, fCrossTopWidth); // Cross Beams
+  
+  TGeoTranslation *trTEST = new TGeoTranslation();
+  TGeoRotation *rotTEST = new TGeoRotation();
+  
+  Double_t conv = TMath::Pi()/180.;
+  Double_t radAngle = 0;
+  Double_t endBeamParam=.4;
+  //cout<<"\nfCrossBottomStartRadius: "<<fCrossBottomStartRadius<<"\n";
+  
+  for(Int_t i = 0; i < fNumCross; i++){
+    
+    Double_t loopPhi = fBeginPhi + 1.8;
+
+    // Cross Bottom Beams
+    
+    radAngle = (loopPhi + i*fCrossBeamArcLength)*conv; 
+    
+    rotTEST->SetAngles(fBeginPhi + i*fCrossBeamArcLength, 0, 0); //  SetTranslation(Double_t dx, Double_t dy, Double_t dz);
+    trTEST->SetTranslation(cos(radAngle)*fCrossBottomStartRadius, sin(radAngle)*fCrossBottomStartRadius,0);
+
+    TGeoCombiTrans *combo = new TGeoCombiTrans(*trTEST, *rotTEST);     // TGeoTranslation &tr, const TGeoRotation &rot);
+    combo->RegisterYourself();
+    crossBottomBeams->SetVisibility(1);
+    subSetCross->AddNode(crossBottomBeams, i+1, combo);
+    if (i != 0 && i!=fNumCross-1){
+    // Cross Bottom Beams
+    rotTEST->SetAngles(fBeginPhi + i*fCrossBeamArcLength, 0, 0); //  SetTranslation(Double_t dx, Double_t dy, Double_t dz);
+    trTEST->SetTranslation(cos(radAngle)*fCrossTopStart, sin(radAngle)*fCrossTopStart,0);
+    crossTopBeams->SetVisibility(1);
+    subSetCross->AddNode(crossTopBeams, i+1,  new TGeoCombiTrans(*trTEST, *rotTEST));
+    }
+    
+
+    else if(i ==0){
+               rotTEST->SetAngles(fBeginPhi + i*fCrossBeamArcLength, 0, 0); //  SetTranslation(Double_t dx, Double_t dy, Double_t dz);
+    trTEST->SetTranslation(cos((77-endBeamParam)*conv)*(fEndBeamBeginRadius), sin((77-endBeamParam)*conv)*(fEndBeamBeginRadius),0);
+    endBeams->SetVisibility(1);
+    calHalfFrameMO->AddNode(endBeams, 1,  new TGeoCombiTrans(*trTEST, *rotTEST));
+    }
+    else{
+    rotTEST->SetAngles(193.03, 0, 0); //  SetTranslation(Double_t dx, Double_t dy, Double_t dz);
+    trTEST->SetTranslation(cos((193.03+endBeamParam)*conv)*(fEndBeamBeginRadius)/*more duct tape*/, sin((193.03+endBeamParam)*conv)*(fEndBeamBeginRadius),0);
+    endBeams->SetVisibility(1);
+    calHalfFrameMO->AddNode(endBeams, 2,  new TGeoCombiTrans(*trTEST, *rotTEST));
+    }  
+  }
+  
+  //Beam Containers
+
+  // Translations 
+
+  TGeoTranslation *origin1 = new TGeoTranslation(0,0,0); // Equivalent to gGeoIdentity
+  TGeoTranslation *origin2 = new TGeoTranslation(0,0,2*(fCrossBottomWidth+fFlangeWidth));
+  TGeoTranslation *origin3 = new TGeoTranslation(0,0,-2*(fCrossBottomWidth+fFlangeWidth));
+
+  // FlangeVolume translations  
+  TGeoTranslation *str1 = new TGeoTranslation(0,0,-3*(fCrossBottomWidth+fFlangeWidth));
+  TGeoTranslation *str2 = new TGeoTranslation(0,0,-(fCrossBottomWidth+fFlangeWidth));
+  TGeoTranslation *str3 = new TGeoTranslation(0,0,(fCrossBottomWidth+fFlangeWidth));
+  TGeoTranslation *str4 = new TGeoTranslation(0,0,3*(fCrossBottomWidth+fFlangeWidth));
+
+  // Half Frame Translations
+  TGeoTranslation *halfTrans1 =  new TGeoTranslation(0,0,fHalfFrameTrans);
+  TGeoTranslation *halfTrans2 =  new TGeoTranslation(0,0,-fHalfFrameTrans);
+
+  // Beams Volume 
+  calHalfFrameMO->AddNode(flangeVolume, 1, str1);
+  calHalfFrameMO->AddNode(flangeVolume, 2, str2);
+  calHalfFrameMO->AddNode(flangeVolume, 3, str3);
+  calHalfFrameMO->AddNode(flangeVolume, 4, str4);
+  
+  calHalfFrameMO->AddNode(ribVolume, 1, str1);
+  calHalfFrameMO->AddNode(ribVolume, 2, str2);
+  calHalfFrameMO->AddNode(ribVolume, 3, str3);
+  calHalfFrameMO->AddNode(ribVolume, 4, str4);
+  
+  // Cross Beams  
+  calHalfFrameMO->AddNode(subSetCross, 1, origin1);
+  calHalfFrameMO->AddNode(subSetCross, 2, origin2);
+  calHalfFrameMO->AddNode(subSetCross, 3, origin3);
+/*                                     // Obsolete for now
+  calHalfFrameMO->AddNode(subSetCrossTop, 1, origin1);
+  calHalfFrameMO->AddNode(subSetCrossTop, 2, origin2);
+  calHalfFrameMO->AddNode(subSetCrossTop, 3, origin3);
+*/
+
+  calHalfFrameMO->AddNode(skin, 1, gGeoIdentity);
+  
+  calFrameMO->AddNode(calHalfFrameMO, 1, halfTrans1);
+  calFrameMO->AddNode(calHalfFrameMO, 2, halfTrans2);
+  top->AddNode(calFrameMO,1,gGeoIdentity);
+//  cout<<"**********************************\nfEndRadius:\t"<<fEndRadius;
+}
+
diff --git a/EMCAL/AliEMCALSpaceFrame.h b/EMCAL/AliEMCALSpaceFrame.h
new file mode 100644 (file)
index 0000000..3727107
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef ALIEMCALSPACEFRAME_H
+#define ALIEMCALSPACEFRAME_H
+/* Copyright(c) 2008, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+
+/////////////////////////////////////////////////
+//          class for EMCAL Space Frame        //
+//              Author: Ryan M. Ward           //                                                   
+//     California Polytechnic State Univeristy //                                                   
+//               rmward@calpoly.edu            // 
+/////////////////////////////////////////////////
+
+#include <TNamed.h> 
+
+class AliEMCALSpaceFrame : public TNamed
+{
+  
+public:
+
+  AliEMCALSpaceFrame();
+  virtual      ~AliEMCALSpaceFrame() {}
+
+  AliEMCALSpaceFrame(const AliEMCALSpaceFrame& calFrame);
+  AliEMCALSpaceFrame & operator = (const AliEMCALSpaceFrame & /*rvalue*/) {
+    Fatal("operator =", "not implemented");
+    return *this;
+  }
+  
+  //This method assembles the Geometries and places them into the
+  //Alice master volume
+  void CreateGeometry();
+
+protected:
+  
+private:
+
+  //space frame parameters from "SINGLE FRAME ASSEMBLY 27D624H.pdf"
+  //provided by Lawrence Berkeley Labs, USA
+  Int_t fNumCross;                  // Total number of cross beams including end pieces
+  Int_t fNumSubSets;                // Total Number of Cross Beam sections in each Half Section
+  Double_t fTotalHalfWidth;         // Half the width of each Half Section 
+  Double_t fBeginPhi;               // Begining Phi of Cal Frame
+  Double_t fEndPhi;                 // Ending Phi of Cal Frame
+  Double_t fTotalPhi;               // Total Phi range of Cal Frame
+  Double_t fBeginRadius;            // Begining Radius of Cal Frame
+  Double_t fHalfFrameTrans;         // z-direction translation for each half frame
+  //flange and rib dimensions
+  Double_t fFlangeHeight;           // Ending Radius of Flange (Flange is a TGeoTubeSeg)
+  Double_t fFlangeWidth;            // Thickness of Flange in z-direction
+  Double_t fRibHeight;              // Ending Radius of Rib
+  Double_t fRibWidth;               // Thickness of Rib in z-direction 
+  //cross beam sections - Cross beams come in two sections- top and bottom
+  Double_t fCrossBottomWidth;       // Width along z direction
+  Double_t fCrossTopWidth;          // Width along z direction
+  Double_t fCrossBottomHeight;      // Tangental thickness relative to CalFrame arc
+  Double_t fCrossBottomRadThick;    // Radial thickness relative to center of geometry
+  Double_t fCrossBeamArcLength;     // For calulating placement of
+  Double_t fCrossBottomStartRadius; // Radial position relative to center of geometry
+  Double_t fCrossTopHeight;         // Tangental thickness relative to the center of geometry
+  Double_t fCrossTopRadThick;       // Radial thickness relative to CalFrame arc
+  Double_t fCrossTopStart;          // Radial position relative to center of geometry
+  Double_t fEndRadius;              // Ending Radius of Mother Volume
+  Double_t fEndBeamRadThick;       // Radial Thickness of the End Beams
+  Double_t fEndBeamBeginRadius;            // Starting Radius for End Beams
+
+  ClassDef(AliEMCALSpaceFrame,1)  //Class for EMCAL Space Frame
+};
+
+#endif  //ALIEMCALSPACEFRAME_H
index 1c0b3ab..13d43ab 100644 (file)
@@ -57,6 +57,7 @@
 #include "AliRun.h"
 #include "AliLog.h"
 #include "AliGeomManager.h"
+#include "AliEMCALSpaceFrame.h"
 
 ClassImp(AliEMCALv0)
 
@@ -74,7 +75,7 @@ enum
 AliEMCALv0::AliEMCALv0()
   : AliEMCAL(),
     fShishKebabModules(),fEnvelop1(0),fIdRotm(0),fIdTmedArr(0),
-    fSampleWidth(0),fSmodPar0(0),fSmodPar1(0),fSmodPar2(0)
+    fSampleWidth(0),fSmodPar0(0),fSmodPar1(0),fSmodPar2(0),fCalFrame(0)
 {
   //default ctor
 }
@@ -83,7 +84,7 @@ AliEMCALv0::AliEMCALv0()
 AliEMCALv0::AliEMCALv0(const char *name, const char *title)
   : AliEMCAL(name,title),
     fShishKebabModules(),fEnvelop1(0),fIdRotm(0),fIdTmedArr(0),
-    fSampleWidth(0),fSmodPar0(0),fSmodPar1(0),fSmodPar2(0)
+    fSampleWidth(0),fSmodPar0(0),fSmodPar1(0),fSmodPar2(0),fCalFrame(0)
 {
   // ctor : title is used to identify the layout
   // Apr 25, 2006
@@ -317,6 +318,11 @@ void AliEMCALv0::CreateGeometry()
   AliDebug(2,Form("Shish-Kebab geometry : %s", GetTitle())); 
   CreateShishKebabGeometry();
 
+  //Space Frame
+  AliDebug(2,"Creating EMCAL Space Frame");
+  fCalFrame = new AliEMCALSpaceFrame();
+  fCalFrame->CreateGeometry();
+
 }
 
 //______________________________________________________________________
index 705fd86..a4c9326 100644 (file)
@@ -18,12 +18,12 @@ class TFile;
 class TList;
 class TNode;
 class AliEMCALShishKebabTrd1Module;
+class AliEMCALSpaceFrame;
 
 // --- AliRoot header files ---
 #include "AliEMCAL.h"
 #include "TGeoManager.h"
 #include <TArrayF.h>
-//class AliEMCALGeometry ; 
 
 class AliEMCALv0 : public AliEMCAL {
 
@@ -85,11 +85,12 @@ class AliEMCALv0 : public AliEMCAL {
   Double_t fSmodPar1;          //! y size of super module  
   Double_t fSmodPar2;          //! z size of super module  
   Double_t fParEMOD[5];        //! parameters of EMCAL module (TRD1,2)
+  AliEMCALSpaceFrame* fCalFrame; //EMCAL Space frame object
 
   AliEMCALv0(const AliEMCALv0 & emcal);
   AliEMCALv0 & operator = (const AliEMCALv0  & /*rvalue*/);
  
-  ClassDef(AliEMCALv0,3) // Implementation of EMCAL manager class for midrapidity barrel layout between 80 and 180(190) degrees 
+  ClassDef(AliEMCALv0,4) // Implementation of EMCAL manager class for midrapidity barrel layout between 80 and 180(190) degrees 
     
     };
     
index 8caa321..8a63376 100644 (file)
@@ -26,5 +26,6 @@
 #pragma link C++ class AliEMCALSurvey+;
 #pragma link C++ class AliEMCALRecParam+;
 #pragma link C++ class AliEMCALQAChecker+;
+#pragma link C++ class AliEMCALSpaceFrame+;
 
 #endif
index 6ff4c0c..700be6f 100644 (file)
@@ -22,7 +22,9 @@ AliCaloCalibPedestal.cxx \
 AliCaloCalibSignal.cxx \
 AliEMCALSurvey.cxx \
 AliEMCALRecParam.cxx \
-AliEMCALQAChecker.cxx
+AliEMCALQAChecker.cxx \
+AliEMCALSpaceFrame.cxx
+
 
 HDRS= $(SRCS:.cxx=.h)