5 #ifndef RawEventDisplay_module 6 #define RawEventDisplay_module 24 #include "art_root_io/TFileService.h" 26 #include "canvas/Persistency/Common/FindManyP.h" 34 #include "TLorentzVector.h" 51 #pragma link C++ class vector<vector<int> >+; 172 unsigned int minT = 0;
173 unsigned int maxT = 0;
176 unsigned int binT = (maxT-minT);
178 for(
unsigned int i=0;i<
fNofAPA;i++){
188 name <<
"fTimeChanU";
191 title <<
"Time vs Channel(Plane U, APA";
193 TempHisto = tfs->make<TH2S>(name.str().c_str(),title.str().c_str(), UChMax - UChMin + 1, UChMin, UChMax, binT, minT, maxT);
197 name <<
"fTimeChanV";
200 title <<
"Time vs Channel(Plane V, APA";
202 TempHisto = tfs->make<TH2S>(name.str().c_str(),title.str().c_str(), VChMax - VChMin + 1, VChMin, VChMax, binT, minT, maxT);
206 name <<
"fTimeChanZ";
209 title <<
"Time vs Channel(Plane Z, APA";
211 TempHisto = tfs->make<TH2S>(name.str().c_str(),title.str().c_str(), ZChMax - ZChMin + 1, ZChMin, ZChMax, binT, minT, maxT);
245 fNticks = detProp.NumberTimeSamples();
257 fEvent =
event.id().event();
264 auto RawTPC =
event.getHandle< std::vector<raw::RawDigit> >(itag1);
268 std::vector< art::Ptr<raw::RawDigit> >
RawDigits;
274 for(
auto const & dptr : RawDigits) {
278 uint32_t chan = digit.
Channel();
280 int nSamples = digit.
Samples();
284 std::vector<short> uncompressed(nSamples);
288 std::vector<short> uncompPed(nSamples);
289 for (
int i=0; i<nSamples; i++) uncompPed.at(i)=uncompressed.at(i)-pedestal;
298 if(uncompPed.at(
l)!=0){
307 if(uncompPed.at(
l)!=0){
315 if(uncompPed.at(
l)!=0){
332 #endif // RawEventDisplay
float GetPedestal() const
const ADCvector_t & ADCs() const
Reference to the compressed ADC count vector.
unsigned int nADC_uncompPed
ULong64_t Samples() const
Number of samples in the uncompressed ADC data.
Collection of charge vs time digitized from a single readout channel.
void beginRun(const art::Run &run)
ChannelID_t Channel() const
DAQ channel this raw data was read from.
std::vector< raw::RawDigit > RawDigits
Planes which measure Z direction.
geo::GeometryCore const * fGeom
EDAnalyzer(fhicl::ParameterSet const &pset)
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
RawEventDisplay(fhicl::ParameterSet const &pset)
art framework interface to geometry description
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
void reconfigure(fhicl::ParameterSet const &pset)
std::string fRawDigitLabel
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
std::vector< TH2S * > fTimeChanU
virtual ~RawEventDisplay()
void analyze(const art::Event &evt)
Description of geometry of one entire detector.
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
Definition of data types for geometry description.
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
raw::Compress_t Compression() const
Compression algorithm used to store the ADC counts.
std::vector< TH2S * > fTimeChanV
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
std::vector< TH2S * > fTimeChanZ
QTextStream & endl(QTextStream &s)
Event finding and building.
unsigned int fChansPerAPA