Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /SimCalorimetry/EcalSimAlgos/doc/caloDigiNote.tex is written in an unsupported language. File is not indexed.

0001 \documentclass{cmspaper}
0002 \begin{document}
0003 
0004 %==============================================================================
0005 % title page for few authors
0006 
0007 \begin{titlepage}
0008 
0009 % select one of the following and type in the proper number:
0010 %   \cmsnote{2006/000}
0011   \internalnote{2006/000}
0012 %  \conferencereport{2005/000}
0013    \date{1 April 2006}
0014 
0015   \title{Digitization Simulation in CMS Calorimetry}
0016 
0017   \begin{Authlist}
0018      F.~Cossutti\Iref{INFN}, P.~Govoni\Iref{INFN}, C.~M.~Kuo, J.~Mans\Iref{Minnesota}, R.~Wilkinson\Iref{Caltech}
0019        \Instfoot{INFN} {Instituto National de Fisica Nuclear, Somewhere, Italy}
0020        \Instfoot{Minnesota} {University of Minnesota, Minneapolis, MN, USA}
0021        \Instfoot{Caltech}{California Institute of Technology, Pasadena, CA, USA}
0022   \end{Authlist}
0023 
0024 % if needed, use the following:
0025 %\collaboration{Flying Saucers Investigation Group}
0026 %\collaboration{CMS collaboration}
0027 
0028   %\Anotfoot{a}{On leave from prison}
0029   %\Anotfoot{b}{Now at the Moon}
0030 
0031   \begin{abstract}
0032     We describe the CMSSW implementation of the digitization step of
0033     Monte Carlo simulation for the ECAL, HCAL, and preshower.
0034   \end{abstract} 
0035 
0036 \note{Preliminary version}
0037   
0038 \end{titlepage}
0039 
0040 \setcounter{page}{2}%JPP
0041 
0042 %==============================================================================
0043 % title page for many authors
0044 %
0045 %\begin{titlepage}
0046 %  \internalnote{2005/000}
0047 %  \title{CMS Technical Note Template}
0048 %
0049 %  \begin{Authlist}
0050 %    A.~Author\Iref{cern}, B.~Author\Iref{cern}, C.~Author\IAref{cern}{a},
0051 %    D.~Author\IIref{cern}{ieph}, E.~Author\IIAref{cern}{ieph}{b},
0052 %    F.~Author\Iref{ieph}
0053 %  \end{Authlist}
0054 %
0055 %  \Instfoot{cern}{CERN, Geneva, Switzerland}
0056 %  \Instfoot{ieph}{Institute of Experimental Physics, Hepcity, Wonderland}
0057 %  \Anotfoot{a}{On leave from prison}
0058 %  \Anotfoot{b}{Now at the Moon}
0059 %
0060 %  \begin{abstract}
0061 %    This is a template of a CMS paper, written in LaTeX,
0062 %    processed with {\it cmspaper.sty} style.
0063 %    It is based on the {\it cernart.sty} and {\it articlet.sty} styles.
0064 %    There are two versions of the title page.
0065 %    The current one is designed for many authors.
0066 %    The one on the previous page is for few authors.
0067 %    Just delete the one which you do not need.
0068 %  \end{abstract} 
0069 %  
0070 %\end{titlepage}
0071 %
0072 %==============================================================================
0073 
0074 \section{Introduction}
0075 
0076 
0077 \section{Calorimetry Framework (CaloSimAlgos)}
0078 
0079 The SimHits are the output of the CMSSW GEANT4 simulation
0080 \subsection{SimHits}
0081 
0082 The SimHits are the output of the CMSSW GEANT4 simulation, and represent energy deposits in
0083 detector volumes.  They are stored in the following branches of the event's ROOT file:
0084 
0085 \begin{verbatim}
0086  PCaloHits_SimG4Object_EcalHitsEB
0087  PCaloHits_SimG4Object_EcalHitsEE
0088  PCaloHits_SimG4Object_EcalHitsES
0089  PCaloHits_SimG4Object_HcalHits
0090 \end{verbatim}
0091 
0092 The SimHit objects themselves have four fields:
0093 \begin{itemize}
0094 \item sim track ID
0095 \item Detector ID
0096 \item energy
0097 \item time
0098 \end{itemize}
0099 
0100 The sim track ID refers to the generated particle, and the detector ID
0101 refers to the calorimeter cell, according to the numbering scheme
0102 described in~\ref{roadmap}.  The time represents the time-of-flight,
0103 with zero being the interaction time.  Pileup hits have their
0104 times adjusted by the mixing module to correspond to an earlier or
0105 later bunch crossing.  The energy represents different
0106 quantities in different subsystems.  In ECAL and preshower, it is the
0107 energy deposit, in GeV.  For Hcal Forward, it is the number of photoelectrons
0108 produced.  For the other HCAL subsystems, it is the sampled energy,
0109 which is a fixed fraction of the incident energy, as shown in table~\ref{sampling}.
0110 
0111     \begin{center}
0112       \begin{tabular}{|l|c|c|} \hline
0113        \label{sampling}
0114          SimHit Subdetector & meaning of ``energy()'' & Sampling Factor \\ \hline
0115          ECAL & Full incident energy & 1. \\ 
0116          Preshower & Full incident energy & 1. \\ 
0117          HCAL (HB \& HE) & Sampled energy & 117.\\
0118          HCAL (HO) & Sampled energy & 217. \\ 
0119          HCAL (HF1) & Photoelectrons & 2.84 \\
0120          HCAL (HF2) & Photoelectrons & 2.09 \\ \hline
0121       \end{tabular}
0122     \end{center}
0123 
0124 Note that SimHits have no information about their position
0125 within the detector, so no effects such as delays or attenuation
0126 based on position within the cell are possible.
0127 
0128 To give an idea of what SimHits look like, a typical 100 GeV central electron
0129 will create N SimHits across X crystals, and a typical 100 GeV central charged
0130 pion creates 85 Hcal SimHits across X cells.
0131 
0132 
0133 \subsection{Hit Correction}
0134 
0135 We allow an interface, CaloVHitCorrection, to apply corrections to the SimHits before
0136 they are processed.  This is currently used by the HCAL to implement
0137 time slewing.  
0138 
0139 Time slew is observed in the HCAL electronics, whereby smaller signals get delayed
0140 by up to 10 ns.  This effect is modeled by adding a delay to the SimHit time,
0141 based on the hit energy.  This may exaggerate the effect, however,
0142 because, as mentioned in the previous section, a signal can have many low-energy
0143 SimHits.  We plan to introduce a mechanism to merge SimHits in 
0144 each cell if they arrive within a nanosecond of each other, so the
0145 combined SimHits will more accurately correspond to the final
0146 signal amplitude.
0147 
0148 The HCAL time slew is shown in figure~\ref{fig:slew}, for three QIE bias settings: slow, medium, and fast.  HO uses the slow (and lower noise) setting, while the other subsystems use the medium setting.
0149 
0150 \begin{figure}[hbtp]
0151   \begin{center}
0152     \resizebox{10cm}{!}{\includegraphics{slew.eps}}
0153     \caption{Time delay as a function of signal size, in fC, for QIE bias settings of slow (top), medium, and fast.  HO uses the slow setting, while the other subsystems use the medium setting.}
0154     \label{fig:slew}
0155   \end{center}
0156 \end{figure}
0157 
0158 \subsection{Photostatistics}
0159 
0160 From the SimHit energy, the mean number of photoelectrons is
0161 fist found by multiplying by a constant found in the CaloSimParameterMap, the photomultiplierGain().
0162 A Poisson random number is thrown to obtain the amplitude of 
0163 the charge pulse.  The default values of this constant are shown
0164 in table~\ref{photostat}
0165 
0166 \begin{center}
0167       \begin{tabular}{|l|c|} \hline
0168        \label{photostat}
0169          Subdetector & SimHit to Photoelectrons factor  \\ \hline
0170          ECAL (EB) & 2250  pe/GeV \\
0171          ECAL (EE) & 1800 pe/GeV \\
0172          Preshower & (not needed) \\
0173          HCAL (HB,HE) & 2000 pe/ sampled GeV  \\
0174          HCAL (HB,HE) & 4000 pe/ sampled GeV  \\
0175          HCAL (HF) & (not needed)  \\ \hline
0176       \end{tabular}
0177 \end{center}
0178 
0179 
0180 \subsection{Shaping}
0181 
0182 The next step for each SimHit is to be converted into an analog signal,
0183 using a pulse shape interface from CaloVShape.  These analog signals
0184 are summed and stored in the CaloSamples class.  The samples are assumed
0185 to represent 25 ns spacing.
0186 
0187 The timing for these signals is determined by a field in the CaloSimParameterMap,
0188 the PeakBin.  In order to position the peak in the center of this time bin, we correct for the signal peaking
0189 time and speed-of-light
0190 propagation from the interaction at t=0, as well as allowing an additional time phase
0191 adjustment.  The timing parameters are shown in table~\ref{timing}
0192 
0193 \begin{center}
0194       \begin{tabular}{|l|c|c|c|c|} \hline
0195        \label{timing}
0196          Subdetector & Shaping Class & Shaper Peaking Time (ns) & Peak Bin & Timing Adjustment (ns) \\ \hline
0197          ECAL & EcalShape & 47.6 & 5/10 & 0 \\ 
0198          Preshower & ESShape & 20  & 2/3 & 0 \\ 
0199          HCAL (HB,HE,HO) & HcalShape & 14  & 5/10 & -2 \\
0200          HCAL (HF) & HFShape & 2 & 4/6 & -6 \\ \hline
0201       \end{tabular}
0202 \end{center}
0203 
0204 \section{Calibration Databases}
0205 
0206 The digitization is being designed to get whatever parameters it can from calibration 
0207 and conditions databases.  This will allow more realistic simulation of the actual
0208 detector: we can make hot channels hot, and noisy channels noisy.  It also lets
0209 us exercise the calibration algorithms in a "calibration challenge", where data
0210 will be simulated with a hidden set of pedestals and gains, which the physics
0211 groups must derive.
0212 
0213 The default mode of operation will be use a calibration interface, but with
0214 simple parameters, constant across all channels.  These parameters are hardcoded
0215 now, but could easily be made configurable.  The default pedestals and gains
0216 are shown in table~\ref{calibrations}.
0217 
0218 \subsection{Pedestals and Gains}
0219 \begin{center}
0220       \begin{tabular}{|l|c|c|c|c|c|} \hline
0221        \label{calibrations}
0222          Subdetector & Scale (LSB) & Pedestal & Pedestal Width & Gain & Gain Width \\ \hline
0223          EB Gain 12 & 35 MeV & 198.8 ADC & 1.10 ADC (40 MeV) & 12. & 0.2\%\\ 
0224          EB Gain  6 & 70 MeV & 199.4 ADC & 0.90 ADC  & 6. & 0.2\%\\ 
0225          EB Gain  1 & 420 MeV & 201.8 ADC & 0.62 ADC  & 1. & 0.2\%\\
0226          ECAL (EE) & XX MeV & 200 ADC ?  & 4 ADC? (150 MeV) & 1.  & 0.2\%\\ 
0227          Preshower &  XX MeV &  1000 ADC  & 3 ADC  & 9 ADC/keV (?) & 0. \\ 
0228          HCAL (HB, HE, HO) & 1 fC & 0.75 GeV  (5 ADC) & 0.1 GeV (0.56 ADC) &  0.177 GeV/fC (x2000 amp.) & 0\\
0229          HCAL (HF1) & 1 fC & 0.75 GeV (2 ADC) & 0.14 GeV (0.3 ADC)&  0.48 GeV/fC  & 0  \\ \hline
0230       \end{tabular}
0231 \end{center}
0232 
0233 \subsubsection{ECAL}
0234 
0235 \subsubsection{HCAL}
0236 
0237 The pedestals and gains for the HCAL are accessed not only by readout channel, but individually for each of the four readout capacitors in the channel.  These capacitors are accessed in a round-robin sequence.  One of the four is randomly picked to be the starting capacitor, and the starting capacitor number is kept consistent throughout the subdetector in the event.
0238 
0239 \section{Encoding}
0240 
0241 All Calorimetry subdetectors except Preshower define a non-linear scheme through which
0242 the analog signal amplitudes are packed into 16-bit data fields.  
0243 The encoding algorithms are described below:
0244 
0245 \subsection{ECAL}
0246 
0247 The ECAL samples come from a MultiGainPreAmplifier (MGPA), which has gains of 1, 6, and 12.
0248 The gain is encoded with two bits, while the ADC value is encoded with twelve bits.
0249 Each ADC count is hardcoded now to represent 35 MeV in the barrel and 60 MeV in the endcap,
0250 although we plan to move these numbers into a conditions database.
0251 
0252 We include a hysteresis effect in gain switching: we stay at the higher
0253 gain for five samples after it has been activated.
0254 
0255 \subsection{Preshower}
0256 
0257 The default mode of operations in the preshower is 
0258 to use a gain of 9 ADC counts per keV, up to a saturation
0259 of 4095 counts.  A calibration mode is also provided,
0260 with a gain of 50 ADC counts per keV.
0261 
0262 \subsection{HCAL}
0263 
0264 HCAL encoding is done through an interface to the conditions DB.
0265 The HCAL charge is coded into only seven bits.
0266 These bits represent one fC up to a value of 15 fC,
0267 then switch to two fC per bit up to thirty fC,
0268 switching to progressively coarser granularity, until
0269 a saturation at 10,000 fC.
0270 
0271 \section{Zero Suppression}
0272 \subsection{ECAL}
0273 \subsection{Preshower}
0274 \subsection{HCAL}
0275 
0276 \section{Trigger Primitives}
0277 \subsection{ECAL}
0278 
0279 These are just being implemented now.
0280 
0281 \subsection{HCAL}
0282 
0283 
0284 \section{Unit Tests and Validation}
0285 
0286 \subsection{Standalone tests}
0287 
0288 \subsubsection{ECAL}
0289 
0290 \subsubsection{HCAL}
0291 The HcalDigitizerTest is meant to be a standalone
0292 test of the digitization chain.
0293 
0294 We'll start with an example of an incident particle of 100 GeV energy
0295 in the HB.  The sampling factor is 117, so we expect the SimHit
0296 to have 0.855 GeV of energy.
0297 
0298 We next convert to photoelectrons, giving 0.855 * 2000 = 1710.
0299 These photoelectrons are subjected to Poisson statistics.
0300 Next they go through the shaping to give a pulse, still in the units
0301 of photoelectrons:
0302 
0303 \begin{verbatim}
0304 DetId=1107320961, 10samples
0305 0:0
0306 1:0
0307 2:0
0308 3:0
0309 4:814.103
0310 5:657.711
0311 6:185.86
0312 7:73.7753
0313 8:31.0982
0314 9:13.2264
0315 \end{verbatim}
0316 
0317 This pulse is converted to fC by multiplying by the
0318 factor of 0.33 found above.  Next, this analog signal
0319 is encoded, resulting in the following digi:
0320 
0321 \begin{verbatim}
0322 (HE 17,1,1) 10 samples  4 presamples
0323   ADC=4, capid=1, DV
0324   ADC=4, capid=2, DV
0325   ADC=4, capid=3, DV
0326   ADC=4, capid=0, DV
0327   ADC=58, capid=1, DV
0328   ADC=54, capid=2, DV
0329   ADC=33, capid=3, DV
0330   ADC=21, capid=0, DV
0331   ADC=14, capid=1, DV
0332   ADC=9, capid=2, DV
0333 \end{verbatim}
0334 
0335 No noise has been added to this digi.  Default running will add noise.
0336 
0337 HF behaves similarly, except with a much narrower time peak.
0338 Here are the analog signals for a 100 GeV incident particle,
0339 in the long and short fibers, respectively:
0340 
0341 \begin{verbatim}
0342 DetId=1207987969, 6samples
0343 0:0
0344 1:0
0345 2:0
0346 3:35.2
0347 4:0
0348 5:0
0349 
0350 DetId=1208004353, 6samples
0351 0:0
0352 1:0
0353 2:0
0354 3:47.8
0355 4:0
0356 5:0
0357 \end{verbatim}
0358 
0359 and here are the corresponding (noiseless) digis:
0360 
0361 \begin{verbatim}
0362 HF Frames
0363 (HF 30,1,1) 6 samples  3 presamples
0364   ADC=13, capid=0, DV
0365   ADC=13, capid=1, DV
0366   ADC=13, capid=2, DV
0367   ADC=93, capid=3, DV
0368   ADC=13, capid=0, DV
0369   ADC=13, capid=1, DV
0370 
0371 (HF 30,1,2) 6 samples  3 presamples
0372   ADC=13, capid=0, DV
0373   ADC=13, capid=1, DV
0374   ADC=13, capid=2, DV
0375   ADC=93, capid=3, DV
0376   ADC=13, capid=0, DV
0377   ADC=13, capid=1, DV
0378 \end{verbatim}
0379 
0380 \subsection{Diagnostics}
0381 
0382 All subdetectors SHOULD have a module which runs a passive check
0383 check of the digis to see if the pedestals and gains
0384 are implemented correctly.  To test the gains,
0385 these modules compare
0386 the RecHit energies of cells over a threshold
0387 with the summed SimHit energy in the cell, and 
0388 throw errors if the results are farther than
0389 the expected mean.  These modules 
0390 
0391 
0392 \section{Configurable parameters}
0393 
0394 Following is the list of configurable parameters for the system:
0395 
0396 \bf{SimCalorimetry/EcalSimProducers/data/ecaldigi.cfi:}
0397 
0398 \begin{verbatim}
0399 module ecaldigi = EcalDigiProducer
0400 {
0401   untracked double simHitToPhotoelectronsBarrel = 2250.
0402   untracked double simHitToPhotoelectronsEndcap = 1800.
0403   untracked double photoelectronsToAnalogBarrel = 0.000444444
0404   untracked double photoelectronsToAnalogEndcap = 0.000555555
0405   untracked double samplingFactor = 1.
0406   untracked double timePhase = 47.6683
0407   untracked int32 readoutFrameSize = 10
0408   untracked int32 binOfMaximum = 5
0409   untracked bool doPhotostatistics = true
0410   untracked bool doNoise = true
0411   untracked int32 ESGain = 1
0412   untracked bool doESNoise = true
0413   untracked double ESNoiseSigma = 3.
0414   untracked int32 ESBaseline = 1000
0415   untracked double ESMIPADC = 9.
0416   untracked double ESMIPkeV = 78.47
0417 }
0418 
0419 \end{verbatim}
0420 
0421 \bf{SimCalorimetry/HcalSimProducers/data/hcaldigi.cfi:}
0422 
0423 \begin{verbatim}
0424 module hcaldigi = HcalDigiProducer
0425 {
0426   bool doTimeSlew = true
0427   bool doNoise = true
0428 }
0429 \end{verbatim}
0430 
0431 \begin{figure}[hbtp]
0432   \begin{center}
0433     \resizebox{3cm}{!}{\includegraphics{cmslogo.eps}}
0434     \caption{Figure inserted by 
0435       \tt $\backslash$resizebox\{3cm\}\{!\}\{$\backslash$includegraphics\{cmslogo.eps\}\}.}
0436     \label{fig:ex1}
0437   \end{center}
0438 \end{figure}
0439 
0440 \begin{figure}[hbtp]
0441   \begin{center}
0442     \resizebox{5cm}{1cm}{\includegraphics{cmslogo.eps}}
0443     \caption{Figure inserted by 
0444        \tt $\backslash$resizebox\{5cm\}\{1cm\}\{$\backslash$includegraphics\{cmslogo.eps\}\}.}
0445     \label{fig:ex2}
0446   \end{center}
0447 \end{figure}
0448 
0449 Quite often it is convenient to place 2 figures side by side as a single
0450 floating body. An environment {\em 2figures} is provided for that
0451 (see Fig.~\ref{fig:ex3} and \ref{fig:ex4}).
0452 
0453 \begin{2figures}{hbtp}
0454   \resizebox{\linewidth}{0.5\linewidth}{\includegraphics{cmslogo.eps}} &
0455   \resizebox{\linewidth}{0.5\linewidth}{\includegraphics{cmslogo.eps}} \\
0456 %  \resizebox{\linewidth}{!}{\includegraphics{cmslogo.eps}} &
0457 %  \resizebox{\linewidth}{!}{\includegraphics{cmslogo.eps}} \\
0458   \caption{The left figure}
0459   \label{fig:ex3} &
0460   \caption{The right figure}
0461   \label{fig:ex4} \\
0462 \end{2figures}
0463 
0464 %------------------------------------------------------------------------------
0465 
0466 \section{Submitting a note}
0467 
0468 Please follow the rules and procedures defined on the CMSDOC server, or request them by e-mail to:\begin{center} {\em cmsnotes@cmsdoc.cern.ch} \end{center}
0469 
0470 \section{Reference example}
0471 
0472 References should be placed at the end of the note 
0473 (see example \cite{NOTE000}).
0474 
0475 \begin{thebibliography}{9}
0476   \bibitem {NOTE000} {\bf CMS Note 2005/000},
0477     X.Somebody et al.,
0478     {\em "CMS Note Template"}.
0479 \end{thebibliography}
0480  
0481 %------------------------------------------------------------------------------
0482 \pagebreak
0483 
0484 
0485 
0486 \end{document}