7 #ifndef RawEVD35t_Module 8 #define RawEVD35t_Module 28 #include "art_root_io/TFileService.h" 30 #include "canvas/Persistency/Common/FindManyP.h" 38 #include "TLorentzVector.h" 71 for (
int k=0;
k<4;
k++){
if(apa==
UVPlane[
k]) {
return k; }}
76 for (
int k=0;
k<8;
k++){
if(tpc==
ZPlane[
k]) {
return k; }}
127 unsigned int ZPlane[8]={7,6,5,4,3,2,1,0};
172 unsigned int Z0ChMin;
173 unsigned int Z0ChMax;
174 unsigned int Z1ChMin;
175 unsigned int Z1ChMax;
178 std::ofstream outfile;
179 outfile.open(
"msglog.txt");
204 unsigned int minT = 0;
205 unsigned int maxT = 0;
208 unsigned int binT = (maxT-minT);
210 for(
unsigned int i=0;i<
fNofAPA;i++){
222 name <<
"fTimeChanU";
225 title <<
"Time vs Channel(Plane U, APA";
227 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), UChMax - UChMin + 1, UChMin, UChMax, binT, minT, maxT);
231 name <<
"fTimeChanThumbU";
234 title <<
"Time vs Channel(Plane U, APA";
236 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), 138, UChMin, UChMax, 138, minT, maxT);
240 name <<
"fTimeChanV";
243 title <<
"Time vs Channel(Plane V, APA";
245 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), VChMax - VChMin + 1, VChMin, VChMax, binT, minT, maxT);
249 name <<
"fTimeChanThumbV";
252 title <<
"Time vs Channel(Plane V, APA";
254 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), 138, VChMin, VChMax, 138, minT, maxT);
258 name <<
"fTimeChanZ0";
261 title <<
"Time vs Channel(Plane Z0, APA";
263 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), Z0ChMax - Z0ChMin + 1, Z0ChMin, Z0ChMax, binT, minT, maxT);
267 name <<
"fTimeChanThumbZ0";
270 title <<
"Time vs Channel(Plane Z0, APA";
272 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), 111, Z0ChMin, Z0ChMax, 111, minT, maxT);
276 name <<
"fTimeChanZ1";
279 title <<
"Time vs Channel(Plane Z1, APA";
281 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), Z1ChMax - Z1ChMin + 1, Z1ChMin, Z1ChMax, binT, minT, maxT);
285 name <<
"fTimeChanThumbZ1";
288 title <<
"Time vs Channel(Plane Z1, APA";
290 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), 111, Z1ChMin, Z1ChMax, 111, minT, maxT);
304 fChargeSumU= tfs->make<TH2I>(
"hChargeSumU",
"Charge Sum on U-planes", 2,0.5,2.5,2,0.5,2.5 );
305 fChargeSumV= tfs->make<TH2I>(
"hChargeSumV",
"Charge Sum on V-planes", 2,0.5,2.5,2,0.5,2.5 );
306 fChargeSumZ= tfs->make<TH2I>(
"hChargeSumZ",
"Charge Sum on Z-planes", 4,0.5,4.5,4,0.5,4.5);
307 fChargeSumU->SetStats(0); fChargeSumV->SetStats(0); fChargeSumZ->SetStats(0);
322 unsigned int tpcid, cryoid;
323 std::stringstream thumbnameZ0, thumbnameZ1;
331 std::vector< art::Ptr<raw::RawDigit> > Digits;
335 for(
size_t d = 0;
d < Digits.size();
d++){
345 int nSamples = digit->
Samples();
346 std::vector<short> uncompressed(nSamples);
359 std::vector<short> ladc(nSamples);
360 for (
int i=0; i<nSamples; i++) ladc[i]=uncompressed[i]-pedestal;
365 for(
unsigned int l=0;
l<ladc.size();
l++) {
374 for(
unsigned int l=0;
l<ladc.size();
l++) {
383 for(
unsigned int l=0;
l<ladc.size();
l++) {
392 for(
unsigned int l=0;
l<ladc.size();
l++) {
410 #endif // RawEVD35t_Module
float GetPedestal() const
Store parameters for running LArG4.
const ADCvector_t & ADCs() const
Reference to the compressed ADC count vector.
ULong64_t Samples() const
Number of samples in the uncompressed ADC data.
art::ServiceHandle< geo::Geometry > fGeom
Declaration of signal hit object.
ChannelID_t Channel() const
DAQ channel this raw data was read from.
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
void beginRun(const art::Run &run)
Definition of basic raw digits.
Planes which measure Z direction.
EDAnalyzer(fhicl::ParameterSet const &pset)
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
std::vector< TH2I * > fTimeChanU
unsigned int getTPCindex(unsigned int tpc)
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
std::vector< TH2I * > fTimeChanThumbU
#define DEFINE_ART_MODULE(klass)
std::vector< TH2I * > fTimeChanV
void analyze(const art::Event &evt)
Collect all the RawData header files together.
T get(std::string const &key) const
unsigned int getAPAindex(unsigned int apa)
std::vector< TH2I * > fTimeChanThumbV
unsigned int fChansPerAPA
Declaration of cluster object.
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.
RawEVD35t(fhicl::ParameterSet const &pset)
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< TH2I * > fTimeChanThumbZ1
std::vector< TH2I * > fTimeChanZ1
object containing MC truth information necessary for making RawDigits and doing back tracking ...
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< TH2I * > fTimeChanZ0
void reconfigure(fhicl::ParameterSet const &pset)
QTextStream & endl(QTextStream &s)
std::vector< TH2I * > fTimeChanThumbZ0
Event finding and building.
std::string fRawDigitLabel