class EcalRecHit : public CaloRecHit {
public:
  typedef DetId key_type;
  // recHit flags
  enum Flags { 
          kGood=0,                   // channel ok, the energy and time measurement are reliable
          kPoorReco,                 // the energy is available from the UncalibRecHit, but approximate (bad shape, large chi2)
          kOutOfTime,                // the energy is available from the UncalibRecHit (sync reco), but the event is out of time
          kNoisy,                    // the channel is very noisy
          kPoorCalib,                // the energy is available from the UncalibRecHit, but the calibration of the channel is poor
          kSaturated,                // saturated channel (recovery not tried)
          kLeadingEdgeRecovered,     // saturated channel: energy estimated from the leading edge before saturation
          kNeighboursRecovered,      // saturated/isolated dead: energy estimated from neighbours
          kTowerRecovered,           // channel in TT with no data link, info retrieved from Trigger Primitive
          kFake,                     // the signal in the channel is a fake (e.g. a so-called spike)
          kFakeNeighbours,           // the signal in the channel is a fake and it is detected by looking at the neighbours
          kDead,                     // channel is dead and any recovery fails
          kKilled,                   // MC only flag: the channel is killed in the real detector
          kUnknown                   // to easy the interface with functions returning flags
  };
  // ES recHit flags
  enum ESFlags {
          kESGood,
          kESDead,
          kESHot,
          kESPassBX,
          kESTwoGoodRatios,
          kESBadRatioFor12,
          kESBadRatioFor23Upper,
          kESBadRatioFor23Lower,
          kESTS1Largest,
          kESTS3Largest,
          kESTS3Negative,
          kESSaturated,
          kESTS2Saturated,
          kESTS3Saturated,
          kESTS13Sigmas,
          kESTS15Sigmas
  };
/** bit structure of CaloRecHit::flags_ used in EcalRecHit:
   *
   *  | 32 | 31...25 | 24...12 | 11...5 | 4...1 |
   *     |      |         |         |       |
   *     |      |         |         |       +--> reco flags       ( 4 bits)
   *     |      |         |         +--> chi2 for in time events  ( 7 bits)
   *     |      |         +--> energy for out-of-time events      (13 bits)
   *     |      +--> chi2 for out-of-time events                  ( 7 bits)
   *     +--> spare                                               ( 1 bit )
   */
  EcalRecHit();         <= CONSTRUCTOR DECLARATION
  EcalRecHit(const DetId& id, float energy, float time, uint32_t flags = 0, uint32_t flagBits = 0); <= CONSTRUCTOR DECLARATION
*****GO TO /CMSSW/DataFormats/EcalRecHit/src/EcalRecHit.cc FOR THE CLASS CODE AND FUNCTION CODES FOR class EcalRecHit !!!!!!!!
  /// get the id
  // For the moment not returning a specific id for subdetector
  DetId id() const { return DetId(detid());}  <= FUNCTION member id() of class EcalRecHit !!!!!!!!!!!!!!!! DECLARATION (returns a type DetId object)
  bool isRecovered() const;                      <= FUNCTION member isRecovered() DECLARATION - (code comes later)
  bool isTimeValid() const;                        <= FUNCTION member isTimeValid() DECLARATION - (code comes later)
  bool isTimeErrorValid() const;
  uint32_t recoFlag() const { return 0xF & flags(); }
  float chi2Prob() const;          // not used
  float outOfTimeChi2Prob() const; // not used
  float chi2() const;
  float outOfTimeChi2() const;
  uint32_t flagBits() const { return flagBits_; }
  // set the energy for out of time events
  // (only energy >= 0 will be stored)
  float outOfTimeEnergy() const;
  float timeError() const;
  void setRecoFlag( uint32_t flag );
  void setChi2Prob( float chi2Prob );          // not used
  void setOutOfTimeChi2Prob( float chi2Prob ); // not used
  void setChi2( float chi2 );
  void setOutOfTimeChi2( float chi2 );
  void setOutOfTimeEnergy( float energy );
  void setFlagBits( uint32_t flagBits ) { flagBits_ = flagBits; }
  void setTimeError( uint8_t timeErrBits );
private:
  uint32_t flagBits_;
};
std::ostream& operator<<(std::ostream& s, const EcalRecHit& hit);
#endif

-- DavidCockerill - 23-Aug-2010

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2010-08-23 - DavidCockerill
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback