-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15613 from lgray/ecalDetailedTime_810
Ecal Detailed Time Rechits in 810
- Loading branch information
Showing
39 changed files
with
1,655 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
from Configuration.Eras.Era_Phase2C1_cff import Phase2C1 | ||
from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing | ||
|
||
Phase2C1_timing = cms.ModifierChain(Phase2C1, phase2_timing) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
from Configuration.Eras.Era_Phase2C2_cff import Phase2C2 | ||
from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing | ||
|
||
Phase2C2_timing = cms.ModifierChain(Phase2C2, phase2_timing) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
phase2_timing = cms.Modifier() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#ifndef _DataFormats_EcalDigi_ECALTIMEDIGI_H_ | ||
#define _DataFormats_EcalDigi_ECALTIMEDIGI_H_ | ||
|
||
#include <ostream> | ||
#include <vector> | ||
#include "DataFormats/DetId/interface/DetId.h" | ||
|
||
class EcalTimeDigi { | ||
public: | ||
typedef DetId key_type; ///< For the sorted collection | ||
|
||
EcalTimeDigi(); // for persistence | ||
explicit EcalTimeDigi(const DetId& id); | ||
|
||
void swap(EcalTimeDigi& rh) { | ||
std::swap(id_,rh.id_); | ||
std::swap(size_,rh.size_); | ||
std::swap(data_,rh.data_); | ||
} | ||
|
||
const DetId& id() const { return id_; } | ||
int size() const { return size_; } | ||
|
||
const float& operator[](unsigned int i) const { return data_[i]; } | ||
const float& sample(unsigned int i) const { return data_[i]; } | ||
|
||
void setSize(unsigned int size); | ||
void setSample(unsigned int i, const float sam) { data_[i]=sam; } | ||
void setSampleOfInterest(int i) { sampleOfInterest_=i; } | ||
|
||
/// Gets the BX==0 sample. If =-1 then it means that only OOT hits are present | ||
int sampleOfInterest() const { return sampleOfInterest_; } | ||
|
||
private: | ||
DetId id_; | ||
unsigned int size_; | ||
int sampleOfInterest_; | ||
std::vector<float> data_; | ||
}; | ||
|
||
|
||
inline void swap(EcalTimeDigi& lh, EcalTimeDigi& rh) { | ||
lh.swap(rh); | ||
} | ||
|
||
std::ostream& operator<<(std::ostream& s, const EcalTimeDigi& digi); | ||
|
||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "DataFormats/EcalDigi/interface/EcalTimeDigi.h" | ||
|
||
namespace { | ||
constexpr unsigned int MAXSAMPLES = 10; | ||
} | ||
|
||
EcalTimeDigi::EcalTimeDigi() : id_(0), size_(0), sampleOfInterest_(-1), data_(MAXSAMPLES) { | ||
} | ||
|
||
EcalTimeDigi::EcalTimeDigi(const DetId& id) : id_(id), | ||
size_(0), sampleOfInterest_(-1), data_(MAXSAMPLES) { | ||
} | ||
|
||
void EcalTimeDigi::setSize(unsigned int size) { | ||
if (size>MAXSAMPLES) size_=MAXSAMPLES; | ||
else size_=size; | ||
data_.resize(size_); | ||
} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.