CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Attributes
HcalHitReconstructor Class Reference

#include <HcalHitReconstructor.h>

Inheritance diagram for HcalHitReconstructor:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginRun (edm::Run const &r, edm::EventSetup const &es) overridefinal
 
virtual void endRun (edm::Run const &r, edm::EventSetup const &es) overridefinal
 
 HcalHitReconstructor (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
virtual ~HcalHitReconstructor ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

typedef void(HcalSimpleRecAlgo::* SetCorrectionFcn )(boost::shared_ptr< AbsOOTPileupCorrection >)
 

Private Attributes

bool correctTiming_
 
std::string dataOOTCorrectionCategory_
 
std::string dataOOTCorrectionName_
 
DetId::Detector det_
 
bool digiTimeFromDB_
 
bool dropZSmarkedPassed_
 
int firstAuxTS_
 
int firstSample_
 
HBHEStatusBitSetterhbheFlagSetter_
 
HBHETimeProfileStatusBitSetterhbheHSCPFlagSetter_
 
HBHEPulseShapeFlagSetterhbhePulseShapeFlagSetter_
 
HBHETimingShapedFlagSetterhbheTimingShapedFlagSetter_
 
HcalHFStatusBitFromDigishfdigibit_
 
const HcalFlagHFDigiTimeParamsHFDigiTimeParams
 
HcalHF_PETalgorithmhfPET_
 
HcalHF_S9S1algorithmhfS8S1_
 
HcalHF_S9S1algorithmhfS9S1_
 
HFTimingTrustFlagHFTimingTrustFlagSetter_
 
edm::InputTag inputLabel_
 
std::string mcOOTCorrectionCategory_
 
std::string mcOOTCorrectionName_
 
HcalRecoParamsparamTS
 
HcalSimpleRecAlgo reco_
 
bool recoParamsFromDB_
 
int samplesToAdd_
 
HcalADCSaturationFlagsaturationFlagSetter_
 
bool setHSCPFlags_
 
bool setNoiseFlags_
 
SetCorrectionFcn setPileupCorrection_
 
bool setPulseShapeFlags_
 
bool setSaturationFlags_
 
bool setTimingTrustFlags_
 
int subdet_
 
HcalOtherSubdetector subdetOther_
 
HcalTopologytheTopology
 
edm::EDGetTokenT
< HcalCalibDigiCollection
tok_calib_
 
edm::EDGetTokenT
< HBHEDigiCollection
tok_hbhe_
 
edm::EDGetTokenT
< HFDigiCollection
tok_hf_
 
edm::EDGetTokenT
< HODigiCollection
tok_ho_
 
bool tsFromDB_
 
bool useLeakCorrection_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Author
J. Temple & E. Yazgan Based on HcalSimpleReconstructor.h by J. Mans

Definition at line 42 of file HcalHitReconstructor.h.

Member Typedef Documentation

typedef void(HcalSimpleRecAlgo::* HcalHitReconstructor::SetCorrectionFcn)(boost::shared_ptr< AbsOOTPileupCorrection >)
private

Definition at line 52 of file HcalHitReconstructor.h.

Constructor & Destructor Documentation

HcalHitReconstructor::HcalHitReconstructor ( const edm::ParameterSet ps)
explicit

Definition at line 23 of file HcalHitReconstructor.cc.

References DetId::Calo, gather_cfg::cout, dataOOTCorrectionCategory_, dataOOTCorrectionName_, det_, digiTimeFromDB_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), hbheFlagSetter_, hbheHSCPFlagSetter_, hbhePulseShapeFlagSetter_, hbheTimingShapedFlagSetter_, HcalBarrel, HcalCalibration, HcalForward, HcalOther, HcalOuter, hfdigibit_, hfPET_, hfS8S1_, hfS9S1_, HFTimingTrustFlagSetter_, inputLabel_, mcOOTCorrectionCategory_, mcOOTCorrectionName_, recoParamsFromDB_, saturationFlagSetter_, HcalSimpleRecAlgo::setHBHEPileupCorrection(), HcalSimpleRecAlgo::setHFPileupCorrection(), HcalSimpleRecAlgo::setHOPileupCorrection(), setHSCPFlags_, setNoiseFlags_, setPileupCorrection_, setPulseShapeFlags_, setSaturationFlags_, setTimingTrustFlags_, AlCaHLTBitMon_QueryRunRegistry::string, subdet_, HcalZDCDetId::SubdetectorId, subdetOther_, tok_calib_, tok_hbhe_, tok_hf_, and tok_ho_.

