/[PAMELA software]/calo/flight/CaloBragg/src/CaloBragg.cpp
ViewVC logotype

Diff of /calo/flight/CaloBragg/src/CaloBragg.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by mocchiut, Wed Jun 15 12:28:45 2011 UTC revision 1.12 by mocchiut, Fri Jun 17 11:56:42 2011 UTC
# Line 367  Float_t CaloBragg::LastIntegral(){ Line 367  Float_t CaloBragg::LastIntegral(){
367    return integ;    return integ;
368  }  }
369    
370    
371  void CaloBragg::Draw(){  void CaloBragg::Draw(){
372    
373    Process();    Process();
374    
375      this->Draw(0.,0.);
376    
377    }
378    
379    void CaloBragg::Draw(Int_t Z, Float_t enetot){
380    
381    //  Float_t dEpianimean[44];    //  Float_t dEpianimean[44];
382    Float_t dEpianiloop[44];    Float_t dEpianiloop[44];
383    Float_t Depth[44];    Float_t Depth[44];
384    //  Int_t tz=(Int_t)qtz;    //  Int_t tz=(Int_t)qtz;
385    Int_t tz1=(Int_t)lpz;    Int_t tz1= Z;
386    //  Enetrack(&tz, &qtetot, &estremi[0][0],&estremi[1][0], dEpianimean);//calcola rilascio energetico sui piani da media troncata    Float_t enet = enetot;
387    Enetrack(&tz1, &lpetot, &estremi[0][0],&estremi[1][0], dEpianiloop);//calcola rilascio energetico sui piani da loop    //  Float_t enet = lpetot;
388      
389      if ( Z > 0. && enetot > 0. ){
390        estremi[0][0] = 0;
391        estremi[1][0] = 43;
392    
393    
394        Float_t    ytgx = 0.;
395        Float_t    ytgy = 0.;
396        
397        //lunghezza effettiva di silicio attraversata (mm)
398        Float_t    SiCross = sqrt(SQ(ySi) + SQ(ytgx) + SQ(ytgy));
399        
400        spessore[0] = (SiCross/10.) * rhoSi; //spessore silicio in g/cm2
401        
402        /*tungsteno*/
403        
404        //rapporto tra rilasci energetici nei due materiali
405        Float_t WCross = sqrt((yW*yW) + (ytgx*ytgx) + (ytgy*ytgy));//mm* rapporto lunghezze rad
406        //gcm2W = WCross/10. * rhoW;
407        
408        //       (g/cm2W)/(g/cm2Si)
409        spessore[3] =  (WCross/10.) * rhoW;
410        Float_t a=(WCross/SiCross)*(rhoW/rhoSi)*(1.145/1.664);  //(gcm2W)/(SiCross/10. * rhoSi)* (1.145/1.664);
411        spessore[1] =  a;
412        //riscala mip allo spessore attraversato
413        spessore[2] = MIP*(SiCross/ySi);  
414    
415      } else {
416        tz1=(Int_t)lpz;
417        enet = lpetot;
418        //  Enetrack(&tz, &qtetot, &estremi[0][0],&estremi[1][0], dEpianimean);//calcola rilascio energetico sui piani da media troncata
419      
420      }
421      Enetrack(&tz1, &enet, &estremi[0][0],&estremi[1][0], dEpianiloop);//calcola rilascio energetico sui piani da loop
422    
423    Float_t sp= spessore[0]*spessore[1];    Float_t sp= spessore[0]*spessore[1];
424    for(Int_t i=0;i<44;i++)Depth[i]=i*sp;    for(Int_t i=0;i<44;i++)Depth[i]=i*sp;
# Line 430  void CaloBragg::Draw(){ Line 471  void CaloBragg::Draw(){
471    //  tc->cd(2);    //  tc->cd(2);
472    tc->cd();    tc->cd();
473    //    //
474    for(Int_t i=0;i<=estremi[1][0];i++)th3->Fill(Depth[i],dEpianiloop[i]);    for(Int_t i=0;i<=estremi[1][0];i++){
475        th3->Fill(Depth[i],dEpianiloop[i]);
476        //    printf(" i %i Depth %f depianiloop %f \n",i,Depth[i],dEpianiloop[i]);
477      }
478    th3->Draw();    th3->Draw();
479    th2->Draw("same");    th2->Draw("same");
480    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.23