Skip to content
Prev Previous commit
Next Next commit
T0 digitzation as a part of FIT
  • Loading branch information
AllaMaevskaya committed Mar 21, 2019
commit 3f3e7d2e262780013ffb4710605fb07c320fc90e
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ inline o2::fit::DigitizationParameters T0DigitizationParameters()
result.mTime_trg_gate = 4.; // ns
result.mAmpThreshold = 100; // number of photoelectrons
result.mTimeDiffAC = (Geometry::ZdetA - Geometry::ZdetC) * TMath::C();
<<<<<<< HEAD
result.mIsT0 = true;
=======
>>>>>>> first separation T0 V0


return result;
}
} // namespace o2::t0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ class DigitizerTask : public FairTask
Digitizer mDigitizer; ///< Digitizer
const std::vector<o2::t0::HitType>* mHitsArray = nullptr; ///< Array of MC hits

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the HitType.h the HitType is defined in the o2::namespace, as well as in many places below.


TBranch* mQEDBranch = nullptr; //! optional special branch of hits from QED collitions
TBranch* mQEDBranch = nullptr; //! optional special branch of hits from QED collitions
const std::vector<o2::fit::HitType>* mHitsArrayQED = nullptr; //! array of MC hits from ED
float mQEDEntryTimeBinNS = 0.f; ///< every entry in the QED branch integrates QED for so many nanosec.
double mLastQEDTimeNS = 0.; ///< center of the time-bin of last added QED bg slot (entry of mQEDBranch)
int mLastQEDEntry = -1; ///< last used QED entry
UChar_t mQEDSourceID = 0; ///< MC ID source of the QED (stored in the labels)
float mQEDEntryTimeBinNS = 0.f; ///< every entry in the QED branch integrates QED for so many nanosec.
double mLastQEDTimeNS = 0.; ///< center of the time-bin of last added QED bg slot (entry of mQEDBranch)
int mLastQEDEntry = -1; ///< last used QED entry
UChar_t mQEDSourceID = 0; ///< MC ID source of the QED (stored in the labels)

o2::fit::Digit* mEventDigit = nullptr;
o2::dataformats::MCTruthContainer<o2::fit::MCLabel> mMCTruthArray; //! Labels containter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class HitType : public o2::BasicXYZEHit<float>
using BasicXYZEHit<float>::BasicXYZEHit;
};
} // namespace fit
<<<<<<< HEAD

=======
>>>>>>> T0 digitzation as a part of FIT
} // namespace o2

#endif
Expand Down
7 changes: 0 additions & 7 deletions Detectors/FIT/common/simulation/src/Digitizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ void Digitizer::smearCFDtime(Digit* digit)
if (amp > parameters.mCFD_trsh_mip) {
Double_t smeared_time = gRandom->Gaus(cfd, 0.050) + parameters.mBC_clk_center + mEventTime;
mChDgDataArr.emplace_back(ChannelData{ mcp, smeared_time, amp, numpart });

}
}
digit->setChDgData(std::move(mChDgDataArr));
Expand Down Expand Up @@ -196,16 +195,10 @@ void Digitizer::initParameters()
// murmur
}
//_______________________________________________________________________
<<<<<<< HEAD
void Digitizer::init()
{
std::cout << " @@@ Digitizer::init " << std::endl;
=======
void Digitizer::init() {
std::cout<<" @@@ Digitizer::init "<<std::endl;
>>>>>>> move Hit to common
}

//_______________________________________________________________________
void Digitizer::finish() {}
/*
Expand Down
2 changes: 1 addition & 1 deletion Steer/DigitizerWorkflow/src/FITDigitWriterSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class FITDPLDigitWriter
void init(framework::InitContext& ic)
{
std::string detStrL = mID.getName();
std::transform(detStrL.begin(), detStrL.end(), detStrL.begin(), ::tolower);
std::transform(detStrL.begin(), detStrL.end(), detStrL.begin(), ::tolower);

auto filename = ic.options().get<std::string>((detStrL + "-digit-outfile").c_str());
auto treename = ic.options().get<std::string>("treename");
Expand Down
11 changes: 3 additions & 8 deletions Steer/DigitizerWorkflow/src/FITDigitizerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,17 @@ class FITDPLDigitizerTask
// loop over all composite collisions given from context
// (aka loop over all the interaction records)
for (int collID = 0; collID < timesview.size(); ++collID) {
mT0Digitizer.setEventTime(timesview[collID].timeNS);
mT0Digitizer.setOrbit(timesview[collID].orbit);
mT0Digitizer.setBC(timesview[collID].bc);
mDigitizer.setEventTime(timesview[collID].timeNS);
mDigitizer.setOrbit(timesview[collID].orbit);
mDigitizer.setBC(timesview[collID].bc);
digit.cleardigits();
// for each collision, loop over the constituents event and source IDs
// (background signal merging is basically taking place here)
std::cout << " @@@@ mOrigin " << mOrigin << " mID " << mID.getName() << std::endl;
for (auto& part : eventParts[collID]) {
// get the hits for this event and this source
hits.clear();
<<<<<<< HEAD
retrieveHits(mSimChains, part.sourceID, part.entryID, &hits);

=======
retrieveHits(mSimChains, "T0Hit", part.sourceID, part.entryID, &hits);
>>>>>>> move Hit to common
LOG(INFO) << "For collision " << collID << " eventID " << part.entryID << " found " << hits.size() << " hits ";

// call actual digitization procedure
Expand Down