23  :
24  reco_(conf.getParameter<bool>("correctForTimeslew"),
25  conf.getParameter<bool>("correctForPhaseContainment"),
26  conf.getParameter<double>("correctionPhaseNS")),
28  inputLabel_(conf.getParameter<edm::InputTag>("digiLabel")),
29  correctTiming_(conf.getParameter<bool>("correctTiming")),
30  setNoiseFlags_(conf.getParameter<bool>("setNoiseFlags")),
31  setHSCPFlags_(conf.getParameter<bool>("setHSCPFlags")),
32  setSaturationFlags_(conf.getParameter<bool>("setSaturationFlags")),
33  setTimingTrustFlags_(conf.getParameter<bool>("setTimingTrustFlags")),
34  setPulseShapeFlags_(conf.getParameter<bool>("setPulseShapeFlags")),
35  dropZSmarkedPassed_(conf.getParameter<bool>("dropZSmarkedPassed")),
36  firstAuxTS_(conf.getParameter<int>("firstAuxTS")),
37  firstSample_(conf.getParameter<int>("firstSample")),
38  samplesToAdd_(conf.getParameter<int>("samplesToAdd")),
39  tsFromDB_(conf.getParameter<bool>("tsFromDB")),
40  useLeakCorrection_(conf.getParameter<bool>("useLeakCorrection")),
46  paramTS(0),
47  theTopology(0)
48 {
49  // register for data access
50  tok_hbhe_ = consumes<HBHEDigiCollection>(inputLabel_);
51  tok_ho_ = consumes<HODigiCollection>(inputLabel_);
52  tok_hf_ = consumes<HFDigiCollection>(inputLabel_);
53  tok_calib_ = consumes<HcalCalibDigiCollection>(inputLabel_);
54 
55  std::string subd=conf.getParameter<std::string>("Subdetector");
56  //Set all FlagSetters to 0
57  /* Important to do this! Otherwise, if the setters are turned off,
58  the "if (XSetter_) delete XSetter_;" commands can crash
59  */
60 
61  recoParamsFromDB_ = conf.getParameter<bool>("recoParamsFromDB");
62  // recoParamsFromDB_ = false ; // trun off for now.
63 
64  // std::cout<<" HcalHitReconstructor recoParamsFromDB_ "<<recoParamsFromDB_<<std::endl;
65 
66  hbheFlagSetter_ = 0;
70  hfdigibit_ = 0;
71 
72  hfS9S1_ = 0;
73  hfS8S1_ = 0;
74  hfPET_ = 0;
77  digiTimeFromDB_ = false; // only need for HF
78 
80  {
81  const edm::ParameterSet& pssat = conf.getParameter<edm::ParameterSet>("saturationParameters");
82  saturationFlagSetter_ = new HcalADCSaturationFlag(pssat.getParameter<int>("maxADCvalue"));
83  }
84 
85  if (!strcasecmp(subd.c_str(),"HBHE")) {
88  bool timingShapedCutsFlags = conf.getParameter<bool>("setTimingShapedCutsFlags");
89  if (timingShapedCutsFlags)
90  {
91  const edm::ParameterSet& psTshaped = conf.getParameter<edm::ParameterSet>("timingshapedcutsParameters");
92  hbheTimingShapedFlagSetter_ = new HBHETimingShapedFlagSetter(psTshaped.getParameter<std::vector<double> >("tfilterEnvelope"),
93  psTshaped.getParameter<bool>("ignorelowest"),
94  psTshaped.getParameter<bool>("ignorehighest"),
95  psTshaped.getParameter<double>("win_offset"),
96  psTshaped.getParameter<double>("win_gain"));
97  }
98 
99  if (setNoiseFlags_)
100  {
101  const edm::ParameterSet& psdigi =conf.getParameter<edm::ParameterSet>("flagParameters");
102  hbheFlagSetter_=new HBHEStatusBitSetter(psdigi.getParameter<double>("nominalPedestal"),
103  psdigi.getParameter<double>("hitEnergyMinimum"),
104  psdigi.getParameter<int>("hitMultiplicityThreshold"),
105  psdigi.getParameter<std::vector<edm::ParameterSet> >("pulseShapeParameterSets")
106  );
107  } // if (setNoiseFlags_)
108  if (setHSCPFlags_)
109  {
110  const edm::ParameterSet& psHSCP = conf.getParameter<edm::ParameterSet>("hscpParameters");
112  psHSCP.getParameter<double>("r1Max"),
113  psHSCP.getParameter<double>("r2Min"),
114  psHSCP.getParameter<double>("r2Max"),
115  psHSCP.getParameter<double>("fracLeaderMin"),
116  psHSCP.getParameter<double>("fracLeaderMax"),
117  psHSCP.getParameter<double>("slopeMin"),
118  psHSCP.getParameter<double>("slopeMax"),
119  psHSCP.getParameter<double>("outerMin"),
120  psHSCP.getParameter<double>("outerMax"),
121  psHSCP.getParameter<double>("TimingEnergyThreshold"));
122  } // if (setHSCPFlags_)
124  {
125  const edm::ParameterSet &psPulseShape = conf.getParameter<edm::ParameterSet>("pulseShapeParameters");
127  psPulseShape.getParameter<double>("MinimumChargeThreshold"),
128  psPulseShape.getParameter<double>("TS4TS5ChargeThreshold"),
129  psPulseShape.getParameter<unsigned int>("TrianglePeakTS"),
130  psPulseShape.getParameter<std::vector<double> >("LinearThreshold"),
131  psPulseShape.getParameter<std::vector<double> >("LinearCut"),
132  psPulseShape.getParameter<std::vector<double> >("RMS8MaxThreshold"),
133  psPulseShape.getParameter<std::vector<double> >("RMS8MaxCut"),
134  psPulseShape.getParameter<std::vector<double> >("LeftSlopeThreshold"),
135  psPulseShape.getParameter<std::vector<double> >("LeftSlopeCut"),
136  psPulseShape.getParameter<std::vector<double> >("RightSlopeThreshold"),
137  psPulseShape.getParameter<std::vector<double> >("RightSlopeCut"),
138  psPulseShape.getParameter<std::vector<double> >("RightSlopeSmallThreshold"),
139  psPulseShape.getParameter<std::vector<double> >("RightSlopeSmallCut"),
140  psPulseShape.getParameter<std::vector<double> >("TS4TS5LowerThreshold"),
141  psPulseShape.getParameter<std::vector<double> >("TS4TS5LowerCut"),
142  psPulseShape.getParameter<std::vector<double> >("TS4TS5UpperThreshold"),
143  psPulseShape.getParameter<std::vector<double> >("TS4TS5UpperCut"),
144  psPulseShape.getParameter<bool>("UseDualFit"),
145  psPulseShape.getParameter<bool>("TriangleIgnoreSlow"));
146  } // if (setPulseShapeFlags_)
147 
148  produces<HBHERecHitCollection>();
149  } else if (!strcasecmp(subd.c_str(),"HO")) {
152  produces<HORecHitCollection>();
153  } else if (!strcasecmp(subd.c_str(),"HF")) {
156  digiTimeFromDB_=conf.getParameter<bool>("digiTimeFromDB");
157 
158  if (setTimingTrustFlags_) {
159 
160  const edm::ParameterSet& pstrust = conf.getParameter<edm::ParameterSet>("hfTimingTrustParameters");
161  HFTimingTrustFlagSetter_=new HFTimingTrustFlag(pstrust.getParameter<int>("hfTimingTrustLevel1"),
162  pstrust.getParameter<int>("hfTimingTrustLevel2"));
163  }
164 
165  if (setNoiseFlags_)
166  {
167  const edm::ParameterSet& psdigi =conf.getParameter<edm::ParameterSet>("digistat");
168  const edm::ParameterSet& psTimeWin =conf.getParameter<edm::ParameterSet>("HFInWindowStat");
169  hfdigibit_=new HcalHFStatusBitFromDigis(psdigi,psTimeWin);
170 
171  const edm::ParameterSet& psS9S1 = conf.getParameter<edm::ParameterSet>("S9S1stat");
172  hfS9S1_ = new HcalHF_S9S1algorithm(psS9S1.getParameter<std::vector<double> >("short_optimumSlope"),
173  psS9S1.getParameter<std::vector<double> >("shortEnergyParams"),
174  psS9S1.getParameter<std::vector<double> >("shortETParams"),
175  psS9S1.getParameter<std::vector<double> >("long_optimumSlope"),
176  psS9S1.getParameter<std::vector<double> >("longEnergyParams"),
177  psS9S1.getParameter<std::vector<double> >("longETParams"),
178  psS9S1.getParameter<int>("HcalAcceptSeverityLevel"),
179  psS9S1.getParameter<bool>("isS8S1")
180  );
181 
182  const edm::ParameterSet& psS8S1 = conf.getParameter<edm::ParameterSet>("S8S1stat");
183  hfS8S1_ = new HcalHF_S9S1algorithm(psS8S1.getParameter<std::vector<double> >("short_optimumSlope"),
184  psS8S1.getParameter<std::vector<double> >("shortEnergyParams"),
185  psS8S1.getParameter<std::vector<double> >("shortETParams"),
186  psS8S1.getParameter<std::vector<double> >("long_optimumSlope"),
187  psS8S1.getParameter<std::vector<double> >("longEnergyParams"),
188  psS8S1.getParameter<std::vector<double> >("longETParams"),
189  psS8S1.getParameter<int>("HcalAcceptSeverityLevel"),
190  psS8S1.getParameter<bool>("isS8S1")
191  );
192 
193  const edm::ParameterSet& psPET = conf.getParameter<edm::ParameterSet>("PETstat");
194  hfPET_ = new HcalHF_PETalgorithm(psPET.getParameter<std::vector<double> >("short_R"),
195  psPET.getParameter<std::vector<double> >("shortEnergyParams"),
196  psPET.getParameter<std::vector<double> >("shortETParams"),
197  psPET.getParameter<std::vector<double> >("long_R"),
198  psPET.getParameter<std::vector<double> >("longEnergyParams"),
199  psPET.getParameter<std::vector<double> >("longETParams"),
200  psPET.getParameter<int>("HcalAcceptSeverityLevel"),
201  psPET.getParameter<std::vector<double> >("short_R_29"),
202  psPET.getParameter<std::vector<double> >("long_R_29")
203  );
204  }
205  produces<HFRecHitCollection>();
206  } else if (!strcasecmp(subd.c_str(),"ZDC")) {
209  produces<ZDCRecHitCollection>();
210  } else if (!strcasecmp(subd.c_str(),"CALIB")) {
213  produces<HcalCalibRecHitCollection>();
214  } else {
215  std::cout << "HcalHitReconstructor is not associated with a specific subdetector!" << std::endl;
216  }
217 
218  // If no valid OOT pileup correction name specified,
219  // disable the correction
220  if (conf.existsAs<std::string>("dataOOTCorrectionName"))
221  dataOOTCorrectionName_ = conf.getParameter<std::string>("dataOOTCorrectionName");
222  if (conf.existsAs<std::string>("dataOOTCorrectionCategory"))
223  dataOOTCorrectionCategory_ = conf.getParameter<std::string>("dataOOTCorrectionCategory");
224  if (conf.existsAs<std::string>("mcOOTCorrectionName"))
225  mcOOTCorrectionName_ = conf.getParameter<std::string>("mcOOTCorrectionName");
226  if (conf.existsAs<std::string>("mcOOTCorrectionCategory"))
227  mcOOTCorrectionCategory_ = conf.getParameter<std::string>("mcOOTCorrectionCategory");
228  if (dataOOTCorrectionName_.empty() && mcOOTCorrectionName_.empty())
230 }
T getParameter(std::string const &) const
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
HcalADCSaturationFlag * saturationFlagSetter_
void setHOPileupCorrection(boost::shared_ptr< AbsOOTPileupCorrection > corr)
SetCorrectionFcn setPileupCorrection_
std::string dataOOTCorrectionCategory_
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
HcalHFStatusBitFromDigis * hfdigibit_
edm::EDGetTokenT< HODigiCollection > tok_ho_
tuple conf
Definition: dbtoconf.py:185
HcalHF_PETalgorithm * hfPET_
HcalHF_S9S1algorithm * hfS9S1_
HBHEPulseShapeFlagSetter * hbhePulseShapeFlagSetter_
static const int SubdetectorId
Definition: HcalZDCDetId.h:20
void setHBHEPileupCorrection(boost::shared_ptr< AbsOOTPileupCorrection > corr)
std::string dataOOTCorrectionName_
HBHEStatusBitSetter * hbheFlagSetter_
HBHETimeProfileStatusBitSetter * hbheHSCPFlagSetter_
HBHETimingShapedFlagSetter * hbheTimingShapedFlagSetter_
HcalHF_S9S1algorithm * hfS8S1_
HcalOtherSubdetector subdetOther_
tuple cout
Definition: gather_cfg.py:121
HFTimingTrustFlag * HFTimingTrustFlagSetter_
std::string mcOOTCorrectionCategory_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
void setHFPileupCorrection(boost::shared_ptr< AbsOOTPileupCorrection > corr)
HcalSimpleRecAlgo reco_
HcalHitReconstructor::~HcalHitReconstructor ( )
virtual

