CMS 3D CMS Logo

EMShower Class Reference

#include <FastSimulation/ShowerDevelopment/interface/EMShower.h>

List of all members.

Public Member Functions

void compute ()
 Compute the shower longitudinal and lateral development.
 EMShower (const RandomEngine *engine, GammaFunctionGenerator *gamma, EMECALShowerParametrization *const myParam, std::vector< const RawParticle * > *const myPart, EcalHitMaker *const myGrid=NULL, PreshowerHitMaker *const myPreshower=NULL)
double getMaximumOfShower () const
 get the depth of the centre of gravity of the shower(s)
void prepareSteps ()
 Computes the steps before the real compute.
void setGrid (EcalHitMaker *const myGrid)
 set the grid address
void setHcal (HcalHitMaker *const myHcal)
 set the HCAL address
void setPreshower (PreshowerHitMaker *const myPresh)
 set the preshower address
virtual ~EMShower ()

Private Types

typedef std::pair< XYZPoint,
double > 
Spot
typedef std::pair< unsigned
int, double > 
Step
typedef Steps::const_iterator step_iterator
typedef std::vector< StepSteps
typedef math::XYZVector XYZPoint

Private Member Functions

double deposit (double a, double b, double t)
double deposit (double t, double a, double b, double dt)
double gam (double x, double a) const
void setIntervals (unsigned icomp, RadialInterval &rad)

Private Attributes

std::vector< double > a
std::vector< double > aSpot
std::vector< double > b
std::vector< double > bSpot
std::vector< std::vector
< double > > 
depositedEnergy
std::vector< double > E
std::vector< double > Etot
double globalMaximum
bool hasPreshower
double innerDepth
std::vector< double > maximumOfShower
std::vector< double > meanDepth
GammaFunctionGeneratormyGammaGenerator
Genfun::IncompleteGamma myIncompleteGamma
unsigned int nPart
unsigned nSteps
double outerDepth
std::vector< double > photos
const RandomEnginerandom
Steps steps
bool stepsCalculated
std::vector< double > T
const ECALPropertiestheECAL
EcalHitMakertheGrid
const HCALPropertiestheHCAL
HcalHitMakertheHcalHitMaker
const PreshowerLayer1PropertiestheLayer1
const PreshowerLayer2PropertiestheLayer2
std::vector< double > theNumberOfSpots
EMECALShowerParametrization *const theParam
std::vector< const RawParticle * >
*const 
thePart
PreshowerHitMakerthePreshower
std::vector< double > Ti
double totalEnergy
std::vector< double > TSpot


Detailed Description

Definition at line 26 of file EMShower.h.


Member Typedef Documentation

typedef std::pair<XYZPoint,double> EMShower::Spot [private]

Definition at line 31 of file EMShower.h.

typedef std::pair<unsigned int, double> EMShower::Step [private]

Definition at line 32 of file EMShower.h.

typedef Steps::const_iterator EMShower::step_iterator [private]

Definition at line 34 of file EMShower.h.

typedef std::vector<Step> EMShower::Steps [private]

Definition at line 33 of file EMShower.h.

typedef math::XYZVector EMShower::XYZPoint [private]

Definition at line 29 of file EMShower.h.


Constructor & Destructor Documentation

EMShower::EMShower ( const RandomEngine engine,
GammaFunctionGenerator gamma,
EMECALShowerParametrization *const   myParam,
std::vector< const RawParticle * > *const   myPart,
EcalHitMaker *const   myGrid = NULL,
PreshowerHitMaker *const   myPreshower = NULL 
)

virtual EMShower::~EMShower (  )  [inline, virtual]

Definition at line 45 of file EMShower.h.

00045 {;}


Member Function Documentation

void EMShower::compute (  ) 

Compute the shower longitudinal and lateral development.

Definition at line 230 of file EMShower.cc.

