4 #include "TClonesArray.h" 
    5 #include "TGeoMCGeometry.h" 
    6 #include "TGeoManager.h" 
    7 #include "TLorentzVector.h" 
   11 #include "TParticle.h" 
   12 #include "TVirtualMC.h" 
   14 #include "TGeoMedium.h" 
   16 #include "FairGeoInterface.h" 
   17 #include "FairGeoLoader.h" 
   18 #include "FairGeoNode.h" 
   20 #include "FairGeoRootBuilder.h" 
   21 #include "TGeoMatrix.h" 
   26 #include "FairGeoMedium.h" 
   27 #include "FairRootManager.h" 
   28 #include "FairModule.h" 
   29 #include "FairVolume.h" 
   33 #include "FairRuntimeDb.h" 
   34 #include "TObjArray.h" 
   44   SenVolList = 
new TList();
 
   54                                 TGeoCompositeShape* lay_cap,
 
   85   char cluster_name[10];
 
   86   if(id_start==800) sprintf(cluster_name,
"J");
 
   87   if(id_start==700) sprintf(cluster_name,
"G");
 
   88   if(id_start==100) sprintf(cluster_name,
"A");
 
   89   if(id_start==200) sprintf(cluster_name,
"B");
 
   90   if(id_start==900) sprintf(cluster_name,
"K");
 
   92   if(id_start==1100) sprintf(cluster_name,
"M");
 
   93   if(id_start==300) sprintf(cluster_name,
"C");
 
   94   if(id_start==500) sprintf(cluster_name,
"E");
 
   95   if(id_start==1500) sprintf(cluster_name,
"R");
 
   96   if(id_start==1300) sprintf(cluster_name,
"P");
 
   98   if(id_start== 400) sprintf(cluster_name,
"D");
 
   99   if(id_start== 600) sprintf(cluster_name,
"F");
 
  100   if(id_start==1000) sprintf(cluster_name,
"L");
 
  101   if(id_start==1200) sprintf(cluster_name,
"N");
 
  103   if(id_start==1400) sprintf(cluster_name,
"Q");
 
  111   distance = distance + 2.5;
 
  115   if(phi1 >360.0*deg) phi1 = phi1 - 360.0*deg;
 
  116   if(phi1>=0.0 && phi1 <=180.0*deg) phi1 = 180.0*deg - phi1;
 
  117   if(phi1>180.0*deg && phi1 <360.0*deg) phi1 = 540.0*deg - phi1;
 
  118   phi1 = phi1+90.0*deg;
 
  120   if(phi >360.0) phi = phi - 360.0;
 
  121   if(phi>=0.0 && phi <=180.0) phi = 180.0 - 
phi;
 
  122   if(phi>180.0 && phi <360.0) phi = 540.0 - 
phi;
 
  129   pclus += 
"/hypGe/GeGlusterPos3Clus.dat";
 
  130   psci += 
"/hypGe/GeClusterPosSci31.dat";
 
  140   TVector3 rotatedPos,PosOrb;
 
  145   TVector3 rotatedPos2;
 
  147   rot3D2.SetAngles(0, 0, 0);
 
  148   rot3D2.RotateX(theta);  
 
  152    rho2.RotateX(theta*deg);  
 
  155   rot3D.SetAngles(0, 0, 0);
 
  156   rot3D.RotateX(theta);  
 
  160   rho.RotateX(theta*deg);  
 
  169    TGeoMedium *Ge = 
gGeoManager->GetMedium(
"germanium");
 
  171    TGeoMedium *sci = 
gGeoManager->GetMedium(
"polypropylene");
 
  173    TGeoMedium *cap = 