Definition at line 232 of file HcalHitReconstructor.cc.

References hbheFlagSetter_, hbheHSCPFlagSetter_, hbhePulseShapeFlagSetter_, hfdigibit_, hfPET_, hfS9S1_, paramTS, and theTopology.

232  {
233  delete hbheFlagSetter_;
234  delete hfdigibit_;
235  delete hbheHSCPFlagSetter_;
237  delete hfS9S1_;
238  delete hfPET_;
239  delete theTopology;
240  delete paramTS;
241 }
HcalHFStatusBitFromDigis * hfdigibit_
HcalHF_PETalgorithm * hfPET_
HcalHF_S9S1algorithm * hfS9S1_
HBHEPulseShapeFlagSetter * hbhePulseShapeFlagSetter_
HBHEStatusBitSetter * hbheFlagSetter_
HBHETimeProfileStatusBitSetter * hbheHSCPFlagSetter_

Member Function Documentation

void HcalHitReconstructor::beginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
finaloverridevirtual

Reimplemented from edm::EDProducer.

Definition at line 243 of file HcalHitReconstructor.cc.

References HcalSimpleRecAlgo::beginRun(), digiTimeFromDB_, edm::EventSetup::get(), HFDigiTimeParams, AlCaHLTBitMon_ParallelJobs::p, paramTS, edm::ESHandle< class >::product(), reco_, recoParamsFromDB_, HcalCondObjectContainerBase::setTopo(), theTopology, and tsFromDB_.

243  {
244 
245  if ( tsFromDB_== true || recoParamsFromDB_ == true )
246  {
248  es.get<HcalRecoParamsRcd>().get(p);
249  paramTS = new HcalRecoParams(*p.product());
250 
252  es.get<IdealGeometryRecord>().get(htopo);
253  theTopology=new HcalTopology(*htopo);
255 
256 
257 
258  // std::cout<<" skdump in HcalHitReconstructor::beginRun dupm RecoParams "<<std::endl;
259  // std::ofstream skfile("skdumpRecoParamsNewFormat.txt");
260  // HcalDbASCIIIO::dumpObject(skfile, (*paramTS) );
261  }
262 
263  if (digiTimeFromDB_==true)
264  {
266  es.get<HcalFlagHFDigiTimeParamsRcd>().get(p);
268 
269  if (theTopology==0) {
271  es.get<IdealGeometryRecord>().get(htopo);
272  theTopology=new HcalTopology(*htopo);
273  }
275 
276  }
277  reco_.beginRun(es);
278 }
void beginRun(edm::EventSetup const &es)
void setTopo(const HcalTopology *topo) const
T const * product() const
Definition: ESHandle.h:62
const HcalFlagHFDigiTimeParams * HFDigiTimeParams
HcalSimpleRecAlgo reco_
void HcalHitReconstructor::endRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
finaloverridevirtual

