Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:12

0001 #ifndef HCALTBTIMING_H
0002 #define HCALTBTIMING_H 1
0003 
0004 #include <string>
0005 #include <iostream>
0006 #include <vector>
0007 
0008 /** \class HcalTBTiming
0009 
0010 This class contains timing information unpacked from the
0011 Time-to-Digital Converter (TDC).
0012       
0013   $Date: 2006/08/25 17:25:30 $
0014   $Revision: 1.8 $
0015   \author P. Dudero - Minnesota
0016   */
0017 class HcalTBTiming {
0018 public:
0019   HcalTBTiming();
0020 
0021   // Getter methods
0022 
0023   /// Returns the trigger time in ns
0024   double triggerTime() const { return triggerTime_; }
0025 
0026   /// Returns the Level 1 Accept time in ns
0027   double ttcL1Atime() const { return ttcL1Atime_; }
0028 
0029   /// Returns the laser activation time in ns
0030   double laserFlash() const { return laserFlash_; }
0031   /// Returns the QIE phase for 2003 testbeam data (zero otherwise)
0032   double qiePhase() const { return qiePhase_; }
0033 
0034   /// Returns the TOF1S time (zero otherwise)
0035   double TOF1Stime() const { return TOF1Stime_; }
0036   /// Returns the TOF1J time (zero otherwise)
0037   double TOF1Jtime() const { return TOF1Jtime_; }
0038   /// Returns the TOF2S time (zero otherwise)
0039   double TOF2Stime() const { return TOF2Stime_; }
0040   /// Returns the TOF2J time (zero otherwise)
0041   double TOF2Jtime() const { return TOF2Jtime_; }
0042 
0043   /// Returns the number of hits from Beam Coincidence
0044   int BeamCoincidenceCount() const { return beamCoincidenceHits_.size(); }
0045   /// Returns the number of hits from muon veto scintillator M1
0046   int M1Count() const { return m1hits_.size(); }
0047   /// Returns the number of hits from muon veto scintillator M2
0048   int M2Count() const { return m2hits_.size(); }
0049   /// Returns the number of hits from muon veto scintillator M3
0050   int M3Count() const { return m3hits_.size(); }
0051 
0052   /// Returns the number of hits from scintillator S1, which is 12cm x 12cm.
0053   int S1Count() const { return s1hits_.size(); }
0054   /// Returns the number of hits from scintillator S2, which is 4cm x 4cm.
0055   int S2Count() const { return s2hits_.size(); }
0056   /// Returns the number of hits from scintillator S3, which is 2cm x 2cm.
0057   int S3Count() const { return s3hits_.size(); }
0058   /// Returns the number of hits from scintillator S4, which is 12cm x 12cm.
0059   int S4Count() const { return s4hits_.size(); }
0060 
0061   /// Returns the number of hits from beam halo counter up horizontal
0062   int BH1Count() const { return bh1hits_.size(); }
0063   /// Returns the number of hits from beam halo counter left from particle view
0064   int BH2Count() const { return bh2hits_.size(); }
0065   /// Returns the number of hits from beam halo counter right from particle view
0066   int BH3Count() const { return bh3hits_.size(); }
0067   /// Returns the number of hits from beam halo counter down horizontal
0068   int BH4Count() const { return bh4hits_.size(); }
0069 
0070   /// Returns the indexed hit time from Beam Coincidence
0071   double BeamCoincidenceHits(int index) const { return beamCoincidenceHits_[index]; }
0072   /// Returns the indexed hit time from muon veto scintillator M1
0073   double M1Hits(int index) const { return m1hits_[index]; }
0074   /// Returns the indexed hit time from muon veto scintillator M2
0075   double M2Hits(int index) const { return m2hits_[index]; }
0076   /// Returns the indexed hit time from muon veto scintillator M3
0077   double M3Hits(int index) const { return m3hits_[index]; }
0078 
0079   /// Returns the indexed hit time from scintillator S1, which is 12cm x 12cm.
0080   double S1Hits(int index) const { return s1hits_[index]; }
0081   /// Returns the indexed hit time from scintillator S2, which is 4cm x 4cm.
0082   double S2Hits(int index) const { return s2hits_[index]; }
0083   /// Returns the indexed hit time from scintillator S3, which is 2cm x 2cm.
0084   double S3Hits(int index) const { return s3hits_[index]; }
0085   /// Returns the indexed hit time from scintillator S4, which is 12cm x 12cm.
0086   double S4Hits(int index) const { return s4hits_[index]; }
0087 
0088   /// Returns the indexed hit time from beam halo counter UP HORIZONTAL.
0089   double BH1Hits(int index) const { return bh1hits_[index]; }
0090   /// Returns the indexed hit time from from beam halo counter BEAM LEFT FROM PARTICLE'S VIEW.
0091   double BH2Hits(int index) const { return bh2hits_[index]; }
0092   /// Returns the indexed hit time from beam halo counter BEAM RIGHT FROM PARTICLE'S VIEW.
0093   double BH3Hits(int index) const { return bh3hits_[index]; }
0094   /// Returns the indexed hit time from beam halo counter DOWN HORZINTAL.
0095   double BH4Hits(int index) const { return bh4hits_[index]; }
0096   /// Returns the hit in the specified channel
0097   int V775(int index) const { return V775_[index]; }
0098 
0099   // Setter methods
0100   void setTimes(const double trigger_time,
0101                 const double ttc_l1a_time,
0102                 const double laser_flash,
0103                 const double qie_phase,
0104                 const double TOF1S_time,
0105                 const double TOF1J_time,
0106                 const double TOF2S_time,
0107                 const double TOF2J_time);
0108 
0109   void setHits(const std::vector<double>& m1hits,
0110                const std::vector<double>& m2hits,
0111                const std::vector<double>& m3hits,
0112                const std::vector<double>& s1hits,
0113                const std::vector<double>& s2hits,
0114                const std::vector<double>& s3hits,
0115                const std::vector<double>& s4hits,
0116                const std::vector<double>& bh1hits,
0117                const std::vector<double>& bh2hits,
0118                const std::vector<double>& bh3hits,
0119                const std::vector<double>& bh4hits,
0120                const std::vector<double>& beamCoincidenceHits);
0121 
0122   void setV775(int* V775);
0123 
0124 private:
0125   double triggerTime_;
0126   double ttcL1Atime_;
0127   double laserFlash_;
0128   double qiePhase_;
0129   double TOF1Stime_;
0130   double TOF1Jtime_;
0131   double TOF2Stime_;
0132   double TOF2Jtime_;
0133 
0134   int V775_[32];
0135   std::vector<double> beamCoincidenceHits_;
0136 
0137   std::vector<double> m1hits_;
0138   std::vector<double> m2hits_;
0139   std::vector<double> m3hits_;
0140 
0141   std::vector<double> s1hits_;
0142   std::vector<double> s2hits_;
0143   std::vector<double> s3hits_;
0144   std::vector<double> s4hits_;
0145 
0146   std::vector<double> bh1hits_;
0147   std::vector<double> bh2hits_;
0148   std::vector<double> bh3hits_;
0149   std::vector<double> bh4hits_;
0150 };
0151 
0152 std::ostream& operator<<(std::ostream& s, const HcalTBTiming& htbtmg);
0153 
0154 #endif