X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FMakeSDigits.C;h=c6939fa1718734485080a6d0ab4b3e979184f4e9;hb=d879a92d8819d5646170437ebee8b54790925aef;hp=17e1882090a55b729e6f58cab4c2fae94939a8eb;hpb=377cd3df66c47690f0c01439c51896961c7126c6;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/MakeSDigits.C b/MUON/MakeSDigits.C index 17e1882090a..c6939fa1718 100644 --- a/MUON/MakeSDigits.C +++ b/MUON/MakeSDigits.C @@ -29,6 +29,7 @@ /// In case the raw data are ddl files, specify the path which has "raw0", "raw1".... events /// 3. OCDB path /// 4. run number +/// 5. switch to merge(true) or not merge(false) trigger digits /// and the output is : "MUON.SDigits.root" file with the same tree and event structure as produced in simulation directory /// /// Note: @@ -52,7 +53,7 @@ int MakeSDigits(const char* galiceFile="galice.root", const char* rawRootFile="./raw.root", - const char* ocdb = "local://$ALICE_ROOT/OCDB", int run=0) + const char* ocdb = "local://$ALICE_ROOT/OCDB", int run=0, bool isMergeTrigger=true) { //TGrid connect for alien ocdb TGrid::Connect("alien://"); @@ -83,16 +84,27 @@ int MakeSDigits(const char* galiceFile="galice.root", const char* rawRootFile=". AliMUONVDigitStore* sDigitStore = AliMUONVDigitStore::Create("AliMUONDigitStoreV2S"); sDigitStore->Connect(*treeS,true); - AliMUONDigitMaker *digitMaker = new AliMUONDigitMaker(false); - digitMaker->Raw2Digits(rawReader,sDigitStore,0x0); + + if(isMergeTrigger){ + AliMUONVTriggerStore* triggerStore = new AliMUONTriggerStoreV1; + triggerStore->Connect(*treeS,true); + digitMaker->SetMakeTriggerDigits(true); + digitMaker->Raw2Digits(rawReader,sDigitStore,triggerStore); + }else{ + digitMaker->Raw2Digits(rawReader,sDigitStore,0x0); + } TIter next(sDigitStore->CreateIterator()); AliMUONVDigit *mdigit; while ( (mdigit = reinterpret_cast(next())) ) { - mdigit->SetCharge(Float_t(mdigit->ADC())); - mdigit->SetADC(0); + if(mdigit->DetElemId()<1100){ + mdigit->SetCharge(Float_t(mdigit->ADC())); + mdigit->SetADC(0); + }else{ + mdigit->SetCharge(1.0); + } //mdigit->Print(); } treeS->Fill(); @@ -101,6 +113,8 @@ int MakeSDigits(const char* galiceFile="galice.root", const char* rawRootFile=". muonLoader->UnloadSDigits(); + if(isMergeTrigger) + triggerStore->Delete(); sDigitStore->Delete(); digitMaker->Delete(); @@ -108,4 +122,4 @@ int MakeSDigits(const char* galiceFile="galice.root", const char* rawRootFile=". delete runLoader; return 0; -} +} \ No newline at end of file