Reimplemented from edm::EDProducer.

Definition at line 280 of file HcalHitReconstructor.cc.

References digiTimeFromDB_, HcalSimpleRecAlgo::endRun(), paramTS, reco_, and tsFromDB_.

280  {
281  if (tsFromDB_==true)
282  {
283  delete paramTS; paramTS=0;
284  }
285  if (digiTimeFromDB_==true)
286  {
287  //DL delete HFDigiTimeParams; HFDigiTimeParams = 0;
288  }
289  reco_.endRun();
290 }
HcalSimpleRecAlgo reco_
void HcalHitReconstructor::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

Implements edm::EDProducer.

Definition at line 292 of file HcalHitReconstructor.cc.

References funct::abs(), HBHEStatusBitSetter::Clear(), HcalTimingCorrector::Correct(), HcalRecoParam::correctForPhaseContainment(), HcalRecoParam::correctForTimeslew(), HcalRecoParam::correctionPhaseNS(), HcalRecoParam::correctTiming(), correctTiming_, dataOOTCorrectionCategory_, dataOOTCorrectionName_, det_, digiTimeFromDB_, HcalSeverityLevelComputer::dropChannel(), dropZSmarkedPassed_, HBHETimeProfileStatusBitSetter::EnergyThreshold(), first, HcalRecoParam::firstAuxTS(), firstAuxTS_, HcalRecoParam::firstSample(), firstSample_, edm::EventSetup::get(), edm::Event::getByToken(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), hbheFlagSetter_, hbheHSCPFlagSetter_, hbhePulseShapeFlagSetter_, HBHETimeProfileStatusBitSetter::hbheSetTimeFlagsFromDigi(), hbheTimingShapedFlagSetter_, DetId::Hcal, HcalBarrel, HcalCalibration, HcalEndcap, HcalForward, HcalOther, HcalOuter, hfdigibit_, HcalFlagHFDigiTimeParam::HFdigiflagCoefficients(), HcalFlagHFDigiTimeParam::HFdigiflagExpectedPeak(), HcalFlagHFDigiTimeParam::HFdigiflagFirstSample(), HcalFlagHFDigiTimeParam::HFdigiflagMinEThreshold(), HcalFlagHFDigiTimeParam::HFdigiflagSamplesToAdd(), HFDigiTimeParams, hfPET_, hfS8S1_, hfS9S1_, HcalHFStatusBitFromDigis::hfSetFlagFromDigi(), HcalHF_PETalgorithm::HFSetFlagFromPET(), HcalHF_S9S1algorithm::HFSetFlagFromS9S1(), HFTimingTrustFlagSetter_, i, edm::EventBase::isRealData(), j, gen::k, mcOOTCorrectionCategory_, mcOOTCorrectionName_, AlCaHLTBitMon_ParallelJobs::p, paramTS, HcalRecoParam::pileupCleaningID(), HcalCaloFlagLabels::PresampleADC, edm::ESHandle< class >::product(), edm::Event::put(), DetId::rawId(), reco_, HcalSimpleRecAlgo::reconstruct(), recoParamsFromDB_, HcalHFStatusBitFromDigis::resetParamsFromDB(), edm::Event::run(), HcalRecoParam::samplesToAdd(), samplesToAdd_, saturationFlagSetter_, HBHEStatusBitSetter::SetFlagsFromDigi(), HBHEStatusBitSetter::SetFlagsFromRecHits(), HcalSimpleRecAlgo::setForData(), HFTimingTrustFlag::setHFTimingTrustFlag(), setHSCPFlags_, HcalSimpleRecAlgo::setLeakCorrection(), setNoiseFlags_, setPileupCorrection_, HBHEPulseShapeFlagSetter::SetPulseShapeFlags(), setPulseShapeFlags_, HcalSimpleRecAlgo::setRecoParams(), HcalADCSaturationFlag::setSaturationFlag(), setSaturationFlags_, HBHETimingShapedFlagSetter::SetTimingShapedFlags(), setTimingTrustFlags_, HcalCondObjectContainerBase::setTopo(), AlCaHLTBitMon_QueryRunRegistry::string, subdet_, subdetOther_, tok_calib_, tok_hbhe_, tok_hf_, tok_ho_, HcalCondObjectContainerBase::topo(), tsFromDB_, HcalRecoParam::useLeakCorrection(), and useLeakCorrection_.

293 {
294 
295  // get conditions
297  eventSetup.get<IdealGeometryRecord>().get(topo);
298 
299  edm::ESHandle<HcalDbService> conditions;
300  eventSetup.get<HcalDbRecord>().get(conditions);
301 
302  // HACK related to HB- corrections
303  const bool isData = e.isRealData();
304  if (isData) reco_.setForData(e.run());
306 
308  eventSetup.get<HcalChannelQualityRcd>().get(p);
309  //DLHcalChannelQuality* myqual = new HcalChannelQuality(*p.product());
310  const HcalChannelQuality* myqual = p.product();
311  if (!myqual->topo()) myqual->setTopo(topo.product());
312 
313 
315  eventSetup.get<HcalSeverityLevelComputerRcd>().get(mycomputer);
316  const HcalSeverityLevelComputer* mySeverity = mycomputer.product();
317 
318  // Configure OOT pileup corrections
320  {
321  const std::string& corrName = isData ? dataOOTCorrectionName_ : mcOOTCorrectionName_;
322  if (!corrName.empty())
323  {
324  edm::ESHandle<OOTPileupCorrectionColl> pileupCorrections;
325  eventSetup.get<HcalOOTPileupCorrectionRcd>().get(pileupCorrections);
327  (reco_.*setPileupCorrection_)(pileupCorrections->get(corrName, cat));
328  }
329  }
330 
331  // GET THE BEAM CROSSING INFO HERE, WHEN WE UNDERSTAND HOW THINGS WORK.
332  // Then, call "setBXInfo" method of the reco_ object.
333 
334  if (det_==DetId::Hcal) {
335 
336  // HBHE -------------------------------------------------------------------
339 
340  e.getByToken(tok_hbhe_,digi);
341 
342  // create empty output
343  std::auto_ptr<HBHERecHitCollection> rec(new HBHERecHitCollection);
344  rec->reserve(digi->size());
345  // run the algorithm
348  std::vector<HBHEDataFrame> HBDigis;
349  std::vector<int> RecHitIndex;
350 
351  // Vote on majority TS0 CapId
352  int favorite_capid = 0;
353  if (correctTiming_) {
354  long capid_votes[4] = {0,0,0,0};
355  for (i=digi->begin(); i!=digi->end(); i++) {
356  capid_votes[(*i)[0].capid()]++;
357  }
358  for (int k = 0; k < 4; k++)
359  if (capid_votes[k] > capid_votes[favorite_capid])
360  favorite_capid = k;
361  }
362 
363  for (i=digi->begin(); i!=digi->end(); i++) {
364  HcalDetId cell = i->id();
365  DetId detcell=(DetId)cell;
366 
368  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
369  if(tsFromDB_) {
370  firstSample_ = param_ts->firstSample();
371  samplesToAdd_ = param_ts->samplesToAdd();
372  }
373  if(recoParamsFromDB_) {
374  bool correctForTimeslew=param_ts->correctForTimeslew();
375  bool correctForPhaseContainment= param_ts->correctForPhaseContainment();
376  float phaseNS=param_ts->correctionPhaseNS();
378  correctTiming_ = param_ts->correctTiming();
379  firstAuxTS_ = param_ts->firstAuxTS();
380  int pileupCleaningID = param_ts->pileupCleaningID();
381 
382  /*
383  int sub = cell.subdet();
384  int depth = cell.depth();
385  int inteta = cell.ieta();
386  int intphi = cell.iphi();
387 
388  std::cout << "HcalHitReconstructor::produce cell:"
389  << " sub, ieta, iphi, depth = "
390  << sub << " " << inteta << " " << intphi
391  << " " << depth << std::endl
392  << " first, toadd = " << firstSample_ << ", "
393  << samplesToAdd_ << std::endl
394  << " correctForTimeslew " << correctForTimeslew
395  << std::endl
396  << " correctForPhaseContainment "
397  << correctForPhaseContainment << std::endl
398  << " phaseNS " << phaseNS << std::endl
399  << " useLeakCorrection " << useLeakCorrection_
400  << std::endl
401  << " correctTiming " << correctTiming_ << std::endl
402  << " firstAuxTS " << firstAuxTS_ << std::endl
403  << " pileupCleaningID " << pileupCleaningID
404  << std::endl;
405  */
406 
407  reco_.setRecoParams(correctForTimeslew,correctForPhaseContainment,useLeakCorrection_,pileupCleaningID,phaseNS);
408  }
409  }
410 
411  int first = firstSample_;
412  int toadd = samplesToAdd_;
413 
414  // check on cells to be ignored and dropped: (rof,20.Feb.09)
415  const HcalChannelStatus* mydigistatus=myqual->getValues(detcell.rawId());
416  if (mySeverity->dropChannel(mydigistatus->getValue() ) ) continue;
418  if (i->zsMarkAndPass()) continue;
419 
420  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
421  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
422  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
423  HcalCoderDb coder (*channelCoder, *shape);
424 
425  rec->push_back(reco_.reconstruct(*i,first,toadd,coder,calibrations));
426 
427  // Fill first auxiliary word
428  unsigned int auxflag=0;
429  int fTS = firstAuxTS_;
430  if (fTS<0) fTS=0; // silly protection against time slice <0
431  for (int xx=fTS; xx<fTS+4 && xx<i->size();++xx) {
432  int adcv = i->sample(xx).adc();
433  auxflag+=((adcv&0x7F)<<(7*(xx-fTS))); // store the time slices in the first 28 bits of aux, a set of 4 7-bit adc values
434  // bits 28 and 29 are reserved for capid of the first time slice saved in aux
435  }
436  auxflag+=((i->sample(fTS).capid())<<28);
437  (rec->back()).setAux(auxflag);
438 
439  // Fill second auxiliary word
440  auxflag=0;
441  int fTS2 = (firstAuxTS_-4 < 0) ? 0 : firstAuxTS_-4;
442  for (int xx = fTS2; xx < fTS2+4 && xx<i->size(); ++xx) {
443  int adcv = i->sample(xx).adc();
444  auxflag+=((adcv&0x7F)<<(7*(xx-fTS2)));
445  }
446  auxflag+=((i->sample(fTS2).capid())<<28);
447  (rec->back()).setAuxHBHE(auxflag);
448 
449  (rec->back()).setFlags(0); // this sets all flag bits to 0
450  // Set presample flag
451  if (fTS>0)
452  (rec->back()).setFlagField((i->sample(fTS-1).adc()), HcalCaloFlagLabels::PresampleADC,7);
453 
456  if (setNoiseFlags_)
457  hbheFlagSetter_->SetFlagsFromDigi(&(*topo),rec->back(),*i,coder,calibrations,first,toadd);
458  if (setPulseShapeFlags_ == true)
459  hbhePulseShapeFlagSetter_->SetPulseShapeFlags(rec->back(), *i, coder, calibrations);
462  if (correctTiming_)
463  HcalTimingCorrector::Correct(rec->back(), *i, favorite_capid);
464  if (setHSCPFlags_ && i->id().ietaAbs()<16)
465  {
466  double DigiEnergy=0;
467  for(int j=0; j!=i->size(); DigiEnergy += i->sample(j++).nominal_fC());
468  if(DigiEnergy > hbheHSCPFlagSetter_->EnergyThreshold())
469  {
470  HBDigis.push_back(*i);
471  RecHitIndex.push_back(rec->size()-1);
472  }
473 
474  } // if (set HSCPFlags_ && |ieta|<16)
475  } // loop over HBHE digis
476 
477 
479  if (setHSCPFlags_) hbheHSCPFlagSetter_->hbheSetTimeFlagsFromDigi(rec.get(), HBDigis, RecHitIndex);
480  // return result
481  e.put(rec);
482 
483  // HO ------------------------------------------------------------------
484  } else if (subdet_==HcalOuter) {
486  e.getByToken(tok_ho_,digi);
487 
488  // create empty output
489  std::auto_ptr<HORecHitCollection> rec(new HORecHitCollection);
490  rec->reserve(digi->size());
491  // run the algorithm
493 
494  // Vote on majority TS0 CapId
495  int favorite_capid = 0;
496  if (correctTiming_) {
497  long capid_votes[4] = {0,0,0,0};
498  for (i=digi->begin(); i!=digi->end(); i++) {
499  capid_votes[(*i)[0].capid()]++;
500  }
501  for (int k = 0; k < 4; k++)
502  if (capid_votes[k] > capid_votes[favorite_capid])
503  favorite_capid = k;
504  }
505 
506  for (i=digi->begin(); i!=digi->end(); i++) {
507  HcalDetId cell = i->id();
508  DetId detcell=(DetId)cell;
509  // firstSample & samplesToAdd
511  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
512  if(tsFromDB_) {
513  firstSample_ = param_ts->firstSample();
514  samplesToAdd_ = param_ts->samplesToAdd();
515  }
516  if(recoParamsFromDB_) {
517  bool correctForTimeslew=param_ts->correctForTimeslew();
518  bool correctForPhaseContainment= param_ts->correctForPhaseContainment();
519  float phaseNS=param_ts->correctionPhaseNS();
521  correctTiming_ = param_ts->correctTiming();
522  firstAuxTS_ = param_ts->firstAuxTS();
523  int pileupCleaningID = param_ts->pileupCleaningID();
524  reco_.setRecoParams(correctForTimeslew,correctForPhaseContainment,useLeakCorrection_,pileupCleaningID,phaseNS);
525  }
526  }
527 
528  int first = firstSample_;
529  int toadd = samplesToAdd_;
530 
531  // check on cells to be ignored and dropped: (rof,20.Feb.09)
532  const HcalChannelStatus* mydigistatus=myqual->getValues(detcell.rawId());
533  if (mySeverity->dropChannel(mydigistatus->getValue() ) ) continue;
535  if (i->zsMarkAndPass()) continue;
536 
537  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
538  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
539  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
540  HcalCoderDb coder (*channelCoder, *shape);
541 
542  rec->push_back(reco_.reconstruct(*i,first,toadd,coder,calibrations));
543 
544  // Set auxiliary flag
545  int auxflag=0;
546  int fTS = firstAuxTS_;
547  if (fTS<0) fTS=0; //silly protection against negative time slice values
548  for (int xx=fTS; xx<fTS+4 && xx<i->size();++xx)
549  auxflag+=(i->sample(xx).adc())<<(7*(xx-fTS)); // store the time slices in the first 28 bits of aux, a set of 4 7-bit adc values
550  // bits 28 and 29 are reserved for capid of the first time slice saved in aux
551  auxflag+=((i->sample(fTS).capid())<<28);
552  (rec->back()).setAux(auxflag);
553 
554  (rec->back()).setFlags(0);
555  // Fill Presample ADC flag
556  if (fTS>0)
557  (rec->back()).setFlagField((i->sample(fTS-1).adc()), HcalCaloFlagLabels::PresampleADC,7);
558 
561  if (correctTiming_)
562  HcalTimingCorrector::Correct(rec->back(), *i, favorite_capid);
563  }
564  // return result
565  e.put(rec);
566 
567  // HF -------------------------------------------------------------------
568  } else if (subdet_==HcalForward) {
570  e.getByToken(tok_hf_,digi);
571 
572 
574  // create empty output
575  std::auto_ptr<HFRecHitCollection> rec(new HFRecHitCollection);
576  rec->reserve(digi->size());
577  // run the algorithm
579 
580  // Vote on majority TS0 CapId
581  int favorite_capid = 0;
582  if (correctTiming_) {
583  long capid_votes[4] = {0,0,0,0};
584  for (i=digi->begin(); i!=digi->end(); i++) {
585  capid_votes[(*i)[0].capid()]++;
586  }
587  for (int k = 0; k < 4; k++)
588  if (capid_votes[k] > capid_votes[favorite_capid])
589  favorite_capid = k;
590  }
591 
592  for (i=digi->begin(); i!=digi->end(); i++) {
593  HcalDetId cell = i->id();
594  DetId detcell=(DetId)cell;
595 
597  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
598  if(tsFromDB_) {
599  firstSample_ = param_ts->firstSample();
600  samplesToAdd_ = param_ts->samplesToAdd();
601  }
602  if(recoParamsFromDB_) {
603  bool correctForTimeslew=param_ts->correctForTimeslew();
604  bool correctForPhaseContainment= param_ts->correctForPhaseContainment();
605  float phaseNS=param_ts->correctionPhaseNS();
607  correctTiming_ = param_ts->correctTiming();
608  firstAuxTS_ = param_ts->firstAuxTS();
609  int pileupCleaningID = param_ts->pileupCleaningID();
610  reco_.setRecoParams(correctForTimeslew,correctForPhaseContainment,useLeakCorrection_,pileupCleaningID,phaseNS);
611  }
612  }
613 
614  int first = firstSample_;
615  int toadd = samplesToAdd_;
616 
617  // check on cells to be ignored and dropped: (rof,20.Feb.09)
618  const HcalChannelStatus* mydigistatus=myqual->getValues(detcell.rawId());
619  if (mySeverity->dropChannel(mydigistatus->getValue() ) ) continue;
621  if (i->zsMarkAndPass()) continue;
622 
623  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
624  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
625  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
626  HcalCoderDb coder (*channelCoder, *shape);
627 
628  // Set HFDigiTime flag values from digiTimeFromDB_
629  if (digiTimeFromDB_==true && hfdigibit_!=0)
630  {
631  const HcalFlagHFDigiTimeParam* hfDTparam = HFDigiTimeParams->getValues(detcell.rawId());
633  hfDTparam->HFdigiflagSamplesToAdd(),
634  hfDTparam->HFdigiflagExpectedPeak(),
635  hfDTparam->HFdigiflagMinEThreshold(),
636  hfDTparam->HFdigiflagCoefficients()
637  );
638  }
639 
640  //std::cout << "TOADDHF " << toadd << " " << first << " " << std::endl;
641  rec->push_back(reco_.reconstruct(*i,first,toadd,coder,calibrations));
642 
643  // Set auxiliary flag
644  int auxflag=0;
645  int fTS = firstAuxTS_;
646  if (fTS<0) fTS=0; // silly protection against negative time slice values
647  for (int xx=fTS; xx<fTS+4 && xx<i->size();++xx)
648  auxflag+=(i->sample(xx).adc())<<(7*(xx-fTS)); // store the time slices in the first 28 bits of aux, a set of 4 7-bit adc values
649  // bits 28 and 29 are reserved for capid of the first time slice saved in aux
650  auxflag+=((i->sample(fTS).capid())<<28);
651  (rec->back()).setAux(auxflag);
652 
653  // Clear flags
654  (rec->back()).setFlags(0);
655 
656  // Fill Presample ADC flag
657  if (fTS>0)
658  (rec->back()).setFlagField((i->sample(fTS-1).adc()), HcalCaloFlagLabels::PresampleADC,7);
659 
660  // This calls the code for setting the HF noise bit determined from digi shape
661  if (setNoiseFlags_)
662  hfdigibit_->hfSetFlagFromDigi(rec->back(),*i,coder,calibrations);
667  if (correctTiming_)
668  HcalTimingCorrector::Correct(rec->back(), *i, favorite_capid);
669  } // for (i=digi->begin(); i!=digi->end(); i++) -- loop on all HF digis
670 
671  // The following flags require the full set of rechits
672  // These need to be set consecutively, so an energy check should be the first
673  // test performed on these hits (to minimize the loop time)
674  if (setNoiseFlags_)
675  {
676  // Step 1: Set PET flag (short fibers of |ieta|==29)
677  // Neighbor/partner channels that are flagged by Pulse Shape algorithm (HFDigiTime)
678  // won't be considered in these calculations
679  for (HFRecHitCollection::iterator i = rec->begin();i!=rec->end();++i)
680  {
681  int depth=i->id().depth();
682  int ieta=i->id().ieta();
683  // Short fibers and all channels at |ieta|=29 use PET settings in Algo 3
684  if (depth==2 || abs(ieta)==29 )
685  hfPET_->HFSetFlagFromPET(*i,*rec,myqual,mySeverity);
686  }
687 
688  // Step 2: Set S8S1 flag (short fibers or |ieta|==29)
689  for (HFRecHitCollection::iterator i = rec->begin();i!=rec->end();++i)
690  {
691  int depth=i->id().depth();
692  int ieta=i->id().ieta();
693  // Short fibers and all channels at |ieta|=29 use PET settings in Algo 3
694  if (depth==2 || abs(ieta)==29 )
695  hfS8S1_->HFSetFlagFromS9S1(*i,*rec,myqual,mySeverity);
696  }
697 
698  // Set 3: Set S9S1 flag (long fibers)
699  for (HFRecHitCollection::iterator i = rec->begin();i!=rec->end();++i)
700  {
701  int depth=i->id().depth();
702  int ieta=i->id().ieta();
703  // Short fibers and all channels at |ieta|=29 use PET settings in Algo 3
704  if (depth==1 && abs(ieta)!=29 )
705  hfS9S1_->HFSetFlagFromS9S1(*i,*rec,myqual, mySeverity);
706  }
707  }
708 
709  // return result
710  e.put(rec);
711  } else if (subdet_==HcalOther && subdetOther_==HcalCalibration) {
713  e.getByToken(tok_calib_,digi);
714 
715  // create empty output
716  std::auto_ptr<HcalCalibRecHitCollection> rec(new HcalCalibRecHitCollection);
717  rec->reserve(digi->size());
718  // run the algorithm
719  int first = firstSample_;
720  int toadd = samplesToAdd_;
721 
723  for (i=digi->begin(); i!=digi->end(); i++) {
724  HcalCalibDetId cell = i->id();
725  // HcalDetId cellh = i->id();
726  DetId detcell=(DetId)cell;
727  // check on cells to be ignored and dropped: (rof,20.Feb.09)
728  const HcalChannelStatus* mydigistatus=myqual->getValues(detcell.rawId());
729  if (mySeverity->dropChannel(mydigistatus->getValue() ) ) continue;
731  if (i->zsMarkAndPass()) continue;
732 
733  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
734  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
735  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
736  HcalCoderDb coder (*channelCoder, *shape);
737 
738  // firstSample & samplesToAdd
739  if(tsFromDB_) {
740  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
741  first = param_ts->firstSample();
742  toadd = param_ts->samplesToAdd();
743  }
744  rec->push_back(reco_.reconstruct(*i,first,toadd,coder,calibrations));
745 
746  /*
747  // Flag setting not available for calibration rechits
748  // Set auxiliary flag
749  int auxflag=0;
750  int fTS = firstAuxTS_;
751  for (int xx=fTS; xx<fTS+4 && xx<i->size();++xx)
752  auxflag+=(i->sample(xx).adc())<<(7*(xx-fTS)); // store the time slices in the first 28 bits of aux, a set of 4 7-bit adc values
753  // bits 28 and 29 are reserved for capid of the first time slice saved in aux
754  auxflag+=((i->sample(fTS).capid())<<28);
755  (rec->back()).setAux(auxflag);
756 
757  (rec->back()).setFlags(0); // Not yet implemented for HcalCalibRecHit
758  */
759  }
760  // return result
761  e.put(rec);
762  }
763  }
764  //DL delete myqual;
765 } // void HcalHitReconstructor::produce(...)
unsigned int firstSample() const
Definition: HcalRecoParam.h:32
int i
Definition: DBlmapReader.cc:9
void HFSetFlagFromS9S1(HFRecHit &hf, HFRecHitCollection &rec, const HcalChannelQuality *myqual, const HcalSeverityLevelComputer *mySeverity)
HBHERecHit reconstruct(const HBHEDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
void setHFTimingTrustFlag(HFRecHit &rechit, const HFDataFrame &digi)
unsigned int pileupCleaningID() const
Definition: HcalRecoParam.h:44
HcalADCSaturationFlag * saturationFlagSetter_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
uint32_t HFdigiflagSamplesToAdd() const
bool correctForPhaseContainment() const
Definition: HcalRecoParam.h:29
void hfSetFlagFromDigi(HFRecHit &hf, const HFDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calib)
std::vector< HBHEDataFrame >::const_iterator const_iterator
void setTopo(const HcalTopology *topo) const
const Item * getValues(DetId fId, bool throwOnFail=true) const
void resetParamsFromDB(int firstSample, int samplesToAdd, int expectedPeak, double minthreshold, const std::vector< double > &coef)
bool isRealData() const
Definition: EventBase.h:60
SetCorrectionFcn setPileupCorrection_
void HFSetFlagFromPET(HFRecHit &hf, HFRecHitCollection &rec, const HcalChannelQuality *myqual, const HcalSeverityLevelComputer *mySeverity)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
std::string dataOOTCorrectionCategory_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
bool correctForTimeslew() const
Definition: HcalRecoParam.h:38
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
bool correctTiming() const
Definition: HcalRecoParam.h:40
RunNumber_t run() const
Definition: Event.h:88
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalHFStatusBitFromDigis * hfdigibit_
int j
Definition: DBlmapReader.cc:9
bool dropChannel(const uint32_t &mystatus) const
uint32_t HFdigiflagExpectedPeak() const
void hbheSetTimeFlagsFromDigi(HBHERecHitCollection *, const std::vector< HBHEDataFrame > &, const std::vector< int > &)
void setSaturationFlag(HBHERecHit &rechit, const HBHEDataFrame &digi)
unsigned int samplesToAdd() const
Definition: HcalRecoParam.h:33
bool first
Definition: L1TdeRCT.cc:75
edm::EDGetTokenT< HODigiCollection > tok_ho_
float correctionPhaseNS() const
Definition: HcalRecoParam.h:31
std::vector< HFRecHit >::iterator iterator
int k[5][pyjets_maxn]
std::vector< double > HFdigiflagCoefficients() const
HcalHF_PETalgorithm * hfPET_
Definition: DetId.h:18
HcalHF_S9S1algorithm * hfS9S1_
HBHEPulseShapeFlagSetter * hbhePulseShapeFlagSetter_
void setRecoParams(bool correctForTimeslew, bool correctForPulse, bool setLeakCorrection, int pileupCleaningID, float phaseNS)
void SetTimingShapedFlags(HBHERecHit &hbhe)
uint32_t HFdigiflagFirstSample() const
void setForData(int runnum)
T const * product() const
Definition: ESHandle.h:62
std::string dataOOTCorrectionName_
HBHEStatusBitSetter * hbheFlagSetter_
HBHETimeProfileStatusBitSetter * hbheHSCPFlagSetter_
HBHETimingShapedFlagSetter * hbheTimingShapedFlagSetter_
HcalHF_S9S1algorithm * hfS8S1_
void SetFlagsFromRecHits(const HcalTopology *topo, HBHERecHitCollection &rec)
HcalOtherSubdetector subdetOther_
static void Correct(HBHERecHit &rechit, const HBHEDataFrame &digi, int favorite_capid)
void SetPulseShapeFlags(HBHERecHit &hbhe, const HBHEDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calib)
unsigned int firstAuxTS() const
Definition: HcalRecoParam.h:41
HFTimingTrustFlag * HFTimingTrustFlagSetter_
uint32_t getValue() const
void SetFlagsFromDigi(const HcalTopology *topo, HBHERecHit &hbhe, const HBHEDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calib, int firstSample=3, int samplesToAdd=4)
std::string mcOOTCorrectionCategory_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
const HcalFlagHFDigiTimeParams * HFDigiTimeParams
const HcalTopology * topo() const
HcalSimpleRecAlgo reco_
double HFdigiflagMinEThreshold() const
bool useLeakCorrection() const
Definition: HcalRecoParam.h:36

Member Data Documentation

bool HcalHitReconstructor::correctTiming_
private

Definition at line 75 of file HcalHitReconstructor.h.

Referenced by produce().

std::string HcalHitReconstructor::dataOOTCorrectionCategory_
private

Definition at line 98 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

std::string HcalHitReconstructor::dataOOTCorrectionName_
private

Definition at line 97 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

DetId::Detector HcalHitReconstructor::det_
private

Definition at line 66 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

bool HcalHitReconstructor::digiTimeFromDB_
private

Definition at line 90 of file HcalHitReconstructor.h.

Referenced by beginRun(), endRun(), HcalHitReconstructor(), and produce().

bool HcalHitReconstructor::dropZSmarkedPassed_
private

Definition at line 81 of file HcalHitReconstructor.h.

Referenced by produce().

int HcalHitReconstructor::firstAuxTS_
private

Definition at line 83 of file HcalHitReconstructor.h.

Referenced by produce().

int HcalHitReconstructor::firstSample_
private

Definition at line 86 of file HcalHitReconstructor.h.

Referenced by produce().

HBHEStatusBitSetter* HcalHitReconstructor::hbheFlagSetter_
private

Definition at line 57 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), produce(), and ~HcalHitReconstructor().

HBHETimeProfileStatusBitSetter* HcalHitReconstructor::hbheHSCPFlagSetter_
private

Definition at line 58 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), produce(), and ~HcalHitReconstructor().

HBHEPulseShapeFlagSetter* HcalHitReconstructor::hbhePulseShapeFlagSetter_
private

Definition at line 60 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), produce(), and ~HcalHitReconstructor().

HBHETimingShapedFlagSetter* HcalHitReconstructor::hbheTimingShapedFlagSetter_
private

Definition at line 59 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

HcalHFStatusBitFromDigis* HcalHitReconstructor::hfdigibit_
private

Definition at line 61 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), produce(), and ~HcalHitReconstructor().

const HcalFlagHFDigiTimeParams* HcalHitReconstructor::HFDigiTimeParams
private

Definition at line 104 of file HcalHitReconstructor.h.

Referenced by beginRun(), and produce().

HcalHF_PETalgorithm* HcalHitReconstructor::hfPET_
private

Definition at line 64 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), produce(), and ~HcalHitReconstructor().

HcalHF_S9S1algorithm* HcalHitReconstructor::hfS8S1_
private

Definition at line 63 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

HcalHF_S9S1algorithm* HcalHitReconstructor::hfS9S1_
private

Definition at line 62 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), produce(), and ~HcalHitReconstructor().

