CDF II
CDF KITS
source navigation ]
diff markup ]
identifier search ]
freetext search ]
file search ]
 
Architecture: i386 ]
Version: 4.10.4 ] [ 4.10.5 ] [ 4.8.4 ] [ 4.8.4l3s ] [ 4.8.5 ] [ 4.9.0 ] [ 4.9.1 ] [ 4.9.1.hpt3 ] [ 4.9.1hpt3 ] [ 4.9.1top1 ] [ 5.0.0 ] [ 5.1.0 ] [ 5.1.0beamonly ] [ 5.1.1 ] [ 5.2.0 ] [ 5.3.0 ] [ 5.3.1 ] [ 5.3.1dsp ] [ 5.3.3 ] [ 5.3.3_nt ] [ 5.3.4 ] [ 6.1.1 ] [ 6.1.1b ] [ 6.1.2 ] [ 6.1.3 ] [ 6.1.4 ] [ 6.1.4int3 ] [ 6.1.4mc ] [ 6.1.4mc_a ] [ 6.1.6 ] [ development ]

001 //--------------------------------------------------------------------------
002 // File and Version Information:
003 //      SiStripNt.hh,v 1.1 1996/02/19 06:17:19 jake Exp
004 //
005 // Description:
006 //      Class SiStripNt. This is a simple example of a user module. It
007 //      books a few histograms, fills them and then saves them.
008 //
009 // Environment:
010 //      Software developed for the BaBar Detector at the SLAC B-Factory.
011 //
012 // Author List:
013 //      David R. Quarrie                Original Author
014 //      Bob Jacobsen                    Made it work with actual I/O
015 //
016 // Copyright Information:
017 //      Copyright (C) 1994              Lawrence Berkeley Laboratory
018 //
019 //------------------------------------------------------------------------
020 
021 #ifndef SISTRIPNT_HH
022 #define SISTRIPNT_HH
023 
024 //----------------------
025 // Base Class Headers --
026 //----------------------
027 #include "FrameMods/HepHistModule.hh"
028 #ifdef CDF
029 #include "BaBar/Cdf.hh"
030 #endif
031 //------------------------------------
032 // Collaborating Class Declarations --
033 //------------------------------------
034 class HepHist1D;
035 class HepHist2D;
036 class HepNtuple;
037 class SiPathFinder;
038 class ChipStatus;
039 class SiVrbInfoSet;
040 class MaterialIntegrator;
041 
042 // for some reason have to include this file to get templated class
043 #include "TrackingObjects/Tracks/CdfTrack.hh"
044 #include "Alignment/SvxBeam.hh"
045 #include "Alignment/CotBeam.hh"
046 #define NSIDE 2
047 #define PI_CONST 3.141592654
048 
049 // Array size for CWN
050 const int MaxStrip = 30;  //index for STR block in CWN
051 const int MaxClu   = 4;  //index for CLU block in CWN
052 // this number is too small
053 //const int MaxHit   = 16;
054 const int MaxHit   = 30;
055 
056 //              ---------------------
057 //              -- Class Interface --
058 //              ---------------------
059  
060 class SiStripNt : public HepHistModule {
061 
062 //--------------------
063 // Instance Members --
064 //--------------------
065 
066 public:
067   
068   // Constructors
069   SiStripNt( const char* const theName = "SiStripNt", 
070              const char* const theDescription = "Histogramming example");
071   
072   // Destructor
073   virtual ~SiStripNt( );
074   
075   // Operations
076   virtual AppResult      bookHistograms( void );
077   virtual AppResult      beginRun( AbsEvent* aRun );
078   virtual AppResult      fillHistograms( AbsEvent* event );
079   virtual AppModule*     clone( const char* cloneName );
080   
081   const char*  rcsId( ) const;
082   
083 private:
084 
085   // TalkTo's
086   AbsParmBool         _debug, _useCircleFit, _monteCarlo, _intrinsic;
087   AbsParmGeneral<int> _missingLayer;
088   AbsParmString _inputBanksDescription;
089   AbsParmGeneral<double> _ptCut;
090 
091   // Auxiliary path finder
092   SiPathFinder *siPathFinder;
093   MaterialIntegrator      *_siMaterialIntegrator;
094 
095   // Ntuple 
096   bool initNtuple;
097   HepNtuple*       StripNtuple;
098   
099   // Controls the missing layer
100   int missingLayer;
101 
102   // Access to hardware database for integrated ladders
103   // This must be remade for each new run in beginRun()
104   ChipStatus *_chipStat;
105   SiVrbInfoSet* _svxDaqInfoSet;
106   SiVrbInfoSet* _islDaqInfoSet;
107 
108   // beam spot
109   SvxBeam svxbeam;
110   CotBeam cotbeam;
111 
112   ////////////////////////////////////////////////////////////
113   // ntuple variables 
114   ////////////////////////////////////////////////////////////
115   // common
116   int eventnum,runnum;
117   float pt;
118   float eta, curvature, d0, phi0, z0;        // Helix parameters
119   float deta, dcurvature, dd0, dphi0, dz0;   // Helix parameter errors
120   int   cotnhits;                            // COT hits
121   int   cotnax;                              // COT axial hits
122   int   cotnst;                              // COT stereo hits
123   float cotchisq;                            // COT chi squared
124   int   trnphi,trnsas,trnz;                  // number of silicon hits
125   float beamx, beamy, zb, db;   // Beam spot, closest approach
126   float pcos32;           // pcos^{3/2}theta (M. Scat. parameter)
127   float mom;              // Momentum
128   int   trkq;             // Track Charge
129   float tktheta;          // Track theta
130   float xc,yc;            // Center of track circle in r-phi plane
131   float mline, bline;     // tangent line to track at closest approach
132   float xpca0, ypca0;     // Point of closest approach to 0,0
133 
134   // intersection of the track
135   int   bulkhead,layer,phiwedge;
136   int   chipidp;         // Numbered 1-3168 in the SVX
137   int   chipidz;
138   int   ladder;           // Numbered 1-180 in SVX
139   int   hlad;             // Numbered 1-360 in SVX
140   int   overlap;       // If track intersects more than one wedge
141   int   stat;          // Status of halfladder
142                        // -1=not integrated
143                        // Bit 0= readAll
144                        // Bit 1= dpsOn
145   float sietap;       // Fractional distance of track intersection 
146   float sietaz;        //  to edge of a strip (0->0.5)
147   float phiint;        // Phi of intersection
148   float philoc;        // Local phi coord of intersection
149   float yloc;          // Local y coord of intersection (orth. to z in wafer plane)
150   float zloc;          // Local z side coord of intersection
151   float zcent;         // Z of center of halfladder
152   // NEW
153   float xint;          // X of intersection
154   // NEW
155   float yint;          // Y of intersection
156   float zint;          // Z of intersection
157   float xintC,yintC,zintC; // Intersection corrected for wafer positions
158   float entangph;      // Entrance angle of track in phi
159   float entangz;       // Entrance angle of track in z
160   int   rodotphi;      // Readout direction (ReadOut dot PhiHat) 
161   int   strpnint;      // phi strip number of intersection
162   int   strznint;      // z side strip number of intersection
163 
164   // information about hit chip
165   int   bandWidth;     // chip's bandwidth setting 
166   int   threshold;     // threshold setting
167   int   beState;       // back-end state 
168   int   timeSinceL1A;  // time since Level 1 accept
169 
170   // hits on the track
171   int   nhit;
172   float hitq[MaxHit];
173   int   hitlay[MaxHit];
174   int   hitside[MaxHit];
175   float hitdist[MaxHit];
176   float hiterr[MaxHit];
177   int   hitnstr[MaxHit];
178   float hitglor[MaxHit];
179   float hitglop[MaxHit];
180   float hitgloz[MaxHit];
181   float hitintr[MaxHit];
182   float hitintp[MaxHit];
183   float hitintz[MaxHit];
184 
185   // clusters at intersection
186   int   nclu,nclup,ncluz;                       // number of cluster to index array
187   float clustq[NSIDE][MaxClu];                  // cluster charge
188   float dist[NSIDE][MaxClu];                    // distance to track
189   float distC[NSIDE][MaxClu];                   // distance to track corr for wafer pos and bow
190   int   nstrip[NSIDE][MaxClu];                  // number strips in cluster
191   int   hasbad[NSIDE][MaxClu];                  // has a bad strip
192   int   neibad[NSIDE][MaxClu];                  // a neighbor is bad
193   float avnoise[NSIDE][MaxClu];                 // average noise on 
194   float maxnoise[NSIDE][MaxClu];                // noise of highest charge strip
195   float sumnoise[NSIDE][MaxClu];                // quadrature sum of strip noise
196   float neff[NSIDE][MaxClu];                    // effective number of strips (charge weighted)
197   float maxstripq[NSIDE][MaxClu];               // charge of highest strip in cluster
198   int   maxstripn[NSIDE][MaxClu];               // number of maximum strip in cluster
199   float maxstripdist[NSIDE][MaxClu];            // distance to track of maximum strip
200   // new (09/05/02)
201   int   clusfrst[NSIDE][MaxClu];                // number of the first strip in cluster
202   int   cluslast[NSIDE][MaxClu];                // number of the last strip in cluster
203   int   cluscntr[NSIDE][MaxClu];                // number of the center strip in cluster
204   
205   // strips
206   // phi side is strp, z side is strz
207   int   nstrp,nstrz;                // number of strip entries (size of dynamic array)
208   int   str_rel[NSIDE][MaxStrip];   // relative position to intersection (i.e. the index in the array)
209   float str_q[NSIDE][MaxStrip];     // strip charge adc counts    
210   float str_ped[NSIDE][MaxStrip];   // strip pedestal
211   float str_pedd[NSIDE][MaxStrip];  // strip pedestal after DPS emulation
212   float str_noi[NSIDE][MaxStrip];   // strip noise
213   int   str_bad[NSIDE][MaxStrip];   // strip bad flag
214   int   str_num[NSIDE][MaxStrip];   // strip number (0 to 128*number of chips)
215   float str_local[NSIDE][MaxStrip]; // local coordinate of strip
216   
217   // Method to fit hits with COT curvature and Si hits only
218   int fitCircle(const CdfTrack_clnk &, Helix &);
219 };
220 
221 #endif

source navigation ] diff markup ] identifier search ] freetext search ] file search ]

This page was automatically generated by the LXR engine.
The LXR team
Valid HTML 4.01!

Send problems or questions to cdfcode@fnal.gov