References a, EcalHitMaker::addHit(), HcalHitMaker::addHit(), PreshowerHitMaker::addHit(), EcalHitMaker::addHitDepth(), RadialInterval::addInterval(), aSpot, b, bSpot, RadialInterval::compute(), deposit(), depositedEnergy, ReconstructionGR_cff::ecal, Etot, RandomEngine::flatShoot(), gam(), RandomEngine::gaussShoot(), RadialInterval::getNumberOfSpots(), EcalHitMaker::getPads(), RadialInterval::getSpotEnergy(), RadialInterval::getUmax(), RadialInterval::getUmin(), EcalHitMaker::getX0back(), hasPreshower, ReconstructionGR_cff::hcal, HCALProperties::hOverPi(), int, ECALProperties::lightCollectionUniformity(), PreshowerLayer2Properties::mipsPerGeV(), PreshowerLayer1Properties::mipsPerGeV(), myGammaGenerator, RadialInterval::nIntervals(), nSteps, NULL, EMECALShowerParametrization::p(), phi, photos, RandomEngine::poissonShoot(), prepareSteps(), random, EMECALShowerParametrization::rC(), EMECALShowerParametrization::rT(), HcalHitMaker::setDepth(), setIntervals(), GammaFunctionGenerator::setParameters(), HcalHitMaker::setSpotEnergy(), EcalHitMaker::setSpotEnergy(), PreshowerHitMaker::setSpotEnergy(), GammaFunctionGenerator::shoot(), HCALProperties::spotFraction(), funct::sqrt(), StDecayID::status, steps, stepsCalculated, t, theECAL, theGrid, theHCAL, theHcalHitMaker, theLayer1, theLayer2, theNumberOfSpots, theParam, thePreshower, Ti, and tt.

Referenced by CalorimetryManager::EMShowerSimulation().

