Message: Missing hits Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Missing hits  

Forum: Hits, Digitization and Pileup
Date: 24 Sep, 2015
From: <duso>

I have a detector which geometry is build with one logical volume, say logicA, which is placed twice inside the World. Then inside logicA I place several identical volume which are my sensitive detectors. So my code looks like

G4Sphere* solidHalf_LPmtSph = new G4Sphere("HalfLPmtSph",
					    rInLPmtSph,
					    rOutLPmtSph,
					    0.*deg,
					    360.*deg,
					    0.*deg,
					    180.*deg);
  G4LogicalVolume* logicHalf_LPmtSph = new G4LogicalVolume(solidHalf_LPmtSph,
							   water_mat, 
							   “HalfLPmtSph”);

G4RotationMatrix rot_1_HalfSph; rot_1_HalfSph.rotateX(0.*deg); G4ThreeVector origin(0.*cm,0.*cm,0.*cm);

G4VPhysicalVolume* physHalf_LPmtSph_1 =  new G4PVPlacement(  G4Transform3D(rot_1_HalfSph,origin),
							   logicHalf_LPmtSph,
							   "HalfLPmtSph",
							   logicWorld,
							   false,
							   0,
							   fCheckOverlaps);

rot_1_HalfSph.rotateX(180.*deg);
  G4VPhysicalVolume* physHalf_LPmtSph_2 =  new G4PVPlacement(G4Transform3D(rot_1_HalfSph,origin),
   							   logicHalf_LPmtSph,
   							   "HalfLPmtSph",
   							   logicJuno,
   							   false,
   							   1,
   							   fCheckOverlaps);

G4Tubs* solidLPmtEnv = new G4Tubs("LPmtEnv",0.*cm,rLPmt+0.01*cm,zLPmtEnv/2.,0*deg,360*deg);
  G4LogicalVolume* logicLPmtEnv = new G4LogicalVolume(solidLPmtEnv,water_mat,”LPmtEnv");
for(int il=0; il < nLPmt; il++) {
      G4RotationMatrix rotm  = G4RotationMatrix();
      rotm.rotateY(lth[il]*rad);
      rotm.rotateZ(lph[il]*rad);
      G4ThreeVector position = G4ThreeVector(lx[il],ly[il],lz[il]);     

      new G4PVPlacement(G4Transform3D(rotm,position),
			logicLPmtEnv,
			"LPmtEnv",
			logicHalf_LPmtSph,
			false,
			il,
			fCheckOverlaps);
}

Then I declare my sensitive detector to be the logical volume logicLPmtEnv.

JMCPmtSD* m_LPmtSD = new JMCPmtSD(“JMC/LpmtSD”,"LPmtHitsCollection"); SDman->AddNewDetector(m_LPmtSD); SetSensitiveDetector(“LPmtEnv",m_LPmtSD);

My problem is that I see hits only in the detectors that are in the second half-sphere that I placed in the World, namely in physHalf_LPmtSph_2. If I comment the second placement I get hits in the first half sphere. What is wrong in my code?

Thanks a lot Stefano

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Missing hits   (Tsukasa Aso - 24 Sep, 2015)
2 None: Re: Missing hits   (Tsukasa Aso - 25 Sep, 2015)
3 None: Re: Missing hits   (michel maire - 25 Sep, 2015)
 Add Message Add Message
to: "Missing hits "

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]