HFTimingTrustFlag* HcalHitReconstructor::HFTimingTrustFlagSetter_
private

Definition at line 56 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

edm::InputTag HcalHitReconstructor::inputLabel_
private

Definition at line 69 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor().

std::string HcalHitReconstructor::mcOOTCorrectionCategory_
private

Definition at line 100 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

std::string HcalHitReconstructor::mcOOTCorrectionName_
private

Definition at line 99 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

HcalRecoParams* HcalHitReconstructor::paramTS
private

Definition at line 103 of file HcalHitReconstructor.h.

Referenced by beginRun(), endRun(), produce(), and ~HcalHitReconstructor().

HcalSimpleRecAlgo HcalHitReconstructor::reco_
private

Definition at line 54 of file HcalHitReconstructor.h.

Referenced by beginRun(), endRun(), and produce().

bool HcalHitReconstructor::recoParamsFromDB_
private

Definition at line 89 of file HcalHitReconstructor.h.

Referenced by beginRun(), HcalHitReconstructor(), and produce().

int HcalHitReconstructor::samplesToAdd_
private

Definition at line 87 of file HcalHitReconstructor.h.

Referenced by produce().

HcalADCSaturationFlag* HcalHitReconstructor::saturationFlagSetter_
private

Definition at line 55 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