00230                   {
00231 
00232   double t = 0.;
00233   double dt = 0.;
00234   if(!stepsCalculated) prepareSteps();
00235 
00236   // Prepare the grids in EcalHitMaker
00237   // theGrid->setInnerAndOuterDepth(innerDepth,outerDepth);
00238 
00239   bool status=false; 
00240 
00241   //  double E1 = 0.;  // Energy layer 1
00242   //  double E2 = 0.;  // Energy layer 2
00243   //  double n1 = 0.;  // #mips layer 1
00244   //  double n2 = 0.;  // #mips layer 2
00245   //  double E9 = 0.;  // Energy ECAL
00246   
00247   // Loop over all segments for the longitudinal development
00248   for (unsigned iStep=0; iStep<nSteps; ++iStep ) {
00249     
00250     // The length of the shower in this segment
00251     dt = steps[iStep].second;
00252 
00253     // The elapsed length
00254     t += dt;
00255 
00256     // In what detector are we ?
00257     unsigned detector=steps[iStep].first;
00258     bool presh1 = detector==0;
00259     bool presh2 = detector==1;
00260     bool ecal = detector==2;
00261     bool hcal = detector==3;
00262     bool vfcal = detector==4;
00263 
00264     // Temporary. Will be removed 
00265     if ( theHCAL==NULL) hcal=false;
00266 
00267     // Keep only ECAL for now
00268     if ( vfcal ) continue;
00269 
00270     //    cout << " t = " << t << endl;
00271     // Build the grid of crystals at this ECAL depth
00272     // Actually, it might be useful to check if this grid is empty or not. 
00273     // If it is empty (because no crystal at this depth), it is of no use 
00274     // (and time consuming) to generate the spots
00275     
00276 
00277    // middle of the step
00278     double tt = t-0.5*dt; 
00279 
00280     double realTotalEnergy=0.;
00281     for ( unsigned int i=0; i<nPart; ++i ) {
00282       realTotalEnergy += depositedEnergy[iStep][i]*E[i];
00283     }
00284 
00285 //    std::cout << " Step " << tt << std::endl;
00286 //    std::cout << "ecal " << ecal << " hcal "  << hcal <<std::endl;
00287 
00288     // If the amount of energy is greater than 1 MeV, make a new grid
00289     // otherwise put in the previous one.    
00290     bool usePreviousGrid=(realTotalEnergy<0.001);   
00291 
00292     // If the amount of energy is greater than 1 MeV, make a new grid
00293     // otherwise put in the previous one.    
00294 
00295     // If less than 1 kEV. Just skip
00296     if(iStep>2&&realTotalEnergy<0.000001) continue;
00297 
00298     if (ecal && !usePreviousGrid) 
00299       {
00300         status=theGrid->getPads(meanDepth[iStep]);
00301       }
00302     if (hcal) 
00303       {
00304         status=theHcalHitMaker->setDepth(tt);
00305       }
00306     if((ecal ||hcal) && !status) continue;
00307     
00308     bool detailedShowerTail=false;
00309     // check if a detailed treatment of the rear leakage should be applied
00310     if(ecal && !usePreviousGrid) 
00311       {
00312         detailedShowerTail=(t-dt > theGrid->getX0back());
00313       }
00314     
00315     // The particles of the shower are processed in parallel
00316     for ( unsigned int i=0; i<nPart; ++i ) {
00317 
00318       //      double Edepo=deposit(t,a[i],b[i],dt);
00319 
00320      //  integration of the shower profile between t-dt and t
00321       double dE = (!hcal)? depositedEnergy[iStep][i]:1.-deposit(a[i],b[i],t-dt);
00322 
00323        // no need to do the full machinery if there is ~nothing to distribute)
00324       if(dE*E[i]<0.000001) continue;
00325 
00326       if(detailedShowerTail)
00327         {
00328           myGammaGenerator->setParameters(floor(a[i]+0.5),b[i],t-dt);
00329         }
00330       
00331       // The number of energy spots (or mips)
00332       double nS = 0;
00333       
00334       // ECAL case : Account for photostatistics and long'al non-uniformity
00335       if (ecal) {
00336 
00337         dE = random->poissonShoot(dE*photos[i])/photos[i];
00338         double z0 = random->gaussShoot(0.,1.);
00339         dE *= 1. + z0*theECAL->lightCollectionUniformity();
00340 
00341         // Expected spot number
00342         nS = ( theNumberOfSpots[i] * gam(bSpot[i]*tt,aSpot[i]) 
00343                                    * bSpot[i] * dt 
00344                                    / tgamma(aSpot[i]) );
00345         
00346       // Preshower : Expected number of mips + fluctuation
00347       }
00348       else if ( hcal ) {
00349         nS = ( theNumberOfSpots[i] * gam(bSpot[i]*tt,aSpot[i]) 
00350                * bSpot[i] * dt 
00351                / tgamma(aSpot[i]))* theHCAL->spotFraction();
00352         double nSo = nS ;
00353         
00354         nS = random->poissonShoot(nS);
00355         dE *= nS/nSo;
00356 //      if(true)
00357 //        {
00358 //          std::cout << " theHCAL->spotFraction = " <<theHCAL->spotFraction() <<std::endl;
00359 //          std::cout << " nSpot Ecal : " << nSo/theHCAL->spotFraction() << " Final " << nS << std::endl;
00360 //        }
00361       }
00362       else if ( presh1 ) {
00363         
00364         nS = random->poissonShoot(dE*E[i]*theLayer1->mipsPerGeV());
00365         dE = nS/(E[i]*theLayer1->mipsPerGeV());
00366         //        E1 += dE*E[i]; 
00367         //      n1 += nS; 
00368         //      if (presh2) { E2 += SpotEnergy; ++n2; }
00369       
00370       } else if ( presh2 ) {
00371         
00372         nS = random->poissonShoot(dE*E[i]*theLayer2->mipsPerGeV());
00373         dE = nS/(E[i]*theLayer2->mipsPerGeV());
00374         //        E2 += dE*E[i]; 
00375         //      n2 += nS; 
00376         
00377       }
00378 
00379       //    myHistos->fill("h100",t,dE);
00380       
00381       // The lateral development parameters  
00382  
00383       // Energy of the spots
00384       double eSpot = (nS>0.) ? dE/nS : 0.;
00385       double SpotEnergy=eSpot*E[i];
00386 
00387       if(hasPreshower&&(presh1||presh2)) thePreshower->setSpotEnergy(0.00009);
00388       if(hcal) 
00389         {
00390           SpotEnergy*=theHCAL->hOverPi();
00391           theHcalHitMaker->setSpotEnergy(SpotEnergy);
00392         }
00393       // Poissonian fluctuations for the number of spots
00394       //    int nSpot = random->poissonShoot(nS);
00395       int nSpot = (int)(nS+0.5);
00396       
00397       
00398       // Fig. 11 (right) *** Does not match.
00399       //    myHistos->fill("h101",t,(double)nSpot/theNumberOfSpots);
00400       
00401       //double taui = t/T;
00402       double taui = tt/Ti[i];
00403       double proba = theParam->p(taui,E[i]);
00404       double theRC = theParam->rC(taui,E[i]);
00405       double theRT = theParam->rT(taui,E[i]);
00406       
00407       // Fig. 10
00408       //    myHistos->fill("h300",taui,theRC);
00409       //    myHistos->fill("h301",taui,theRT);
00410       //    myHistos->fill("h302",taui,proba);
00411       
00412          double dSpotsCore = 
00413         random->gaussShoot(proba*nSpot,std::sqrt(proba*(1.-proba)*nSpot));
00414       
00415       if(dSpotsCore<0) dSpotsCore=0;
00416       
00417       unsigned nSpots_core = (unsigned)(dSpotsCore+0.5);
00418       unsigned nSpots_tail = ((unsigned)nSpot>nSpots_core) ? nSpot-nSpots_core : 0;
00419       
00420       for(unsigned icomp=0;icomp<2;++icomp)
00421         {         
00422           
00423           double theR=(icomp==0) ? theRC : theRT ;    
00424           unsigned ncompspots=(icomp==0) ? nSpots_core : nSpots_tail;
00425           
00426           RadialInterval radInterval(theR,ncompspots,SpotEnergy,random);
00427           if(ecal)
00428             {
00429               if(icomp==0)
00430                 {
00431                   setIntervals(icomp,radInterval);
00432                 }
00433               else
00434                 {
00435                   setIntervals(icomp,radInterval);
00436                 }
00437             }
00438           else
00439             {
00440               radInterval.addInterval(100.,1.);// 100% of the spots
00441             }
00442           
00443           radInterval.compute();
00444            // irad = 0 : central circle; irad=1 : outside
00445 
00446            unsigned nrad=radInterval.nIntervals();
00447            
00448            for(unsigned irad=0;irad<nrad;++irad)
00449              {
00450                double spote=radInterval.getSpotEnergy(irad);
00451                if(ecal) theGrid->setSpotEnergy(spote);
00452                if(hcal) theHcalHitMaker->setSpotEnergy(spote);
00453                unsigned nradspots=radInterval.getNumberOfSpots(irad);
00454                double umin=radInterval.getUmin(irad);
00455                double umax=radInterval.getUmax(irad);
00456                // Go for the lateral development
00457                for ( unsigned  ispot=0; ispot<nradspots; ++ispot ) 
00458                  {
00459                    double z3=random->flatShoot(umin,umax);
00460                    double ri=theR * std::sqrt(z3/(1.-z3)) ;
00461 
00462                    //Fig. 12
00463                    /*
00464                      if ( 2. < t && t < 3. ) 
00465                      myHistos->fill("h401",ri,1./1000.*eSpot/dE/0.2);
00466                      if ( 6. < t && t < 7. ) 
00467                      myHistos->fill("h402",ri,1./1000.*eSpot/dE/0.2);
00468                      if ( 19. < t && t < 20. ) 
00469                      myHistos->fill("h403",ri,1./1000.*eSpot/dE/0.2);
00470                    */
00471                    // Fig. 13 (top)
00472                    //      myHistos->fill("h400",ri,1./1000.*eSpot/0.2);
00473                    
00474                    // Generate phi
00475                    double phi = 2.*M_PI*random->flatShoot();
00476                    
00477                    // Add the hit in the crystal
00478                    //   if( ecal ) theGrid->addHit(ri*theECAL->moliereRadius(),phi);
00479                    // Now the *moliereRadius is done in EcalHitMaker
00480                    if ( ecal )
00481                      {
00482                        if(detailedShowerTail) 
00483                          {
00484                            //                      std::cout << "About to call addHitDepth " << std::endl;
00485                            double depth;
00486                            do
00487                              {
00488                                depth=myGammaGenerator->shoot();
00489                              }
00490                            while(depth>t);
00491                            theGrid->addHitDepth(ri,phi,depth);
00492                            //                      std::cout << " Done " << std::endl;
00493                          }
00494                        else
00495                          theGrid->addHit(ri,phi);
00496                      }
00497                    else if (hasPreshower&&presh1) thePreshower->addHit(ri,phi,1);
00498                    else if (hasPreshower&&presh2) thePreshower->addHit(ri,phi,2);
00499                    else if (hcal) 
00500                      {
00501                        //                      std::cout << " About to add a spot in the HCAL" << status << std::endl;
00502                        theHcalHitMaker->addHit(ri,phi);
00503                        //                      std::cout << " Added a spot in the HCAL" << status << std::endl;
00504                      }
00505                    //   if (ecal) E9 += SpotEnergy;
00506                    //   if (presh1) { E1 += SpotEnergy; ++n1; }
00507                    //   if (presh2) { E2 += SpotEnergy; ++n2; }
00508 
00509                    Etot[i] += spote;
00510                  }
00511              }
00512         }
00513       //      std::cout << " Done with the step " << std::endl;
00514       // The shower!
00515       //myHistos->fill("h500",theSpot.z(),theSpot.perp());
00516     }
00517     //    std::cout << " nPart " << nPart << std::endl;
00518   }
00519   //  std::cout << " Finshed the step loop " << std::endl;
00520   //  myHistos->fill("h500",E1+0.7*E2,E9);
00521   //  myHistos->fill("h501",n1+0.7*n2,E9);
00522   //  myHistos->fill("h400",n1);
00523   //  myHistos->fill("h401",n2);
00524   //  myHistos->fill("h402",E9+E1+0.7*E2);
00525   //  if(!standalone)theGrid->printGrid();
00526   double Etotal=0.;
00527   for(unsigned i=0;i<nPart;++i)
00528     {
00529       //      myHistos->fill("h10",Etot[i]);
00530       Etotal+=Etot[i];
00531     }
00532   //  myHistos->fill("h20",Etotal);
00533 }

