From 92718be18a7fa69db6f649ead37cc0943f320874 Mon Sep 17 00:00:00 2001 From: martinez Date: Thu, 27 Jan 2005 09:10:51 +0000 Subject: [PATCH] Removing obsolete macros and classes --- MUON/AliMUONproto.cxx | 593 ------------ MUON/AliMUONproto.h | 36 - MUON/AliMUONv3.cxx | 1979 ----------------------------------------- MUON/AliMUONv3.h | 71 -- MUON/Config.C | 341 ------- MUON/Config_acc.C | 267 ------ MUON/Config_slat.C | 776 ---------------- 7 files changed, 4063 deletions(-) delete mode 100644 MUON/AliMUONproto.cxx delete mode 100644 MUON/AliMUONproto.h delete mode 100644 MUON/AliMUONv3.cxx delete mode 100644 MUON/AliMUONv3.h delete mode 100644 MUON/Config.C delete mode 100644 MUON/Config_acc.C delete mode 100644 MUON/Config_slat.C diff --git a/MUON/AliMUONproto.cxx b/MUON/AliMUONproto.cxx deleted file mode 100644 index 38f9d64debc..00000000000 --- a/MUON/AliMUONproto.cxx +++ /dev/null @@ -1,593 +0,0 @@ -/************************************************************************** - * 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. * - **************************************************************************/ - -/* $Id$ */ - -/* -Implementation of MUON Chamber Prototype Class -Both read digits from raw data or use the Monte-Carlo. -1-Feb-2000 Rachid GUERNANE, IPN Lyon guernane@ipnl.in2p3.fr -*/ - - -//////////////////////////////////////////////// -// Manager and hits classes for set:PROTO // -//////////////////////////////////////////////// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "AliMUONChamber.h" -#include "AliMUONproto.h" -#include "AliMUONHit.h" -#include "TTUBE.h" -#include "AliMUONClusterFinder.h" -#include "AliRun.h" -#include "Riostream.h" -#include "AliCallf77.h" -#include "AliConst.h" -//#include "chainalice2.h" -#include "AliMUONSegmentationV0.h" -//#include "AliMUONSegResV11.h" -#include "AliLog.h" - -ClassImp(AliMUONproto) - -//___________________________________________ -AliMUONproto::AliMUONproto() - : AliMUON() -{ - AliInfo(" Calling AliMUONproto constructor..."); - - // - // - // -} - -//___________________________________________ -AliMUONproto::AliMUONproto(const char *name, const char *title) - : AliMUON(name,title) -// AliMUON defines everything, but the chamber for NCH=1 -{ - -// z-Positions of Chambers - const Float_t zch[1] = {975.}; -// -// inner diameter - const Float_t dmi[1] = {0.}; -// -// outer diameter - const Float_t dma[1] = {29.2}; -// -// -// Default Parameters for ALICE2 prototype - -// - (*fChambers)[0] = new AliMUONChamber(); - AliMUONChamber* chamber = (AliMUONChamber*) (*fChambers)[0]; - chamber->SetGid(0); - chamber->SetZ(zch[0]); -// - chamber->InitGeo(zch[0]); - chamber->SetRInner(dmi[0]/2); - chamber->SetROuter(dma[0]/2); - - for (int i = 0; i <= 99; i++) { - fThreshold[i] = 0.; - } - -} - -#ifdef WE_FORGET_FOR_THE_MOMENT -//___________________________________________ -void AliMUONproto::GetRawDigits(Int_t evnb, Int_t *lptr, Int_t ilen) { - - Int_t ip = 0; - Int_t equip = 0; - Int_t nochnl; - Int_t loop; - Int_t val; - Int_t itype; - Int_t id; - Int_t serial; - Int_t equiplen; - - Int_t digits[5]; - - AliMUON* MUON = (AliMUON*)gAlice->GetModule("MUON"); - AliMUONSegmentationV0* seg = (AliMUONSegmentationV0*) Chamber(0).SegmentationModel(1); - - Int_t tracks[10]; - Int_t charges[10]; - - for (Int_t i = 0; i < 10; i++) { - tracks[i] = 0; - charges[i] = 0; - } - - Int_t ich = 0; - - nwtype: - - itype = lptr[ip++]; - id = lptr[ip++]; - equiplen = lptr[ip++]; - - if (equiplen < 0 ) return; - - if (itype != (int)(0XCACCA008)) { - ip += equiplen; - if (ip < ilen-2) goto nwtype; - } - else { - serial = id >> 16; - equip = id & 0x1; - if ((serial == 190) && (equip == 1)) { - for (loop = 0; loop < equiplen; loop++) { - nochnl = (lptr[ip] & 0x7ff000 ) >> 12; - val = lptr[ip] & 0x3ff; - // fill digits from raw data according to cathode connexions - if (group[nochnl][2][1]!=0) - digits[0] = group[nochnl][2][1] - 12; - else if (group[nochnl][1][1]!=0) - digits[0] = group[nochnl][1][1] - 12; - else - digits[0] = group[nochnl][0][1] - 12; - digits[1] = group[nochnl][0][0]; - if (digits[0] != seg->Ix(digits[0], digits[1])) - AliInfi(Form("Pb pour ix=%d,iy=%d\n", digits[0], digits[1])); - digits[2] = val; - digits[3] = 0; - digits[4] = 0; - if (digits[2] >= fThreshold[nochnl]) - MUON->AddDigits(ich, tracks, charges, digits); - - ip++; - } - } - else - ip += equiplen; - - if (ip < ilen-2) goto nwtype; - } - - gAlice->TreeD()->Fill(); - MUON->ResetDigits(); - - gAlice->TreeD()->Fill(); - MUON->ResetDigits(); - - char hname[30]; - sprintf(hname, "TreeD%d", evnb); - gAlice->TreeD()->Write(hname,TObject::kOverwrite); - // reset tree - gAlice->TreeD()->Reset(); - -} -#endif - -//___________________________________________ -void AliMUONproto::SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2) -{ - Int_t i=2*(id-1); - ((AliMUONChamber*)(*fChambers)[i])->SetPadSize(isec,p1,p2); -} - -//___________________________________________ -void AliMUONproto::SetChargeSlope(Int_t id, Float_t p1) -{ - Int_t i=2*(id-1); - ((AliMUONChamber*) (*fChambers)[i])->SetChargeSlope(p1); -} - -//___________________________________________ -void AliMUONproto::SetChargeSpread(Int_t id, Float_t p1, Float_t p2) -{ - Int_t i=2*(id-1); - ((AliMUONChamber*) (*fChambers)[i])->SetChargeSpread(p1,p2); -} - -//___________________________________________ -void AliMUONproto::SetMaxAdc(Int_t id, Float_t p1) -{ - Int_t i=2*(id-1); - ((AliMUONChamber*) (*fChambers)[i])->SetMaxAdc(p1); -} - -//___________________________________________ -void AliMUONproto::CreateGeometry() -{ - Int_t *idtmed = fIdtmed->GetArray()-1099; -// - Float_t zpos; - Float_t bpar[3]; - Int_t idGas=idtmed[1100]; - - AliMUONChamber *iChamber; -//******************************************************************** -// Prototype ALICE2 ** -//******************************************************************** - iChamber=(AliMUONChamber*) (*fChambers)[0]; - - zpos=iChamber->Z(); -// - const Float_t X_POS = 11*.975/2; //half x - const Float_t Y_POS = 18*.55/2; //half y - const Float_t Z_POS = 0.325; - - bpar[0] = X_POS; - bpar[1] = Y_POS; - bpar[2] = Z_POS; - - gMC->Gsvolu("C01G", "BOX", idGas, bpar, 3); - gMC->Gspos("C01G", 1, "ALIC", -bpar[0], bpar[1], zpos, 0, "ONLY"); -} - -//___________________________________________ -void AliMUONproto::CreateMaterials() -{ - // *** DEFINITION OF AVAILABLE MUON MATERIALS *** - // - // Ar-CO2 gas - Float_t ag1[3] = { 39.95,12.01,16. }; - Float_t zg1[3] = { 18.,6.,8. }; - Float_t wg1[3] = { .8,.0667,.13333 }; - Float_t dg1 = .001821; - - Float_t epsil = .001; // Tracking precision, - Float_t tmaxfd = -20.; // Maximum angle due to field deflection - Float_t stmin = -.8; - Int_t ISXFLD = gAlice->Field()->Integ(); - Float_t SXMGMX = gAlice->Field()->Max(); - - // - // --- Define the various materials for GEANT --- - AliMixture(22, "ArCO2 80%$", ag1, zg1, dg1, 3, wg1); - - // - // Ar/CO2 - AliMedium(1, "ARG_CO2 ", 22, 1, ISXFLD, SXMGMX, tmaxfd, fMaxStepGas, - fMaxDestepAlu, epsil, stmin); - // Air - //AliMedium(1, "AIR_CH_US ", 15, 1, ISXFLD, SXMGMX, tmaxfd, -1., -.3, epsil, stmin); -} - -//___________________________________________ -void AliMUONproto::Init() -{ - AliInfo("\n\n\n Start Init for Prototype ALICE2 - CPC chamber type\n\n\n"); - - // - // Initialize Tracking Chambers - // - - ( (AliMUONChamber*) (*fChambers)[0])->Init(); - - // - // Set the chamber (sensitive region) GEANT identifier - ((AliMUONChamber*)(*fChambers)[0])->SetGid(gMC->VolId("C01G")); - - AliInfo("\n\n\n Finished Init for Prototype ALICE2 - CPC chamber type\n\n\n"); - -} - -//___________________________________________ -void AliMUONproto::StepManager() -{ - Int_t copy, id; - static Int_t idvol; - static Int_t vol[2]; - Int_t ipart; - TLorentzVector pos; - TLorentzVector mom; - Float_t theta,phi; - Float_t destep, step; - - static Float_t eloss, eloss2, xhit, yhit, tlength; - const Float_t big=1.e10; - - // modifs perso - static Float_t hits[14]; - - TClonesArray &lhits = *fHits; - - // - // Set maximum step size for gas - // numed=gMC->GetMedium(); - // - // Only charged tracks - if( !(gMC->TrackCharge()) ) return; - // - // Only gas gap inside chamber - // Tag chambers and record hits when track enters - idvol=-1; - id=gMC->CurrentVolID(copy); - - for (Int_t i=1; i<=kNCH; i++) { - if(id==((AliMUONChamber*)(*fChambers)[i-1])->GetGid()){ - vol[0]=i; - idvol=i-1; - } - } - if (idvol == -1) return; - // - // Get current particle id (ipart), track position (pos) and momentum (mom) - gMC->TrackPosition(pos); - gMC->TrackMomentum(mom); - - ipart = gMC->TrackPid(); - //Int_t ipart1 = gMC->IdFromPDG(ipart); - //printf("ich, ipart %d %d \n",vol[0],ipart1); - - // - // momentum loss and steplength in last step - destep = gMC->Edep(); - step = gMC->TrackStep(); - - // - // record hits when track enters ... - if( gMC->IsTrackEntering()) { - gMC->SetMaxStep(fMaxStepGas); - Double_t tc = mom[0]*mom[0]+mom[1]*mom[1]; - Double_t rt = TMath::Sqrt(tc); - Double_t pmom = TMath::Sqrt(tc+mom[2]*mom[2]); - Double_t tx=mom[0]/pmom; - Double_t ty=mom[1]/pmom; - Double_t tz=mom[2]/pmom; - Double_t s=((AliMUONChamber*)(*fChambers)[idvol]) - ->ResponseModel() - ->Pitch()/tz; - theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg; - phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg; - hits[0] = Float_t(ipart); // Geant3 particle type - hits[1] = pos[0]+s*tx; // X-position for hit - hits[2] = pos[1]+s*ty; // Y-position for hit - hits[3] = pos[2]+s*tz; // Z-position for hit - hits[4] = theta; // theta angle of incidence - hits[5] = phi; // phi angle of incidence - hits[8] = (Float_t) fNPadHits; // first padhit - hits[9] = -1; // last pad hit - - // modifs perso - hits[10] = mom[3]; // hit momentum P - hits[11] = mom[0]; // Px/P - hits[12] = mom[1]; // Py/P - hits[13] = mom[2]; // Pz/P - // fin modifs perso - - // phi angle of incidence - tlength = 0; - eloss = 0; - eloss2 = 0; - xhit = pos[0]; - yhit = pos[1]; - // Only if not trigger chamber - if(idvol<10) { - // - // Initialize hit position (cursor) in the segmentation model - ((AliMUONChamber*) (*fChambers)[idvol]) - ->SigGenInit(pos[0], pos[1], pos[2]); - } else { - //geant3->Gpcxyz(); - //printf("In the Trigger Chamber #%d\n",idvol-9); - } - } - eloss2+=destep; - - // - // Calculate the charge induced on a pad (disintegration) in case - // - // Mip left chamber ... - if( gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared()){ - gMC->SetMaxStep(big); - eloss += destep; - tlength += step; - - // Only if not trigger chamber - if(idvol<10) { - if (eloss > 0) - MakePadHits(0.5*(xhit+pos[0]),0.5*(yhit+pos[1]),eloss,0.0,idvol); - } - - hits[6]=tlength; - hits[7]=eloss2; - if (fNPadHits > (Int_t)hits[8]) { - hits[8]= hits[8]+1; - hits[9]= (Float_t) fNPadHits; - } - - new(lhits[fNhits++]) - AliMUONHit(fIshunt,gAlice->GetCurrentTrackNumber(),vol,hits); - eloss = 0; - // - // Check additional signal generation conditions - // defined by the segmentation - // model (boundary crossing conditions) - } else if - (((AliMUONChamber*) (*fChambers)[idvol]) - ->SigGenCond(pos[0], pos[1], pos[2])) - { - ((AliMUONChamber*) (*fChambers)[idvol]) - ->SigGenInit(pos[0], pos[1], pos[2]); -// printf("\n-> MakePadHits, reason special %d",ipart); - if (eloss > 0) - MakePadHits(0.5*(xhit+pos[0]),0.5*(yhit+pos[1]),eloss,0.0,idvol); - xhit = pos[0]; - yhit = pos[1]; - eloss = destep; - tlength += step ; - // - // nothing special happened, add up energy loss - } else { - eloss += destep; - tlength += step ; - } -} - -//___________________________________________ -void AliMUONproto::BuildGeometry() -{ - TNode *Node; - TNode *Top; - - const int kColorMUON = kBlue; - // - Top=gAlice->GetGeometry()->GetNode("alice"); - // - // - // - float dx, dy, dz, zpos; - - const Float_t cz[1]={975.}; - - zpos=cz[0]; - - dx=11*.975/2; - dy=18*.55/2; - dz=0.325; - - new TBRIK("C_MUON101","Mother volume for Proto.","void",dx*2,dy*2,dz*2); - TBRIK* PROTO = new TBRIK("PROT", "Proto. Sens. Region","void",dx,dy,dz); - Top->cd(); - Node = new TNode("MUON101","ChamberNode","C_MUON101",0,0,zpos,""); - Node->SetLineColor(kColorMUON); - Node->SetVisibility(0); - fNodes->Add(Node); - Node->cd(); - Node = new TNode("MUON201", "Proto. Sens. Region Node", PROTO, -dx, dy, dz); - Node->SetLineColor(kColorMUON); - -} - -//_____________________________________________________________________________ -void AliMUONproto::FindClusters(Int_t nev, Int_t last_entry) -{ - -// -// Loop on chambers and on cathode planes -// - for (Int_t icat = 0; icat < 2; icat++) { - gAlice->ResetDigits(); - gAlice->TreeD()->GetEvent(last_entry+icat); - - for (Int_t ich = 0; ich < kNTrackingCh; ich++) { - AliMUONChamber* iChamber=(AliMUONChamber*) (*fChambers)[ich]; - TClonesArray *MUONdigits = this->DigitsAddress(ich); - if (MUONdigits == 0) continue; - // - // Get ready the current chamber stuff - // - - AliMUONResponse* response = iChamber->ResponseModel(); - AliMUONSegmentation* seg = iChamber->SegmentationModel(icat+1); - AliMUONClusterFinder* rec = iChamber->ReconstructionModel(); - - if (seg) { - rec->SetSegmentation(seg); - rec->SetResponse(response); - rec->SetDigits(MUONdigits); - rec->SetChamber(ich); - rec->FindRawClusters(); - } - - TClonesArray *fRch; - fRch=RawClustAddress(ich); - fRch->Sort(); - // it seems to work - - } // for ich - // fill the tree - gAlice->TreeR()->Fill(); - - ResetRawClusters(); - } // for icat - - char hname[30]; - sprintf(hname,"TreeR%d",nev); - gAlice->TreeR()->Write(hname); - gAlice->TreeR()->Reset(); -} - -#ifdef WE_FORGRET_THIS_SHIT -//_____________________________________________________________________________ -void AliMUONproto::SetThreshold() -{ - - ifstream inputFile("/home/alice/guernane/aliroot/pro/MUON/crped190.dat", ios::in); - - if (inputFile.fail()) { - AliError("Error opening file"); - exit(2); - } - - char buff[32]; - Int_t Serial; - Int_t Ntrigger; - Int_t Nchannel; - Int_t i1; - Int_t i2; - - inputFile >> buff; - - inputFile >> Serial; - inputFile >> Ntrigger; - inputFile >> Nchannel; - inputFile >> i1; - inputFile >> i2; - - Float_t ped0[Nchannel]; - Float_t sig0[Nchannel]; - Float_t ped1[Nchannel]; - Float_t sig1[Nchannel]; - Int_t ichannel; - - for (Int_t i = 0; i < Nchannel-1; i++) { - ped0[i] = 0; - sig0[i] = 0; - ped1[i] = 0; - sig1[i] = 0; - } - - for (Int_t i = 0; i < Nchannel-1; i++) { - inputFile >> ichannel; - inputFile >> ped0[i]; - inputFile >> sig0[i]; - inputFile >> ped1[i]; - inputFile >> sig1[i]; - fThreshold[i] = fNsigma*sig1[i]; - } - - inputFile.close(); -} -#endif diff --git a/MUON/AliMUONproto.h b/MUON/AliMUONproto.h deleted file mode 100644 index 8cb1b733502..00000000000 --- a/MUON/AliMUONproto.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef MUONPROTO_H -#define MUONPROTO_H -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ - -/* $Id$ */ - -#include "AliMUON.h" - -class AliMUONproto : public AliMUON { - public: - AliMUONproto(); - AliMUONproto(const char *name, const char *title); - virtual ~AliMUONproto() {} - virtual void CreateGeometry(); - virtual void CreateMaterials(); - virtual void Init(); - virtual Int_t IsVersion() const {return 2;} - virtual void StepManager(); -// void GetRawDigits(Int_t iev, Int_t* ptr, Int_t len); - void SetPadSize(Int_t id, Int_t isec, Float_t p1, Float_t p2); -// void SetThreshold(); - void SetNsigma(Int_t nsig) {fNsigma = nsig;}; - void BuildGeometry(); - void SetChargeSlope(Int_t id, Float_t p1); - void SetChargeSpread(Int_t id, Float_t p1, Float_t p2); - void SetMaxAdc(Int_t id, Float_t p1); - void FindClusters(Int_t, Int_t); - - private: - ClassDef(AliMUONproto,1) // MUON Detector class for test beam prototypes - protected: - Int_t fNsigma; - Float_t fThreshold[100]; -}; -#endif diff --git a/MUON/AliMUONv3.cxx b/MUON/AliMUONv3.cxx deleted file mode 100644 index d4f73c3e786..00000000000 --- a/MUON/AliMUONv3.cxx +++ /dev/null @@ -1,1979 +0,0 @@ -/************************************************************************** - * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * SigmaEffect_thetadegrees * - * 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 purpeateose. It is * - * provided "as is" without express or implied warranty. * - **************************************************************************/ - -/* $Id$ */ - -///////////////////////////////////////////////////////// -// Manager and hits classes for set:MUON version 3 // -///////////////////////////////////////////////////////// - -// Old MUONv1 class -// (AliMUONv1.h 1.11, AliMUONv1.cxx 1.60) -// - now replaced with a new one where geometry and materials -// are created using new geometry builders -// (See ALIMUON*GeometryBuilder classes) -// To be removed later - -#include -#include -#include -#include -#include - -#include "AliMUONv3.h" -#include "AliConst.h" -#include "AliMUONChamber.h" -#include "AliMUONConstants.h" -#include "AliMUONFactory.h" -#include "AliMUONHit.h" -#include "AliMUONTriggerCircuit.h" -#include "AliMUONGeometryModule.h" -#include "AliMagF.h" -#include "AliRun.h" -#include "AliMC.h" -#include "AliLog.h" - -ClassImp(AliMUONv3) - -//___________________________________________ -AliMUONv3::AliMUONv3() - : AliMUON(), - fTrackMomentum(), fTrackPosition() -{ -// Constructor - fChambers = 0; - fStations = 0; - fStepManagerVersionOld = kFALSE; - fAngleEffect = kTRUE; - fStepMaxInActiveGas = 0.6; - fStepSum = 0x0; - fDestepSum = 0x0; - fElossRatio = 0x0; - fAngleEffect10 = 0x0; - fAngleEffectNorma= 0x0; -} -//___________________________________________ -AliMUONv3::AliMUONv3(const char *name, const char *title) - : AliMUON(name,title), - fTrackMomentum(), fTrackPosition() -{ -// Constructor - // By default include all stations - fStations = new Int_t[5]; - for (Int_t i=0; i<5; i++) fStations[i] = 1; - - AliMUONFactory factory; - factory.Build(this, title); - - fStepManagerVersionOld = kFALSE; - fAngleEffect = kTRUE; - fStepMaxInActiveGas = 0.6; - - fStepSum = new Float_t [AliMUONConstants::NCh()]; - fDestepSum = new Float_t [AliMUONConstants::NCh()]; - for (Int_t i=0; iSetParameter(0,1.02138); - fElossRatio->SetParameter(1,-9.54149e-02); - fElossRatio->SetParameter(2,+7.83433e-02); - fElossRatio->SetParameter(3,-9.98208e-03); - fElossRatio->SetParameter(4,+3.83279e-04); - - // Angle effect in tracking chambers at theta =10 degres as a function of ElossRatio (Khalil BOUDJEMLINE sep 2003 Ph.D Thesis) (in micrometers) - fAngleEffect10 = new TF1("AngleEffect10","[0]+[1]*x+[2]*x*x",0.5,3.0); - fAngleEffect10->SetParameter(0, 1.90691e+02); - fAngleEffect10->SetParameter(1,-6.62258e+01); - fAngleEffect10->SetParameter(2,+1.28247e+01); - // Angle effect: Normalisation form theta=10 degres to theta between 0 and 10 (Khalil BOUDJEMLINE sep 2003 Ph.D Thesis) - // Angle with respect to the wires assuming that chambers are perpendicular to the z axis. - fAngleEffectNorma = new TF1("AngleEffectNorma","[0]+[1]*x+[2]*x*x+[3]*x*x*x",0.0,10.0); - fAngleEffectNorma->SetParameter(0,4.148); - fAngleEffectNorma->SetParameter(1,-6.809e-01); - fAngleEffectNorma->SetParameter(2,5.151e-02); - fAngleEffectNorma->SetParameter(3,-1.490e-03); -} - -//_____________________________________________________________________________ -AliMUONv3::AliMUONv3(const AliMUONv3& right) - : AliMUON(right) -{ - // copy constructor (not implemented) - - AliFatal("Copy constructor not provided."); -} - -//_____________________________________________________________________________ -AliMUONv3& AliMUONv3::operator=(const AliMUONv3& right) -{ - // assignement operator (not implemented) - - // check assignement to self - if (this == &right) return *this; - - AliFatal("Assignement operator not provided."); - - return *this; -} - -//___________________________________________ -void AliMUONv3::CreateGeometry() -{ -// -// Note: all chambers have the same structure, which could be -// easily parameterised. This was intentionally not done in order -// to give a starting point for the implementation of the actual -// design of each station. - Int_t *idtmed = fIdtmed->GetArray()-1099; - -// Distance between Stations -// - Float_t bpar[3]; - Float_t tpar[3]; -// Float_t pgpar[10]; - Float_t zpos1, zpos2, zfpos; - // Outer excess and inner recess for mother volume radius - // with respect to ROuter and RInner - Float_t dframep=.001; // Value for station 3 should be 6 ... - // Width (RdPhi) of the frame crosses for stations 1 and 2 (cm) -// Float_t dframep1=.001; - Float_t dframep1 = 11.0; -// Bool_t frameCrosses=kFALSE; - Bool_t frameCrosses=kTRUE; - Float_t *dum=0; - -// Float_t dframez=0.9; - // Half of the total thickness of frame crosses (including DAlu) - // for each chamber in stations 1 and 2: - // 3% of X0 of composite material, - // but taken as Aluminium here, with same thickness in number of X0 - Float_t dframez = 3. * 8.9 / 100; -// Float_t dr; - Float_t dstation; - -// -// Rotation matrices in the x-y plane - Int_t idrotm[1199]; -// phi= 0 deg - AliMatrix(idrotm[1100], 90., 0., 90., 90., 0., 0.); -// phi= 90 deg - AliMatrix(idrotm[1101], 90., 90., 90., 180., 0., 0.); -// phi= 180 deg - AliMatrix(idrotm[1102], 90., 180., 90., 270., 0., 0.); -// phi= 270 deg - AliMatrix(idrotm[1103], 90., 270., 90., 0., 0., 0.); -// - Float_t phi=2*TMath::Pi()/12/2; - -// -// pointer to the current chamber -// pointer to the current chamber - Int_t idAlu1=idtmed[1103]; // medium 4 - Int_t idAlu2=idtmed[1104]; // medium 5 -// Int_t idAlu1=idtmed[1100]; -// Int_t idAlu2=idtmed[1100]; - Int_t idAir=idtmed[1100]; // medium 1 -// Int_t idGas=idtmed[1105]; // medium 6 = Ar-isoC4H10 gas - Int_t idGas=idtmed[1108]; // medium 9 = Ar-CO2 gas (80%+20%) - - - AliMUONChamber *iChamber, *iChamber1, *iChamber2; - - if (fStations[0]) { - -//******************************************************************** -// Station 1 ** -//******************************************************************** -// CONCENTRIC - // indices 1 and 2 for first and second chambers in the station - // iChamber (first chamber) kept for other quanties than Z, - // assumed to be the same in both chambers - iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[0]; - iChamber2 =(AliMUONChamber*) (*fChambers)[1]; - zpos1=iChamber1->Z(); - zpos2=iChamber2->Z(); - dstation = TMath::Abs(zpos2 - zpos1); - // DGas decreased from standard one (0.5) - iChamber->SetDGas(0.4); iChamber2->SetDGas(0.4); - // DAlu increased from standard one (3% of X0), - // because more electronics with smaller pads - iChamber->SetDAlu(3.5 * 8.9 / 100.); iChamber2->SetDAlu(3.5 * 8.9 / 100.); - zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; - -// -// Mother volume - tpar[0] = iChamber->RInner()-dframep; - tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); - tpar[2] = dstation/5; - - gMC->Gsvolu("S01M", "TUBE", idAir, tpar, 3); - gMC->Gsvolu("S02M", "TUBE", idAir, tpar, 3); - gMC->Gspos("S01M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); - gMC->Gspos("S02M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); -// // Aluminium frames -// // Outer frames -// pgpar[0] = 360/12/2; -// pgpar[1] = 360.; -// pgpar[2] = 12.; -// pgpar[3] = 2; -// pgpar[4] = -dframez/2; -// pgpar[5] = iChamber->ROuter(); -// pgpar[6] = pgpar[5]+dframep1; -// pgpar[7] = +dframez/2; -// pgpar[8] = pgpar[5]; -// pgpar[9] = pgpar[6]; -// gMC->Gsvolu("S01O", "PGON", idAlu1, pgpar, 10); -// gMC->Gsvolu("S02O", "PGON", idAlu1, pgpar, 10); -// gMC->Gspos("S01O",1,"S01M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S01O",2,"S01M", 0.,0.,+zfpos, 0,"ONLY"); -// gMC->Gspos("S02O",1,"S02M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S02O",2,"S02M", 0.,0.,+zfpos, 0,"ONLY"); -// // -// // Inner frame -// tpar[0]= iChamber->RInner()-dframep1; -// tpar[1]= iChamber->RInner(); -// tpar[2]= dframez/2; -// gMC->Gsvolu("S01I", "TUBE", idAlu1, tpar, 3); -// gMC->Gsvolu("S02I", "TUBE", idAlu1, tpar, 3); - -// gMC->Gspos("S01I",1,"S01M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S01I",2,"S01M", 0.,0.,+zfpos, 0,"ONLY"); -// gMC->Gspos("S02I",1,"S02M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S02I",2,"S02M", 0.,0.,+zfpos, 0,"ONLY"); -// -// Frame Crosses - if (frameCrosses) { - // outside gas - // security for inside mother volume - bpar[0] = (iChamber->ROuter() - iChamber->RInner()) - * TMath::Cos(TMath::ASin(dframep1 / - (iChamber->ROuter() - iChamber->RInner()))) - / 2.0; - bpar[1] = dframep1/2; - // total thickness will be (4 * bpar[2]) for each chamber, - // which has to be equal to (2 * dframez) - DAlu - bpar[2] = (2.0 * dframez - iChamber->DAlu()) / 4.0; - gMC->Gsvolu("S01B", "BOX", idAlu1, bpar, 3); - gMC->Gsvolu("S02B", "BOX", idAlu1, bpar, 3); - - gMC->Gspos("S01B",1,"S01M", -iChamber->RInner()-bpar[0] , 0, zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S01B",2,"S01M", iChamber->RInner()+bpar[0] , 0, zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S01B",3,"S01M", 0, -iChamber->RInner()-bpar[0] , zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S01B",4,"S01M", 0, iChamber->RInner()+bpar[0] , zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S01B",5,"S01M", -iChamber->RInner()-bpar[0] , 0,-zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S01B",6,"S01M", +iChamber->RInner()+bpar[0] , 0,-zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S01B",7,"S01M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S01B",8,"S01M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, - idrotm[1101],"ONLY"); - - gMC->Gspos("S02B",1,"S02M", -iChamber->RInner()-bpar[0] , 0, zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S02B",2,"S02M", iChamber->RInner()+bpar[0] , 0, zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S02B",3,"S02M", 0, -iChamber->RInner()-bpar[0] , zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S02B",4,"S02M", 0, iChamber->RInner()+bpar[0] , zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S02B",5,"S02M", -iChamber->RInner()-bpar[0] , 0,-zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S02B",6,"S02M", +iChamber->RInner()+bpar[0] , 0,-zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S02B",7,"S02M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S02B",8,"S02M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, - idrotm[1101],"ONLY"); - } -// -// Chamber Material represented by Alu sheet - tpar[0]= iChamber->RInner(); - tpar[1]= iChamber->ROuter(); - tpar[2] = (iChamber->DGas()+iChamber->DAlu())/2; - gMC->Gsvolu("S01A", "TUBE", idAlu2, tpar, 3); - gMC->Gsvolu("S02A", "TUBE",idAlu2, tpar, 3); - gMC->Gspos("S01A", 1, "S01M", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("S02A", 1, "S02M", 0., 0., 0., 0, "ONLY"); -// -// Sensitive volumes - // tpar[2] = iChamber->DGas(); - tpar[2] = iChamber->DGas()/2; - gMC->Gsvolu("S01G", "TUBE", idGas, tpar, 3); - gMC->Gsvolu("S02G", "TUBE", idGas, tpar, 3); - gMC->Gspos("S01G", 1, "S01A", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("S02G", 1, "S02A", 0., 0., 0., 0, "ONLY"); -// -// Frame Crosses to be placed inside gas - // NONE: chambers are sensitive everywhere -// if (frameCrosses) { - -// dr = (iChamber->ROuter() - iChamber->RInner()); -// bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2; -// bpar[1] = dframep1/2; -// bpar[2] = iChamber->DGas()/2; -// gMC->Gsvolu("S01F", "BOX", idAlu1, bpar, 3); -// gMC->Gsvolu("S02F", "BOX", idAlu1, bpar, 3); - -// gMC->Gspos("S01F",1,"S01G", +iChamber->RInner()+bpar[0] , 0, 0, -// idrotm[1100],"ONLY"); -// gMC->Gspos("S01F",2,"S01G", -iChamber->RInner()-bpar[0] , 0, 0, -// idrotm[1100],"ONLY"); -// gMC->Gspos("S01F",3,"S01G", 0, +iChamber->RInner()+bpar[0] , 0, -// idrotm[1101],"ONLY"); -// gMC->Gspos("S01F",4,"S01G", 0, -iChamber->RInner()-bpar[0] , 0, -// idrotm[1101],"ONLY"); - -// gMC->Gspos("S02F",1,"S02G", +iChamber->RInner()+bpar[0] , 0, 0, -// idrotm[1100],"ONLY"); -// gMC->Gspos("S02F",2,"S02G", -iChamber->RInner()-bpar[0] , 0, 0, -// idrotm[1100],"ONLY"); -// gMC->Gspos("S02F",3,"S02G", 0, +iChamber->RInner()+bpar[0] , 0, -// idrotm[1101],"ONLY"); -// gMC->Gspos("S02F",4,"S02G", 0, -iChamber->RInner()-bpar[0] , 0, -// idrotm[1101],"ONLY"); -// } - } - if (fStations[1]) { - -//******************************************************************** -// Station 2 ** -//******************************************************************** - // indices 1 and 2 for first and second chambers in the station - // iChamber (first chamber) kept for other quanties than Z, - // assumed to be the same in both chambers - iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[2]; - iChamber2 =(AliMUONChamber*) (*fChambers)[3]; - zpos1=iChamber1->Z(); - zpos2=iChamber2->Z(); - dstation = TMath::Abs(zpos2 - zpos1); - // DGas and DAlu not changed from standard values - zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; - -// -// Mother volume - tpar[0] = iChamber->RInner()-dframep; - tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); - tpar[2] = dstation/5; - - gMC->Gsvolu("S03M", "TUBE", idAir, tpar, 3); - gMC->Gsvolu("S04M", "TUBE", idAir, tpar, 3); - gMC->Gspos("S03M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); - gMC->Gspos("S04M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); - gMC->Gsbool("S03M", "L3DO"); - gMC->Gsbool("S03M", "L3O1"); - gMC->Gsbool("S03M", "L3O2"); - gMC->Gsbool("S04M", "L3DO"); - gMC->Gsbool("S04M", "L3O1"); - gMC->Gsbool("S04M", "L3O2"); - -// // Aluminium frames -// // Outer frames -// pgpar[0] = 360/12/2; -// pgpar[1] = 360.; -// pgpar[2] = 12.; -// pgpar[3] = 2; -// pgpar[4] = -dframez/2; -// pgpar[5] = iChamber->ROuter(); -// pgpar[6] = pgpar[5]+dframep; -// pgpar[7] = +dframez/2; -// pgpar[8] = pgpar[5]; -// pgpar[9] = pgpar[6]; -// gMC->Gsvolu("S03O", "PGON", idAlu1, pgpar, 10); -// gMC->Gsvolu("S04O", "PGON", idAlu1, pgpar, 10); -// gMC->Gspos("S03O",1,"S03M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S03O",2,"S03M", 0.,0.,+zfpos, 0,"ONLY"); -// gMC->Gspos("S04O",1,"S04M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S04O",2,"S04M", 0.,0.,+zfpos, 0,"ONLY"); -// // -// // Inner frame -// tpar[0]= iChamber->RInner()-dframep; -// tpar[1]= iChamber->RInner(); -// tpar[2]= dframez/2; -// gMC->Gsvolu("S03I", "TUBE", idAlu1, tpar, 3); -// gMC->Gsvolu("S04I", "TUBE", idAlu1, tpar, 3); - -// gMC->Gspos("S03I",1,"S03M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S03I",2,"S03M", 0.,0.,+zfpos, 0,"ONLY"); -// gMC->Gspos("S04I",1,"S04M", 0.,0.,-zfpos, 0,"ONLY"); -// gMC->Gspos("S04I",2,"S04M", 0.,0.,+zfpos, 0,"ONLY"); -// -// Frame Crosses - if (frameCrosses) { - // outside gas - // security for inside mother volume - bpar[0] = (iChamber->ROuter() - iChamber->RInner()) - * TMath::Cos(TMath::ASin(dframep1 / - (iChamber->ROuter() - iChamber->RInner()))) - / 2.0; - bpar[1] = dframep1/2; - // total thickness will be (4 * bpar[2]) for each chamber, - // which has to be equal to (2 * dframez) - DAlu - bpar[2] = (2.0 * dframez - iChamber->DAlu()) / 4.0; - gMC->Gsvolu("S03B", "BOX", idAlu1, bpar, 3); - gMC->Gsvolu("S04B", "BOX", idAlu1, bpar, 3); - - gMC->Gspos("S03B",1,"S03M", -iChamber->RInner()-bpar[0] , 0, zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S03B",2,"S03M", +iChamber->RInner()+bpar[0] , 0, zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S03B",3,"S03M", 0, -iChamber->RInner()-bpar[0] , zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S03B",4,"S03M", 0, +iChamber->RInner()+bpar[0] , zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S03B",5,"S03M", -iChamber->RInner()-bpar[0] , 0,-zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S03B",6,"S03M", +iChamber->RInner()+bpar[0] , 0,-zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S03B",7,"S03M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S03B",8,"S03M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, - idrotm[1101],"ONLY"); - - gMC->Gspos("S04B",1,"S04M", -iChamber->RInner()-bpar[0] , 0, zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S04B",2,"S04M", +iChamber->RInner()+bpar[0] , 0, zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S04B",3,"S04M", 0, -iChamber->RInner()-bpar[0] , zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S04B",4,"S04M", 0, +iChamber->RInner()+bpar[0] , zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S04B",5,"S04M", -iChamber->RInner()-bpar[0] , 0,-zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S04B",6,"S04M", +iChamber->RInner()+bpar[0] , 0,-zfpos, - idrotm[1100],"ONLY"); - gMC->Gspos("S04B",7,"S04M", 0, -iChamber->RInner()-bpar[0] ,-zfpos, - idrotm[1101],"ONLY"); - gMC->Gspos("S04B",8,"S04M", 0, +iChamber->RInner()+bpar[0] ,-zfpos, - idrotm[1101],"ONLY"); - } -// -// Chamber Material represented by Alu sheet - tpar[0]= iChamber->RInner(); - tpar[1]= iChamber->ROuter(); - tpar[2] = (iChamber->DGas()+iChamber->DAlu())/2; - gMC->Gsvolu("S03A", "TUBE", idAlu2, tpar, 3); - gMC->Gsvolu("S04A", "TUBE", idAlu2, tpar, 3); - gMC->Gspos("S03A", 1, "S03M", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("S04A", 1, "S04M", 0., 0., 0., 0, "ONLY"); -// -// Sensitive volumes - // tpar[2] = iChamber->DGas(); - tpar[2] = iChamber->DGas()/2; - gMC->Gsvolu("S03G", "TUBE", idGas, tpar, 3); - gMC->Gsvolu("S04G", "TUBE", idGas, tpar, 3); - gMC->Gspos("S03G", 1, "S03A", 0., 0., 0., 0, "ONLY"); - gMC->Gspos("S04G", 1, "S04A", 0., 0., 0., 0, "ONLY"); -// -// Frame Crosses to be placed inside gas - // NONE: chambers are sensitive everywhere -// if (frameCrosses) { - -// dr = (iChamber->ROuter() - iChamber->RInner()); -// bpar[0] = TMath::Sqrt(dr*dr-dframep1*dframep1/4)/2; -// bpar[1] = dframep1/2; -// bpar[2] = iChamber->DGas()/2; -// gMC->Gsvolu("S03F", "BOX", idAlu1, bpar, 3); -// gMC->Gsvolu("S04F", "BOX", idAlu1, bpar, 3); - -// gMC->Gspos("S03F",1,"S03G", +iChamber->RInner()+bpar[0] , 0, 0, -// idrotm[1100],"ONLY"); -// gMC->Gspos("S03F",2,"S03G", -iChamber->RInner()-bpar[0] , 0, 0, -// idrotm[1100],"ONLY"); -// gMC->Gspos("S03F",3,"S03G", 0, +iChamber->RInner()+bpar[0] , 0, -// idrotm[1101],"ONLY"); -// gMC->Gspos("S03F",4,"S03G", 0, -iChamber->RInner()-bpar[0] , 0, -// idrotm[1101],"ONLY"); - -// gMC->Gspos("S04F",1,"S04G", +iChamber->RInner()+bpar[0] , 0, 0, -// idrotm[1100],"ONLY"); -// gMC->Gspos("S04F",2,"S04G", -iChamber->RInner()-bpar[0] , 0, 0, -// idrotm[1100],"ONLY"); -// gMC->Gspos("S04F",3,"S04G", 0, +iChamber->RInner()+bpar[0] , 0, -// idrotm[1101],"ONLY"); -// gMC->Gspos("S04F",4,"S04G", 0, -iChamber->RInner()-bpar[0] , 0, -// idrotm[1101],"ONLY"); -// } - } - // define the id of tracking media: - Int_t idCopper = idtmed[1110]; - Int_t idGlass = idtmed[1111]; - Int_t idCarbon = idtmed[1112]; - Int_t idRoha = idtmed[1113]; - - // sensitive area: 40*40 cm**2 - const Float_t ksensLength = 40.; - const Float_t ksensHeight = 40.; - const Float_t ksensWidth = 0.5; // according to TDR fig 2.120 - const Int_t ksensMaterial = idGas; - const Float_t kyOverlap = 1.5; - - // PCB dimensions in cm; width: 30 mum copper - const Float_t kpcbLength = ksensLength; - const Float_t kpcbHeight = 60.; - const Float_t kpcbWidth = 0.003; - const Int_t kpcbMaterial= idCopper; - - // Insulating material: 200 mum glass fiber glued to pcb - const Float_t kinsuLength = kpcbLength; - const Float_t kinsuHeight = kpcbHeight; - const Float_t kinsuWidth = 0.020; - const Int_t kinsuMaterial = idGlass; - - // Carbon fiber panels: 200mum carbon/epoxy skin - const Float_t kpanelLength = ksensLength; - const Float_t kpanelHeight = ksensHeight; - const Float_t kpanelWidth = 0.020; - const Int_t kpanelMaterial = idCarbon; - - // rohacell between the two carbon panels - const Float_t krohaLength = ksensLength; - const Float_t krohaHeight = ksensHeight; - const Float_t krohaWidth = 0.5; - const Int_t krohaMaterial = idRoha; - - // Frame around the slat: 2 sticks along length,2 along height - // H: the horizontal ones - const Float_t khFrameLength = kpcbLength; - const Float_t khFrameHeight = 1.5; - const Float_t khFrameWidth = ksensWidth; - const Int_t khFrameMaterial = idGlass; - - // V: the vertical ones - const Float_t kvFrameLength = 4.0; - const Float_t kvFrameHeight = ksensHeight + khFrameHeight; - const Float_t kvFrameWidth = ksensWidth; - const Int_t kvFrameMaterial = idGlass; - - // B: the horizontal border filled with rohacell - const Float_t kbFrameLength = khFrameLength; - const Float_t kbFrameHeight = (kpcbHeight - ksensHeight)/2. - khFrameHeight; - const Float_t kbFrameWidth = khFrameWidth; - const Int_t kbFrameMaterial = idRoha; - - // NULOC: 30 mum copper + 200 mum vetronite (same radiation length as 14mum copper) - const Float_t knulocLength = 2.5; - const Float_t knulocHeight = 7.5; - const Float_t knulocWidth = 0.0030 + 0.0014; // equivalent copper width of vetronite; - const Int_t knulocMaterial = idCopper; - - const Float_t kslatHeight = kpcbHeight; - const Float_t kslatWidth = ksensWidth + 2.*(kpcbWidth + kinsuWidth + - 2.* kpanelWidth + krohaWidth); - const Int_t kslatMaterial = idAir; - const Float_t kdSlatLength = kvFrameLength; // border on left and right - - Float_t spar[3]; - Int_t i, j; - - // the panel volume contains the rohacell - - Float_t twidth = 2 * kpanelWidth + krohaWidth; - Float_t panelpar[3] = { kpanelLength/2., kpanelHeight/2., twidth/2. }; - Float_t rohapar[3] = { krohaLength/2., krohaHeight/2., krohaWidth/2. }; - - // insulating material contains PCB-> gas-> 2 borders filled with rohacell - - twidth = 2*(kinsuWidth + kpcbWidth) + ksensWidth; - Float_t insupar[3] = { kinsuLength/2., kinsuHeight/2., twidth/2. }; - twidth -= 2 * kinsuWidth; - Float_t pcbpar[3] = { kpcbLength/2., kpcbHeight/2., twidth/2. }; - Float_t senspar[3] = { ksensLength/2., ksensHeight/2., ksensWidth/2. }; - Float_t theight = 2*khFrameHeight + ksensHeight; - Float_t hFramepar[3]={khFrameLength/2., theight/2., khFrameWidth/2.}; - Float_t bFramepar[3]={kbFrameLength/2., kbFrameHeight/2., kbFrameWidth/2.}; - Float_t vFramepar[3]={kvFrameLength/2., kvFrameHeight/2., kvFrameWidth/2.}; - Float_t nulocpar[3]={knulocLength/2., knulocHeight/2., knulocWidth/2.}; - Float_t xx; - Float_t xxmax = (kbFrameLength - knulocLength)/2.; - Int_t index=0; - - if (fStations[2]) { - -//******************************************************************** -// Station 3 ** -//******************************************************************** - // indices 1 and 2 for first and second chambers in the station - // iChamber (first chamber) kept for other quanties than Z, - // assumed to be the same in both chambers - iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[4]; - iChamber2 =(AliMUONChamber*) (*fChambers)[5]; - zpos1=iChamber1->Z(); - zpos2=iChamber2->Z(); - dstation = TMath::Abs(zpos2 - zpos1); - -// -// Mother volume - tpar[0] = iChamber->RInner()-dframep; - tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); - tpar[2] = dstation/5; - - const char *slats5Mother = "S05M"; - const char *slats6Mother = "S06M"; - Float_t zoffs5 = 0; - Float_t zoffs6 = 0; - - if (gAlice->GetModule("DIPO")) { - slats5Mother="DDIP"; - slats6Mother="DDIP"; - - zoffs5 = TMath::Abs(zpos1); - zoffs6 = TMath::Abs(zpos2); - } - - else { - gMC->Gsvolu("S05M", "TUBE", idAir, tpar, 3); - gMC->Gsvolu("S06M", "TUBE", idAir, tpar, 3); - gMC->Gspos("S05M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); - gMC->Gspos("S06M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); - } - - // volumes for slat geometry (xx=5,..,10 chamber id): - // Sxx0 Sxx1 Sxx2 Sxx3 --> Slat Mother volumes - // SxxG --> Sensitive volume (gas) - // SxxP --> PCB (copper) - // SxxI --> Insulator (vetronite) - // SxxC --> Carbon panel - // SxxR --> Rohacell - // SxxH, SxxV --> Horizontal and Vertical frames (vetronite) - // SB5x --> Volumes for the 35 cm long PCB - // slat dimensions: slat is a MOTHER volume!!! made of air - - // only for chamber 5: slat 1 has a PCB shorter by 5cm! - - Float_t tlength = 35.; - Float_t panelpar2[3] = { tlength/2., panelpar[1], panelpar[2]}; - Float_t rohapar2[3] = { tlength/2., rohapar[1], rohapar[2]}; - Float_t insupar2[3] = { tlength/2., insupar[1], insupar[2]}; - Float_t pcbpar2[3] = { tlength/2., pcbpar[1], pcbpar[2]}; - Float_t senspar2[3] = { tlength/2., senspar[1], senspar[2]}; - Float_t hFramepar2[3] = { tlength/2., hFramepar[1], hFramepar[2]}; - Float_t bFramepar2[3] = { tlength/2., bFramepar[1], bFramepar[2]}; - - const Int_t knSlats3 = 5; // number of slats per quadrant - const Int_t knPCB3[knSlats3] = {3,3,4,3,2}; // n PCB per slat - const Float_t kxpos3[knSlats3] = {31., 40., 0., 0., 0.}; - Float_t slatLength3[knSlats3]; - - // create and position the slat (mother) volumes - - char volNam5[5]; - char volNam6[5]; - Float_t xSlat3; - - Float_t spar2[3]; - for (i = 0; iGetModule("DIPO")) {zSlat*=-1.;} - - sprintf(volNam5,"S05%d",i); - gMC->Gsvolu(volNam5,"BOX",kslatMaterial,spar2,3); - gMC->Gspos(volNam5, i*4+1,slats5Mother, -xSlat32, ySlat31, zoffs5-zSlat-2.*dzCh3, 0, "ONLY"); - gMC->Gspos(volNam5, i*4+2,slats5Mother, +xSlat32, ySlat31, zoffs5-zSlat+2.*dzCh3, 0, "ONLY"); - - if (i>0) { - gMC->Gspos(volNam5, i*4+3,slats5Mother,-xSlat32, ySlat32, zoffs5-zSlat-2.*dzCh3, 0, "ONLY"); - gMC->Gspos(volNam5, i*4+4,slats5Mother,+xSlat32, ySlat32, zoffs5-zSlat+2.*dzCh3, 0, "ONLY"); - } - sprintf(volNam6,"S06%d",i); - gMC->Gsvolu(volNam6,"BOX",kslatMaterial,spar,3); - gMC->Gspos(volNam6, i*4+1,slats6Mother,-xSlat3, ySlat31, zoffs6-zSlat-2.*dzCh3, 0, "ONLY"); - gMC->Gspos(volNam6, i*4+2,slats6Mother,+xSlat3, ySlat31, zoffs6-zSlat+2.*dzCh3, 0, "ONLY"); - if (i>0) { - gMC->Gspos(volNam6, i*4+3,slats6Mother,-xSlat3, ySlat32, zoffs6-zSlat-2.*dzCh3, 0, "ONLY"); - gMC->Gspos(volNam6, i*4+4,slats6Mother,+xSlat3, ySlat32, zoffs6-zSlat+2.*dzCh3, 0, "ONLY"); - } - } - - // create the panel volume - - gMC->Gsvolu("S05C","BOX",kpanelMaterial,panelpar,3); - gMC->Gsvolu("SB5C","BOX",kpanelMaterial,panelpar2,3); - gMC->Gsvolu("S06C","BOX",kpanelMaterial,panelpar,3); - - // create the rohacell volume - - gMC->Gsvolu("S05R","BOX",krohaMaterial,rohapar,3); - gMC->Gsvolu("SB5R","BOX",krohaMaterial,rohapar2,3); - gMC->Gsvolu("S06R","BOX",krohaMaterial,rohapar,3); - - // create the insulating material volume - - gMC->Gsvolu("S05I","BOX",kinsuMaterial,insupar,3); - gMC->Gsvolu("SB5I","BOX",kinsuMaterial,insupar2,3); - gMC->Gsvolu("S06I","BOX",kinsuMaterial,insupar,3); - - // create the PCB volume - - gMC->Gsvolu("S05P","BOX",kpcbMaterial,pcbpar,3); - gMC->Gsvolu("SB5P","BOX",kpcbMaterial,pcbpar2,3); - gMC->Gsvolu("S06P","BOX",kpcbMaterial,pcbpar,3); - - // create the sensitive volumes, - gMC->Gsvolu("S05G","BOX",ksensMaterial,dum,0); - gMC->Gsvolu("S06G","BOX",ksensMaterial,dum,0); - - - // create the vertical frame volume - - gMC->Gsvolu("S05V","BOX",kvFrameMaterial,vFramepar,3); - gMC->Gsvolu("S06V","BOX",kvFrameMaterial,vFramepar,3); - - // create the horizontal frame volume - - gMC->Gsvolu("S05H","BOX",khFrameMaterial,hFramepar,3); - gMC->Gsvolu("SB5H","BOX",khFrameMaterial,hFramepar2,3); - gMC->Gsvolu("S06H","BOX",khFrameMaterial,hFramepar,3); - - // create the horizontal border volume - - gMC->Gsvolu("S05B","BOX",kbFrameMaterial,bFramepar,3); - gMC->Gsvolu("SB5B","BOX",kbFrameMaterial,bFramepar2,3); - gMC->Gsvolu("S06B","BOX",kbFrameMaterial,bFramepar,3); - - index=0; - for (i = 0; iGspos("S05V",2*i-1,volNam5, xvFrame2, 0., 0. , 0, "ONLY"); - gMC->Gspos("S05V",2*i ,volNam5,-xvFrame2, 0., 0. , 0, "ONLY"); - gMC->Gspos("S06V",2*i-1,volNam6, xvFrame, 0., 0. , 0, "ONLY"); - gMC->Gspos("S06V",2*i ,volNam6,-xvFrame, 0., 0. , 0, "ONLY"); - } - // position the panels and the insulating material - for (j=0; jGspos("SB5C",2*index-1,volNam5, xx, 0., zPanel , 0, "ONLY"); - gMC->Gspos("SB5C",2*index ,volNam5, xx, 0.,-zPanel , 0, "ONLY"); - gMC->Gspos("SB5I",index ,volNam5, xx, 0., 0 , 0, "ONLY"); - } - else if ( (i==1 || i==2) && j < knPCB3[i]-1) { - gMC->Gspos("S05C",2*index-1,volNam5, xx2, 0., zPanel , 0, "ONLY"); - gMC->Gspos("S05C",2*index ,volNam5, xx2, 0.,-zPanel , 0, "ONLY"); - gMC->Gspos("S05I",index ,volNam5, xx2, 0., 0 , 0, "ONLY"); - } - else { - gMC->Gspos("S05C",2*index-1,volNam5, xx, 0., zPanel , 0, "ONLY"); - gMC->Gspos("S05C",2*index ,volNam5, xx, 0.,-zPanel , 0, "ONLY"); - gMC->Gspos("S05I",index ,volNam5, xx, 0., 0 , 0, "ONLY"); - } - gMC->Gspos("S06C",2*index-1,volNam6, xx, 0., zPanel , 0, "ONLY"); - gMC->Gspos("S06C",2*index ,volNam6, xx, 0.,-zPanel , 0, "ONLY"); - gMC->Gspos("S06I",index,volNam6, xx, 0., 0 , 0, "ONLY"); - } - } - - // position the rohacell volume inside the panel volume - gMC->Gspos("S05R",1,"S05C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SB5R",1,"SB5C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S06R",1,"S06C",0.,0.,0.,0,"ONLY"); - - // position the PCB volume inside the insulating material volume - gMC->Gspos("S05P",1,"S05I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SB5P",1,"SB5I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S06P",1,"S06I",0.,0.,0.,0,"ONLY"); - // position the horizontal frame volume inside the PCB volume - gMC->Gspos("S05H",1,"S05P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("SB5H",1,"SB5P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S06H",1,"S06P",0.,0.,0.,0,"ONLY"); - // position the sensitive volume inside the horizontal frame volume - gMC->Gsposp("S05G",1,"S05H",0.,0.,0.,0,"ONLY",senspar,3); - gMC->Gsposp("S05G",1,"SB5H",0.,0.,0.,0,"ONLY",senspar2,3); - gMC->Gsposp("S06G",1,"S06H",0.,0.,0.,0,"ONLY",senspar,3); - // position the border volumes inside the PCB volume - Float_t yborder = ( kpcbHeight - kbFrameHeight ) / 2.; - gMC->Gspos("S05B",1,"S05P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S05B",2,"S05P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("SB5B",1,"SB5P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("SB5B",2,"SB5P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S06B",1,"S06P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S06B",2,"S06P",0.,-yborder,0.,0,"ONLY"); - - // create the NULOC volume and position it in the horizontal frame - - gMC->Gsvolu("S05N","BOX",knulocMaterial,nulocpar,3); - gMC->Gsvolu("S06N","BOX",knulocMaterial,nulocpar,3); - index = 0; - Float_t xxmax2 = xxmax - 5./2.; - for (xx = -xxmax; xx<=xxmax; xx+=2*knulocLength) { - index++; - gMC->Gspos("S05N",2*index-1,"S05B", xx, 0.,-kbFrameWidth/4., 0, "ONLY"); - gMC->Gspos("S05N",2*index ,"S05B", xx, 0., kbFrameWidth/4., 0, "ONLY"); - if (xx > -xxmax2 && xx< xxmax2) { - gMC->Gspos("S05N",2*index-1,"SB5B", xx, 0.,-kbFrameWidth/4., 0, "ONLY"); - gMC->Gspos("S05N",2*index ,"SB5B", xx, 0., kbFrameWidth/4., 0, "ONLY"); - } - gMC->Gspos("S06N",2*index-1,"S06B", xx, 0.,-kbFrameWidth/4., 0, "ONLY"); - gMC->Gspos("S06N",2*index ,"S06B", xx, 0., kbFrameWidth/4., 0, "ONLY"); - } - - // position the volumes approximating the circular section of the pipe - Float_t yoffs = ksensHeight/2. - kyOverlap; - Float_t epsilon = 0.001; - Int_t ndiv=6; - Float_t divpar[3]; - Double_t dydiv= ksensHeight/ndiv; - Double_t ydiv = yoffs -dydiv; - Int_t imax=0; - imax = 1; - Float_t rmin = 33.; - Float_t z1 = spar[2], z2=2*spar[2]*1.01; - if (gAlice->GetModule("DIPO")) {z1*=-1.;} - for (Int_t idiv=0;idivGsposp("S05G",imax+4*idiv+1,slats5Mother,-xvol, yvol, zoffs5-z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S06G",imax+4*idiv+1,slats6Mother,-xvol, yvol, zoffs6-z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S05G",imax+4*idiv+2,slats5Mother,-xvol,-yvol, zoffs5-z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S06G",imax+4*idiv+2,slats6Mother,-xvol,-yvol, zoffs6-z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S05G",imax+4*idiv+3,slats5Mother,+xvol, yvol, zoffs5-z1+z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S06G",imax+4*idiv+3,slats6Mother,+xvol, yvol, zoffs6-z1+z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S05G",imax+4*idiv+4,slats5Mother,+xvol,-yvol, zoffs5-z1+z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S06G",imax+4*idiv+4,slats6Mother,+xvol,-yvol, zoffs6-z1+z2, 0, "ONLY",divpar,3); - } - } - - if (fStations[3]) { - -//******************************************************************** -// Station 4 ** -//******************************************************************** - // indices 1 and 2 for first and second chambers in the station - // iChamber (first chamber) kept for other quanties than Z, - // assumed to be the same in both chambers - iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[6]; - iChamber2 =(AliMUONChamber*) (*fChambers)[7]; - zpos1=iChamber1->Z(); - zpos2=iChamber2->Z(); - dstation = TMath::Abs(zpos2 - zpos1); -// zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; // not used any more - -// -// Mother volume - tpar[0] = iChamber->RInner()-dframep; - tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); - tpar[2] = dstation/4; - - gMC->Gsvolu("S07M", "TUBE", idAir, tpar, 3); - gMC->Gsvolu("S08M", "TUBE", idAir, tpar, 3); - gMC->Gspos("S07M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); - gMC->Gspos("S08M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); - - - const Int_t knSlats4 = 6; // number of slats per quadrant - const Int_t knPCB4[knSlats4] = {4,4,5,5,4,3}; // n PCB per slat - const Float_t kxpos4[knSlats4] = {38.5, 40., 0., 0., 0., 0.}; - Float_t slatLength4[knSlats4]; - - // create and position the slat (mother) volumes - - char volNam7[5]; - char volNam8[5]; - Float_t xSlat4; - Float_t ySlat4; - - for (i = 0; iGsvolu(volNam7,"BOX",kslatMaterial,spar,3); - gMC->Gspos(volNam7, i*4+1,"S07M",-xSlat4, ySlat4, -zSlat-2.*dzCh4, 0, "ONLY"); - gMC->Gspos(volNam7, i*4+2,"S07M",+xSlat4, ySlat4, -zSlat+2.*dzCh4, 0, "ONLY"); - if (i>0) { - gMC->Gspos(volNam7, i*4+3,"S07M",-xSlat4,-ySlat4, -zSlat-2.*dzCh4, 0, "ONLY"); - gMC->Gspos(volNam7, i*4+4,"S07M",+xSlat4,-ySlat4, -zSlat+2.*dzCh4, 0, "ONLY"); - } - sprintf(volNam8,"S08%d",i); - gMC->Gsvolu(volNam8,"BOX",kslatMaterial,spar,3); - gMC->Gspos(volNam8, i*4+1,"S08M",-xSlat4, ySlat4, -zSlat-2.*dzCh4, 0, "ONLY"); - gMC->Gspos(volNam8, i*4+2,"S08M",+xSlat4, ySlat4, -zSlat+2.*dzCh4, 0, "ONLY"); - if (i>0) { - gMC->Gspos(volNam8, i*4+3,"S08M",-xSlat4,-ySlat4, -zSlat-2.*dzCh4, 0, "ONLY"); - gMC->Gspos(volNam8, i*4+4,"S08M",+xSlat4,-ySlat4, -zSlat+2.*dzCh4, 0, "ONLY"); - } - } - - - // create the panel volume - - gMC->Gsvolu("S07C","BOX",kpanelMaterial,panelpar,3); - gMC->Gsvolu("S08C","BOX",kpanelMaterial,panelpar,3); - - // create the rohacell volume - - gMC->Gsvolu("S07R","BOX",krohaMaterial,rohapar,3); - gMC->Gsvolu("S08R","BOX",krohaMaterial,rohapar,3); - - // create the insulating material volume - - gMC->Gsvolu("S07I","BOX",kinsuMaterial,insupar,3); - gMC->Gsvolu("S08I","BOX",kinsuMaterial,insupar,3); - - // create the PCB volume - - gMC->Gsvolu("S07P","BOX",kpcbMaterial,pcbpar,3); - gMC->Gsvolu("S08P","BOX",kpcbMaterial,pcbpar,3); - - // create the sensitive volumes, - - gMC->Gsvolu("S07G","BOX",ksensMaterial,dum,0); - gMC->Gsvolu("S08G","BOX",ksensMaterial,dum,0); - - // create the vertical frame volume - - gMC->Gsvolu("S07V","BOX",kvFrameMaterial,vFramepar,3); - gMC->Gsvolu("S08V","BOX",kvFrameMaterial,vFramepar,3); - - // create the horizontal frame volume - - gMC->Gsvolu("S07H","BOX",khFrameMaterial,hFramepar,3); - gMC->Gsvolu("S08H","BOX",khFrameMaterial,hFramepar,3); - - // create the horizontal border volume - - gMC->Gsvolu("S07B","BOX",kbFrameMaterial,bFramepar,3); - gMC->Gsvolu("S08B","BOX",kbFrameMaterial,bFramepar,3); - - index=0; - for (i = 0; iGspos("S07V",2*i-1,volNam7, xvFrame, 0., 0. , 0, "ONLY"); - gMC->Gspos("S07V",2*i ,volNam7,-xvFrame, 0., 0. , 0, "ONLY"); - gMC->Gspos("S08V",2*i-1,volNam8, xvFrame, 0., 0. , 0, "ONLY"); - gMC->Gspos("S08V",2*i ,volNam8,-xvFrame, 0., 0. , 0, "ONLY"); - } - // position the panels and the insulating material - for (j=0; jGspos("S07C",2*index-1,volNam7, xx, 0., zPanel , 0, "ONLY"); - gMC->Gspos("S07C",2*index ,volNam7, xx, 0.,-zPanel , 0, "ONLY"); - gMC->Gspos("S08C",2*index-1,volNam8, xx, 0., zPanel , 0, "ONLY"); - gMC->Gspos("S08C",2*index ,volNam8, xx, 0.,-zPanel , 0, "ONLY"); - - gMC->Gspos("S07I",index,volNam7, xx, 0., 0 , 0, "ONLY"); - gMC->Gspos("S08I",index,volNam8, xx, 0., 0 , 0, "ONLY"); - } - } - - // position the rohacell volume inside the panel volume - gMC->Gspos("S07R",1,"S07C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S08R",1,"S08C",0.,0.,0.,0,"ONLY"); - - // position the PCB volume inside the insulating material volume - gMC->Gspos("S07P",1,"S07I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S08P",1,"S08I",0.,0.,0.,0,"ONLY"); - // position the horizontal frame volume inside the PCB volume - gMC->Gspos("S07H",1,"S07P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S08H",1,"S08P",0.,0.,0.,0,"ONLY"); - // position the sensitive volume inside the horizontal frame volume - gMC->Gsposp("S07G",1,"S07H",0.,0.,0.,0,"ONLY",senspar,3); - gMC->Gsposp("S08G",1,"S08H",0.,0.,0.,0,"ONLY",senspar,3); - // position the border volumes inside the PCB volume - Float_t yborder = ( kpcbHeight - kbFrameHeight ) / 2.; - gMC->Gspos("S07B",1,"S07P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S07B",2,"S07P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S08B",1,"S08P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S08B",2,"S08P",0.,-yborder,0.,0,"ONLY"); - - // create the NULOC volume and position it in the horizontal frame - - gMC->Gsvolu("S07N","BOX",knulocMaterial,nulocpar,3); - gMC->Gsvolu("S08N","BOX",knulocMaterial,nulocpar,3); - index = 0; - for (xx = -xxmax; xx<=xxmax; xx+=2*knulocLength) { - index++; - gMC->Gspos("S07N",2*index-1,"S07B", xx, 0.,-kbFrameWidth/4., 0, "ONLY"); - gMC->Gspos("S07N",2*index ,"S07B", xx, 0., kbFrameWidth/4., 0, "ONLY"); - gMC->Gspos("S08N",2*index-1,"S08B", xx, 0.,-kbFrameWidth/4., 0, "ONLY"); - gMC->Gspos("S08N",2*index ,"S08B", xx, 0., kbFrameWidth/4., 0, "ONLY"); - } - - // position the volumes approximating the circular section of the pipe - Float_t yoffs = ksensHeight/2. - kyOverlap; - Float_t epsilon = 0.001; - Int_t ndiv=6; - Float_t divpar[3]; - Double_t dydiv= ksensHeight/ndiv; - Double_t ydiv = yoffs -dydiv; - Int_t imax=0; - imax = 1; - Float_t rmin = 40.; - Float_t z1 = -spar[2], z2=2*spar[2]*1.01; - for (Int_t idiv=0;idivGsposp("S07G",imax+4*idiv+1,"S07M", -xvol, yvol, -z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S08G",imax+4*idiv+1,"S08M", -xvol, yvol, -z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S07G",imax+4*idiv+2,"S07M", -xvol,-yvol, -z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S08G",imax+4*idiv+2,"S08M", -xvol,-yvol, -z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S07G",imax+4*idiv+3,"S07M", xvol, yvol, -z1+z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S08G",imax+4*idiv+3,"S08M", xvol, yvol, -z1+z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S07G",imax+4*idiv+4,"S07M", xvol,-yvol, -z1+z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S08G",imax+4*idiv+4,"S08M", xvol,-yvol, -z1+z2, 0, "ONLY",divpar,3); - } - - - - - - } - - if (fStations[4]) { - - -//******************************************************************** -// Station 5 ** -//******************************************************************** - // indices 1 and 2 for first and second chambers in the station - // iChamber (first chamber) kept for other quanties than Z, - // assumed to be the same in both chambers - iChamber1 = iChamber = (AliMUONChamber*) (*fChambers)[8]; - iChamber2 =(AliMUONChamber*) (*fChambers)[9]; - zpos1=iChamber1->Z(); - zpos2=iChamber2->Z(); - dstation = TMath::Abs(zpos2 - zpos1); -// zfpos=-(iChamber->DGas()+dframez+iChamber->DAlu())/2; // not used any more - -// -// Mother volume - tpar[0] = iChamber->RInner()-dframep; - tpar[1] = (iChamber->ROuter()+dframep)/TMath::Cos(phi); - tpar[2] = dstation/5.; - - gMC->Gsvolu("S09M", "TUBE", idAir, tpar, 3); - gMC->Gsvolu("S10M", "TUBE", idAir, tpar, 3); - gMC->Gspos("S09M", 1, "ALIC", 0., 0., zpos1 , 0, "ONLY"); - gMC->Gspos("S10M", 1, "ALIC", 0., 0., zpos2 , 0, "ONLY"); - - - const Int_t knSlats5 = 7; // number of slats per quadrant - const Int_t knPCB5[knSlats5] = {5,5,6,6,5,4,3}; // n PCB per slat - const Float_t kxpos5[knSlats5] = {38.5, 40., 0., 0., 0., 0., 0.}; - Float_t slatLength5[knSlats5]; - char volNam9[5]; - char volNam10[5]; - Float_t xSlat5; - Float_t ySlat5; - - for (i = 0; iGsvolu(volNam9,"BOX",kslatMaterial,spar,3); - gMC->Gspos(volNam9, i*4+1,"S09M",-xSlat5, ySlat5, -zSlat-2.*dzCh5, 0, "ONLY"); - gMC->Gspos(volNam9, i*4+2,"S09M",+xSlat5, ySlat5, -zSlat+2.*dzCh5, 0, "ONLY"); - if (i>0) { - gMC->Gspos(volNam9, i*4+3,"S09M",-xSlat5,-ySlat5, -zSlat-2.*dzCh5, 0, "ONLY"); - gMC->Gspos(volNam9, i*4+4,"S09M",+xSlat5,-ySlat5, -zSlat+2.*dzCh5, 0, "ONLY"); - } - sprintf(volNam10,"S10%d",i); - gMC->Gsvolu(volNam10,"BOX",kslatMaterial,spar,3); - gMC->Gspos(volNam10, i*4+1,"S10M",-xSlat5, ySlat5, -zSlat-2.*dzCh5, 0, "ONLY"); - gMC->Gspos(volNam10, i*4+2,"S10M",+xSlat5, ySlat5, -zSlat+2.*dzCh5, 0, "ONLY"); - if (i>0) { - gMC->Gspos(volNam10, i*4+3,"S10M",-xSlat5,-ySlat5, -zSlat-2.*dzCh5, 0, "ONLY"); - gMC->Gspos(volNam10, i*4+4,"S10M",+xSlat5,-ySlat5, -zSlat+2.*dzCh5, 0, "ONLY"); - } - } - - // create the panel volume - - gMC->Gsvolu("S09C","BOX",kpanelMaterial,panelpar,3); - gMC->Gsvolu("S10C","BOX",kpanelMaterial,panelpar,3); - - // create the rohacell volume - - gMC->Gsvolu("S09R","BOX",krohaMaterial,rohapar,3); - gMC->Gsvolu("S10R","BOX",krohaMaterial,rohapar,3); - - // create the insulating material volume - - gMC->Gsvolu("S09I","BOX",kinsuMaterial,insupar,3); - gMC->Gsvolu("S10I","BOX",kinsuMaterial,insupar,3); - - // create the PCB volume - - gMC->Gsvolu("S09P","BOX",kpcbMaterial,pcbpar,3); - gMC->Gsvolu("S10P","BOX",kpcbMaterial,pcbpar,3); - - // create the sensitive volumes, - - gMC->Gsvolu("S09G","BOX",ksensMaterial,dum,0); - gMC->Gsvolu("S10G","BOX",ksensMaterial,dum,0); - - // create the vertical frame volume - - gMC->Gsvolu("S09V","BOX",kvFrameMaterial,vFramepar,3); - gMC->Gsvolu("S10V","BOX",kvFrameMaterial,vFramepar,3); - - // create the horizontal frame volume - - gMC->Gsvolu("S09H","BOX",khFrameMaterial,hFramepar,3); - gMC->Gsvolu("S10H","BOX",khFrameMaterial,hFramepar,3); - - // create the horizontal border volume - - gMC->Gsvolu("S09B","BOX",kbFrameMaterial,bFramepar,3); - gMC->Gsvolu("S10B","BOX",kbFrameMaterial,bFramepar,3); - - index=0; - for (i = 0; iGspos("S09V",2*i-1,volNam9, xvFrame, 0., 0. , 0, "ONLY"); - gMC->Gspos("S09V",2*i ,volNam9,-xvFrame, 0., 0. , 0, "ONLY"); - gMC->Gspos("S10V",2*i-1,volNam10, xvFrame, 0., 0. , 0, "ONLY"); - gMC->Gspos("S10V",2*i ,volNam10,-xvFrame, 0., 0. , 0, "ONLY"); - } - - // position the panels and the insulating material - for (j=0; jGspos("S09C",2*index-1,volNam9, xx, 0., zPanel , 0, "ONLY"); - gMC->Gspos("S09C",2*index ,volNam9, xx, 0.,-zPanel , 0, "ONLY"); - gMC->Gspos("S10C",2*index-1,volNam10, xx, 0., zPanel , 0, "ONLY"); - gMC->Gspos("S10C",2*index ,volNam10, xx, 0.,-zPanel , 0, "ONLY"); - - gMC->Gspos("S09I",index,volNam9, xx, 0., 0 , 0, "ONLY"); - gMC->Gspos("S10I",index,volNam10, xx, 0., 0 , 0, "ONLY"); - } - } - - // position the rohacell volume inside the panel volume - gMC->Gspos("S09R",1,"S09C",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S10R",1,"S10C",0.,0.,0.,0,"ONLY"); - - // position the PCB volume inside the insulating material volume - gMC->Gspos("S09P",1,"S09I",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S10P",1,"S10I",0.,0.,0.,0,"ONLY"); - // position the horizontal frame volume inside the PCB volume - gMC->Gspos("S09H",1,"S09P",0.,0.,0.,0,"ONLY"); - gMC->Gspos("S10H",1,"S10P",0.,0.,0.,0,"ONLY"); - // position the sensitive volume inside the horizontal frame volume - gMC->Gsposp("S09G",1,"S09H",0.,0.,0.,0,"ONLY",senspar,3); - gMC->Gsposp("S10G",1,"S10H",0.,0.,0.,0,"ONLY",senspar,3); - // position the border volumes inside the PCB volume - Float_t yborder = ( kpcbHeight - kbFrameHeight ) / 2.; - gMC->Gspos("S09B",1,"S09P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S09B",2,"S09P",0.,-yborder,0.,0,"ONLY"); - gMC->Gspos("S10B",1,"S10P",0., yborder,0.,0,"ONLY"); - gMC->Gspos("S10B",2,"S10P",0.,-yborder,0.,0,"ONLY"); - - // create the NULOC volume and position it in the horizontal frame - - gMC->Gsvolu("S09N","BOX",knulocMaterial,nulocpar,3); - gMC->Gsvolu("S10N","BOX",knulocMaterial,nulocpar,3); - index = 0; - for (xx = -xxmax; xx<=xxmax; xx+=2*knulocLength) { - index++; - gMC->Gspos("S09N",2*index-1,"S09B", xx, 0.,-kbFrameWidth/4., 0, "ONLY"); - gMC->Gspos("S09N",2*index ,"S09B", xx, 0., kbFrameWidth/4., 0, "ONLY"); - gMC->Gspos("S10N",2*index-1,"S10B", xx, 0.,-kbFrameWidth/4., 0, "ONLY"); - gMC->Gspos("S10N",2*index ,"S10B", xx, 0., kbFrameWidth/4., 0, "ONLY"); - } - // position the volumes approximating the circular section of the pipe - Float_t yoffs = ksensHeight/2. - kyOverlap; - Float_t epsilon = 0.001; - Int_t ndiv=6; - Float_t divpar[3]; - Double_t dydiv= ksensHeight/ndiv; - Double_t ydiv = yoffs -dydiv; - Int_t imax=0; - // for (Int_t islat=0; islatGsposp("S09G",imax+4*idiv+1,"S09M", -xvol, yvol, -z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S10G",imax+4*idiv+1,"S10M", -xvol, yvol, -z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S09G",imax+4*idiv+2,"S09M", -xvol,-yvol, -z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S10G",imax+4*idiv+2,"S10M", -xvol,-yvol, -z1-z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S09G",imax+4*idiv+3,"S09M", +xvol, yvol, -z1+z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S10G",imax+4*idiv+3,"S10M", +xvol, yvol, -z1+z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S09G",imax+4*idiv+4,"S09M", +xvol,-yvol, -z1+z2, 0, "ONLY",divpar,3); - gMC->Gsposp("S10G",imax+4*idiv+4,"S10M", +xvol,-yvol, -z1+z2, 0, "ONLY",divpar,3); - } - - } - -//******************************************************************** -// Trigger ** -//******************************************************************** - /* - zpos1 and zpos2 are the middle of the first and second - planes of station 1 (+1m for second station): - zpos1=(zpos1m+zpos1p)/2=(15999+16071)/2=16035 mm, thick/2=40 mm - zpos2=(zpos2m+zpos2p)/2=(16169+16241)/2=16205 mm, thick/2=40 mm - zposxm and zposxp= middles of gaz gaps within a detection plane - rem: the total thickness accounts for 1 mm of al on both - side of the RPCs (see zpos1 and zpos2) - */ - -// vertical gap between right and left chambers (kDXZERO*2=4cm) - const Float_t kDXZERO=2.; -// main distances for chamber definition in first plane/first station - const Float_t kXMIN=34.; - const Float_t kXMED=51.; - const Float_t kXMAX=272.; -// kXMAX will become 255. in real life. segmentation to be updated accordingly -// (see fig.2-4 & 2-5 of Local Trigger Board PRR) - const Float_t kYMIN=34.; - const Float_t kYMAX=51.; -// inner/outer radius of flange between beam shield. and chambers (1/station) - const Float_t kRMIN[2]={50.,50.}; - const Float_t kRMAX[2]={64.,68.}; -// z position of the middle of the gas gap in mother vol - const Float_t kZm=-3.6; - const Float_t kZp=+3.6; - - iChamber1 = (AliMUONChamber*) (*fChambers)[10]; - zpos1 = iChamber1->Z(); - -// ratio of zpos1m/zpos1p and inverse for first plane - Float_t zmp=(zpos1+3.6)/(zpos1-3.6); - Float_t zpm=1./zmp; - - Int_t icount=0; // chamber counter (0 1 2 3) - - for (Int_t istation=0; istation<2; istation++) { // loop on stations - for (Int_t iplane=0; iplane<2; iplane++) { // loop on detection planes - - Int_t iVolNum=1; // counter Volume Number - icount = Int_t(iplane*TMath::Power(2,0))+ - Int_t(istation*TMath::Power(2,1)); - - char volPlane[5]; - sprintf(volPlane,"SM%d%d",istation+1,iplane+1); - - iChamber = (AliMUONChamber*) (*fChambers)[10+icount]; - Float_t zpos = iChamber->Z(); - -// mother volume - tpar[0] = iChamber->RInner(); - tpar[1] = iChamber->ROuter(); - tpar[2] = 4.0; - gMC->Gsvolu(volPlane,"TUBE",idAir,tpar,3); - -// Flange between beam shielding and RPC - tpar[0]= kRMIN[istation]; - tpar[1]= kRMAX[istation]; - tpar[2]= 4.0; - - char volFlange[5]; - sprintf(volFlange,"SF%dA",icount+1); - gMC->Gsvolu(volFlange,"TUBE",idAlu1,tpar,3); //Al - gMC->Gspos(volFlange,1,volPlane,0.,0.,0.,0,"MANY"); - -// scaling factor - Float_t zRatio = zpos / zpos1; - -// chamber prototype - tpar[0]= 0.; - tpar[1]= 0.; - tpar[2]= 0.; - - char volAlu[5]; // Alu - char volBak[5]; // Bakelite - char volGaz[5]; // Gas streamer - - sprintf(volAlu,"SC%dA",icount+1); - sprintf(volBak,"SB%dA",icount+1); - sprintf(volGaz,"SG%dA",icount+1); - - gMC->Gsvolu(volAlu,"BOX",idAlu1,tpar,0); // Al - gMC->Gsvolu(volBak,"BOX",idtmed[1107],tpar,0); // Bakelite - gMC->Gsvolu(volGaz,"BOX",idtmed[1106],tpar,0); // Gas streamer - -// chamber type A - tpar[0] = -1.; - tpar[1] = -1.; - - Float_t xA=(kDXZERO+kXMED+(kXMAX-kXMED)/2.)*zRatio; - Float_t yAm=0.; - Float_t yAp=0.; - - tpar[2] = 0.1; - gMC->Gsposp(volGaz,1,volBak,0.,0.,0.,0,"ONLY",tpar,3); - tpar[2] = 0.3; - gMC->Gsposp(volBak,1,volAlu,0.,0.,0.,0,"ONLY",tpar,3); - - tpar[2] = 0.4; - tpar[0] = ((kXMAX-kXMED)/2.)*zRatio; - tpar[1] = kYMIN*zRatio; - - gMC->Gsposp(volAlu,iVolNum++,volPlane, -xA,yAm,-kZm,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xA,yAp,-kZp,0,"ONLY",tpar,3); - gMC->Gsbool(volAlu,volFlange); - -// chamber type B - Float_t tpar1save=tpar[1]; - Float_t y1msave=yAm; - Float_t y1psave=yAp; - - tpar[0] = ((kXMAX-kXMIN)/2.) * zRatio; - tpar[1] = ((kYMAX-kYMIN)/2.) * zRatio; - - Float_t xB=(kDXZERO+kXMIN)*zRatio+tpar[0]; - Float_t yBp=(y1msave+tpar1save)*zpm+tpar[1]; - Float_t yBm=(y1psave+tpar1save)*zmp+tpar[1]; - - gMC->Gsposp(volAlu,iVolNum++,volPlane, -xB, yBp,-kZp,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xB, yBm,-kZm,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, -xB,-yBp,-kZp,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xB,-yBm,-kZm,0,"ONLY",tpar,3); - -// chamber type C (note : same Z than type B) - tpar1save=tpar[1]; - y1msave=yBm; - y1psave=yBp; - - tpar[0] = (kXMAX/2)*zRatio; - tpar[1] = (kYMAX/2)*zRatio; - - Float_t xC=kDXZERO*zRatio+tpar[0]; - Float_t yCp=(y1psave+tpar1save)*1.+tpar[1]; - Float_t yCm=(y1msave+tpar1save)*1.+tpar[1]; - - gMC->Gsposp(volAlu,iVolNum++,volPlane,-xC, yCp,-kZp,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xC, yCm,-kZm,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane,-xC,-yCp,-kZp,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xC,-yCm,-kZm,0,"ONLY",tpar,3); - -// chamber type D, E and F (same size) - tpar1save=tpar[1]; - y1msave=yCm; - y1psave=yCp; - - tpar[0] = (kXMAX/2.)*zRatio; - tpar[1] = kYMIN*zRatio; - - Float_t xD=kDXZERO*zRatio+tpar[0]; - Float_t yDp=(y1msave+tpar1save)*zpm+tpar[1]; - Float_t yDm=(y1psave+tpar1save)*zmp+tpar[1]; - - gMC->Gsposp(volAlu,iVolNum++,volPlane, -xD, yDm,-kZm,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xD, yDp,-kZp,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, -xD,-yDm,-kZm,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xD,-yDp,-kZp,0,"ONLY",tpar,3); - - tpar1save=tpar[1]; - y1msave=yDm; - y1psave=yDp; - Float_t yEp=(y1msave+tpar1save)*zpm+tpar[1]; - Float_t yEm=(y1psave+tpar1save)*zmp+tpar[1]; - - gMC->Gsposp(volAlu,iVolNum++,volPlane, -xD, yEp,-kZp,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xD, yEm,-kZm,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, -xD,-yEp,-kZp,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xD,-yEm,-kZm,0,"ONLY",tpar,3); - - tpar1save=tpar[1]; - y1msave=yEm; - y1psave=yEp; - Float_t yFp=(y1msave+tpar1save)*zpm+tpar[1]; - Float_t yFm=(y1psave+tpar1save)*zmp+tpar[1]; - - gMC->Gsposp(volAlu,iVolNum++,volPlane, -xD, yFm,-kZm,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xD, yFp,-kZp,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, -xD,-yFm,-kZm,0,"ONLY",tpar,3); - gMC->Gsposp(volAlu,iVolNum++,volPlane, xD,-yFp,-kZp,0,"ONLY",tpar,3); - -// Positioning plane in ALICE - gMC->Gspos(volPlane,1,"ALIC",0.,0.,zpos,0,"ONLY"); - - } // end loop on detection planes - } // end loop on stations - -} - - -//___________________________________________ -void AliMUONv3::CreateMaterials() -{ - // *** DEFINITION OF AVAILABLE MUON MATERIALS *** - // - // Ar-CO2 gas (80%+20%) - Float_t ag1[3] = { 39.95,12.01,16. }; - Float_t zg1[3] = { 18.,6.,8. }; - Float_t wg1[3] = { .8,.0667,.13333 }; - Float_t dg1 = .001821; - // - // Ar-buthane-freon gas -- trigger chambers - Float_t atr1[4] = { 39.95,12.01,1.01,19. }; - Float_t ztr1[4] = { 18.,6.,1.,9. }; - Float_t wtr1[4] = { .56,.1262857,.2857143,.028 }; - Float_t dtr1 = .002599; - // - // Ar-CO2 gas - Float_t agas[3] = { 39.95,12.01,16. }; - Float_t zgas[3] = { 18.,6.,8. }; - Float_t wgas[3] = { .74,.086684,.173316 }; - Float_t dgas = .0018327; - // - // Ar-Isobutane gas (80%+20%) -- tracking - Float_t ag[3] = { 39.95,12.01,1.01 }; - Float_t zg[3] = { 18.,6.,1. }; - Float_t wg[3] = { .8,.057,.143 }; - Float_t dg = .0019596; - // - // Ar-Isobutane-Forane-SF6 gas (49%+7%+40%+4%) -- trigger - Float_t atrig[5] = { 39.95,12.01,1.01,19.,32.066 }; - Float_t ztrig[5] = { 18.,6.,1.,9.,16. }; - Float_t wtrig[5] = { .49,1.08,1.5,1.84,0.04 }; - Float_t dtrig = .0031463; - // - // bakelite - - Float_t abak[3] = {12.01 , 1.01 , 16.}; - Float_t zbak[3] = {6. , 1. , 8.}; - Float_t wbak[3] = {6. , 6. , 1.}; - Float_t dbak = 1.4; - - Float_t epsil, stmin, deemax, tmaxfd, stemax; - - Int_t iSXFLD = gAlice->Field()->Integ(); - Float_t sXMGMX = gAlice->Field()->Max(); - // - // --- Define the various materials for GEANT --- - AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); - AliMaterial(10, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); - // Air - Float_t aAir[4]={12.0107,14.0067,15.9994,39.948}; - Float_t zAir[4]={6.,7.,8.,18.}; - Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827}; - Float_t dAir = 1.20479E-3; - AliMixture(15, "AIR$ ", aAir, zAir, dAir,4, wAir); - // AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500); - AliMixture(19, "Bakelite$", abak, zbak, dbak, -3, wbak); - AliMixture(20, "ArC4H10 GAS$", ag, zg, dg, 3, wg); - AliMixture(21, "TRIG GAS$", atrig, ztrig, dtrig, -5, wtrig); - AliMixture(22, "ArCO2 80%$", ag1, zg1, dg1, 3, wg1); - AliMixture(23, "Ar-freon $", atr1, ztr1, dtr1, 4, wtr1); - AliMixture(24, "ArCO2 GAS$", agas, zgas, dgas, 3, wgas); - // materials for slat: - // Sensitive area: gas (already defined) - // PCB: copper - // insulating material and frame: vetronite - // walls: carbon, rohacell, carbon - Float_t aglass[5]={12.01, 28.09, 16., 10.8, 23.}; - Float_t zglass[5]={ 6., 14., 8., 5., 11.}; - Float_t wglass[5]={ 0.5, 0.105, 0.355, 0.03, 0.01}; - Float_t dglass=1.74; - - // rohacell: C9 H13 N1 O2 - Float_t arohac[4] = {12.01, 1.01, 14.010, 16.}; - Float_t zrohac[4] = { 6., 1., 7., 8.}; - Float_t wrohac[4] = { 9., 13., 1., 2.}; - Float_t drohac = 0.03; - - AliMaterial(31, "COPPER$", 63.54, 29., 8.96, 1.4, 0.); - AliMixture(32, "Vetronite$",aglass, zglass, dglass, 5, wglass); - AliMaterial(33, "Carbon$", 12.01, 6., 2.265, 18.8, 49.9); - AliMixture(34, "Rohacell$", arohac, zrohac, drohac, -4, wrohac); - - - epsil = .001; // Tracking precision, - stemax = -1.; // Maximum displacement for multiple scat - tmaxfd = -20.; // Maximum angle due to field deflection - deemax = -.3; // Maximum fractional energy loss, DLS - stmin = -.8; - // - // Air - AliMedium(1, "AIR_CH_US ", 15, 1, iSXFLD, sXMGMX, tmaxfd, stemax, deemax, epsil, stmin); - // - // Aluminum - - AliMedium(4, "ALU_CH_US ", 9, 0, iSXFLD, sXMGMX, tmaxfd, fMaxStepAlu, - fMaxDestepAlu, epsil, stmin); - AliMedium(5, "ALU_CH_US ", 10, 0, iSXFLD, sXMGMX, tmaxfd, fMaxStepAlu, - fMaxDestepAlu, epsil, stmin); - // - // Ar-isoC4H10 gas - - AliMedium(6, "AR_CH_US ", 20, 1, iSXFLD, sXMGMX, tmaxfd, fMaxStepGas, - fMaxDestepGas, epsil, stmin); -// - // Ar-Isobuthane-Forane-SF6 gas - - AliMedium(7, "GAS_CH_TRIGGER ", 21, 1, iSXFLD, sXMGMX, tmaxfd, stemax, deemax, epsil, stmin); - - AliMedium(8, "BAKE_CH_TRIGGER ", 19, 0, iSXFLD, sXMGMX, tmaxfd, fMaxStepAlu, - fMaxDestepAlu, epsil, stmin); - - AliMedium(9, "ARG_CO2 ", 22, 1, iSXFLD, sXMGMX, tmaxfd, fMaxStepGas, - fMaxDestepAlu, epsil, stmin); - // tracking media for slats: check the parameters!! - AliMedium(11, "PCB_COPPER ", 31, 0, iSXFLD, sXMGMX, tmaxfd, - fMaxStepAlu, fMaxDestepAlu, epsil, stmin); - AliMedium(12, "VETRONITE ", 32, 0, iSXFLD, sXMGMX, tmaxfd, - fMaxStepAlu, fMaxDestepAlu, epsil, stmin); - AliMedium(13, "CARBON ", 33, 0, iSXFLD, sXMGMX, tmaxfd, - fMaxStepAlu, fMaxDestepAlu, epsil, stmin); - AliMedium(14, "Rohacell ", 34, 0, iSXFLD, sXMGMX, tmaxfd, - fMaxStepAlu, fMaxDestepAlu, epsil, stmin); -} - -//___________________________________________ - -void AliMUONv3::Init() -{ - // - // Initialize Tracking Chambers - // - - AliDebug(0,"Start Init for version 1 - CPC chamber type"); - Int_t i; - for (i=0; iInit(); - } - - // - // Set the chamber (sensitive region) GEANT identifier - ((AliMUONChamber*)(*fChambers)[0])->GetGeometry()->SetSensitiveVolume("S01G"); - ((AliMUONChamber*)(*fChambers)[1])->GetGeometry()->SetSensitiveVolume("S02G"); - - ((AliMUONChamber*)(*fChambers)[2])->GetGeometry()->SetSensitiveVolume("S03G"); - ((AliMUONChamber*)(*fChambers)[3])->GetGeometry()->SetSensitiveVolume("S04G"); - - ((AliMUONChamber*)(*fChambers)[4])->GetGeometry()->SetSensitiveVolume("S05G"); - ((AliMUONChamber*)(*fChambers)[5])->GetGeometry()->SetSensitiveVolume("S06G"); - - ((AliMUONChamber*)(*fChambers)[6])->GetGeometry()->SetSensitiveVolume("S07G"); - ((AliMUONChamber*)(*fChambers)[7])->GetGeometry()->SetSensitiveVolume("S08G"); - - ((AliMUONChamber*)(*fChambers)[8])->GetGeometry()->SetSensitiveVolume("S09G"); - ((AliMUONChamber*)(*fChambers)[9])->GetGeometry()->SetSensitiveVolume("S10G"); - - ((AliMUONChamber*)(*fChambers)[10])->GetGeometry()->SetSensitiveVolume("SG1A"); - ((AliMUONChamber*)(*fChambers)[11])->GetGeometry()->SetSensitiveVolume("SG2A"); - ((AliMUONChamber*)(*fChambers)[12])->GetGeometry()->SetSensitiveVolume("SG3A"); - ((AliMUONChamber*)(*fChambers)[13])->GetGeometry()->SetSensitiveVolume("SG4A"); - - AliDebug(0,"Finished Init for version 1 - CPC chamber type"); - //cp - AliDebug(0,"Start Init for Trigger Circuits"); - for (i=0; iInit(i); - } - AliDebug(0,"Finished Init for Trigger Circuits"); - //cp - -} - -//_______________________________________________________________________________ -Int_t AliMUONv3::GetChamberId(Int_t volId) const -{ -// Check if the volume with specified volId is a sensitive volume (gas) -// of some chamber and returns the chamber number; -// if not sensitive volume - return 0. -// --- - - for (Int_t i = 1; i <= AliMUONConstants::NCh(); i++) - if ( ((AliMUONChamber*)(*fChambers)[i-1])->IsSensId(volId) ) return i; - - return 0; -} -//_______________________________________________________________________________ -void AliMUONv3::StepManager() -{ - // Stepmanager for the chambers - - if (fStepManagerVersionOld) { - StepManagerOld(); - return; - } - - // Only charged tracks - if( !(gMC->TrackCharge()) ) return; - // Only charged tracks - - // Only gas gap inside chamber - // Tag chambers and record hits when track enters - Int_t idvol=-1; - Int_t iChamber=0; - Int_t id=0; - Int_t copy; - const Float_t kBig = 1.e10; - - id=gMC->CurrentVolID(copy); - iChamber = GetChamberId(id); - idvol=GetChamberId(id)-1; - - if (idvol == -1) return; - - if( gMC->IsTrackEntering() ) { - Float_t theta = fTrackMomentum.Theta(); - if ((TMath::Pi()-theta)*kRaddeg>=15.) gMC->SetMaxStep(fStepMaxInActiveGas); // We use Pi-theta because z is negative - } - -// if (GetDebug()) { -// Float_t z = ( (AliMUONChamber*)(*fChambers)[idvol])->Z() ; -// Info("StepManager Step","Active volume found %d chamber %d Z chamber is %f ",idvol,iChamber, z); -// } - // Particule id and mass, - Int_t ipart = gMC->TrackPid(); - Float_t mass = gMC->TrackMass(); - - fDestepSum[idvol]+=gMC->Edep(); - // Get current particle id (ipart), track position (pos) and momentum (mom) - if ( fStepSum[idvol]==0.0 ) gMC->TrackMomentum(fTrackMomentum); - fStepSum[idvol]+=gMC->TrackStep(); - -// if (GetDebug()) { -// Info("StepManager Step","iChamber %d, Particle %d, theta %f phi %f mass %f StepSum %f eloss %g", -// iChamber,ipart, fTrackMomentum.Theta()*kRaddeg, fTrackMomentum.Phi()*kRaddeg, mass, fStepSum[idvol], gMC->Edep()); -// Info("StepManager Step","Track Momentum %f %f %f", fTrackMomentum.X(), fTrackMomentum.Y(), fTrackMomentum.Z()) ; -// gMC->TrackPosition(fTrackPosition); -// Info("StepManager Step","Track Position %f %f %f",fTrackPosition.X(),fTrackPosition.Y(),fTrackPosition.Z()) ; -// } - - // Track left chamber or StepSum larger than fStepMaxInActiveGas - if ( gMC->IsTrackExiting() || - gMC->IsTrackStop() || - gMC->IsTrackDisappeared()|| - (fStepSum[idvol]>fStepMaxInActiveGas) ) { - - if ( gMC->IsTrackExiting() || - gMC->IsTrackStop() || - gMC->IsTrackDisappeared() ) gMC->SetMaxStep(kBig); - - gMC->TrackPosition(fTrackPosition); - Float_t theta = fTrackMomentum.Theta(); - Float_t phi = fTrackMomentum.Phi(); - - TLorentzVector backToWire( fStepSum[idvol]/2.*sin(theta)*cos(phi), - fStepSum[idvol]/2.*sin(theta)*sin(phi), - fStepSum[idvol]/2.*cos(theta),0.0 ); - // if (GetDebug()) - // Info("StepManager Exit","Track Position %f %f %f",fTrackPosition.X(),fTrackPosition.Y(),fTrackPosition.Z()) ; - // if (GetDebug()) - // Info("StepManager Exit ","Track backToWire %f %f %f",backToWire.X(),backToWire.Y(),backToWire.Z()) ; - fTrackPosition-=backToWire; - - //-------------- Angle effect - // Ratio between energy loss of particle and Mip as a function of BetaGamma of particle (Energy/Mass) - - Float_t betaxGamma = fTrackMomentum.P()/mass;// pc/mc2 - Float_t sigmaEffect10degrees; - Float_t sigmaEffectThetadegrees; - Float_t eLossParticleELossMip; - Float_t yAngleEffect=0.; - Float_t thetawires = TMath::Abs( TMath::ASin( TMath::Sin(TMath::Pi()-theta) * TMath::Sin(phi) ) );// We use Pi-theta because z is negative - - - if (fAngleEffect){ - if ( (betaxGamma >3.2) && (thetawires*kRaddeg<=15.) ) { - betaxGamma=TMath::Log(betaxGamma); - eLossParticleELossMip = fElossRatio->Eval(betaxGamma); - // 10 degrees is a reference for a model (arbitrary) - sigmaEffect10degrees=fAngleEffect10->Eval(eLossParticleELossMip);// in micrometers - // Angle with respect to the wires assuming that chambers are perpendicular to the z axis. - sigmaEffectThetadegrees = sigmaEffect10degrees/fAngleEffectNorma->Eval(thetawires*kRaddeg); // For 5mm gap - if ( (iChamber==1) || (iChamber==2) ) - sigmaEffectThetadegrees/=(1.09833e+00+1.70000e-02*(thetawires*kRaddeg)); // The gap is different (4mm) - yAngleEffect=1.e-04*gRandom->Gaus(0,sigmaEffectThetadegrees); // Error due to the angle effect in cm - } - } - - // One hit per chamber - GetMUONData()->AddHit(fIshunt, gAlice->GetMCApp()->GetCurrentTrackNumber(), iChamber, ipart, - fTrackPosition.X(), fTrackPosition.Y()+yAngleEffect, fTrackPosition.Z(), 0.0, - fTrackMomentum.P(),theta, phi, fStepSum[idvol], fDestepSum[idvol], - fTrackPosition.X(),fTrackPosition.Y(),fTrackPosition.Z()); -// if (GetDebug()){ -// Info("StepManager Exit","Particle exiting from chamber %d",iChamber); -// Info("StepManager Exit","StepSum %f eloss geant %g ",fStepSum[idvol],fDestepSum[idvol]); -// Info("StepManager Exit","Track Position %f %f %f",fTrackPosition.X(),fTrackPosition.Y(),fTrackPosition.Z()) ; -// } - fStepSum[idvol] =0; // Reset for the next event - fDestepSum[idvol]=0; // Reset for the next event - } -} - -//__________________________________________ -void AliMUONv3::StepManagerOld() -{ - // Old Stepmanager for the chambers - Int_t copy, id; - static Int_t idvol; - static Int_t vol[2]; - Int_t ipart; - TLorentzVector pos; - TLorentzVector mom; - Float_t theta,phi; - Float_t destep, step; - - static Float_t sstep; - static Float_t eloss, eloss2, xhit, yhit, zhit, tof, tlength; - const Float_t kBig = 1.e10; - static Float_t hits[15]; - - TClonesArray &lhits = *fHits; - - // - // - // Only charged tracks - if( !(gMC->TrackCharge()) ) return; - // - // Only gas gap inside chamber - // Tag chambers and record hits when track enters - id=gMC->CurrentVolID(copy); - vol[0] = GetChamberId(id); - idvol = vol[0] -1; - - if (idvol == -1) return; - - // - // Get current particle id (ipart), track position (pos) and momentum (mom) - gMC->TrackPosition(pos); - gMC->TrackMomentum(mom); - - ipart = gMC->TrackPid(); - - // - // momentum loss and steplength in last step - destep = gMC->Edep(); - step = gMC->TrackStep(); - // cout<<"------------"<IsTrackEntering()) { - - gMC->SetMaxStep(fMaxStepGas); - Double_t tc = mom[0]*mom[0]+mom[1]*mom[1]; - Double_t rt = TMath::Sqrt(tc); - Double_t pmom = TMath::Sqrt(tc+mom[2]*mom[2]); - Double_t tx = mom[0]/pmom; - Double_t ty = mom[1]/pmom; - Double_t tz = mom[2]/pmom; - Double_t s = ((AliMUONChamber*)(*fChambers)[idvol]) - ->ResponseModel() - ->Pitch()/tz; - theta = Float_t(TMath::ATan2(rt,Double_t(mom[2])))*kRaddeg; - phi = Float_t(TMath::ATan2(Double_t(mom[1]),Double_t(mom[0])))*kRaddeg; - hits[0] = Float_t(ipart); // Geant3 particle type - hits[1] = pos[0]+s*tx; // X-position for hit - hits[2] = pos[1]+s*ty; // Y-position for hit - hits[3] = pos[2]+s*tz; // Z-position for hit - hits[4] = theta; // theta angle of incidence - hits[5] = phi; // phi angle of incidence - hits[8] = 0;//PadHits does not exist anymore (Float_t) fNPadHits; // first padhit - hits[9] = -1; // last pad hit - hits[10] = mom[3]; // hit momentum P - hits[11] = mom[0]; // Px - hits[12] = mom[1]; // Py - hits[13] = mom[2]; // Pz - tof=gMC->TrackTime(); - hits[14] = tof; // Time of flight - tlength = 0; - eloss = 0; - eloss2 = 0; - sstep=0; - xhit = pos[0]; - yhit = pos[1]; - zhit = pos[2]; - Chamber(idvol).ChargeCorrelationInit(); - // Only if not trigger chamber - -// printf("---------------------------\n"); -// printf(">>>> Y = %f \n",hits[2]); -// printf("---------------------------\n"); - - - - // if(idvol < AliMUONConstants::NTrackingCh()) { -// // -// // Initialize hit position (cursor) in the segmentation model -// ((AliMUONChamber*) (*fChambers)[idvol]) -// ->SigGenInit(pos[0], pos[1], pos[2]); -// } else { -// //geant3->Gpcxyz(); -// //printf("In the Trigger Chamber #%d\n",idvol-9); -// } - } - eloss2+=destep; - sstep+=step; - - // cout<IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared()){ - gMC->SetMaxStep(kBig); - eloss += destep; - tlength += step; - - Float_t x0,y0,z0; - Float_t localPos[3]; - Float_t globalPos[3] = {pos[0], pos[1], pos[2]}; - gMC->Gmtod(globalPos,localPos,1); - - if(idvol < AliMUONConstants::NTrackingCh()) { -// tracking chambers - x0 = 0.5*(xhit+pos[0]); - y0 = 0.5*(yhit+pos[1]); - z0 = 0.5*(zhit+pos[2]); - } else { -// trigger chambers - x0 = xhit; - y0 = yhit; - z0 = 0.; - } - - - // if (eloss >0) MakePadHits(x0,y0,z0,eloss,tof,idvol); - - - hits[6] = tlength; // track length - hits[7] = eloss2; // de/dx energy loss - - - // if (fNPadHits > (Int_t)hits[8]) { - // hits[8] = hits[8]+1; - // hits[9] = 0: // PadHits does not exist anymore (Float_t) fNPadHits; - //} -// -// new hit - - new(lhits[fNhits++]) - AliMUONHit(fIshunt, gAlice->GetMCApp()->GetCurrentTrackNumber(), vol,hits); - eloss = 0; - // - // Check additional signal generation conditions - // defined by the segmentation - // model (boundary crossing conditions) - // only for tracking chambers - } else if - ((idvol < AliMUONConstants::NTrackingCh()) && - ((AliMUONChamber*) (*fChambers)[idvol])->SigGenCond(pos[0], pos[1], pos[2])) - { - ((AliMUONChamber*) (*fChambers)[idvol]) - ->SigGenInit(pos[0], pos[1], pos[2]); - - Float_t localPos[3]; - Float_t globalPos[3] = {pos[0], pos[1], pos[2]}; - gMC->Gmtod(globalPos,localPos,1); - - eloss += destep; - - // if (eloss > 0 && idvol < AliMUONConstants::NTrackingCh()) - // MakePadHits(0.5*(xhit+pos[0]),0.5*(yhit+pos[1]),pos[2],eloss,tof,idvol); - xhit = pos[0]; - yhit = pos[1]; - zhit = pos[2]; - eloss = 0; - tlength += step ; - // - // nothing special happened, add up energy loss - } else { - eloss += destep; - tlength += step ; - } -} - - diff --git a/MUON/AliMUONv3.h b/MUON/AliMUONv3.h deleted file mode 100644 index 914f6a6e6be..00000000000 --- a/MUON/AliMUONv3.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef ALIMUONV3_H -#define ALIMUONV3_H -/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ - -/* $Id$ */ -// Revision of includes 07/05/2004 - -///////////////////////////////////////////////////////// -// Manager and hits classes for set:MUON version 3 // -///////////////////////////////////////////////////////// -// -// Old MUONv1 class (to be removed later) -// - now replaced with a new one where geometry and materials -// are created using new geometry builders -// (See ALIMUON*GeometryBuilder classes) - -#include - -#include "AliMUON.h" - -class TF1; - -class AliMUONv3 : public AliMUON -{ - public: - AliMUONv3(); - AliMUONv3(const char *name, const char *title); - virtual ~AliMUONv3() {} - virtual void CreateGeometry(); - virtual void CreateMaterials(); - virtual void Init(); - virtual Int_t IsVersion() const {return 3;} - virtual void StepManager(); - void StepManagerOld(); - void SetStepManagerVersionOld(Bool_t Opt) - { fStepManagerVersionOld = Opt; } - void SetAngleEffect(Bool_t Opt) - { fAngleEffect = Opt; } - void SetStepMaxInActiveGas(Float_t StepMax) - {fStepMaxInActiveGas = StepMax; } - - protected: - AliMUONv3(const AliMUONv3& right); - AliMUONv3& operator = (const AliMUONv3& right); - Int_t* fStations; //! allow to externally set which station to create - Bool_t fStepManagerVersionOld; // Version of StepManager, Default is false - Bool_t fAngleEffect; // Angle Effect along wires, Default is true - Float_t fStepMaxInActiveGas; // Step max in active gas default 0.6cm - virtual Int_t GetChamberId(Int_t volId) const; - - // StepManager - Float_t * fStepSum; //! - Float_t * fDestepSum; //! - - TLorentzVector fTrackMomentum; // Momentum of the particle entering in the active gas of chamber - TLorentzVector fTrackPosition; // Position of the particle exiting the active gas of chamber - TF1 * fElossRatio; // Ratio of particle mean eloss with respect MIP's - TF1 * fAngleEffect10; // Angle effect in tracking chambers at theta =10 degres as a function of ElossRatio (Khalil BOUDJEMLINE sep 2003 Ph.D Thesis) (in micrometers) - TF1 * fAngleEffectNorma;// Angle effect: Normalisation form theta=10 degres to theta between 0 and 10 (Khalil BOUDJEMLINE sep 2003 Ph.D Thesis) - - ClassDef(AliMUONv3,1) // MUON Detector class Version 1 -}; -#endif - - - - - - - diff --git a/MUON/Config.C b/MUON/Config.C deleted file mode 100644 index e5d819b7423..00000000000 --- a/MUON/Config.C +++ /dev/null @@ -1,341 +0,0 @@ -enum gentype_t {hijing, gun, box, pythia, param, cocktail, fluka, halo, ntuple, scan, doublescan, hijing_g}; - -gentype_t gentype=param; -Int_t ntracks=1; - -void Config() - -{ - gSystem->Load("libgeant321"); - new TGeant3("C++ Interface to Geant3"); - - - -//======================================================================= -// Create the output file - - TFile *rootfile = new TFile("galice.root","recreate"); - rootfile->SetCompressionLevel(2); - AliDecayer* decayer = new AliDecayerPythia(); - decayer->SetForceDecay(kAll); - decayer->Init(); - gMC->SetExternalDecayer(decayer); - - TGeant3 *geant3 = (TGeant3*)gMC; -//======================================================================= -// ******* GEANT STEERING parameters FOR ALICE SIMULATION ******* -geant3->SetTRIG(1); //Number of events to be processed -geant3->SetSWIT(4,100); -geant3->SetDEBU(0,0,1); -geant3->SetDCAY(1); -geant3->SetPAIR(1); -geant3->SetCOMP(1); -geant3->SetPHOT(1); -geant3->SetPFIS(0); -geant3->SetDRAY(0); -geant3->SetANNI(1); -geant3->SetBREM(1); -geant3->SetMUNU(1); -geant3->SetCKOV(0); -geant3->SetHADR(4); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) -geant3->SetLOSS(1); -geant3->SetMULS(1); -geant3->SetRAYL(0); -geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) -geant3->SetABAN(1); //Restore 3.16 behaviour for abandoned tracks -geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2) -Float_t cut = 1.e-4; // 100MeV cut by default -Float_t tofmax = 1.e10; -// GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX -geant3->SetCUTS(1.e-4, 1.e-4, 1.e-3, 1.e-4, 1.e-3, cut, cut, cut, cut, cut, 1.e-5); - -gAlice->TrackingLimits(700, 2000); - -// -//======================================================================= -// ************* STEERING parameters FOR ALICE SIMULATION ************** -// --- Specify event type to be tracked through the ALICE setup -// --- All positions are in cm, angles in degrees, and P and E in GeV - - switch(gentype) - { - case gun: -//********************************************* -// Example for Fixed Particle Gun * -//********************************************* - AliGenFixed *gener = new AliGenFixed(ntracks); - gener->SetMomentum(10); - gener->SetPhiRange(0); - gener->SetThetaRange(0.); - gener->SetOrigin(30,30,1200); //vertex position - gener->SetPart(kProton); //GEANT particle type - break; - case box: -//********************************************* -// Example for Moving Particle Gun * -//********************************************* - AliGenBox *gener = new AliGenBox(ntracks); - gener->SetMomentumRange(33,34); - gener->SetPhiRange(-180,180); - gener->SetThetaRange(2., 9.); - gener->SetOrigin(0,0,0); - gener->SetVertexSmear(kPerTrack); - //vertex position - gener->SetSigma(0, 0, 0); // Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(kMuonPlus); // GEANT particle type - break; - case scan: -//********************************************* -// Scanning on a grid * -//********************************************* - AliGenScan *gener = new AliGenScan(-1); - gener->SetMomentumRange(20,20); - gener->SetPhiRange(90,90); - gener->SetThetaRange(0,0); - //vertex position - gener->SetSigma(1,1,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(kMuonMinus); - gener->SetRange(100, -300., 300., 100, -300., 300., 1, 900, 900); - break; - case doublescan: -//********************************************* -// Scanning on a grid * -//********************************************* - AliGenDoubleScan *gener = new AliGenDoubleScan(-1); - gener->SetMomentumRange(4,4); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0,0); - //vertex position - gener->SetSigma(3,3,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(8); - gener->SetRange(20, -100, 100, 20, -100, 100, 1, 500, 500); - gener->SetDistance(1); - break; - - case hijing: - AliGenHIJINGpara *gener = new AliGenHIJINGpara(ntracks); - gener->SetMomentumRange(0,999); - gener->SetPtRange(0,999); - gener->SetPhiRange(0,360); -// gener->SetThetaRange(0.104,33.52); - gener->SetThetaRange(0.104,90.0); -// gener->SetThetaRange(2.,9.); - gener->SetOrigin(0., 0.0 ,0); // vertex position - gener->SetSigma(0,0,5.3); // Sigma in (X,Y,Z) (cm) on IP position - gener->SetVertexSmear(kPerTrack); - gener->SetTrackingFlag(0); - break; - case hijing_g: - AliGenHijing *gener = new AliGenHijing(-1); - - gener->SetEnergyCMS(5600.); - gener->SetReferenceFrame("CMS"); - gener->SetProjectile("A", 208, 82); - gener->SetTarget ("A", 208, 82); - gener->SetImpactParameterRange(0, 5.); - gener->SetEvaluate(0); - gener->KeepFullEvent(); - gener->SetJetQuenching(1); - gener->SetShadowing(1); - gener->SetDecaysOff(1); - gener->SetTrigger(0); - gener->SetSelectAll(1); - gener->SetMomentumRange(0,9999); - gener->SetPhiRange(-180,180); - gener->SetThetaRange(0.104,90.0); -// gener->SetFlavor(4); - gener->SetOrigin(0., 0.0 ,0); - gener->SetSigma(0,0,5.3); - gener->SetVertexSmear(kPerEvent); - gener->SetTrackingFlag(0); - - break; - - case pythia: -//******************************************** -// Example for Charm Production with Pythia * -//******************************************** -AliGenPythia *gener = new AliGenPythia(ntracks); - gener->SetMomentumRange(0,999); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0., 180.); - gener->SetYRange(-10,10); - gener->SetPtRange(0,100); - //gener->SetOrigin(0,0,0); // vertex position - //gener->SetVertexSmear(kPerEvent); - //gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position - gener->SetStrucFunc(kDOSet1); - gener->SetProcess(kPyCharm); - gener->SetEnergyCMS(5500.); - break; -/* - AliGenPythia *gener = new AliGenPythia(ntracks); - gener->SetMomentumRange(0,999); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0., 180.); - gener->SetYRange(-10,10); - gener->SetPtRange(0,100); - gener->SetOrigin(0,0,0); // vertex position - gener->SetVertexSmear(kPerEvent); - gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position - gener->SetStrucFunc(DO_Set_1); - gener->SetProcess(charm); - gener->SetForceDecay(dimuon); - gener->SetEnergyCMS(5500.); - gener->SetTrackingFlag(0); - - break; - */ - case param: -//******************************************************* -// Example for J/psi or Upsilon Production from Parameterisation * -//******************************************************* - AliGenParam *gener = new AliGenParam(ntracks, AliGenMUONlib::kUpsilon); - gener->SetMomentumRange(0,999); - gener->SetPtRange(0,100.); - gener->SetPhiRange(-180, 180); - gener->SetYRange(2.5,4); - gener->SetCutOnChild(1); - gener->SetChildThetaRange(2.0,9); - gener->SetOrigin(0,0,0); //vertex position - gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetForceDecay(kDiMuon); - gener->SetTrackingFlag(1); - - break; - - case fluka: -//******************************************************* -// Example for a FLUKA Boundary Source * -//******************************************************* - AliGenFLUKAsource *gener = new AliGenFLUKAsource(-1); - gener->AddFile("$(ALICE_ROOT)/data/alice.root"); - rootfile->cd(); - gener->SetPartFlag(7); - gener->SetMomentumRange(0,999); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0., 180.); - gener->SetAgeMax(1.e-5); - -// 31.7 events - gener->SetFraction(1.); - break; - - case ntuple: -//******************************************************* -// Example for reading from a external file * -//******************************************************* - AliGenExtFileCH *gener = new AliGenExtFileCH(-1); - gener->SetFileName("$(ALICE_ROOT)/data/pbpb.root"); - gener->SetThetaRange(0.104,90.); - gener->SetOrigin(0,0,0); //vertex position - gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetVertexSmear(kPerTrack); - gener->SetTrackingFlag(1); - break; - - case halo: -//******************************************************* -// Example for Tunnel Halo Source * -//******************************************************* - AliGenHalo *gener = new AliGenHalo(ntracks); - gener->SetFileName("/h1/morsch/marsip/marsip5.mu"); - break; - - case cocktail: -//******************************************************* -// Example for a Cocktail * -//******************************************************* - AliGenCocktail *gener = new AliGenCocktail(); - gener->SetMomentumRange(0,10); - gener->SetPhiRange(0,360); - gener->SetThetaRange(2.,9.); - gener->SetTrackingFlag(0); - AliGenParam *Pi0 = new AliGenParam(100, new AliGenPMDlib(), AliGenPMDlib::kPion); - AliGenParam *Eta = new AliGenParam( 10, new AliGenPMDlib(), AliGenPMDlib::kEta); - gener->AddGenerator(Pi0, "neutral pions" , 1.); - gener->AddGenerator(Eta, "neutral etas" , 1.); - break; - } - - -gener->Init(); -gAlice->SetField(2,1); //Specify maximum magnetic field in Tesla (neg. ==> default field) - -Int_t iFRAME =0; -Int_t iMAG =0; -Int_t iITS =0; -Int_t iABSO =1; -Int_t iDIPO =0; -Int_t iHALL =0; -Int_t iSHIL =1; -Int_t iPIPE =1; -Int_t iFMD =0; -Int_t iMUON =1; - -//=================== Alice BODY parameters ============================= -AliBODY *BODY = new AliBODY("BODY","Alice envelop"); - -if(iFRAME) { -//=================== FRAME parameters ============================ -AliFRAME *FRAME = new AliFRAMEv0("FRAME","Space Frame"); -} - -if(iMAG) { -//=================== MAG parameters ============================ -// --- Start with Magnet since detector layouts may be depending --- -// --- on the selected Magnet dimensions --- -AliMAG *MAG = new AliMAG("MAG","Magnet"); -} - -if(iABSO) { -//=================== ABSO parameters ============================ - AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber"); -} - -if(iDIPO) { -//=================== DIPO parameters ============================ - - AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2"); -} - -if(iHALL) { -//=================== HALL parameters ============================ - AliHALL *HALL = new AliHALL("HALL","Alice Hall"); -} - - - -if(iSHIL) { -//=================== SHIL parameters ============================ -// AliSHIL *SHIL = new AliSAROV("SHIL","Shielding"); - AliSHILvF *SHIL = new AliSHILvF("SHIL","Shielding"); - SHIL->SetPbCone(1); -// AliSAROV *SHIL = new AliSAROV("SHIL","Shielding"); -} - - -if(iPIPE) { -//=================== PIPE parameters ============================ - AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe"); -} - - -if(iFMD) { -//=================== FMD parameters ============================ - AliFMD *FMD = new AliFMDv1("FMD","normal FMD"); -} - -if(iMUON) { -//=================== MUON parameters =========================== - - AliMUON *MUON = new AliMUONv1("MUON","default"); - -} - -} - - - - - diff --git a/MUON/Config_acc.C b/MUON/Config_acc.C deleted file mode 100644 index adf320de0bf..00000000000 --- a/MUON/Config_acc.C +++ /dev/null @@ -1,267 +0,0 @@ -enum gentype_t {hijing, gun, box, pythia, param, cocktail, fluka, halo, ntuple, scan, doublescan}; - -gentype_t gentype=param; -Int_t ntracks=1000; - -void Config() -{ - gSystem->Load("libgeant321"); - new TGeant3("C++ Interface to Geant3"); - TGeant3 *geant3 = (TGeant3*)gMC; - -//======================================================================= -// Create the output file - -TFile *rootfile = new TFile("galice.root","recreate"); -rootfile->SetCompressionLevel(2); -TGeant3 *geant3 = (TGeant3*)gMC; - - -//======================================================================= -// ******* GEANT STEERING parameters FOR ALICE SIMULATION ******* - geant3->fGctrak->maxnst=1000000; - -geant3->SetTRIG(1); //Number of events to be processed -geant3->SetSWIT(4,100); -geant3->SetDEBU(0,0,1); -geant3->SetDCAY(1); -geant3->SetPAIR(1); -geant3->SetCOMP(1); -geant3->SetPHOT(1); -geant3->SetPFIS(0); -geant3->SetDRAY(1); -geant3->SetANNI(1); -geant3->SetBREM(1); -geant3->SetMUNU(1); -geant3->SetCKOV(0); -geant3->SetHADR(4); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) -geant3->SetLOSS(1); -geant3->SetMULS(1); -geant3->SetRAYL(0); -geant3->SetAUTO(0); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) -geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks -geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2) -Float_t cut = 1.e-1; // 100MeV cut by default -Float_t tofmax = 1.e10; -// GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX -geant3->SetCUTS(1.e-4, 1.e-4, 1.e-3, 1.e-4, 1.e-4, cut, cut, cut, cut, cut, 1.e-5); - - gAlice->TrackingLimits( 700, 2200); - -// -//======================================================================= -// ************* STEERING parameters FOR ALICE SIMULATION ************** -// --- Specify event type to be tracked through the ALICE setup -// --- All positions are in cm, angles in degrees, and P and E in GeV - - switch(gentype) - { - case gun: -//********************************************* -// Example for Fixed Particle Gun * -//********************************************* - AliGenFixed *gener = new AliGenFixed(ntracks); - gener->SetMomentum(3); - gener->SetPhiRange(0); - gener->SetThetaRange(0); - gener->SetOrigin(0,0,0); //vertex position - gener->SetPart(kProton); //GEANT particle type - break; - case box: -//********************************************* -// Example for Moving Particle Gun * -//********************************************* - AliGenBox *gener = new AliGenBox(ntracks); - gener->SetMomentumRange(3,4); - gener->SetPhiRange(-360,360); - gener->SetThetaRange(2., 10.); - gener->SetOrigin(25,25,510.5); - gener->SetVertexSmear(kPerTrack); - //vertex position - gener->SetSigma(1.8, 1.8,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(kProton); //GEANT particle type - break; - case scan: -//********************************************* -// Scanning on a grid * -//********************************************* - AliGenScan *gener = new AliGenScan(-1); - gener->SetMomentumRange(20,20); - gener->SetPhiRange(90,90); - gener->SetThetaRange(0,0); - //vertex position - gener->SetSigma(3,3,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(kMuonMinus); - gener->SetRange(20, -100, 100, 20, -100, 100, 1, 500, 500); - break; - case doublescan: -//********************************************* -// Scanning on a grid * -//********************************************* - AliGenDoubleScan *gener = new AliGenDoubleScan(-1); - gener->SetMomentumRange(4,4); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0,0); - //vertex position - gener->SetSigma(3,3,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(8); - gener->SetRange(20, -100, 100, 20, -100, 100, 1, 500, 500); - gener->SetDistance(1); - - break; - - case hijing: - AliGenHIJINGpara *gener = new AliGenHIJINGpara(ntracks); - gener->SetMomentumRange(0,999); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0.104,33.52); - gener->SetOrigin(0,0,0); //vertex position - gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position - break; - - case pythia: -//******************************************** -// Example for Charm Production with Pythia * -//******************************************** - - AliGenPythia *gener = new AliGenPythia(ntracks); - gener->SetMomentumRange(0,999); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0., 180.); - gener->SetYRange(-10,10); - gener->SetPtRange(0,100); - gener->SetOrigin(0,0,0); // vertex position - gener->SetVertexSmear(kPerEvent); - gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position - gener->SetProcess(kPyCharm); - gener->SetEnergyCMS(5500.); - break; - - case param: -//******************************************************* -// Example for J/psi Production from Parameterisation * -//******************************************************* - AliGenParam *gener = new AliGenParam(ntracks, AliGenMUONlib::kUpsilon); - gener->SetMomentumRange(0,999); - gener->SetPtRange(0,100.); - gener->SetPhiRange(0,360); - gener->SetYRange(2.5,4); - gener->SetPtRange(0,50); - gener->SetOrigin(0,0,0); //vertex position - gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetForceDecay(kDiMuon); - gener->SetCutOnChild(1); - gener->SetChildThetaRange(2,9); - gener->SetTrackingFlag(1); - - break; - - case fluka: -//******************************************************* -// Example for a FLUKA Boundary Source * -//******************************************************* - AliGenFLUKAsource *gener = new AliGenFLUKAsource(-1); - gener->AddFile("$(ALICE_ROOT)/data/all32.root"); - rootfile->cd(); - gener->SetPartFlag(7); - gener->SetMomentumRange(0,999); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0., 180.); - gener->SetAgeMax(1.e-5); - -// 31.7 events - gener->SetFraction(0.0315); - break; - - case ntuple: -//******************************************************* -// Example for reading from a external file * -//******************************************************* - AliGenExtFile *gener = new AliGenExtFile(-1); - gener->SetFileName("$(ALICE_ROOT)/data/pbpb.root"); - gener->SetThetaRange(0.104,33.52); - gener->SetOrigin(0,0,0); //vertex position - gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetVertexSmear(kPerTrack); - gener->SetTrackingFlag(1); - break; - - case halo: -//******************************************************* -// Example for Tunnel Halo Source * -//******************************************************* - AliGenHalo *gener = new AliGenHalo(ntracks); - gener->SetFileName("/h1/morsch/marsip/marsip5.mu"); - break; - - case cocktail: -//******************************************************* -// Example for a Cocktail * -//******************************************************* - AliGenCocktail *gener = new AliGenCocktail(); - gener->SetMomentumRange(0,10); - gener->SetPhiRange(0,360); - gener->SetThetaRange(45.,135); - - pions = new AliGenParam(100, AliGenMUONlib::kPion); - gener->AddGenerator(pions , "Pions" , 100); - break; - } - -// Activate this line if you want the vertex smearing to happen -// track by track -// - -gener->Init(); -gAlice->SetField(-2,1); //Specify maximum magnetic field in Tesla (neg. ==> default field) -Int_t iMAG =0; -Int_t iABSO =0; -Int_t iDIPO =0; -Int_t iSHIL =0; -Int_t iPIPE =0; -Int_t iMUON =1; - -//=================== Alice BODY parameters ============================= -AliBODY *BODY = new AliBODY("BODY","Alice envelop"); - -if(iMAG) { -//=================== MAG parameters ============================ -// --- Start with Magnet since detector layouts may be depending --- -// --- on the selected Magnet dimensions --- -AliMAG *MAG = new AliMAG("MAG","Magnet"); -} - -if(iABSO) { -//=================== ABSO parameters ============================ - AliABSO *ABSO = new AliABSOv1("ABSO","Muon Absorber"); -} - -if(iDIPO) { -//=================== DIPO parameters ============================ - - AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2"); -} - - -if(iSHIL) { -//=================== SHIL parameters ============================ - AliSHIL *SHIL = new AliSHILv1("SHIL","Shielding"); -} - - -if(iPIPE) { -//=================== PIPE parameters ============================ - AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe"); -} - - -if(iMUON) { -//=================== MUON parameters =========================== - -AliMUON *MUON = new AliMUONv0("MUON","normal MUON"); - MUON->SetAcceptance(kTRUE, 0.1, 12.); - MUON->SetIshunt(0); - MUON->SetMaxStepGas(0.1); - MUON->SetMaxStepAlu(0.1); -} -} diff --git a/MUON/Config_slat.C b/MUON/Config_slat.C deleted file mode 100644 index 275ee142fd7..00000000000 --- a/MUON/Config_slat.C +++ /dev/null @@ -1,776 +0,0 @@ -enum gentype_t {hijing, gun, box, pythia, param, cocktail, fluka, halo, ntuple, scan, doublescan, hijing_g}; - -gentype_t gentype=scan; -// Int_t ntracks=6407; -// Int_t ntracks=12000; -// Int_t ntracks=28380; -// Int_t ntracks=19900; -Int_t ntracks=1; - -void Config() - -{ - - gSystem->Load("libgeant321"); - new TGeant3("C++ Interface to Geant3"); - TGeant3 *geant3 = (TGeant3*)gMC; - -//======================================================================= -// Create the output file - - TFile *rootfile = new TFile("galice.root","recreate"); - rootfile->SetCompressionLevel(2); - TGeant3 *geant3 = (TGeant3*)gMC; - AliDecayer* decayer = new AliDecayerPythia(); - decayer->SetForceDecay(kAll); - decayer->Init(); - gMC->SetExternalDecayer(decayer); - -//======================================================================= -// ******* GEANT STEERING parameters FOR ALICE SIMULATION ******* -geant3->SetTRIG(1); //Number of events to be processed -geant3->SetSWIT(4,100); -geant3->SetDEBU(0,0,1); -geant3->SetDCAY(1); -geant3->SetPAIR(1); -geant3->SetCOMP(1); -geant3->SetPHOT(1); -geant3->SetPFIS(0); -geant3->SetDRAY(0); -geant3->SetANNI(1); -geant3->SetBREM(1); -geant3->SetMUNU(1); -geant3->SetCKOV(0); -geant3->SetHADR(4); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) -geant3->SetLOSS(1); -geant3->SetMULS(1); -geant3->SetRAYL(0); -geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) -geant3->SetABAN(1); //Restore 3.16 behaviour for abandoned tracks -geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2) -Float_t cut = 1.e-4; // 100MeV cut by default -Float_t tofmax = 1.e10; -// GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX -geant3->SetCUTS(1.e-4, 1.e-4, 1.e-3, 1.e-4, 1.e-3, cut, cut, cut, cut, cut, 1.e-5); - -gAlice->TrackingLimits(700, 2000); - -// -//======================================================================= -// ************* STEERING parameters FOR ALICE SIMULATION ************** -// --- Specify event type to be tracked through the ALICE setup -// --- All positions are in cm, angles in degrees, and P and E in GeV - - switch(gentype) - { - case gun: -//********************************************* -// Example for Fixed Particle Gun * -//********************************************* - AliGenFixed *gener = new AliGenFixed(ntracks); - gener->SetMomentum(10); - gener->SetPhiRange(0); - gener->SetThetaRange(0.); - gener->SetOrigin(30,30,1200); //vertex position - gener->SetPart(kProton); //GEANT particle type - break; - case box: -//********************************************* -// Example for Moving Particle Gun * -//********************************************* - AliGenBox *gener = new AliGenBox(ntracks); - gener->SetMomentumRange(33,34); - gener->SetPhiRange(-180,180); - gener->SetThetaRange(2., 9.); - gener->SetOrigin(0,0,0); - gener->SetVertexSmear(kPerTrack); - //vertex position - gener->SetSigma(0, 0, 0); // Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(kMuonPlus); // GEANT particle type - break; - case scan: -//********************************************* -// Scanning on a grid * -//********************************************* - AliGenScan *gener = new AliGenScan(-1); - gener->SetMomentumRange(20,20); - gener->SetPhiRange(90,90); - gener->SetThetaRange(0,0); - //vertex position - gener->SetSigma(1,1,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(kMuonMinus); - gener->SetRange(100, -300., 300., 100, -300., 300., 1, 900, 900); - break; - case doublescan: -//********************************************* -// Scanning on a grid * -//********************************************* - AliGenDoubleScan *gener = new AliGenDoubleScan(-1); - gener->SetMomentumRange(4,4); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0,0); - //vertex position - gener->SetSigma(3,3,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetPart(8); - gener->SetRange(20, -100, 100, 20, -100, 100, 1, 500, 500); - gener->SetDistance(1); - break; - - case hijing: - AliGenHIJINGpara *gener = new AliGenHIJINGpara(ntracks); - gener->SetMomentumRange(0,999); - gener->SetPtRange(0,999); - gener->SetPhiRange(0,360); -// gener->SetThetaRange(0.104,33.52); - gener->SetThetaRange(0.104,90.0); -// gener->SetThetaRange(2.,9.); - gener->SetOrigin(0., 0.0 ,0); // vertex position - gener->SetSigma(0,0,5.3); // Sigma in (X,Y,Z) (cm) on IP position - gener->SetVertexSmear(kPerTrack); - gener->SetTrackingFlag(0); - break; - case hijing_g: - AliGenHijing *gener = new AliGenHijing(-1); - - gener->SetEnergyCMS(5600.); - gener->SetReferenceFrame("CMS"); - gener->SetProjectile("A", 208, 82); - gener->SetTarget ("A", 208, 82); - gener->SetImpactParameterRange(0, 5.); - gener->SetEvaluate(0); - gener->KeepFullEvent(); - gener->SetJetQuenching(1); - gener->SetShadowing(1); - gener->SetDecaysOff(1); - gener->SetTrigger(0); - gener->SetSelectAll(1); - gener->SetMomentumRange(0,9999); - gener->SetPhiRange(-180,180); - gener->SetThetaRange(0.104,90.0); -// gener->SetFlavor(4); - gener->SetOrigin(0., 0.0 ,0); - gener->SetSigma(0,0,5.3); - gener->SetVertexSmear(kPerEvent); - gener->SetTrackingFlag(0); - - break; - - case pythia: -//******************************************** -// Example for Charm Production with Pythia * -//******************************************** -AliGenPythia *gener = new AliGenPythia(ntracks); - gener->SetMomentumRange(0,999); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0., 180.); - gener->SetYRange(-10,10); - gener->SetPtRange(0,100); - //gener->SetOrigin(0,0,0); // vertex position - //gener->SetVertexSmear(kPerEvent); - //gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP -position - gener->SetStrucFunc(kDO_Set_1); - gener->SetProcess(kPyCharm); - gener->SetEnergyCMS(5500.); - break; -/* - AliGenPythia *gener = new AliGenPythia(ntracks); - gener->SetMomentumRange(0,999); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0., 180.); - gener->SetYRange(-10,10); - gener->SetPtRange(0,100); - gener->SetOrigin(0,0,0); // vertex position - gener->SetVertexSmear(kPerEvent); - gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position - gener->SetStrucFunc(DO_Set_1); - gener->SetProcess(charm); - gener->SetForceDecay(dimuon); - gener->SetEnergyCMS(5500.); - gener->SetTrackingFlag(0); - - break; - */ - case param: -//******************************************************* -// Example for J/psi or Upsilon Production from Parameterisation * -//******************************************************* - AliGenParam *gener = new AliGenParam(ntracks, AliGenMUONlib::kUpsilon); - gener->SetMomentumRange(0,999); - gener->SetPtRange(0.,100.); - gener->SetPhiRange(-180, 180); - gener->SetYRange(2.5,4); - gener->SetCutOnChild(1); - gener->SetChildThetaRange(2.0,9); - gener->SetOrigin(0,0,0); //vertex position - gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetForceDecay(kDiMuon); - gener->SetTrackingFlag(1); - - break; - - case fluka: -//******************************************************* -// Example for a FLUKA Boundary Source * -//******************************************************* - AliGenFLUKAsource *gener = new AliGenFLUKAsource(-1); - gener->AddFile("$(ALICE_ROOT)/data/alice.root"); - rootfile->cd(); - gener->SetPartFlag(7); - gener->SetMomentumRange(0,999); - gener->SetPhiRange(0,360); - gener->SetThetaRange(0., 180.); - gener->SetAgeMax(1.e-5); - -// 31.7 events - gener->SetFraction(1.); - break; - - case ntuple: -//******************************************************* -// Example for reading from a external file * -//******************************************************* - AliGenExtFileCH *gener = new AliGenExtFileCH(-1); - gener->SetFileName("$(ALICE_ROOT)/data/pbpb.root"); - gener->SetThetaRange(0.104,90.); - gener->SetOrigin(0,0,0); //vertex position - gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position - gener->SetVertexSmear(kPerTrack); - gener->SetTrackingFlag(1); - break; - - case halo: -//******************************************************* -// Example for Tunnel Halo Source * -//******************************************************* - AliGenHalo *gener = new AliGenHalo(ntracks); - gener->SetFileName("/h1/morsch/marsip/marsip5.mu"); - break; - - case cocktail: -//******************************************************* -// Example for a Cocktail * -//******************************************************* - AliGenCocktail *gener = new AliGenCocktail(); - gener->SetMomentumRange(0,10); - gener->SetPhiRange(0,360); - gener->SetThetaRange(2.,9.); - gener->SetTrackingFlag(0); - AliGenParam *Pi0 = new AliGenParam(100, new AliGenPMDlib(), AliGenPMDlib::kPion); - AliGenParam *Eta = new AliGenParam( 10, new AliGenPMDlib(), AliGenPMDlib::kEta); - gener->AddGenerator(Pi0, "neutral pions" , 1.); - gener->AddGenerator(Eta, "neutral etas" , 1.); - break; - } - - -gener->Init(); -gAlice->SetField(2,1); //Specify maximum magnetic field in Tesla (neg. ==> default field) - -Int_t iFRAME =0; -Int_t iMAG =0; -Int_t iITS =0; -Int_t iABSO =1; -Int_t iDIPO =1; -Int_t iHALL =0; -Int_t iSHIL =1; -Int_t iPIPE =0; -Int_t iFMD =0; -Int_t iMUON =1; - -//=================== Alice BODY parameters ============================= -AliBODY *BODY = new AliBODY("BODY","Alice envelop"); - -if(iFRAME) { -//=================== FRAME parameters ============================ -AliFRAME *FRAME = new AliFRAMEv0("FRAME","Space Frame"); -} - -if(iMAG) { -//=================== MAG parameters ============================ -// --- Start with Magnet since detector layouts may be depending --- -// --- on the selected Magnet dimensions --- -AliMAG *MAG = new AliMAG("MAG","Magnet"); -} - -if(iABSO) { -//=================== ABSO parameters ============================ - AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber"); -} - -if(iDIPO) { -//=================== DIPO parameters ============================ - - AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2"); -} - -if(iHALL) { -//=================== HALL parameters ============================ - AliHALL *HALL = new AliHALL("HALL","Alice Hall"); -} - - - -if(iSHIL) { -//=================== SHIL parameters ============================ -// AliSHIL *SHIL = new AliSAROV("SHIL","Shielding"); - AliSHILvF *SHIL = new AliSHILvF("SHIL","Shielding"); - SHIL->SetPbCone(1); -// AliSAROV *SHIL = new AliSAROV("SHIL","Shielding"); -} - - -if(iPIPE) { -//=================== PIPE parameters ============================ - AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe"); -} - - -if(iFMD) { -//=================== FMD parameters ============================ - AliFMD *FMD = new AliFMDv1("FMD","normal FMD"); -} - -if(iMUON) { -//=================== MUON parameters =========================== - -AliMUON *MUON = new AliMUONv1("MUON","normal MUON"); - MUON->SetIshunt(0); - MUON->SetMaxStepGas(0.1); - MUON->SetMaxStepAlu(0.1); -// -// Version 0 -// -// First define the number of planes that are segmented (1 or 2) by a call -// to SetNsec. -// Then chose for each chamber (chamber plane) the segmentation -// and response model. -// They should be equal for the two chambers of each station. In a future -// version this will be enforced. -// -// - Int_t chamber; - Int_t station; - // Default response: 5 mm of gas - AliMUONResponseV0* response0 = new AliMUONResponseV0; - response0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085) - response0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840) - response0->SetPitch(0.25); // anode-cathode distance - response0->SetSigmaIntegration(10.); - response0->SetChargeSlope(50); - response0->SetChargeSpread(0.18, 0.18); - response0->SetMaxAdc(4096); - response0->SetZeroSuppression(6); - - // Response for 4 mm of gas (station 1) - // automatic consistency with width of sensitive medium in CreateGeometry ???? - AliMUONResponseV0* responseSt1 = new AliMUONResponseV0; - // Mathieson parameters from L.Kharmandarian's thesis, page 190 - responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900) - responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700) - responseSt1->SetPitch(0.20); // anode-cathode distance - responseSt1->SetSigmaIntegration(10.); - // ChargeSlope larger to compensate for the smaller anode-cathode distance - // and keep the same most probable ADC channel for mip's - responseSt1->SetChargeSlope(62.5); - // assumed proportionality to anode-cathode distance for ChargeSpread - responseSt1->SetChargeSpread(0.144, 0.144); - responseSt1->SetMaxAdc(4096); - responseSt1->SetZeroSuppression(6); - -//-------------------------------------------------------- -// Configuration for Chamber TC1/2 (Station 1) ---------- -//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5}; - Int_t nseg1[4]={4, 4, 2, 1}; -// - chamber=1; -//^^^^^^^^^ - MUON->SetNsec(chamber-1,2); -// - AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4); - - seg11->SetSegRadii(rseg1); - seg11->SetPadSize(2.4, 0.4); // smaller pad size - seg11->SetDAnod(0.20); // smaller distance between anode wires - seg11->SetPadDivision(nseg1); - - MUON->SetSegmentationModel(chamber-1, 1, seg11); - - AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4); - seg12->SetSegRadii(rseg1); - seg12->SetPadSize(0.6, 1.6); // smaller pad size - seg12->SetDAnod(0.20); // smaller distance between anode wires - seg12->SetPadDivision(nseg1); - - MUON->SetSegmentationModel(chamber-1, 2, seg12); - - MUON->SetResponseModel(chamber-1, responseSt1); // special response - MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread - - chamber=2; -//^^^^^^^^^ -// - MUON->SetNsec(chamber-1,2); -// - AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4); - seg21->SetSegRadii(rseg1); - seg21->SetPadSize(2.4, 0.4); // smaller pad size - seg21->SetDAnod(0.20); // smaller distance between anode wires - seg21->SetPadDivision(nseg1); - MUON->SetSegmentationModel(chamber-1, 1, seg21); -// - AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4); - seg22->SetSegRadii(rseg1); - seg22->SetPadSize(0.6, 1.6); // smaller pad size - seg22->SetDAnod(0.20); // smaller distance between anode wires - seg22->SetPadDivision(nseg1); - MUON->SetSegmentationModel(chamber-1, 2, seg22); - - MUON->SetResponseModel(chamber-1, responseSt1); // special response - MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread - -// -//-------------------------------------------------------- -// Configuration for Chamber TC3/4 (Station 2) ----------- -///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5}; - Float_t rseg2[4]={23.5, 47.1, 87.7, 122.5}; - Int_t nseg2[4]={4, 4, 2, 1}; -// - chamber=3; -//^^^^^^^^^ - MUON->SetNsec(chamber-1,2); -// - AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4); - seg31->SetSegRadii(rseg2); - seg31->SetPadSize(3.0, 0.5); - seg31->SetDAnod(3.0/3./4); - seg31->SetPadDivision(nseg2); - MUON->SetSegmentationModel(chamber-1, 1, seg31); -// - AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4); - seg32->SetSegRadii(rseg2); - seg32->SetPadSize(0.75, 2.0); - seg32->SetPadDivision(nseg2); - seg32->SetDAnod(3.0/3./4); - - MUON->SetSegmentationModel(chamber-1, 2, seg32); - - MUON->SetResponseModel(chamber-1, response0); - MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread - - chamber=4; -//^^^^^^^^^ -// - MUON->SetNsec(chamber-1,2); -// - AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4); - seg41->SetSegRadii(rseg2); - seg41->SetPadSize(3.0, 0.5); - seg41->SetDAnod(3.0/3./4); - seg41->SetPadDivision(nseg2); - MUON->SetSegmentationModel(chamber-1, 1, seg41); -// - AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4); - seg42->SetSegRadii(rseg2); - seg42->SetPadSize(0.75, 2.0); - seg42->SetPadDivision(nseg2); - seg42->SetDAnod(3.0/3./4); - - MUON->SetSegmentationModel(chamber-1, 2, seg42); - - MUON->SetResponseModel(chamber-1, response0); - MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread - - -//-------------------------------------------------------- -// Configuration for Chamber TC5/6 (Station 3) ---------- -//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Int_t nseg3[4]={4, 4, 2, 1}; - Int_t npcb5[36] = {0,0,2,0, - 0,0,3,0, - 0,1,3,0, - 0,2,2,0, - 0,1,2,0, - 0,2,2,0, - 0,1,3,0, - 0,0,3,0, - 0,0,2,0}; - - Float_t shift = 1.5/2.; - Float_t xpos5[9] = {2., 2., 2., 2.,33., 2., 2., 2., 2.}; - Float_t ypos5 = -(20.+4.*(40.-2.*shift)); - - chamber=5; - MUON->SetNsec(chamber-1,2); - AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4); - seg51->SetNSlats(9); - seg51->SetShift(shift); - seg51->SetNPCBperSector(npcb5); - seg51->SetSlatXPositions(xpos5); - seg51->SetSlatYPosition(ypos5); - seg51->SetPadSize(10.,0.5); - seg51->SetDAnod(0.25); - seg51->SetPadDivision(nseg3); - MUON->SetSegmentationModel(chamber-1, 1, seg51); - - AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4); - seg52->SetNSlats(9); - seg52->SetShift(shift); - seg52->SetNPCBperSector(npcb5); - seg52->SetSlatXPositions(xpos5); - seg52->SetSlatYPosition(ypos5); - seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) - seg52->SetDAnod(0.25); - seg52->SetPadDivision(nseg3); - MUON->SetSegmentationModel(chamber-1, 2, seg52); - MUON->SetResponseModel(chamber-1, response0); - MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread - - chamber=6; - MUON->SetNsec(chamber-1,2); - AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4); - seg61->SetNSlats(9); - seg61->SetShift(shift); - seg61->SetNPCBperSector(npcb5); - seg61->SetSlatXPositions(xpos5); - seg61->SetSlatYPosition(ypos5); - seg61->SetPadSize(10.,0.5); - seg61->SetDAnod(0.25); - seg61->SetPadDivision(nseg3); - MUON->SetSegmentationModel(chamber-1, 1, seg61); - - AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4); - seg62->SetNSlats(9); - seg62->SetShift(shift); - seg62->SetNPCBperSector(npcb5); - seg62->SetSlatXPositions(xpos5); - seg62->SetSlatYPosition(ypos5); - seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) - seg62->SetDAnod(0.25); - seg62->SetPadDivision(nseg3); - MUON->SetSegmentationModel(chamber-1, 2, seg62); - MUON->SetResponseModel(chamber-1, response0); - MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread - -//-------------------------------------------------------- -// Configuration for Chamber TC7/8 (Station 4) ---------- -//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - Int_t nseg4[4]={4, 4, 2, 1}; - - chamber=7; -//^^^^^^^^^ - - MUON->SetNsec(chamber-1,2); -// - AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4); - Int_t npcb7[44] = {0,0,0,3, - 0,0,2,2, - 0,0,3,2, - 0,2,2,1, - 0,2,2,1, - 0,1,2,1, - 0,2,2,1, - 0,2,2,1, - 0,0,3,2, - 0,0,2,2, - 0,0,0,3}; - Float_t xpos7[11] = {2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2.}; - Float_t ypos7 = -(20.+5.*(40.-2.*shift)); - - seg71->SetNSlats(11); - seg71->SetShift(shift); - seg71->SetNPCBperSector(npcb7); - seg71->SetSlatXPositions(xpos7); - seg71->SetSlatYPosition(ypos7); - - seg71->SetPadSize(10.,0.5); - seg71->SetDAnod(0.25); - seg71->SetPadDivision(nseg4); - MUON->SetSegmentationModel(chamber-1, 1, seg71); - - AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4); - - MUON->SetSegmentationModel(chamber-1, 2, seg72); - seg72->SetNSlats(11); - seg72->SetShift(shift); - seg72->SetNPCBperSector(npcb7); - seg72->SetSlatXPositions(xpos7); - seg72->SetSlatYPosition(ypos7); - seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) - seg72->SetDAnod(0.25); - seg72->SetPadDivision(nseg4); - - MUON->SetResponseModel(chamber-1, response0); - MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread - - chamber=8; -//^^^^^^^^^ - MUON->SetNsec(chamber-1,2); -// - AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4); - - seg81->SetNSlats(11); - seg81->SetShift(shift); - seg81->SetNPCBperSector(npcb7); - seg81->SetSlatXPositions(xpos7); - seg81->SetSlatYPosition(ypos7); - seg81->SetPadSize(10.,0.5); - seg81->SetDAnod(0.25); - seg81->SetPadDivision(nseg4); - MUON->SetSegmentationModel(chamber-1, 1, seg81); - - AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4); - - MUON->SetSegmentationModel(chamber-1, 2, seg82); - seg82->SetNSlats(11); - seg82->SetShift(shift); - seg82->SetNPCBperSector(npcb7); - seg82->SetSlatXPositions(xpos7); - seg82->SetSlatYPosition(ypos7); - seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) - seg82->SetDAnod(0.25); - seg82->SetPadDivision(nseg4); - - MUON->SetResponseModel(chamber-1, response0); - MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread - - -//-------------------------------------------------------- -// Configuration for Chamber TC9/10 (Station 5) --------- -//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - chamber=9; -//^^^^^^^^^ - - MUON->SetNsec(chamber-1,2); -// - AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4); - Int_t npcb9[52] = {0,0,0,3, - 0,0,0,4, - 0,0,2,3, - 0,0,3,3, - 0,2,2,2, - 0,2,2,2, - 0,1,2,2, - 0,2,2,2, - 0,2,2,2, - 0,0,3,3, - 0,0,2,3, - 0,0,0,4, - 0,0,0,3}; - - Float_t xpos9[13] = {2., 2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2., 2.}; - Float_t ypos9 = -(20.+6.*(40.-2.*shift)); - - seg91->SetNSlats(13); - seg91->SetShift(shift); - seg91->SetNPCBperSector(npcb9); - seg91->SetSlatXPositions(xpos9); - seg91->SetSlatYPosition(ypos9); - seg91->SetPadSize(10.,0.5); - seg91->SetDAnod(0.25); - seg91->SetPadDivision(nseg4); - MUON->SetSegmentationModel(chamber-1, 1, seg91); - - AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4); - - MUON->SetSegmentationModel(chamber-1, 2, seg92); - seg92->SetNSlats(13); - seg92->SetShift(shift); - seg92->SetNPCBperSector(npcb9); - seg92->SetSlatXPositions(xpos9); - seg92->SetSlatYPosition(ypos9); - seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) - seg92->SetDAnod(0.25); - seg92->SetPadDivision(nseg4); - - MUON->SetResponseModel(chamber-1, response0); - MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread - - chamber=10; -//^^^^^^^^^ - MUON->SetNsec(chamber-1,2); -// - AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4); - - seg101->SetNSlats(13); - seg101->SetShift(shift); - seg101->SetNPCBperSector(npcb9); - seg101->SetSlatXPositions(xpos9); - seg101->SetSlatYPosition(ypos9); - seg101->SetPadSize(10.,0.5); - seg101->SetDAnod(0.25); - seg101->SetPadDivision(nseg4); - MUON->SetSegmentationModel(chamber-1, 1, seg101); - - AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4); - - MUON->SetSegmentationModel(chamber-1, 2, seg102); - seg102->SetNSlats(13); - seg102->SetShift(shift); - seg102->SetNPCBperSector(npcb9); - seg102->SetSlatXPositions(xpos9); - seg102->SetSlatYPosition(ypos9); - seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending) - seg102->SetDAnod(0.25); - seg102->SetPadDivision(nseg4); - - MUON->SetResponseModel(chamber-1, response0); - MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread - -//-------------------------------------------------------- -// Configuration for Trigger Stations -------------------- -//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// Cluster-size off - AliMUONResponseTrigger* responseTrigger0 = new AliMUONResponseTrigger; -// Cluster-size on -// AliMUONResponseTriggerV1* responseTrigger0 = new AliMUONResponseTriggerV1; - - chamber=11; - MUON->SetNsec(chamber-1,2); - AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX; - MUON->SetSegmentationModel(chamber-1, 1, seg111); - AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY; - MUON->SetSegmentationModel(chamber-1, 2, seg112); - - MUON->SetResponseModel(chamber-1, responseTrigger0); - MUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes - - - chamber=12; - MUON->SetNsec(chamber-1,2); - AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX; - MUON->SetSegmentationModel(chamber-1, 1, seg121); - AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY; - MUON->SetSegmentationModel(chamber-1, 2, seg122); - - MUON->SetResponseModel(chamber-1, responseTrigger0); - MUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes - - chamber=13; - MUON->SetNsec(chamber-1,2); - AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX; - MUON->SetSegmentationModel(chamber-1, 1, seg131); - AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY; - MUON->SetSegmentationModel(chamber-1, 2, seg132); - MUON->SetResponseModel(chamber-1, responseTrigger0); - MUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes - - chamber=14; - MUON->SetNsec(chamber-1,2); - AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX; - MUON->SetSegmentationModel(chamber-1, 1, seg141); - AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY; - MUON->SetSegmentationModel(chamber-1, 2, seg142); - - MUON->SetResponseModel(chamber-1, responseTrigger0); - MUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes -} -} - - - - - -- 2.39.3