gGeoManager->GetMedium(
"HYPaluminium");
 
  189   char name_crystal[13];
 
  190   sprintf (name_crystal,
"GeCrystal%02d",id_start+6);
 
  196   sprintf (name_lay,
"laySci%02d",id_start+6);
 
  198   sprintf (name_cap,
"Cap%02d",id_start+6);
 
  202                                                 (
const TGeoShape *)logicCrystal_test,
 
  203                                                 (
const TGeoMedium *)Ge );
 
  206                                                 (
const TGeoShape *)lay_sci,
 
  207                                                 (
const TGeoMedium *)sci );
 
  209    Cap[
fnum_crystal] = 
new TGeoVolume(name_cap,(
const TGeoShape *)lay_cap,
 
  210                                                 (
const TGeoMedium *)cap );
 
  213    data = read->
GetData(id_start+6);
 
  222                   new TGeoCombiTrans(data.
posX/10.,
 
  225                                      new TGeoRotation (rot3D)));
 
  227    sphere.AddNode(
Cap[fnum_crystal],id_start+6, 
 
  228                   new TGeoCombiTrans(data.
posX/10.,
 
  231                                      new TGeoRotation (rot3D)));
 
  235    data2 = readsci->GetData(id_start+6);
 
  239    sphere.AddNode(
laySci[fnum_crystal],id_start+6, 
 
  240                   new TGeoCombiTrans(data2.
posX/10.,
 
  243                                      new TGeoRotation (rot3D)));
 
  272   fnum_crystal = fnum_crystal + 1;
 
  279         b=TVector3(0,1.,0).Transform(a);
 
  284         for(
int iii=0;iii<=1;iii++)
 
  288       rot3D.SetAngles(0., 0., 0.);
 
  289       rot3D.RotateX(-6.66);  
 
  290       rot3D.RotateZ((-1*iii+1)*60.0);  
 
  291       rot3D.RotateX(theta);  
 
  299        rho.RotateX(-6.66*deg);  
 
  300        rho.RotateZ((-1*iii+1)*60.0*deg);  
 
  301        rho.RotateX(theta*deg);  
 
  304        rotatedPos.SetXYZ(0.,0.,0.);
 
  305        rotatedPos2.SetXYZ(0.,0.,0.);
 
  311       sprintf(tempname,
"GeCrystal%04d",id_start+iii);
 
  315       sprintf (periname,
"laySci%04d",id_start+iii);
 
  317        sprintf (cappname,
"Cap%04d",id_start+iii);
 
  320                                              (
const TGeoShape *)logicCrystal_test,
 
  321                                              (
const TGeoMedium *)Ge);
 
  324                                                  (
const TGeoShape *)lay_sci,
 
  325                                                  (
const TGeoMedium *)sci);
 
  328                                              (
const TGeoShape *)lay_cap,
 
  329                                              (
const TGeoMedium *)cap);
 
  333       data3 = read->
GetData(id_start+iii);
 
  339         sphere.AddNode(
crystal[fnum_crystal],id_start+iii, 
 
  340                        new TGeoCombiTrans(data3.
posX/10.,data3.
posY/10.,
 
  341                                           data3.
posZ/10., 
new TGeoRotation (rot3D)));
 
  344          sphere.AddNode(
Cap_peri[fnum_crystal],id_start+iii, 
 
  345                         new TGeoCombiTrans(data3.
posX/10.,
 
  348                                            new TGeoRotation (rot3D)));
 
  351          data4 = readsci->GetData(id_start+iii);
 
  355         sphere.AddNode(
laySci_peri[fnum_crystal],id_start+iii, 
 
  356                        new TGeoCombiTrans(data4.
posX/10.,
 
  359                                   new TGeoRotation (rot3D)));
 
  374       cout << id_start+iii << 
" "  << data.
posX << 
" " 
  376            << data.
posZ << 
" "<<std::endl;
 
  378      fnum_crystal = fnum_crystal + 1;
 
TGeoVolume * laySci_peri[105]
TGeoManager * gGeoManager
TGeoVolume * crystal[105]
TGeoVolume * crystal_centre[105]
TList * CreateCluster(TGeoPgon *logicCrystal_test, TGeoPgon *lay_sci, TGeoCompositeShape *lay_cap, TGeoVolume &sphere, double distance, double theta, double phi, double depth_first_interaction, int id_start)
DataG4 GetData(int crystal)
TGeoVolume * Cap_peri[105]