double EMShower::deposit ( double  a,
double  b,
double  t 
) [private]

Definition at line 610 of file EMShower.cc.

References b2, myIncompleteGamma, and HLT_VtxMuL3::result.

00610                                                {
00611   //  std::cout << " Deposit " << std::endl;
00612   myIncompleteGamma.a().setValue(a);
00613   double b2=b*t;
00614   double result=myIncompleteGamma(b2);
00615   //  std::cout << " deposit t = " << t  << " "  << result <<std::endl;
00616   return result;
00617 }

double EMShower::deposit ( double  t,
double  a,
double  b,
double  dt 
) [private]

Definition at line 573 of file EMShower.cc.

References b1, b2, and myIncompleteGamma.

Referenced by compute(), and prepareSteps().

00573                                                          {
00574   myIncompleteGamma.a().setValue(a);
00575   double b1=b*(t-dt);
00576   double b2=b*t;
00577   return (myIncompleteGamma(b2)-myIncompleteGamma(b1));
00578 }

double EMShower::gam ( double  x,
double  a 
) const [private]

Definition at line 537 of file EMShower.cc.

References funct::exp(), and funct::pow().

Referenced by compute().

00537                                       {
00538   // A stupid gamma function
00539   return std::pow(x,a-1.)*std::exp(-x);
00540 }