bool HcalHitReconstructor::setHSCPFlags_
private

Definition at line 77 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

bool HcalHitReconstructor::setNoiseFlags_
private

Definition at line 76 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

SetCorrectionFcn HcalHitReconstructor::setPileupCorrection_
private

Definition at line 101 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

bool HcalHitReconstructor::setPulseShapeFlags_
private

Definition at line 80 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

bool HcalHitReconstructor::setSaturationFlags_
private

Definition at line 78 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

bool HcalHitReconstructor::setTimingTrustFlags_
private

Definition at line 79 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

int HcalHitReconstructor::subdet_
private

Definition at line 67 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

HcalOtherSubdetector HcalHitReconstructor::subdetOther_
private

Definition at line 68 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

HcalTopology* HcalHitReconstructor::theTopology
private

Definition at line 106 of file HcalHitReconstructor.h.

Referenced by beginRun(), and ~HcalHitReconstructor().

edm::EDGetTokenT<HcalCalibDigiCollection> HcalHitReconstructor::tok_calib_
private

Definition at line 73 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

edm::EDGetTokenT<HBHEDigiCollection> HcalHitReconstructor::tok_hbhe_
private

Definition at line 70 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

edm::EDGetTokenT<HFDigiCollection> HcalHitReconstructor::tok_hf_
private

Definition at line 72 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

edm::EDGetTokenT<HODigiCollection> HcalHitReconstructor::tok_ho_
private

Definition at line 71 of file HcalHitReconstructor.h.

Referenced by HcalHitReconstructor(), and produce().

bool HcalHitReconstructor::tsFromDB_
private

Definition at line 88 of file HcalHitReconstructor.h.

Referenced by beginRun(), endRun(), and produce().

bool HcalHitReconstructor::useLeakCorrection_
private

Definition at line 94 of file HcalHitReconstructor.h.

Referenced by produce().