/************************************************************************** * Copyright(c) 2007-2008, 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. * **************************************************************************/ //************************************************************************ // // Inner Traking System geometry v11 // // Based on ROOT geometrical modeler // // B. Nilsen, L. Gaudichet //************************************************************************ #include #include #include "AliITS.h" #include "AliITSDetTypeSim.h" #include #include "AliITSgeom.h" #include "AliITSgeomSDD.h" #include "AliITSgeomSPD.h" #include "AliITSgeomSSD.h" #include "AliITShit.h" #include "AliITSCalibrationSDD.h" #include "AliITSsegmentationSDD.h" #include "AliITSsegmentationSPD.h" #include "AliITSsegmentationSSD.h" #include "AliMagF.h" #include "AliRun.h" #include "AliTrackReference.h" #include "AliMC.h" #include #include #include #include "AliITSv11.h" //#include "AliITSv11GeometrySPD.h" #include "AliITSv11GeometrySDD.h" //#include "AliITSv11GeometrySupport.h" ClassImp(AliITSv11) //______________________________________________________________________ AliITSv11::AliITSv11() : AliITS(), fGeomDetOut(kFALSE), fGeomDetIn(kFALSE), fByThick(kTRUE), fMajorVersion(IsVersion()), fMinorVersion(0), fEuclidGeomDet(), fRead(), fWrite(), //fSPDgeom(), fSDDgeom(0), //fSupgeom(), fIgm(kv11) { // Standard default constructor for the ITS version 11. fIdN = 0; fIdName = 0; fIdSens = 0; Int_t i; for(i=0;i<60;i++) fRead[i] = '\0'; for(i=0;i<60;i++) fWrite[i] = '\0'; for(i=0;i<60;i++) fEuclidGeomDet[i] = '\0'; strncpy(fRead,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymmFMD.det",60); } //______________________________________________________________________ AliITSv11::AliITSv11(const char *name, const char *title): AliITS("ITS", title), fGeomDetOut(kFALSE), fGeomDetIn(kFALSE), fByThick(kTRUE), fMajorVersion(IsVersion()), fMinorVersion(0), fEuclidGeomDet(), fRead(), fWrite(), //fSPDgeom(), fSDDgeom(0), //fSupgeom(), fIgm(kv11) { // Standard constructor for the ITS version 11. fSDDgeom = new AliITSv11GeometrySDD(0); Int_t i; fIdN = 6; fIdName = new TString[fIdN]; fIdName[0] = name; // removes warning message fIdName[0] = "ITS1"; fIdName[1] = "ITS2"; fIdName[2] = fSDDgeom->GetSenstiveVolumeName3(); fIdName[3] = fSDDgeom->GetSenstiveVolumeName4(); fIdName[4] = "ITS5"; fIdName[5] = "ITS6"; fIdSens = new Int_t[fIdN]; for(i=0;iSetDebug(debugSDD); // fSupgeom = new AliITSv11GeometrySupport(debugSUP); Int_t i; fIdN = 6; fIdName = new TString[fIdN]; fIdName[0] = "ITS1"; fIdName[1] = "ITS2"; fIdName[2] = fSDDgeom->GetSenstiveVolumeName3(); fIdName[3] = fSDDgeom->GetSenstiveVolumeName4(); fIdName[4] = "ITS5"; fIdName[5] = "ITS6"; fIdSens = new Int_t[fIdN]; for(i=0;iGetTopVolume(); TGeoPcon *sITS = new TGeoPcon("ITS Top Volume",0.0,360.0,2); // DefineSection(section number, Z, Rmin, Rmax). const Double_t kcm = 1.0; sITS->DefineSection(0,-300.0*kcm,0.01*kcm,50.0*kcm); sITS->DefineSection(1,+300.0*kcm,0.01*kcm,50.0*kcm); TGeoMedium *air = gGeoManager->GetMedium("ITS_AIR$"); TGeoVolume *vITS = new TGeoVolume("ITSV",sITS,air); vITS->SetVisibility(kFALSE); const Int_t length=100; Char_t vstrng[length]; if(fIgm.WriteVersionString(vstrng,length,(AliITSVersion_t)IsVersion(), fMinorVersion,cvsDate,cvsRevision)) vITS->SetTitle(vstrng); //printf("Title set to %s\n",vstrng); vALIC->AddNode(vITS,1,0); // fSPDgeom->CenteralSPD(vITS); fSDDgeom->Layer3(vITS); fSDDgeom->Layer4(vITS); // fSupgeom->SPDCone(vITS); // fSupgeom->SPDThermalSheald(vITS); // fSupgeom->SDDCone(vITS); // fSupgeom->SSDCone(vITS); // fSupgeom->ServicesCableSupport(vITS); } //______________________________________________________________________ void AliITSv11::CreateMaterials(){ // // Create ITS materials // Defined media here should correspond to the one defined in galice.cuts // File which is red in (AliMC*) fMCApp::Init() { ReadTransPar(); } // // Int_t ifield = gAlice->Field()->Integ(); // Float_t fieldm = gAlice->Field()->Max(); // Float_t tmaxfd = 0.1; // 1.0; // Degree // Float_t stemax = 1.0; // cm // Float_t deemax = 0.1; // 30.0; // Fraction of particle's energy 0Field()->Integ(); Float_t fieldm = gAlice->Field()->Max(); Float_t tmaxfd = 0.1; // 1.0; // Degree Float_t stemax = 1.0; // cm Float_t deemax = 0.1; // 30.0; // Fraction of particle's energy 0