double EMShower::getMaximumOfShower (  )  const [inline]

get the depth of the centre of gravity of the shower(s)

get the depth of the maximum of the shower

Definition at line 57 of file EMShower.h.

References globalMaximum.

Referenced by CalorimetryManager::EMShowerSimulation().

00057 {return globalMaximum;}

void EMShower::prepareSteps (  ) 

Computes the steps before the real compute.

Definition at line 123 of file EMShower.cc.

References a, b, deposit(), depositedEnergy, EcalHitMaker::ecalTotalX0(), EcalHitMaker::hcalTotalX0(), innerDepth, int, nSteps, offset, outerDepth, EcalHitMaker::ps1TotalX0(), EcalHitMaker::ps2TotalX0(), cmsRelvalreportInput::step, steps, stepsCalculated, t, theGrid, EcalHitMaker::totalX0(), and EcalHitMaker::x0DepthOffset().

Referenced by compute().

00124 {
00125   //  TimeMe theT("EMShower::compute");
00126   
00127   // Determine the longitudinal intervals
00128   //  std::cout << " EMShower compute" << std::endl;
00129   double dt;
00130   double radlen;
00131   int stps;
00132   int first_Ecal_step=0;
00133   int last_Ecal_step=0;
00134   // The maximum is in principe 8 (with 5X0 steps in the ECAL)
00135   steps.reserve(20);
00136   
00137 //  std::cout << " PS1 : " << theGrid->ps1TotalX0()
00138 //          << " PS2 : " << theGrid->ps2TotalX0()
00139 //          << " ECAL : " << theGrid->ecalTotalX0()
00140 //          << " HCAL : " << theGrid->hcalTotalX0() 
00141 //          << " Offset : " << theGrid->x0DepthOffset()
00142 //          << std::endl;
00143   
00144   
00145   radlen = -theGrid->x0DepthOffset();
00146   
00147   // Preshower Layer 1
00148   radlen += theGrid->ps1TotalX0();
00149   if ( radlen > 0. ) {
00150     steps.push_back(Step(0,radlen));
00151     radlen = 0.;
00152   }
00153   
00154   // Preshower Layer 2
00155   radlen += theGrid->ps2TotalX0();
00156   if ( radlen > 0. ) {
00157     steps.push_back(Step(1,radlen));
00158     radlen = 0.;
00159   }
00160   
00161   // ECAL
00162   radlen += theGrid->ecalTotalX0();
00163   if ( radlen > 0. ) {
00164     stps=(int)((radlen+2.5)/5.);
00165     //    stps=(int)((radlen+.5)/1.);
00166     if ( stps == 0 ) stps = 1;
00167     dt = radlen/(double)stps;
00168     Step step(2,dt);
00169     first_Ecal_step=steps.size();
00170     for ( int ist=0; ist<stps; ++ist )
00171       steps.push_back(step);
00172     last_Ecal_step=steps.size()-1;
00173     radlen = 0.;
00174   } 
00175  
00176  // HCAL 
00177  radlen += theGrid->hcalTotalX0();
00178  if ( radlen > 0. ) {
00179    double dtFrontHcal=theGrid->totalX0()-theGrid->hcalTotalX0();
00180    // One single step for the full HCAL
00181    if(dtFrontHcal<30.) 
00182      {
00183        dt=30.-dtFrontHcal;
00184        Step step(3,dt);
00185        steps.push_back(step);
00186      }
00187  } 
00188 
00189  nSteps=steps.size();
00190  if(nSteps==0) return;
00191  double ESliceTot=0.;
00192  double MeanDepth=0.;
00193  depositedEnergy.resize(nSteps);
00194  meanDepth.resize(nSteps);
00195  double t=0.;
00196 
00197  int offset=0;
00198  for(unsigned iStep=0;iStep<nSteps;++iStep)
00199    {
00200      ESliceTot=0.;
00201      MeanDepth=0.;
00202      double realTotalEnergy=0;
00203      dt=steps[iStep].second;
00204      t+=dt;
00205      for ( unsigned int i=0; i<nPart; ++i ) {
00206 
00207        depositedEnergy[iStep].push_back(deposit(t,a[i],b[i],dt));     
00208        ESliceTot +=depositedEnergy[iStep][i];
00209        MeanDepth += deposit(t,a[i]+1.,b[i],dt)/b[i]*a[i];
00210        realTotalEnergy+=depositedEnergy[iStep][i]*E[i];
00211      }
00212      MeanDepth/=ESliceTot;
00213      meanDepth[iStep]=MeanDepth;
00214      if(realTotalEnergy<0.001)
00215        {
00216          offset-=1;
00217        }
00218    }
00219 
00220  innerDepth=meanDepth[first_Ecal_step];
00221  if(last_Ecal_step+offset>=0)
00222    outerDepth=meanDepth[last_Ecal_step+offset];
00223  else
00224    outerDepth=innerDepth;
00225 
00226  stepsCalculated=true;
00227 }

