- // GPS2 = 5 modules (EMC + PPSD)
- // We use 2 arrays of hits :
- //
- // - fHits (the "normal" one), which retains the hits associated with
- // the current primary particle being tracked
- // (this array is reset after each primary has been tracked).
- //
- // - fTmpHits, which retains all the hits of the current event. It
- // is used for the digitization part.
-
- fPinElectronicNoise = 0.010 ;
- fDigitThreshold = 1. ; // 1 GeV
-
- // We do not want to save in TreeH the raw hits
- // fHits = new TClonesArray("AliPHOSHit",100) ;
- // gAlice->AddHitList(fHits) ;
-
- // But save the cumulated hits instead (need to create the branch myself)
- // It is put in the Digit Tree because the TreeH is filled after each primary
- // and the TreeD at the end of the event (branch is set in FinishEvent() ).
-
- fTmpHits= new TClonesArray("AliPHOSHit",100) ;
-
- fNTmpHits = fNhits = 0 ;
-
- fDigits = new TClonesArray("AliPHOSDigit",100) ;
-
-
- fIshunt = 1 ; // All hits are associated with primary particles
-
- // gets an instance of the geometry parameters class
-
- fGeom = AliPHOSGeometry::GetInstance(title, "") ;
-
- if (fGeom->IsInitialized() )
- cout << "AliPHOSv0 : PHOS geometry intialized for " << fGeom->GetName() << endl ;
- else
- cout << "AliPHOSv0 : PHOS geometry initialization failed !" << endl ;
-}
-
-//____________________________________________________________________________
-AliPHOSv0::AliPHOSv0(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title):
- AliPHOS(name,title)
-{
- // ctor : title is used to identify the layout
- // GPS2 = 5 modules (EMC + PPSD)
- // We use 2 arrays of hits :
- //
- // - fHits (the "normal" one), which retains the hits associated with
- // the current primary particle being tracked
- // (this array is reset after each primary has been tracked).
- //
- // - fTmpHits, which retains all the hits of the current event. It
- // is used for the digitization part.
-
- fPinElectronicNoise = 0.010 ;
-
- // We do not want to save in TreeH the raw hits
- //fHits = new TClonesArray("AliPHOSHit",100) ;
-
- fDigits = new TClonesArray("AliPHOSDigit",100) ;
- fTmpHits= new TClonesArray("AliPHOSHit",100) ;
-
- fNTmpHits = fNhits = 0 ;
-
- fIshunt = 1 ; // All hits are associated with primary particles
-
- // gets an instance of the geometry parameters class
- fGeom = AliPHOSGeometry::GetInstance(title, "") ;
-
- if (fGeom->IsInitialized() )
- cout << "AliPHOSv0 : PHOS geometry intialized for " << fGeom->GetName() << endl ;
- else
- cout << "AliPHOSv0 : PHOS geometry initialization failed !" << endl ;
-
- // Defining the PHOS Reconstructioner
-
- fReconstructioner = Reconstructioner ;
-}
-
-//____________________________________________________________________________
-AliPHOSv0::~AliPHOSv0()
-{
- // dtor
-
- if ( fTmpHits) {
- fTmpHits->Delete() ;
- delete fTmpHits ;
- fTmpHits = 0 ;
- }
-
- if ( fEmcRecPoints ) {
- fEmcRecPoints->Delete() ;
- delete fEmcRecPoints ;
- fEmcRecPoints = 0 ;
- }
-
- if ( fPpsdRecPoints ) {
- fPpsdRecPoints->Delete() ;
- delete fPpsdRecPoints ;
- fPpsdRecPoints = 0 ;
- }
-
- if ( fTrackSegments ) {
- fTrackSegments->Delete() ;
- delete fTrackSegments ;
- fTrackSegments = 0 ;
- }
-
-}
-
-//____________________________________________________________________________
-void AliPHOSv0::AddHit(Int_t primary, Int_t Id, Float_t * hits)
-{
- // Add a hit to the hit list.
- // A PHOS hit is the sum of all hits in a single crystal
- // or in a single PPSD gas cell
-
- Int_t hitCounter ;
- TClonesArray <mphits = *fTmpHits ;
- AliPHOSHit *newHit ;
- AliPHOSHit *curHit ;
- // AliPHOSHit *curHit2 ;
- Bool_t deja = kFALSE ;
-
- // In any case, fills the fTmpHit TClonesArray (with "accumulated hits")
-
- newHit = new AliPHOSHit(primary, Id, hits) ;
-
- // We do not want to save in TreeH the raw hits
- // TClonesArray &lhits = *fHits;
-
- for ( hitCounter = 0 ; hitCounter < fNTmpHits && !deja ; hitCounter++ ) {
- curHit = (AliPHOSHit*) ltmphits[hitCounter] ;
- if( *curHit == *newHit ) {
- *curHit = *curHit + *newHit ;
- deja = kTRUE ;
- }
- }
-
- if ( !deja ) {
- new(ltmphits[fNTmpHits]) AliPHOSHit(*newHit) ;
- fNTmpHits++ ;
- }
-
- // We do not want to save in TreeH the raw hits
- // new(lhits[fNhits]) AliPHOSHit(*newHit) ;
- // fNhits++ ;
-
- // Please note that the fTmpHits array must survive up to the
- // end of the events, so it does not appear e.g. in ResetHits() (
- // which is called at the end of each primary).
-
- delete newHit;
-
-}
-
-
-//____________________________________________________________________________
-void AliPHOSv0::BuildGeometry()
-{
- // Build the PHOS geometry for the ROOT display
- //BEGIN_HTML
- /*
- <H2>
- PHOS in ALICE displayed by root
- </H2>
- <UL>
- <LI> All Views
- <P>
- <CENTER>
- <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif">
- </CENTER></P></LI>
- <LI> Front View
- <P>
- <CENTER>
- <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif">
- </CENTER></P></LI>
- <LI> 3D View 1
- <P>
- <CENTER>
- <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif">
- </CENTER></P></LI>
- <LI> 3D View 2
- <P>
- <CENTER>
- <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif">
- </CENTER></P></LI>
- </UL>
- */
- //END_HTML
-
- this->BuildGeometryforPHOS() ;
- if ( ( strcmp(fGeom->GetName(), "GPS2" ) == 0 ) )
- this->BuildGeometryforPPSD() ;
- else
- cout << "AliPHOSv0::BuildGeometry : no charged particle identification system installed" << endl;
-
-}
-
-//____________________________________________________________________________
-void AliPHOSv0:: BuildGeometryforPHOS(void)
-{
- // Build the PHOS-EMC geometry for the ROOT display
-
- const Int_t kColorPHOS = kRed ;
- const Int_t kColorXTAL = kBlue ;
-
- Double_t const kRADDEG = 180.0 / kPI ;
-
- new TBRIK( "OuterBox", "PHOS box", "void", fGeom->GetOuterBoxSize(0)/2,
- fGeom->GetOuterBoxSize(1)/2,
- fGeom->GetOuterBoxSize(2)/2 );
-
- // Textolit Wall box, position inside PHOS
-
- new TBRIK( "TextolitBox", "PHOS Textolit box ", "void", fGeom->GetTextolitBoxSize(0)/2,
- fGeom->GetTextolitBoxSize(1)/2,
- fGeom->GetTextolitBoxSize(2)/2);
-
- // Polystyrene Foam Plate
-
- new TBRIK( "UpperFoamPlate", "PHOS Upper foam plate", "void", fGeom->GetTextolitBoxSize(0)/2,
- fGeom->GetSecondUpperPlateThickness()/2,
- fGeom->GetTextolitBoxSize(2)/2 ) ;
-
- // Air Filled Box
-
- new TBRIK( "AirFilledBox", "PHOS air filled box", "void", fGeom->GetAirFilledBoxSize(0)/2,
- fGeom->GetAirFilledBoxSize(1)/2,
- fGeom->GetAirFilledBoxSize(2)/2 );
-
- // Crystals Box
-
- Float_t xtlX = fGeom->GetCrystalSize(0) ;
- Float_t xtlY = fGeom->GetCrystalSize(1) ;
- Float_t xtlZ = fGeom->GetCrystalSize(2) ;
-
- Float_t xl = fGeom->GetNPhi() * ( xtlX + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ;
- Float_t yl = ( xtlY + fGeom->GetCrystalSupportHeight() + fGeom->GetCrystalWrapThickness() + fGeom->GetCrystalHolderThickness() ) / 2.0
- + fGeom->GetModuleBoxThickness() / 2.0 ;
- Float_t zl = fGeom->GetNZ() * ( xtlZ + 2 * fGeom->GetGapBetweenCrystals() ) / 2.0 + fGeom->GetModuleBoxThickness() ;
-
- new TBRIK( "CrystalsBox", "PHOS crystals box", "void", xl, yl, zl ) ;
-
-// position PHOS into ALICE
-
- Float_t r = fGeom->GetIPtoOuterCoverDistance() + fGeom->GetOuterBoxSize(1) / 2.0 ;
- Int_t number = 988 ;
- Float_t pphi = TMath::ATan( fGeom->GetOuterBoxSize(0) / ( 2.0 * fGeom->GetIPtoOuterCoverDistance() ) ) ;
- pphi *= kRADDEG ;
- TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
-
- char * nodename = new char[20] ;
- char * rotname = new char[20] ;
-
- for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) {
- Float_t angle = pphi * 2 * ( i - fGeom->GetNModules() / 2.0 - 0.5 ) ;
- sprintf(rotname, "%s%d", "rot", number++) ;
- new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
- top->cd();
- sprintf(nodename,"%s%d", "Module", i) ;
- Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
- Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
- TNode * outerboxnode = new TNode(nodename, nodename, "OuterBox", x, y, 0, rotname ) ;
- outerboxnode->SetLineColor(kColorPHOS) ;
- fNodes->Add(outerboxnode) ;
- outerboxnode->cd() ;
- // now inside the outer box the textolit box
- y = ( fGeom->GetOuterBoxThickness(1) - fGeom->GetUpperPlateThickness() ) / 2. ;
- sprintf(nodename,"%s%d", "TexBox", i) ;
- TNode * textolitboxnode = new TNode(nodename, nodename, "TextolitBox", 0, y, 0) ;
- textolitboxnode->SetLineColor(kColorPHOS) ;
- fNodes->Add(textolitboxnode) ;
- // upper foam plate inside outre box
- outerboxnode->cd() ;
- sprintf(nodename, "%s%d", "UFPlate", i) ;
- y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetSecondUpperPlateThickness() ) / 2.0 ;
- TNode * upperfoamplatenode = new TNode(nodename, nodename, "UpperFoamPlate", 0, y, 0) ;
- upperfoamplatenode->SetLineColor(kColorPHOS) ;
- fNodes->Add(upperfoamplatenode) ;
- // air filled box inside textolit box (not drawn)
- textolitboxnode->cd();
- y = ( fGeom->GetTextolitBoxSize(1) - fGeom->GetAirFilledBoxSize(1) ) / 2.0 - fGeom->GetSecondUpperPlateThickness() ;
- sprintf(nodename, "%s%d", "AFBox", i) ;
- TNode * airfilledboxnode = new TNode(nodename, nodename, "AirFilledBox", 0, y, 0) ;
- fNodes->Add(airfilledboxnode) ;
- // crystals box inside air filled box
- airfilledboxnode->cd() ;
- y = fGeom->GetAirFilledBoxSize(1) / 2.0 - yl
- - ( fGeom->GetIPtoCrystalSurface() - fGeom->GetIPtoOuterCoverDistance() - fGeom->GetModuleBoxThickness()
- - fGeom->GetUpperPlateThickness() - fGeom->GetSecondUpperPlateThickness() ) ;
- sprintf(nodename, "%s%d", "XTBox", i) ;
- TNode * crystalsboxnode = new TNode(nodename, nodename, "CrystalsBox", 0, y, 0) ;
- crystalsboxnode->SetLineColor(kColorXTAL) ;
- fNodes->Add(crystalsboxnode) ;
- }
-}
-
-//____________________________________________________________________________
-void AliPHOSv0:: BuildGeometryforPPSD(void)
-{
- // Build the PHOS-PPSD geometry for the ROOT display
- //BEGIN_HTML
- /*
- <H2>
- PPSD displayed by root
- </H2>
- <UL>
- <LI> Zoom on PPSD: Front View
- <P>
- <CENTER>
- <IMG Align=BOTTOM ALT="PPSD Front View" SRC="../images/AliPHOSv0PPSDFrontView.gif">
- </CENTER></P></LI>
- <LI> Zoom on PPSD: Perspective View
- <P>
- <CENTER>
- <IMG Align=BOTTOM ALT="PPSD Prespective View" SRC="../images/AliPHOSv0PPSDPerspectiveView.gif">
- </CENTER></P></LI>
- </UL>
- */
- //END_HTML
- Double_t const kRADDEG = 180.0 / kPI ;
-
- const Int_t kColorPHOS = kRed ;
- const Int_t kColorPPSD = kGreen ;
- const Int_t kColorGas = kBlue ;
- const Int_t kColorAir = kYellow ;
-
- // Box for a full PHOS module
-
- new TBRIK( "PPSDBox", "PPSD box", "void", fGeom->GetPPSDBoxSize(0)/2,
- fGeom->GetPPSDBoxSize(1)/2,
- fGeom->GetPPSDBoxSize(2)/2 );
-
- // Box containing one micromegas module
-
- new TBRIK( "PPSDModule", "PPSD module", "void", fGeom->GetPPSDModuleSize(0)/2,
- fGeom->GetPPSDModuleSize(1)/2,
- fGeom->GetPPSDModuleSize(2)/2 );
- // top lid
-
- new TBRIK ( "TopLid", "Micromegas top lid", "void", fGeom->GetPPSDModuleSize(0)/2,
- fGeom->GetLidThickness()/2,
- fGeom->GetPPSDModuleSize(2)/2 ) ;
- // composite panel (top and bottom)
-
- new TBRIK ( "TopPanel", "Composite top panel", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
- fGeom->GetCompositeThickness()/2,
- ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
-
- new TBRIK ( "BottomPanel", "Composite bottom panel", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
- fGeom->GetCompositeThickness()/2,
- ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
- // gas gap (conversion and avalanche)
-
- new TBRIK ( "GasGap", "gas gap", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
- ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() )/2,
- ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
-
- // anode and cathode
-
- new TBRIK ( "Anode", "Anode", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
- fGeom->GetAnodeThickness()/2,
- ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
-
- new TBRIK ( "Cathode", "Cathode", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
- fGeom->GetCathodeThickness()/2,
- ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
- // PC
-
- new TBRIK ( "PCBoard", "Printed Circuit", "void", ( fGeom->GetPPSDModuleSize(0) - fGeom->GetMicromegasWallThickness() )/2,
- fGeom->GetPCThickness()/2,
- ( fGeom->GetPPSDModuleSize(2) - fGeom->GetMicromegasWallThickness() )/2 ) ;
- // Gap between Lead and top micromegas
-
- new TBRIK ( "LeadToM", "Air Gap top", "void", fGeom->GetPPSDBoxSize(0)/2,
- fGeom->GetMicro1ToLeadGap()/2,
- fGeom->GetPPSDBoxSize(2)/2 ) ;
-
-// Gap between Lead and bottom micromegas
-
- new TBRIK ( "MToLead", "Air Gap bottom", "void", fGeom->GetPPSDBoxSize(0)/2,
- fGeom->GetLeadToMicro2Gap()/2,
- fGeom->GetPPSDBoxSize(2)/2 ) ;
- // Lead converter
-
- new TBRIK ( "Lead", "Lead converter", "void", fGeom->GetPPSDBoxSize(0)/2,
- fGeom->GetLeadConverterThickness()/2,
- fGeom->GetPPSDBoxSize(2)/2 ) ;
-
- // position PPSD into ALICE
-
- char * nodename = new char[20] ;
- char * rotname = new char[20] ;
-
- Float_t r = fGeom->GetIPtoTopLidDistance() + fGeom->GetPPSDBoxSize(1) / 2.0 ;
- Int_t number = 988 ;
- TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
-
- for( Int_t i = 1; i <= fGeom->GetNModules(); i++ ) { // the number of PHOS modules
- Float_t angle = fGeom->GetPHOSAngle(i) ;
- sprintf(rotname, "%s%d", "rotg", number++) ;
- new TRotMatrix(rotname, rotname, 90, angle, 90, 90 + angle, 0, 0);
- top->cd();
- sprintf(nodename, "%s%d", "Moduleg", i) ;
- Float_t x = r * TMath::Sin( angle / kRADDEG ) ;
- Float_t y = -r * TMath::Cos( angle / kRADDEG ) ;
- TNode * ppsdboxnode = new TNode(nodename , nodename ,"PPSDBox", x, y, 0, rotname ) ;
- ppsdboxnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(ppsdboxnode) ;
- ppsdboxnode->cd() ;
- // inside the PPSD box:
- // 1. fNumberOfModulesPhi x fNumberOfModulesZ top micromegas
- x = ( fGeom->GetPPSDBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. ;
- {
- for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) { // the number of micromegas modules in phi per PHOS module
- Float_t z = ( fGeom->GetPPSDBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. ;
- TNode * micro1node ;
- for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) { // the number of micromegas modules in z per PHOS module
- y = ( fGeom->GetPPSDBoxSize(1) - fGeom->GetMicromegas1Thickness() ) / 2. ;
- sprintf(nodename, "%s%d%d%d", "Mic1", i, iphi, iz) ;
- micro1node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ;
- micro1node->SetLineColor(kColorPPSD) ;
- fNodes->Add(micro1node) ;
- // inside top micromegas
- micro1node->cd() ;
- // a. top lid
- y = ( fGeom->GetMicromegas1Thickness() - fGeom->GetLidThickness() ) / 2. ;
- sprintf(nodename, "%s%d%d%d", "Lid", i, iphi, iz) ;
- TNode * toplidnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ;
- toplidnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(toplidnode) ;
- // b. composite panel
- y = y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ;
- sprintf(nodename, "%s%d%d%d", "CompU", i, iphi, iz) ;
- TNode * compupnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ;
- compupnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(compupnode) ;
- // c. anode
- y = y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ;
- sprintf(nodename, "%s%d%d%d", "Ano", i, iphi, iz) ;
- TNode * anodenode = new TNode(nodename, nodename, "Anode", 0, y, 0) ;
- anodenode->SetLineColor(kColorPHOS) ;
- fNodes->Add(anodenode) ;
- // d. gas
- y = y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ;
- sprintf(nodename, "%s%d%d%d", "GGap", i, iphi, iz) ;
- TNode * ggapnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ;
- ggapnode->SetLineColor(kColorGas) ;
- fNodes->Add(ggapnode) ;
- // f. cathode
- y = y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ;
- sprintf(nodename, "%s%d%d%d", "Cathode", i, iphi, iz) ;
- TNode * cathodenode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ;
- cathodenode->SetLineColor(kColorPHOS) ;
- fNodes->Add(cathodenode) ;
- // g. printed circuit
- y = y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ;
- sprintf(nodename, "%s%d%d%d", "PC", i, iphi, iz) ;
- TNode * pcnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ;
- pcnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(pcnode) ;
- // h. composite panel
- y = y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ;
- sprintf(nodename, "%s%d%d%d", "CompDown", i, iphi, iz) ;
- TNode * compdownnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ;
- compdownnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(compdownnode) ;
- z = z - fGeom->GetPPSDModuleSize(2) ;
- ppsdboxnode->cd() ;
- } // end of Z module loop
- x = x - fGeom->GetPPSDModuleSize(0) ;
- ppsdboxnode->cd() ;
- } // end of phi module loop
- }
- // 2. air gap
- ppsdboxnode->cd() ;
- y = ( fGeom->GetPPSDBoxSize(1) - 2 * fGeom->GetMicromegas1Thickness() - fGeom->GetMicro1ToLeadGap() ) / 2. ;
- sprintf(nodename, "%s%d", "GapUp", i) ;
- TNode * gapupnode = new TNode(nodename, nodename, "LeadToM", 0, y, 0) ;
- gapupnode->SetLineColor(kColorAir) ;
- fNodes->Add(gapupnode) ;
- // 3. lead converter
- y = y - fGeom->GetMicro1ToLeadGap() / 2. - fGeom->GetLeadConverterThickness() / 2. ;
- sprintf(nodename, "%s%d", "LeadC", i) ;
- TNode * leadcnode = new TNode(nodename, nodename, "Lead", 0, y, 0) ;
- leadcnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(leadcnode) ;
- // 4. air gap
- y = y - fGeom->GetLeadConverterThickness() / 2. - fGeom->GetLeadToMicro2Gap() / 2. ;
- sprintf(nodename, "%s%d", "GapDown", i) ;
- TNode * gapdownnode = new TNode(nodename, nodename, "MToLead", 0, y, 0) ;
- gapdownnode->SetLineColor(kColorAir) ;
- fNodes->Add(gapdownnode) ;
- // 5. fNumberOfModulesPhi x fNumberOfModulesZ bottom micromegas
- x = ( fGeom->GetPPSDBoxSize(0) - fGeom->GetPPSDModuleSize(0) ) / 2. - fGeom->GetPhiDisplacement() ;
- {
- for ( Int_t iphi = 1; iphi <= fGeom->GetNumberOfModulesPhi(); iphi++ ) {
- Float_t z = ( fGeom->GetPPSDBoxSize(2) - fGeom->GetPPSDModuleSize(2) ) / 2. - fGeom->GetZDisplacement() ;;
- TNode * micro2node ;
- for ( Int_t iz = 1; iz <= fGeom->GetNumberOfModulesZ(); iz++ ) {
- y = - ( fGeom->GetPPSDBoxSize(1) - fGeom->GetMicromegas2Thickness() ) / 2. ;
- sprintf(nodename, "%s%d%d%d", "Mic2", i, iphi, iz) ;
- micro2node = new TNode(nodename, nodename, "PPSDModule", x, y, z) ;
- micro2node->SetLineColor(kColorPPSD) ;
- fNodes->Add(micro2node) ;
- // inside bottom micromegas
- micro2node->cd() ;
- // a. top lid
- y = ( fGeom->GetMicromegas2Thickness() - fGeom->GetLidThickness() ) / 2. ;
- sprintf(nodename, "%s%d", "Lidb", i) ;
- TNode * toplidbnode = new TNode(nodename, nodename, "TopLid", 0, y, 0) ;
- toplidbnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(toplidbnode) ;
- // b. composite panel
- y = y - fGeom->GetLidThickness() / 2. - fGeom->GetCompositeThickness() / 2. ;
- sprintf(nodename, "%s%d", "CompUb", i) ;
- TNode * compupbnode = new TNode(nodename, nodename, "TopPanel", 0, y, 0) ;
- compupbnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(compupbnode) ;
- // c. anode
- y = y - fGeom->GetCompositeThickness() / 2. - fGeom->GetAnodeThickness() / 2. ;
- sprintf(nodename, "%s%d", "Anob", i) ;
- TNode * anodebnode = new TNode(nodename, nodename, "Anode", 0, y, 0) ;
- anodebnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(anodebnode) ;
- // d. conversion gas
- y = y - fGeom->GetAnodeThickness() / 2. - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. ;
- sprintf(nodename, "%s%d", "GGapb", i) ;
- TNode * ggapbnode = new TNode(nodename, nodename, "GasGap", 0, y, 0) ;
- ggapbnode->SetLineColor(kColorGas) ;
- fNodes->Add(ggapbnode) ;
- // f. cathode
- y = y - ( fGeom->GetConversionGap() + fGeom->GetAvalancheGap() ) / 2. - fGeom->GetCathodeThickness() / 2. ;
- sprintf(nodename, "%s%d", "Cathodeb", i) ;
- TNode * cathodebnode = new TNode(nodename, nodename, "Cathode", 0, y, 0) ;
- cathodebnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(cathodebnode) ;
- // g. printed circuit
- y = y - fGeom->GetCathodeThickness() / 2. - fGeom->GetPCThickness() / 2. ;
- sprintf(nodename, "%s%d", "PCb", i) ;
- TNode * pcbnode = new TNode(nodename, nodename, "PCBoard", 0, y, 0) ;
- pcbnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(pcbnode) ;
- // h. composite pane
- y = y - fGeom->GetPCThickness() / 2. - fGeom->GetCompositeThickness() / 2. ;
- sprintf(nodename, "%s%d", "CompDownb", i) ;
- TNode * compdownbnode = new TNode(nodename, nodename, "BottomPanel", 0, y, 0) ;
- compdownbnode->SetLineColor(kColorPPSD) ;
- fNodes->Add(compdownbnode) ;
- z = z - fGeom->GetPPSDModuleSize(2) ;
- ppsdboxnode->cd() ;
- } // end of Z module loop
- x = x - fGeom->GetPPSDModuleSize(0) ;
- ppsdboxnode->cd() ;
- } // end of phi module loop
- }
- } // PHOS modules
-
- delete[] rotname ;
- delete[] nodename ;
-