X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSvPPRcoarseasymm.cxx;h=8befa6e4c7e542388acbf3de1824fb525b458dbc;hb=dbfc6ce6e56ae74acb26b7f1e211cf0d1a73d0ab;hp=1d23c17e6d0add1cd5a2f871ac4fd794c03627b1;hpb=642f15cfce9ebda2ff71a55c5edb8d9bc0c729c4;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSvPPRcoarseasymm.cxx b/ITS/AliITSvPPRcoarseasymm.cxx index 1d23c17e6d0..8befa6e4c7e 100644 --- a/ITS/AliITSvPPRcoarseasymm.cxx +++ b/ITS/AliITSvPPRcoarseasymm.cxx @@ -39,7 +39,7 @@ #include #include #include - +#include #include "AliMagF.h" #include "AliConst.h" @@ -51,7 +51,13 @@ ClassImp(AliITSvPPRcoarseasymm) //_____________________________________________________________________________ -AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm() { +AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm(): +AliITS(), +fMajorVersion(IsVersion()), +fMinorVersion(0), +fRails(0), +fSuppMat(0), +fIgm(kvPPRcourseasymm) { //////////////////////////////////////////////////////////////////////// // Standard default constructor for the ITS version 6. //////////////////////////////////////////////////////////////////////// @@ -59,11 +65,15 @@ AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm() { fIdN = 0; fIdName = 0; fIdSens = 0; - fMajorVersion = 9; - fMinorVersion = 0; } //_____________________________________________________________________________ -AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm(const char *name, const char *title) : AliITS(name, title){ +AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm(const char *name, const char *title) : +AliITS(name, title), +fMajorVersion(IsVersion()), +fMinorVersion(0), +fRails(0), +fSuppMat(0), +fIgm(kvPPRcourseasymm) { //////////////////////////////////////////////////////////////////////// // Standard constructor for the ITS version 6. //////////////////////////////////////////////////////////////////////// @@ -78,26 +88,6 @@ AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm(const char *name, const char *title fIdName[5] = "ITS6"; fIdSens = new Int_t[fIdN]; for (Int_t i=0;i rails in; 0 --> rails out) - Int_t suppmat = 0; // flag to change the material of the services - // supports (=0 copper, =1 aluminum, =2 carbon) - rails = GetRails(); - - if(rails != 0 && rails != 1) { - cout << "ITS - WARNING: the switch for rails is not set neither to 0 (rails out) nor to 1 (rails in)." - " The default value of 1 (rails in) will be used." << endl; - } - - if (rails == 0 ) { - cout << "ITS: Rails are out." << endl; - } else { - cout << "ITS: Rails are in." << endl; - } - - suppmat = GetSupportMaterial(); - - if (suppmat != 0 && suppmat != 1 && suppmat != 2) { - cout << "ITS - WARNING: the flag for the material of services supports is not set neither to 0 (copper) nor to 1 (aluminum) nor to 2 (carbon)." - " The default value of 0 (copper) will be used." << endl; - } - - if (suppmat == 0) { - cout << "ITS: The material of the services supports is copper." << endl; - } else if (suppmat == 1){ - cout << "ITS: The material of the services supports is aluminum." << endl; - } else { - cout << "ITS: The material of the services supports is carbon." << endl; - } + Float_t dits[3], rlim, zmax; + Float_t zpos; + Float_t pcits[100], ztpc; + Int_t idrotm[1999], i; + Float_t dgh[100]; + + Int_t rails = 1; // flag for rails (1 --> rails in; 0 --> rails out) + Int_t suppmat = 0; // flag to change the material of the services + // supports (=0 copper, =1 aluminum, =2 carbon) + // These constant character strings are set by cvs during commit + // do not change them unless you know what you are doing! + const Char_t *cvsDate="$Date$"; + const Char_t *cvsRevision="$Revision$"; + rails = GetRails(); + + if(rails != 0 && rails != 1) { + cout << "ITS - WARNING: the switch for rails is not set " + "neither to 0 (rails out) nor to 1 (rails in)." + " The default value of 1 (rails in) will be used." << endl; + } // end if + + if (rails == 0 ) { + cout << "ITS: Rails are out." << endl; + } else { + cout << "ITS: Rails are in." << endl; + } // end if + suppmat = GetSupportMaterial(); + + if (suppmat != 0 && suppmat != 1 && suppmat != 2) { + cout << "ITS - WARNING: the flag for the material of " + "services supports is not set neither to 0 (copper) " + "nor to 1 (aluminum) nor to 2 (carbon)." + " The default value of 0 (copper) will be used." << endl; + } // end if + + if (suppmat == 0) { + cout << "ITS: The material of the services supports is copper." + << endl; + } else if (suppmat == 1){ + cout << "ITS: The material of the services supports is aluminum." + << endl; + } else { + cout << "ITS: The material of the services supports is carbon." + << endl; + } // end if - Int_t *idtmed = fIdtmed->GetArray()-199; + Int_t *idtmed = fIdtmed->GetArray()-199; - // CONVERT INTO CM (RL(SI)=9.36 CM) - for (i = 0; i < 6; ++i) { - drl[i] = drl[i] / 100. * 9.36; - } + // CONVERT INTO CM (RL(SI)=9.36 CM) + for (i = 0; i < 6; ++i) { + drl[i] = drl[i] / 100. * 9.36; + } // end if - // FIELD CAGE HALF LENGTH - - rlim = 50.; - zmax = 74.; - ztpc = 284.; - - // --- Define ghost volume containing the whole ITS (including services) - // and fill it with air - - dgh[0] = 0.; - dgh[1] = 360.; - dgh[2] = 16.; - dgh[3] = -ztpc-5.-0.1; - dgh[4] = 46; - dgh[5] = 85.; - dgh[6] = -ztpc; - dgh[7] = 46; - dgh[8] = 85.; - dgh[9] = -ztpc; - dgh[10] = 46; - dgh[11] = rlim+6; - dgh[12] = -97.5; - dgh[13] = 46; - dgh[14] = rlim+6; - dgh[15] = -zmax; - dgh[16] = 46; - dgh[17] = rlim+6; - dgh[18] = -48; - dgh[19] = 6; - dgh[20] = rlim+6; - dgh[21] = -28.6; - dgh[22] = 6; - dgh[23] = rlim+6; - dgh[24] = -27.6; - dgh[25] = 3.295; - dgh[26] = rlim+6; - dgh[27] = 27.6; - dgh[28] = 3.295; - dgh[29] = rlim+6; - dgh[30] = 28.6; - dgh[31] = 6; - dgh[32] = rlim+6; - dgh[33] = 48; - dgh[34] = 6; - dgh[35] = rlim+6; - dgh[36] = zmax; - dgh[37] = 46; - dgh[38] = rlim+6; - dgh[39] = 97.5; - dgh[40] = 46; - dgh[41] = rlim+6; - dgh[42] = ztpc; - dgh[43] = 62; - dgh[44] = 62+4.; - dgh[45] = ztpc; - dgh[46] = 62; - dgh[47] = 85.; - dgh[48] = ztpc+4.+0.1; - dgh[49] = 62.4; - dgh[50] = 85.; - gMC->Gsvolu("ITSV", "PCON", idtmed[275], dgh, 51); - - // --- Place the ghost volume in its mother volume (ALIC) and make it - // invisible - - gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY"); - //gMC->Gsatt("ITSV", "SEEN", 0); + // FIELD CAGE HALF LENGTH + + rlim = 50.; + zmax = 74.; + ztpc = 284.; + + // --- Define ghost volume containing the whole ITS (including services) + // and fill it with air + /* + dgh[0] = 0.; + dgh[1] = 360.; + dgh[2] = 16.; + dgh[3] = -ztpc-5.-0.1; + dgh[4] = 46; + dgh[5] = 85.; + dgh[6] = -ztpc; + dgh[7] = 46; + dgh[8] = 85.; + dgh[9] = -ztpc; + dgh[10] = 46; + dgh[11] = rlim+6; + dgh[12] = -97.5; + dgh[13] = 46; + dgh[14] = rlim+6; + dgh[15] = -zmax; + dgh[16] = 46; + dgh[17] = rlim+6; + dgh[18] = -48; + dgh[19] = 6; + dgh[20] = rlim+6; + dgh[21] = -28.6; + dgh[22] = 6; + dgh[23] = rlim+6; + dgh[24] = -27.6; + dgh[25] = 3.295; + dgh[26] = rlim+6; + dgh[27] = 27.6; + dgh[28] = 3.295; + dgh[29] = rlim+6; + dgh[30] = 28.6; + dgh[31] = 6; + dgh[32] = rlim+6; + dgh[33] = 48; + dgh[34] = 6; + dgh[35] = rlim+6; + dgh[36] = zmax; + dgh[37] = 46; + dgh[38] = rlim+6; + dgh[39] = 97.5; + dgh[40] = 46; + dgh[41] = rlim+6; + dgh[42] = ztpc; + dgh[43] = 62; + dgh[44] = 62+4.; + dgh[45] = ztpc; + dgh[46] = 62; + dgh[47] = 85.; + dgh[48] = ztpc+4.+0.1; + dgh[49] = 62.4; + dgh[50] = 85.; + gMC->Gsvolu("ITSV", "PCON", idtmed[275], dgh, 51); + + // --- Place the ghost volume in its mother volume (ALIC) and make it + // invisible + + gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY"); + //gMC->Gsatt("ITSV", "SEEN", 0); + */ + TGeoVolumeAssembly *itsV = gGeoManager->MakeVolumeAssembly("ITSV"); + const Int_t length=100; + Char_t vstrng[length]; + if(fIgm.WriteVersionString(vstrng,length,(AliITSVersion_t)IsVersion(), + fMinorVersion,cvsDate,cvsRevision)) + itsV->SetTitle(vstrng); + TGeoVolume *alic = gGeoManager->GetVolume("ALIC"); + if(alic==0) { + Error("CreateGeometry","alic=0"); + return; + } // end if + // See idrotm[199] for angle definitions. + //alic->AddNode(itsV,1,new TGeoRotation("", 90.,180., 90.,90., 180.,0.)); + alic->AddNode(itsV,1,0); - // --- Define ghost volume containing the six layers and fill it with air + // --- Define ghost volume containing the six layers and fill it with air dgh[0] = 0.; dgh[1] = 360.; @@ -892,7 +906,7 @@ void AliITSvPPRcoarseasymm::CreateMaterials(){ // Monte Carlo simulations for the geometries AliITSv1, AliITSv3, // AliITSvPPRcoarseasymm. // In general it is automatically replaced by - // the CreatMaterials routine defined in AliITSv?. Should the function + // the CreateMaterials routine defined in AliITSv?. Should the function // CreateMaterials not exist for the geometry version you are using this // one is used. See the definition found in AliITSv5 or the other routine // for a complete definition. @@ -1122,7 +1136,7 @@ void AliITSvPPRcoarseasymm::Init(){ } //_____________________________________________________________________________ -void AliITSvPPRcoarseasymm::DrawModule(){ +void AliITSvPPRcoarseasymm::DrawModule() const { //////////////////////////////////////////////////////////////////////// // Draw a shaded view of the FMD version 6. //////////////////////////////////////////////////////////////////////// @@ -1245,7 +1259,7 @@ void AliITSvPPRcoarseasymm::StepManager(){ hits[5]=momentum[2]; hits[6]=gMC->Edep(); hits[7]=gMC->TrackTime(); -// new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->GetCurrentTrackNumber(),vol,hits); +// new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol,hits); // // no hits for this coarse asymmetric version. //