void EMShower::setGrid ( EcalHitMaker *const   myGrid  )  [inline]

set the grid address

Definition at line 60 of file EMShower.h.

References theGrid.

Referenced by CalorimetryManager::EMShowerSimulation().

00060 { theGrid=myGrid;}

void EMShower::setHcal ( HcalHitMaker *const   myHcal  ) 

set the HCAL address

Definition at line 604 of file EMShower.cc.

References theHcalHitMaker.

Referenced by CalorimetryManager::EMShowerSimulation().

00605 {
00606   theHcalHitMaker = myHcal;
00607 }

void EMShower::setIntervals ( unsigned  icomp,
RadialInterval rad 
) [private]

Definition at line 581 of file EMShower.cc.

References RadialInterval::addInterval(), EMECALShowerParametrization::getCoreIntervals(), EMECALShowerParametrization::getTailIntervals(), and theParam.

Referenced by compute().

00582 {
00583   //  std::cout << " Got the pointer " << std::endl;
00584   const std::vector<double>& myValues((icomp)?theParam->getTailIntervals():theParam->getCoreIntervals());
00585   //  std::cout << " Got the vector " << myValues.size () << std::endl;
00586   unsigned nvals=myValues.size()/2;
00587   for(unsigned iv=0;iv<nvals;++iv)
00588     {
00589       //      std::cout << myValues[2*iv] << " " <<  myValues[2*iv+1] <<std::endl;
00590       rad.addInterval(myValues[2*iv],myValues[2*iv+1]);
00591     } 
00592 } 

