21 #ifndef CCDDigitizer_h 
   22 #define CCDDigitizer_h 1 
   24 #include "marlin/Processor.h" 
   26 #include "EVENT/SimTrackerHit.h" 
   27 #include "IMPL/TrackerHitImpl.h" 
   28 #include "IMPL/SimTrackerHitImpl.h" 
   31 #include "MyG4UniversalFluctuationForSi.h" 
   32 #include "EVENT/LCIO.h" 
   33 #include <IMPL/LCCollectionVec.h> 
   37 #ifdef CCD_diagnostics 
   38 #include <AIDA/IHistogramFactory.h> 
   39 #include <AIDA/IHistogram1D.h> 
   40 #include <AIDA/IHistogram2D.h> 
   41 #include <AIDA/IAxis.h> 
   42 #include <AIDA/ITree.h> 
   44 #include <marlin/Global.h> 
   45 #include <marlin/VerbosityLevels.h> 
   46 #include <marlin/AIDAProcessor.h> 
   49 using namespace lcio ;
 
   50 using namespace marlin ;
 
   60 typedef std::vector<IonisationPoint> IonisationPointVec;
 
   61 typedef std::vector<TrackerHitImpl*> TrackerHitImplVec;
 
   62 typedef std::vector<SimTrackerHitImpl*> SimTrackerHitImplVec;
 
   66 #define maxpixx 9// grid size in local(ladder) x axis 
   67 #define maxpixy 9// grid size in local(ladder) y axis 
   71 #define Numstepx 10// Number of points at which amplitude of diffusion is calculated within one pixel in x direction 
   72 #define Numstepy 10// Number of points at which amplitude of diffusion is calculated within one pixel in y direction 
   87   virtual Processor*  newProcessor() { 
return new CCDDigitizer ; }
 
  100   virtual void processRunHeader( LCRunHeader* run ) ;
 
  104   virtual void processEvent( LCEvent * evt ) ; 
 
  108   virtual void check( LCEvent * evt ) ; 
 
  120   std::string _outputCollectionName;
 
  121   std::string _colVTXRelation ;
 
  143   double _electronsPerKeV;
 
  144   double _segmentDepth;
 
  145   double _currentTotalCharge;
 
  147   std::vector<int> _laddersInLayer;
 
  148   std::vector<float> _layerRadius;
 
  149   std::vector<float> _layerThickness;
 
  150   std::vector<float> _layerHalfThickness;
 
  151   std::vector<float> _layerLadderLength;
 
  152   std::vector<float> _layerLadderHalfWidth;
 
  153   std::vector<float> _layerPhiOffset;
 
  154   std::vector<float> _layerActiveSiOffset;
 
  155   std::vector<float> _layerHalfPhi;
 
  156   std::vector<float> _layerLadderGap;
 
  157   std::vector<float> _bkgdHitsInLayer;
 
  158   std::vector<float> _layerLadderWidth;
 
  162   int _generateBackground;
 
  163   double _currentParticleMomentum;
 
  164   double _currentParticleEnergy;
 
  165   double _currentParticleMass;
 
  170   int _produceFullPattern;
 
  171   int _numberOfSegments;
 
  173   int _PoissonSmearing;
 
  174   int _electronicEffects;
 
  183   double _currentLocalPosition[3];
 
  184   double _electronicNoise;
 
  185   double _segmentLength;
 
  187   IonisationPointVec _ionisationPoints;
 
  194   void FindLocalPosition(SimTrackerHit * hit,
 
  195                          double * localPosition,
 
  196                          double * localDirection);
 
  198   void TransformToLab(
double * xLoc, 
double * xLab);
 
  199   void ProduceIonisationPoints( SimTrackerHit * hit);
 
  200   void diffusion(
double xdif,
double ydif, 
double sigma);
 
  202   void ProduceHits(SimTrackerHitImplVec & simTrkVec);
 
  203   void TransformXYToCellID(
double x, 
double y, 
 
  205                            int & iy,
double & xdif,
double & ydif);  
 
  206   void TransformCellIDToXY(
int ix, 
int iy,
 
  207                            double & x, 
double & y);
 
  208   void PoissonSmearer( SimTrackerHitImplVec & simTrkVec );
 
  209   void GainSmearer( SimTrackerHitImplVec & simTrkVec );
 
  210   void PrintInfo( SimTrackerHit * simTrkHit, TrackerHitImpl * recoHit);
 
  211   TrackerHitImpl * ReconstructTrackerHit(SimTrackerHitImplVec & simTrkVec );
 
  212   void TrackerHitToLab( TrackerHitImpl * recoHit );
 
  214   void generateBackground(LCCollectionVec * col);
 
  215   void settanlorentzangle(
double B, 
double E, 
double mu, 
double T);
 
  216   void settanlorentzangleb(
double B, 
double E, 
double mu, 
double T);
 
  223   std::vector <SimTrackerHitImplVec> _hitsInLayer;
 
  229   double pxl[maxpixx][maxpixy];
 
  237   double sigmacoefficient;
 
  245   double TanLorentzAngle;
 
  248 #ifdef CCD_diagnostics 
  251   AIDA::IHistogram1D* histdist;
 
  252   AIDA::IHistogram1D* histcluster;
 
  253   AIDA::IHistogram2D* histclustxy;
 
  254   AIDA::IHistogram1D* histcharge;
 
  255   AIDA::IHistogram2D* histdistxy;
 
  256   AIDA::IHistogram1D* histNionpoint;
 
  257   AIDA::IHistogram1D* histzcoord;
 
  258   AIDA::IHistogram1D* histenergy;
 
  259   AIDA::IHistogram1D* histsignal;
 
  260   AIDA::IHistogram1D* histsignalframe;
 
  261   AIDA::IHistogram1D* histenergycentre;
 
Definition: CCDDigitizer.h:83
 
Definition: MyG4UniversalFluctuationForSi.h:52
 
int _nRun
Run number. 
Definition: CCDDigitizer.h:125
 
double _cutOnDeltaRays
tangent of Lorentz angle 
Definition: CCDDigitizer.h:133
 
double _diffusionCoefficient
Diffusion coefficient in mm for nominla layer thickness. 
Definition: CCDDigitizer.h:136
 
std::string _colName
Input collection name. 
Definition: CCDDigitizer.h:119
 
int _nEvt
Event number. 
Definition: CCDDigitizer.h:129
 
Definition: CCDDigitizer.h:52