]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Cleaned config for v1 test
authorshahoian <ruben.shahoyan@cern.ch>
Mon, 17 Mar 2014 23:59:58 +0000 (00:59 +0100)
committershahoian <ruben.shahoyan@cern.ch>
Mon, 17 Mar 2014 23:59:58 +0000 (00:59 +0100)
ITS/UPGRADE/testITSUv1/Config.C
ITS/UPGRADE/testITSUv1/CreateITSUv1.C

index 12b0dff78991a92e07dc357e73494ad8943d087d..4dbc7b189645feb585f2bd620ecfaf0d30e1246a 100644 (file)
@@ -163,7 +163,7 @@ void Config()
   if (generatorFlag==0) {
     // Fast generator with parametrized pi,kaon,proton distributions
     
-    int  nParticles = 100;//14022;
+    int  nParticles = 1000;//14022;
     AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
     gener->SetMomentumRange(0.1, 10.);
     gener->SetPhiRange(0., 360.);
@@ -268,13 +268,13 @@ void Config()
   Int_t   iMAG   =  0;
   Int_t   iMUON  =  0;
   Int_t   iPHOS  =  0;
-  Int_t   iPIPE  =  0;
+  Int_t   iPIPE  =  1;
   Int_t   iPMD   =  0;
   Int_t   iHMPID =  0;
   Int_t   iSHIL  =  0;
   Int_t   iT0    =  0;
   Int_t   iTOF   =  0;
-  Int_t   iTPC   =  0;
+  Int_t   iTPC   =  1;
   Int_t   iTRD   =  0;
   Int_t   iZDC   =  0;
   Int_t   iEMCAL =  0;
index ca08116745f1e8baa301947da4ead49d877d24a7..4293ecde17842a3a319de880e85594cbfd1e6e59 100644 (file)
@@ -23,16 +23,14 @@ void CreateITSUv1()
   //
   gSystem->Load("libITSUpgradeBase.so");
   gSystem->Load("libITSUpgradeSim.so");
-
-
+  //
   // build ITS upgrade detector
   // sensitive area 13x15mm (X,Z) with 20x20 micron pitch, 2mm dead zone on readout side and 50 micron guardring
   const double kSensThick = 18e-4;
   const double kPitchX = 20e-4;
   const double kPitchZ = 20e-4;
   const int    kNRow   = 650; 
-  const int    kNCol   = 750;
-  const int    kNChips = 2;
+  const int    kNCol   = 1500;
   const double kLrThick03 = 120e-4;   // -> effective thickness for ~0.3%X layers
   const double kLrThick08 = 600e-4;   // -> effective thickness for ~0.8%X layers
   //
@@ -45,20 +43,20 @@ void CreateITSUv1()
   enum {kRmn,kRmd,kRmx,kNModPerStave,kPhi0,kNStave,kNPar};
   // Radii are from last TDR (ALICE-TDR-017.pdf Tab. 1.1, rMid is mean value)
   const double tdr5dat[kNLr][kNPar] = { 
-    {2.24, 2.34, 2.67,  9., 16.37, 12}, // for each inner layer: rMin,rMid,rMax,NMod/Stave,phi0, nStave
+    {2.24, 2.34, 2.67,  9., 16.37, 12}, // for each inner layer: rMin,rMid,rMax,NChip/Stave, phi0, nStaves
     {3.01, 3.15, 3.46,  9., 12.03, 16},
     {3.78, 3.93, 4.21,  9., 10.02, 20},
-    {-1,  19.6 ,   -1,  4.,  0.  , 24},  // for others: -, rMid, -, NMod/Stave, phi0, nStave // 24 was 49
+    {-1,  19.6 ,   -1,  4.,  0.  , 24},  // for others: -, rMid, -, NMod/HStave, phi0, nStaves // 24 was 49
     {-1,  24.55, -1,    4.,  0.  , 30},  // 30 was 61
     {-1,  34.39, -1,    7.,  0.  , 42},  // 42 was 88
     {-1,  39.34, -1,    7.,  0.  , 48}   // 48 was 100
   };
-  const int nChipsPerModule = 7; // For OB we have to specify how many chips
+  const int nChipsPerModule = 7; // For OB: how many chips in a row
 
   // create segmentations:
   AliITSUSegmentationPix* seg0 = new AliITSUSegmentationPix(0,        // segID (0:9)
-                                                           kNChips,  // chips per module
-                                                           kNChips*kNCol,    // ncols (total for module)
+                                                           1,  // chips per module
+                                                           kNCol,    // ncols (total for module)
                                                            kNRow,    // nrows
                                                            kPitchX,  // default row pitch in cm
                                                            kPitchZ,  // default col pitch in cm
@@ -72,97 +70,45 @@ void CreateITSUv1()
                                                            );    // see AliITSUSegmentationPix.h for extra options
   seg0->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
   //
-  AliITSUSegmentationPix* seg1 = new AliITSUSegmentationPix(1,        // segID (0:9)
-                                                           kNChips,  // chips per module
-                                                           kNChips*kNCol,    // ncols (total for module)
-                                                           2*kNRow,    // nrows for oute layers
-                                                           kPitchX,  // default row pitch in cm
-                                                           kPitchZ,  // default col pitch in cm
-                                                           kSensThick,  // sensor thickness in cm
-                                                           -1,     // no special left col between chips
-                                                           -1,     // no special right col between chips
-                                                           kGuardRing, // left
-                                                           kGuardRing, // right
-                                                           kReadOutEdge, // top   !!! readout from both sides
-                                                           kReadOutEdge  // bottom
-                                                           );    // see AliITSUSegmentationPix.h for extra options
-  seg1->Store(AliITSUGeomTGeo::GetITSsegmentationFileName());
-  //
   seg0->Print();
-  seg1->Print();
   //
-  const double kMinOvl = 0.005; // require active zones overlap
-  const double kTilt = -10.; // tilt in degrees for outer layers
-  double dzLr,rLr,phi0,turbo,thick;
-  AliITSUSegmentationPix* seg=0;
+  double dzLr,rLr,phi0,turbo;
   int nStaveLr,nModPerStaveLr,idLr;
-  //      virtual void   DefineLayerTurbo(const Int_t nlay, const Double_t r,  const Double_t zlen, const Int_t nladd,   const Int_t nmod, const Double_t width,
-  //                             const Double_t tilt,   const Double_t lthick = 0.,    const Double_t dthick = 0.,   const UInt_t detType=0);
-  AliITSUv1 *ITS  = new AliITSUv1("ITS Upgrade",7);
+  //
+  AliITSUv1 *ITS  = new AliITSUv1("ITS Upgrade",kNLr);
   ITS->SetStaveModelIB(AliITSUv1::kIBModel22);
   ITS->SetStaveModelOB(AliITSUv1::kOBModel1);
   //
   const int kNWrapVol = 3;
   const double wrpRMin[kNWrapVol]  = { 2.1, 15.0, 32.0};
   const double wrpRMax[kNWrapVol]  = { 7.0, 27.0+2.5, 43.0+1.5};
-  const double wrpZSpan[kNWrapVol] = {28.0, 96.0, 158.0};
+  const double wrpZSpan[kNWrapVol] = {28.0, 86.0, 150.0};
+  //
   ITS->SetNWrapVolumes(kNWrapVol); // define wrapper volumes for layers
   for (int iw=0;iw<kNWrapVol;iw++) ITS->DefineWrapVolume(iw,wrpRMin[iw],wrpRMax[iw],wrpZSpan[iw]);
   //
   for (int idLr=0;idLr<kNLr;idLr++) {
     rLr   = tdr5dat[idLr][kRmd];
     phi0  = tdr5dat[idLr][kPhi0]; 
-    if (idLr<kNLrInner) {
-      seg = seg0;
-      turbo = -radii2Turbo(tdr5dat[idLr][kRmn],rLr,tdr5dat[idLr][kRmx],seg->Dx());     
-      thick = kLrThick03;
-    }
-    else {
-      seg   = seg1;
-      turbo = kTilt;
-      thick = kLrThick08;
-    }
+    //
     nStaveLr = TMath::Nint(tdr5dat[idLr][kNStave]);
-    if (nStaveLr<0) nStaveLr = getNStaves(seg,kTilt,rLr,kMinOvl); // calculate automatically
     nModPerStaveLr =  TMath::Nint(tdr5dat[idLr][kNModPerStave]);
     int nChipsPerStaveLr = nModPerStaveLr;
+    //
     if (idLr>=kNLrInner) {
       nChipsPerStaveLr *= nChipsPerModule;
-      ITS->DefineLayer(idLr, phi0, rLr, nChipsPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, 
-                      thick, seg->Dy(), seg->GetChipTypeID(),kBuildLevel);
-      printf("Add Lr%d: R=%6.2f DZ:%6.2f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nChipsPerStaveLr*seg->Dz(),nStaveLr,nModPerStaveLr);
+      ITS->DefineLayer(idLr, phi0, rLr, nChipsPerStaveLr*seg0->Dz(), nStaveLr, nModPerStaveLr, 
+                      kLrThick03, seg0->Dy(), seg0->GetChipTypeID(),kBuildLevel);
+      //      printf("Add Lr%d: R=%6.2f DZ:%6.2f Staves:%3d NMod/Stave:%3d\n",
+      //            idLr,rLr,nChipsPerStaveLr*seg0->Dz(),nStaveLr,nModPerStaveLr);
     } else {
-      ITS->DefineLayerTurbo(idLr, phi0, rLr, nChipsPerStaveLr*seg->Dz(), nStaveLr, nModPerStaveLr, 
-                         seg->Dx(), turbo, thick, seg->Dy(), seg->GetChipTypeID());
-      printf("Add Lr%d: R=%6.2f DZ:%6.2f Turbo:%+6.2f Staves:%3d NMod/Stave:%3d\n",idLr,rLr,nChipsPerStaveLr*seg->Dz(),turbo,nStaveLr,nModPerStaveLr);
+      turbo = -radii2Turbo(tdr5dat[idLr][kRmn],rLr,tdr5dat[idLr][kRmx],seg0->Dx());    
+      ITS->DefineLayerTurbo(idLr, phi0, rLr, nChipsPerStaveLr*seg0->Dz(), nStaveLr, nChipsPerStaveLr, 
+                         seg0->Dx(), turbo, kLrThick08, seg0->Dy(), seg0->GetChipTypeID());
+      //      printf("Add Lr%d: R=%6.2f DZ:%6.2f Turbo:%+6.2f Staves:%3d NMod/Stave:%3d\n",
+      //            idLr,rLr,nChipsPerStaveLr*seg0->Dz(),turbo,nStaveLr,nModPerStaveLr);
     }
     //
   }
   //  
 }
-
-Int_t getNStaves(AliITSUSegmentationPix* seg, double tilt, double r0, double minOvl)
-{
-  double dphi = (90.-tilt)*TMath::DegToRad();
-  double cs = TMath::Cos(dphi);
-  double sn = TMath::Sin(dphi);  
-  double dx = seg->Dx();
-  double tL = -dx/2 + seg->GetGuardBot();
-  double tU =  dx/2 - seg->GetGuardTop();
-  //
-  double xL = r0 + cs*tL;
-  double yL =      sn*tL;
-  double xU = r0 + cs*tU;
-  double yU =      sn*tU;
-  double phiL = TMath::ATan2(yL,xL);
-  double phiU = TMath::ATan2(yU,xU);
-  double dphi = TMath::Abs(phiL-phiU);
-  if (dphi>TMath::Pi()) dphi = TMath::Abs(dphi-TMath::Pi()*2);
-  double span = dphi*r0;
-  //
-  double ov = -1;
-  int nStaveLr = 1 + r0*TMath::Pi()*2/span;
-  do { ov = 1.-r0*TMath::Pi()*2/nStaveLr/span; } while ( minOvl>=0 && ov<minOvl && nStaveLr++ );
-  printf("Reccommend %2d staves for R=%5.2f, ActiveOvl=%5.2f\% (%6.f micron)\n",nStaveLr,r0,ov*100,ov*span*1e4);
-  return nStaveLr;
-}