void EMShower::setPreshower ( PreshowerHitMaker *const   myPresh  ) 

set the preshower address

Definition at line 594 of file EMShower.cc.

References hasPreshower, NULL, and thePreshower.

Referenced by CalorimetryManager::EMShowerSimulation().

00595 {
00596   if(myPresh!=NULL)
00597     {
00598       thePreshower = myPresh;
00599       hasPreshower=true;
00600     }
00601 }


Member Data Documentation

std::vector<double> EMShower::a [private]

Definition at line 101 of file EMShower.h.

Referenced by compute(), and prepareSteps().

std::vector<double> EMShower::aSpot [private]

Definition at line 105 of file EMShower.h.

Referenced by compute().

std::vector<double> EMShower::b [private]

Definition at line 102 of file EMShower.h.

Referenced by compute(), and prepareSteps().

std::vector<double> EMShower::bSpot [private]

Definition at line 106 of file EMShower.h.

Referenced by compute().

std::vector<std::vector<double> > EMShower::depositedEnergy [private]

Definition at line 112 of file EMShower.h.

Referenced by compute(), and prepareSteps().

std::vector<double> EMShower::E [private]

Definition at line 98 of file EMShower.h.

std::vector<double> EMShower::Etot [private]

Definition at line 97 of file EMShower.h.

