FairRoot/PandaRoot
PndMvdToPix4ClusterTask.cxx
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndMvdPixelClusterTasksource file -----
3 // -------------------------------------------------------------------------
4 
5 
7 #include "FairRuntimeDb.h"
8 #include "FairRunAna.h"
9 #include "PndSdsPixelDigiPar.h"
10 #include "PndSdsDigiTopix4.h"
11 // ----- Default constructor -------------------------------------------
13 PndMvdPixelClusterTask(parName, totParName)
14 {
15  SetPersistency(kTRUE);
16 }
17 // -------------------------------------------------------------------------
18 
19 // ----- Destructor ----------------------------------------------------
21 {
22 }
23 // -------------------------------------------------------------------------
24 
25 std::vector<PndSdsDigiPixel> PndMvdToPix4ClusterTask::ConvertAndFilter(TClonesArray* digidata)
26 {
27  std::vector<PndSdsDigiPixel> result;
28  for (Int_t iPoint = 0; iPoint < digidata->GetEntriesFast(); iPoint++){ // Just conversion
29  PndSdsDigiTopix4* myDigi = (PndSdsDigiTopix4*)(digidata->At(iPoint));
30  if (myDigi->GetLeadingEdge() == 2729 || myDigi->GetLeadingEdge() == 2730
31  || myDigi->GetTrailingEdge() == 2730 || myDigi->GetTrailingEdge() == 2731){
32  std::cout << "Digi filtered: " << *myDigi << std::endl;
33  } else {
34  result.push_back(*myDigi);
35  }
36  }
37  return result;
38 }
39 
40 
42 
PndMvdToPix4ClusterTask(TString parName="MVDPixelDigiPar", TString totParName="MVDPixelTotDigiPar")
Data class to store the digi output of a pixel module.
void SetPersistency(Bool_t val=kTRUE)
UInt_t GetLeadingEdge() const
UInt_t GetTrailingEdge() const
ClassImp(PndMvdToPix4ClusterTask)
virtual std::vector< PndSdsDigiPixel > ConvertAndFilter(TClonesArray *digidata)
convert TClonesArray into std::vector and remove corrupted data (for test beam analysis) ...