The Exel spread sheet from which these density number come from. */ //End_Html // AliMaterial(86,"AIRFMDSDD$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03); Float_t aA[13],zZ[13],wW[13],den; // From Pierluigi Barberis calculations of 2SPD+1SDD October 2 2002. zZ[0] = 1.0; aA[0] = 1.00794; // Hydrogen zZ[1] = 6.0; aA[1] = 12.011; // Carbon zZ[2] = 7.0; aA[2] = 14.00674; // Nitrogen zZ[3] = 8.0; aA[3] = 15.9994; // Oxigen zZ[4] = 14.0; aA[4] = 28.0855; // Silicon zZ[5] = 24.0; aA[5] = 51.9961; //Cromium zZ[6] = 25.0; aA[6] = 54.938049; // Manganese zZ[7] = 26.0; aA[7] = 55.845; // Iron zZ[8] = 28.0; aA[8] = 58.6934; // Nickle zZ[9] = 29.0; aA[9] = 63.546; // Copper zZ[10] = 13.0; aA[10] = 26.981539; // Alulminum zZ[11] = 47.0; aA[11] = 107.8682; // Silver zZ[12] = 27.0; aA[12] = 58.9332; // Cobolt wW[0] = 0.019965; wW[1] = 0.340961; wW[2] = 0.041225; wW[3] = 0.200352; wW[4] = 0.000386; wW[5] = 0.001467; wW[6] = 0.000155; wW[7] = 0.005113; wW[8] = 0.000993; wW[9] = 0.381262; wW[10] = 0.008121; wW[11] = 0.000000; wW[12] = 0.000000; if(fByThick){// New values seeITS_MatBudget_4B.xls den = 1.5253276; // g/cm^3 Cell O370 }else{ den = 2.58423412; // g/cm^3 Cell L370 } // end if fByThick //den = 6161.7/(3671.58978);//g/cm^3 Volume does not exclude holes AliMixture(86,"AIRFMDSDD$",aA,zZ,den,+11,wW); AliMedium(86,"AIRFMDSDD$",86,0,ifield,fieldm,tmaxfdAir,stemaxAir, deemaxAir,epsilAir,stminAir); //AliMaterial(87,"AIRFMDSSD$",0.14610E+02,0.73000E+01,0.12050E-02,0.30423E+05,0.99900E+03); // From Pierluigi Barberis calculations of SSD October 2 2002. wW[0] = 0.019777; wW[1] = 0.325901; wW[2] = 0.031848; wW[3] = 0.147668; wW[4] = 0.030609; wW[5] = 0.013993; wW[6] = 0.001479; wW[7] = 0.048792; wW[8] = 0.009477; wW[9] = 0.350697; wW[10] = 0.014546; wW[11] = 0.005213; wW[12] = 0.000000; if(fByThick){// New values seeITS_MatBudget_4B.xls den = 1.2464275; // g/cm^3 Cell O403 }else{ den = 1.28134409; // g/cm^3 Cell L403 } // end if fByThick //den = 7666.3/(9753.553259); // volume does not exclude holes AliMixture(87,"AIRFMDSSD$",aA,zZ,den,+12,wW); AliMedium(87,"AIRFMDSSD$",87,0,ifield,fieldm,tmaxfdAir,stemaxAir, deemaxAir,epsilAir,stminAir); //AliMaterial(88,"ITS SANDW CFMDSDD$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03); // From Pierluigi Barberis calculations of 1SDD+Carbon fiber October 2 2002 wW[0] = 0.016302; wW[1] = 0.461870; wW[2] = 0.033662; wW[3] = 0.163595; wW[4] = 0.000315; wW[5] = 0.001197; wW[6] = 0.000127; wW[7] = 0.004175; wW[8] = 0.000811; wW[9] = 0.311315; wW[10] = 0.006631; wW[11] = 0.000000; wW[12] = 0.000000; if(fByThick){// New values seeITS_MatBudget_4B.xls den = 1.9353276; // g/cm^3 Cell N370 }else{ den = 3.2788626; // g/cm^3 Cell F370 } // end if fByThick //den = 7667.1/(3671.58978); // Volume does not excludeholes AliMixture(88,"ITS SANDW CFMDSDD$",aA,zZ,den,+11,wW); AliMedium(88,"ITS SANDW CFMDSDD$",88,0,ifield,fieldm,tmaxfd,stemax, deemax,epsil,stmin); //AliMaterial(89,"ITS SANDW CFMDSSD$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03); // From Pierluigi Barberis calculations of SSD+Carbon fiber October 2 2002. wW[0] = 0.014065; wW[1] = 0.520598; wW[2] = 0.022650; wW[3] = 0.105018; wW[4] = 0.021768; wW[5] = 0.009952; wW[6] = 0.001051; wW[7] = 0.034700; wW[8] = 0.006740; wW[9] = 0.249406; wW[10] = 0.010345; wW[11] = 0.0003707; wW[12] = 0.000000; if(fByThick){// New values seeITS_MatBudget_4B.xls den = 1.6564275; // g/cm^3 Cell N304 }else{ den = 1.7028296; // g/cm^3 Cell F304 } // end if fByThick //den = 1166.5/(3671.58978); // Volume does not exclude holes AliMixture(89,"ITS SANDW CFMDSSD$",aA,zZ,den,+12,wW); AliMedium(89,"ITS SANDW CFMDSSD$",89,0,ifield,fieldm,tmaxfd,stemax, deemax,epsil,stmin); //AliMaterial(97,"SPD SERVICES$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03); // From Pierluigi Barberis calculations of 1SPD October 2 2002. wW[0] = 0.005970; wW[1] = 0.304704; wW[2] = 0.042510; wW[3] = 0.121715; wW[4] = 0.001118; wW[5] = 0.030948; wW[6] = 0.003270; wW[7] = 0.107910; wW[8] = 0.020960; wW[9] = 0.360895; wW[10] = 0.000000; wW[11] = 0.000000; wW[12] = 0.000000; if(fByThick){// New values seeITS_MatBudget_4B.xls den = 80.31136576; // g/cm^3 Cell H329 }else{ den = 87.13062; // g/cm^3 Cell G329 } // end if fByThick //den = 1251.3/(0.05*2.0*TMath::Pi()*(7.75*7.75 - 3.7*3.7)); // g/cm^3 AliMixture(97,"SPD SERVICES$",aA,zZ,den,+10,wW); AliMedium(97,"SPD SERVICES$",97,0,ifield,fieldm,tmaxfd,stemax, deemax,epsil,stmin); // Special media AliMaterial(90,"SPD shield$", 12.011, 6., 1.93/10. , 22.1*10., 999); AliMedium(90,"SPD shield$",90,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ); // SPD End Ladder (data from Petra Riedler) Float_t aSPDel[5] = {1.00794,12.0107,14.01,15.9994,63.54 }; Float_t zSPDel[5] = {1.,6.,7.,8.,29.}; Float_t wSPDel[5] = {0.004092,0.107274,0.011438,0.032476,0.844719}; Float_t dSPDel = 3.903403; // AliMaterial(91, "SPD End ladder$", 47.0447, 21.7963, 3.6374, 4.4711, 999); AliMixture(91,"SPD End ladder$",aSPDel,zSPDel,dSPDel,5,wSPDel); AliMedium(91,"SPD End ladder$",91,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ); AliMaterial(92, "SPD cone$",28.0855, 14., 2.33, 9.36, 999); AliMedium(92,"SPD cone$",92,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ); /* Material with fractional Z not actually used AliMaterial(93, "SDD End ladder$", 69.9298, 29.8246, 0.3824, 36.5103, 999); AliMedium(93,"SDD End ladder$",93,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ); */ AliMaterial(94, "SDD cone$",63.546, 29., 1.15, 1.265, 999); AliMedium(94,"SDD cone$",94,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ); /* Material with fractional Z not actually used AliMaterial(95, "SSD End ladder$", 32.0988, 15.4021, 0.68, 35.3238, 999); AliMedium(95,"SSD End ladder$",95,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ); */ AliMaterial(96, "SSD cone$",63.546, 29., 1.15, 1.265, 999); AliMedium(96,"SSD cone$",96,0,ifield,fieldm,tmaxfdServ,stemaxServ,deemaxServ,epsilServ,stminServ); } /* //______________________________________________________________________ void AliITSv11::InitAliITSgeom(){ // // Fill fITSgeom with the 3 sub-detector geometries // if (gGeoManager) gGeoManager->Export("geometry.root"); const Int_t knlayers = 6; const Int_t kndeep = 3; const AliITSDetector kidet[knlayers]={kSPD,kSPD,kSDD,kSDD,kSSD,kSSD}; const TString knames[knlayers] = { "AliITSv11:spd missing", // lay=1 "AliITSv11:spd missing", // lay=2 "/ALIC_1/ITSV_1/ITSsddLayer3_1/ITSsddLadd_%d/ITSsddSensor_%d/ITSsddWafer_%d", // lay=3 "/ALIC_1/ITSV_1/ITSsddLayer4_1/ITSsddLadd_%d/ITSsddSensor_%d/ITSsddWafer_%d", // lay=4 "AliITSv11:ssd missing", // lay=5 "AliITSv11:ssd missing" // lay=6 }; const Int_t kitsGeomTreeCopys[knlayers][kndeep]= {{10, 2, 4},// lay=1 {10, 4, 4}, // lay=2 {14, 6, 1}, // lay=3 {22, 8, 1}, // lay=4 {34,22, 1}, // lay=5 {38,25, 1}};// lay=6 Int_t nlad[knlayers],ndet[knlayers]; Int_t mod,lay,lad=0,det=0,i,j,k,cp0,cp1,cp2; TString path,shapeName; TGeoHMatrix materix; Double_t trans[3]={3*0.0},rot[10]={9*0.0,1.0}; TArrayD shapePar; TArrayF shapeParF; Bool_t shapeDefined[3]={kFALSE,kFALSE,kFALSE}; AliDebug(1,"Reading Geometry transformation directly from Modler."); mod = 0; for(i=0;iGetTransformation(path.Data(),materix); gMC->GetShape(path.Data(),shapeName,shapePar); shapeParF.Set(shapePar.GetSize()); for(i=0;iCreateMatrix(mod,lay,lad,det,kidet[lay-1],trans,rot); geom->SetTrans(mod,materix.GetTranslation()); geom->SetRotMatrix(mod,materix.GetRotationMatrix()); geom->GetGeomMatrix(mod)->SetPath(path.Data()); switch (lay){ case 1: case 2: if(!shapeDefined[kSPD]){ geom->ReSetShape(kSPD,new AliITSgeomSPD425Short( shapeParF.GetSize(),shapeParF.GetArray())); shapeDefined[kSPD] = kTRUE; }break; case 3: case 4: if(!shapeDefined[kSDD]){ geom->ReSetShape(kSDD,new AliITSgeomSDD256( shapeParF.GetSize(),shapeParF.GetArray())); shapeDefined[kSDD] = kTRUE; }break; case 5: case 6: if(!shapeDefined[kSSD]){ geom->ReSetShape(kSSD,new AliITSgeomSSD75and275( shapeParF.GetSize(),shapeParF.GetArray())); shapeDefined[kSSD] = kTRUE; }break; default:{ }break; } // end switch mod++; } /// end for cp2 } // end for cp1 } // end for cp0 } // end for lay // fSDDgeom->ExportSensorGeometry(GetITSgeom(), +3, 0); //SDD } */ //______________________________________________________________________ void AliITSv11::Init(){ // // Initialise the ITS after it has been created. // //AliInfo(Form("Minor version %d",fMinorVersion)); // UpdateInternalGeometry(); AliITS::Init(); if(fGeomDetOut) GetITSgeom()->WriteNewFile(fWrite); // /* if(fRead[0]=='\0') strncpy(fRead,fEuclidGeomDet,60); if(fWrite[0]=='\0') strncpy(fWrite,fEuclidGeomDet,60); if(GetITSgeom()!=0) SetITSgeom(0x0); AliITSgeom* geom = new AliITSgeom(); SetITSgeom(geom); if(fGeomDetIn) GetITSgeom()->ReadNewFile(fRead); else this->InitAliITSgeom(); if(fGeomDetOut) GetITSgeom()->WriteNewFile(fWrite); AliITS::Init(); */ // } // //______________________________________________________________________ // void AliITSv11::SetDefaults(){ // // // // Set response ans segmentation models for SPD, SDD and SSD // // // const Float_t kconv = 1.0e+04; // convert cm to microns // AliInfo("Called"); // if(!fDetTypeSim) fDetTypeSim = new AliITSDetTypeSim(); // fDetTypeSim->SetITSgeom(GetITSgeom()); // AliITSgeomSPD *s0; // AliITSgeomSDD *s1; // AliITSgeomSSD *s2; // Int_t i; // Float_t bx[256],bz[280]; // fDetTypeSim->ResetCalibrationArray(); // fDetTypeSim->ResetSegmentation(); // fDetTypeSim->SetDefaults(); // //SPD // s0 = (AliITSgeomSPD*) GetITSgeom()->GetShape(kSPD);// Get shape info. Do it this way for now. // AliITSsegmentationSPD* seg0 = (AliITSsegmentationSPD*)fDetTypeSim->GetSegmentationModel(0); // seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSPD // s0->GetDz()*2.*kconv, // for now. // s0->GetDy()*2.*kconv); // x,z,y full width in microns. // seg0->SetNPads(256,160);// Number of Bins in x and z // for(i=000;i<256;i++) bx[i] = 50.0; // in x all are 50 microns. // for(i=000;i<160;i++) bz[i] = 425.0; // most are 425 microns except below // for(i=160;i<280;i++) bz[i] = 0.0; // Outside of detector. // bz[ 31] = bz[ 32] = 625.0; // first chip boundry // bz[ 63] = bz[ 64] = 625.0; // first chip boundry // bz[ 95] = bz[ 96] = 625.0; // first chip boundry // bz[127] = bz[128] = 625.0; // first chip boundry // bz[160] = 425.0; // Set so that there is no zero pixel size for fNz. // seg0->SetBinSize(bx,bz); // Based on AliITSgeomSPD for now. // SetSegmentationModel(kSPD,seg0); // // set digit and raw cluster classes to be used // const char *kData0=(fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSPD()))->DataType(); // if (strstr(kData0,"real")) fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigit"); // else fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigitSPD"); // // SDD // s1 = (AliITSgeomSDD*) GetITSgeom()->GetShape(kSDD);// Get shape info. Do it this way for now. // AliITSsegmentationSDD* seg1 = (AliITSsegmentationSDD*)fDetTypeSim->GetSegmentationModel(1); // seg1->SetDetSize(s1->GetDx()*kconv, // base this on AliITSgeomSDD // s1->GetDz()*2.*kconv, // for now. // s1->GetDy()*2.*kconv); // x,z,y full width in microns. // seg1->SetNPads(256,256);// Use AliITSgeomSDD for now // SetSegmentationModel(kSDD,seg1); // const char *kData1=(fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSDD()))->DataType(); // AliITSCalibrationSDD* rsp = (AliITSCalibrationSDD*)fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSDD()); // const char *kopt=rsp->GetZeroSuppOption(); // if((!strstr(kopt,"2D")) && (!strstr(kopt,"1D")) || strstr(kData1,"real") ){ // fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigit"); // } else fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigitSDD"); // // SSD // s2 = (AliITSgeomSSD*) GetITSgeom()->GetShape(kSSD);// Get shape info. Do it this way for now. // AliITSsegmentationSSD* seg2 = (AliITSsegmentationSSD*)fDetTypeSim->GetSegmentationModel(2); // seg2->SetDetSize(s2->GetDx()*2.*kconv, // base this on AliITSgeomSSD // s2->GetDz()*2.*kconv, // for now. // s2->GetDy()*2.*kconv); // x,z,y full width in microns. // seg2->SetPadSize(95.,0.); // strip x pitch in microns // seg2->SetNPads(768,0); // number of strips on each side. // seg2->SetAngles(0.0075,0.0275); // strip angels rad P and N side. // seg2->SetAnglesLay5(0.0075,0.0275); // strip angels rad P and N side. // seg2->SetAnglesLay6(0.0275,0.0075); // strip angels rad P and N side. // SetSegmentationModel(kSSD,seg2); // const char *kData2=(fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSSD()))->DataType(); // if(strstr(kData2,"real") ) fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigit"); // else fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigitSSD"); // if(fgkNTYPES>3){ // Warning("SetDefaults", // "Only the four basic detector types are initialised!"); // }// end if // return; // } //______________________________________________________________________ void AliITSv11::SetDefaults(){ // // Set response and segmentation models for SPD, SDD and SSD // const Float_t kconv = 1.0e+04; // convert cm to microns AliInfo("Called"); // if(!fDetTypeSim) fDetTypeSim = new AliITSDetTypeSim(); // fDetTypeSim->SetITSgeom(GetITSgeom()); if(!fDetTypeSim) { Warning("SetDefaults","Error fDetTypeSim not defined"); return; } AliITSgeomSPD *s0; AliITSgeomSDD *s1; AliITSgeomSSD *s2; Int_t i; Float_t bx[256],bz[280]; fDetTypeSim->ResetCalibrationArray(); fDetTypeSim->ResetSegmentation(); fDetTypeSim->SetDefaults(); //SPD s0 = (AliITSgeomSPD*) GetITSgeom()->GetShape(kSPD);// Get shape info. Do it this way for now. AliITSsegmentationSPD* seg0 = (AliITSsegmentationSPD*)fDetTypeSim->GetSegmentationModel(0); seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSPD s0->GetDz()*2.*kconv, // for now. s0->GetDy()*2.*kconv); // x,z,y full width in microns. seg0->SetNPads(256,160);// Number of Bins in x and z for(i=000;i<256;i++) bx[i] = 50.0; // in x all are 50 microns. for(i=000;i<160;i++) bz[i] = 425.0; // most are 425 microns except below for(i=160;i<280;i++) bz[i] = 0.0; // Outside of detector. bz[ 31] = bz[ 32] = 625.0; // first chip boundry bz[ 63] = bz[ 64] = 625.0; // first chip boundry bz[ 95] = bz[ 96] = 625.0; // first chip boundry bz[127] = bz[128] = 625.0; // first chip boundry bz[160] = 425.0; // Set so that there is no zero pixel size for fNz. seg0->SetBinSize(bx,bz); // Based on AliITSgeomSPD for now. SetSegmentationModel(kSPD,seg0); // set digit and raw cluster classes to be used const char *kData0=(fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSPD()))->DataType(); if (strstr(kData0,"real")) fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigit"); else fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigitSPD"); // SDD s1 = (AliITSgeomSDD*) GetITSgeom()->GetShape(kSDD);// Get shape info. Do it this way for now. AliITSsegmentationSDD* seg1 = (AliITSsegmentationSDD*)fDetTypeSim->GetSegmentationModel(1); seg1->SetDetSize(s1->GetDx()*kconv, // base this on AliITSgeomSDD s1->GetDz()*2.*kconv, // for now. s1->GetDy()*2.*kconv); // x,z,y full width in microns. seg1->SetNPads(256,256);// Use AliITSgeomSDD for now SetSegmentationModel(kSDD,seg1); const char *kData1=(fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSDD()))->DataType(); AliITSCalibrationSDD* rsp = (AliITSCalibrationSDD*)fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSDD()); const char *kopt=rsp->GetZeroSuppOption(); if((!strstr(kopt,"2D")) && (!strstr(kopt,"1D")) || strstr(kData1,"real") ){ fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigit"); } else fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigitSDD"); // SSD s2 = (AliITSgeomSSD*) GetITSgeom()->GetShape(kSSD);// Get shape info. Do it this way for now. AliITSsegmentationSSD* seg2 = (AliITSsegmentationSSD*)fDetTypeSim->GetSegmentationModel(2); seg2->SetDetSize(s2->GetDx()*2.*kconv, // base this on AliITSgeomSSD s2->GetDz()*2.*kconv, // for now. s2->GetDy()*2.*kconv); // x,z,y full width in microns. seg2->SetPadSize(95.,0.); // strip x pitch in microns seg2->SetNPads(768,0); // number of strips on each side. seg2->SetAngles(0.0075,0.0275); // strip angels rad P and N side. seg2->SetAnglesLay5(0.0075,0.0275); // strip angels rad P and N side. seg2->SetAnglesLay6(0.0275,0.0075); // strip angels rad P and N side. SetSegmentationModel(kSSD,seg2); const char *kData2=(fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSSD()))->DataType(); if(strstr(kData2,"real") ) fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigit"); else fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigitSSD"); if(fgkNTYPES>3){ Warning("SetDefaults", "Only the four basic detector types are initialised!"); }// end if return; } //______________________________________________________________________ void AliITSv11::DrawModule() const{ } // //______________________________________________________________________ // void AliITSv11::StepManager(){ // // // // Called for every step in the ITS, then calles the AliITShit class // // creator with the information to be recoreded about that hit. // // // Int_t copy, id; // TLorentzVector position, momentum; // static TLorentzVector position0; // static Int_t stat0=0; // if(!(this->IsActive())){ // return; // } // end if !Active volume. // if(!(gMC->TrackCharge())) return; // id=gMC->CurrentVolID(copy); // Bool_t sensvol = kFALSE; // for(Int_t kk=0;kk<6;kk++)if(id == fIdSens[kk])sensvol=kTRUE; // if(sensvol && (gMC->IsTrackExiting())){ // copy = fTrackReferences->GetEntriesFast(); // TClonesArray &lTR = *fTrackReferences; // // Fill TrackReference structure with this new TrackReference. // new(lTR[copy]) AliTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber()); // } // if Outer ITS mother Volume // Int_t copy1,copy2; // Int_t vol[5]; // TClonesArray &lhits = *fHits; // // // // Track status // vol[3] = 0; // vol[4] = 0; // if(gMC->IsTrackInside()) vol[3] += 1; // if(gMC->IsTrackEntering()) vol[3] += 2; // if(gMC->IsTrackExiting()) vol[3] += 4; // if(gMC->IsTrackOut()) vol[3] += 8; // if(gMC->IsTrackDisappeared()) vol[3] += 16; // if(gMC->IsTrackStop()) vol[3] += 32; // if(gMC->IsTrackAlive()) vol[3] += 64; // // // // Fill hit structure. // if(!(gMC->TrackCharge())) return; // // // // Only entering charged tracks // if((id = gMC->CurrentVolID(copy)) == fIdSens[0]) { // vol[0] = 1; // id = gMC->CurrentVolOffID(2,copy); // //detector copy in the ladder = 1<->4 (ITS1 < I101 < I103 < I10A) // vol[1] = copy; // gMC->CurrentVolOffID(3,copy1); // //ladder copy in the module = 1<->2 (I10A < I12A) // gMC->CurrentVolOffID(4,copy2); // //module copy in the layer = 1<->10 (I12A < IT12) // vol[2] = copy1+(copy2-1)*2;//# of ladders in one module = 2 // } else if(id == fIdSens[1]){ // vol[0] = 2; // id = gMC->CurrentVolOffID(2,copy); // //detector copy in the ladder = 1<->4 (ITS2 < I1D1 < I1D3 < I20A) // vol[1] = copy; // gMC->CurrentVolOffID(3,copy1); // //ladder copy in the module = 1<->4 (I20A < I12A) // gMC->CurrentVolOffID(4,copy2); // //module copy in the layer = 1<->10 (I12A < IT12) // vol[2] = copy1+(copy2-1)*4;//# of ladders in one module = 4 // } else if(id == fIdSens[2]){ // vol[0] = 3; // id = gMC->CurrentVolOffID(1,copy); // //detector copy in the ladder = 1<->6 (ITS3 < I302 < I004) // vol[1] = copy; // id = gMC->CurrentVolOffID(2,copy); // //ladder copy in the layer = 1<->14 (I004 < IT34) // vol[2] = copy; // } else if(id == fIdSens[3]){ // vol[0] = 4; // id = gMC->CurrentVolOffID(1,copy); // //detector copy in the ladder = 1<->8 (ITS4 < I402 < I005) // vol[1] = copy; // id = gMC->CurrentVolOffID(2,copy); // //ladder copy in the layer = 1<->22 (I005 < IT34)) // vol[2] = copy; // }else if(id == fIdSens[4]){ // vol[0] = 5; // id = gMC->CurrentVolOffID(1,copy); // //detector copy in the ladder = 1<->22 (ITS5 < I562 < I565) // vol[1] = copy; // id = gMC->CurrentVolOffID(2,copy); // //ladder copy in the layer = 1<->34 (I565 < IT56) // vol[2] = copy; // }else if(id == fIdSens[5]){ // vol[0] = 6; // id = gMC->CurrentVolOffID(1,copy); // //detector copy in the ladder = 1<->25 (ITS6 < I566 < I569) // vol[1] = copy; // id = gMC->CurrentVolOffID(2,copy); // //ladder copy in the layer = 1<->38 (I569 < IT56) // vol[2] = copy; // } else { // return; // not an ITS volume? // } // end if/else if (gMC->CurentVolID(copy) == fIdSens[i]) // // // gMC->TrackPosition(position); // gMC->TrackMomentum(momentum); // vol[4] = stat0; // if(gMC->IsTrackEntering()){ // position0 = position; // stat0 = vol[3]; // return; // } // end if IsEntering // // Fill hit structure with this new hit. // new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, // gMC->Edep(),gMC->TrackTime(),position, // position0,momentum); // position0 = position; // stat0 = vol[3]; // return; // } //______________________________________________________________________ void AliITSv11::StepManager(){ // // Called for every step in the ITS, then calles the AliITShit class // creator with the information to be recoreded about that hit. // Int_t copy, id; TLorentzVector position, momentum; static TLorentzVector position0; static Int_t stat0=0; if(!(this->IsActive())){ return; } // end if !Active volume. if(!(gMC->TrackCharge())) return; id=gMC->CurrentVolID(copy); Bool_t sensvol = kFALSE; for(Int_t kk=0;kk<6;kk++)if(id == fIdSens[kk])sensvol=kTRUE; if(sensvol && (gMC->IsTrackExiting())){ AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kITS); } // if Outer ITS mother Volume Int_t copy1,copy2; Int_t vol[5]; TClonesArray &lhits = *fHits; // // Track status vol[3] = 0; vol[4] = 0; if(gMC->IsTrackInside()) vol[3] += 1; if(gMC->IsTrackEntering()) vol[3] += 2; if(gMC->IsTrackExiting()) vol[3] += 4; if(gMC->IsTrackOut()) vol[3] += 8; if(gMC->IsTrackDisappeared()) vol[3] += 16; if(gMC->IsTrackStop()) vol[3] += 32; if(gMC->IsTrackAlive()) vol[3] += 64; // // Fill hit structure. if(!(gMC->TrackCharge())) return; // Only entering charged tracks if((id = gMC->CurrentVolID(copy)) == fIdSens[0]) { vol[0] = 1; id = gMC->CurrentVolOffID(2,copy); //detector copy in the ladder = 1<->4 (ITS1 < I101 < I103 < I10A) vol[1] = copy; gMC->CurrentVolOffID(3,copy1); //ladder copy in the module = 1<->2 (I10A < I12A) gMC->CurrentVolOffID(4,copy2); //module copy in the layer = 1<->10 (I12A < IT12) vol[2] = copy1+(copy2-1)*2;//# of ladders in one module = 2 } else if(id == fIdSens[1]){ vol[0] = 2; id = gMC->CurrentVolOffID(2,copy); //detector copy in the ladder = 1<->4 (ITS2 < I1D1 < I1D3 < I20A) vol[1] = copy; gMC->CurrentVolOffID(3,copy1); //ladder copy in the module = 1<->4 (I20A < I12A) gMC->CurrentVolOffID(4,copy2); //module copy in the layer = 1<->10 (I12A < IT12) vol[2] = copy1+(copy2-1)*4;//# of ladders in one module = 4 } else if(id == fIdSens[2]){ vol[0] = 3; id = gMC->CurrentVolOffID(1,copy); //detector copy in the ladder = 1<->6 (ITS3 < I302 < I004) vol[1] = copy; id = gMC->CurrentVolOffID(2,copy); //ladder copy in the layer = 1<->14 (I004 < IT34) vol[2] = copy; } else if(id == fIdSens[3]){ vol[0] = 4; id = gMC->CurrentVolOffID(1,copy); //detector copy in the ladder = 1<->8 (ITS4 < I402 < I005) vol[1] = copy; id = gMC->CurrentVolOffID(2,copy); //ladder copy in the layer = 1<->22 (I005 < IT34)) vol[2] = copy; }else if(id == fIdSens[4]){ vol[0] = 5; id = gMC->CurrentVolOffID(1,copy); //detector copy in the ladder = 1<->22 (ITS5 < I562 < I565) vol[1] = copy; id = gMC->CurrentVolOffID(2,copy); //ladder copy in the layer = 1<->34 (I565 < IT56) vol[2] = copy; }else if(id == fIdSens[5]){ vol[0] = 6; id = gMC->CurrentVolOffID(1,copy); //detector copy in the ladder = 1<->25 (ITS6 < I566 < I569) vol[1] = copy; id = gMC->CurrentVolOffID(2,copy); //ladder copy in the layer = 1<->38 (I569 < IT56) vol[2] = copy; } else { return; // not an ITS volume? } // end if/else if (gMC->CurentVolID(copy) == fIdSens[i]) // gMC->TrackPosition(position); gMC->TrackMomentum(momentum); vol[4] = stat0; if(gMC->IsTrackEntering()){ position0 = position; stat0 = vol[3]; return; } // end if IsEntering // Fill hit structure with this new hit. new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, gMC->Edep(),gMC->TrackTime(),position, position0,momentum); position0 = position; stat0 = vol[3]; return; }