Referenced by compute().

double EMShower::globalMaximum [private]

Definition at line 116 of file EMShower.h.

Referenced by getMaximumOfShower().

bool EMShower::hasPreshower [private]

Definition at line 135 of file EMShower.h.

Referenced by compute(), and setPreshower().

double EMShower::innerDepth [private]

Definition at line 114 of file EMShower.h.

Referenced by prepareSteps().

std::vector<double> EMShower::maximumOfShower [private]

Definition at line 111 of file EMShower.h.

std::vector<double> EMShower::meanDepth [private]

Definition at line 113 of file EMShower.h.

GammaFunctionGenerator* EMShower::myGammaGenerator [private]

Definition at line 145 of file EMShower.h.

Referenced by compute().

Genfun::IncompleteGamma EMShower::myIncompleteGamma [private]

Definition at line 139 of file EMShower.h.

Referenced by deposit().

unsigned int EMShower::nPart [private]

Definition at line 93 of file EMShower.h.

unsigned EMShower::nSteps [private]

Definition at line 122 of file EMShower.h.

Referenced by compute(), and prepareSteps().

double EMShower::outerDepth [private]

Definition at line 114 of file EMShower.h.

Referenced by prepareSteps().

std::vector<double> EMShower::photos [private]

Definition at line 99 of file EMShower.h.

Referenced by compute().

const RandomEngine* EMShower::random [private]

Definition at line 142 of file EMShower.h.

Referenced by compute().

Steps EMShower::steps [private]

Definition at line 121 of file EMShower.h.

Referenced by compute(), and prepareSteps().

bool EMShower::stepsCalculated [private]

Definition at line 123 of file EMShower.h.

Referenced by compute(), and prepareSteps().

std::vector<double> EMShower::T [private]

Definition at line 100 of file EMShower.h.

const ECALProperties* EMShower::theECAL [private]

Definition at line 86 of file EMShower.h.

Referenced by compute().

EcalHitMaker* EMShower::theGrid [private]

Definition at line 126 of file EMShower.h.

Referenced by compute(), prepareSteps(), and setGrid().

const HCALProperties* EMShower::theHCAL [private]

Definition at line 87 of file EMShower.h.

Referenced by compute().

HcalHitMaker* EMShower::theHcalHitMaker [private]

Definition at line 132 of file EMShower.h.

Referenced by compute(), and setHcal().

const PreshowerLayer1Properties* EMShower::theLayer1 [private]

Definition at line 88 of file EMShower.h.

Referenced by compute().

const PreshowerLayer2Properties* EMShower::theLayer2 [private]

Definition at line 89 of file EMShower.h.

Referenced by compute().

std::vector<double> EMShower::theNumberOfSpots [private]

Definition at line 96 of file EMShower.h.

Referenced by compute().

EMECALShowerParametrization* const EMShower::theParam [private]

Definition at line 83 of file EMShower.h.

Referenced by compute(), and setIntervals().

std::vector<const RawParticle*>* const EMShower::thePart [private]

Definition at line 92 of file EMShower.h.

PreshowerHitMaker* EMShower::thePreshower [private]

Definition at line 129 of file EMShower.h.

Referenced by compute(), and setPreshower().

std::vector<double> EMShower::Ti [private]

Definition at line 103 of file EMShower.h.

Referenced by compute().

double EMShower::totalEnergy [private]

Definition at line 118 of file EMShower.h.

std::vector<double> EMShower::TSpot [private]

Definition at line 104 of file EMShower.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:22 2009 for CMSSW by  doxygen 1.5.4