131 bool interactionDesired(
false);
133 art::ServiceHandle<geo::Geometry> geom;
140 auto allmclists =
evt.getMany< std::vector<simb::MCTruth> >();
150 std::cout << xyzcenter00[0] <<
" " << xyzcenter00[1] <<
" " << xyzcenter00[2] << std::endl;
154 std::cout << xyzcenter01[0] <<
" " << xyzcenter01[1] <<
" " << xyzcenter01[2] << std::endl;
158 std::cout << xyzcenter10[0] <<
" " << xyzcenter10[1] <<
" " << xyzcenter10[2] << std::endl;
162 std::cout << xyzcenter11[0] <<
" " << xyzcenter11[1] <<
" " << xyzcenter11[2] << std::endl;
177 std::cout << h00 <<
" " << w00 <<
" " << l00 << std::endl;
178 std::cout << h01 <<
" " << w01 <<
" " << l01 << std::endl;
179 std::cout << h10 <<
" " << w10 <<
" " << l10 << std::endl;
180 std::cout << h11 <<
" " << w11 <<
" " << l11 << std::endl;
182 for(
size_t mcl = 0; mcl < allmclists.size(); ++mcl){
183 art::Handle< std::vector<simb::MCTruth> > mclistHandle = allmclists[mcl];
184 for(
size_t m = 0;
m < mclistHandle->size(); ++
m){
185 art::Ptr<simb::MCTruth> mct(mclistHandle,
m);
186 for(
int ipart=0;ipart<mct->NParticles();ipart++){
187 int pdg=mct->GetParticle(ipart).PdgCode();
188 double xx=mct->GetParticle(ipart).Vx();
189 double yy=mct->GetParticle(ipart).Vy();
190 double zz=mct->GetParticle(ipart).Vz();
194 if (xx>(xyzcenter00[0]-w00) && xx<(xyzcenter00[0]+w00) && yy>(xyzcenter00[1]-h00) && yy<(xyzcenter00[1]+h00) && zz>(xyzcenter00[2]-l00/2) && zz<(xyzcenter00[2]+l00/2))
196 interactionDesired =
true;
198 if (xx>(xyzcenter01[0]-w01) && xx<(xyzcenter01[0]+w01) && yy>(xyzcenter01[1]-h01) && yy<(xyzcenter01[1]+h01) && zz>(xyzcenter01[2]-l01/2) && zz<(xyzcenter01[2]+l01/2))
200 interactionDesired =
true;
202 if (xx>(xyzcenter10[0]-w10) && xx<(xyzcenter10[0]+w10) && yy>(xyzcenter10[1]-h10) && yy<(xyzcenter10[1]+h10) && zz>(xyzcenter10[2]-l10/2) && zz<(xyzcenter10[2]+l10/2))
204 interactionDesired =
true;
206 if (xx>(xyzcenter11[0]-w11) && xx<(xyzcenter11[0]+w11) && yy>(xyzcenter11[1]-h11) && yy<(xyzcenter11[1]+h11) && zz>(xyzcenter11[2]-l11/2) && zz<(xyzcenter11[2]+l11/2))
208 interactionDesired =
true;
215 interactionDesired =
true;
228 return interactionDesired;
Point GetActiveVolumeCenter() const
Returns the center of the TPC active volume in world coordinates [cm].
double ActiveHalfHeight() const
Half height (associated with y coordinate) of active TPC volume [cm].
Geometry information for a single TPC.
Geometry information for a single cryostat.
tuple m
now if test mode generate materials, CRT shell, world, gdml header else just generate CRT shell for u...
double ActiveHalfWidth() const
Half width (associated with x coordinate) of active TPC volume [cm].
double ActiveLength() const
Length (associated with z coordinate) of active TPC volume [cm].
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc'th TPC in the cryostat.
BEGIN_PROLOG could also be cout